Bug 215049 - Update generate-message-receiver.py to account for intermittent corruption
Summary: Update generate-message-receiver.py to account for intermittent corruption
Status: CLOSED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-31 21:25 PDT by Keith Rollin
Modified: 2020-09-10 18:25 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.59 KB, patch)
2020-07-31 21:31 PDT, Keith Rollin
krollin: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2020-07-31 21:25:50 PDT
Several developers have reported build failures due to the output of generate-message-receiver.py including a 4K chunk of NULs at the start of the generated files. It's not apparent if this is a script issue, a Python issue, an OS issue, a hardware issue, or what. But in order to make this less of an issue, update generate-message-receiver.py as follows:

- When files are written, check for the corruption. If it occurs, retry up to five times. Write a message to stderr if corruption occurs in order to help corral the issue. After five times, give up.
- Add support for the WK_SKIP_RETRY_ON_CORRUPTION environment variable. If set to non-zero/empty, then give up without retrying. By not retrying, the adventurous developer may be able to examine the conditions that led to the corruption and figure out what happened.
Comment 1 Radar WebKit Bug Importer 2020-07-31 21:26:08 PDT
<rdar://problem/66412328>
Comment 2 Keith Rollin 2020-07-31 21:27:44 PDT
See also radar 63595589
Comment 3 Keith Rollin 2020-07-31 21:31:40 PDT
Created attachment 405767 [details]
Patch
Comment 4 Keith Rollin 2020-07-31 22:12:51 PDT
Comment on attachment 405767 [details]
Patch

I tested the script in isolation, but not in an actual `make`.
Comment 5 Darin Adler 2020-08-01 12:21:59 PDT
Maybe we should hold off on this a while and see if the fix to bug 215054 takes care of the problem?
Comment 6 Keith Rollin 2020-08-02 18:15:13 PDT
Yeah, there's no need for this patch any more.
Comment 7 Keith Rollin 2020-08-02 18:16:26 PDT
At least, as you say, as long as bug 215054 and bug 215064 work.