[Nfd-dev] Boost Logging Issues

Damian Matthew Coomes (dmcoomes) dmcoomes at memphis.edu
Wed May 24 09:18:45 PDT 2017


Developers,


Currently, I am working on a patch that will replace nlsr's log4cxx with ndn-cxx's logging facility. I am running into an issue regarding the unit-tests in nlsr. A majority of the time, I can run the tests and there will be no errors. Every now and then, I will receive a segmentation fault from one of the tests. When I run valgrind on the file, I first receive messages that state "conditional jump or move depends on uninitialised value(s)". These messages appear for the master branch as well, and in searching for these kind of valgrind errors, I found that others have received these messages as false positives. Therefore, my interests are in the following messages. I get a long list of messages that state "block was alloc'd at", "invalid read of size x", or "address is x bytes inside a block of size y free'd". The issues generally mention Boost on numerous lines under the messages. Many seem to indicate issues with the logging aspect of Boost. For instance, some of the messages point to std::ostream::flush(), which likely indicates the writing of log messages to the destination file. It is also important to note that the nlsr executable file is not experiencing segmentation faults. It is just the unit-tests.


The unit-tests were not altered much. I changed the default log-level to match my change in nlsr.conf. I also call an INIT_LOGGERS() function that sets the logging destination file and the log-level. A few other tests have a setLevel function to change the log-level from DEBUG to TRACE and vice versa. Has anyone who has worked on ndn-cxx's logging or Boost run into issues of this sort before?


Here is the Redmine issue: https://redmine.named-data.net/issues/3949#change-18572

Here is the patch on gerrit: https://gerrit.named-data.net/#/c/3822
I have also attached valgrind's full log.
<https://gerrit.named-data.net/#/c/3822>

Thank you for your time,

Damian Coomes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20170524/4660365c/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: valgrind_output.txt
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20170524/4660365c/attachment-0001.txt>


More information about the Nfd-dev mailing list