Skip to contentSkip to conversation

serial console hang in 3.0.2-2

DISCUSSION Manuel Bouyer 2 participants 3 messages May 7, 2006 – May 8, 2006

lore
Share & tools
lore
#0 lore raw

[ PLease keep me in Cc:, I'm not subscribed to this list ]

Hi,
I'm working on getting domain0 support in NetBSD (i386 for now) for Xen-3. I have a bootable kernel which is working fine under xen-3.0.0, with hardware device support and limited support for xentools.
Now I tried to switch to 3.0.2-2, and the serial console hangs shortly after my domain0 kernel enables interrupts. If I call the NetBSD kernel debugger just after enabling interrupts I can type a few chars before in hangs. With ^A^A^A I can switch the input to Xen, and the message "switching input ..." is printed. However from here, only R is functionnal (it prints the message and reboot), all others commands produce no outputs, including 'h' (this is a xen kernel rebuilt with debug options). The same xen kernel works fine with a linux dom0, including the debug actions (I tested h, q, i at last) so it's probably not a compile option issue.

Maybe it's an interrupt issue, but I'm not sure as ^A and R are still working fine. I noticed there were changes in the include/public interfaces between 3.0.0 and 3.0.2, including a new hypercall to unmask event. I've not updated my NetBSD domain0 to this yet. Could this be the cause ? Any other idea on what could cause this ?

Signature · 3 lines
Manuel Bouyer <[email protected]>
     NetBSD: 26 ans d'experience feront toujours la difference
--
#1 lore raw
Quoted 16 lines · Manuel Bouyer

[ PLease keep me in Cc:, I'm not subscribed to this list ]

Hi,
I'm working on getting domain0 support in NetBSD (i386 for now) for Xen-3. I have a bootable kernel which is working fine under xen-3.0.0, with hardware device support and limited support for xentools.
Now I tried to switch to 3.0.2-2, and the serial console hangs shortly after my domain0 kernel enables interrupts. If I call the NetBSD kernel debugger just after enabling interrupts I can type a few chars before in hangs. With ^A^A^A I can switch the input to Xen, and the message "switching input ..." is printed. However from here, only R is functionnal (it prints the message and reboot), all others commands produce no outputs, including 'h' (this is a xen kernel rebuilt with debug options). The same xen kernel works fine with a linux dom0, including the debug actions (I tested h, q, i at last) so it's probably not a compile option issue.

Quoted 5 lines

Maybe it's an interrupt issue, but I'm not sure as ^A and R are still working fine. I noticed there were changes in the include/public interfaces between 3.0.0 and 3.0.2, including a new hypercall to unmask event. I've not updated my NetBSD domain0 to this yet. Could this be the cause ? Any other idea on what could cause this ?

Seems to be SMP-related; if I boot nosmp things are working properly again. I'm booting with noapic (I don't have completed ioapic support yet) and as it's an asus P2B, acpi=ht seems to be automatically added.

When the hypervisor is hung, d is still working (in fact, soft interrupt are blocked) and I get:
(XEN) *** Serial input -> Xen (type 'CTRL-a' three times to switch input to DOM0). (XEN) 'd' pressed -> dumping registers
(XEN) ----[ Xen-3.0.2-2 Not tainted ]----
(XEN) CPU: 0
(XEN) EIP: e008:[<ff13e31a>] on_selected_cpus+0xdd/0x113
(XEN) EFLAGS: 00000202 CONTEXT: hypervisor

(XEN) eax: 00000000   ebx: ff1fc180   ecx: 00000008   edx: ff1b5ea4
(XEN) esi: 0000000f   edi: ff1b5fac   ebp: ff1b5ecc   esp: ff1b5e84
(XEN) cr0: 8005003b   cr3: 0fc6e000
(XEN) ds: e010   es: e010   fs: 0031   gs: 0011   ss: e010   cs: e008
(XEN) Xen stack trace from esp=ff1b5e84:
(XEN)    00000002 000000fb ff1b5e9c ff13db33 ff1b5eb4 ff1b5ea4 ff1b5eac 00000001 
(XEN)    ff155cd0 00000000 00000001 00000000 00000000 00000002 ff1b5ecc ff13ddc1 
(XEN)    00000000 ff1b5ee8 ff1b5eec ff13e23b 00000002 ff155cd0 00000000 00000001 
(XEN)    00000001 00000002 ff1b5f0c ff155dff ff155cd0 00000000 00000001 00000001 
(XEN)    ff1ede80 00000002 ff1b5f2c ff155db6 ff155cd0 00000000 00000001 00000001 
(XEN)    ff1fc180 ff1fc180 ff1b5f7c ff11d4a7 00000000 ff1e30a8 ff1b5f5c ff11cfe4 
(XEN)    00000000 00000000 80818efd 00000003 ff1bf680 ff1e30a8 00000000 ff155d8c 
(XEN)    8080cbad 00000003 ff1b5f8c ff1ede80 ff1e30a8 00000000 ff1b5fac ff11bc9d 
(XEN)    00000000 ff1be500 00e4a037 ff17d36f 7a936ca1 00000003 deadbeef 00000001 
(XEN)    00000000 00000000 00e4a037 ff17d3f6 7a936ca1 00000003 00000000 00000000 
(XEN)    0000000f c0a01e98 00000000 00e00000 c04d1523 00000009 00000246 c0a01e60 
(XEN)    00000011 00000011 00000011 00000031 00000011 00000000 ff1fc180
(XEN) Xen call trace:
(XEN)    [<ff13e31a>] on_selected_cpus+0xdd/0x113
(XEN)    [<ff13e23b>] smp_call_function+0x4e/0x50
(XEN)    [<ff155dff>] on_each_cpu+0x26/0x39
(XEN)    [<ff155db6>] mce_work_fn+0x2a/0x4d
(XEN)    [<ff11d4a7>] timer_softirq_action+0xea/0x17f
(XEN)    [<ff11bc9d>] do_softirq+0xa1/0xb8

(XEN)

Signature · 3 lines
Manuel Bouyer <[email protected]>
     NetBSD: 26 ans d'experience feront toujours la difference
--
#2 lore raw
Quoted 6 lines · Manuel Bouyer

Seems to be SMP-related; if I boot nosmp things are working properly again. I'm booting with noapic (I don't have completed ioapic support yet) and as it's an asus P2B, acpi=ht seems to be automatically added.

When the hypervisor is hung, d is still working (in fact, soft interrupt are blocked) and I get:

The CPU is probably stuck waiting for some other CPU to run its smp_call_function callback handler. This may be because the other CPU has got interrupts permanently disabled. It's worth disassembling your Xen image, or adding tracing to on_selected_cpus(), to find out where the CPU has got stuck and what it is waiting on. Then perhaps we can help you some more.

Ian's suggestion of trying -unstable is perhaps also worthwhile, although not for the reason he states (the fix that he points out is not applicable to our 3.0.2 tree).

-- Keir