Bug 1031978 - qemu-kvm core dump when boot guest with undefined object
Summary: qemu-kvm core dump when boot guest with undefined object
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Hai Huang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-19 09:59 UTC by Xu Han
Modified: 2013-12-17 13:40 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-17 13:40:55 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Xu Han 2013-11-19 09:59:53 UTC
Description of problem:
qemu-kvm core dump while boot guest with undefined object.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-1.5.3-19.el7.x86_64

How reproducible:
always

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-17 03:15:39 UTC
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>
    </rng>
...

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.