Panic with latest current/UFS_DIRHASH

2001-08-21 Thread Ollivier Robert

Just upgraded my laptop to the latest current and during installworld, got
this panic:

panic: ufsdirhash_findslot: 'ka_JP.Shift_JIS' not found
db trace
Debugger
panic
ufsdirhash_findslot
ufsdirhash_move
ufs_direnter
ufs_makeinode
ufs_symlink
ufs_vnoperate
symlink
syscall
syscall_with_err_pushed

I don't have anough space for a core dump though :-(

Any idea ? Ian ?
-- 
Ollivier ROBERT  -=-  Eurocontrol EEC/ITM  -=-  [EMAIL PROTECTED]
FreeBSD caerdonn.eurocontrol.fr 5.0-CURRENT #46: Wed Jan  3 15:52:00 CET 2001

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Panic with latest current/UFS_DIRHASH

2001-08-21 Thread Ollivier Robert

According to Ollivier Robert:
 Just upgraded my laptop to the latest current and during installworld, got
 this panic:
 
 panic: ufsdirhash_findslot: 'ka_JP.Shift_JIS' not found
 db trace
 Debugger
 panic
 ufsdirhash_findslot
 ufsdirhash_move
 ufs_direnter
 ufs_makeinode
 ufs_symlink
 ufs_vnoperate
 symlink
 syscall
 syscall_with_err_pushed

The interesting thing is that I also get that with my old 17th Jul.
kernel... except that the panic message is 

ufsdirhash_checkblock: bad dir inode

It is always in the following part of installworld:

/usr/src/etc/Makefile:

cd ${DESTDIR}/usr/share/locale; \
set - `grep ^[a-zA-Z] ${.CURDIR}/locale.alias`; \
while [ $$# -gt 0 ] ; \
do \
rm -rf $$1; \
ln -s $$2 $$1; \
shift; shift; \
done

I'll try disabling UFS_DIRHASH.

I have softupdates on all partitions EXCEPT /.

-- 
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- [EMAIL PROTECTED]
FreeBSD keltia.freenix.fr 5.0-CURRENT #80: Sun Jun  4 22:44:19 CEST 2000

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Panic with latest current/UFS_DIRHASH

2001-08-21 Thread Ian Dowse

In message [EMAIL PROTECTED], Ollivier Robert writes:

The interesting thing is that I also get that with my old 17th Jul.
kernel... except that the panic message is 

ufsdirhash_checkblock: bad dir inode

It is always in the following part of installworld:

That's interesting - the bad dir inode bit in particular. I'll
look into this in more detail later. My first guess is that there
is a logic flaw in the dirhash code that only triggers when dirhash
comes across a directory entry that has had its inode zeroed by
fsck.

The kernel filsystem code only ever places unused directory entries
at the start of a directory block (free space that is not at the
start of a block is merged into an exesting entry). However, fsck
can mark any entry as unused, resulting in the unfortunate situation
that fsck can put the filesystem into a state that cannot be produced
by any combination of kernel filesystem operations. That introduces
quite some potential for obscure bugs that only occur after an fsck
run...

Ian

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Panic with latest current/UFS_DIRHASH

2001-08-21 Thread Ian Dowse

In message [EMAIL PROTECTED], Ollivier Robert writes:
According to Ollivier Robert:
 Just upgraded my laptop to the latest current and during installworld, got
 this panic:
 
 panic: ufsdirhash_findslot: 'ka_JP.Shift_JIS' not found

Thanks for the bug report - see my other mail to -current for
further details, but the quick answer is that dirhash has a bug
that is triggered by the odd directory entries that fsck sometimes
leaves behind. This short patch should fix it:

Ian

Index: ufs_lookup.c
===
RCS file: /FreeBSD/FreeBSD-CVS/src/sys/ufs/ufs/ufs_lookup.c,v
retrieving revision 1.52
diff -u -r1.52 ufs_lookup.c
--- ufs_lookup.c2001/08/18 03:08:48 1.52
+++ ufs_lookup.c2001/08/22 00:27:17
@@ -884,7 +884,7 @@
dsize = DIRSIZ(OFSFMT(dvp), nep);
spacefree += nep-d_reclen - dsize;
 #ifdef UFS_DIRHASH
-   if (dp-i_dirhash != NULL)
+   if (dp-i_dirhash != NULL  nep-d_ino)
ufsdirhash_move(dp, nep, dp-i_offset + loc,
dp-i_offset + ((char *)ep - dirbuf));
 #endif



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message