[
https://issues.apache.org/jira/browse/KUDU-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexey Serbin updated KUDU-2743:
--------------------------------
Description:
A process spawned by {{Subprocess::Start()}} deadlocks under the following
conditions:
* The executable to run doesn't not exists and {{execvp()}} returns an error.
* The child process copied over glog's mutex in locked state from the parent.
As a general note, it's not safe to call non-async-signal-safe functions in the
child process between {{fork()}} and {{exec()}}. Surprisingly, a call to LOG()
locks a mutex that may have been copied from the parent's address space in an
already locked state, so it is not async-signal-safe and can deadlock the child
if called.
was:
A process spawned by {{Subprocess::Start()}} deadlocks under the following
conditions:
* The executable to run doesn't not exists and {{execve()}} returns an error.
* The child process copied over glog's mutex in locked state from the parent.
As a general note, it's not safe to call non-async-signal-safe functions in the
child process between {{fork()}} and {{exec()}}. Surprisingly, a call to LOG()
locks a mutex that may have been copied from the parent's address space in an
already locked state, so it is not async-signal-safe and can deadlock the child
if called.
> A process spawned by Subprocess::Start() can deadlock
> -----------------------------------------------------
>
> Key: KUDU-2743
> URL: https://issues.apache.org/jira/browse/KUDU-2743
> Project: Kudu
> Issue Type: Bug
> Affects Versions: 0.7.0, 0.7.1, 0.8.0, 0.9.0, 0.9.1, 0.10.0, 1.0.0, 1.0.1,
> 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.7.1, 1.9.0,
> 1.10.0
> Reporter: Alexey Serbin
> Assignee: Alexey Serbin
> Priority: Critical
>
> A process spawned by {{Subprocess::Start()}} deadlocks under the following
> conditions:
> * The executable to run doesn't not exists and {{execvp()}} returns an error.
> * The child process copied over glog's mutex in locked state from the parent.
> As a general note, it's not safe to call non-async-signal-safe functions in
> the child process between {{fork()}} and {{exec()}}. Surprisingly, a call to
> LOG() locks a mutex that may have been copied from the parent's address space
> in an already locked state, so it is not async-signal-safe and can deadlock
> the child if called.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)