Opened 3 years ago

Last modified 3 years ago

#373 new defect

open is not multiprocess-safe

Reported by: dmik Owned by:
Priority: normal Milestone: new
Component: libc Version: 0.6.6
Severity: normal Keywords:


It turns out that if two open() calls of the same file happen at the same time in two different kLIBC processes, one of the calls is likely to fail with EACCES for no apparent reason. I discovered it when running one of LIBCx mmap tests in parallel with other tests, an example is to follow.

Change History (1)

comment:1 Changed 3 years ago by dmik

This commit contains a link to a test case that demonstrates the problem and also contains a workaround which makes the problem go away (not a single failure within 10+ runs): A better test case would only have a pure open case in some tight loop but no time for it right now.

Note: See TracTickets for help on using tickets.