WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
280366
Race condition leading to failure in readPIDFromPeer() due to interrupted system call and subsequent crash
https://bugs.webkit.org/show_bug.cgi?id=280366
Summary
Race condition leading to failure in readPIDFromPeer() due to interrupted sys...
Povilas Kanapickas
Reported
2024-09-25 16:37:42 PDT
readPIDFromPeer() contains a recvmsg() call which does not protect against EINTR being returned. This problem has been observed in a automated end-to-end test setup involving Playwright and WPE Webkit, so it will be hard to reproduce outside the environment where the errors occurred. However, the following has been observed in strace: [pid 23174] 20:38:42.188600 execve("/root/.cache/ms-playwright/webkit-2070/minibrowser-wpe/bin/WPEWebProcess", ["/root/.cache/ms-playwright/webki"..., "11", "17", "19"], 0x55d8d855d420 /* 53 vars */ <unfinished ...> <...> [pid 23174] 20:39:09.918082 +++ exited with 0 +++ <...> [pid 23157] 20:39:09.918396 <... recvmsg resumed>{msg_namelen=0}, 0) = -1 EINTR (Interrupted system call) <...> [pid 23157] 20:39:09.918776 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=23174, si_uid=0, si_status=0, si_utime=0, si_stime=0} --- <...> [pid 23157] 20:39:09.923932 write(2, "\n** (MiniBrowser:23157): ERROR *"..., 126 <unfinished ...> Which later leads to the following error message: (MiniBrowser:23842): ERROR **: 20:39:09.919: readPIDFromPeer: Failed to read pid from PID socket: Interrupted system call The browser then crashes. Given that the child process exited with non-erroneous exit code zero, it is reasonable to expect that readPIDFromPeer() should handle this order of events.
Attachments
Add attachment
proposed patch, testcase, etc.
Povilas Kanapickas
Comment 1
2024-09-25 17:20:55 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/34268
EWS
Comment 2
2024-09-26 02:38:13 PDT
Committed
284274@main
(57a73ac7aa73): <
https://commits.webkit.org/284274@main
> Reviewed commits have been landed. Closing PR #34268 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2024-09-26 02:39:16 PDT
<
rdar://problem/136741794
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug