Bug 1124740 - create connection via virt-manager will crash the remote libvirtd
Summary: create connection via virt-manager will crash the remote libvirtd
Status: CLOSED DUPLICATE of bug 1115039
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-30 08:19 UTC by yanbing du
Modified: 2014-07-30 08:43 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-07-30 08:43:11 UTC

Attachments (Terms of Use)
libvirtd-crash.log (64.12 KB, text/plain)
2014-07-30 08:25 UTC, yanbing du
no flags Details

Description yanbing du 2014-07-30 08:19:50 UTC
Description of problem:

On a Fedora20 host, when create a connection to connect libvirtd on a RHEL6.6 server via virt-manager, which will crash the server libvirtd. 

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

How reproducible:

Steps to Reproduce:
1. Create connection(rhel6.6 host) via virt-manager on a FC20 host. 

Actual results:
virt-manager raise:

Error polling connection 'qemu+ssh://root@': internal error: client socket is closed

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 343, in _handle_tick_queue
  File "/usr/share/virt-manager/virtManager/connection.py", line 1209, in tick
    raise e  # pylint: disable=raising-bad-type
libvirtError: internal error: client socket is closed
And check the libvirtd status on remote server:
# service libvirtd status
libvirtd dead but pid file exists 

Expected results:
Connect successfully, and libvirtd on the server will not crash. 

Additional info:

Comment 3 yanbing du 2014-07-30 08:25:55 UTC
Created attachment 922456 [details]

Comment 4 Ján Tomko 2014-07-30 08:36:59 UTC
Relevant backtrace from the core dump:
Thread 1 (Thread 0x7f192a742700 (LWP 32281)):
#0  0x0000003a9d281461 in __strlen_sse2 () from /lib64/libc.so.6
#1  0x0000003a9d281176 in strdup () from /lib64/libc.so.6
#2  0x0000003768ea9eee in virDomainObjGetMetadata (vm=0x7f191c152d30, type=1, uri=0x0, caps=<value optimized out>, flags=0)
    at conf/domain_conf.c:16610
#3  0x000000000044f7f4 in qemuDomainGetMetadata (dom=0x7f18f406a5d0, type=1, uri=0x0, flags=0) at qemu/qemu_driver.c:14894
#4  0x0000003768f0155b in virDomainGetMetadata (domain=0x7f18f406a5d0, type=1, uri=0x0, flags=0) at libvirt.c:9623
#5  0x0000000000429e8c in remoteDispatchDomainGetMetadata (server=<value optimized out>, client=<value optimized out>, 
    msg=<value optimized out>, rerr=0x7f192a741b80, args=0x7f18f40154a0, ret=0x7f18f4015480) at remote_dispatch.h:2218
#6  remoteDispatchDomainGetMetadataHelper (server=<value optimized out>, client=<value optimized out>, msg=<value optimized out>, 
    rerr=0x7f192a741b80, args=0x7f18f40154a0, ret=0x7f18f4015480) at remote_dispatch.h:2191
#7  0x0000003768f44252 in virNetServerProgramDispatchCall (prog=0x1261480, server=0x1258a30, client=0x125c940, msg=0x125c540)
    at rpc/virnetserverprogram.c:431
#8  virNetServerProgramDispatch (prog=0x1261480, server=0x1258a30, client=0x125c940, msg=0x125c540) at rpc/virnetserverprogram.c:304
#9  0x0000003768f44eee in virNetServerProcessMsg (srv=<value optimized out>, client=0x125c940, prog=<value optimized out>, 
    msg=0x125c540) at rpc/virnetserver.c:170
#10 0x0000003768f4558c in virNetServerHandleJob (jobOpaque=<value optimized out>, opaque=0x1258a30) at rpc/virnetserver.c:191
#11 0x0000003768e64b0c in virThreadPoolWorker (opaque=<value optimized out>) at util/threadpool.c:144
#12 0x0000003768e643f9 in virThreadHelper (data=<value optimized out>) at util/threads-pthread.c:161
#13 0x0000003a9d6079d1 in start_thread () from /lib64/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#14 0x0000003a9d2e8ccd in ?? () from /lib64/libc.so.6
#15 0x0000000000000000 in ?? ()

Comment 5 Peter Krempa 2014-07-30 08:43:11 UTC
This was already fixed as a part of the original backport but the build wasn't done yet.

commit 7705900c436f9f8391ed9517db5c54feca375789
Author: Peter Krempa <pkrempa@redhat.com>
Date:   Thu Jul 17 14:50:39 2014 +0200

    conf: Fix backport of metadata API code
    RHEL-only, problems introduced in backport
    The clang checker found a few issues introduced by the backports of the
    metadata code. As the code is already in dist-git this patch fixes up
    the problems pointed out by Clang:
    1) few possible strdup()'s of NULL argument
    2) false positive as Clang considered the def local variable in
    virDomainObjGetMetadata as uninitialized
    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>

*** This bug has been marked as a duplicate of bug 1115039 ***

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