🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Steve Rawlinson Thu, 28 Aug 1997 00:00
nnrpd + mmap + large active = seg fault
#21025
Author: Steve Rawlinson
Date: Thu, 28 Aug 1997 00:00
31 lines
1337 bytes
I've been running inn 1.5.1 nnrpd with Matt Dillon's mmap patch on
bsd/os 3.0 for months without problems. When the active file grows
beyond a certain size nnrpd dies with a segmenation  fault in strchr()
during the line count:

    /* Count lines. */
    for (p = active, i = 0; (p = strchr(p, '\n')) != NULL; p++, i++)
        continue;

as it gets to towards the end of the file.

Shrinking the active file a bit or using nnrpd without the mmap patch
solves the problem.

The active file currently stands at 1236323 bytes and is working;
1236946 bytes is too large and the seg faults start.

The mmap(2) manpage does not mention any limit to the size of file it
can map - is there one? Or is there some other problem? Anyone else
seen this?

steve

------
Steve Rawlinson
ClaraNet Ltd
steve@clara.net
0171 647 1000

Re: nnrpd + mmap + large active = seg fault
#21028
Author: Rahul Dhesi
Date: Thu, 28 Aug 1997 00:00
8 lines
905 bytes
I have had good luck with the actived approach, in which a separate
daemon keeps the active file data in memory.  I downloaded what I'm
using from http://www.insync.net/~aos/inn.html .
-- 
Rahul Dhesi <dhesi@spams.r.us.com>

Re: nnrpd + mmap + large active = seg fault
#21040
Author: Mark Hittinger
Date: Thu, 28 Aug 1997 00:00
23 lines
1238 bytes
steve@clara.net (Steve Rawlinson) writes:

>    /* Count lines. */
>    for (p = active, i = 0; (p = strchr(p, '\n')) != NULL; p++, i++)
>        continue;

>as it gets to towards the end of the file.
>Shrinking the active file a bit or using nnrpd without the mmap patch
>solves the problem.

I bet when the active file ends exactly on a page boundary you seg fault
when you go over the edge of the mmap.  We'd need an active file length
double check here instead of just touching the location p (which won't
exist in that case).

Regards,

Mark Hittinger
Netcom/Dallas
bugs@freebsd.netcom.com

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