Bug 533681

Summary: `libvirtd --daemon' segv's in __strcmp_sse2 () from /lib64/libc.so.
Product: [Fedora] Fedora Reporter: Tore H. Larsen <torel>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 12CC: berrange, clalance, crobinso, itamar, jforbes, markmc, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-19 08:31:54 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Tore H. Larsen 2009-11-08 08:04:00 EST
Description of problem:

Core was generated by `libvirtd --daemon'.

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

# rpm -qf /usr/sbin/libvirtd 
libvirt-0.7.1-15.fc12.x86_64

and previous 2 revisions

How reproducible:

Every time. 

# service libvirtd restart
Stopping libvirtd daemon:                                  [FAILED]
Starting libvirtd daemon:                                  [  OK  ]

Nov  8 07:03:01 bgo-fedora12 kernel: libvirtd[24700]: segfault at 0 ip 00007fb357d152a6 sp 00007fb353cd7aa8 error 4 in libc-2.11.so[7fb357c98000+16f000]
Nov  8 07:03:01 bgo-fedora12 abrtd: Directory 'ccpp-1257660181-24686' creation detected
Nov  8 07:03:01 bgo-fedora12 abrtd: Lock file '/var/cache/abrt/ccpp-1257660181-24686.lock' is locked by process 24727
Nov  8 07:03:01 bgo-fedora12 abrt: saved core dump of pid 24686 to /var/cache/abrt/ccpp-1257660181-24686/coredump
Nov  8 07:03:01 bgo-fedora12 abrtd: Getting local universal unique identification...
Nov  8 07:03:01 bgo-fedora12 abrtd: Crash is in database already
Nov  8 07:03:01 bgo-fedora12 abrtd: Already saved crash, deleting...
^C


Steps to Reproduce:
1. service libvirtd restart
2.
3.
  
Actual results:

Coredumps
# find /var/cache/abrt/ -name coredump -exec file {} \;
/var/cache/abrt/ccpp-1257655299-27094/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1257659729-21983/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1257655325-27429/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1257655328-27487/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1257655351-27727/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1256989567-10470/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1257655322-27335/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1257655345-27644/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1257659012-17647/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1257655319-27234/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1257660181-24686/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1256822995-7304/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1257655331-27551/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1257655274-26809/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1256989547-10331/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1256989148-7832/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'
/var/cache/abrt/ccpp-1256738852-15469/coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'libvirtd --daemon'


Expected results:

daemon running

Additional info:

Core was generated by `libvirtd --daemon'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f513753a2a6 in __strcmp_sse2 () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install libvirt-0.7.1-15.fc12.x86_64
(gdb) thread apply all backtraces

Thread 6 (Thread 17647):
Undefined command: "backtraces".  Try "help".
(gdb) thread apply all backtrace

Thread 6 (Thread 17647):
#0  0x00007f5137591aa3 in poll () from /lib64/libc.so.6
#1  0x0000000000410ab5 in virDomainVideoTypeToString ()
#2  0x0000000000412d19 in virDomainVideoTypeToString ()
#3  0x0000000000412fd4 in virDomainVideoTypeToString ()
#4  0x0000000000416489 in virDomainVideoTypeToString ()
#5  0x00007f51374dbb1d in __libc_start_main () from /lib64/libc.so.6
#6  0x000000000040fb39 in virDomainVideoTypeToString ()
#7  0x00007fff2dd5e648 in ?? ()
#8  0x000000000000001c in ?? ()
#9  0x0000000000000002 in ?? ()
#10 0x00007fff2dd5ef4f in ?? ()
#11 0x00007fff2dd5ef58 in ?? ()
#12 0x0000000000000000 in ?? ()

Thread 5 (Thread 17676):
#0  0x00007f513784004c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5138b60e59 in virCondWait () from /usr/lib64/libvirt.so.0
#2  0x0000000000413835 in virDomainVideoTypeToString ()
#3  0x00007f513783ba3a in start_thread () from /lib64/libpthread.so.0
#4  0x00007f513759af3d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 4 (Thread 17677):
#0  0x00007f513784004c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5138b60e59 in virCondWait () from /usr/lib64/libvirt.so.0
#2  0x0000000000413835 in virDomainVideoTypeToString ()
#3  0x00007f513783ba3a in start_thread () from /lib64/libpthread.so.0
#4  0x00007f513759af3d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 3 (Thread 17678):
#0  0x00007f513784004c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5138b60e59 in virCondWait () from /usr/lib64/libvirt.so.0
#2  0x0000000000413835 in virDomainVideoTypeToString ()
#3  0x00007f513783ba3a in start_thread () from /lib64/libpthread.so.0
#4  0x00007f513759af3d in clone () from /lib64/libc.so.6
---Type <return> to continue, or q <return> to quit---
#5  0x0000000000000000 in ?? ()

Thread 2 (Thread 17679):
#0  0x00007f513784004c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5138b60e59 in virCondWait () from /usr/lib64/libvirt.so.0
#2  0x0000000000413835 in virDomainVideoTypeToString ()
#3  0x00007f513783ba3a in start_thread () from /lib64/libpthread.so.0
#4  0x00007f513759af3d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 17680):
#0  0x00007f513753a2a6 in __strcmp_sse2 () from /lib64/libc.so.6
#1  0x000000000043111f in virDomainVideoTypeToString ()
#2  0x00007f5138b775fb in ?? () from /usr/lib64/libvirt.so.0
#3  0x000000000041e435 in virDomainVideoTypeToString ()
#4  0x000000000041f889 in virDomainVideoTypeToString ()
#5  0x000000000041fb6f in virDomainVideoTypeToString ()
#6  0x00000000004138cc in virDomainVideoTypeToString ()
#7  0x00007f513783ba3a in start_thread () from /lib64/libpthread.so.0
#8  0x00007f513759af3d in clone () from /lib64/libc.so.6
#9  0x0000000000000000 in ?? ()
(gdb)
Comment 1 Tore H. Larsen 2009-11-08 08:06:44 EST
HW is a bit old, Dual P4 Xeon with ht enabled. Still, it supports sse2.

flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl cid cx16 xtpr

It ran fine until first update of libvirtd after Fedora 12 alpha release.
Comment 2 Mark McLoughlin 2009-11-19 07:29:27 EST
Thanks for the report

This is strange - there's no strcmp() in virDomainVideoTypeToString()

Is it still reproducible?

Can you install libvirt-debuginfo and see if you can get a better stack trace?
Comment 3 Tore H. Larsen 2009-11-19 08:20:53 EST
No, fixed as off 0.7.1-15.fc12.x86_64.
Comment 4 Mark McLoughlin 2009-11-19 08:31:54 EST
Thanks for confirming, closing