Skip to contentSkip to conversation

Hangs

DISCUSSION [email protected] 5 participants 15 messages Nov 19, 2008 – Dec 18, 2008 1 message not in the archive KVM

lore
Share & tools
lore
#0 lore raw

Thanks for the responses,

I'm not sure if my problem is the same as Roland's, but it definitely sounds
plausible. I had been running ntpdate in the host to synchronize time every hour (in a cron job), so it sounds as if we could be seeing the same issue.

I'll spend some time trying to reproduce it with and without the ntpdate cron job and see if I can get it to go away.

As for providing kvm_stat output - is kvm-78 OK? On kvm-79, I've been hitting the same compiler errors on kvm-79 as described in Bug #2287677 (undeclared kvm_arch_do_ioperm)

Thanks,
Chris

#1 lore raw
Quoted 5 lines · On Wed, Nov 19, 2008 at 02:43:42PM -0800, [email protected] wrote:

Thanks for the responses,

I'm not sure if my problem is the same as Roland's, but it definitely sounds
plausible. I had been running ntpdate in the host to synchronize time every hour (in a cron job), so it sounds as if we could be seeing the same issue.

Actually, with ntpdate taken out of crontab, I'm still seeing periodic hangs, so it's either a different problem or I'm hitting it in a different manner.

OK, I installed kvm-79 and kernel 2.6.27.6, and here's the the kvm-stat output with 1 guest hung and 3 more operational:

efer_relo exits fpu_reloa halt_exit halt_wake host_stat hypercall insn_emul insn_emul invlpg io_exits irq_exits irq_windo largepage mmio_exit mmu_cache mmu_flood mmu_pde_z mmu_pte_u mmu_pte_w mmu_recyc mmu_shado nmi_windo pf_fixed pf_guest remote_tl request_i signal_ex tlb_flush

         0        333         24         32          0        331          2        212          0          0         78          4          0          0        188          0          0          0          2          2          0          0          0          1          1          0          0          0         12
         0        360          3         30          0        331          0        290          0          0          0          4          0          0        269          0          0          0          5          5          0          0          0         35          5          0          0          0         15
         0        287          2         30          0        307          0        202          0          0         52          2          0          0        194          0          0          0          0          0          0          0          0          0          0          0          0          0          4
         0        389         20         29          0        405          0        277          0          0         78          3          0          0        267          0          0          0          0          0          0          0          0          0          0          0          0          0          6
         0        307          4         32          0        315          0        219          0          0         52          3          0          0        198          0          0          0          0          0          0          0          0          0          0          0          0          0         11
         0        327          2         35          0        346          2        285          0          0          0          4          0          0        274          0          0          0          2          2          0          0          0          1          1          0          0          0          7
         0        334         22         31          0        342          0        217          0          0         78          4          0          0        201          0          0          0          0          0          0          0          0          0          0          0          0          0          8
         0        311          3         28          0        324          0        280          0          0          0          2          0          0        265          0          0          0          0          0          0          0          0          0          0          0          0          0          9
         0        292          2         32          0        313          0        204          0          0         52          3          0          0        196          0          0          0          0          0          0          0          0          0          0          0          0          0          4
         0        791         23         46          0        780         10        352          0          0        364          6          0          0        320          0          0          0         10         10          0          0          0          5          5          0          0          0         20
         0        251          3         30          0        259          2        214          0          0          0          4          0          0        198          0          0          0          2          2          0          0          0          1          1          0          0          0         10
         0        313          2         31          0        330          0        278          0          0          0          4          0          0        266          0          0          0          0          0          0          0          0          0          0          0          0          0          6
         0        330         22         30          0        339          0        215          0          0         78          3          0          0        199          0          0          0          0          0          0          0          0          0          0          0          0          0          8

If I shut down the 3 operational guests leaving just the hung guest, the kvm-stat output is all 0s:

efer_relo exits fpu_reloa halt_exit halt_wake host_stat hypercall insn_emul insn_emul invlpg io_exits irq_exits irq_windo largepage mmio_exit mmu_cache mmu_flood mmu_pde_z mmu_pte_u mmu_pte_w mmu_recyc mmu_shado nmi_windo pf_fixed pf_guest remote_tl request_i signal_ex tlb_flush

         0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0

The hung guest in this case was run with this command:

sudo /usr/local/bin/qemu-system-x86_64             \
     -daemonize                                    \
     -no-kvm-irqchip                               \
     -hda Imgs/ndev_root.img                       \
     -m 1024                                       \
     -cdrom ISOs/ubuntu-8.10-server-amd64.iso      \
     -vnc :4                                       \
     -net nic,macaddr=DE:AD:BE:EF:04:04,model=e1000 \
     -net tap,ifname=tap4,script=/home/chris/kvm/qemu-ifup.sh \
     >>& Logs/ndev_run.log

I should also mention that when the guest is hung, I can still switch to the monitor with ctrl-alt 2. So, at least it's a little bit alive.

I've also noticed that the behavior with the hung guest is slightly different on kvm-79 than it was earlier. When the guest hangs, the kvm process in the host doesn't spin at 100% busy any longer - the guest is just unresponsive at both the network and VNC console.

Also, I've noticed that if I reset the guest from the monitor, the guest will boot up again, and I can get through to it on the network, but strangely, the mouse and keyboard will still be hung at the VNC console (except that I can still switch back and forth to the monitor).

Hope some of this helps, let me know if you need to me to provide any other troubleshooting info.

Chris

#2 lore raw
Quoted 13 lines · On Thu, Nov 20, 2008 at 09:10:57AM -0800, [email protected] wrote:
Quoted 5 lines · On Wed, Nov 19, 2008 at 02:43:42PM -0800, [email protected] wrote:

Thanks for the responses,

I'm not sure if my problem is the same as Roland's, but it definitely sounds
plausible. I had been running ntpdate in the host to synchronize time every hour (in a cron job), so it sounds as if we could be seeing the same issue.

Actually, with ntpdate taken out of crontab, I'm still seeing periodic hangs, so it's either a different problem or I'm hitting it in a different manner.

OK, I installed kvm-79 and kernel 2.6.27.6, and here's the the kvm-stat output with 1 guest hung and 3 more operational:

<snip>

Quoted 5 lines

If I shut down the 3 operational guests leaving just the hung guest, the kvm-stat output is all 0s:

efer_relo exits fpu_reloa halt_exit halt_wake host_stat hypercall insn_emul insn_emul invlpg io_exits irq_exits irq_windo largepage mmio_exit mmu_cache mmu_flood mmu_pde_z mmu_pte_u mmu_pte_w mmu_recyc mmu_shado nmi_windo pf_fixed pf_guest remote_tl request_i signal_ex tlb_flush
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

So the guest is not actually running here, which means its QEMU that its hanging at.

Quoted 14 lines

The hung guest in this case was run with this command:

sudo /usr/local/bin/qemu-system-x86_64             \
     -daemonize                                    \
     -no-kvm-irqchip                               \
     -hda Imgs/ndev_root.img                       \
     -m 1024                                       \
     -cdrom ISOs/ubuntu-8.10-server-amd64.iso      \
     -vnc :4                                       \
     -net nic,macaddr=DE:AD:BE:EF:04:04,model=e1000 \
     -net tap,ifname=tap4,script=/home/chris/kvm/qemu-ifup.sh \
     >>& Logs/ndev_run.log
Quoted 2 lines

I should also mention that when the guest is hung, I can still switch to the monitor with ctrl-alt 2. So, at least it's a little bit alive.

In coma perhaps.

Quoted 5 lines

I've also noticed that the behavior with the hung guest is slightly different on kvm-79 than it was earlier. When the guest hangs, the kvm process in the host doesn't spin at 100% busy any longer - the guest is just unresponsive at both the network and VNC console.

Quoted 8 lines

Also, I've noticed that if I reset the guest from the monitor, the guest will boot up again, and I can get through to it on the network, but strangely, the mouse and keyboard will still be hung at the VNC console (except that I can still switch back and forth to the monitor).

Hope some of this helps, let me know if you need to me to provide any other troubleshooting info.

$ gdb -p pid-of-qemu

(gdb) info threads

Print the backtrace for every thread with:

(gdb) thread N
(gdb) bt

#3 lore raw

Hi all,

So it seems this is not the same issue as chris is seeing, as I now have done the kvm_stat for my hanging domain. I'm not seeing all zero counters. CPU is still hanging at 100%, I can still login and saw again the timejump in the dmesg output (the guest was startet with acpi, but still used the kvmclock, the other guest had used both acpi and acpi_pm clock).

I'm switching also this guest to acpi_pm now.

dmesg in the guest shows again that nice timejump:

[    3.968415] Uniform CD-ROM driver Revision: 3.20
[    4.122814]  vda: vda1 vda2 < vda5 >
[    4.620176] kjournald starting.  Commit interval 5 seconds
[    4.626042] EXT3-fs: mounted filesystem with ordered data mode.
[    5.641077] udevd version 125 started
[    6.548858] input: Power Button (FF) as /class/input/input1
[    6.568119] ACPI: Power Button (FF) [PWRF]
[    6.847566] piix4_smbus 0000:00:01.3: Found 0000:00:01.3 device
[    7.065429] input: PC Speaker as /class/input/input2
[    7.229412] input: ImExPS/2 Generic Explorer Mouse as /class/input/input3
[    7.269947] Error: Driver 'pcspkr' is already registered, aborting...
[    7.277315] udev: renamed network interface eth0 to eth1
[    8.674616] Adding 489940k swap on /dev/vda5.  Priority:-1
extents:1 across:489940k
[    8.767526] EXT3 FS on vda1, internal journal
[   10.270122] loop: module loaded
[   10.461641] device-mapper: uevent: version 1.0.3
[   10.475258] device-mapper: ioctl: 4.13.0-ioctl (2007-10-18)
initialised: [email protected]
[   11.221794] NET: Registered protocol family 10
[   11.224276] lo: Disabled Privacy Extensions
[   19.770963] warning: `ntpd' uses 32-bit capabilities (legacy support in use)
[   21.420169] eth1: no IPv6 routers present
[1266862591.699790] BUG: soft lockup - CPU#0 stuck for 1179853412s!
[logcheck:4056]
[1266862591.699790] Modules linked in: video output ac battery ipv6

dm_snapshot dm_mirror dm_log dm_mod loop virtio_net virtio_balloon snd_pcsp serio_raw psmouse snd_pcm snd_timer snd soundcore snd_page_alloc i2c_piix4 i2c_core button evdev ext3 jbd mbcache virtio_blk ide_cd_mod cdrom ata_generic libata scsi_mod dock ide_pci_generic floppy virtio_pci uhci_hcd usbcore piix ide_core thermal processor fan thermal_sys

[1266862591.699790]
[1266862591.699790] Pid: 4056, comm: logcheck Not tainted (2.6.26-1-486 #1)
[1266862591.699790] EIP: 0060:[<c0115324>] EFLAGS: 00000202 CPU: 0
[1266862591.699790] EIP is at ptep_set_access_flags+0x3e/0x6e
[1266862591.699790] EAX: 19070067 EBX: 09661cc0 ECX: ddb0d984 EDX: 09661cc0
[1266862591.699790] ESI: ddb0d984 EDI: 00000001 EBP: ddb0541c ESP: dededeb0
[1266862591.699790]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
[1266862591.699791] CR0: 8005003b CR2: 09661cc0 CR3: 1dc49000 CR4: 00000690
[1266862591.699791] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[1266862591.699791] DR6: ffff0ff0 DR7: 00000400
[1266862591.699791]  [<c0154c38>] ? do_wp_page+0x3db/0x434
[1266862591.699791]  [<c011314b>] ? pvclock_clocksource_read+0x4b/0xd0
[1266862591.699791]  [<c011314b>] ? pvclock_clocksource_read+0x4b/0xd0
[1266862591.699791]  [<c0155da9>] ? handle_mm_fault+0x55a/0x5d2
[1266862591.699791]  [<c0116b87>] ? __dequeue_entity+0x1f/0x71
[1266862591.699791]  [<c0113ac2>] ? do_page_fault+0x294/0x5ea
[1266862591.699791]  [<c011f275>] ? __do_softirq+0x3e/0x87
[1266862591.699791]  [<c011382e>] ? do_page_fault+0x0/0x5ea
[1266862591.699791]  [<c02a6a1a>] ? error_code+0x6a/0x70
[1266862591.699791]  =======================

efer_relo exits fpu_reloa halt_exit halt_wake host_stat

hypercall  insn_emul  insn_emul     invlpg   io_exits  irq_exits
irq_injec  irq_windo  kvm_reque  largepage  mmio_exit  mmu_cache
mmu_flood  mmu_pde_z  mmu_pte_u  mmu_pte_w  mmu_recyc  mmu_shado
mmu_unsyn  nmi_injec  nmi_windo   pf_fixed   pf_guest  remote_tl
request_n  signal_ex  tlb_flush

0 1848 0 0 0 5
0 948 0 0 0 646
653 0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 0
150
0 1852 0 0 0 5
0 949 0 0 0 649
654 0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 0
149
0 1848 0 0 0 5
0 949 0 0 0 649
649 0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 0
151
0 1843 0 0 0 6
0 951 0 0 0 649
645 0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 0
149
0 1825 0 0 0 6
0 946 0 0 0 649
625 0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 0
150
0 1832 0 0 0 6
0 948 0 0 0

I've tried a dd if=/dev/zero of=/tmp/zero.file bs=10M count=100 to
test IO in the hanging guest, and now the console hangs there. Dong an strace shows:
select(17, [4 7 9 10 11 12 14 16], [], [], {1, 0}) = 2 (in [12 14], left {1, 0})
read(12, 0x7fff94b745e0, 8) = -1 EIO (Input/output error)
write(15, "\1\0\0\0\0\0\0\0"..., 8) = 8
clock_gettime(CLOCK_MONOTONIC, {263807, 676112562}) = 0 clock_gettime(CLOCK_MONOTONIC, {263807, 676175416}) = 0 clock_gettime(CLOCK_MONOTONIC, {263807, 676237712}) = 0
timer_gettime(0, {it_interval={0, 0}, it_value={0, 9550245}}) = 0
read(14, "\2\0\0\0\0\0\0\0"..., 8) = 8
select(17, [4 7 9 10 11 14 16], [], [], {1, 0}) = 1 (in [16], left {0, 992000}) read(16, "\16\0\0\0\0\0\0\0\376\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
128) = 128
rt_sigaction(SIGALRM, NULL, {0x405980, ~[KILL STOP RTMIN RT_1], SA_RESTORER, 0x7fe58c0aaa80}, 8) = 0
write(5, "\0"..., 1) = 1
read(16, 0x7fff94b74950, 128) = -1 EAGAIN (Resource
temporarily unavailable)
select(17, [4 7 9 10 11 14 16], [], [], {1, 0}) = 1 (in [4], left {1, 0})
read(4, "\0"..., 512) = 1
read(4, 0x7fff94b747e0, 512) = -1 EAGAIN (Resource
temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {263807, 686388502}) = 0 clock_gettime(CLOCK_MONOTONIC, {263807, 686449959}) = 0 clock_gettime(CLOCK_MONOTONIC, {263807, 686511137}) = 0 clock_gettime(CLOCK_MONOTONIC, {263807, 686572035}) = 0

Should I start a different thread for this issue, to not mix things up with chris problem?

+rl

Quoted 69 lines · Marcelo Tosatti
Quoted 13 lines · On Thu, Nov 20, 2008 at 09:10:57AM -0800, [email protected] wrote:
Quoted 5 lines · On Wed, Nov 19, 2008 at 02:43:42PM -0800, [email protected] wrote:

Thanks for the responses,

I'm not sure if my problem is the same as Roland's, but it definitely sounds
plausible. I had been running ntpdate in the host to synchronize time every hour (in a cron job), so it sounds as if we could be seeing the same issue.

Actually, with ntpdate taken out of crontab, I'm still seeing periodic hangs, so it's either a different problem or I'm hitting it in a different manner.

OK, I installed kvm-79 and kernel 2.6.27.6, and here's the the kvm-stat output with 1 guest hung and 3 more operational:

<snip>

Quoted 5 lines

If I shut down the 3 operational guests leaving just the hung guest, the kvm-stat output is all 0s:

efer_relo exits fpu_reloa halt_exit halt_wake host_stat hypercall insn_emul insn_emul invlpg io_exits irq_exits irq_windo largepage mmio_exit mmu_cache mmu_flood mmu_pde_z mmu_pte_u mmu_pte_w mmu_recyc mmu_shado nmi_windo pf_fixed pf_guest remote_tl request_i signal_ex tlb_flush
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

So the guest is not actually running here, which means its QEMU that its hanging at.

Quoted 14 lines

The hung guest in this case was run with this command:

sudo /usr/local/bin/qemu-system-x86_64             \
     -daemonize                                    \
     -no-kvm-irqchip                               \
     -hda Imgs/ndev_root.img                       \
     -m 1024                                       \
     -cdrom ISOs/ubuntu-8.10-server-amd64.iso      \
     -vnc :4                                       \
     -net nic,macaddr=DE:AD:BE:EF:04:04,model=e1000 \
     -net tap,ifname=tap4,script=/home/chris/kvm/qemu-ifup.sh \
     >>& Logs/ndev_run.log
Quoted 2 lines

I should also mention that when the guest is hung, I can still switch to the monitor with ctrl-alt 2. So, at least it's a little bit alive.

In coma perhaps.

Quoted 5 lines

I've also noticed that the behavior with the hung guest is slightly different on kvm-79 than it was earlier. When the guest hangs, the kvm process in the host doesn't spin at 100% busy any longer - the guest is just unresponsive at both the network and VNC console.

Quoted 8 lines

Also, I've noticed that if I reset the guest from the monitor, the guest will boot up again, and I can get through to it on the network, but strangely, the mouse and keyboard will still be hung at the VNC console (except that I can still switch back and forth to the monitor).

Hope some of this helps, let me know if you need to me to provide any other troubleshooting info.

$ gdb -p pid-of-qemu

(gdb) info threads

Print the backtrace for every thread with:

(gdb) thread N
(gdb) bt

Signature · 6 lines
Roland Lammel
QuikIT - IT Lösungen - flexibel und schnell
Web: http://www.quikit.at
Email: [email protected]

"Enjoy your job, make lots of money, work within the law. Choose any two."
#4 lore raw
In reply to Marcelo Tosatti
Quoted 5 lines

In coma perhaps.

Quoted 1 line

let me know if you need to me to provide any other troubleshooting info.

Quoted 9 lines
$ gdb -p pid-of-qemu

(gdb) info threads

Print the backtrace for every thread with:

(gdb) thread N
(gdb) bt

OK, here is the gdb log with the guest stuck in this state:

chris@k9[1]:~/pkgs/kvm/kvm-79% ps aux | grep qemu
root 414 1.9 5.0 1131616 197852 ? Sl 09:22 0:28 /usr/local/bin/qemu-system-x86_64 -daemonize -serial file:Logs/deb_db_serial.log -no-kvm-irqchip -hda Imgs/debdb_root.img -hdb Imgs/debdb_ora.img -m 1024 -cdrom ISOs/ubuntu-8.10-server-amd64.iso -vnc :2 -net nic,macaddr=DE:AD:BE:EF:02:02,model=e1000 -net tap,ifname=tap2,script=/home/chris/kvm/qemu-ifup.sh
chris@k9[2]:~/pkgs/kvm/kvm-79% sudo gdb -p 414
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Attaching to process 414
Reading symbols from /usr/local/bin/qemu-system-x86_64...done.
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libgnutls.so.26...done.
Loaded symbols for /usr/lib/libgnutls.so.26
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 0x7f36f1f306e0 (LWP 414)]
[New Thread 0x414f1950 (LWP 422)]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libutil.so.1...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /usr/lib/libSDL-1.2.so.0...done.
Loaded symbols for /usr/lib/libSDL-1.2.so.0
Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /usr/lib/libtasn1.so.3...done.
Loaded symbols for /usr/lib/libtasn1.so.3
Reading symbols from /lib/libgcrypt.so.11...done.
Loaded symbols for /lib/libgcrypt.so.11
Reading symbols from /lib/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /usr/lib/libasound.so.2...done.
Loaded symbols for /usr/lib/libasound.so.2
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libdirectfb-1.0.so.0...done.
Loaded symbols for /usr/lib/libdirectfb-1.0.so.0
Reading symbols from /usr/lib/libfusion-1.0.so.0...done.
Loaded symbols for /usr/lib/libfusion-1.0.so.0
Reading symbols from /usr/lib/libdirect-1.0.so.0...done.
Loaded symbols for /usr/lib/libdirect-1.0.so.0
Reading symbols from /lib/libgpg-error.so.0...done.
Loaded symbols for /lib/libgpg-error.so.0
0x00007f36f084b482 in select () from /lib/libc.so.6
(gdb) info threads
2 Thread 0x414f1950 (LWP 422) 0x00007f36f07a03e1 in sigtimedwait ()
from /lib/libc.so.6
1 Thread 0x7f36f1f306e0 (LWP 414) 0x00007f36f084b482 in select ()
from /lib/libc.so.6
(gdb) thread 1
[Switching to thread 1 (Thread 0x7f36f1f306e0 (LWP 414))]#0 0x00007f36f084b482 in select () from /lib/libc.so.6 (gdb) bt
#0 0x00007f36f084b482 in select () from /lib/libc.so.6
#1 0x00000000004094cb in main_loop_wait (timeout=0)

    at /home/chris/pkgs/kvm/kvm-79/qemu/vl.c:4719
#2  0x000000000050a7ea in kvm_main_loop ()
    at /home/chris/pkgs/kvm/kvm-79/qemu/qemu-kvm.c:619
#3  0x000000000040fafc in main (argc=<value optimized out>,
    argv=0x7ffff9f41948) at /home/chris/pkgs/kvm/kvm-79/qemu/vl.c:4871

(gdb) thread 2
[Switching to thread 2 (Thread 0x414f1950 (LWP 422))]#0 0x00007f36f07a03e1 in sigtimedwait () from /lib/libc.so.6 (gdb) bt
#0 0x00007f36f07a03e1 in sigtimedwait () from /lib/libc.so.6
#1 0x000000000050a560 in kvm_main_loop_wait (env=0xc319e0, timeout=0)

    at /home/chris/pkgs/kvm/kvm-79/qemu/qemu-kvm.c:284
#2  0x000000000050aaf7 in ap_main_loop (_env=<value optimized out>)
    at /home/chris/pkgs/kvm/kvm-79/qemu/qemu-kvm.c:425
#3  0x00007f36f11ba3ea in start_thread () from /lib/libpthread.so.0
#4  0x00007f36f0852c6d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thanks for your help, let me know if I can provide more. Chris

#6 lore raw
In reply to a message not in the archive

My guests do travel too. The host is vanilla 2.6.27.6 with kvm-79.

Right now I have a guest which looks like this:

# uname -a
Linux spaceball 2.6.27.6 #1 SMP Fri Nov 14 11:51:10 CET 2008 i686 QEMU
Virtual CPU version 0.9.1 AuthenticAMD GNU/Linux
# uptime
 02:00:11 up 14663 days, 18:37,  5 users,  load average: 0.99, 0.97, 0.91
# uptime
 02:11:10 up 14663 days, 18:48,  5 users,  load average: 0.99, 0.97, 0.91

Other symptoms are the same as my previous report. top hangs, sync hangs, ....

alt-sysrq-t,q.m show nothing.

#7 lore raw

The same guest did it again.

# uname -a
Linux spaceball 2.6.27.6 #1 SMP Fri Nov 14 11:51:10 CET 2008 i686 QEMU
Virtual CPU version 0.9.1 AuthenticAMD GNU/Linux
# date
Thu Dec 19 01:54:27 WET 1912
# uptime
 01:54:29 up 14666 days, 21:17, 12 users,  load average: 3.99, 3.97, 3.91

What can I do to provide more info?

#8 lore raw
Quoted 6 lines · xming

The same guest did it again.

# uname -a
Linux spaceball 2.6.27.6 #1 SMP Fri Nov 14 11:51:10 CET 2008 i686 QEMU
Virtual CPU version 0.9.1 AuthenticAMD GNU/Linux
Quoted 8 lines
# date
Thu Dec 19 01:54:27 WET 1912
# uptime
 01:54:29 up 14666 days, 21:17, 12 users,  load average: 3.99, 3.97, 3.91

What can I do to provide more info?

A way to reproduce would be best. If you have access to multiple hosts, try to isolate whether it happens only on amd or only on intel.

Signature · 1 line
error compiling committee.c: too many arguments to function
#9 lore raw
Quoted 10 lines · Avi Kivity
Quoted 9 lines · xming

The same guest did it again.

# uname -a
Linux spaceball 2.6.27.6 #1 SMP Fri Nov 14 11:51:10 CET 2008 i686 QEMU
Virtual CPU version 0.9.1 AuthenticAMD GNU/Linux
# date
Thu Dec 19 01:54:27 WET 1912
Quoted 16 lines
Quoted 5 lines
# uptime
01:54:29 up 14666 days, 21:17, 12 users,  load average: 3.99, 3.97, 3.91

What can I do to provide more info?

A way to reproduce would be best. If you have access to multiple hosts, try to isolate whether it happens only on amd or only on intel.

Signature · 6 lines
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

I have a way to reproduce my instance of the problem easily now. I was trying
to build a new kernel on my guest, and found that depmod hangs guests every time.
In my case, I only have an amd processor - I don't have an intel
host to try it on, right now, but it happens on Ubuntu 8.04
and Ubuntu 8.10 guests, both using kvm-79 and the version of kvm that ships with ubuntu 8.10.

#10 lore raw
Quoted 7 lines

I have a way to reproduce my instance of the problem easily now. I was trying
to build a new kernel on my guest, and found that depmod hangs guests every time.
In my case, I only have an amd processor - I don't have an intel
host to try it on, right now, but it happens on Ubuntu 8.04
and Ubuntu 8.10 guests, both using kvm-79 and the version of kvm that ships with ubuntu 8.10.

I have AMD too, vanilla kernel 2.6.27.6 and kvm-79 (although I have this before 79).
the guest is SMP (UP guests hang too but less frequent).

depmod does not hang here (not reproducible). Heavy CPU + heavy IO on nfs mounts triggers this on my side.

I have a very subjective feeling that it happens more frequently when the host has
less uptime (freshly rebooted).

#11 lore raw

Sounds like your configuration is very similar to mine. I'm also on a vanilla kernel (2.6.27.7 in my case) with kvm-79 and AMD processors.

You sparked my curiosity on the depmod -a issue, so I spent some time trying it on different configurations.

I have two servers:
* 1.8GHz AMD Opteron 2210 on an HP DL385G2, AMD Opteron 2210
* 2.5GHz AMD Athlon 4850e on a "green" build w/ a Gigabyte GA-MA74Gm-S2

I can reproduce it on the Gigagbyte build with ease.

On the HP DL385G2 server, I could reproduce it on one of my guests but only once in every four times (and with multiple guests running, not sure if that made a difference).

Like you, I also have had the feeling that my occassional hangs were more likely on a freshly reboot, but don't have anything real conclusive to prove it.

I'm afraid I don't have an Intel-based server around right now to see if this is an AMD-only issue. I might be able to scrounge up an HP DL380G5 (with an Intel Core 2) but I'm not sure.

Chris

Quoted 22 lines · xming
Quoted 7 lines

I have a way to reproduce my instance of the problem easily now. I was trying
to build a new kernel on my guest, and found that depmod hangs guests every time.
In my case, I only have an amd processor - I don't have an intel
host to try it on, right now, but it happens on Ubuntu 8.04
and Ubuntu 8.10 guests, both using kvm-79 and the version of kvm that ships with ubuntu 8.10.

I have AMD too, vanilla kernel 2.6.27.6 and kvm-79 (although I have this before 79).
the guest is SMP (UP guests hang too but less frequent).

depmod does not hang here (not reproducible). Heavy CPU + heavy IO on nfs mounts triggers this on my side.

I have a very subjective feeling that it happens more frequently when the host has
less uptime (freshly rebooted).
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#12 lore raw

Neither do I have access to an Intel box.

I have an AMD Athlon(tm) X2 Dual Core Processor BE-2300 on asus m2a vm with 6GB RAM.

The host is running 32-bit Gentoo with PAE. Guests are 32-bit Gentoo (w/o PAE, tried with same hangs) using virt block and virt net.

I suspect it's the load (CPU + IO) that will cause the hang and it's reverse proportional with the uptime.

When the host just booted, it sometimes even have trouble to boot the first guest completely, but killing it and restart it would boot.

I have tried different clocks for the guest, (kvm and acpi_pm), it doess't matter. I have tried different kernel config, last attempt is to build separate kernel for host and guest, still hangs.

I also tried to disable oos_shadow, but that doesn't change anything.

The host is booted with (as Marcelo told me):
kernel /boot/bzImage-2.6.27.6-host root=/dev/md0 clocksource=acpi_pm notsc profile=kvm

but I don't have /proc/profile, so can't do readprofile.

#13 lore raw
In reply to [email protected]
Quoted 8 lines · [email protected] wrote:

I have a way to reproduce my instance of the problem easily now. I was trying
to build a new kernel on my guest, and found that depmod hangs guests every time.
In my case, I only have an amd processor - I don't have an intel
host to try it on, right now, but it happens on Ubuntu 8.04
and Ubuntu 8.10 guests, both using kvm-79 and the version of kvm that ships with ubuntu 8.10.

What's your guest, how is qemu launched (command line)?

Signature · 1 line
error compiling committee.c: too many arguments to function
#14 lore raw
Quoted 12 lines · Avi Kivity
Quoted 10 lines · [email protected] wrote:

I have a way to reproduce my instance of the problem easily now. I was
trying
to build a new kernel on my guest, and found that depmod hangs guests every time.
In my case, I only have an amd processor - I don't have an intel
host to try it on, right now, but it happens on Ubuntu 8.04 and Ubuntu 8.10 guests, both using kvm-79 and the version of kvm that ships with ubuntu 8.10.

Quoted 9 lines

What's your guest, how is qemu launched (command line)?

Signature · 6 lines
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

The guest is Ubuntu 8.10 server (64-bit version). I also have the same problems with Ubuntu 8.04LTS server.

Here's the command line:

sudo /usr/local/bin/qemu-system-x86_64        \
     -no-kvm-irqchip                         \
     -daemonize                               \
     -hda Imgs/sam_home.img                   \
     -m 512                                   \
     -cdrom ISOs/ubuntu-8.10-server-amd64.iso \
     -parallel /dev/lp0                       \
     -vnc :1                                  \
     -net nic,macaddr=DE:AD:BE:EF:01:01,model=e1000 \
     -net tap,ifname=tap1,script=/home/chris/kvm/qemu-ifup.sh \
     >>& Logs/sam_run.log

Earlier in the mail chain, Marcelo had me run vmstat when it was hung, and it was all zeros. He also asked for a stack trace on the qemu and it showed two threads:

	(gdb) info threads
	  2 Thread 0x414f1950 (LWP 422)  0x00007f36f07a03e1 in sigtimedwait ()
	   from /lib/libc.so.6
	  1 Thread 0x7f36f1f306e0 (LWP 414)  0x00007f36f084b482 in select ()
	   from /lib/libc.so.6
	(gdb) thread 1
	[Switching to thread 1 (Thread 0x7f36f1f306e0 (LWP 414))]#0  0x00007f36f084b482
	+in select () from /lib/libc.so.6
	(gdb) bt
	#0  0x00007f36f084b482 in select () from /lib/libc.so.6
	#1  0x00000000004094cb in main_loop_wait (timeout=0)
	    at /home/chris/pkgs/kvm/kvm-79/qemu/vl.c:4719
	#2  0x000000000050a7ea in kvm_main_loop ()
	    at /home/chris/pkgs/kvm/kvm-79/qemu/qemu-kvm.c:619
	#3  0x000000000040fafc in main (argc=<value optimized out>,
	    argv=0x7ffff9f41948) at /home/chris/pkgs/kvm/kvm-79/qemu/vl.c:4871
	(gdb) thread 2
	[Switching to thread 2 (Thread 0x414f1950 (LWP 422))]#0  0x00007f36f07a03e1 in
	+sigtimedwait () from /lib/libc.so.6
	(gdb) bt
	#0  0x00007f36f07a03e1 in sigtimedwait () from /lib/libc.so.6
	#1  0x000000000050a560 in kvm_main_loop_wait (env=0xc319e0, timeout=0)
	    at /home/chris/pkgs/kvm/kvm-79/qemu/qemu-kvm.c:284
	#2  0x000000000050aaf7 in ap_main_loop (_env=<value optimized out>)
	    at /home/chris/pkgs/kvm/kvm-79/qemu/qemu-kvm.c:425
	#3  0x00007f36f11ba3ea in start_thread () from /lib/libpthread.so.0
	#4  0x00007f36f0852c6d in clone () from /lib/libc.so.6
	#5  0x0000000000000000 in ?? ()

If I can provide any other debug info I'm happy to. I'm beginning to suspect
you'll be able to easily reproduce it if you run Ubuntu 8.10 as a guest on amd processors.

#15 lore raw
Quoted 73 lines · On Wed, Dec 03, 2008 at 09:49:18AM -0800, [email protected] wrote:
Quoted 12 lines · Avi Kivity
Quoted 10 lines · [email protected] wrote:

I have a way to reproduce my instance of the problem easily now. I was
trying
to build a new kernel on my guest, and found that depmod hangs guests every time.
In my case, I only have an amd processor - I don't have an intel
host to try it on, right now, but it happens on Ubuntu 8.04 and Ubuntu 8.10 guests, both using kvm-79 and the version of kvm that ships with ubuntu 8.10.

Quoted 9 lines

What's your guest, how is qemu launched (command line)?

Signature · 6 lines
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

The guest is Ubuntu 8.10 server (64-bit version). I also have the same problems with Ubuntu 8.04LTS server.

Here's the command line:

sudo /usr/local/bin/qemu-system-x86_64        \
     -no-kvm-irqchip                         \
     -daemonize                               \
     -hda Imgs/sam_home.img                   \
     -m 512                                   \
     -cdrom ISOs/ubuntu-8.10-server-amd64.iso \
     -parallel /dev/lp0                       \
     -vnc :1                                  \
     -net nic,macaddr=DE:AD:BE:EF:01:01,model=e1000 \
     -net tap,ifname=tap1,script=/home/chris/kvm/qemu-ifup.sh \
     >>& Logs/sam_run.log

Earlier in the mail chain, Marcelo had me run vmstat when it was hung, and it was all zeros. He also asked for a stack trace on the qemu and it showed two threads:

	(gdb) info threads
	  2 Thread 0x414f1950 (LWP 422)  0x00007f36f07a03e1 in sigtimedwait ()
	   from /lib/libc.so.6
	  1 Thread 0x7f36f1f306e0 (LWP 414)  0x00007f36f084b482 in select ()
	   from /lib/libc.so.6
	(gdb) thread 1
	[Switching to thread 1 (Thread 0x7f36f1f306e0 (LWP 414))]#0  0x00007f36f084b482
	+in select () from /lib/libc.so.6
	(gdb) bt
	#0  0x00007f36f084b482 in select () from /lib/libc.so.6
	#1  0x00000000004094cb in main_loop_wait (timeout=0)
	    at /home/chris/pkgs/kvm/kvm-79/qemu/vl.c:4719
	#2  0x000000000050a7ea in kvm_main_loop ()
	    at /home/chris/pkgs/kvm/kvm-79/qemu/qemu-kvm.c:619
	#3  0x000000000040fafc in main (argc=<value optimized out>,
	    argv=0x7ffff9f41948) at /home/chris/pkgs/kvm/kvm-79/qemu/vl.c:4871
	(gdb) thread 2
	[Switching to thread 2 (Thread 0x414f1950 (LWP 422))]#0  0x00007f36f07a03e1 in
	+sigtimedwait () from /lib/libc.so.6
	(gdb) bt
	#0  0x00007f36f07a03e1 in sigtimedwait () from /lib/libc.so.6
	#1  0x000000000050a560 in kvm_main_loop_wait (env=0xc319e0, timeout=0)
	    at /home/chris/pkgs/kvm/kvm-79/qemu/qemu-kvm.c:284
	#2  0x000000000050aaf7 in ap_main_loop (_env=<value optimized out>)
	    at /home/chris/pkgs/kvm/kvm-79/qemu/qemu-kvm.c:425
	#3  0x00007f36f11ba3ea in start_thread () from /lib/libpthread.so.0
	#4  0x00007f36f0852c6d in clone () from /lib/libc.so.6
	#5  0x0000000000000000 in ?? ()
Quoted 7 lines

If I can provide any other debug info I'm happy to. I'm beginning to suspect
you'll be able to easily reproduce it if you run Ubuntu 8.10 as a guest on amd processors.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

FYI, I'm seeing hangs on kvm-81, although the circumstances seem to have changes somewhat. Now, when the guest hangs, the qemu-system-x86 process
in the host runs 100% busy. And now I do see some kvm_stat counters
increasing, not just all 0s:

kvm_stat -l
-----------------
efer_relo exits fpu_reloa halt_exit halt_wake host_stat hypercall insn_emul insn_emul invlpg io_exits irq_exits irq_injec irq_windo kvm_reque largepage mmio_exit mmu_cache mmu_flood mmu_pde_z mmu_pte_u mmu_pte_w mmu_recyc mmu_shado mmu_unsyn mmu_unsyn nmi_injec nmi_windo pf_fixed pf_guest remote_tl request_n signal_ex tlb_flush

         0        277          0          0          0         29          0          0          0          0          0        277          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0        289          0          0          0         35          0          0          0          0          0        290          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0        277          0          0          0         27          0          0          0          0          0        277          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0        290          0          0          0         33          0          0          0          0          0        289          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0        290          0          0          0         34          0          0          0          0          0        290          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0        288          0          0          0         30          0          0          0          0          0        288          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0        296          0          0          0         36          0          0          0          0          0        297          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0        292          0          0          0         33          0          0          0          0          0        291          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0        275          0          0          0         26          0          0          0          0          0        275          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0        289          0          0          0         31          0          0          0          0          0        290          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0        309          0          0          0         41          0          0          0          0          0        308          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0
         0        289          0          0          0         29          0          0          0          0          0        289          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0

GDB on it shows:
---------------
(gdb) info threads
2 Thread 0x41fad950 (LWP 6514) 0x00007f498e8e4a17 in ioctl ()
from /lib/libc.so.6
1 Thread 0x7f498ffc36e0 (LWP 6506) 0x00007f498e8e5482 in select ()
from /lib/libc.so.6

(gdb) thread 1
[Switching to thread 1 (Thread 0x7f498ffc36e0 (LWP 6506))]#0 0x00007f498e8e5482 in select () from /lib/libc.so.6 (gdb) bt
#0 0x00007f498e8e5482 in select () from /lib/libc.so.6
#1 0x0000000000409b8b in main_loop_wait (timeout=0)

    at /home/chris/pkgs/kvm/kvm-81/qemu/vl.c:3623
#2  0x000000000051653a in kvm_main_loop ()
    at /home/chris/pkgs/kvm/kvm-81/qemu/qemu-kvm.c:597
#3  0x000000000040e0bc in main (argc=<value optimized out>, 
    argv=0x7fff97fda878) at /home/chris/pkgs/kvm/kvm-81/qemu/vl.c:3785

(gdb) thread 2
[Switching to thread 2 (Thread 0x41fad950 (LWP 6514))]#0 0x00007f498e8e4a17 in ioctl () from /lib/libc.so.6 (gdb) bt
#0 0x00007f498e8e4a17 in ioctl () from /lib/libc.so.6
#1 0x0000000000543bba in kvm_run (kvm=0xbe0040, vcpu=0, env=0xc5a1d0)

    at libkvm.c:881
#2  0x0000000000516649 in kvm_cpu_exec (env=<value optimized out>)
    at /home/chris/pkgs/kvm/kvm-81/qemu/qemu-kvm.c:207
#3  0x0000000000516948 in ap_main_loop (_env=<value optimized out>)
    at /home/chris/pkgs/kvm/kvm-81/qemu/qemu-kvm.c:414
#4  0x00007f498f2543ea in start_thread () from /lib/libpthread.so.0
#5  0x00007f498e8ecc6d in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thanks,
Chris