[Bug 359447] Re: kvm segfaults
I'm running jaunty with everything up-to-date. I was experiencing segfaults similar to those described in this ticket when disk I/O was high. For example, when dd'ing a raw image file to an LVM volume, when the image was about 60G, caused several kvm processes to crash. I was able to reproduce these crashes in an interesting way: I gave a FreeBSD VM an AoE volume, with the following command line: /usr/bin/kvm -S -M pc -m 256 -smp 1 -name freebsd-test -uuid fa4f4230-ff42-012b-cef0-00163ec95f4c -monitor pty -boot c -drive file=/dev/mapper/vol1-freebsd--test,if=ide,index=0,boot=on -drive file=/dev/etherd/e0.1,if=ide,index=1 -net none -serial pty -parallel none -usb Slightly prior to booting this VM, I would turn off the AoE volume where it was exported from. When FreeBSD would try to mount it, the kvm process would crash within about 30 seconds. After installing the following ppa: 1:84+dfsg-0ubuntu12.1~rc2ppa3 I have not been able to reproduce the problem. Instead of the kvm process crashing, FreeBSD just reports a crap load of DMA errors: [r...@beta ~]# fsck /dev/ad1s1a ** /dev/ad1s1a ** Last Mounted on /backup ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 5939 files, 145406 used, 108409 free (2713 frags, 13212 blocks, 1.1% fragmentation) ad1: FAILURE - WRITE_DMA status=41 error=4 LBA=191 CANNOT WRITE BLK: 128 CONTINUE? [yn] y ad1: FAILURE - WRITE_DMA status=41 error=4 LBA=191 ad1: FAILURE - WRITE_DMA status=41 error=4 LBA=192 ad1: FAILURE - WRITE_DMA status=41 error=4 LBA=193 ad1: FAILURE - WRITE_DMA status=41 error=4 LBA=194 ad1: FAILURE - WRITE_DMA status=41 error=4 LBA=195 ad1: FAILURE - WRITE_DMA status=41 error=4 LBA=196 ad1: FAILURE - WRITE_DMA status=41 error=4 LBA=197 Since I pulled the rug from under it (probably equivalent to unplugging a real hard drive if this was a physical machine), I would expect these kinda of DMA errors. So, all in all, +1 on this PPA. -- kvm segfaults https://bugs.launchpad.net/bugs/359447 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 359447] Re: kvm segfaults
exe, OK. Nevertheless, the 1:84+dfsg-0ubuntu12.1~rc2ppa3 package has been more stable for me on jaunty than 1:84+dfsg-0ubuntu11. -- kvm segfaults https://bugs.launchpad.net/bugs/359447 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 359447] Re: kvm segfaults
Dustin, rc2 in the PPA (1:84+dfsg-0ubuntu12.1~rc2ppa3) appears to have already fixed the segfault. No segfaults in 3 days and I've applied some high disk I/O to the machine. I can't test rc4 right away b/c rc2 is on a production machine. Once I can declare another maintenance window and reboot the machine, I'll try rc4. However, it seems the only difference between rc2 and rc4 are packaging related items, which I was able to walk through myself. -- kvm segfaults https://bugs.launchpad.net/bugs/359447 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 359447] Re: kvm segfaults
No problem! Thanks for cherry-picking those fixes and providing us a more stable kvm package. -- kvm segfaults https://bugs.launchpad.net/bugs/359447 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 359447] Re: kvm segfaults
I'm setting up a new jaunty box within the next few days. I will install the jaunty-proposed version of kvm and report the results. -- kvm segfaults https://bugs.launchpad.net/bugs/359447 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 359447] Re: kvm segfaults
I enabled jaunty-proposed on a new jaunty box and upgraded kvm: $ sudo apt-get install kvm Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: ubuntu-vm-builder hal vde2 samba kvm-source kvm-pxe The following packages will be upgraded: kvm 1 upgraded, 0 newly installed, 0 to remove and 8 not upgraded. Need to get 0B/1143kB of archives. After this operation, 4096B disk space will be freed. (Reading database ... 23790 files and directories currently installed.) Preparing to replace kvm 1:84+dfsg-0ubuntu11 (using .../kvm_1%3a84+dfsg-0ubuntu12.3_amd64.deb) ... Unpacking replacement kvm ... Processing triggers for man-db ... Setting up kvm (1:84+dfsg-0ubuntu12.3) ... * Loading kvm module kvm_intel ...done. $ The install, as you can see, went without a hitch. Will report how the VMs handle when I have more data. -- kvm segfaults https://bugs.launchpad.net/bugs/359447 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 359447] Re: kvm segfaults
Update: No crashes on jaunty-proposed, although I have not stressed the box much yet. No crashes on RC2 (1:84+dfsg-0ubuntu12.1~rc2ppa3) in 11 days (since upgrade to RC2), and I *have* stressed the box. -- kvm segfaults https://bugs.launchpad.net/bugs/359447 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 518346] Re: Emulated serial port does not work with FreeBSD 8.0 guest
Do you think it would have a good chance of being accepted as an SRU? I know those are not taken lightly. -- Emulated serial port does not work with FreeBSD 8.0 guest https://bugs.launchpad.net/bugs/518346 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 518346] [NEW] Emulated serial port does not work with FreeBSD 8.0 guest
Public bug reported: Binary package hint: kvm I'm running a handful of Jaunty systems and this bug appears in kvm 1:84 +dfsg-0ubuntu12.4 Host: $ lsb_release -rd Description:Ubuntu 9.04 Release:9.04 $ Description of bug: If you start a FreeBSD 8.0 guest with "-serial telnet:127.0.0.1:,server,nowait", and then try to connect to the guest's serial port with telnet, there will be no output to the telnet side. The FreeBSD 8.0 guest is running a getty process on /dev/ttyu0. This is specific to FreeBSD 8.0. FreeBSD 7.1 and 7.2 guests did not exhibit this problem. FreeBSD 8.0 uses a new uart(4) driver (/dev/ttyu0). Prior versions used sio(4) (/dev/ttyd0). Proposed fix: There is an upstream QEMU patch that fixes this. I've rolled this patch into my PPA for kvm (among other changes): https://launchpad.net/~gdolley/+archive/ppa/+packages A debdiff for just this specific issue that fixes the problem is: diff -u kvm-84+dfsg/debian/changelog kvm-84+dfsg/debian/changelog --- kvm-84+dfsg/debian/changelog +++ kvm-84+dfsg/debian/changelog @@ -1,3 +1,11 @@ +kvm (1:84+dfsg-0ubuntu12.5~ppa1) jaunty; urgency=low + + * debian/patches/qemu-serial-lost-tx-irqs-affecting-freebsd-new-uart-driver.patch: +cherry-pick from upstream +- Fixes qemu serial vs. FreeBSD 8.0 uart(4) not working properly + + -- Garry Dolley Wed, 09 Dec 2009 03:53:31 -0800 + kvm (1:84+dfsg-0ubuntu12.4) jaunty-proposed; urgency=low * debian/patches/Fix-cluster-freeing-in-qcow2.patch: cherry-pick diff -u kvm-84+dfsg/debian/control kvm-84+dfsg/debian/control diff -u kvm-84+dfsg/debian/patches/series kvm-84+dfsg/debian/patches/series --- kvm-84+dfsg/debian/patches/series +++ kvm-84+dfsg/debian/patches/series @@ -17,0 +18 @@ +qemu-serial-lost-tx-irqs-affecting-freebsd-new-uart-driver.patch only in patch2: unchanged: --- kvm-84+dfsg.orig/debian/patches/qemu-serial-lost-tx-irqs-affecting-freebsd-new-uart-driver.patch +++ kvm-84+dfsg/debian/patches/qemu-serial-lost-tx-irqs-affecting-freebsd-new-uart-driver.patch @@ -0,0 +1,37 @@ +commit 2d6ee8e7e17227d5eb8c6e9a054dd88d5b37c5ae +Author: Juergen Lock +Date: Sat Sep 12 18:52:22 2009 +0200 + +qemu serial: lost tx irqs (affecting FreeBSD's new uart(4) driver) + +Well one problem seems to be the rx condition, +... if ((s->ier & UART_IER_RDI) && (s->lsr & UART_LSR_DR)) +is not enough to trigger an irq, yet still causes the following +conditions not to be checked anymore at all. + +Signed-off-by: Juergen Lock +Acked-by: Jan Kiszka +Acked-by: Stefano Stabellini +Signed-off-by: Aurelien Jarno + +diff --git a/qemu/hw/serial.c b/qemu/hw/serial.c +index 1f4ce77..a22770f 100644 +--- a/qemu/hw/serial.c b/qemu/hw/serial.c +@@ -197,12 +197,10 @@ static void serial_update_irq(SerialState *s) + * this is not in the specification but is observed on existing + * hardware. */ + tmp_iir = UART_IIR_CTI; +-} else if ((s->ier & UART_IER_RDI) && (s->lsr & UART_LSR_DR)) { +-if (!(s->fcr & UART_FCR_FE)) { +- tmp_iir = UART_IIR_RDI; +-} else if (s->recv_fifo.count >= s->recv_fifo.itl) { +- tmp_iir = UART_IIR_RDI; +-} ++} else if ((s->ier & UART_IER_RDI) && (s->lsr & UART_LSR_DR) && ++ (!(s->fcr & UART_FCR_FE) || ++s->recv_fifo.count >= s->recv_fifo.itl)) { ++tmp_iir = UART_IIR_RDI; + } else if ((s->ier & UART_IER_THRI) && s->thr_ipending) { + tmp_iir = UART_IIR_THRI; + } else if ((s->ier & UART_IER_MSI) && (s->msr & UART_MSR_ANY_DELTA)) { My modified kvm package with the above patch runs about 80 production virtual machines of the following flavors: FreeBSD 7.1, 7.2, and 8.0; OpenBSD 4.5 and 4.6; Ubuntu 9.04; Debian 5.02; ArchLinux; and Gentoo. None of these have had any serial port problems after the above patch was applied. Might be worth applying to Karmic or Lucid kvm packages if the QEMU upstream in those kvm packages do not already include it. ** Affects: kvm (Ubuntu) Importance: Undecided Status: New -- Emulated serial port does not work with FreeBSD 8.0 guest https://bugs.launchpad.net/bugs/518346 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs