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

 
 

bug #50557: Deadlock in signal handler

Submitter:  Aleksei Fedotov <aleksei>
Submitted:  Thu 16 Mar 2017 10:37:55 AM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  4.2.1 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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

Hello,

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:

<pre>
#0  __lll_lock_wait_private () at
../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
#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
../intl/l10nflist.c:166
#3  0x00007f11a035f6b7 in _nl_find_domain (dirname=dirname@entry=0x7f11a04c1bb0
<_nl_default_dirname> "/usr/share/locale", locale=locale@entry=0x7ffe49c9b930
"en_US.UTF-8",
    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
malloc.c:4302
#11 0x00007f11a03b2c89 in __GI___libc_realloc (oldmem=0x2088ff0, bytes=1003) at
malloc.c:3043
#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 ()
</pre>



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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code