bugmake - Bugs: bug #50557, Deadlock in signal handler


bug #50557: Deadlock in signal handler

Submitted by:  Aleksei Fedotov <aleksei>
Submitted on:  Thu Mar 16 10:37:55 2017  
Severity: 3 - NormalItem Group: Bug
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 4.2.1Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Thu Mar 16 10:37:55 2017, original submission:


I've stumbled upon a peculiar issue, which made make to deadlock. I've
managed to reproduce it only couple of times. Make was building a
project when I send SIGINT to it. However, Make didn't exited and didn't
report any issues.

backtrace showed:

#0 __lll_lock_wait_private () at
#1 0x00007f11a03b267a in __GI___libc_malloc (bytes=139713682811680,
bytes@entry=50) at malloc.c:2909
#2 0x00007f11a0361825 in _nl_make_l10nflist
(l10nfile_list=l10nfile_list@entry=0x7f11a06f3b98 <_nl_loaded_domains>,
dirlist=dirlist@entry=0x7f11a04c1bb0 <_nl_default_dirname> "/usr/share/locale",
dirlist_len=18, mask=mask@entry=0, language=language@entry=0x7ffe49c9b930
"en_US.UTF-8", territory=territory@entry=0x0, codeset=0x0,
normalized_codeset=0x0, modifier=0x0,
filename=0x7ffe49c9b950 "LC_MESSAGES/make.mo", do_allocate=0) at
#3 0x00007f11a035f6b7 in _nl_find_domain (dirname=dirname@entry=0x7f11a04c1bb0
<_nl_default_dirname> "/usr/share/locale", locale=locale@entry=0x7ffe49c9b930
domainname=domainname@entry=0x7ffe49c9b950 "LC_MESSAGES/make.mo",
domainbinding=domainbinding@entry=0xc61fe0) at finddomain.c:91
#4 0x00007f11a035ef1c in __dcigettext (domainname=0xc62010 "make",
msgid1=0x42640c "*** Deleting file '%s'", msgid2=0x0, plural=0, n=0, category=5)
at dcigettext.c:722
#5 0x0000000000408e03 in ?? ()
#6 0x0000000000408e44 in ?? ()
#7 0x0000000000409c06 in fatal_error_signal ()
#8 <signal handler called>
#9 _int_malloc (av=av@entry=0x7f11a06f2b20 <main_arena>,
bytes=bytes@entry=1009) at malloc.c:3765
#10 0x00007f11a03b1850 in _int_realloc (av=av@entry=0x7f11a06f2b20 <main_arena>,
oldp=oldp@entry=0x2088fe0, oldsize=oldsize@entry=208, nb=nb@entry=1024) at
#11 0x00007f11a03b2c89 in __GI___libc_realloc (oldmem=0x2088ff0, bytes=1003) at
#12 0x000000000041818b in xrealloc ()
#13 0x000000000040afde in variable_buffer_output ()
#14 0x000000000040b62a in variable_expand_string ()
#15 0x000000000040b0af in expand_argument ()
#16 0x00000000004110ae in handle_function ()
#17 0x000000000040b283 in variable_expand_string ()
#18 0x000000000040bc2b in variable_expand_for_file ()
#19 0x000000000040bc93 in allocated_variable_expand_for_file ()
#20 0x000000000041593c in new_job ()
#21 0x0000000000420d9f in ?? ()
#22 0x000000000041f73e in ?? ()
#23 0x000000000041fee8 in ?? ()
#24 0x000000000041f73e in ?? ()
#25 0x000000000041fee8 in ?? ()
#26 0x00000000004210af in update_goal_chain ()
#27 0x0000000000407781 in main ()

Apparently, It seems that fatal_error_signal uses not signal safe functions, it attempted to print message about removing intermediate target from signal handler, and gettext implicitly allocated memory, which caused it to deadlock with the main thread.

Aleksei Fedotov <aleksei>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by aleksei (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    No Changes Have Been Made to This Item

    Back to the top

    Powered by Savane 3.1-cleanup1