[Nfd-dev] Boost Logging Issues

Junxiao Shi shijunxiao at email.arizona.edu
Thu May 25 12:36:30 PDT 2017


Hi Damian

I see nothing unusual in the output. If they are false positives caused by valgrind bugs, you can safely ignore them.
If you are uncertain whether there’s a problem in the code, try AddressSanitizer (ASan) instead of valgrind and see whether ASan complains about anything.

Yours, Junxiao

> On May 24, 2017, at 9:18 AM, Damian Matthew Coomes (dmcoomes) <dmcoomes at memphis.edu> wrote:
> 
> 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 <https://redmine.named-data.net/issues/3949#change-18572>Here is the patch on gerrit: https://gerrit.named-data.net/#/c/3822 <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
> <valgrind_output.txt>_______________________________________________
> Nfd-dev mailing list
> Nfd-dev at lists.cs.ucla.edu <mailto:Nfd-dev at lists.cs.ucla.edu>
> http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev <http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20170525/9a6f0bbd/attachment.html>


More information about the Nfd-dev mailing list