Skip to contentSkip to conversation

kvm tools: rhel6.0 guest hung during shutdown

DISCUSSION Amos Kong 4 participants 6 messages Apr 10, 2011 – Apr 11, 2011 KVM

lore
Share & tools
lore

Amos Kong

author
#0 lore raw

I try to test with a rhel6.0 guest, it hung during the shutdown.

guest)# init 0
guest)# could not read byte from child: Success
initctl: Event failed
Stopping atd: [ OK ]
Stopping abrt daemon: [ OK ]
Stopping sshd: [ OK ]
Shutting down postfix: [ OK ]
Stopping crond: [ OK ]
Stopping HAL daemon: [ OK ]
Stopping NetworkManager daemon: [ OK ]
Killing mdmonitor: [ OK ]
Stopping system message bus: [ OK ]
Stopping auditd: type=1305 audit(1249622673.898:73): audit_pid=0 old=1443 auid=4294967295 ses=4294967295 subj=kernel res=1 [ OK ]
Shutting down loopback interface: [ OK ]
IPv6 over IPv4 tunneling driver
sit0: Disabled Privacy Extensions
Stopping monitoring for VG vg_virtlab6685153: 2 logical volume(s) in volume group "vg_virtlab6685153" unmonitored
[ OK ]

Sending all processes the TERM signal... [  OK  ]
Sending all processes the KILL signal... [  OK  ]

Saving random seed: [ OK ]
Syncing hardware clock to system time select() to /devtype=1111 audit(1249622682.793:74): user pid=2210 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='changing system time: exe="/sbin/hwclock" hostname=? addr=? terminal=console res=failed' /rtc to wait for clock tick timed out
[FAILED]

Turning off swap:  [  OK  ]
Turning off quotas:  [  OK  ]
Unmounting file systems:  [  OK  ]
umount2: Invalid argument
umount: /dev/pts: not mounted
init: Re-executing /sbin/init
mount: /dev/shm not mounted alretype=1128 audit(1249622683.208:75): user pid=1924 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='init: exe="/sbin/reboot" hostname=? addr=? terminal=console res=success'
md: stopping all md devices.

ady, or bad option
Halting system...
System halted.
[note: guest hung .......]

(gdb) info threads
2 Thread 0x7f9ebbf8d700 (LWP 7267) 0x00007fa3c006e467 in ioctl () from /lib/libc.so.6
* 1 Thread 0x7fa3c0939700 (LWP 7265) 0x00007fa3c031b285 in pthread_join () from /lib/libpthread.so.0 (gdb) bt

#0  0x00007fa3c031b285 in pthread_join () from /lib/libpthread.so.0
#1  0x0000000000408981 in kvm_cmd_run (argc=0, argv=0x7ffffb7dca58, prefix=0x0) at kvm-run.c:226
#2  0x00000000004083c2 in handle_command (command=0x7ffffb7dc8f0, argc=9, argv=0x7ffffb7dca50) at kvm-cmd.c:55
#3  0x0000000000405bbd in handle_kvm_command (argc=9, argv=0x7ffffb7dca50) at main.c:16
#4  0x0000000000405be6 in main (argc=10, argv=0x7ffffb7dca48) at main.c:21

(gdb) thread 2
[Switching to thread 2 (Thread 0x7f9ebbf8d700 (LWP 7267))]#0 0x00007fa3c006e467 in ioctl () from /lib/libc.so.6

(gdb) bt

#0  0x00007fa3c006e467 in ioctl () from /lib/libc.so.6
#1  0x0000000000405939 in kvm_cpu__run (self=0x6c74a0) at kvm-cpu.c:370
#2  0x00000000004059e2 in kvm_cpu__start (cpu=0x6c74a0) at kvm-cpu.c:388
#3  0x0000000000408452 in kvm_cpu_thread (arg=0x6c74a0) at kvm-run.c:96
#4  0x00007fa3c031a971 in start_thread () from /lib/libpthread.so.0
#5  0x00007fa3c007692d in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

# tracer: nop
#
# TASK-PID CPU# TIMESTAMP FUNCTION
# | | | | |

             kvm-7265  [001] 27163.998711: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27163.998715: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27163.999712: kvm_set_irq: gsi 4 level 0 source 0
             kvm-7265  [001] 27163.999712: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked)
             kvm-7265  [001] 27163.999713: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27163.999715: kvm_set_irq: gsi 4 level 1 source 0
             kvm-7265  [001] 27163.999715: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked)
             kvm-7265  [001] 27163.999716: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27164.000691: kvm_set_irq: gsi 4 level 0 source 0
             kvm-7265  [001] 27164.000692: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked)
             kvm-7265  [001] 27164.000692: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27164.000695: kvm_set_irq: gsi 4 level 1 source 0
             kvm-7265  [001] 27164.000695: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked)
             kvm-7265  [001] 27164.000695: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27164.001705: kvm_set_irq: gsi 4 level 0 source 0
             kvm-7265  [001] 27164.001705: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked)
             kvm-7265  [001] 27164.001706: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27164.001708: kvm_set_irq: gsi 4 level 1 source 0
             kvm-7265  [001] 27164.001708: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked)
             kvm-7265  [001] 27164.001708: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27164.002687: kvm_set_irq: gsi 4 level 0 source 0
             kvm-7265  [001] 27164.002688: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked)
             kvm-7265  [001] 27164.002688: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27164.002690: kvm_set_irq: gsi 4 level 1 source 0
             kvm-7265  [001] 27164.002690: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked)
             kvm-7265  [001] 27164.002691: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27164.003701: kvm_set_irq: gsi 4 level 0 source 0
             kvm-7265  [001] 27164.003701: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked)
             kvm-7265  [001] 27164.003702: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27164.003704: kvm_set_irq: gsi 4 level 1 source 0
             kvm-7265  [001] 27164.003704: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked)
             kvm-7265  [001] 27164.003704: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27164.004683: kvm_set_irq: gsi 4 level 0 source 0
             kvm-7265  [001] 27164.004684: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked)
             kvm-7265  [001] 27164.004684: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [001] 27164.004686: kvm_set_irq: gsi 4 level 1 source 0
             kvm-7265  [001] 27164.004686: kvm_ioapic_set_irq: pin 4 dst 0 vec=0 (Fixed|physical|edge|masked)
             kvm-7265  [001] 27164.004687: kvm_pic_set_irq: chip 0 pin 4 (edge|masked)
             kvm-7265  [000] 27164.176390: kvm_set_irq: gsi 4 level 1 source 0

...

#1 lore raw
Quoted 3 lines · Amos Kong

System halted.
[note: guest hung .......]

Isn't that expected result without ACPI support? I would expect all guests to hang like that at the end.

--
Gleb.

#2 lore raw
Quoted 6 lines · Gleb Natapov
Quoted 3 lines · Amos Kong

System halted.
[note: guest hung .......]

Isn't that expected result without ACPI support? I would expect all guests to hang like that at the end.

I see hangs with Debian Squeeze image too but not with the minimal QEMU image I usually test things with. I wonder, though, why userspace insists on using ACPI for shutdown as we boot with 'noapic'.

Pekka

#3 lore raw
Quoted 5 lines · Pekka Enberg
Quoted 4 lines · Gleb Natapov
Quoted 3 lines · Amos Kong

System halted.
[note: guest hung .......]

Quoted 7 lines
Quoted 2 lines

Isn't that expected result without ACPI support? I would expect all guests to hang like that at the end.

I see hangs with Debian Squeeze image too but not with the minimal QEMU image I usually test things with. I wonder, though, why userspace insists on using ACPI for shutdown as we boot with 'noapic'.

There is not way to power down PC from software without ACPI (may be APM has something, but I doubt kvm-tool implements it either). Do you remember Windows 95 "it is now safe to turn off your computer" screen?

--
Gleb.

#4 lore raw
Quoted 9 lines · Gleb Natapov
Quoted 8 lines · Pekka Enberg
Quoted 6 lines · Gleb Natapov
Quoted 3 lines · Amos Kong

System halted.
[note: guest hung .......]

Isn't that expected result without ACPI support? I would expect all guests to hang like that at the end.

Quoted 7 lines
Quoted 4 lines

I see hangs with Debian Squeeze image too but not with the minimal QEMU image I usually test things with. I wonder, though, why userspace insists on using ACPI for shutdown as we boot with 'noapic'.

There is not way to power down PC from software without ACPI (may be APM has something, but I doubt kvm-tool implements it either). Do you remember Windows 95 "it is now safe to turn off your computer" screen?

yup, iirc APM had some set power state entry point, but not sure, need to find docs ;)

Quoted 3 lines

--
Gleb.

Signature · 1 line
    Cyrill
#5 lore raw
Quoted 14 lines · Cyrill Gorcunov
Quoted 13 lines · Gleb Natapov
Quoted 12 lines · Pekka Enberg
Quoted 6 lines · Gleb Natapov
Quoted 3 lines · Amos Kong

System halted.
[note: guest hung .......]

Isn't that expected result without ACPI support? I would expect all guests to hang like that at the end.

I see hangs with Debian Squeeze image too but not with the minimal QEMU image I usually test things with. I wonder, though, why userspace insists on using ACPI for shutdown as we boot with 'noapic'.

Quoted 6 lines
Quoted 3 lines

There is not way to power down PC from software without ACPI (may be APM has something, but I doubt kvm-tool implements it either). Do you remember Windows 95 "it is now safe to turn off your computer" screen?

yup, iirc APM had some set power state entry point, but not sure, need to find docs ;)

Just go for ACPI then. APM is dead.

--
Gleb.