Libvirtd stuck starting up

Hi,

expecting my libvirtd to start normally as soon as i log in or atleast restarting it is reliable once it gets stuck.

after logging in i do my usual routine and it worked for most of the time, but about
2 weeks ago virt-manager started showing this message

QEMU/KVM - Connecting…

no luck with virsh too.

atm i am doing a combination of restarting the service, rebooting and logging out
and logging in again until it works.

  • i have enabled logs to a file and increasing log verbosity, and there seems to be no error message.
  • i stop the service, kill all related processes (dnsmasq too), restart it and it still would get stuck
  • i read about red hats libvirt common problems, but i cant seem to find any related issue.
  • the libvirt daemon is running and from the processes count and so forth it looks normal.

i first assumed the network starts after the daemon and this caused problems starting it up, but it wouldnt explain the inreproducibility of the problem.

i am running void

how could i further debug this? has any one have had similar expiriences?
any suggestions?

EDIT:
i added an strace here (from this “guide” :https://www.redhat.com/archives/libvirt-users/2017-February/msg00072.html)
https://termbin.com/csovx

EDIT2:
i added the timeout option (-t/–timeout) which should restart the service after given seconds if no activity is registered.

EDIT3:
i put dnsmasq and libvirt (separately and together) on disable for apparmor but
couldnt get anything to work, both acted just the same with enabled profiles.

also putting them in complain mode would not bear any fruit or logs. so i went on and started systrace back up which a collection is posted here shortly.
strangely when i used strace it started to work as expected and the daemon
would no longer hang. when i closed strace again and restarted the service (with all networks and vms running in the background) it was unable to connect successfulyl.

so it maybe apparmor afterall…

anyways i managed to strace an unsuccessful try here:

and another strace of a successfull try:

at this point i am eager to file a bug report and let the pros school me.

I take it you use systemd as init, correct? I’m not familiar with that (nor do I ever want to be, my systems will never run systemd willingly!) but you need to look at making init-files dependencies correctly (i.e. in the right order) cause I think therein lies the issue. Concurrent booting may sound great, but getting your dependencies right is an essential prerequisite for getting it right.

@Dutch_Master

i am running void. no systemd on my system.
i added a sleep to the service to force it to start as last and it started up after
the network (last entry on dmesg).

i dont know what else there could be which it depends on

EDIT:
i added the timeout option (-t/–timeout) which should restart the service after given seconds if no activity is registered.

sadly to no effect. so libvirt is aware of “an activity” atleast

update:

ok i opened an issue here:

TL;DR

please refer to the last post on the issue i couldn`t put it better

please post your expiriences if your using glibc, having the same issue and have the luck to stumble over this thread.