Hard freeze when invoking kvm (with kvm-amd module)

Bug #230569 reported by willfe
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The following command (using a just-created qcow2 file; the ISO image in question is a Damn Small Linux image, but it's done the same thing with other ISO images, including a Windows XP installer and an Ubuntu 8.04 live CD):

$ kvm -boot d -cdrom ./dsl-4.3RC2.iso dsl.qcow2

immediately freezes (crashes) my portable (Compaq Presario F572US; dual-core AMD X2 (running 32-bit Ubuntu 8.04); 2GB RAM). The only progress KVM actually makes before the system dies is to display the QEMU/KVM window (black/empty), then an immediate freeze. It doesn't seem to actually get to the "load and try to run stuff" stage.

kvm package version is 1:62+dfsg-0ubuntu7 and kernel package version is 2.6.24-17.31 (and reports the following via "uname -a": "Linux prometheus 2.6.24-17-generic #1 SMP Thu May 1 14:31:33 UTC 2008 i686 GNU/Linux".

The kvm and kernel builds immediately prior to this update also didn't work, but caused an "oops" in syslog but didn't actually crash the box. This current build requires a hard power-off and restart to bring the system back up.

As a comparison, with the same package versions on a 64-bit installation of Ubuntu 8.04 (AMD X2, kernel reports "Linux willfe.com 2.6.24-17-generic #1 SMP Thu May 1 13:57:17 UTC 2008 x86_64 GNU/Linux" from "uname -a"), kvm runs properly (and !@#$ing fast!). That machine is a Dell Dimension E521 (the el-cheapo special from last year that shipped with FreeDOS).

I'm at your disposal if you need additional details or other troubleshooting steps to pinpoint the problem. I'd love to be able to coax an error message or log entry out of it as it crashes, which I suspect would help lead to the culprit and a fix.

Revision history for this message
willfe (willfe) wrote :
Download full text (4.2 KiB)

The current kernel no longer freezes the machine hard, though the process itself freezes (leaving a "QEMU/KVM [Stopped]" window that is not responsive) and can't be killed via [ctrl]-[c]. It also generates a kernel oops (which gets logged). So, I guess technically that's a little better :)

Kernel version: Linux version 2.6.24-18-generic (buildd@terranova) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed May 28 20:27:26 UTC 2008
KVM version: 1:62+dfsg-0ubuntu7

Here's the oops:

[ 5376.777769] kvm: guest NX capability removed
[ 5376.777876] BUG: unable to handle kernel NULL pointer dereference at virtual address 00000008
[ 5376.777884] printing eip: f8ce80e6 *pde = 00000000
[ 5376.777891] Oops: 0000 [#1] SMP
[ 5376.777896] Modules linked in: forcedeth ndiswrapper rndis_host cdc_ether usbnet mii snd_rtctimer binfmt_misc rfcomm l2cap bluetooth af_packet ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 xt_state nf_conntrack ipt_REJECT xt_tcpudp bridge kvm_amd kvm ppdev powernow_k8 cpufreq_ondemand cpufreq_conservative cpufreq_powersave cpufreq_stats freq_table cpufreq_userspace container dock sbs sbshc iptable_filter ip_tables x_tables parport_pc lp parport joydev snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_hwdep snd_seq_dummy snd_seq_oss snd_seq_midi evdev psmouse snd_rawmidi serio_raw snd_seq_midi_event snd_seq snd_timer snd_seq_device k8temp snd soundcore i2c_nforce2 wmi_acer video output battery nvidia(P) ac button agpgart i2c_core shpchp pci_hotplug dm_multipath dm_mod ext3 jbd mbcache sd_mod sg sr_mod cdrom sata_nv ata_generic pata_acpi pata_amd libata scsi_mod ohci_hcd ehci_hcd usbcore thermal processor fan fbcon tileblit font bitblit softcursor fuse
[ 5376.777985]
[ 5376.777989] Pid: 4368, comm: kvm Tainted: P (2.6.24-18-generic #1)
[ 5376.777994] EIP: 0060:[<f8ce80e6>] EFLAGS: 00010046 CPU: 0
[ 5376.778005] EIP is at svm_vcpu_run+0x266/0x290 [kvm_amd]
[ 5376.778009] EAX: c44a3000 EBX: 00000000 ECX: 00000000 EDX: ffffffff
[ 5376.778013] ESI: c442a000 EDI: f70c4000 EBP: c442a000 ESP: f6f9fd6c
[ 5376.778018] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[ 5376.778021] Process kvm (pid: 4368, ti=f6f9e000 task=c44af140 task.ti=f6f9e000)
[ 5376.778025] Stack: c047c94c c442a000 f8b2eded 00000000 c442a000 f70c4000 00000000 f8b2530d
[ 5376.778035] 00000000 00000000 10002800 00000020 c46389c0 c442a000 0000ae80 f8b20c3d
[ 5376.778045] c44af330 00000001 f41231c0 00000000 00000000 f425e380 c44af140 c44af140
[ 5376.778054] Call Trace:
[ 5376.778062] [<f8b2eded>] kvm_cpu_has_interrupt+0x1d/0x40 [kvm]
[ 5376.778092] [<f8b2530d>] kvm_arch_vcpu_ioctl_run+0xed/0x5f0 [kvm]
[ 5376.778122] [<f8b20c3d>] kvm_vcpu_ioctl+0x34d/0x360 [kvm]
[ 5376.778152] [<c031a7aa>] schedule+0x20a/0x600
[ 5376.778187] [<c0121084>] kunmap_atomic+0x84/0xb0
[ 5376.778191] [<c012103d>] kunmap_atomic+0x3d/0xb0
[ 5376.778204] [<c016d6bd>] file_read_actor+0xed/0x100
[ 5376.778225] [<c016e1fd>] do_generic_mapping_read+0x3ad/0x490
[ 5376.778239] [<c016d5d0>] file_read_actor+0x0/0x100
[ 5376.778255] [<c016da2f>] find_lock_page+0x2f/0xb0
[ 5376.778272] [<c016ff76>] filemap_fault+0x216/0x420
[ 5376.778296] [<c0121084>] k...

Read more...

Revision history for this message
willfe (willfe) wrote :

On "Linux version 2.6.24-19-generic (buildd@vernadsky) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed Jun 4 16:35:01 UTC 2008" it's back to hard freeze instead of an oops.

Revision history for this message
kiwiadam2 (kiwiadam2) wrote :

My box just started doing this after using kvm with no problems for a long time. Didn't even install any updates just hibernated & started it up again and i get QEMU/KVM [Stopped]. I'm using an AMD Athlon 64 X2 4200+.

Revision history for this message
kiwiadam2 (kiwiadam2) wrote :

I just had a look & there was a kernel update.

Revision history for this message
Marcus (marcus-liljedahl) wrote :

I have the same problem (hard freeze), but the problem disapers if I use "noapic" kernel option on the host system.

Revision history for this message
xteejx (xteejx) wrote :

Can you confirm if this still happens in Intrepid as the latest kernel is 2.6.27-9
Thank you.

Revision history for this message
willfe (willfe) wrote :

Teej: Yes, I will test this later this afternoon and report the results. Thanks!

Revision history for this message
willfe (willfe) wrote :

Fantastic! It works fine now. I was able to boot the KVM several times without any issues or lockups, and no warnings in the kernel logs.

Thanks!

xteejx (xteejx)
Changed in linux:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.