Skip to contentSkip to conversation

qemu-1.4.0 and onwards, linux kernel 3.2.x, heavy I/O leads to kernel_hung_tasks_timout_secs message and unresponsive qemu-process

Qemu-devel Oliver Francke 3 participants 5 messages Aug 2, 2013 – Oct 31, 2016

lore
Share & tools
lore
#0 lore raw

Public bug reported:

Hi,

after some testing I tried to narrow down a problem, which was initially reported by some users. Seen on different distros - debian 7.1, ubuntu 12.04 LTS, IPFire-2.3 as reported by now.

All using some flavour of linux-3.2.x kernel.

Tried e.g. under Ubuntu an upgrade to "Linux 3.8.0-27-generic x86_64" which solves the problem. Problem could be triggert with some workload ala:

spew -v --raw -P -t -i 3 -b 4k -p random -B 4k 1G /tmp/doof.dat and in parallel do some apt-get install/remove/whatever.

That results in a somewhat stuck qemu-session with the bad "kernel_hung_task..." messages.

A typical command-line is as follows:

/usr/local/qemu-1.6.0/bin/qemu-system-x86_64 -usbdevice tablet -enable-
kvm -daemonize -pidfile /var/run/qemu-server/760.pid -monitor unix:/var/run/qemu-server/760.mon,server,nowait -vnc unix:/var/run/qemu-
server/760.vnc,password -qmp unix:/var/run/qemu-
server/760.qmp,server,nowait -nodefaults -serial none -parallel none
-device virtio-net-pci,mac=00:F1:70:00:2F:80,netdev=vlan0d0 -netdev type=tap,id=vlan0d0,ifname=tap760i0d0,script=/etc/fcms/add_if.sh,downscript=/etc/fcms/downscript.sh
-name 1155823384-4 -m 512 -vga cirrus -k de -smp sockets=1,cores=1
-device virtio-blk-pci,drive=virtio0 -drive format=raw,file=rbd:1155823384/vm-760-disk-1.rbd:rbd_cache=false,cache=writeback,if=none,id=virtio0,media=disk,index=0,aio=native -drive format=raw,file=rbd:1155823384/vm-760-swap-1.rbd:rbd_cache=false,cache=writeback,if=virtio,media=disk,index=1,aio=native -drive if=ide,media=cdrom,id=ide1-cd0,readonly=on -drive
if=ide,media=cdrom,id=ide1-cd1,readonly=on -boot order=dc

no "system_reset", "sendkey ctrl-alt-delete" or "q" in monitoring- session is accepted, need to hard-kill the process.

Please give any advice on what to do for tracing/debugging, because the number of tickets here are raising, and noone knows, what users are doing inside their VM.

Kind regards,

Oliver Francke.

** Affects: qemu
Importance: Undecided
Status: New

Signature · 58 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1207686

Title:
  qemu-1.4.0 and onwards, linux kernel 3.2.x, heavy I/O leads to
  kernel_hung_tasks_timout_secs message and unresponsive qemu-process

Status in QEMU:
  New

Bug description:
  Hi,

  after some testing I tried to narrow down a problem, which was initially reported by some users.
  Seen on different distros - debian 7.1, ubuntu 12.04 LTS, IPFire-2.3 as reported by now.

  All using some flavour of linux-3.2.x kernel.

  Tried e.g. under Ubuntu an upgrade to "Linux 3.8.0-27-generic x86_64" which solves the problem.
  Problem could be triggert with some workload ala:

  spew -v --raw -P -t -i 3 -b 4k -p random -B 4k 1G /tmp/doof.dat
  and in parallel do some apt-get install/remove/whatever.

  That results in a somewhat stuck qemu-session with the bad
  "kernel_hung_task..." messages.

  A typical command-line is as follows:

  /usr/local/qemu-1.6.0/bin/qemu-system-x86_64 -usbdevice tablet
  -enable-kvm -daemonize -pidfile /var/run/qemu-server/760.pid -monitor
  unix:/var/run/qemu-server/760.mon,server,nowait -vnc unix:/var/run
  /qemu-server/760.vnc,password -qmp unix:/var/run/qemu-
  server/760.qmp,server,nowait -nodefaults -serial none -parallel none
  -device virtio-net-pci,mac=00:F1:70:00:2F:80,netdev=vlan0d0 -netdev
  type=tap,id=vlan0d0,ifname=tap760i0d0,script=/etc/fcms/add_if.sh,downscript=/etc/fcms/downscript.sh
  -name 1155823384-4 -m 512 -vga cirrus -k de -smp sockets=1,cores=1
  -device virtio-blk-pci,drive=virtio0 -drive
  format=raw,file=rbd:1155823384/vm-760-disk-1.rbd:rbd_cache=false,cache=writeback,if=none,id=virtio0,media=disk,index=0,aio=native
  -drive
  format=raw,file=rbd:1155823384/vm-760-swap-1.rbd:rbd_cache=false,cache=writeback,if=virtio,media=disk,index=1,aio=native
  -drive if=ide,media=cdrom,id=ide1-cd0,readonly=on -drive
  if=ide,media=cdrom,id=ide1-cd1,readonly=on -boot order=dc

  no "system_reset", "sendkey ctrl-alt-delete" or "q" in monitoring-
  session is accepted, need to hard-kill the process.

  Please give any advice on what to do for tracing/debugging, because
  the number of tickets here are raising, and noone knows, what users
  are doing inside their VM.

  Kind regards,

  Oliver Francke.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1207686/+subscriptions
#1 lore raw
Quoted 6 lines · Oliver Francke

after some testing I tried to narrow down a problem, which was initially reported by some users. Seen on different distros - debian 7.1, ubuntu 12.04 LTS, IPFire-2.3 as reported by now.

All using some flavour of linux-3.2.x kernel.

Tried e.g. under Ubuntu an upgrade to "Linux 3.8.0-27-generic x86_64" which solves the problem.

Is that a guest kernel upgrade?

Quoted 25 lines

Problem could be triggert with some workload ala:

spew -v --raw -P -t -i 3 -b 4k -p random -B 4k 1G /tmp/doof.dat and in parallel do some apt-get install/remove/whatever.

That results in a somewhat stuck qemu-session with the bad "kernel_hung_task..." messages.

A typical command-line is as follows:

/usr/local/qemu-1.6.0/bin/qemu-system-x86_64 -usbdevice tablet -enable-
kvm -daemonize -pidfile /var/run/qemu-server/760.pid -monitor unix:/var/run/qemu-server/760.mon,server,nowait -vnc unix:/var/run/qemu- server/760.vnc,password -qmp unix:/var/run/qemu-
server/760.qmp,server,nowait -nodefaults -serial none -parallel none
-device virtio-net-pci,mac=00:F1:70:00:2F:80,netdev=vlan0d0 -netdev type=tap,id=vlan0d0,ifname=tap760i0d0,script=/etc/fcms/add_if.sh,downscript=/etc/fcms/downscript.sh

(quoted diff) +0 -2
-name 1155823384-4 -m 512 -vga cirrus -k de -smp sockets=1,cores=1
-device virtio-blk-pci,drive=virtio0 -drive

format=raw,file=rbd:1155823384/vm-760-disk-1.rbd:rbd_cache=false,cache=writeback,if=none,id=virtio0,media=disk,index=0,aio=native -drive format=raw,file=rbd:1155823384/vm-760-swap-1.rbd:rbd_cache=false,cache=writeback,if=virtio,media=disk,index=1,aio=native -drive if=ide,media=cdrom,id=ide1-cd0,readonly=on -drive
if=ide,media=cdrom,id=ide1-cd1,readonly=on -boot order=dc

Quoted 2 lines

no "system_reset", "sendkey ctrl-alt-delete" or "q" in monitoring- session is accepted, need to hard-kill the process.

Yesterday I saw a possibly related report on IRC. It was a Windows guest running under OpenStack with images on Ceph.

They reported that the QEMU process would lock up - ping would not work and their management tools showed 0 CPU activity for the guest. However, they were able to "kick" the guest by taking a VNC screenshot (I think). Then it would come back to life.

If you have a Linux guest that is reporting kernel_hung_task, then it could be a similar scenario.

Please confirm that the hung task message is from inside the guest.

If you are able to reproduce this and have an alternative non-Ceph storage pool, please try that since Ceph is common to both these bug reports.

Stefan

#2 lore raw

Hi Stefan,

Am 02.08.2013 um 17:24 schrieb Stefan Hajnoczi
<[email protected]>:

Quoted 9 lines · Oliver Francke
Quoted 6 lines

after some testing I tried to narrow down a problem, which was initially reported by some users. Seen on different distros - debian 7.1, ubuntu 12.04 LTS, IPFire-2.3 as reported by now.

All using some flavour of linux-3.2.x kernel.

Tried e.g. under Ubuntu an upgrade to "Linux 3.8.0-27-generic x86_64" which solves the problem.

Is that a guest kernel upgrade?

yeah, sorry if that was not clear enough.

Quoted 37 lines
Quoted 26 lines

Problem could be triggert with some workload ala:

spew -v --raw -P -t -i 3 -b 4k -p random -B 4k 1G /tmp/doof.dat and in parallel do some apt-get install/remove/whatever.

That results in a somewhat stuck qemu-session with the bad "kernel_hung_task..." messages.

A typical command-line is as follows:

/usr/local/qemu-1.6.0/bin/qemu-system-x86_64 -usbdevice tablet -enable-
kvm -daemonize -pidfile /var/run/qemu-server/760.pid -monitor unix:/var/run/qemu-server/760.mon,server,nowait -vnc unix:/var/run/qemu- server/760.vnc,password -qmp unix:/var/run/qemu-
server/760.qmp,server,nowait -nodefaults -serial none -parallel none
-device virtio-net-pci,mac=00:F1:70:00:2F:80,netdev=vlan0d0 -netdev type=tap,id=vlan0d0,ifname=tap760i0d0,script=/etc/fcms/add_if.sh,downscript=/etc/fcms/downscript.sh

(quoted diff) +0 -2
-name 1155823384-4 -m 512 -vga cirrus -k de -smp sockets=1,cores=1
-device virtio-blk-pci,drive=virtio0 -drive

format=raw,file=rbd:1155823384/vm-760-disk-1.rbd:rbd_cache=false,cache=writeback,if=none,id=virtio0,media=disk,index=0,aio=native -drive format=raw,file=rbd:1155823384/vm-760-swap-1.rbd:rbd_cache=false,cache=writeback,if=virtio,media=disk,index=1,aio=native -drive if=ide,media=cdrom,id=ide1-cd0,readonly=on -drive
if=ide,media=cdrom,id=ide1-cd1,readonly=on -boot order=dc

Quoted 2 lines

no "system_reset", "sendkey ctrl-alt-delete" or "q" in monitoring- session is accepted, need to hard-kill the process.

Yesterday I saw a possibly related report on IRC. It was a Windows guest running under OpenStack with images on Ceph.

They reported that the QEMU process would lock up - ping would not work and their management tools showed 0 CPU activity for the guest. However, they were able to "kick" the guest by taking a VNC screenshot (I think). Then it would come back to life.

Quoted 5 lines

If you have a Linux guest that is reporting kernel_hung_task, then it could be a similar scenario.

Please confirm that the hung task message is from inside the guest.

confirmed.

Quoted 4 lines

If you are able to reproduce this and have an alternative non-Ceph storage pool, please try that since Ceph is common to both these bug reports.

I can reproduce it with: kernel 3.2.something + qemu-1.[456] ( never spent much time on 1.3) and high I/O.
I took this VM later this day and converted it to local-storage-qcow2, no prob with any kernel. I already asked on ceph-users-list for assistance, especially from Josh ( if he's not on summer holiday ;) )

What is strange, I have a session via VNC-console opened and have a loop ala:

while true; do apt-get install -y ntp libopts25; apt-get remove -y ntp-libopts25; done
and and parallel spew as described, the apt-"session" dies and one can see the hung_task-thingy, but I still can restart the spew-test. Just for completeness.

Thnx for you attention,

Oliver.

Quoted 61 lines

Stefan

Signature · 58 lines
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1207686

Title:
 qemu-1.4.0 and onwards, linux kernel 3.2.x, heavy I/O leads to
 kernel_hung_tasks_timout_secs message and unresponsive qemu-process

Status in QEMU:
 New

Bug description:
 Hi,

 after some testing I tried to narrow down a problem, which was initially reported by some users.
 Seen on different distros - debian 7.1, ubuntu 12.04 LTS, IPFire-2.3 as reported by now.

 All using some flavour of linux-3.2.x kernel.

 Tried e.g. under Ubuntu an upgrade to "Linux 3.8.0-27-generic x86_64" which solves the problem.
 Problem could be triggert with some workload ala:

 spew -v --raw -P -t -i 3 -b 4k -p random -B 4k 1G /tmp/doof.dat
 and in parallel do some apt-get install/remove/whatever.

 That results in a somewhat stuck qemu-session with the bad
 "kernel_hung_task..." messages.

 A typical command-line is as follows:

 /usr/local/qemu-1.6.0/bin/qemu-system-x86_64 -usbdevice tablet
 -enable-kvm -daemonize -pidfile /var/run/qemu-server/760.pid -monitor
 unix:/var/run/qemu-server/760.mon,server,nowait -vnc unix:/var/run
 /qemu-server/760.vnc,password -qmp unix:/var/run/qemu-
 server/760.qmp,server,nowait -nodefaults -serial none -parallel none
 -device virtio-net-pci,mac=00:F1:70:00:2F:80,netdev=vlan0d0 -netdev
 type=tap,id=vlan0d0,ifname=tap760i0d0,script=/etc/fcms/add_if.sh,downscript=/etc/fcms/downscript.sh
 -name 1155823384-4 -m 512 -vga cirrus -k de -smp sockets=1,cores=1
 -device virtio-blk-pci,drive=virtio0 -drive
 format=raw,file=rbd:1155823384/vm-760-disk-1.rbd:rbd_cache=false,cache=writeback,if=none,id=virtio0,media=disk,index=0,aio=native
 -drive
 format=raw,file=rbd:1155823384/vm-760-swap-1.rbd:rbd_cache=false,cache=writeback,if=virtio,media=disk,index=1,aio=native
 -drive if=ide,media=cdrom,id=ide1-cd0,readonly=on -drive
 if=ide,media=cdrom,id=ide1-cd1,readonly=on -boot order=dc

 no "system_reset", "sendkey ctrl-alt-delete" or "q" in monitoring-
 session is accepted, need to hard-kill the process.

 Please give any advice on what to do for tracing/debugging, because
 the number of tickets here are raising, and noone knows, what users
 are doing inside their VM.

 Kind regards,

 Oliver Francke.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1207686/+subscriptions
Signature · 58 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1207686

Title:
  qemu-1.4.0 and onwards, linux kernel 3.2.x, heavy I/O leads to
  kernel_hung_tasks_timout_secs message and unresponsive qemu-process

Status in QEMU:
  New

Bug description:
  Hi,

  after some testing I tried to narrow down a problem, which was initially reported by some users.
  Seen on different distros - debian 7.1, ubuntu 12.04 LTS, IPFire-2.3 as reported by now.

  All using some flavour of linux-3.2.x kernel.

  Tried e.g. under Ubuntu an upgrade to "Linux 3.8.0-27-generic x86_64" which solves the problem.
  Problem could be triggert with some workload ala:

  spew -v --raw -P -t -i 3 -b 4k -p random -B 4k 1G /tmp/doof.dat
  and in parallel do some apt-get install/remove/whatever.

  That results in a somewhat stuck qemu-session with the bad
  "kernel_hung_task..." messages.

  A typical command-line is as follows:

  /usr/local/qemu-1.6.0/bin/qemu-system-x86_64 -usbdevice tablet
  -enable-kvm -daemonize -pidfile /var/run/qemu-server/760.pid -monitor
  unix:/var/run/qemu-server/760.mon,server,nowait -vnc unix:/var/run
  /qemu-server/760.vnc,password -qmp unix:/var/run/qemu-
  server/760.qmp,server,nowait -nodefaults -serial none -parallel none
  -device virtio-net-pci,mac=00:F1:70:00:2F:80,netdev=vlan0d0 -netdev
  type=tap,id=vlan0d0,ifname=tap760i0d0,script=/etc/fcms/add_if.sh,downscript=/etc/fcms/downscript.sh
  -name 1155823384-4 -m 512 -vga cirrus -k de -smp sockets=1,cores=1
  -device virtio-blk-pci,drive=virtio0 -drive
  format=raw,file=rbd:1155823384/vm-760-disk-1.rbd:rbd_cache=false,cache=writeback,if=none,id=virtio0,media=disk,index=0,aio=native
  -drive
  format=raw,file=rbd:1155823384/vm-760-swap-1.rbd:rbd_cache=false,cache=writeback,if=virtio,media=disk,index=1,aio=native
  -drive if=ide,media=cdrom,id=ide1-cd0,readonly=on -drive
  if=ide,media=cdrom,id=ide1-cd1,readonly=on -boot order=dc

  no "system_reset", "sendkey ctrl-alt-delete" or "q" in monitoring-
  session is accepted, need to hard-kill the process.

  Please give any advice on what to do for tracing/debugging, because
  the number of tickets here are raising, and noone knows, what users
  are doing inside their VM.

  Kind regards,

  Oliver Francke.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1207686/+subscriptions
#3 lore raw
In reply to Oliver Francke

Hi,

opened a ticket with the ceph-guys, and it turned out to be a bug in "librados aio flush".

With latest "wip-librados-aio-flush (bobtail)" I got no error even with _very_ high load.

Thnx for the attention ;)

Oliver.

Signature · 58 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1207686

Title:
  qemu-1.4.0 and onwards, linux kernel 3.2.x, heavy I/O leads to
  kernel_hung_tasks_timout_secs message and unresponsive qemu-process

Status in QEMU:
  New

Bug description:
  Hi,

  after some testing I tried to narrow down a problem, which was initially reported by some users.
  Seen on different distros - debian 7.1, ubuntu 12.04 LTS, IPFire-2.3 as reported by now.

  All using some flavour of linux-3.2.x kernel.

  Tried e.g. under Ubuntu an upgrade to "Linux 3.8.0-27-generic x86_64" which solves the problem.
  Problem could be triggert with some workload ala:

  spew -v --raw -P -t -i 3 -b 4k -p random -B 4k 1G /tmp/doof.dat
  and in parallel do some apt-get install/remove/whatever.

  That results in a somewhat stuck qemu-session with the bad
  "kernel_hung_task..." messages.

  A typical command-line is as follows:

  /usr/local/qemu-1.6.0/bin/qemu-system-x86_64 -usbdevice tablet
  -enable-kvm -daemonize -pidfile /var/run/qemu-server/760.pid -monitor
  unix:/var/run/qemu-server/760.mon,server,nowait -vnc unix:/var/run
  /qemu-server/760.vnc,password -qmp unix:/var/run/qemu-
  server/760.qmp,server,nowait -nodefaults -serial none -parallel none
  -device virtio-net-pci,mac=00:F1:70:00:2F:80,netdev=vlan0d0 -netdev
  type=tap,id=vlan0d0,ifname=tap760i0d0,script=/etc/fcms/add_if.sh,downscript=/etc/fcms/downscript.sh
  -name 1155823384-4 -m 512 -vga cirrus -k de -smp sockets=1,cores=1
  -device virtio-blk-pci,drive=virtio0 -drive
  format=raw,file=rbd:1155823384/vm-760-disk-1.rbd:rbd_cache=false,cache=writeback,if=none,id=virtio0,media=disk,index=0,aio=native
  -drive
  format=raw,file=rbd:1155823384/vm-760-swap-1.rbd:rbd_cache=false,cache=writeback,if=virtio,media=disk,index=1,aio=native
  -drive if=ide,media=cdrom,id=ide1-cd0,readonly=on -drive
  if=ide,media=cdrom,id=ide1-cd1,readonly=on -boot order=dc

  no "system_reset", "sendkey ctrl-alt-delete" or "q" in monitoring-
  session is accepted, need to hard-kill the process.

  Please give any advice on what to do for tracing/debugging, because
  the number of tickets here are raising, and noone knows, what users
  are doing inside their VM.

  Kind regards,

  Oliver Francke.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1207686/+subscriptions
#4 lore raw
In reply to Oliver Francke

Closing as "Invalid" since this was not a QEMU bug according to comment #3.

** Changed in: qemu
Status: New => Invalid

Signature · 58 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1207686

Title:
  qemu-1.4.0 and onwards, linux kernel 3.2.x, heavy I/O leads to
  kernel_hung_tasks_timout_secs message and unresponsive qemu-process

Status in QEMU:
  Invalid

Bug description:
  Hi,

  after some testing I tried to narrow down a problem, which was initially reported by some users.
  Seen on different distros - debian 7.1, ubuntu 12.04 LTS, IPFire-2.3 as reported by now.

  All using some flavour of linux-3.2.x kernel.

  Tried e.g. under Ubuntu an upgrade to "Linux 3.8.0-27-generic x86_64" which solves the problem.
  Problem could be triggert with some workload ala:

  spew -v --raw -P -t -i 3 -b 4k -p random -B 4k 1G /tmp/doof.dat
  and in parallel do some apt-get install/remove/whatever.

  That results in a somewhat stuck qemu-session with the bad
  "kernel_hung_task..." messages.

  A typical command-line is as follows:

  /usr/local/qemu-1.6.0/bin/qemu-system-x86_64 -usbdevice tablet
  -enable-kvm -daemonize -pidfile /var/run/qemu-server/760.pid -monitor
  unix:/var/run/qemu-server/760.mon,server,nowait -vnc unix:/var/run
  /qemu-server/760.vnc,password -qmp unix:/var/run/qemu-
  server/760.qmp,server,nowait -nodefaults -serial none -parallel none
  -device virtio-net-pci,mac=00:F1:70:00:2F:80,netdev=vlan0d0 -netdev
  type=tap,id=vlan0d0,ifname=tap760i0d0,script=/etc/fcms/add_if.sh,downscript=/etc/fcms/downscript.sh
  -name 1155823384-4 -m 512 -vga cirrus -k de -smp sockets=1,cores=1
  -device virtio-blk-pci,drive=virtio0 -drive
  format=raw,file=rbd:1155823384/vm-760-disk-1.rbd:rbd_cache=false,cache=writeback,if=none,id=virtio0,media=disk,index=0,aio=native
  -drive
  format=raw,file=rbd:1155823384/vm-760-swap-1.rbd:rbd_cache=false,cache=writeback,if=virtio,media=disk,index=1,aio=native
  -drive if=ide,media=cdrom,id=ide1-cd0,readonly=on -drive
  if=ide,media=cdrom,id=ide1-cd1,readonly=on -boot order=dc

  no "system_reset", "sendkey ctrl-alt-delete" or "q" in monitoring-
  session is accepted, need to hard-kill the process.

  Please give any advice on what to do for tracing/debugging, because
  the number of tickets here are raising, and noone knows, what users
  are doing inside their VM.

  Kind regards,

  Oliver Francke.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1207686/+subscriptions