Thread View: news.software.nntp
10 messages
10 total messages
Started by Paul Tomblin
Sat, 03 Mar 2001 18:26
How did that happen?
Author: Paul Tomblin
Date: Sat, 03 Mar 2001 18:26
Date: Sat, 03 Mar 2001 18:26
49 lines
3215 bytes
3215 bytes
I've got two machines running identical copies of inn 2.2.2. One is in the United States, and one is in Canada (but that's not important to this), and they recieve feeds from various independant sources as well as feeding each other. Today, I had a system freezeup, but fsck didn't find any problems when rebooting. A few hours later, my wife complained that she saw a followup to a followup of one of her posts, but the followup wasn't there. There also appeared to be other missing articles, but I decided to investigate this one. Using the message id in the References header, I did a grephistory and it said "not found". But I looked in the logs, and evidently I had recieved the article 10 or 11 hours before the freeze-up, and fed it to my other machine. Looking on my other machine, grephistory said "/dev/null", which I thought usually means it was deleted by the perl filter. However, there is nothing in the news.notice to indicate that the perl filter deleted it, and no mention of it in any log except "news" (well "news.1.gz", actually). I used "newsx", a program like "slurp" to grab that article from my ISP. My machine kept it, and sent it on to the other machine. The other machine also accepted it and didn't delete it for any reason. Any explanations of what happened to the article? I suppose it could have been cancelled, but I don't see why my history file said "not found" and the other one said "/dev/null". Or could that have just been the crash and stuff not getting flushed? That seems unlikely since news.daily would have run in between the time it arrived and the time the system crashed. Just in case, I ran makehistory to rebuild the history in case it's out of sync. Oh wait, I just noticed that the article is in the .overview file twice, but only on the spool for one of those. I guess I should have looked at that first. It appears that the article was stored in .overview, but not in history. Or at least the history flushed to disk. Does that make sense? I still don't have any explanation of why it was /dev/null on the other system, though. -- Paul Tomblin <ptomblin@xcski.com>, not speaking for anybody "The Computer made me do it."
Sv.: How did that happen?
Author: 'BOUSWMA Barry MCSE, Te1e Denmar...
Date: Mon, 19 Mar 2001 02:29
Date: Mon, 19 Mar 2001 02:29
101 lines
5920 bytes
5920 bytes
> Today, I had a system freezeup, but fsck didn't find any problems when > rebooting. This doesn't matter. `fsck' checks the on-disk consistency of the filesystem and if needed returns it to a consistent state. There is no guarantee that this consistent state will be the same as you saw the filesystem right before the crash (particularly if you are using a technique to delay metadata updates in order to increase filesystem efficiency), and further, if the internal state of your databases do not match what had been committed to disk or to the filesystem cache, then you're going to have a good deal of `lost' information. > A few hours later, my wife complained that she saw a followup to a > followup of one of her posts, but the followup wasn't there. There also > appeared to be other missing articles, but I decided to investigate this > one. Using the message id in the References header, I did a grephistory > and it said "not found". But I looked in the logs, and evidently I had > recieved the article 10 or 11 hours before the freeze-up, and fed it to my > other machine. That's one of many perils you've discovered of permitting your SR to have access to your news swerver. Certainly not your first. This is different. Your history database lookups are at best a combination of lookups in database files and the text file. If the database files as retrieved from the on-disk backing store are not consistent with what your swerver had been keeping in memory before the crash, then you're going to have big problems. > Any explanations of what happened to the article? I suppose it could have > been cancelled, but I don't see why my history file said "not found" and > the other one said "/dev/null". Or could that have just been the crash > and stuff not getting flushed? That seems unlikely since news.daily would > have run in between the time it arrived and the time the system crashed. news.daily has nothing to do with it. You need to think of your history as a database that the swerver works with, that, for reasons of efficiency, is not kept fully in sync with its on-disk store except at clean shutdowns. You can think of it as a logging filesystem, with your history text file as the log, but without a convenient way of checkpointing the log and replaying just the part of it since the last checkpoint. > Just in case, I ran makehistory to rebuild the history in case it's out of This should be a standard procedure that everyone does after any serious crash, since it's the only way to replay your history log (the text file) and build the databases afresh from it. It should take no more than several minutes, and will bring you up-to-date to the last time your disk buffer cache was synchronized with the on-disk information, typically less than 30 seconds before the crash. Given that your history text file is a sequentially appended logfile, while the database files are randomly accessed, updating the logfile is trivial and a negligible performance hit, while the database update is enough of a performance killer that your OS or swerver software may minimize this as much as possible by keeping updates in memory. I always regenerate the history database after a crash by hand; this has the drawback that it's not automated anywhere at startup (although with care it could be), and therefore doesn't meet the company criteria for a system that can automatically restart after a crash unattended; however, on the relatively rare occasions that have seen OS crashes, a manual review of the system has revealed a lot more problems that I didn't anticipate and that require human intervention to repair, such as half the news filesystems failing to mount automagically while the system carries on as if nothing is out of the ordinary, plus the other databases that have been introduced are decidedly not robust enough to permit quick and unattended recovery, even if I knew how to cleanly and safely recover them, which I don't. > "The Computer made me do it." In short, after any OS crash, you should *always* rebuild your history database with makehistory/makedbz. This should be all that's needed for 1.wozzit INN, although an `expireover' run can improve efficiency of any possibly missing overview data by bringing it up to date with the spool contents if needed. Starting with 2.whatever where many more vital databases of mysterious importance have been introduced, you probably must run additional recovery procedures to reclaim missing info, but I have no idea what or how. BOUSWMA Barry, MCSE These sorts of problems NEVER happen with world-class microsoft products > > > >
Re: Sv.: How did that happen?
Author: Rebecca Ore
Date: Mon, 19 Mar 2001 03:24
Date: Mon, 19 Mar 2001 03:24
36 lines
2081 bytes
2081 bytes
"'BOUSWMA Barry MCSE, Te1e Denmark Internet'" <pedophile@te1edanmark.dk> writes: (snips) > > In short, after any OS crash, you should *always* rebuild your > history database with makehistory/makedbz. This should be all > that's needed for 1.wozzit INN, although an `expireover' run can > improve efficiency of any possibly missing overview data by bringing > it up to date with the spool contents if needed. Starting with > 2.whatever where many more vital databases of mysterious importance > have been introduced, you probably must run additional recovery > procedures to reclaim missing info, but I have no idea what or how. makehistory -e -O (I think) makedbz mv history.n.* history.* (several different files) rc.news ctlinndt renumber '' :) Been there once for a power outage and one reboot of pyrophore while the serial cable was attached to paradoxa. Always make sure the thing can open enough files. -- Rebecca Ore http://www.ogoense.net/rebecca
Sv.: Re: Sv.: How did that happen?
Author: 'BOUSWMA Barry MCSE, Te1e Denmar...
Date: Mon, 19 Mar 2001 06:44
Date: Mon, 19 Mar 2001 06:44
83 lines
4425 bytes
4425 bytes
"'rebecca@ogoense.net'" <rebecca@ogoense.net> skrev i en nyhedsmeddelelse:m3itl6h25n.fsf@pyrophore.ogoense.net... > > have been introduced, you probably must run additional recovery > > procedures to reclaim missing info, but I have no idea what or how. > makehistory -e -O (I think) No thank you. Do you know how long makehistory takes to run on a medium-sized spool? It took me about six days, and even then, it wasn't able to recover all the information without some sort of corruption. (The commandline I use is slightly different with more options) I need something that will be ready-for- readers in a few minutes. Half an hour is pushing it; we already have enough complaints when an unclean crash requires a 3 hour fsck for an old machine with a smaller spool... > makedbz More commandline parameters are needed -- we need to add `-s' with a number something like 40 or 50 million, taken from the second line of the history.dir file, whatever is largest, and then applying a fudge multiplication factor for a larger hash table that's less quick to overflow. I could figure out a quick skr1pt to do this for me, but the time it would take me to write one and put it in place is more than the number of times I expect to need it. Also, when I do this by hand, I have the advantage of adding more useful datapoints to my brane as well as seeing trends that can be put to immediate use in keeping an eye on the system. I don't believe in unattended systems that run, ignored, all the time, for something as important as news. I've seen too many cases where the more distant a newsmangler is from the day-to-day operations, the more problems appear and the worse the performance is without the admin knowing about it. Sure, I can happily ignore a well-running system, but that doesn't mean I don't take a look at the general health of it every day or so, and this doesn't mean I prefer a system that requires babysitting all the time like I have now. > rc.news > ctlinndt renumber '' Is this really needed? If an unclean shutdown is detected, rc.news should pass the `-r' flag to innd to force an automatic renumbering, in addition to the normal flags... > Always make sure the thing can open enough files. This is normally only a problem with Slowaris and untuned or unconfigured BSDen, and, just like sizing the filesystem inode counts, is part of the normal setup of the system. Of course, you'll need to pass an -DFD_SETSIZE when building innd to get enough incoming fds for select(), unless the new INN has a way to do this during the build for you. I still don't think that `makehistory' alone is enough to restore corrupt overview information, unless I needed to nuke all the old info and keep the machine offline for the week of recovery. I did have makehistory exit uncleanly on me a few times, which could be part of the reason I couldn't recover all the spool, perhaps as a result of trying to maintain 100% uptime during the recovery. Of course, I could be wrong. BOUSWMA Barry, MCSE A True Expert > > > >
Re: Sv.: Re: Sv.: How did that happen?
Author: Rebecca Ore
Date: Mon, 19 Mar 2001 07:18
Date: Mon, 19 Mar 2001 07:18
63 lines
3052 bytes
3052 bytes
"'BOUSWMA Barry MCSE, Te1e Denmark Internet'" <pedophile@te1edanmark.dk> writes: > "'rebecca@ogoense.net'" <rebecca@ogoense.net> skrev i en > nyhedsmeddelelse:m3itl6h25n.fsf@pyrophore.ogoense.net... > > > > rc.news > > ctlinndt renumber '' > > Is this really needed? If an unclean shutdown is detected, > rc.news should pass the `-r' flag to innd to force an automatic > renumbering, in addition to the normal flags... The time the power went out, yes, because the tradspool map got hosed. The Boston area Fluffy had a quick fix -- create a timehash class for all groups and rename the tradspool stuff meow. > > > > Always make sure the thing can open enough files. > > This is normally only a problem with Slowaris and untuned or > unconfigured BSDen, and, just like sizing the filesystem inode > counts, is part of the normal setup of the system. Of course, > you'll need to pass an -DFD_SETSIZE when building innd to get > enough incoming fds for select(), unless the new INN has a way > to do this during the build for you. It's an inn.conf line rlimitnofile: 500 Overrides system set soft limits, according to what I heard here last week. > > > I still don't think that `makehistory' alone is enough to > restore corrupt overview information, unless I needed to nuke > all the old info and keep the machine offline for the week of > recovery. I did have makehistory exit uncleanly on me a few > times, which could be part of the reason I couldn't recover > all the spool, perhaps as a result of trying to maintain 100% > uptime during the recovery. > Yah, but my spool is just rec.*, news.*, alt.alien.vampire.flonk.flonk.flonk, and some other places. > Of course, I could be wrong. > > BOUSWMA Barry, MCSE > A True Expert > Thou are one of the Triune Faces of Fluffy, Barry. -- Rebecca Ore http://www.ogoense.net/rebecca
Re: Sv.: Re: Sv.: How did that happen?
Author: Jeffrey M. Vinocur
Date: Mon, 19 Mar 2001 14:40
Date: Mon, 19 Mar 2001 14:40
23 lines
1923 bytes
1923 bytes
In article <E058F1785BCA19.FEED65030A508F@microsoft.com>, 'BOUSWMA Barry MCSE, Te1e Denmark Internet' <pedophile@te1edanmark.dk> wrote: >"'rebecca@ogoense.net'" <rebecca@ogoense.net> skrev i en >nyhedsmeddelelse:m3itl6h25n.fsf@pyrophore.ogoense.net... > >> rc.news >> ctlinndt renumber '' > >Is this really needed? If an unclean shutdown is detected, >rc.news should pass the `-r' flag to innd to force an automatic >renumbering, in addition to the normal flags... The thing is, you don't get an unclean shutdown. Machine crashes, comes back up (possible renumber occurs here, but to no effect), articles come in, INN throttles itself. Admin comes in, shuts down server (<--- nice clean shutdown), rebuilds, starts it up again, and then does the renumber manually. -- Jeffrey M. Vinocur jeff@litech.org
Sv.: Re: Sv.: Re: Sv.: How did that happen?
Author: 'BOUSWMA Barry MCSE, Te1e Denmar...
Date: Tue, 20 Mar 2001 02:02
Date: Tue, 20 Mar 2001 02:02
63 lines
4208 bytes
4208 bytes
"'jeff@litech.org'" <jeff@litech.org> skrev i en nyhedsmeddelelse:9955oa$233$1@marduk.litech.org... > >> rc.news > >> ctlinndt renumber '' > >Is this really needed? If an unclean shutdown is detected, > >rc.news should pass the `-r' flag to innd to force an automatic > The thing is, you don't get an unclean shutdown. Machine > crashes, comes back up (possible renumber occurs here, but to no > effect), articles come in, INN throttles itself. Admin comes in, > shuts down server (<--- nice clean shutdown), rebuilds, starts it > up again, and then does the renumber manually. Now I'm confused. This hasn't happened to me, so obviously you're seeing something that I'm not, or else we're describing different problems. You say INN throttles itself. How? I haven't had this happen to me, and what I've done has been to bring up the crippled machine, run fscking fsck on the unfscked fsckers, mounted everything, done the makehistory to bring history into a consistent state, started INN, noted that old articles weren't available, started the overview recovery, which has allowed the old articles to reappear until the overview recovery bails out or completes. How would the second renumber, if I were to do so at this point, be any different from the renumber at startup? The step I'm missing is seeing INN throttle, and the step I've done is to do part of the rebuild/recovery even before the throttle that never happens happens or doesn't happen, as it so happens. So I never do the nice clean shutdown. Perhaps that demonstrates my incompetence. (I do the rebuild/recovery while INN runs, since the machine can barely keep up with the incoming feed as it is and tens of thousands of readers are expecting it to be available to them, so I can't afford the lengthy downtime past the history rebuild.) I suppose the renumber, if it happens, is based on the overview data which is apparently corrupt or inconsistent, and in such a case may result in introducing additional inaccuracy where the overview data has been cached for efficiency, which could explain why some articles up to two hours before the crash that I had been able to read, were missing (their article number placeholders were taken by empty and missing articles, as in a cancel flood, but newly-arrived articles were added in the group where I observed this *after* the four or so articles that went missing thanks to the crash). The more I think of it, the more cached data I can think of, such as the ICDsync and the number of writes before a CNFS bitmap gets updated on the disk, all for the sake of efficiency, and thoughts like that make me think I should spend less time thinking. Of course, I could be brane-damaged. BOUSWMA Barry, MCSE Concerned about Your security and that of Your business > > >
Re: Sv.: Re: Sv.: Re: Sv.: How did that happen?
Author: Jeffrey M. Vinocur
Date: Tue, 20 Mar 2001 05:38
Date: Tue, 20 Mar 2001 05:38
41 lines
2606 bytes
2606 bytes
In article <A20304C37891BE.EF478F00D91045@microsoft.com>, 'BOUSWMA Barry MCSE, Te1e Denmark Internet' <pedophile@te1edanmark.dk> wrote: > >You say INN throttles itself. How? If INN is running with overview out-of-sync with the spool, it attempts to use article numbers that are already taken and throttles itself with something like "File exists writing SMstore file, throttling". >The step I'm missing >is seeing INN throttle, and the step I've done is to do part of the >rebuild/recovery even before the throttle that never happens happens >or doesn't happen, as it so happens. So I never do the nice clean >shutdown. Ahh. So, if INN runs on boot --- which it does here --- then after a crash it tries to start with the corrupted data and has probably already throttled itself by the time sshd is ready to talk to me (if I'm even around). That's the difference, I assume. >Perhaps that demonstrates my incompetence. (I do the >rebuild/recovery while INN runs, since the machine can barely keep >up with the incoming feed as it is and tens of thousands of readers >are expecting it to be available to them, so I can't afford the >lengthy downtime past the history rebuild.) Ah. Interesting. How long does rebuilding history alone take relative to building overview as well (I've always done the whole thing at once --- none of those pesky "customers" to worry about --- so we're clearly in different situations)? -- Jeffrey M. Vinocur jeff@litech.org
Sv.: Re: Sv.: Re: Sv.: Re: Sv.: How did that happen?
Author: 'BOUSWMA Barry MCSE, Te1e Denmar...
Date: Tue, 20 Mar 2001 12:48
Date: Tue, 20 Mar 2001 12:48
143 lines
7986 bytes
7986 bytes
"'jeff@litech.org'" <jeff@litech.org> skrev i en nyhedsmeddelelse:996qd3$7uv$1@marduk.litech.org... > >You say INN throttles itself. How? > > If INN is running with overview out-of-sync with the spool, it > attempts to use article numbers that are already taken and > throttles itself with something like "File exists writing SMstore Ah. That sounds more like the old case where the numbers on the disk for the active file got out-of-sync with what the OS had been able to commit to disk in the spool directories, where the article number is the name of the file and matches what is in the active file. Since the active file is usually mmap'ed and only updated to disk after a certain number of writes, which I can't remember is 200 by default or if I've bumped it up to that, at a crash it's highly likely that some directory entries will have been committed before the active file is flushed. In theory, renumbering would take care of that with old INN, but that was working directly on the spool proper. If the new INN does renumbering not based on the spool, but rather via the storage API on the contents of the overview, and that fails to match the spool contents, then you've introduced yet another layer of complexity to fail or go wrong, requiring a complete rebuild of overview before the renumbering can have a hope to match the spool contents. > >The step I'm missing > >is seeing INN throttle, and the step I've done is to do part of the > >rebuild/recovery even before the throttle that never happens happens > > after a crash it tries to start with the corrupted data and has > probably already throttled itself by the time sshd is ready to > talk to me (if I'm even around). That's the difference, I Actually no. The difference, or rather the reason I don't see this, is because the `file exists' can only happen in the case of traditional spool, and since I never was able to reach the point of stability where I'd bother attempting a stable and Real Configuration for the desired retentions and storage policies, I've never gotten past the point of tossing all the articles into a handful of equal-sized CNFS buffers. There the article numbers bear no relation to the storage, and the only data used is the overview data plus the CNFS header bitmaps and pointer, which, like the active file, are not updated after every single article write. The biggest problem seems to be that with a typical filesystem, you're depending on the OS to dump things usually every thirty seconds, while at the same time these updates are not synchronized with the updates buffered for the active file, bitmaps, and what have you. And INN doesn't bother to try to think of things as needing a log that can be checkpointed and replayed. Basically the new INN has attempted to re-invent a filesystem, in order to provide more efficient access to articles in non-traditional storage means, but hasn't reeached the maturity of your typical filesystem when attempting to compensate for its drawbacks -- the performance degradation of a large number of files in any directory, lack of automagic removal of the oldest partition's contents when it fills, and so on. Remove the intermediary layer of the storage API and things get much simpler, even to the point of resembing INN before the storage API, amazingly. The bulk of the hacks I've written, and possibly the best of the recovery tools, are based on a particular configuration without the generalization of the storage API calls. Faster, but less flexible. Pick any two. > >rebuild/recovery while INN runs, since the machine can barely keep > >up with the incoming feed as it is and tens of thousands of readers > >are expecting it to be available to them, so I can't afford the > >lengthy downtime past the history rebuild.) > > Ah. Interesting. How long does rebuilding history alone take > relative to building overview as well (I've always done the whole To regenerate the (corrupt due to unclean shutdown) database files from the history text (log)file takes no more than a few minutes even with a several gigabyte sized text file. I have no need to try to rebuild the text file based on the contents of the spool; merely scanning the spool to regenerate or overwrite the overview information took days to complete. This of course depends on the nature of the spool, with binariez cycbuffers taking some 20 minutes each, but a single equally-sized text buffer taking several days. This isn't playing back just the uncheckpointed history logfile, but rather recreating the entire logfile contents, if you want to continue to look at in database or filesystem terms. All this info is stored locally so while one does rescan the entirety of the file, it's far quicker than any other recovery process, be it the old makehistory or expireover that went through the whole spool, a very expensive process. If I wanted to be really anal about it, I would rebuild history based on the spool (although perhaps it would be better to have a history method where one could update entries in-place, to preserve the cancelled/expired message IDs, updating if needed or at least verifying the articles present in spool without the duplicate entry problem one has today, and in case the cycbuff bitmaps or pointers weren't updated to point at the latest of the articles to get history entries, they could be somehow deleted from the database to allow them to be received again if offered) but Shirley on a spool of any size, the downtime that this sort of recovery requires is excessive, or if there were a way to update the history while operating, by the time it was determined that an article had been received, committed to history, but was not available on the spool so the history entry should be deleted, it would be too late as the invalid history entry would have certainly caused any other peers to have skipped the article if it still remained unsent somewhere. > thing at once --- none of those pesky "customers" to worry > about --- so we're clearly in different situations)? Yeah, if you are running a Real News Swerver, rather than just an archive of pr0n and warez, then you can get away with a lot. Or if you have redundancy through reliability. But if you have a much smaller spool then your recovery can be fast, and the simple differences in our spool configuration make for a lot of other differences. Of course, I could be simply utterly incompetent. BOUSWMA Barry, MCSE e-commercing your future! > > > > >
Re: Sv.: Re: Sv.: Re: Sv.: Re: Sv.: How did that happen?
Author: Terrance Richard Boyes
Date: Tue, 20 Mar 2001 19:37
Date: Tue, 20 Mar 2001 19:37
41 lines
3541 bytes
3541 bytes
'BOUSWMA Barry MCSE, Te1e Denmark Internet' <pedophile@te1edanmark.dk> wrote: > "'jeff@litech.org'" <jeff@litech.org> skrev i en > nyhedsmeddelelse:996qd3$7uv$1@marduk.litech.org... >> If INN is running with overview out-of-sync with the spool, it >> attempts to use article numbers that are already taken and >> throttles itself with something like "File exists writing SMstore > Ah. That sounds more like the old case where the numbers on > the disk for the active file got out-of-sync with what the OS > had been able to commit to disk in the spool directories, where > the article number is the name of the file and matches what is [snip] > In theory, renumbering would take care of that with old INN, > but that was working directly on the spool proper. If the > new INN does renumbering not based on the spool, but rather > via the storage API on the contents of the overview, and that > fails to match the spool contents, then you've introduced yet > another layer of complexity to fail or go wrong, requiring a > complete rebuild of overview before the renumbering can have > a hope to match the spool contents. Yep, AFAICT the problem is that the group.index file is also mmap'd, and that file isn't as easy to rebuild on its own. I've tried a couple of code hacks to try and force it to rebuild the group.map[1] without having to rebuild all the overview files as well, but not managed to get it right. Though I'm sure that someone who actually knows the code should be able to do it without too much work... [1] after renumbering the active file via a simple awk script running against the overview files. -- <URL:http://www.pierrot.co.uk/> Team AMIGA Cure the disease and kill the patient.
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