Bug 1597 - EmuNetDevice::StopDevice() does not return
EmuNetDevice::StopDevice() does not return
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: fd-net-device
ns-3.14
PC Linux
: P5 normal
Assigned To: alina
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-25 01:53 UTC by konstantin.miller
Modified: 2017-02-07 10:26 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description konstantin.miller 2013-02-25 01:53:22 UTC
This bug is related to bug 903, which is for the TAP device and is supposed to be fixed.

Upon calling Simulator::Destroy(), EmuNetDevice::StopDevice() is called. The latter does not return since it waits for EmuNetDevice::ReadThread() to terminate. ReadThread, however, is blocked by a call to recvfrom().

I filed the bug for the version 3.14 but it seems like this part of the code didn't change in the last version.
Comment 1 Tom Henderson 2014-10-06 16:37:26 UTC
need to confirm that this bug still exists with FdNetDevice
Comment 2 Tom Henderson 2017-02-07 10:26:54 UTC
Closing this bug as resolved, fixed (by refactoring of emu to fd-net-device)

This is the old behavior referred to in the bug report:
http://code.nsnam.org/ns-3.13/file/806692404e47/src/emu/model/emu-net-device.cc#l617

which resulted in a a blocking call to pthread_join().

Currently, EmuNetDevice was replaced by FdNetDevice, which has this different code for StopDevice:
http://code.nsnam.org/ns-3.26/file/af21cf79d193/src/fd-net-device/model/fd-net-device.cc#l271