Bugzilla – Bug 1597
EmuNetDevice::StopDevice() does not return
Last modified: 2017-02-07 10:26:54 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.
need to confirm that this bug still exists with FdNetDevice
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