After my computer crashed a few times (thanks to the rt2500 driver), Gentoo doesn't boot properly anymore - problems with init scripts. However, if I try to reinstall baselayout, I run into an "internal error" in XFS. I'm using the kernel 2.6.19-gentoo-r2. I started Linux with "init=/bin/bash" parameter. Here's what I'm getting: (none) / # (none) / # (none) / # emerge -av baselayout These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-apps/baselayout-1.12.6 USE="unicode -bootstrap -build -static" 0 kB Total size of downloads: 0 kB Would you like to merge these packages? [Yes/No] Filesystem "sda3": XFS internal error xfs_trans_cancel at line 1138 of file fs/xfs/xfs_trans.c. Caller 0xc0209495 [<c01fffed>] xfs_trans_cancel+0xdd/0x100 [<c0209495>] xfs_create+0x215/0x6d0 [<c0209495>] xfs_create+0x215/0x6d0 [<c01e7515>] xfs_iunlock+0x75/0x90 [<c0209280>] xfs_create+0x0/0x6d0 [<c021418f>] xfs_vn_mknod+0x2df/0x480 [<c028b64f>] cfb_imageblit+0x7f/0x520 [<c01d7a67>] xfs_dir_lookup+0xc7/0x100 [<c01665c1>] permission+0x91/0xe0 [<c0214780>] xfs_vn_permission+0x0/0x20 [<c016801e>] __link_path_walk+0x89e/0xf10 [<c02027b8>] xfs_dir_lookup_int+0x38/0x100 [<c0214350>] xfs_vn_create+0x0/0x10 [<c0166a51>] vfs_create+0x91/0xd0 [<c0169cdf>] open_namei+0x53f/0x610 [<c015d22e>] do_filp_open+0x2e/0x60 [<c015ce93>] get_unused_fd+0x53/0xd0 [<c015d2aa>] do_sys_open+0x4a/0xe0 [<c015d37c>] sys_open+0x1c/0x20 [<c0102fe1>] sysenter_past_esp+0x56/0x79 ======================= xfs_force_shutdown(sda3,0x8) called from line 1139 of file fs/xfs/xfs_trans.c. Return address = 0xc0217ccc Filesystem "sda3": Corruption of in-memory data detected. Shutting down filesystem: sda3 Please umount the filesystem, and rectify the problem(s) Traceback (most recent call last): File "/usr/bin/emerge", line 4049, in ? File "/usr/bin/emerge", line 4044, in emerge_main File "/usr/bin/emerge", line 3584, in action_build File "/usr/bin/emerge", line 1854, in merge File "/usr/lib/portage/pym/portage_util.py", line 726, in write_atomic File "/usr/lib/portage/pym/portage_util.py", line 664, in __init__ IOError: [Errno 5] Input/output error: '/var/lib/portage/world.378' emergelog(): [Errno 5] Input/output error: '/var/log/emerge.log' (none) / # It seems that the partition got corrupted. But, there's nothing I can do about that: (none) ~ # (none) ~ # mount -o remount,ro / (none) ~ # xfs_check / xfs_check: can't determine device size (none) ~ # xfs_check /dev/sda1 xfs_check: unexpected XFS SB magic number 0x00000000 xfs_check: read failed: Invalid argument xfs_check: data size check failed /usr/bin/xfs_check: line 28: 2701 Segmentation fault xfs_db$DBOPTS -i -p xfs_check -c "check$OPTS" $1 (none) ~ # xfs_check /dev/sda3 xfs_check: /dev/sda3 contains a mounted and writable filesystem fatal error -- couldn't initialize XFS library (none) ~ # Ok, the first time, I made a mistake - sda1 is the swap partition. But that's no excuse for a segfault. And sda3 is definitely mounted read-only, since I just remounted it (and the same happens if I run xfs_check as soon as I boot - while / is still mounted readonly.)
Can't really post "emerge --info", because it causes the XFS error, too - even if I run it as a normal user, not root.
Please file a new bug for the segfault when you check the non-XFS partition. It's not safe to check a mounted filesystem. Please boot a livecd and check/fix /dev/sda3 from there.
see comment #2