Hi
I originally posted this here:
http://www.linuxquestions.org/questi...gs-4175591815/
But this might be a better forum to ask on.
Slackware64-current, libvirt-2.2.0, Linux kernel 4.7.4 and 4.4.22 tested.
I have been using libvirt with virt-manager for a while, and yesterday after turning on my PC virt-manager wasn't able to connect to libvirt anymore. I tried "virsh connect" but that also just freezes. No packages have been installed or upgraded on my system and no changes made to any configuration.
It seems as if libvirtd is getting stuck when reading from its socket.
After some playing around I found that if I remove libvirt_driver_network and libvirt_driver_nwfilter from /usr/lib64/libvirt/connection-driver then libvirtd will start up and I can communicate with it with virsh and virt-manager - but it is lacking functionality.
If I put libvirt_driver_network back into /usr/lib64/libvirt/connection-driver but leave nwfilter out of there then libvirtd will start up and be usable the SECOND time I run it after a system restart. The first time running it, it will still get stuck on the socket so I have to kill it.
If I put nwfilter back at all then it will always get stuck no matter how many times I kill and restart it.
This is the output I get when running libvirtd -v with nwfilter driver enabled.
Code:
...
2016-10-21 10:45:31.400+0000: 6873: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x7fc8040ffd10
2016-10-21 10:45:31.400+0000: 6873: info : virObjectUnref:261 : OBJECT_DISPOSE: obj=0x7fc8040ffd10
2016-10-21 10:45:31.400+0000: 6873: info : virObjectNew:202 : OBJECT_NEW: obj=0x7fc8040fba50 classname=virNodeDeviceEventLifecycle
2016-10-21 10:45:31.400+0000: 6873: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x7fc8040fba50
2016-10-21 10:45:31.400+0000: 6873: info : virObjectUnref:261 : OBJECT_DISPOSE: obj=0x7fc8040fba50
2016-10-21 10:45:31.411+0000: 6873: info : virObjectNew:202 : OBJECT_NEW: obj=0x7fc8040f6740 classname=virNodeDeviceEventLifecycle
2016-10-21 10:45:31.411+0000: 6873: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x7fc8040f674
0
2016-10-21 10:45:31.411+0000: 6873: info : virObjectUnref:261 : OBJECT_DISPOSE: obj=0x7fc8040f6740
2016-10-21 10:45:31.417+0000: 6873: info : virObjectNew:202 : OBJECT_NEW: obj=0x7fc8040f6740 classname=virNodeDeviceEventLifecycle
2016-10-21 10:45:31.417+0000: 6873: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x7fc8040f6740
2016-10-21 10:45:31.417+0000: 6873: info : virObjectUnref:261 : OBJECT_DISPOSE: obj=0x7fc8040f6740
2016-10-21 10:45:31.419+0000: 6873: info : virObjectNew:202 : OBJECT_NEW: obj=0x7fc8040282f0 classname=virSecretObjList
2016-10-21 10:45:31.425+0000: 6873: info : virFirewallCheckUpdateLock:127 : using locking for /usr/sbin/iptables
2016-10-21 10:45:31.430+0000: 6873: info : virFirewallCheckUpdateLock:127 : using locking for /usr/sbin/ip6tables
.... This is where it stops so <CTRL-C> ....
2016-10-21 10:45:33.700+0000: 6857: info : virEventPollRunOnce:640 : EVENT_POLL_RUN: nhandles=5 timeout=-1
2016-10-21 10:45:33.700+0000: 6857: info : virEventPollDispatchHandles:506 : EVENT_POLL_DISPATCH_HANDLE: watch=2 events=1
2016-10-21 10:45:33.700+0000: 6857: info : virNetlinkEventServiceStopAll:715 : stopping all netlink event services
2016-10-21 10:45:33.701+0000: 6857: info : virEventPollRemoveHandle:186 : EVENT_POLL_REMOVE_HANDLE: watch=6
2016-10-21 10:45:33.701+0000: 6857: info : virEventPollRemoveHandle:186 : EVENT_POLL_REMOVE_HANDLE: watch=7
2016-10-21 10:45:33.701+0000: 6857: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x55adac2c2670
2016-10-21 10:45:33.701+0000: 6857: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x55adac2c27f0
2016-10-21 10:45:33.701+0000: 6857: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x55adac2c2900
2016-10-21 10:45:33.701+0000: 6857: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x55adac2c3250
2016-10-21 10:45:33.701+0000: 6857: info : virEventPollRemoveHandle:186 : EVENT_POLL_REMOVE_HANDLE: watch=5
2016-10-21 10:45:33.701+0000: 6873: info : virFirewallCheckUpdateLock:125 : locking not supported by /usr/sbin/ebtables
2016-10-21 10:45:33.701+0000: 6857: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x55adac2c5340
2016-10-21 10:45:33.701+0000: 6857: info : virEventPollRemoveHandle:186 : EVENT_POLL_REMOVE_HANDLE: watch=3
2016-10-21 10:45:33.701+0000: 6873: info : virFirewallApplyGroup:895 : Starting transaction for firewall=0x7fc8040fd170 group=0x7fc8040ef010 flags=0
2016-10-21 10:45:33.701+0000: 6873: info : virFirewallApplyRule:838 : Applying rule '/usr/sbin/iptables -w --version'
2016-10-21 10:45:33.701+0000: 6857: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x55adac2c2980
2016-10-21 10:45:33.701+0000: 6857: info : virEventPollRemoveHandle:186 : EVENT_POLL_REMOVE_HANDLE: watch=4
2016-10-21 10:45:33.702+0000: 6857: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x55adac2c3c50
2016-10-21 10:45:33.702+0000: 6857: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x55adac2bab50
2016-10-21 10:45:33.702+0000: 6857: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x55adac2b9290
2016-10-21 10:45:33.702+0000: 6857: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x55adac2c2a40
Without nwfilter it would continue past the virFirewallCheckUpdateLock lines and start loading my virtual machine configurations.
If I try running it with gdb and doing a backtrace when it is stuck I get
Code:
(gdb) bt
#0 0x00007ffff267fcdd in poll () from /lib64/libc.so.6
#1 0x00007ffff72ae3c4 in virEventPollRunOnce () from /usr/lib64/../lib64/libvirt.so.0
#2 0x00007ffff72ad0c1 in virEventRunDefaultImpl () from /usr/lib64/../lib64/libvirt.so.0
#3 0x00007ffff73fc1cd in virNetDaemonRun () from /usr/lib64/../lib64/libvirt.so.0
#4 0x000055555556db90 in main ()