# libvirtd 12:27:22.665: error : udevSetupSystemDev:1409 : Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' 12:27:22.665: error : virStateInitialize:890 : Initialization of (null) state driver failed Segmentation fault Please let me know if further information is needed. # emerge --info Portage 2.1.7.16 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r6 x86_64) ================================================================= System uname: Linux-2.6.31-gentoo-r6-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E6750_@_2.66GHz-with-gentoo-1.12.13 Timestamp of tree: Fri, 29 Jan 2010 01:45:01 +0000 app-shells/bash: 4.0_p35 dev-java/java-config: 2.1.9-r2 dev-lang/python: 2.6.4 dev-util/cmake: 2.6.4-r3 sys-apps/baselayout: 1.12.13 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo http://ftp.snt.ipv6.utwente.nl/pub/os/linux/gentoo http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo" LDFLAGS="-Wl,-O1" LINGUAS="en_GB" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.au.gentoo.org/gentoo-portage" USE="X accessibility acpi additions alsa amd64 avi branding bzip2 caps cdr chm cracklib crypt curl cxx dbus dri dvd dvdr ffmpeg firefox flac font-server ftp gif gtk gtk2 gzip handbook idn iproute2 ipv6 jabber java java6 jpeg kde kdehiddenvisibility kdexdeltas ldap lzo mad mmx mng mozbranding mp3 mp4 mpeg multilib musepack ncurses nls nptl nptlonly nsplugin ogg opengl pam pcap pcre pdf perl png posix ps python qt qt3support qt4 rdesktop rdp readline samba sdl smp sockets socks5 sql sqlite sse sse2 ssl startup-notification svg syslog tcl theora threads threadsafe tiff tk truetype truetype-fonts type1-fonts unicode usb userlocales video vim-syntax vnc vorbis wav webkit wireshark xcb xine xinerama xml xml2 xorg zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" QEMU_SOFTMMU_TARGETS="i386 ppc ppc64 x86_64" QEMU_USER_TARGETS="i386 ppc ppc64 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa fbdev nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY Reproducible: Always
# strace libvirtd ... socket(PF_NETLINK, SOCK_DGRAM, 15) = 10 fcntl(10, F_GETFD) = 0 fcntl(10, F_SETFD, FD_CLOEXEC) = 0 bind(10, {sa_family=AF_NETLINK, pid=0, groups=00000002}, 12) = 0 getsockname(10, {sa_family=AF_NETLINK, pid=6732, groups=00000002}, [12]) = 0 setsockopt(10, SOL_SOCKET, SO_PASSCRED, [1], 4) = 0 write(4, "\0", 1) = 1 futex(0x6921a0, FUTEX_WAKE_PRIVATE, 1) = 1 readlink("/sys/devices/virtual/dmi/id", 0x7fff2306eec0, 1024) = -1 ENOENT (No such file or directory) stat("/sys/devices/virtual/dmi/id/uevent", 0x7fff2306ff20) = -1 ENOENT (No such file or directory) open("/etc/localtime", O_RDONLY) = 11 fstat(11, {st_mode=S_IFREG|0644, st_size=118, ...}) = 0 fstat(11, {st_mode=S_IFREG|0644, st_size=118, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe872d08000 read(11, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0"..., 4096) = 118 lseek(11, -62, SEEK_CUR) = 56 read(11, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0"..., 4096) = 62 close(11) = 0 munmap(0x7fe872d08000, 4096) = 0 write(2, "12:30:56.156: error : udevSetupS"..., 11712:30:56.156: error : udevSetupSystemDev:1409 : Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' ) = 117 close(10) = 0 write(2, "12:30:56.158: error : virStateIn"..., 9212:30:56.158: error : virStateInitialize:890 : Initialization of (null) state driver failed ) = 92 open("/etc/libvirt/secrets", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 10 brk(0x241e000) = 0x241e000 getdents(10, /* 2 entries */, 32768) = 48 getdents(10, /* 0 entries */, 32768) = 0 brk(0x2416000) = 0x2416000 close(10) = 0 write(4, "\0", 1) = 1 futex(0x6921a0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...> +++ killed by SIGSEGV +++ Segmentation fault
I've seen bug #301217. Rebuilding libvirt with USE=-udev fixes the problem. And no, rebuilding udev does not help. If libvirt is built with USE=udev, it segfaults at startup, even if I previously rebuild udev.
libvirtd-0.7.6 is somewhat better in that using USE=udev doen't segfaults, but still it doesn't start. # libvirtd 09:59:19.162: error : udevSetupSystemDev:1477 : Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' or '/sys/class/dmi/id' 09:59:19.162: error : virStateInitialize:890 : Initialization of udev state driver failed 09:59:19.162: warning : qemudStartup:1099 : Unable to create cgroup for driver: No such device or address 09:59:19.187: error : main:3154 : Driver state initialization failed 09:59:19.187: warning : qemudDispatchSignalEvent:385 : Shutting down on signal 3 # strace libvirtd ... fstat(11, {st_mode=S_IFREG|0600, st_size=1242, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4273931000 read(11, "<domain type='kvm'>\n <name>CMED"..., 16384) = 1242 read(11, "", 12288) = 0 lseek(11, 0, SEEK_CUR) = 1242 lseek(11, 0, SEEK_SET) = 0 read(11, "<domain type='kvm'>\n <name>CMED"..., 4096) = 1242 read(11, "", 4096) = 0 read(11, "", 4096) = 0 close(11) = 0 munmap(0x7f4273931000, 4096) = 0 getdents(10, /* 0 entries */, 32768) = 0 close(10) = 0 getuid() = 0 geteuid() = 0 open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 10 lseek(10, 0, SEEK_CUR) = 0 fstat(10, {st_mode=S_IFREG|0644, st_size=1443, ...}) = 0 mmap(NULL, 1443, PROT_READ, MAP_SHARED, 10, 0) = 0x7f4273931000 lseek(10, 1443, SEEK_SET) = 1443 munmap(0x7f4273931000, 1443) = 0 close(10) = 0 uname({sys="Linux", node="rowlf", ...}) = 0 inotify_init() = 10 stat("/root/.uml", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0 inotify_add_watch(10, "/root/.uml", IN_MODIFY|IN_CREATE|IN_DELETE) = 1 write(4, "\0", 1) = 1 futex(0x69e580, FUTEX_WAKE_PRIVATE, 1) = 1 open("/etc/libvirt/uml", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) getuid() = 0 write(2, "09:59:30.223: error : main:3154 "..., 69) = 69 kill(4122, SIGQUIT) = 0 --- SIGQUIT (Quit) @ 0 (0) --- write(6, "\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32\20\0\0\0\0\0\0\"\v\222\0\0\0\0\0"..., 128) = 128 rt_sigreturn(0) = 0 futex(0x907ed0, FUTEX_WAKE_PRIVATE, 1) = 1 munmap(0x7f426d261000, 8392704) = 0 close(5) = 0 close(6) = 0 close(8) = 0 close(7) = 0 close(9) = 0 close(10) = 0 unlink("/var/run/libvirtd.pid") = 0 exit_group(1) = ? Another problem I see with 0.7.6 is that now PXE boot is broken. When trying to PXE boot with any driver, the message I get is: LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin HOME=/ QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -S -M pc-0.12 -cpu qemu32 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name XP2 -uuid b6bb9ab7-25f7-c6cb-ebc6-eaca098c0cfd -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/XP2.monitor,server,nowait -mon chardev=monitor,mode=readline -localtime -boot n -drive file=/home/shrdlu/virthd/XP2.img,if=none,id=drive-ide0-0-0,format=qcow2 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -device rtl8139,vlan=0,id=net0,mac=52:54:00:3e:41:23,bus=pci.0,addr=0x4 -net tap,fd=28,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -k en-gb -vga cirrus -device ES1370,id=sound0,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 char device redirected to /dev/pts/5 Warning: vlan 0 with no nics Cannot boot from non-existent NIC while with 0.7.5 I get: LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.4 HOME=/root USER=root QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -S -M pc-0.12 -cpu qemu32 -enable-kvm -m 1024 -smp 1 -name XP2 -uuid b6bb9ab7-25f7-c6cb-ebc6-eaca098c0cfd -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/XP2.monitor,server,nowait -monitor chardev:monitor -localtime -boot n -drive file=/home/shrdlu/virthd/XP2.img,if=ide,index=0,format=qcow2 -net nic,macaddr=52:54:00:3e:41:23,vlan=0,name=nic.0 -net tap,fd=15,vlan=0,name=tap.0 -chardev pty,id=serial0 -serial chardev:serial0 -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:0 -k en-gb -vga cirrus -soundhw es1370 char device redirected to /dev/pts/5 Option 'ipv4': Use 'on' or 'off' Failed to parse "yes" for "dummy.ipv4" but the VM at least starts.
Can you follow the backtrace guide and provide a backtrace of libvirtd segfaulting, the guide is available here: http://www.gentoo.org/proj/en/qa/backtraces.xml
Also, what does the following command output: $ udevadm info -q property --path /sys/devices/virtual/dmi/id
(In reply to comment #5) > Also, what does the following command output: > > $ udevadm info -q property --path /sys/devices/virtual/dmi/id # udevadm info -q property --path /sys/devices/virtual/dmi/id device path not found For the backtrace, sorry but I won't be able to rebuild it with debugging enabled until the end of next week. Will provide the backtrace then. Thank you.
Created attachment 220601 [details] backtrace for libvirtd segfaulting
# emerge --info | grep FLAGS= CFLAGS="-march=native -O1 -pipe -ggdb" CXXFLAGS="-march=native -O1 -pipe -ggdb" LDFLAGS="-Wl,-O1" With the above flags, I rebuilt udev, glibc and libvirt (libvirt with USE=udev too, as that's what causes the problem) # gdb `which libvirtd` warning: Can not parse XML syscalls information; XML support was disabled at compile time. GNU gdb (Gentoo 7.0 p2) 7.0 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/sbin/libvirtd...Reading symbols from /usr/lib64/debug/usr/sbin/libvirtd.debug...done. (no debugging symbols found)...done. (gdb) run Starting program: /usr/sbin/libvirtd [Thread debugging using libthread_db enabled] [New Thread 0x7ffff3133910 (LWP 22082)] [New Thread 0x7ffff2932910 (LWP 22083)] [New Thread 0x7ffff2131910 (LWP 22085)] [New Thread 0x7ffff1930910 (LWP 22089)] [New Thread 0x7ffff112f910 (LWP 22090)] [New Thread 0x7ffff092e910 (LWP 22094)] 16:03:52.429: error : udevSetupSystemDev:1409 : Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' 16:03:52.429: error : virStateInitialize:890 : Initialization of (null) state driver failed 16:03:52.429: warning : qemudStartup:1067 : Unable to create cgroup for driver: No such device or address Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff3133910 (LWP 22082)] 0x000000000046d98b in udevEventHandleCallback (watch=3, fd=12, events=4, data=0x0) at node_device/node_device_udev.c:1345 1345 node_device/node_device_udev.c: No such file or directory. in node_device/node_device_udev.c (gdb) set logging file backtrace.log (gdb) set logging on Copying output to backtrace.log. (gdb) thread apply all bt full [see the attacchment http://bugs.gentoo.org/attachment.cgi?id=220601] Let me know if you need further information, thanks.
Ok. Just to give you some feedback. There was a definite bug in the parser in 0.7.5, which is now fixed in 0.7.6 (mostly, I'm still seeing some issues). However, 0.7.6 considers missing dmi data as fatal. The fix is currently banging its way around the ML and once upstream commits it to their git master, I'll pull the patch in and that should fix the issue.
Thanks!
*** Bug 316063 has been marked as a duplicate of this bug. ***
This is fixed for sure in the 0.8.1 versions in the tree.
So this means that it will now be possible to build with USE=udev, is my understanding correct?
(In reply to comment #13) > So this means that it will now be possible to build with USE=udev, is my > understanding correct? > Yep. You should be set now.