Thread View: news.software.nntp
21 messages
21 total messages
Started by Ben Rosengart
Fri, 22 Feb 2002 21:47
CNFS corruption
Author: Ben Rosengart
Date: Fri, 22 Feb 2002 21:47
Date: Fri, 22 Feb 2002 21:47
28 lines
2016 bytes
2016 bytes
I am using INN 2.3.2 on NetBSD 1.5.2. I am seeing a very strange problem, and I'm hoping someone here can shed some light on it. I have two readers and a feeder. The feeder feeds the first reader, and the first reader feeds the second reader, all with nntpsend (innxmit). There are more details, but I don't think they're relevant here. Several times a day, the feed from the first reader to the second gets stuck. If I extract the first token from the spool file on the first reader and examine the article with sm(8), I discover that it's corrupted: it's an article fragment, or an article with a fragment prepended, or a fragment with a fragment prepended, and so on. This type of corruption shows up on the second reader as well, though not on the same articles. There are actually at least two bugs here: one causing the corruption, and one causing innxmit to stall when it encounters a corrupted article. This is a big issue for us and I will be happy to collect any sort of data that might help anyone figure it out. -- Ben Rosengart (212) 741-4400 x215 "For values of 'whatever'."
Re: CNFS corruption
Author: BOUWSMA Beery
Date: Fri, 22 Feb 2002 22:45
Date: Fri, 22 Feb 2002 22:45
35 lines
2451 bytes
2451 bytes
Moin, moin! %s wrote on %.3s, %lld Sep 1993 > I am using INN 2.3.2 on NetBSD 1.5.2. I am seeing a very strange > to the second gets stuck. If I extract the first token from the > spool file on the first reader and examine the article with sm(8), > I discover that it's corrupted: it's an article fragment, or an > article with a fragment prepended, or a fragment with a fragment I can be misremembering things since it's been long ago, but I do distinctly remember trying NetBSD-current and discarding it due to corruption, or should I say, a delay in the time some articles were received and the time they actually appeared on the spool available to other utilities. The vm system in NetBSD has undergone a major reworking, and I believe that the corruption I saw was due to a buggy mmap() implementation or the need to do something that I wasn't doing or didn't want to do. As I say, this was years ago when I actually had my hands on machines. On the other hand, I was using distinctively old non-stock INN k0deZ with great results on NetBSD-current without ever experiencing any problems due to a potential delay from accepting to writing article data. Not sure if this helps you, but I'd suspect NetBSD's vm system with the symptoms you describe... Prosit Mahlzeit barry bouwsma
Re: CNFS corruption
Author: Mark Hittinger
Date: Fri, 22 Feb 2002 22:57
Date: Fri, 22 Feb 2002 22:57
12 lines
1768 bytes
1768 bytes
BOUWSMA Beery <netbsd-misuser-200202@remove-NOSPAM-to-reply.netscum.dyndns.dk> writes: >The vm system in NetBSD has undergone a major reworking, and I believe >that the corruption I saw was due to a buggy mmap() implementation or >the need to do something that I wasn't doing or didn't want to do. Try recompiling with mmap off. Don't use cnfs partitions > 2g. Later Mark Hittinger bugs@pu.net
Re: CNFS corruption
Author: Ben Rosengart
Date: Fri, 22 Feb 2002 22:57
Date: Fri, 22 Feb 2002 22:57
26 lines
2023 bytes
2023 bytes
In article <slrna7df2u.a4s.br@panix2.panix.com>, Ben Rosengart wrote: > I am using INN 2.3.2 on NetBSD 1.5.2. I am seeing a very strange > problem, and I'm hoping someone here can shed some light on it. > > I have two readers and a feeder. The feeder feeds the first reader, > and the first reader feeds the second reader, all with nntpsend > (innxmit). There are more details, but I don't think they're > relevant here. Several times a day, the feed from the first reader > to the second gets stuck. If I extract the first token from the > spool file on the first reader and examine the article with sm(8), > I discover that it's corrupted: it's an article fragment, or an > article with a fragment prepended, or a fragment with a fragment > prepended, and so on. It gets weirder. At least some of the time, and maybe all of the time, when we go back to look at the bad articles several hours later with sm(8), they appear OK. I just got off the phone with Alexis and we're now both suspecting some kind of VM misbehavior. -- Ben Rosengart (212) 741-4400 x215 "For values of 'whatever'."
Re: CNFS corruption
Author: Ben Rosengart
Date: Fri, 22 Feb 2002 22:59
Date: Fri, 22 Feb 2002 22:59
24 lines
1706 bytes
1706 bytes
In article <v1Ad8.169610$Re2.12738727@bin6.nnrp.aus1.giganews.com>, Mark Hittinger wrote: > BOUWSMA Beery <netbsd-misuser-200202@remove-NOSPAM-to-reply.netscum.dyndns.dk> writes: >>The vm system in NetBSD has undergone a major reworking, and I believe >>that the corruption I saw was due to a buggy mmap() implementation or >>the need to do something that I wasn't doing or didn't want to do. > > Try recompiling with mmap off. Would this lead to a serious performance hit? > Don't use cnfs partitions > 2g. We're using files, not partitions. Does the advice still hold? Our first tack might be to try a newer NetBSD. -- Ben Rosengart (212) 741-4400 x215 "For values of 'whatever'."
Re: CNFS corruption
Author: Ben Rosengart
Date: Fri, 22 Feb 2002 23:06
Date: Fri, 22 Feb 2002 23:06
15 lines
1234 bytes
1234 bytes
In article <v1Ad8.169610$Re2.12738727@bin6.nnrp.aus1.giganews.com>, Mark Hittinger wrote: > > Try recompiling with mmap off. $ ./configure --help | grep mmap $ What am I missing? -- Ben Rosengart (212) 741-4400 x215 "For values of 'whatever'."
Re: CNFS corruption
Author: Mark Hittinger
Date: Fri, 22 Feb 2002 23:26
Date: Fri, 22 Feb 2002 23:26
16 lines
1791 bytes
1791 bytes
Ben Rosengart <br@panix.com> writes: >In article <v1Ad8.169610$Re2.12738727@bin6.nnrp.aus1.giganews.com>, >Mark Hittinger wrote: >> >> Try recompiling with mmap off. >$ ./configure --help | grep mmap >What am I missing? Might have to go in by hand on config.h and look for HAVE_MMAP. Later Mark Hittinger bugs@pu.net
Re: CNFS corruption
Author: Mark Hittinger
Date: Fri, 22 Feb 2002 23:27
Date: Fri, 22 Feb 2002 23:27
32 lines
2716 bytes
2716 bytes
>> Try recompiling with mmap off. >Would this lead to a serious performance hit? That depends. If the NetBSD you are using has tried to backport the glorious and supreme FreeBSD merged VM/buffer-cache then it might not really be that much of a hit on the "write" side of things. You could build a version of innd that did not use mmap for writing (where you will get your corruption) and then build another version that does use MMAP for the innxmit/nnrpd images (reading the files with mmap is probably safe and does provide a shared file performance benefit). >> Don't use cnfs partitions > 2g. >We're using files, not partitions. Does the advice still hold? Definetly something to try. The VM subsystem might have a 32bit/64bit lseek math bug in its locking code or write clustering code. We had those (might still) on the FreeBSD side of things. >Our first tack might be to try a newer NetBSD. Good luck! If that doesn't work retreat to the safety of the 32 bit world and if that doesn't work retreat to file write mode for innd/expire/expireover. I respect your decision to use NetBSD and therefore will not urge you to board the true BSD mother ship. :-) Later Mark Hittinger bugs@pu.net
Re: CNFS corruption
Author: Alexis Rosen
Date: Fri, 22 Feb 2002 23:27
Date: Fri, 22 Feb 2002 23:27
20 lines
1906 bytes
1906 bytes
bugs@pu.net (Mark Hittinger) writes: >BOUWSMA Beery <netbsd-misuser-200202@remove-NOSPAM-to-reply.netscum.dyndns.dk> writes: >>The vm system in NetBSD has undergone a major reworking, and I believe >>that the corruption I saw was due to a buggy mmap() implementation or >>the need to do something that I wasn't doing or didn't want to do. >Try recompiling with mmap off. Yes, the obvious conclusion when I thought about it. Thanks. This should all be moot as of the next NetBSD release anyway. > Don't use cnfs partitions > 2g. Not a problem on NetBSD. I believe I fixed this a long time ago when Scott was first working on CNFS. In fact I'm *really* fuzzy on this but I think that dealing with quads was the only patch I had to make to port the code to NetBSD. In any case, that part at least all works fine out of the box now. /a
Re: CNFS corruption
Author: Russ Allbery
Date: Fri, 22 Feb 2002 23:30
Date: Fri, 22 Feb 2002 23:30
18 lines
1697 bytes
1697 bytes
Ben Rosengart <br@panix.com> writes:
> $ ./configure --help | grep mmap
> $
> What am I missing?
There's currently no easy way to turn off mmap globally in INN. You can
get part of the way there by editing include/config.h after running
configure to turn off the #define of HAVE_MMAP, but that only gets some of
it. On my to-do list, but below a lot of other things.
--
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: CNFS corruption
Author: Russ Allbery
Date: Fri, 22 Feb 2002 23:39
Date: Fri, 22 Feb 2002 23:39
18 lines
1784 bytes
1784 bytes
Alexis Rosen <alexis@panix.com> writes:
> Yes, the obvious conclusion when I thought about it. Thanks. This should
> all be moot as of the next NetBSD release anyway.
I sure hope so, since the support in INN for not using mmap is... baroque
at best. *mutter* Too much code cleanup, not enough time. :)
At least I'm making progress on fiddling with the tradindexed data
structures. :) By the end of this weekend, tradindexed may have an
actual test suite.
--
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: CNFS corruption
Author: Ben Rosengart
Date: Fri, 22 Feb 2002 23:40
Date: Fri, 22 Feb 2002 23:40
34 lines
2352 bytes
2352 bytes
In article <TtAd8.170047$Re2.12769882@bin6.nnrp.aus1.giganews.com>, Mark Hittinger wrote: >>> Try recompiling with mmap off. >>Would this lead to a serious performance hit? > > That depends. If the NetBSD you are using has tried to backport the glorious > and supreme FreeBSD merged VM/buffer-cache then it might not really be that > much of a hit on the "write" side of things. My colleagues say that NetBSD 1.5.2 does not have a unified VM and buffer cache. > You could build a version of innd that did not use mmap for writing (where you > will get your corruption) and then build another version that does use MMAP > for the innxmit/nnrpd images (reading the files with mmap is probably safe > and does provide a shared file performance benefit). Is there a simple way to do this or do I have to go groping around in configure's internals? > I respect your decision to use NetBSD and therefore will not urge you to > board the true BSD mother ship. :-) I've been a FreeBSD user since 1996, and all of my home machines run either FreeBSD or Mac OS X. Panix, however, has considerable investment in NetBSD. If you have any killer arguments for FreeBSD, email me. ;-) -- Ben Rosengart (212) 741-4400 x215 "For values of 'whatever'."
Re: CNFS corruption
Author: Jeffrey M. Vinocur
Date: Sat, 23 Feb 2002 00:05
Date: Sat, 23 Feb 2002 00:05
24 lines
1849 bytes
1849 bytes
In article <slrna7dlnq.2l5.br@panix2.panix.com>, Ben Rosengart <br@panix.com> wrote: >In article <TtAd8.170047$Re2.12769882@bin6.nnrp.aus1.giganews.com>, >Mark Hittinger wrote: > >> You could build a version of innd that did not use mmap for >> writing (where you will get your corruption) and then build >> another version that does use MMAP for the innxmit/nnrpd >> images > >Is there a simple way to do this or do I have to go groping around in >configure's internals? Sure -- build two copies, and then install the pieces you want from each one. Every directory has its own `make install` target that will install just the binaries from that directory. (More details if you need them.) -- Jeffrey M. Vinocur jeff@litech.org
Re: CNFS corruption
Author: Mark Hittinger
Date: Sat, 23 Feb 2002 00:06
Date: Sat, 23 Feb 2002 00:06
27 lines
2480 bytes
2480 bytes
Ben Rosengart <br@panix.com> writes: >My colleagues say that NetBSD 1.5.2 does not have a unified VM and >buffer cache. Still, turning off mmap for writes is probably not going to be as bad as you think. >Is there a simple way to do this or do I have to go groping around in >configure's internals? Maybe not eleet but I'd take your regular tree and tar it up, extract it someplace else, modify config.h to turn off HAVE_MMAP in the second tree, and rebuild. The images that you'd want to use with mmap off would be innd and the expire ones. Be sure to also try cnfs files < 2g in case your problem is just a matter of the mmap code not being able to deal with the > 2g case. A ton of effort has been put into the FreeBSD vm and mmap code - most unix systems don't have it exactly right - some are worse than others. >2g is askin' fer it. :-) Later Mark Hittinger bugs@pu.net
Re: CNFS corruption
Author: BOUWSMA Beery
Date: Sat, 23 Feb 2002 22:03
Date: Sat, 23 Feb 2002 22:03
65 lines
4378 bytes
4378 bytes
Moin, moin! %s wrote on %.3s, %lld Sep 1993 > The images that you'd want to use with mmap off would be innd and the expire > ones. I'm not quite sure how much expire will be afflicted by the vm quirks that causes messages to not be found in the spool for some time. For one thing, I was using k0deZ that mmap()ed the history files somewhat differently than the last time I took a look at INN's history file handling well over a year ago, and I have no idea what's elapsed since that time. I also don't know how NetBSD has evolved from the -current of a few years ago to today's 1.5.2, when back then the trickle sync algorithm used made history access very interesting when properly combined with mmap() as of the early v6 dbz k0deZ. It's two entirely different file access patterns. I don't recall severe history file access problems when I was definitely seeing spool access problems. Perhaps because the former would manifest itself less blatantly. Perhaps because I wasn't paying attention. Maybe I did see problems and forgot about them. What you will see with expire, assuming trickle sync and a fully mmap()ed set of history database files, is your machine will appear unresponsive for some length of time. On the other hand, without mmap()ing at least your history database files in innd, your performance will suck mud. And if trickle syncing is still in da house, any unclean crashes will be far more unclean than otherwise, though if you know how to properly recover by rebuilding your history database files from the text file, you can avoid this which you should do anyway regardless of OS. > A ton of effort > has been put into the FreeBSD vm and mmap code - most unix systems don't > have it exactly right - some are worse than others. With the experience I had, I'll frankly state that I trust the FreeBSD mmap() k0deZ far more, particularly since I was able to hack the latter to give the same benefits that were so attractive from NetBSD's trickle sync algorithm, with none of the drawbacks. Be advised that my last hands-on experience with this is based well over two years ago, and a lot could have changed with a lot of things. So, take my uncalled-for advice with a severe grain of salt. I was lucky that I could simply plug my news setup into either NetBSD or FreeBSD to see if I was imagining things, which influenced the path I took. I've been wary of NetBSD for general news service ever since. Also, if I'm following things right (which I'm not, being offline), it seems like Matt Dillon has just posted patches which should improve shutdown performance with the hacks I used to get FreeBSD to match or exceed NetBSD's level of random access file performance with mmap(). Just a few more random observations to confuse you. And not meaning to start a religious krieg or anything, since I'd love to see NetBSD with a fully functional vm and mmap. bouwsma barry, kinderliebhaber deluxe
Re: CNFS corruption
Author: Ben Rosengart
Date: Wed, 27 Feb 2002 19:13
Date: Wed, 27 Feb 2002 19:13
18 lines
1696 bytes
1696 bytes
In article <a56mbn$15q$2@marduk.litech.org>, Jeffrey M. Vinocur wrote: > > Sure -- build two copies, and then install the pieces you want > from each one. Every directory has its own `make install` target > that will install just the binaries from that directory. > > (More details if you need them.) I turned off HAVE_MMAP in config.h, rebuilt, and installed all the new binaries. The problem persists, and I notice there's still a lot of mmap'ing going on. Do you think it's worth it to try to do the rest of the steps to turn off mmap? If so, what are they? -- Ben Rosengart (212) 741-4400 x215 "For values of 'whatever'."
Re: CNFS corruption
Author: Jeffrey M. Vinocur
Date: Wed, 27 Feb 2002 19:44
Date: Wed, 27 Feb 2002 19:44
24 lines
1931 bytes
1931 bytes
In article <slrna7qbv6.jsi.br@panix2.panix.com>, Ben Rosengart <br@panix.com> wrote: >In article <a56mbn$15q$2@marduk.litech.org>, Jeffrey M. Vinocur wrote: >> >> Sure -- build two copies, and then install the pieces you want >> from each one. Every directory has its own `make install` target >> that will install just the binaries from that directory. >> (More details if you need them.) > >I turned off HAVE_MMAP in config.h, rebuilt, and installed all the new >binaries. The problem persists, and I notice there's still a lot of >mmap'ing going on. Do you think it's worth it to try to do the rest >of the steps to turn off mmap? If so, what are they? I don't know anything about INN's mmap -- I was just offering details on how to intermingle the two builds. Hopefully somebody else can help. -- Jeffrey M. Vinocur jeff@litech.org
Re: CNFS corruption
Author: Rebecca Ore
Date: Fri, 01 Mar 2002 03:46
Date: Fri, 01 Mar 2002 03:46
24 lines
1975 bytes
1975 bytes
Russ Allbery <rra@stanford.edu> writes: > Alexis Rosen <alexis@panix.com> writes: > > > Yes, the obvious conclusion when I thought about it. Thanks. This should > > all be moot as of the next NetBSD release anyway. > > I sure hope so, since the support in INN for not using mmap is... baroque > at best. *mutter* Too much code cleanup, not enough time. :) I've been running INN-2.3.2 with NetBSD for a year. The only thing that utterly bombed was --with-tagged-hash and some of the alternative spool types. No problems with cycbuff. > > At least I'm making progress on fiddling with the tradindexed data > structures. :) By the end of this weekend, tradindexed may have an > actual test suite. Need testers? -- Rebecca Ore
Re: CNFS corruption
Author: Russ Allbery
Date: Fri, 01 Mar 2002 04:39
Date: Fri, 01 Mar 2002 04:39
24 lines
2079 bytes
2079 bytes
Rebecca Ore <rebecca@pyrophore.ogoense.net> writes:
> Russ Allbery <rra@stanford.edu> writes:
>> At least I'm making progress on fiddling with the tradindexed data
>> structures. :) By the end of this weekend, tradindexed may have an
>> actual test suite.
> Need testers?
It's got a test suite now, but I'd expect it to pass everywhere. What
will need more testers is the rewrite of the code, which is proceeding
slowly and is interrupted by writing more dumping, consistency, and
recovery tools.
I realized today that I need an active file parser, and now I'm trying to
figure out a way to write one so that I can replace all the other ones in
INN with a single one.
--
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: CNFS corruption
Author: BOUWSMA Beery
Date: Fri, 08 Mar 2002 22:23
Date: Fri, 08 Mar 2002 22:23
64 lines
4350 bytes
4350 bytes
Moin, moin! %s wrote on %.3s, %lld Sep 1993 > I've been running INN-2.3.2 with NetBSD for a year. The only thing > that utterly bombed was --with-tagged-hash and some of the alternative For the life of me, I can't remember the nature of the hack that I needed to apply to get hagged-tash to work, while it's probably hidden away on an old open-reel tape under my beer collection in the Keller but I'm not motivated to try and dig it out, yet. It's possible that you haven't noticed any difficulties, by handling less of a full feed, or that the problems ``fix'' themselves before you can get to them. That is, unless you transit articles, reading of them introduces enough of a time lag for the articles to appear. The original victim was using innxmit, probably with a fullish feed, but I observed a problem with innfeed (more realtime). I'm not sure what your status is as a leaf or how you relay articles, so I won't speculate. I also vaguely recall seeing problems reading new articles on a full-feed machine a year or more ago. As far as reading goes, while innxmit/innfeed are passed pointers to articles, your reader probably learns of new articles via the active file, and if it, like the spool and/or history files, lags in being visibly updated, it could be you aren't even told about newly-arrived articles for a few seconds or so, long enough for all of spool, history, and active to register their presence. The most likely danger could be locally-made posts, which then are to be propagated outwards, which may fail if spool updates don't occur by the time your propagation program gets around to slugging the articles around. Then again, innfeed and innxmit have different failure modes when encountering stale spool data. I seem to have very vague recollections of reading r$ or someone being unwilling to add a B0RKED_MMAP option or something, quite some time back, when FreeBSD had a b0rked mmap() before it got fixed. However, I also seem to recall looking at the k0deZ out of boredom a while ago and seeing such an option wrapping an msync() call or something, but I think it only affected the active file. Hmmm, looking at the CVS repository, it seems the k0deZ I know were stripped away about a year ago... And looking further into storage/cnfs/cnfs.c,v it seems that the msync() calls there also disappeared months ago, along with any references to MMAP_NEEDS_MSYNC and MMAP_MISSES_WRITES and the like. So while the `configure' process may define these for NetBSD (I can't remember), I'm not sure if the k0deZ make the proper use of these nowadays. But don't mind my insane ravings, I know not of what I speak, for my hands remain untainted by the blood of recent k0de changes and my brane is as empty as ever, what with news being little more than an annoyance to me and a problem only for those running (or ignoring) the b0rken swervers I can't even manage to use, grrr... Prosit! Mahlzeit? BOUSWMA Barrett
Re: CNFS corruption
Author: Russ Allbery
Date: Fri, 08 Mar 2002 22:53
Date: Fri, 08 Mar 2002 22:53
38 lines
2836 bytes
2836 bytes
BOUWSMA Beery <netbsd-misuser-200202@dcf77-zeit.netscum.dyndns.dk> writes:
> And looking further into storage/cnfs/cnfs.c,v it seems that the msync()
> calls there also disappeared months ago, along with any references to
> MMAP_NEEDS_MSYNC and MMAP_MISSES_WRITES and the like. So while the
> `configure' process may define these for NetBSD (I can't remember), I'm
> not sure if the k0deZ make the proper use of these nowadays.
In CURRENT, they were all replaced with calls to functions that are now
defined in portable/mmap.h:
/* Some platforms don't flush data written to a memory mapped region until
msync or munmap; on those platforms, we sometimes need to force an msync
so that other parts of INN will see the changed data. Some other
platforms don't see writes to a file that's memory-mapped until the
memory mappings have been flushed.
These platforms can use mmap_flush to schedule a flush to disk and
mmap_invalidate to force re-reading from disk. Note that all platforms
should still periodically call msync so that data is written out in case
of a crash. */
#if MMAP_NEEDS_MSYNC
# define mmap_flush(p, l) msync((p), (l), MS_ASYNC)
#else
# define mmap_flush(p, l) /* empty */
#endif
#if MMAP_MISSES_WRITES
# define mmap_invalidate(p, l) msync((p), (l), MS_INVALIDATE)
#else
# define mmap_invalidate(p, l) /* empty */
#endif
--
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.
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