Issue 11170 - SEGV caused by race condition in osl_executeProcess()
Summary: SEGV caused by race condition in osl_executeProcess()
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: 644
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 1.1 Beta
Assignee: matthias.huetsch
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-03 19:45 UTC by matthias.huetsch
Modified: 2003-02-17 21:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description matthias.huetsch 2003-02-03 19:45:26 UTC
The implementation of 'osl_executeProcess()' internally uses a thread which in
turn starts (and wait()'s on) the requested process.

The thread start routine 'ChildStatusProc()' and 'osl_executeProcess()'
communicate via a shared data structure containing some file handles and a
condition variable that is signaled when the child process has been started.

The race condition occurs should execution of the child process fail. In this
case the shared data structure is accessed after the condition is signaled,
such that the parent thread may have destroyed that shared data, already, which
more often that not results in a SEGV.

In the case of child process execution success, the code has the correct order
of instructions and there's no race condition.
Comment 1 matthias.huetsch 2003-02-03 19:47:02 UTC
Accepting, with Target Milestone OOo 1.1 Beta.
Comment 2 matthias.huetsch 2003-02-03 20:14:38 UTC
Fixed in porting/sal/osl/unx/process.c r1.26.2.1.4.1 on SRX644/mhu01.
Comment 3 matthias.huetsch 2003-02-03 20:15:50 UTC
...where 'SRX644/mhu01' means tag 'cws_srx644_mhu01'...
Comment 4 matthias.huetsch 2003-02-17 21:55:22 UTC
Fix integrated into OOo 1.1 master workspace (cvs tag SRX644_m4) as
porting/sal/osl/unx/process.c, r1.26.2.2, thus closing this issue.