summaryrefslogtreecommitdiff
path: root/commit-graph.h
diff options
context:
space:
mode:
authorJosh Steadmon <steadmon@google.com>2022-06-07 11:21:57 -0700
committerJunio C Hamano <gitster@pobox.com>2022-06-07 12:48:19 -0700
commitce3986bb224067ecdb372d7cb7a56d22682e9a31 (patch)
tree8c0a684e215180869dd519e7c3255d187de2956a /commit-graph.h
parent6cd33dceed60949e2dbc32e3f0f5e67c4c882e1e (diff)
run-command: don't spam trace2_child_exit()
In rare cases[1], wait_or_whine() cannot determine a child process's status (and will return -1 in this case). This can cause Git to issue trace2 child_exit events despite the fact that the child may still be running. In pathological cases, we've seen > 80 million exit events in our trace logs for a single child process. Fix this by only issuing trace2 events in finish_command_in_signal() if we get a value other than -1 from wait_or_whine(). This can lead to missing child_exit events in such a case, but that is preferable to duplicating events on a scale that threatens to fill the user's filesystem with invalid trace logs. [1]: This can happen when: * waitpid() returns -1 and errno != EINTR * waitpid() returns an invalid PID * the status set by waitpid() has neither the WIFEXITED() nor WIFSIGNALED() flags Signed-off-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.h')
0 files changed, 0 insertions, 0 deletions