[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SIGSEGV problem
From: |
Martin Pala |
Subject: |
SIGSEGV problem |
Date: |
Wed, 13 Aug 2003 23:45:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2 |
Hi,
during tests occasionaly one of monit threads receives SIGSEGV. It
happens in the case, that the monitored process is not running.
the path to the SIGSEGV is as follows:
1.) we're waiting for process to start in main thread after spawning
process start method:
...
thread is status= pthread_create(&thread, NULL, wait_start, s);
...
2.) in new thread (in wait_start) we detach and looking for process to
start or timeout:
...
if(is_process_running(s))
break;
...
3.) the thread crashed rigth after first call of is_process_running(s)
-> get_pid(s->path) -> exist_file(char *file) -> stat(file, &buf) - see
strace output for complete trace:
...
3788 stat64("XE^^G^H/run/slapd.pid", <unfinished ...>
...
As you can see, it seems that the pidfile path pointer points to strange
place.
This problem happens very occasionaly (cca 5% of test attempts failed on
this error - others were OK).
I tried to include some debug tags to trace it - something like
fprintf(stderr, "mark1"); etc., but as soon as i did it, i was not able
to replicate the problem at all. I tied it many times again with and
without these tags and the result was the same - with tags it worked
well, without tags it failed => probably there is some race condition,
maybe outside monit (in libs).
Any ideas?
Martin
monit.strace.2003081329183367000.gz
Description: application/gzip
- SIGSEGV problem,
Martin Pala <=
- Re: SIGSEGV problem, Martin Pala, 2003/08/13
- Re: SIGSEGV problem, Christian Hopp, 2003/08/14
- Re: SIGSEGV problem, Jan-Henrik Haukeland, 2003/08/14
- Re: SIGSEGV problem, Martin Pala, 2003/08/15
- Re: SIGSEGV problem, Martin Pala, 2003/08/15
Re: SIGSEGV problem, Jan-Henrik Haukeland, 2003/08/13