Skip to contentSkip to conversation

2.6.20-rc3-mm1: can not mount root

BUG Tomasz Kvarsin 3 participants 10 messages Jan 5, 2007 – Jan 30, 2007

lore
Share & tools
lore
#0 lore raw

I can not boot machine with 2.6.20-rc3-mm1 and 2.6.20-rc2-mm1. I made binary search, patch bellow cause this bug:
$quilt top patches/sched-improve-sched_clock-on-i686.patch

backtrace which I got by connecting "gdb" to machine:

_raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
108 for (i = 0; i < loops; i++) {
(gdb) bt

#0  _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
#1  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#2  0xc011c3bb in vprintk (fmt=0xc0649c00 "<0>BUG: spinlock %s on

CPU#%d, %s/%d\n",
args=0xc1167a84 "") at kernel/printk.c:534
#3 0xc011c6c7 in printk (fmt=0xc0649c00 "<0>BUG: spinlock %s on CPU#%d, %s/%d\n")
at kernel/printk.c:508
#4 0xc027be42 in spin_bug (lock=0xc06c0c60, msg=0xc065fc00 "recursion") at lib/spinlock_debug.c:61

#5  0xc027c178 in _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:79
#6  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#7  0xc011c3bb in vprintk (fmt=0xc0626ed0 "<1>BUG: unable to handle

kernel paging request",
args=0xc1167b8c "") at kernel/printk.c:534
#8 0xc011c6c7 in printk (fmt=0xc0626ed0 "<1>BUG: unable to handle kernel paging request")
at kernel/printk.c:508
#9 0xc0116de4 in do_page_fault (regs=0xc1167bcc, error_code=0) at arch/i386/mm/fault.c:555
#10 0xc056b11c in page_fault ()
#11 0xc0808160 in ?? ()
#12 0xc0626ed0 in kallsyms_token_index ()
#13 0xc1167cac in ?? ()
#14 0x00000001 in ?? ()
#15 0xc0808163 in printk_buf.19225 ()
#16 0xc1167c0c in ?? ()
#17 0x00000000 in ?? ()

#1 lore raw

Some details:
system hangs after it print:
VFS: Mounted root (ext3 filesystem) readonly.
And if connect gdb to machine, I see the trace that I include into previous letter.
My kernel config in attachment.

If you need some more info please tell.

Quoted 39 lines · Tomasz Kvarsin

I can not boot machine with 2.6.20-rc3-mm1 and 2.6.20-rc2-mm1. I made binary search, patch bellow cause this bug:
$quilt top patches/sched-improve-sched_clock-on-i686.patch

backtrace which I got by connecting "gdb" to machine:

_raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
108 for (i = 0; i < loops; i++) {
(gdb) bt

#0  _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
#1  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#2  0xc011c3bb in vprintk (fmt=0xc0649c00 "<0>BUG: spinlock %s on
CPU#%d, %s/%d\n",
    args=0xc1167a84 "") at kernel/printk.c:534
#3  0xc011c6c7 in printk (fmt=0xc0649c00 "<0>BUG: spinlock %s on
CPU#%d, %s/%d\n")
    at kernel/printk.c:508
#4  0xc027be42 in spin_bug (lock=0xc06c0c60, msg=0xc065fc00
"recursion") at lib/spinlock_debug.c:61
#5  0xc027c178 in _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:79
#6  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#7  0xc011c3bb in vprintk (fmt=0xc0626ed0 "<1>BUG: unable to handle
kernel paging request",
    args=0xc1167b8c "") at kernel/printk.c:534
#8  0xc011c6c7 in printk (fmt=0xc0626ed0 "<1>BUG: unable to handle
kernel paging request")
    at kernel/printk.c:508

#9 0xc0116de4 in do_page_fault (regs=0xc1167bcc, error_code=0) at arch/i386/mm/fault.c:555
#10 0xc056b11c in page_fault ()
#11 0xc0808160 in ?? ()
#12 0xc0626ed0 in kallsyms_token_index ()
#13 0xc1167cac in ?? ()
#14 0x00000001 in ?? ()
#15 0xc0808163 in printk_buf.19225 ()
#16 0xc1167c0c in ?? ()
#17 0x00000000 in ?? ()

#2 lore raw
In reply to Tomasz Kvarsin
Quoted 6 lines · On Fri, 5 Jan 2007 17:20:38 +0300 "Tomasz Kvarsin" <[email protected]> wrote:

I can not boot machine with 2.6.20-rc3-mm1 and 2.6.20-rc2-mm1. I made binary search, patch bellow cause this bug:
$quilt top patches/sched-improve-sched_clock-on-i686.patch

backtrace which I got by connecting "gdb" to machine:

How did you manage to use gdb on an i386 kernel? Using qemu or something?

Quoted 21 lines

_raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
108 for (i = 0; i < loops; i++) {
(gdb) bt

#0  _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
#1  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#2  0xc011c3bb in vprintk (fmt=0xc0649c00 "<0>BUG: spinlock %s on
CPU#%d, %s/%d\n",
    args=0xc1167a84 "") at kernel/printk.c:534
#3  0xc011c6c7 in printk (fmt=0xc0649c00 "<0>BUG: spinlock %s on
CPU#%d, %s/%d\n")
    at kernel/printk.c:508
#4  0xc027be42 in spin_bug (lock=0xc06c0c60, msg=0xc065fc00
"recursion") at lib/spinlock_debug.c:61
#5  0xc027c178 in _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:79
#6  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#7  0xc011c3bb in vprintk (fmt=0xc0626ed0 "<1>BUG: unable to handle
kernel paging request",
    args=0xc1167b8c "") at kernel/printk.c:534
#8  0xc011c6c7 in printk (fmt=0xc0626ed0 "<1>BUG: unable to handle
kernel paging request")
    at kernel/printk.c:508
Quoted 10 lines

#9 0xc0116de4 in do_page_fault (regs=0xc1167bcc, error_code=0) at arch/i386/mm/fault.c:555
#10 0xc056b11c in page_fault ()
#11 0xc0808160 in ?? ()
#12 0xc0626ed0 in kallsyms_token_index ()
#13 0xc1167cac in ?? ()
#14 0x00000001 in ?? ()
#15 0xc0808163 in printk_buf.19225 ()
#16 0xc1167c0c in ?? ()
#17 0x00000000 in ?? ()

It looks like the machine was trying to oops, only it gets stuck on logbuf_lock. Perhaps it hit an oops while running printk_clock() inside vprintk() then tried to go recursive.

oopses while holding logbuf_lock are rare, and appear to be fatal. Perhaps we should ignore logbuf_lock if oops_in_progress, but the chances are we'll just hit the same oops again..

Do you have "time" on the kernel boot command line? If so, does removing that option make the hang go away?

#3 lore raw
Quoted 12 lines · Andrew Morton
Quoted 6 lines · On Fri, 5 Jan 2007 17:20:38 +0300 "Tomasz Kvarsin" <[email protected]> wrote:

I can not boot machine with 2.6.20-rc3-mm1 and 2.6.20-rc2-mm1. I made binary search, patch bellow cause this bug:
$quilt top patches/sched-improve-sched_clock-on-i686.patch

backtrace which I got by connecting "gdb" to machine:

How did you manage to use gdb on an i386 kernel? Using qemu or something?

Yes, I use qemu.

Quoted 36 lines
Quoted 21 lines

_raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
108 for (i = 0; i < loops; i++) {
(gdb) bt

#0  _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
#1  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#2  0xc011c3bb in vprintk (fmt=0xc0649c00 "<0>BUG: spinlock %s on
CPU#%d, %s/%d\n",
    args=0xc1167a84 "") at kernel/printk.c:534
#3  0xc011c6c7 in printk (fmt=0xc0649c00 "<0>BUG: spinlock %s on
CPU#%d, %s/%d\n")
    at kernel/printk.c:508
#4  0xc027be42 in spin_bug (lock=0xc06c0c60, msg=0xc065fc00
"recursion") at lib/spinlock_debug.c:61
#5  0xc027c178 in _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:79
#6  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#7  0xc011c3bb in vprintk (fmt=0xc0626ed0 "<1>BUG: unable to handle
kernel paging request",
    args=0xc1167b8c "") at kernel/printk.c:534
#8  0xc011c6c7 in printk (fmt=0xc0626ed0 "<1>BUG: unable to handle
kernel paging request")
    at kernel/printk.c:508
Quoted 10 lines

#9 0xc0116de4 in do_page_fault (regs=0xc1167bcc, error_code=0) at arch/i386/mm/fault.c:555
#10 0xc056b11c in page_fault ()
#11 0xc0808160 in ?? ()
#12 0xc0626ed0 in kallsyms_token_index ()
#13 0xc1167cac in ?? ()
#14 0x00000001 in ?? ()
#15 0xc0808163 in printk_buf.19225 ()
#16 0xc1167c0c in ?? ()
#17 0x00000000 in ?? ()

It looks like the machine was trying to oops, only it gets stuck on logbuf_lock. Perhaps it hit an oops while running printk_clock() inside vprintk() then tried to go recursive.

Quoted 7 lines

oopses while holding logbuf_lock are rare, and appear to be fatal. Perhaps we should ignore logbuf_lock if oops_in_progress, but the chances are we'll just hit the same oops again..

Do you have "time" on the kernel boot command line? If so, does removing that option make the hang go away?

No, I have no "time" option,
I use grub, the config looks like:
kernel /boot/kernel root=/dev/hda1 init=/linuxrc

#4 lore raw
In reply to Tomasz Kvarsin
Quoted 28 lines · On Fri, 5 Jan 2007 17:20:38 +0300 "Tomasz Kvarsin" <[email protected]> wrote:

I can not boot machine with 2.6.20-rc3-mm1 and 2.6.20-rc2-mm1. I made binary search, patch bellow cause this bug:
$quilt top patches/sched-improve-sched_clock-on-i686.patch

backtrace which I got by connecting "gdb" to machine:

_raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
108 for (i = 0; i < loops; i++) {
(gdb) bt

#0  _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
#1  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#2  0xc011c3bb in vprintk (fmt=0xc0649c00 "<0>BUG: spinlock %s on
CPU#%d, %s/%d\n",
    args=0xc1167a84 "") at kernel/printk.c:534
#3  0xc011c6c7 in printk (fmt=0xc0649c00 "<0>BUG: spinlock %s on
CPU#%d, %s/%d\n")
    at kernel/printk.c:508
#4  0xc027be42 in spin_bug (lock=0xc06c0c60, msg=0xc065fc00
"recursion") at lib/spinlock_debug.c:61
#5  0xc027c178 in _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:79
#6  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#7  0xc011c3bb in vprintk (fmt=0xc0626ed0 "<1>BUG: unable to handle
kernel paging request",
    args=0xc1167b8c "") at kernel/printk.c:534
#8  0xc011c6c7 in printk (fmt=0xc0626ed0 "<1>BUG: unable to handle
kernel paging request")
    at kernel/printk.c:508
Quoted 10 lines

#9 0xc0116de4 in do_page_fault (regs=0xc1167bcc, error_code=0) at arch/i386/mm/fault.c:555
#10 0xc056b11c in page_fault ()
#11 0xc0808160 in ?? ()
#12 0xc0626ed0 in kallsyms_token_index ()
#13 0xc1167cac in ?? ()
#14 0x00000001 in ?? ()
#15 0xc0808163 in printk_buf.19225 ()
#16 0xc1167c0c in ?? ()
#17 0x00000000 in ?? ()

Tomasz, is this still happening in 2.6.20-rc6-mm3?

err. We merged that patch. So perhaps 2.6.20-rc6 now crashes in the same manner?

#5 lore raw
Quoted 4 lines · Andrew Morton

Tomasz, is this still happening in 2.6.20-rc6-mm3?

err. We merged that patch. So perhaps 2.6.20-rc6 now crashes in the same manner?

no, we havent merged that patch yet, but it's:

x86_64-mm-improve-sched_clock-on-i686.patch

I bet this is due to Qemu simulating a CPU that does not truly exist. I'll try to reproduce this.

Ingo

#6 lore raw
Quoted 1 line · Ingo Molnar

I'll try to reproduce this.

cannot see the crash in qemu - i suspect it's .config dependent. Tomasz, could you send me the .config you used?

Ingo

#8 lore raw
In reply to Andrew Morton
Quoted 42 lines · Andrew Morton
Quoted 28 lines · On Fri, 5 Jan 2007 17:20:38 +0300 "Tomasz Kvarsin" <[email protected]> wrote:

I can not boot machine with 2.6.20-rc3-mm1 and 2.6.20-rc2-mm1. I made binary search, patch bellow cause this bug:
$quilt top patches/sched-improve-sched_clock-on-i686.patch

backtrace which I got by connecting "gdb" to machine:

_raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
108 for (i = 0; i < loops; i++) {
(gdb) bt

#0  _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
#1  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#2  0xc011c3bb in vprintk (fmt=0xc0649c00 "<0>BUG: spinlock %s on
CPU#%d, %s/%d\n",
    args=0xc1167a84 "") at kernel/printk.c:534
#3  0xc011c6c7 in printk (fmt=0xc0649c00 "<0>BUG: spinlock %s on
CPU#%d, %s/%d\n")
    at kernel/printk.c:508
#4  0xc027be42 in spin_bug (lock=0xc06c0c60, msg=0xc065fc00
"recursion") at lib/spinlock_debug.c:61
#5  0xc027c178 in _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:79
#6  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#7  0xc011c3bb in vprintk (fmt=0xc0626ed0 "<1>BUG: unable to handle
kernel paging request",
    args=0xc1167b8c "") at kernel/printk.c:534
#8  0xc011c6c7 in printk (fmt=0xc0626ed0 "<1>BUG: unable to handle
kernel paging request")
    at kernel/printk.c:508
Quoted 10 lines

#9 0xc0116de4 in do_page_fault (regs=0xc1167bcc, error_code=0) at arch/i386/mm/fault.c:555
#10 0xc056b11c in page_fault ()
#11 0xc0808160 in ?? ()
#12 0xc0626ed0 in kallsyms_token_index ()
#13 0xc1167cac in ?? ()
#14 0x00000001 in ?? ()
#15 0xc0808163 in printk_buf.19225 ()
#16 0xc1167c0c in ?? ()
#17 0x00000000 in ?? ()

Quoted 2 lines

Tomasz, is this still happening in 2.6.20-rc6-mm3?

Have no idea, I tryied to test 2.6.20-rc6-mm2, but build failed, I will try -mm3.

Quoted 4 lines

err. We merged that patch. So perhaps 2.6.20-rc6 now crashes in the same manner?

Actually there is solution by Vivek Goyal

Review

Quoted 3 lines
(quoted diff) +1 -1
-int tsc_disable __cpuinitdata = 0;
+int tsc_disable = 0;

if you merge his patch also all should be fine.

#9 lore raw
Quoted 43 lines · Tomasz Kvarsin
Quoted 42 lines · Andrew Morton
Quoted 38 lines · On Fri, 5 Jan 2007 17:20:38 +0300 "Tomasz Kvarsin" <[email protected]> wrote:

I can not boot machine with 2.6.20-rc3-mm1 and 2.6.20-rc2-mm1. I made binary search, patch bellow cause this bug:
$quilt top patches/sched-improve-sched_clock-on-i686.patch

backtrace which I got by connecting "gdb" to machine:

_raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
108 for (i = 0; i < loops; i++) {
(gdb) bt

#0  _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:108
#1  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#2  0xc011c3bb in vprintk (fmt=0xc0649c00 "<0>BUG: spinlock %s on
CPU#%d, %s/%d\n",
    args=0xc1167a84 "") at kernel/printk.c:534
#3  0xc011c6c7 in printk (fmt=0xc0649c00 "<0>BUG: spinlock %s on
CPU#%d, %s/%d\n")
    at kernel/printk.c:508
#4  0xc027be42 in spin_bug (lock=0xc06c0c60, msg=0xc065fc00
"recursion") at lib/spinlock_debug.c:61
#5  0xc027c178 in _raw_spin_lock (lock=0xc06c0c60) at lib/spinlock_debug.c:79
#6  0xc056ac42 in _spin_lock (lock=0xc06c0c60) at kernel/spinlock.c:182
#7  0xc011c3bb in vprintk (fmt=0xc0626ed0 "<1>BUG: unable to handle
kernel paging request",
    args=0xc1167b8c "") at kernel/printk.c:534
#8  0xc011c6c7 in printk (fmt=0xc0626ed0 "<1>BUG: unable to handle
kernel paging request")
    at kernel/printk.c:508

#9 0xc0116de4 in do_page_fault (regs=0xc1167bcc, error_code=0) at arch/i386/mm/fault.c:555
#10 0xc056b11c in page_fault ()
#11 0xc0808160 in ?? ()
#12 0xc0626ed0 in kallsyms_token_index ()
#13 0xc1167cac in ?? ()
#14 0x00000001 in ?? ()
#15 0xc0808163 in printk_buf.19225 ()
#16 0xc1167c0c in ?? ()
#17 0x00000000 in ?? ()

Quoted 6 lines
Quoted 2 lines

Tomasz, is this still happening in 2.6.20-rc6-mm3?

Have no idea, I tryied to test 2.6.20-rc6-mm2, but build failed, I will try -mm3.

2.6.20-rc6-mm3 seems to work ok.

#7 lore raw
In reply to Ingo Molnar
Quoted 5 lines · Ingo Molnar
Quoted 2 lines · Andrew Morton

Tomasz, is this still happening in 2.6.20-rc6-mm3?

Quoted 8 lines
Quoted 2 lines

err. We merged that patch. So perhaps 2.6.20-rc6 now crashes in the same manner?

no, we havent merged that patch yet, but it's:

x86_64-mm-improve-sched_clock-on-i686.patch

I bet this is due to Qemu simulating a CPU that does not truly exist.

I use qemu+kqemu, so as I understand almost all code executes on my real CPU.

Quoted 2 lines

i suspect it's .config dependent. Tomasz,
could you send me the .config you used?

I supposed you was agree that
this cause a problem:

Quoted 1 line

-int tsc_disable __cpuinitdata = 0;

                              ^^^^^^^^^^^^^^^^