FS#47011 - signal caught during malloc causes deadlock

Attached to Project: Pacman
Opened by Jan Alexander Steffens (heftig) - Monday, 09 November 2015, 11:09 GMT
Last edited by Allan McRae (Allan) - Monday, 14 December 2015, 13:31 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Andrew Gregory (andrewgregory)
Architecture All
Severity Medium
Priority Normal
Reported Version 4.2.1
Due in Version 5.0.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

If the transaction is interrupted by a signal during a malloc, libalpm will deadlock, as malloc is not reentrant:

Thread 1 (Thread 0x7fb409dbb740 (LWP 20365)):
#0 0x00007fb40946366b in __lll_lock_wait_private () from /usr/lib/libc.so.6
#1 0x00007fb4093e947a in malloc () from /usr/lib/libc.so.6
#2 0x00007fb40939e9e0 in _nl_make_l10nflist () from /usr/lib/libc.so.6
#3 0x00007fb40939c8b7 in _nl_find_domain () from /usr/lib/libc.so.6
#4 0x00007fb40939c1b4 in __dcigettext () from /usr/lib/libc.so.6
#5 0x00007fb4099d6f08 in alpm_trans_interrupt () from /usr/lib/libalpm.so.9
#6 0x000000000040cad5 in ?? ()
#7 <signal handler called>
#8 0x00007fb409463669 in __lll_lock_wait_private () from /usr/lib/libc.so.6
#9 0x00007fb4093e947a in malloc () from /usr/lib/libc.so.6
#10 0x00007fb40939e9e0 in _nl_make_l10nflist () from /usr/lib/libc.so.6
#11 0x00007fb40939c8b7 in _nl_find_domain () from /usr/lib/libc.so.6
#12 0x00007fb40939c1b4 in __dcigettext () from /usr/lib/libc.so.6
#13 0x00007fb4099d7040 in alpm_trans_release () from /usr/lib/libalpm.so.9
#14 0x000000000040cb0e in ?? ()
#15 <signal handler called>
#16 0x00007fb409463669 in __lll_lock_wait_private () from /usr/lib/libc.so.6
#17 0x00007fb4093e947a in malloc () from /usr/lib/libc.so.6
#18 0x00007fb40939e9e0 in _nl_make_l10nflist () from /usr/lib/libc.so.6
#19 0x00007fb40939c8b7 in _nl_find_domain () from /usr/lib/libc.so.6
#20 0x00007fb40939c1b4 in __dcigettext () from /usr/lib/libc.so.6
#21 0x00007fb4099d6f08 in alpm_trans_interrupt () from /usr/lib/libalpm.so.9
#22 0x000000000040cad5 in ?? ()
#23 <signal handler called>
#24 0x00007fb4093e7824 in _int_malloc () from /usr/lib/libc.so.6
#25 0x00007fb4093e93d4 in malloc () from /usr/lib/libc.so.6
#26 0x00007fb4097538b3 in ?? () from /usr/lib/libarchive.so.13
#27 0x00007fb4097307ba in ?? () from /usr/lib/libarchive.so.13
#28 0x00007fb4097308fc in ?? () from /usr/lib/libarchive.so.13
#29 0x0000000000407d16 in ?? ()
#30 0x000000000040d3ae in ?? ()
#31 0x000000000040db9e in ?? ()
#32 0x00000000004063ef in ?? ()
#33 0x00007fb40938e610 in __libc_start_main () from /usr/lib/libc.so.6
#34 0x00000000004077d9 in ?? ()

This task depends upon

Closed by  Allan McRae (Allan)
Monday, 14 December 2015, 13:31 GMT
Reason for closing:  Fixed
Additional comments about closing:  git commit 7fb8a299

Loading...