Skip to content

drmtest: Fix hanging child processes

Tvrtko Ursulin intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Revert "lib/drmtest: ducttape over fork race"lib/drmtest.c+0 -100 replies
2/2drmtest: Avoid wrong PID/TID after clone raceslib/drmtest.c+9 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] drmtest: Fix hanging child processes

From: Tvrtko Ursulin <[email protected]>

It was observed both on Linux and Android that tests which fork can sometimes hang failing to terminate child processes.

This was eventually tracked down to race conditions in C library implementations, all with regards to caching of PID/TGID and TID values.

Solution is to revert the previous workaround, which closed the race under glibc a bit, and ensure current values from the kernel are used during timing sensitive periods.

This was tested under Android only but should be a generic fix.

Tvrtko Ursulin (2):
Revert "lib/drmtest: ducttape over fork race"
drmtest: Avoid wrong PID/TID after clone races

 lib/drmtest.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)
Signature · 1 line
1.8.4.3