[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#544619: linux-image-2.6.26-2-686: Kernel in qemu/kvm guest OOM panics immediately if the virtio-balloon is deflated.



Package: linux-image-2.6.26-2-686
Version: 2.6.26-17lenny2
Severity: important
Tags: patch

If you inflate the balloon (using the "balloon ###" monitor command in qemu) and then deflate it (increasing the memory available to the guest), virtio-balloon will mistakenly inflate as much as it can, resulting in a rapid OOM panic.

The fix is in 2.6.27:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=532a6086e35fa3b5761e68af36d4e42a550eba15

--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -158,7 +158,7 @@ static inline s64 towards_target(struct virtio_balloon *vb)
        vb->vdev->config->get(vb->vdev,
                              offsetof(struct virtio_balloon_config, num_pages),
                              &v, sizeof(v));
-       return v - vb->num_pages;
+       return (s64)v - vb->num_pages;
 }
 
 static void update_balloon_size(struct virtio_balloon *vb)

-- Package-specific info:
** Version:
Linux version 2.6.26-2-686 (Debian 2.6.26-17lenny1) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Sun Jul 26 21:25:33 UTC 2009

** Command line:
root=/dev/sda1 ro 

** Not tainted

** Kernel log:
[    1.966527] Uniform Multi-Platform E-IDE driver
[    1.967217] ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
[    1.972836] PIIX3: IDE controller (0x8086:0x7010 rev 0x00) at  PCI slot 0000:00:01.1
[    1.974000] PIIX3: not 100% native mode: will probe irqs later
[    1.974753] PCI: Setting latency timer of device 0000:00:01.1 to 64
[    1.974773]     ide0: BM-DMA at 0xc000-0xc007
[    1.975395]     ide1: BM-DMA at 0xc008-0xc00f
[    1.976017] Probing IDE interface ide0...
[    2.032350] usbcore: registered new interface driver usbfs
[    2.033088] usbcore: registered new interface driver hub
[    2.033796] usbcore: registered new device driver usb
[    2.039419] USB Universal Host Controller Interface driver v3.0
[    2.168551] FDC 0 is a S82078B
[    2.544091] Probing IDE interface ide1...
[    2.944140] hdc: QEMU DVD-ROM, ATAPI CD/DVD-ROM drive
[    3.616090] hdc: host max PIO4 wanted PIO255(auto-tune) selected PIO0
[    3.616158] hdc: MWDMA2 mode selected
[    3.616939] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
[    3.617693] ide1 at 0x170-0x177,0x376 on irq 15
[    3.618766] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
[    3.619431] ACPI: PCI Interrupt 0000:00:01.2[D] -> Link [LNKD] -> GSI 11 (level, high) -> IRQ 11
[    3.620861] PCI: Setting latency timer of device 0000:00:01.2 to 64
[    3.620883] uhci_hcd 0000:00:01.2: UHCI Host Controller
[    3.621591] uhci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 1
[    3.622796] uhci_hcd 0000:00:01.2: irq 11, io base 0x0000c020
[    3.623568] usb usb1: configuration #1 chosen from 1 choice
[    3.624853] hub 1-0:1.0: USB hub found
[    3.625455] hub 1-0:1.0: 2 ports detected
[    3.728126] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
[    3.728904] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.730012] usb usb1: Product: UHCI Host Controller
[    3.730707] usb usb1: Manufacturer: Linux 2.6.26-2-686 uhci_hcd
[    3.731427] usb usb1: SerialNumber: 0000:00:01.2
[    3.733453] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10
[    3.734115] ACPI: PCI Interrupt 0000:00:03.0[A] -> Link [LNKC] -> GSI 10 (level, high) -> IRQ 10
[    3.735652] ACPI: PCI Interrupt 0000:00:04.0[A] -> Link [LNKD] -> GSI 11 (level, high) -> IRQ 11
[    3.738767] sym0: <895a> rev 0x0 at pci 0000:00:04.0 irq 11
[    3.741729] sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking
[    3.744014] sym0: SCSI BUS has been reset.
[    3.757845] scsi0 : sym-2.2.3
[    3.761867] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10
[    3.762510] ACPI: PCI Interrupt 0000:00:05.0[A] -> Link [LNKA] -> GSI 10 (level, high) -> IRQ 10
[    3.786416] hdc: ATAPI 4X CD-ROM drive, 512kB Cache
[    3.787504] Uniform CD-ROM driver Revision: 3.20
[    3.972083] usb 1-2: new full speed USB device using uhci_hcd and address 2
[    4.182422] usb 1-2: configuration #1 chosen from 1 choice
[    4.203834] usb 1-2: New USB device found, idVendor=0627, idProduct=0001
[    4.204610] usb 1-2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.205333] usb 1-2: Product: QEMU USB Tablet
[    4.205998] usb 1-2: Manufacturer: QEMU 0.10.50
[    4.206624] usb 1-2: SerialNumber: 1
[    4.225504] usbcore: registered new interface driver hiddev
[    4.247697] input: QEMU 0.10.50 QEMU USB Tablet as /class/input/input1
[    4.248649] input,hidraw0: USB HID v0.01 Pointer [QEMU 0.10.50 QEMU USB Tablet] on usb-0000:00:01.2-2
[    4.250202] usbcore: registered new interface driver usbhid
[    4.250867] usbhid: v2.6:USB HID core driver
[    6.744424] scsi 0:0:0:0: Direct-Access     QEMU     QEMU HARDDISK    0.10 PQ: 0 ANSI: 3
[    6.745532]  target0:0:0: tagged command queuing enabled, command queue depth 16.
[    6.746556]  target0:0:0: Beginning Domain Validation
[    6.747604]  target0:0:0: Domain Validation skipping write tests
[    6.748274]  target0:0:0: Ending Domain Validation
[    6.767327] Driver 'sd' needs updating - please use bus_type methods
[    6.768342] sd 0:0:0:0: [sda] 317872592 512-byte hardware sectors (162751 MB)
[    6.769139] sd 0:0:0:0: [sda] Write Protect is off
[    6.769767] sd 0:0:0:0: [sda] Mode Sense: 14 00 00 00
[    6.769887] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.771150] sd 0:0:0:0: [sda] 317872592 512-byte hardware sectors (162751 MB)
[    6.771941] sd 0:0:0:0: [sda] Write Protect is off
[    6.772565] sd 0:0:0:0: [sda] Mode Sense: 14 00 00 00
[    6.772684] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.773845]  sda: sda1 sda2
[    6.784886] sd 0:0:0:0: [sda] Attached SCSI disk
[    6.960058] EXT3-fs: INFO: recovery required on readonly filesystem.
[    6.964337] EXT3-fs: write access will be enabled during recovery.
[    8.364017] kjournald starting.  Commit interval 5 seconds
[    8.364017] EXT3-fs: sda1: orphan cleanup on readonly fs
[    8.380018] ext3_orphan_cleanup: deleting unreferenced inode 9994249
[    8.380018] EXT3-fs: sda1: 1 orphan inode deleted
[    8.380018] EXT3-fs: recovery complete.
[    8.380018] EXT3-fs: mounted filesystem with ordered data mode.
[    9.708016] udevd version 125 started
[   10.871686] input: Power Button (FF) as /class/input/input2
[   10.904455] ACPI: Power Button (FF) [PWRF]
[   11.208606] piix4_smbus 0000:00:01.3: Found 0000:00:01.3 device
[   11.354562] input: PC Speaker as /class/input/input3
[   11.537307] input: ImExPS/2 Generic Explorer Mouse as /class/input/input4
[   11.572986] parport_pc 00:05: reported by Plug and Play ACPI
[   11.573772] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
[   11.606713] Error: Driver 'pcspkr' is already registered, aborting...
[   13.360016] Adding 522104k swap on /dev/sda2.  Priority:-1 extents:1 across:522104k
[   13.688765] EXT3 FS on sda1, internal journal
[   14.528453] loop: module loaded
[   14.615197] device-mapper: uevent: version 1.0.3
[   14.615850] device-mapper: ioctl: 4.13.0-ioctl (2007-10-18) initialised: dm-devel@redhat.com
[   15.762981] ttyS1: LSR safety check engaged!
[   15.766365] ttyS1: LSR safety check engaged!
[   17.953412] NET: Registered protocol family 10
[   17.954858] lo: Disabled Privacy Extensions
[   28.312116] eth0: no IPv6 routers present
[   54.774019] warning: `ntpd' uses 32-bit capabilities (legacy support in use)

** Loaded modules:
Module                  Size  Used by
ipv6                  235364  40 
dm_snapshot            14340  0 
dm_mirror              15104  0 
dm_log                  8484  1 dm_mirror
dm_mod                 46184  3 dm_snapshot,dm_mirror,dm_log
loop                   12748  0 
virtio_balloon          3940  0 
parport_pc             22500  0 
parport                30988  1 parport_pc
virtio_net              6752  0 
serio_raw               4740  0 
snd_pcsp                8576  0 
psmouse                32336  0 
snd_pcm                62596  1 snd_pcsp
snd_timer              17800  1 snd_pcm
snd                    45604  3 snd_pcsp,snd_pcm,snd_timer
soundcore               6368  1 snd
snd_page_alloc          7816  1 snd_pcm
i2c_piix4               7216  0 
i2c_core               19828  1 i2c_piix4
button                  6096  0 
joydev                  8480  0 
evdev                   8000  0 
ext3                  105512  1 
jbd                    39444  1 ext3
mbcache                 7108  1 ext3
sd_mod                 22200  3 
usbhid                 35904  0 
hid                    33184  1 usbhid
ff_memless              4392  1 usbhid
ide_cd_mod             27652  0 
cdrom                  30176  1 ide_cd_mod
ide_pci_generic         3908  0 [permanent]
floppy                 47748  0 
sym53c8xx              62936  2 
scsi_transport_spi     19840  1 sym53c8xx
virtio_pci              5120  0 
uhci_hcd               18672  0 
usbcore               118224  3 usbhid,uhci_hcd
piix                    6568  0 [permanent]
ide_core               96136  3 ide_cd_mod,ide_pci_generic,piix
ata_generic             4676  0 
libata                140416  1 ata_generic
scsi_mod              129324  4 sd_mod,sym53c8xx,scsi_transport_spi,libata
dock                    8304  1 libata
thermal                15228  0 
processor              32544  1 thermal
fan                     4164  0 
thermal_sys            10856  3 thermal,processor,fan

** PCI devices:
00:00.0 Host bridge [0600]: Intel Corporation 440FX - 82441FX PMC [Natoma] [8086:1237] (rev 02)
	Subsystem: Qumranet, Inc. Device [1af4:1100]
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

00:01.0 ISA bridge [0601]: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] [8086:7000]
	Subsystem: Qumranet, Inc. Device [1af4:1100]
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0

00:01.1 IDE interface [0101]: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] [8086:7010] (prog-if 80 [Master])
	Subsystem: Qumranet, Inc. Device [1af4:1100]
	Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 64
	Region 0: [virtual] Memory at 000001f0 (32-bit, non-prefetchable) [disabled] [size=8]
	Region 1: [virtual] Memory at 000003f0 (type 3, non-prefetchable) [disabled] [size=1]
	Region 2: [virtual] Memory at 00000170 (32-bit, non-prefetchable) [disabled] [size=8]
	Region 3: [virtual] Memory at 00000370 (type 3, non-prefetchable) [disabled] [size=1]
	Region 4: I/O ports at c000 [size=16]
	Kernel driver in use: PIIX_IDE
	Kernel modules: piix

00:01.2 USB Controller [0c03]: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] [8086:7020] (rev 01) (prog-if 00 [UHCI])
	Subsystem: Qumranet, Inc. Device [1af4:1100]
	Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 64
	Interrupt: pin D routed to IRQ 11
	Region 4: I/O ports at c020 [size=32]
	Kernel driver in use: uhci_hcd
	Kernel modules: uhci-hcd

00:01.3 Bridge [0680]: Intel Corporation 82371AB/EB/MB PIIX4 ACPI [8086:7113] (rev 03)
	Subsystem: Qumranet, Inc. Device [1af4:1100]
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 9
	Kernel driver in use: piix4_smbus
	Kernel modules: i2c-piix4

00:02.0 VGA compatible controller [0300]: Cirrus Logic GD 5446 [1013:00b8] (prog-if 00 [VGA controller])
	Subsystem: Qumranet, Inc. Device [1af4:1100]
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Region 0: Memory at f0000000 (32-bit, prefetchable) [size=32M]
	Region 1: Memory at f2000000 (32-bit, non-prefetchable) [size=4K]
	Kernel modules: cirrusfb

00:03.0 Ethernet controller [0200]: Qumranet, Inc. Device [1af4:1000]
	Subsystem: Qumranet, Inc. Device [1af4:0001]
	Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 10
	Region 0: I/O ports at c040 [size=32]
	Kernel driver in use: virtio-pci
	Kernel modules: virtio_pci

00:04.0 SCSI storage controller [0100]: LSI Logic / Symbios Logic 53c895a [1000:0012]
	Subsystem: Qumranet, Inc. Device [1af4:1000]
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 255, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 11
	Region 0: I/O ports at c100 [size=256]
	Region 1: Memory at f2001000 (32-bit, non-prefetchable) [size=1K]
	Region 2: Memory at f2002000 (32-bit, non-prefetchable) [size=8K]
	Kernel driver in use: sym53c8xx
	Kernel modules: sym53c8xx

00:05.0 RAM memory [0500]: Qumranet, Inc. Device [1af4:1002]
	Subsystem: Qumranet, Inc. Device [1af4:0005]
	Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 10
	Region 0: I/O ports at c200 [size=32]
	Kernel driver in use: virtio-pci
	Kernel modules: virtio_pci



-- System Information:
Debian Release: 5.0.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages linux-image-2.6.26-2-686 depends on:
ii  debconf [debconf-2.0]         1.5.24     Debian configuration management sy
ii  initramfs-tools [linux-initra 0.92o      tools for generating an initramfs
ii  module-init-tools             3.4-1      tools for managing Linux kernel mo

Versions of packages linux-image-2.6.26-2-686 recommends:
ii  libc6-i686                    2.7-18     GNU C Library: Shared libraries [i

Versions of packages linux-image-2.6.26-2-686 suggests:
ii  grub                       0.97-47lenny2 GRand Unified Bootloader (Legacy v
pn  linux-doc-2.6.26           <none>        (no description available)

-- debconf information excluded



Reply to: