[IRCServices Coding] Re: [IRCServices] IRC Services 5.0a24 segfault on startup

Mark Hetherington mark at ctcp.net
Tue Mar 12 13:27:24 PST 2002


>      If you can track this down it would be appreciated.  

The crash was much easier to find that I thought. The function 
add_nickgroupinfo raises the SEGFAULT "on purpose"
if(ngi->id==0)
{
module_log("PANIC: add_nickgroupinfo: ngi->id==0");raise(/*SIGSEGV*/11);
}

As to where this self resurrecting nickgroup is, well an XML output from 
the httpd shows:

<nickgroupinfo>
<id>0</id>
<nicks count='2'>
<array-element>list</array-element>
<array-element>help</array-element>
</nicks>
<mainnick>0</mainnick>
<pass></pass>
<authcode>0</authcode>
<authset>0</authset>
<flags>-2147483648</flags>
<os_priv>0</os_priv>
<language>-1</language>
<timezone>32767</timezone>
<channelmax>-1</channelmax>
<access count='0'>
</access>
<ajoin count='0'>
</ajoin>
<memoinfo>
<memos count='0'>
</memos>
<memomax>0</memomax>
</memoinfo>
<ignore count='0'>
</ignore>
</nickgroupinfo>

list and help are forbidden nicks. When they were first forbidden, I 
believe they had actually been registered to a user. Since this happened so 
long ago, I cannot be 100% sure on that.

As a suggestion, maybe forbidden nicks could also store the date/time of 
the forbid and display it through /ns list forbidden and the httpd since it 
would help when tracking oddities like this one. I have archived services 
log files but since they are archived by date, it would take a long time to 
track this without an indication.

How it gets written to disk, I have no idea since version 5.0a23 should 
skip the write and logs that it does so. 

Since the XML dump does not report all nicknames, I am unable to find out 
if any other entries have a nickgroup of 0.

I am going to try dropping the nicknames that have reported an ngi->id of 
zero and seeing if that solves the problem completely and will report back 
once more is known.


> Oh, and wrong
> list.

Sorry, I thought I had sent it to it to the coding list. 

-- 
Mark.