Project

General

Profile

Actions

Bug #1366

closed

Setting multiple interest filters can cause a segmentation fault on shutdown.

Added by Syed Amin about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
High
Category:
-
Target version:
-
Start date:
03/18/2014
Due date:
% Done:

100%

Estimated time:

Description

If multiple interest filters are set for a same face then calling shutdown() on face may cause a segmentation fault.

To reproduce the error set another test filter in producer.cpp as shown below:

face_.setInterestFilter("/localhop/testApp",
                        bind(&Producer::onInterest, this, _1, _2),
                        bind(&Producer::onRegisterFailed, this, _1, _2));

Then put face_.shutdown() in onInterest case as well to force the shutdown. Otherwise wait for the onRegisterFailed to be called.

Buiild it and run it again:

~$ ./waf && ./build/examples/producer

ERROR: Failed to register prefix in local hub's daemon (Unauthorized command)

 Segmentation fault: 11 (core dumped)

The output from the lldb is attached.


Files

seg-fault.txt (10.1 KB) seg-fault.txt Syed Amin, 03/18/2014 07:58 PM
Actions #1

Updated by Alex Afanasyev about 10 years ago

  • Project changed from NFD to ndn-cxx
  • Target version deleted (v0.1)
Actions #2

Updated by Alex Afanasyev about 10 years ago

This bug should have been fixed by commit:6e0c5a5e (it is already merged to master).

Can you confirm that?

Actions #3

Updated by Syed Amin about 10 years ago

I tried it with the the current version of ndn-cpp-dev and the problem is still there.

My current version of ndn-cpp-dev is:

commit aa0e7dad62bf078ca122bb7b91c03a74825b9433

Author: Alexander Afanasyev alexander.afanasyev@ucla.edu

Date: Mon Mar 17 14:37:33 2014 -0700

Actions #4

Updated by Alex Afanasyev about 10 years ago

  • Description updated (diff)
Actions #5

Updated by Alex Afanasyev about 10 years ago

  • Description updated (diff)
Actions #6

Updated by Alex Afanasyev about 10 years ago

Can you check whether this change fixed the issue http://gerrit.named-data.net/#/c/522/? In the described scenario I no longer have unexpected behavior.

Actions #7

Updated by Alex Afanasyev about 10 years ago

  • Status changed from New to In Progress
  • Assignee set to Alex Afanasyev
  • % Done changed from 0 to 100
Actions #8

Updated by Alex Afanasyev about 10 years ago

  • Status changed from In Progress to Code review
Actions #9

Updated by Syed Amin about 10 years ago

Alex Afanasyev wrote:

Can you check whether this change fixed the issue http://gerrit.named-data.net/#/c/522/? In the described scenario I no longer have unexpected behavior.

Great! that seems to work. Thanks.

Actions #10

Updated by Alex Afanasyev about 10 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF