🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
7 messages
7 total messages Started by Steve Sun, 21 Dec 2008 17:05
INN Segfault
#79901
Author: Steve
Date: Sun, 21 Dec 2008 17:05
17 lines
1476 bytes
Hi all,

For reasons unknown my INN started segfaulting today.  A couple of times
it ran for a short while after a restart but now seems to be completely
dead.  I've tried upgrading to the current release (20081221) with no
difference.  Nothing in the logs indicate a problem except for the
actual segfault in syslog:
Dec 21 16:44:05 news kernel: innd[14161]: segfault at 00007fff374f3ff8
rip 00002ae672faadff rsp 00007fff374f4000 error 6

Here's a paste of the gdb output:
http://pastebin.com/m7bad8756

-- 
pub   1024D/228761E7 2003-06-04 Steven Crook
      Key fingerprint = 1CD9 95E1 E9CE 80D6 C885  B7EB B471 80D5 2287 61E7
uid                  Steven Crook <steve@mixmin.net>
Re: INN Segfault
#79904
Author: Bozweb
Date: Sun, 21 Dec 2008 18:07
18 lines
1641 bytes
On Sun, 21 Dec 2008 17:05:56 +0000 (UTC), Steve <steve@mixmin.net>
wrote:

>Hi all,
>
>For reasons unknown my INN started segfaulting today.  A couple of times
>it ran for a short while after a restart but now seems to be completely
>dead.  I've tried upgrading to the current release (20081221) with no
>difference.  Nothing in the logs indicate a problem except for the
>actual segfault in syslog:
>Dec 21 16:44:05 news kernel: innd[14161]: segfault at 00007fff374f3ff8
>rip 00002ae672faadff rsp 00007fff374f4000 error 6
>
>Here's a paste of the gdb output:
>http://pastebin.com/m7bad8756

I see a bug:
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/103329
Re: INN Segfault
#79908
Author: Russ Allbery
Date: Sun, 21 Dec 2008 20:59
25 lines
2070 bytes
Bozweb <bozweb@bozweb.net> writes:
> Steve <steve@mixmin.net> wrote:
>
>> For reasons unknown my INN started segfaulting today.  A couple of times
>> it ran for a short while after a restart but now seems to be completely
>> dead.  I've tried upgrading to the current release (20081221) with no
>> difference.  Nothing in the logs indicate a problem except for the
>> actual segfault in syslog:
>> Dec 21 16:44:05 news kernel: innd[14161]: segfault at 00007fff374f3ff8
>> rip 00002ae672faadff rsp 00007fff374f4000 error 6

>> Here's a paste of the gdb output:
>> http://pastebin.com/m7bad8756

> I see a bug:
> https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/103329

The backtrace points to history writes, but the bug you're referencing is
in OpenSSL.  Looks entirely unrelated to me.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: INN Segfault
#79909
Author: Russ Allbery
Date: Sun, 21 Dec 2008 21:02
41 lines
2328 bytes
Steve <steve@mixmin.net> writes:

> For reasons unknown my INN started segfaulting today.  A couple of times
> it ran for a short while after a restart but now seems to be completely
> dead.  I've tried upgrading to the current release (20081221) with no
> difference.  Nothing in the logs indicate a problem except for the
> actual segfault in syslog:
> Dec 21 16:44:05 news kernel: innd[14161]: segfault at 00007fff374f3ff8
> rip 00002ae672faadff rsp 00007fff374f4000 error 6
>
> Here's a paste of the gdb output:
> http://pastebin.com/m7bad8756

The code where you're getting the segfault is:

static bool
set(searcher *sp, hash_table *tab, void *value)
{
    off_t offset;
    
    if (sp->aborted)
        return false;

    /* If we have the index file in memory, use it */
    if ((tab->incore != INCORE_NO) && (sp->place < conf.tsize)) {
        void *where = (char *)tab->core + (sp->place * tab->reclen);

        memcpy(where, value, tab->reclen);

So either value, something in tab, or sp is invalid.  In the set() frame,
could you try:

    print *tab
    print *sp
    print *value

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: INN Segfault
#79913
Author: Steve
Date: Sun, 21 Dec 2008 22:52
38 lines
2066 bytes
On Sun, 21 Dec 2008 13:02:09 -0800, Russ Allbery wrote in
Message-Id: <87ej01p7hq.fsf@windlord.stanford.edu>:

> The code where you're getting the segfault is:
>
> static bool
> set(searcher *sp, hash_table *tab, void *value)
> {
>     off_t offset;
>     
>     if (sp->aborted)
>         return false;
>
>     /* If we have the index file in memory, use it */
>     if ((tab->incore != INCORE_NO) && (sp->place < conf.tsize)) {
>         void *where = (char *)tab->core + (sp->place * tab->reclen);
>
>         memcpy(where, value, tab->reclen);
>
> So either value, something in tab, or sp is invalid.  In the set() frame,
> could you try:
>
>     print *tab
>     print *sp
>     print *value

Hi Russ,

Thanks for the info.  I've actually resolved the problem. It was down to
a regex I was testing in Cleanfeed that caused catastophic backtracking
on rare messages.  Not sure why this triggered the segfault but
reverting the Cleanfeed code certainly resolved it.  If it's of any
value I can reinsert the faulty regex and try to debug it further.

-- 
pub   1024D/228761E7 2003-06-04 Steven Crook
      Key fingerprint = 1CD9 95E1 E9CE 80D6 C885  B7EB B471 80D5 2287 61E7
uid                  Steven Crook <steve@mixmin.net>
Re: INN Segfault
#79914
Author: Russ Allbery
Date: Sun, 21 Dec 2008 23:06
20 lines
1983 bytes
Steve <steve@mixmin.net> writes:

> Thanks for the info.  I've actually resolved the problem. It was down to
> a regex I was testing in Cleanfeed that caused catastophic backtracking
> on rare messages.  Not sure why this triggered the segfault but
> reverting the Cleanfeed code certainly resolved it.  If it's of any
> value I can reinsert the faulty regex and try to debug it further.

Huh, interesting.  I wonder if it was causing the mmap to fail due to
memory starvation or something.

Given that the problem was so far removed from the cause, my guess is that
it's not going to be horribly informative to try to debug further, but
it's strange that a bad regex would have caused problems there.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: INN Segfault
#79916
Author: Steve
Date: Sun, 21 Dec 2008 23:18
12 lines
1429 bytes
On Sun, 21 Dec 2008 15:06:46 -0800, Russ Allbery wrote in
Message-Id: <87ocz5i0vt.fsf@windlord.stanford.edu>:

> Huh, interesting.  I wonder if it was causing the mmap to fail due to
> memory starvation or something.
The colo-based server in question is miserably short of memory so it's
more than likely.  An upgrade is on my list for Santa.  :)

-- 
pub   1024D/228761E7 2003-06-04 Steven Crook
      Key fingerprint = 1CD9 95E1 E9CE 80D6 C885  B7EB B471 80D5 2287 61E7
uid                  Steven Crook <steve@mixmin.net>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads