Bug 518091 - libvirt virEnumFromString crashes on F11 with Xen 3.4.x when starting virt-viewer
libvirt virEnumFromString crashes on F11 with Xen 3.4.x when starting virt-vi...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Veillard
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F11VirtTarget
  Show dependency treegraph
 
Reported: 2009-08-18 16:47 EDT by Pasi Karkkainen
Modified: 2009-09-04 00:10 EDT (History)
7 users (show)

See Also:
Fixed In Version: 0.6.2-17.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-04 00:10:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Pasi Karkkainen 2009-08-18 16:47:56 EDT
Description of problem:
virt-viewer segfaults and doesn't start on F11 with Xen 3.4.x.

Version-Release number of selected component (if applicable):
Fedora 11, Xen 3.4.1-1 (custom rebuild on F11), libvirt-0.6.2-14.fc11.i586, virt-viewer-0.0.3-6.fc11.i586

How reproducible:
Always.

Steps to Reproduce:
1. Upgrade Xen on F11 from the default 3.3.1 to 3.4.x
2. Start PV domU
3. Run "virt-viewer <domain>"
  
Actual results:
virt-viewer segfaults/crashes.

Expected results:
virt-viewer starts and opens up the VNC console window.

Additional info:
virt-viewer works when used with the default Xen 3.3.1 on F11.

Looking at the backtrace is this patch related?:
http://www.mail-archive.com/libvir-list@redhat.com/msg14082.html


(gdb) run test2vm
Starting program: /usr/bin/virt-viewer test2vm
[Thread debugging using libthread_db enabled]
[New Thread 0xb7c64b70 (LWP 2802)]

Program received signal SIGSEGV, Segmentation fault.
strcmp () at ../sysdeps/i386/i686/strcmp.S:40
40      ../sysdeps/i386/i686/strcmp.S: No such file or directory.
        in ../sysdeps/i386/i686/strcmp.S
Current language:  auto; currently asm
(gdb) bt
#0  strcmp () at ../sysdeps/i386/i686/strcmp.S:40
#1  0xb7f237d2 in virEnumFromString (types=0xb7fb7074, ntypes=2, type=0x0) at util.c:1481
#2  0xb7f3ce4f in virDomainGraphicsTypeFromString (type=0x0) at domain_conf.c:150
#3  0xb7f77490 in xenDaemonParseSxprGraphicsNew (conn=<value optimized out>, def=<value optimized out>,
    root=0x8089278) at xend_internal.c:2085
#4  0xb7f79c44 in xenDaemonParseSxpr (conn=<value optimized out>, root=<value optimized out>,
    xendConfigVersion=4, cpus=0x0) at xend_internal.c:2452
#5  0xb7f7d079 in xenDaemonDomainFetch (conn=0x8079ca0, domid=1, name=0x808b190 "test2vm", cpus=0x0)
    at xend_internal.c:3372
#6  0xb7f7d180 in xenDaemonDomainDumpXML (domain=0x808b168, flags=0, cpus=0x0) at xend_internal.c:3416
#7  0xb7f74394 in xenUnifiedDomainDumpXML (dom=0x808b168, flags=0) at xen_unified.c:1034
#8  0xb7f357cf in virDomainGetXMLDesc (domain=0x808b168, flags=0) at libvirt.c:2621
#9  0x0804c116 in viewer_extract_vnc_graphics (port=<value optimized out>, dom=<value optimized out>)
    at main.c:709
#10 viewer_start (port=<value optimized out>, dom=<value optimized out>) at main.c:906
#11 0x0804ca07 in main (argc=2, argv=0xbffff1d4) at main.c:1037
(gdb) 


# xm list --long test2vm
(domain
    (domid 1)
    (bootloader /usr/bin/pygrub)
    (on_crash restart)
    (uuid a36f6e38-f498-b06c-5fad-b04947392dbe)
    (bootloader_args )
    (vcpus 1)
    (name test2vm)
    (cpus (()))
    (on_reboot restart)
    (on_poweroff destroy)
    (maxmem 512)
    (memory 512)
    (shadow_memory 0)
    (features )
    (on_xend_start ignore)
    (on_xend_stop ignore)
    (start_time 1250626179.35)
    (cpu_time 21.397345341)
    (online_vcpus 1)
    (image
        (linux
            (kernel )
            (device_model /usr/lib/xen/bin/qemu-dm)
            (notes 
                (FEATURES
                    'writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'
                )  
                (VIRT_BASE 3221225472)
                (GUEST_VERSION 2.6)
                (PADDR_OFFSET 3221225472)
                (GUEST_OS linux)
                (HYPERCALL_PAGE 3225423872)
                (LOADER generic)
                (PAE_MODE yes)
                (ENTRY 3225419776)
                (XEN_VERSION xen-3.0)
            )
        )
    )
    (status 2)
    (state -b----) 
    (store_mfn 262434)
    (console_mfn 262433)
    (device
        (vif
            (bridge virbr0)
            (mac 00:16:36:68:9f:5d)
            (script /etc/xen/scripts/vif-bridge)
            (uuid 6435a5d4-9b8e-1e82-6863-5a6b57a4438d)
            (backend 0)
        )
    )
    (device (vkbd (backend 0)))
    (device
        (console   
            (protocol vt100)
            (location 2)
            (uuid 2e2c3247-5de1-7bd7-250a-41ab80030e72)
        )
    )
    (device
        (vbd
            (protocol x86_32-abi)
            (uuid 8f888aa8-a1c2-0c2b-0c70-4c3b96abe8c8)
            (bootable 1)
            (dev xvda:disk)
            (uname phy:/dev/vg_dom0test/test2vm)
            (mode w)
            (backend 0)
            (bootable 1)
            (VDI ) 
        )
    )
    (device
        (vfb
            (vncunused 1)
            (vnc 1)
            (uuid 5f61a036-660c-cdf3-8d20-16164b996e40)
            (location 127.0.0.1:5900)
        )
    )
)


# xenstore-ls
tool = ""
 xenstored = ""
vm = ""
 00000000-0000-0000-0000-000000000000 = ""
  on_xend_stop = "ignore"
  shadow_memory = "0"
  uuid = "00000000-0000-0000-0000-000000000000"
  on_reboot = "restart"
  image = "(linux (kernel ))"
   ostype = "linux"
   kernel = ""
   cmdline = ""
   ramdisk = ""
  on_poweroff = "destroy"
  bootloader_args = ""
  on_xend_start = "ignore"
  on_crash = "restart"
  xend = ""
   restart_count = "0"
  vcpus = "2"
  vcpu_avail = "3"
  bootloader = ""
  name = "Domain-0"
 a36f6e38-f498-b06c-5fad-b04947392dbe = ""
  image = "(linux (kernel ) (device_model /usr/lib/xen/bin/qemu-dm) (notes (\..."
   ostype = "linux"
   kernel = "/var/run/xend/boot/boot_kernel.XQr1os"
   cmdline = "ro root=/dev/VolGroup00/LogVol00 "
   ramdisk = "/var/run/xend/boot/boot_ramdisk.ARVYry"
  device = ""
   vkbd = ""
    0 = ""
     frontend = "/local/domain/1/device/vkbd/0"
     frontend-id = "1"
     backend-id = "0"
     backend = "/local/domain/0/backend/vkbd/1/0"
   vfb = ""
    0 = ""
     frontend = "/local/domain/1/device/vfb/0"
     frontend-id = "1"
     backend-id = "0"
     backend = "/local/domain/0/backend/vfb/1/0"
   vbd = ""
    51712 = ""
     frontend = "/local/domain/1/device/vbd/51712"
     frontend-id = "1"
     backend-id = "0"
     backend = "/local/domain/0/backend/vbd/1/51712"
   vif = ""
    0 = ""
     frontend = "/local/domain/1/device/vif/0"
     frontend-id = "1"
     backend-id = "0"
     backend = "/local/domain/0/backend/vif/1/0"
   console = ""
    0 = ""
     frontend = "/local/domain/1/device/console/0"
     frontend-id = "1"
     backend-id = "0"
     backend = "/local/domain/0/backend/console/1/0"
  on_xend_stop = "ignore"
  shadow_memory = "0"
  uuid = "a36f6e38-f498-b06c-5fad-b04947392dbe"
  on_reboot = "restart"
  start_time = "1250626179.35"
  on_poweroff = "destroy"
  bootloader_args = ""
  on_xend_start = "ignore"
  on_crash = "restart"
  xend = ""
   restart_count = "0"
  vcpus = "1"
  vcpu_avail = "1"
  bootloader = "/usr/bin/pygrub"
  name = "test2vm"
local = ""
 domain = ""
  0 = ""
   vm = "/vm/00000000-0000-0000-0000-000000000000"
   device = ""
   control = ""
    platform-feature-multiprocessor-suspend = "1"
   error = ""
   memory = ""
    target = "1044736"
   guest = ""
   hvmpv = ""
   cpu = ""
    1 = ""
     availability = "online"
    0 = ""
     availability = "online"
   name = "Domain-0"
   console = ""
    limit = "1048576"
    type = "xenconsoled"
   domid = "0"
   backend = ""
    vkbd = ""
     1 = ""
      0 = ""
       frontend-id = "1"
       domain = "test2vm"
       frontend = "/local/domain/1/device/vkbd/0"
       state = "4"
       online = "1"
       feature-abs-pointer = "1"
       hotplug-status = "connected"
    vfb = ""
     1 = ""
      0 = ""
       vncunused = "1"
       domain = "test2vm"
       vnc = "1"
       uuid = "5f61a036-660c-cdf3-8d20-16164b996e40"
       frontend = "/local/domain/1/device/vfb/0"
       state = "4"
       online = "1"
       frontend-id = "1"
       feature-resize = "1"
       hotplug-status = "connected"
       location = "127.0.0.1:5900"
       request-update = "1"
    vbd = ""
     1 = ""
      51712 = ""
       domain = "test2vm"
       frontend = "/local/domain/1/device/vbd/51712"
       uuid = "8f888aa8-a1c2-0c2b-0c70-4c3b96abe8c8"
       bootable = "1"
       dev = "xvda"
       state = "4"
       params = "/dev/vg_dom0test/test2vm"
       mode = "w"
       online = "1"
       frontend-id = "1"
       type = "phy"
       physical-device = "fd:3"
       hotplug-status = "connected"
       feature-barrier = "1"
       sectors = "20971520"
       info = "0"
       sector-size = "512"
    vif = ""
     1 = ""
      0 = ""
       bridge = "virbr0"
       domain = "test2vm"
       handle = "0"
       uuid = "6435a5d4-9b8e-1e82-6863-5a6b57a4438d"
       script = "/etc/xen/scripts/vif-bridge"
       state = "4"
       frontend = "/local/domain/1/device/vif/0"
       mac = "00:16:36:68:9f:5d"
       online = "1"
       frontend-id = "1"
       feature-sg = "1"
       feature-gso-tcpv4 = "1"
       feature-rx-copy = "1"
       feature-rx-flip = "0"
       hotplug-status = "connected"
    console = ""
     1 = ""
      0 = ""
       domain = "test2vm"
       protocol = "vt100"
       uuid = "2e2c3247-5de1-7bd7-250a-41ab80030e72"
       frontend = "/local/domain/1/device/console/0"
       state = "4"
       location = "2"
       online = "1"
       frontend-id = "1"
       hotplug-status = "connected"
   device-model = ""
    1 = ""
     state = "running"
  1 = ""
   vm = "/vm/a36f6e38-f498-b06c-5fad-b04947392dbe"
   device = ""
    vkbd = ""
     0 = ""
      protocol = "x86_32-abi"
      state = "4"
      backend-id = "0"
      backend = "/local/domain/0/backend/vkbd/1/0"
      page-ref = "263571"
      event-channel = "7"
      request-abs-pointer = "1"
    vfb = ""
     0 = ""
      protocol = "x86_32-abi"
      state = "4"
      backend-id = "0"
      backend = "/local/domain/0/backend/vfb/1/0"
      page-ref = "263578"
      event-channel = "6"
      feature-update = "1"
    vbd = ""
     51712 = ""
      virtual-device = "51712"
      protocol = "x86_32-abi"
      device-type = "disk"
      backend-id = "0"
      state = "4"
      backend = "/local/domain/0/backend/vbd/1/51712"
      ring-ref = "8"
      event-channel = "8"
    vif = ""
     0 = ""
      mac = "00:16:36:68:9f:5d"
      handle = "0"
      protocol = "x86_32-abi"
      backend-id = "0"
      state = "4"
      backend = "/local/domain/0/backend/vif/1/0"
      tx-ring-ref = "23"
      rx-ring-ref = "60"
      event-channel = "9"
      request-rx-copy = "1"
      feature-rx-notify = "1"
      feature-sg = "1"
      feature-gso-tcpv4 = "1"
    console = ""
     0 = ""
      protocol = "x86_32-abi"
      state = "1"
      backend-id = "0"
      backend = "/local/domain/0/backend/console/1/0"
   control = ""
    platform-feature-multiprocessor-suspend = "1"
   error = ""
   memory = ""
    target = "524288"
   guest = ""
   hvmpv = ""
   console = ""
    tty = "/dev/pts/2"
    ring-ref = "262433"
    port = "2"
    limit = "1048576"
    type = "ioemu"
    vnc-port = "5900"
   device-misc = ""
    vif = ""
     nextDeviceID = "1"
    console = ""
     nextDeviceID = "1"
   image = ""
    device-model-fifo = "/var/run/xend/dm-1-1250626179.fifo"
    device-model-pid = "2568"
    entry = "3225419776"
    loader = "generic"
    guest-os = "linux"
    features = ""
     writable-descriptor-tables = "1"
     supervisor-mode-kernel = "1"
     pae-pgdir-above-4gb = "1"
     writable-page-tables = "1"
     auto-translated-physmap = "1"
    hypercall-page = "3225423872"
    guest-version = "2.6"
    pae-mode = "yes"
    paddr-offset = "3221225472"
    virt-base = "3221225472"
    xen-version = "xen-3.0"
   store = ""
    ring-ref = "262434"
    port = "1"
   cpu = ""
    0 = ""
     availability = "online"
   name = "test2vm"
   domid = "1"
   serial = ""
    0 = ""
     tty = "/dev/pts/2"
Comment 1 Daniel Berrange 2009-08-18 17:12:38 EDT
Turns out we fixed this upstream in this commit

http://libvirt.org/git/?p=libvirt.git;a=commit;h=14435163a086c0bcdff04308077fa46a5fa08bb0

will include this patch in the next F11 update.
Comment 2 Pasi Karkkainen 2009-08-18 17:35:37 EDT
I just tried that upstream libvirt patch, and yes, it fixes the problem.

Thanks a lot!
Comment 3 Mark McLoughlin 2009-08-19 03:49:07 EDT
Fix is in rawhide too, just need F11 fix
Comment 4 Mark McLoughlin 2009-08-19 13:23:01 EDT
Just requested this be pushed to updates-testing:

https://admin.fedoraproject.org/updates/libvirt-0.6.2-17.fc11

* Wed Aug 19 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.2-17
- Fix migration completion with newer versions of qemu (#516187)
- Fix dumpxml segfault with newer versions of Xen (#518091)
Comment 5 Fedora Update System 2009-08-20 16:58:27 EDT
libvirt-0.6.2-17.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libvirt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8790
Comment 6 Fedora Update System 2009-09-04 00:09:28 EDT
libvirt-0.6.2-17.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.