Hi. I'm trying to eliminate memory leaks in some C program; I run valgrind 3.6.0 under FreeBSD 8.2-PRERELEASE/i386. Actually it's a sendmail milter. It runs as a daemon, forking/detaching from terminal. It communicates with MTA via a unix socket, and sendmail uses its hooks in a threaded environment. I've read in docs that valgrind doesn't care about fork() calls and traces them too just because it creates a copy of a process, but in reality I have valgrind exiting in exactly the same moment as the parent does. I have done some googling and found that it's recommended to use foreground mode to trace daemons. This milter I'm debugging also has one, but the problem is that when in this mode both valgrind and daemon exit shortly after launch, at some close but random moment. However, being run without valgrind, daemon can run almost indefinitely (and there's no difference is it in foreground or daemon mode).
I understand that all I'm describing is too common to receive some exact advice, so I wanted to ask for some directions about what to do in this situation. One more. Valgrind also complains about unhandled system call, like that: --3924-- WARNING: unhandled syscall: 429 --3924-- You may be able to write your own handler. --3924-- Read the file README_MISSING_SYSCALL_OR_IOCTL. --3924-- Nevertheless we consider this a bug. Please report --3924-- it at http://valgrind.org/support/bug_reports.html. That's a sigwait() system call: grep [...] /usr/include/sys/syscall.h:#define SYS_sigwait 429 I've read that I should write my own wrapper, but I don't have a clue about where to start. Thanks. ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users