This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

run-elf_cntl_gelf_getshdr.sh: Resource deadlock avoided.


Hi,

When running the test suite with --enable-thread-safety I get the
following error in the FDREAD case:
test-elf_cntl_gelf_getshdr: elf_readall.c:73: __libelf_readall: Unexpected error: Resource deadlock avoided.
Aborted

(READ and MMAP work without problems.)

Program received signal SIGABRT, Aborted.
0x00007ffff784b1e5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff784b1e5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff784e398 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff7844272 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff7844382 in __assert_perror_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007ffff7bcb072 in __libelf_readall (elf=elf(a)entry=0x603010) at elf_readall.c:73
#5  0x00007ffff7bcb156 in elf_cntl (elf=elf(a)entry=0x603010, cmd=cmd(a)entry=ELF_C_FDREAD) at elf_cntl.c:61
#6  0x0000000000400ba8 in main (argc=<optimized out>, argv=0x7fffffffea88) at test-elf_cntl_gelf_getshdr.c:84
(gdb) frame 4
#4  0x00007ffff7bcb072 in __libelf_readall (elf=elf(a)entry=0x603010) at elf_readall.c:73
73        rwlock_wrlock (elf->lock);

elf_cntl() also already did a rwlock_wrlock (elf->lock); at elf_cntl.c:55

The only other caller of __libelf_readall() seems to be elf_rawfile()
which takes a lock just after the __libelf_readall() call.


Kurt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]