[dsc] Upcoming DSC 2.4.0

Jerry Lundström jerry at dns-oarc.net
Thu Jan 5 14:28:49 UTC 2017

Hi all,

Due to reported issues with threads (see below) for version 2.2.0 and
above, threads will be optional and default disabled in the next release
which I plan to release late next week.

Note, -T can be used as a workaround for the current release.

Reported Issues

- In rare occasions the forked process that writes the output file got
stuck waiting for a mutex within the NSS library.  The effect would be a
loss of data at that interval period and a stuck process.

- DSC 2.3.0 on Debian Jessie would stop writing output files after days
of running, have yet been able to replicate this problem but it was
clear that the reporter moved to the threaded version and that the
non-threaded version worked before.

- Inconsistency with the number of packets captured if running with
threads vs running without (-T), this has been noticed while debugging
the first issue.

Why is threads used?

Threads was implemented to try and solve other issues related to
libpcap/kernel and loss of packets, depending on libpcap and kernel
version there was a chance to miss packets if the PPS rate was low
(<10).  It was my hope that threading the packet capturing would work
fine since everything else was untouched and running in the main thread,
but evidently not.

Why disable threads?

Main issue seems to be related to the forking of the process when
writing the output file and due to the way DSC was originally built
there is no easy solution to use threads for that because of a lot of
usage of static context and state in almost every C file.

What about next time?

To try and prevent this from happening again I have begun using our
build platform to continuously run the develop branch of DSC and monitor
the output files, packets captured, statistics generated and send
notifications if there are any discrepancies.

With that in place changes are going to be easier to make and verify,
also considering a full redo and maybe a change of language.

Special thanks to Anand at RIPE NCC for a lot of help tracking some of
these issues down.


More information about the dsc mailing list