Project

General

Profile

Actions

Bug #2518

closed

Segfault when destructing face without cancelling pending interests

Added by Alex Afanasyev almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Base
Target version:
Start date:
02/12/2015
Due date:
% Done:

100%

Estimated time:

Description

Pseudocode to trigger the problem:

shared_ptr<Face> face = make_shared<Face>();

boost::thread t = boost::thread([&face] {
    boost::this_thread::sleep_for(time::milliseconds(55));
    face->getIoService().post([&face] {
        face.reset();
      });
  });

face->expressInterest(Interest("/Hello/World", time::milliseconds(50)),
                      bind([]{}), bind([]{}));

face->processEvents();

Destructing the face should have caused all handlers posted to io service to be cancelled and processEvents() should have been terminated with no error.

Actual: segfault


Related issues 2 (0 open2 closed)

Related to NFD - Bug #2517: NFD state is not properly cleaned up on destructionAbandoned

Actions
Related to ndn-cxx - Task #1372: Replace usages of deadline_timer with Scheduler-based eventsClosedAlex Afanasyev

Actions
Actions

Also available in: Atom PDF