[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #54427] make can block after being killed
From: |
Koen Van Hoof |
Subject: |
[bug #54427] make can block after being killed |
Date: |
Thu, 2 Aug 2018 07:04:37 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 |
URL:
<http://savannah.gnu.org/bugs/?54427>
Summary: make can block after being killed
Project: make
Submitted by: kvho
Submitted on: Thu 02 Aug 2018 01:04:35 PM CEST
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 4.2.1
Operating System: POSIX-Based
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
job.c, line 1002
#ifndef NO_OUTPUT_SYNC
/* Synchronize any remaining parallel output. */
output_dump (&c->output);
#endif
This happens in a 'critical' section.
a child has finished, but job_slots_used has not yet decremented.
When a fatal signal arrives, during output_dump, fatal_error_signal is
calling
while (job_slots_used > 0)
reap_children (1, 0);
Since job_slots_used is 1 higher than the number of children, reap_children is
called eventually, without any child, and it will block on 'EINTRLOOP (pid,
wait (&status)'
Solution: reorder some statements.
/* There is now another slot open. */
if (job_slots_used > 0)
--job_slots_used;
/* Remove the child from the chain and free it. */
if (lastc == 0)
children = c->next;
else
lastc->next = c->next;
unblock_sigs ();
#ifndef NO_OUTPUT_SYNC
/* Synchronize any remaining parallel output. */
output_dump (&c->output);
#endif
free_child (c);
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?54427>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #54427] make can block after being killed,
Koen Van Hoof <=