Date: Wed, 26 Feb 1997 23:35:55 -0500 (EST) From: Thomas David Rivers <ponds!rivers@dg-rtp.dg.com> To: ponds!freefall.cdrom.com!freebsd-hackers Subject: Perhaps an interesting point with the dup-alloc panics.. Message-ID: <199702270435.XAA29550@lakes.water.net>
next in thread | raw e-mail | index | archive | help
Ok -
This is 2.1.6.1 - no patches, except for a couple of printf()'s
to see what's going on.
One of the key items I've just discovered comes from the following
printf() in ufs_disksubr.c.
It's simply a printf() at the top of disksort() to indicate what
block number is being added to the queue.
*** ufs_disksubr.c.ori Mon Sep 18 02:15:15 1995
--- ufs_disksubr.c Wed Feb 26 22:21:51 1997
***************
*** 81,86 ****
--- 81,88 ----
{
register struct buf *bq;
+ printf("disksort: adding blkno %d to the queue\n", bp->b_pblkno);
+
/* If the queue is empty, then it's easy. */
if (ap->b_actf == NULL) {
bp->b_actf = NULL;
Now, when I run this, I expect to see something like (on the console):
disksort: adding blkno 131904 to the queue
disksort: adding blkno 131920 to the queue
disksort: adding blkno 131936 to the queue
disksort: adding blkno 131952 to the queue
...
nice; simple lines - especially since disksort() should be splbio()'d.
However, if we continue down, I'm seeing output like:
disksort: adding blkno 131984 to the queue
disksort: adding blkno 132000 to thedisksort: adding blkno 197712 to the queue
disksort: adding blkno 197728 to the queue
- now, the second line there isn't a typo - the printf() didn't
finish before another disksort() printf started.
Doesn't this imply that disksort was re-entered? With potentially
terrible results to the buf-queues? Or, is there some other
explanation for the strange output?
Such a re-entrancy/buf-list problem would readily explain this.
And, could simply be a missing splbio() before calling disksort()...
[although, I scanned wd.c and didn't see it.]
Again, I'm working with unaltered, except that previous diff; 2.1.6.1.
Finally, I notice that if I put the newfs in a loop (so it presumably
isn't read from anywhere and is in memory) I don't get this scenario.
That could simply mean that disksort() was called to sort a different
queue (in this case, the file system on the floppy.)... I'll have to
check on that.
- Dave Rivers -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702270435.XAA29550>
