Bug 768473 - import libvirt prints "WARNING: no socket to connect to"
import libvirt prints "WARNING: no socket to connect to"
Status: CLOSED DUPLICATE of bug 782725
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
16
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Eric Blake
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-16 13:30 EST by Brian Lane
Modified: 2012-01-18 21:19 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-01-18 21:19:47 EST
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 Brian Lane 2011-12-16 13:30:19 EST
When using the python library for libvirt it prints a warning when you import libvirt. I tracked it down to the libvirtmod binary module.

Importing a module should not print anything.
Comment 1 Dave Allan 2011-12-16 14:59:25 EST
You didn't mention what version of libvirt you're using, but I see no warning when I import libvirt using a fully updated F16.  Can you retry this with a fully updated F16 and if it reproduces, provide the warning message, the version of the libvirt and python packages and a trivial example script (maybe that's as simple as 'import libvirt').
Comment 2 Brian Lane 2011-12-16 15:14:59 EST
whoops, sorry about that. Ends up I had libvirt-python installed, but didn't have virtualization setup on the machine.
Comment 3 Eric Blake 2012-01-18 17:03:18 EST
Re-opening - I reproduced it.  The culprit is that the libvirt testsuite invokes virsh with a super-restricted environment (_just_ LANG=C and nothing else, not even PATH), and gnutls_global_init() doesn't like that.

(gdb) bt
#0  write () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007ffff3784f63 in _IO_new_file_write (f=0x7ffff3abe160, 
    data=0x7fffffffae30, n=33) at fileops.c:1289
#2  0x00007ffff3784e2a in new_do_write (fp=0x7ffff3abe160, 
    data=0x7fffffffae30 "WARNING: no socket to connect to\n\003", to_do=33)
    at fileops.c:543
#3  0x00007ffff37858de in _IO_new_file_xsputn (n=33, data=<optimized out>, 
    f=0x7ffff3abe160) at fileops.c:1383
#4  _IO_new_file_xsputn (f=0x7ffff3abe160, data=<optimized out>, n=33)
    at fileops.c:1305
#5  0x00007ffff375a236 in buffered_vfprintf (s=0x7ffff3abe160, 
    format=<optimized out>, args=<optimized out>) at vfprintf.c:2228
#6  0x00007ffff375563e in _IO_vfprintf_internal (s=0x7ffff3abe160, 
    format=0x7fffee636f6f "%s\n", ap=0x7fffffffd5a8) at vfprintf.c:1256
#7  0x00007ffff381296b in ___fprintf_chk (fp=0x7ffff3abe160, flag=1, 
    format=<optimized out>) at fprintf_chk.c:37
#8  0x00007fffee634e32 in ?? () from /usr/lib64/pkcs11/gnome-keyring-pkcs11.so
#9  0x00007fffee634f06 in ?? () from /usr/lib64/pkcs11/gnome-keyring-pkcs11.so
#10 0x00007fffee62dd71 in ?? () from /usr/lib64/pkcs11/gnome-keyring-pkcs11.so
#11 0x00007fffee62e22e in ?? () from /usr/lib64/pkcs11/gnome-keyring-pkcs11.so
#12 0x00007ffff23a9b97 in initialize_module_unlocked_reentrant (mod=0x663b90)
    at modules.c:522
#13 initialize_module_unlocked_reentrant (mod=0x663b90) at modules.c:503
#14 0x00007ffff23aa085 in _p11_kit_initialize_registered_unlocked_reentrant ()
    at modules.c:693
#15 0x00007ffff23aa74d in p11_kit_initialize_registered () at modules.c:736
#16 0x00007ffff6113495 in initialize_automatic_p11_kit () at pkcs11.c:442
#17 gnutls_pkcs11_init (flags=<optimized out>, deprecated_config_file=0x0)
    at pkcs11.c:557
#18 0x00007ffff60fd032 in gnutls_global_init () at gnutls_global.c:252
#19 0x00007ffff79ce9a8 in virNetTLSInit () at rpc/virnettlscontext.c:1432
#20 0x00007ffff7952e24 in virInitialize () at libvirt.c:412
#21 0x0000000000435de1 in main (argc=4, argv=0x7fffffffe018) at virsh.c:18663
Comment 4 Eric Blake 2012-01-18 21:19:47 EST

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

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