Bug 1031978 - qemu-kvm core dump when boot guest with undefined object
qemu-kvm core dump when boot guest with undefined object
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Hai Huang
Virtualization Bugs
Depends On:
  Show dependency treegraph
Reported: 2013-11-19 04:59 EST by Xu Han
Modified: 2013-12-17 08:40 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-17 08:40:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Xu Han 2013-11-19 04:59:53 EST
Description of problem:
qemu-kvm core dump while boot guest with undefined object.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. boot guest with 
# /usr/libexec/qemu-kvm -object a,id=a

Actual results:
ERROR:qom/object.c:409:object_new_with_type: assertion failed: (type != NULL)
Aborted (core dumped)
(gdb) bt
#0  0x00007ffff30db999 in raise () from /lib64/libc.so.6
#1  0x00007ffff30dd0a8 in abort () from /lib64/libc.so.6
#2  0x00007ffff750dbc6 in g_assertion_message () from /lib64/libglib-2.0.so.0
#3  0x00007ffff750dc24 in g_assertion_message_expr ()
   from /lib64/libglib-2.0.so.0
#4  0x0000555555737809 in object_new_with_type (type=0x0) at qom/object.c:409
#5  0x0000555555737855 in object_new (
    typename=typename@entry=0x555556501c60 "a") at qom/object.c:423
#6  0x0000555555769b9b in object_create (opts=0x555556501b90, 
    opaque=<optimized out>) at vl.c:2780
#7  0x000055555589892b in qemu_opts_foreach (list=<optimized out>, 
    func=func@entry=0x555555769b50 <object_create>, opaque=opaque@entry=0x0, 
    abort_on_failure=abort_on_failure@entry=0) at util/qemu-option.c:1140
#8  0x00005555555ff293 in main (argc=3, argv=0x7fffffffe478, 
    envp=<optimized out>) at vl.c:3815

Expected results:
should give an error message, not core dump.

Additional info:
Comment 3 Xu Han 2013-12-16 22:15:39 EST
Re-tested via libvirt.

If define guest likes below, then libvirt will deny it as expect.
# cat object.xml
    <rng model='virtio'>
      <backend model='a'>/dev/random</backend>

virsh # define object.xml 
error: Failed to define domain from object.xml
error: XML error: unknown RNG backend model 'a'

But I'm not sure if libvirt have a command that could use '-object' directly.

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