mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
ac9ee6b5e0
When I use newest libvirt to save a domain, libvirtd will be deadlock. Here is the output of gdb: (gdb) thread 3 [Switching to thread 3 (Thread 0x7f972a1fc710 (LWP 30265))]#0 0x000000351fe0e034 in __lll_lock_wait () from /lib64/libpthread.so.0 (gdb) bt at qemu/qemu_driver.c:2074 ret=0x7f972a1fbbe0) at remote.c:2273 (gdb) thread 7 [Switching to thread 7 (Thread 0x7f9730bcd710 (LWP 30261))]#0 0x000000351fe0e034 in __lll_lock_wait () from /lib64/libpthread.so.0 (gdb) bt (gdb) p *(virMutexPtr)0x6fdd60 $2 = {lock = {__data = {__lock = 2, __count = 0, __owner = 30261, __nusers = 1, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = "\002\000\000\000\000\000\000\000\065v\000\000\001", '\000' <repeats 26 times>, __align = 2}} (gdb) p *(virMutexPtr)0x1a63ac0 $3 = {lock = {__data = {__lock = 2, __count = 0, __owner = 30265, __nusers = 1, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = "\002\000\000\000\000\000\000\000\071v\000\000\001", '\000' <repeats 26 times>, __align = 2}} (gdb) info threads 7 Thread 0x7f9730bcd710 (LWP 30261) 0x000000351fe0e034 in __lll_lock_wait () from /lib64/libpthread.so.0 6 Thread 0x7f972bfff710 (LWP 30262) 0x000000351fe0b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 5 Thread 0x7f972b5fe710 (LWP 30263) 0x000000351fe0b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 4 Thread 0x7f972abfd710 (LWP 30264) 0x000000351fe0b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 * 3 Thread 0x7f972a1fc710 (LWP 30265) 0x000000351fe0e034 in __lll_lock_wait () from /lib64/libpthread.so.0 2 Thread 0x7f97297fb710 (LWP 30266) 0x000000351fe0b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 1 Thread 0x7f9737aac800 (LWP 30260) 0x000000351fe0803d in pthread_join () from /lib64/libpthread.so.0 The reason is that we will try to lock some object in callback function, and we may call event API with locking the same object. In the function virEventDispatchHandles(), we unlock eventLoop before calling callback function. I think we should do the same thing in the function virEventCleanupTimeouts() and virEventCleanupHandles(). Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Eric Blake <eblake@redhat.com> |
||
---|---|---|
.. | ||
authhelper.c | ||
authhelper.h | ||
bitmap.c | ||
bitmap.h | ||
bridge.c | ||
bridge.h | ||
buf.c | ||
buf.h | ||
cgroup.c | ||
cgroup.h | ||
command.c | ||
command.h | ||
conf.c | ||
conf.h | ||
dnsmasq.c | ||
dnsmasq.h | ||
ebtables.c | ||
ebtables.h | ||
event_poll.c | ||
event_poll.h | ||
event.c | ||
event.h | ||
files.c | ||
files.h | ||
hash.c | ||
hash.h | ||
hooks.c | ||
hooks.h | ||
hostusb.c | ||
hostusb.h | ||
interface.c | ||
interface.h | ||
iptables.c | ||
iptables.h | ||
json.c | ||
json.h | ||
logging.c | ||
logging.h | ||
macvtap.c | ||
macvtap.h | ||
memory.c | ||
memory.h | ||
network.c | ||
network.h | ||
pci.c | ||
pci.h | ||
processinfo.c | ||
processinfo.h | ||
qparams.c | ||
qparams.h | ||
sexpr.c | ||
sexpr.h | ||
stats_linux.c | ||
stats_linux.h | ||
storage_file.c | ||
storage_file.h | ||
sysinfo.c | ||
sysinfo.h | ||
threadpool.c | ||
threadpool.h | ||
threads-pthread.c | ||
threads-pthread.h | ||
threads-win32.c | ||
threads-win32.h | ||
threads.c | ||
threads.h | ||
util.c | ||
util.h | ||
uuid.c | ||
uuid.h | ||
virtaudit.c | ||
virtaudit.h | ||
virterror_internal.h | ||
virterror.c | ||
xml.c | ||
xml.h |