Skip to contentSkip to conversation

kernel BUG at fs/buffer.c:1270! [TAINTED]

DISCUSSION Christian Kujau 2 participants 3 messages May 21, 2004 – May 22, 2004 VFS

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi,

last evening i put in a cd-rw in my cdrw-drive (IDE), and automount (triggerd by some gnome-filemanager) was about to mount it. it did not succeed, the drive-LED was on "busy", mounting was not possible, but the system otherwise stable. "killall -9 mount" did not succeed, neiter did "SYSRQ+S|U" after trying to reboot, ok, i had to "SYSRQ+B" then. i never had this before, after reboot i could successfully access my cd-rw, so the bug is probably not reproduceable. afterwards i saw this in my log (appended). yes, the kernel is TAINTED (nvidia module), and since the bug only occured one time, it's probaly not worth to mention it at all. but perhaps not and that's why is post this :-)

system is x86(amd900), kernel is 2.6-BK (updated a few days before). so, here's the log:

hdb: irq timeout: status=0x90 { Busy }
hdb: irq timeout: error=0x00
hdb: ATAPI reset timed-out, status=0x90
ide0: reset: success
hdb: irq timeout: status=0x90 { Busy }
hdb: irq timeout: error=0x00
- ------------[ cut here ]------------
kernel BUG at fs/buffer.c:1270!
invalid operand: 0000 [#1]
PREEMPT

Modules linked in: snd_pcm_oss snd_mixer_oss snd_ens1371 snd_rawmidi
snd_pcm snd_page_alloc snd_timer snd_ac97_codec snd soundcore ide_cd
cdrom isofs zlib_inflate nls_utf8 ntfs nls_iso8859_15 vfat fat nls_base
xfs agpgart autofs4 ipv6 8250 serial_core nvidia rtc
CPU:    0
EIP:    0060:[<c0151806>]    Tainted: P
EFLAGS: 00010286   (2.6.6)

EIP is at __getblk_slow+0x66/0xf0
eax: fffffe00 ebx: 00000000 ecx: 0000d200 edx: 0000d200
esi: 00000000 edi: dffe0740 ebp: 00008000 esp: c0d25dc8
ds: 007b es: 007b ss: 0068
Process mount (pid: 4585, threadinfo=c0d24000 task=dd3682b0)

Stack: dffe0740 00008000 00000000 00000000 00000000 00008000 dffe0740

00000000
~ c0151bff dffe0740 00008000 00000000 00000010 00008000 df718eb8
c0151c8f
~ dffe0740 00008000 00000000 e0ca3e79 dffe0740 00008000 00000000
00000000

Call Trace:
~ [<c0151bff>] __getblk+0x4f/0x60
~ [<c0151c8f>] __bread+0x1f/0x40
~ [<e0ca3e79>] isofs_fill_super+0x159/0x700 [isofs]
~ [<c0156235>] sb_set_blocksize+0x25/0x60
~ [<c0155c3d>] get_sb_bdev+0x11d/0x150
~ [<e0ca50ef>] isofs_get_sb+0x2f/0x40 [isofs]
~ [<e0ca3d20>] isofs_fill_super+0x0/0x700 [isofs]
~ [<c0155e8f>] do_kern_mount+0x5f/0xe0
~ [<c016b0c8>] do_add_mount+0x78/0x170
~ [<c016b3c4>] do_mount+0x144/0x190
~ [<c016b223>] copy_mount_options+0x63/0xc0
~ [<c016b7af>] sys_mount+0xbf/0x140
~ [<c01040c7>] syscall_call+0x7/0xb

Code: 0f 0b f6 04 09 32 32 c0 b9 ff ff ff ff 41 89 f0 d3 e0 3d ff

~ hdb: status timeout: status=0x90 { Busy }
hdb: status timeout: error=0x00
hdb: drive not ready for command
hdb: ATAPI reset timed-out, status=0x90
ide0: reset: success

Thank you,
Christian.
- --
BOFH excuse #150:

Arcserve crashed the server again.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFArkqr+A7rjkF8z0wRAijeAKC3eMmexVwOFv3wlhTBGu+b3Td2gwCcDU/j 1v32XsVRPWxxP0V7bJo1/lQ=
=So2R
-----END PGP SIGNATURE-----

#1 lore raw
Quoted 25 lines · Christian Kujau

kernel BUG at fs/buffer.c:1270!
invalid operand: 0000 [#1]
PREEMPT

 Modules linked in: snd_pcm_oss snd_mixer_oss snd_ens1371 snd_rawmidi
 snd_pcm snd_page_alloc snd_timer snd_ac97_codec snd soundcore ide_cd
 cdrom isofs zlib_inflate nls_utf8 ntfs nls_iso8859_15 vfat fat nls_base
 xfs agpgart autofs4 ipv6 8250 serial_core nvidia rtc
 CPU:    0
 EIP:    0060:[<c0151806>]    Tainted: P
 EFLAGS: 00010286   (2.6.6)
 EIP is at __getblk_slow+0x66/0xf0
 eax: fffffe00   ebx: 00000000   ecx: 0000d200   edx: 0000d200
 esi: 00000000   edi: dffe0740   ebp: 00008000   esp: c0d25dc8
 ds: 007b   es: 007b   ss: 0068
 Process mount (pid: 4585, threadinfo=c0d24000 task=dd3682b0)
 Stack: dffe0740 00008000 00000000 00000000 00000000 00008000 dffe0740
 00000000
 ~       c0151bff dffe0740 00008000 00000000 00000010 00008000 df718eb8
 c0151c8f
 ~       dffe0740 00008000 00000000 e0ca3e79 dffe0740 00008000 00000000
 00000000
 Call Trace:
 ~ [<c0151bff>] __getblk+0x4f/0x60
 ~ [<c0151c8f>] __bread+0x1f/0x40
Quoted 8 lines
 ~ [<e0ca3e79>] isofs_fill_super+0x159/0x700 [isofs]
 ~ [<c0156235>] sb_set_blocksize+0x25/0x60
 ~ [<c0155c3d>] get_sb_bdev+0x11d/0x150
 ~ [<e0ca50ef>] isofs_get_sb+0x2f/0x40 [isofs]
 ~ [<e0ca3d20>] isofs_fill_super+0x0/0x700 [isofs]
 ~ [<c0155e8f>] do_kern_mount+0x5f/0xe0
 ~ [<c016b0c8>] do_add_mount+0x78/0x170
 ~ [<c016b3c4>] do_mount+0x144/0x190

This is isofs passing sinful block sizes to bread(). There's a patch in Linus's current tree which should allow the system to survive this. It won't fix the root problem though, which is presumably related to those I/O errors.

fs/buffer.c renamed from fs/buffer.c~getblk-BUG-removal +12 -6
diff -puN fs/buffer.c~getblk-BUG-removal fs/buffer.c
@@ -1263,12 +1263,6 @@ grow_buffers(struct block_device *bdev, 
 	pgoff_t index;
 	int sizebits;
 
-	/* Size must be multiple of hard sectorsize */
-	if (size & (bdev_hardsect_size(bdev)-1))
-		BUG();
-	if (size < 512 || size > PAGE_SIZE)
-		BUG();
-
 	sizebits = -1;
 	do {
 		sizebits++;
@@ -1289,6 +1283,18 @@ grow_buffers(struct block_device *bdev, 
 struct buffer_head *
 __getblk_slow(struct block_device *bdev, sector_t block, int size)
 {
+	/* Size must be multiple of hard sectorsize */
+	if (unlikely(size & (bdev_hardsect_size(bdev)-1) ||
+			(size < 512 || size > PAGE_SIZE))) {
+		printk(KERN_ERR "getblk(): invalid block size %d requested\n",
+					size);
+		printk(KERN_ERR "hardsect size: %d\n",
+					bdev_hardsect_size(bdev));
+
+		dump_stack();
+		return NULL;
+	}
+
 	for (;;) {
 		struct buffer_head * bh;
 

_

#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Morton schrieb:

| This is isofs passing sinful block sizes to bread().  There's a patch in
| Linus's current tree which should allow the system to survive this.  It
| won't fix the root problem though, which is presumably related to

those I/O
| errors.

Thank you for the explanation and the patch! well, if it's in Linus' tree anyway, i guess "bk pull" will hit it soon. astonishing, how this oops-gibberish makes sense to someone and even points out to be a known issue :-)

you guys rock,
Christian.
- --
BOFH excuse #251:

Processes running slowly due to weak power supply -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFArzDY+A7rjkF8z0wRAv8PAKDD/wbwvAntQNUlJsM3+Gp5OhV5QwCgotug bxyLwhS1jY/GLdt6cw6zbH8=
=7++L
-----END PGP SIGNATURE-----