🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #21025

nnrpd + mmap + large active = seg fault

#21025
From: 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

Technical Details
Message-ID: <3405a544.2088096267@news.clara.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <3405a544.2088096267@news.clara.net>
Subject: nnrpd + mmap + large active = seg fault
Date: Thu, 28 Aug 1997 00:00:00 +0000
From: steve@clara.net (Steve Rawlinson)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 268786807
Newsgroups: news.software.nntp,comp.os.bsdi.misc