Re: memcheck is getting SIGKILLed before leak report is output

"Bresalier, Rob (Nokia - US/Murray Hill)" <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <PH0PR08MB698857B66846F6C6B5B958B9F37B9@PH0PR08MB6988.namprd08.prod.outlook.com>
> Normally, if it is the OOM that kills a process, you should find a trace of this in the system logs.

I looked in every system log I could find, there was no indication of OOM killing it in any system log.

> I do not understand what you mean by reducing the nr of callers from 12 to 6.
> What are these callers ? Is that some threads of the process you are running
> under valgrind ?
> 

I mean the --num-callers option core option to valgrind. By default this is 12, and I didn't specify it. I tried using --num-callers=6 to reduce memory consumption. From the valgrind manual this means " Specifies the maximum number of entries shown in stack traces that identify program locations.". By reducing it to 6 I was hoping to reduce valgrind memory consumption in case it really was OOM killer, which I really doubt now.

> And just in case: are you using the last version of Valgrind ?

Yes I used the last version of valgrind and many earlier versions.

> You might use "strace" on valgrind to see what is going on at the time
> _exit(0) is called.

I did use 'strace' and dmesg. Neither indicated it was OOM killer.

I did happen to save the strace log when the SIGKILL happened. Here is the part around the _exit(0):

read(2040, "R", 1)                      = 1
gettid()                                = 3332
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP SYS], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[], ~[ILL TRAP BUS FPE KILL SEGV STOP SYS], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP SYS], NULL, 8) = 0
gettid()                                = 3332
write(2041, "S", 1)                     = 1
exit(0)                                 = ?
+++ killed by SIGKILL +++

Don't understand why strace log has exit(0) without the underscore, I know for a fact that it was with the underscore.

The strace log doesn't indicate anything special happening around the _exit(0). When I removed it the SIGKILL went away.

> You might also start valgrind with some debug trace e.g.  -d -d -d -d -v -v -v -v

Was not aware of this and didn't try it. Don't have time to try it now.

Regards,
Rob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.