Hi All,

I have a bunch of C++ application which runs as daemons in Linux.

Furthermore, since these daemons rely on each other, they use IPC
(inter-process communication) to communicate with each other, and consume a
considerable amount of memory and CPU time.

These daemons are compiled with -g -O0 compiler flags, and started in right
order using a shell script.

These daemons seem to have buggy behaviour and "sometimes" crash.

Another reason for it to crash might be corrupted input data that it
processes.

To find out about the real cause, I tried both Valgrind to debug it. By the
way, I am quite new to Valgrind.

I used --leak-check=yes and --log-file=foo.txt options with Valgrind.

However, Valgrind did not report any invalid write/read or uninitialized
variable errors which may have caused the crash. FAQ on Valgrind's official
website says that this is the nature of Valgrind that you can not change
such that it can not replicate the native execution environment.

What is the best debugger options to use with Valgrind to debug a Linux
daemon ?

Should I attach Valgrind to already running process ? or Is it ok to start
the daemon with Valgrind in shell script ?

Thanks.
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to