Skip to contentSkip to conversation

Kernel panic: I/O op mismatch

uml-devel David Coulson 5 participants 13 messages Sep 6, 2003 – Sep 11, 2003 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

I'm having a few issues with my current UML kernels -

/dev/ubd/2: recovering journal

Kernel panic: I/O op mismatch

In interrupt handler - not syncing

Anyone seen this before?

David

Signature · 14 lines
David Coulson                                    email: [email protected]
Linux Developer /                          web: http://davidcoulson.net/
Network Engineer                                   phone: (216) 533-6967



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#1 lore raw
Quoted 5 lines · David Coulson

I'm having a few issues with my current UML kernels -

/dev/ubd/2: recovering journal

Kernel panic: I/O op mismatch

In interrupt handler - not syncing

Yes. Started seeing that today.

Here is what I have tracked down.

Host 2.4.21-1um. UML 2.4.21-1um.
Host 2.4.22, UML 2.4.22
Host 2.4.22, UML 2.4.21-1um

All these combinations had this problem. However, Host 2.4.21-1um, UML 2.4.20-6um and host 2.4.22, UML 2.4.20-6um ran fine.

I am not using a COW file.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#2 lore raw
Quoted 2 lines · Adam Heath

All these combinations had this problem. However, Host 2.4.21-1um, UML 2.4.20-6um and host 2.4.22, UML 2.4.20-6um ran fine.

I'd bet the mmap stuff broke it - I was going to try to back out the v3 COW stuff and mmap, but I figured that was basically -6um anyway ;-)

David

Signature · 14 lines
David Coulson                                    email: [email protected]
Linux Developer /                          web: http://davidcoulson.net/
Network Engineer                                   phone: (216) 533-6967



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#3 lore raw
In reply to Adam Heath
Quoted 2 lines · [email protected] said:

All these combinations had this problem. However, Host 2.4.21-1um, UML 2.4.20-6um and host 2.4.22, UML 2.4.20-6um ran fine.

I've been playing with this quite a bit and I can't make it misbehave. So, I need some clues as to what you're doing that I'm not.

Jeff

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#4 lore raw
Quoted 2 lines · Jeff Dike

I've been playing with this quite a bit and I can't make it misbehave. So, I need some clues as to what you're doing that I'm not.

./linux :-)

I can give you a shell on a box that does it reliably.

David

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#6 lore raw
In reply to Jeff Dike
Quoted 6 lines · Jeff Dike
Quoted 2 lines · [email protected] said:

All these combinations had this problem. However, Host 2.4.21-1um, UML 2.4.20-6um and host 2.4.22, UML 2.4.20-6um ran fine.

I've been playing with this quite a bit and I can't make it misbehave. So, I need some clues as to what you're doing that I'm not.

Likewise. Adam can actually reproduce this with the exact same UML binary that I'm using (the one from my user-mode-linux .deb), but I can't reproduce it at all. We're also both using Debian unstable (I think), so most other factors should be the same as well. My host kernel is Debian's 2.4.21 with skas3 and device-mapper.

Signature · 11 lines
 - mdz


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#7 lore raw
Quoted 5 lines · Matt Zimmerman

Likewise. Adam can actually reproduce this with the exact same UML binary that I'm using (the one from my user-mode-linux .deb), but I can't reproduce it at all. We're also both using Debian unstable (I think), so most other factors should be the same as well. My host kernel is Debian's 2.4.21 with skas3 and device-mapper.

I'm 99% sure it's filesystem, rather than kernel, dependent. I gave Jeff a shell on one of my boxes, so we'll see what that turns up

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#8 lore raw
Quoted 10 lines · David Coulson
Quoted 6 lines · Matt Zimmerman

Likewise. Adam can actually reproduce this with the exact same UML binary that I'm using (the one from my user-mode-linux .deb), but I can't reproduce
it at all. We're also both using Debian unstable (I think), so most other factors should be the same as well. My host kernel is Debian's 2.4.21 with skas3 and device-mapper.

I'm 99% sure it's filesystem, rather than kernel, dependent. I gave Jeff a shell on one of my boxes, so we'll see what that turns up

Host filesystem or UML filesystem? Adam and I were both using ext2 inside UML when we spoke, and I'm using ext3 on the host side.

Signature · 11 lines
 - mdz


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#9 lore raw
Quoted 2 lines · Matt Zimmerman

Host filesystem or UML filesystem? Adam and I were both using ext2 inside UML when we spoke, and I'm using ext3 on the host side.

Sorry, filesystem was the wrong word to use - 'image file' is more accurate.

David

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#10 lore raw

Hello!

Quoted 2 lines · David Coulson
Quoted 2 lines

Host filesystem or UML filesystem? Adam and I were both using ext2 inside UML when we spoke, and I'm using ext3 on the host side.

DC> Sorry, filesystem was the wrong word to use - 'image file' is more accurate.

That's how I reproduce it:
on host (underlying fs is reiserfs):
dd if=/dev/zero of=scratch bs=1024k seek=4096 count=1
./linux mem=100M ubd0=/space/green/rootfs debug xterm=rxvt ubd1=/space/green/scratch

in uml:

# mkreiserfs /dev/ubd1
<-------------mkreiserfs, 2001------------->
reiserfsprogs 3.x.0k-pre9

mkreiserfs: Guessing about desired format..
mkreiserfs: Kernel 2.4.23-pre3-2um is running.
3276k will be used
Block 16 (0x6210) contains super block of format 3.5 with standard journal Block count: 1048832
Bitmap number: 33
Blocksize: 4096
Free blocks: 1040588
Root block: 8211
Tree height: 2
Hash function used to sort names: "r5"
Objectid map size 2, max 1004
Journal parameters:
Device [0x0]
Magic [0x5db630ce]
Size 8193 (including journal header) (first block 18) Max transaction length 1024
Max batch size 900
Max commit age 30
Space reserved by journal: 0
Correctness checked after mount 1
Fsck field 0x0
ATTENTION: YOU SHOULD REBOOT AFTER FDISK!
ALL DATA WILL BE LOST ON './aaa'!
Continue (y/n):y
Initializing journal - 0%....20%....40%....60%....80%....100%

In gdb at this point:
Breakpoint 1, panic (fmt=0xa0180615 "I/O op mismatch") at panic.c:60
60 bust_spinlocks(1);
(gdb) bt

#0  panic (fmt=0xa0180615 "I/O op mismatch") at panic.c:60
#1  0xa00c92a4 in ubd_handler () at ubd_kern.c:471
#2  0xa0083510 in handle_IRQ_event (irq=4, regs=0xa01a4274, action=0xa0ab31f4)
    at irq.c:160
#3  0xa00836d5 in do_IRQ (irq=4, regs=0xa01a4274) at irq.c:323
#4  0xa0083f7f in sigio_handler (sig=29, regs=0xa01a4274) at irq_user.c:73
#5  0xa0090cc2 in sig_handler_common_tt (sig=29, sc_ptr=0xe8) at trap_user.c:37
#6  0xa008d7ab in sig_handler (sig=1, sc=
      {gs = 0, __gsh = 0, fs = 0, __fsh = 0, es = 123, __esh = 0, ds = 123, __dsh = 0, edi = 2686091136, esi = 2686074880, ebp = 2686091104, esp = 2686091076, ebx = 2686091096, edx = 2686074880, ecx = 0, eax = 4294967292, trapno = 1, err = 0, eip = 2685643674, cs = 115, __csh = 0, eflags = 582, esp_at_signal = 2686091076, ss = 123, __ssh = 0, fpstate = 0xa01a7cc8, oldmask = 134283264, cr2 = 0})
    at trap_user.c:104
#7  <signal handler called>
#8  0xa013ab9a in nanosleep () at pgtable.h:257
#9  0xa008c5f6 in idle_sleep (secs=-4) at time.c:115

#10 0xa0085ef6 in cpu_idle () at process_kern.c:206 #11 0xa000b4ae in rest_init () at init/main.c:346

(btw, did you know that to compile 2.4.22-2um with ptrace support one needs to add "#include <errno.h>" at arch/um/kernel/tt/ptproxy/sysdep.c otherwise it won't compile).

Host is SMP.

Hm, interesting if this one of the races I observed long time ago.

Bye,
Oleg

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#11 lore raw

Hello!

Oleg Drokin <[email protected]> wrote:
OD> Hello!

Quoted 2 lines · OD> David Coulson <[email protected]> wrote:
Quoted 2 lines
Quoted 2 lines

Host filesystem or UML filesystem? Adam and I were both using ext2 inside UML when we spoke, and I'm using ext3 on the host side.

DC>> Sorry, filesystem was the wrong word to use - 'image file' is more accurate. OD> That's how I reproduce it:

Ok, so the problem is a missed cast.
And the patch is below.

Bye,
Oleg

um/drivers/ubd_kern.c renamed from um/drivers/ubd_kern.c.orig +1 -1
@@ -1002,7 +1002,7 @@
 	}
 
         req->sector += ubd_part[minor].start_sect;
-	offset = req->sector << 9;
+	offset = (__u64)req->sector << 9;
 	len = req->current_nr_sectors << 9;
 
 	io_req->fds[0] = (dev->cow.file != NULL) ? dev->cow.fd : dev->fd;

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#12 lore raw
In reply to Matt Zimmerman
Quoted 6 lines · Matt Zimmerman
Quoted 4 lines · Jeff Dike
Quoted 2 lines · [email protected] said:

All these combinations had this problem. However, Host 2.4.21-1um, UML 2.4.20-6um and host 2.4.22, UML 2.4.20-6um ran fine.

Quoted 8 lines
Quoted 2 lines

I've been playing with this quite a bit and I can't make it misbehave. So, I need some clues as to what you're doing that I'm not.

Likewise. Adam can actually reproduce this with the exact same UML binary that I'm using (the one from my user-mode-linux .deb), but I can't reproduce it at all. We're also both using Debian unstable (I think), so most other factors should be the same as well. My host kernel is Debian's 2.4.21 with skas3 and device-mapper.

Well, not unstable. The machine I was running this on is a server, not my workstation(which tends to follow unstable, but isn't always uptodate). The machine that had the problems had a libc6 version of 2.3.2-5.

Unfortunately, I installed an older uml binary(2.4.20-6um), so that we could continue to run our uml hosts on it.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel