monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SIGSEGV problem


From: Jan-Henrik Haukeland
Subject: Re: SIGSEGV problem
Date: Fri, 15 Aug 2003 03:16:15 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux)

Christian Hopp <address@hidden> writes:

> On Thu, 14 Aug 2003, Jan-Henrik Haukeland wrote:
>
>>
>> I ran a fast test with efence and managed to reproduce the SIGSEGV (it
>> may be more). SIGSEGV is thrown in process/common.c:connectchild()
>> from this line:
>>
>>   parent->children[parent->children_num - 1] = (struct myprocesstree *) 
>> child;
>>
>>
>> >From my gdb/efence session:
>>
>>   Program received signal SIGSEGV, Segmentation fault.
>>   [Switching to Thread 1024 (LWP 1269)]
>>   0x0805b340 in connectchild (parent=0x41143fa0, child=0x41144740)
>>       at process/common.c:232
>>
>>   (gdb) p *parent->children
>>   Cannot access memory at address 0x41365fcc
>>
>>   (gdb) p parent->children[parent->children_num - 1]
>>   Cannot access memory at address 0x41365ffc
>>
>> I suspect it's caused by trying to access something outside the
>> array. Maybe Christian can debug this since it's his code :) I'm of to
>> bed, it's late.
>
> Strange... I just had a look at the code... and it IMHO impossible to
> access memory which is not allocated at this position!
>
> I do a xcalloc of parent->children_num entities of pointers and it has to
> be possible to access the last one (parent->childen_num - 1)... or?  Or is
> it being deleted while this happens... somekind of race condition???

I think it must have been a race condition of some sort. The strange
thing is that I cannot reproduce the problem after I added the signal
block code. Maybe that was it and it is fixed!? Do any of you get any
more SIGSEGV now? Martin?

-- 
Jan-Henrik Haukeland




reply via email to

[Prev in Thread] Current Thread [Next in Thread]