HomePhabricator

[libc] Resolve race condition in sub-process test runner.

Authored by PaulkaToast on Mar 17 2020, 12:59 PM.

Description

[libc] Resolve race condition in sub-process test runner.

Summary:
There seems to be a race condition between the pipe closing and the child process death. Likely these two events are not atomic on some versions of linux.

With the removal of WNOHANG we eliminate the race condition, however if the child closes the pipe intentionally then it could result in the test runner hanging. I find this situation less likely, where as I experience failures locally with this race condition rather consistently.

Reviewers: sivachandra, abrachet

Reviewed By: sivachandra, abrachet

Subscribers: MaskRay, jfb, tschuett, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D76267

Details

Committed
PaulkaToastMar 17 2020, 1:00 PM
Reviewer
sivachandra
Differential Revision
D76267: [libc] Resolve race condition in sub-process test runner.
Parents
rG2bd1ca28c1f1: [ELF][test] Delete unneeded --no-threads
Branches
Unknown
Tags
Unknown