Bug 258769 - Intermittent parallel build failures related to GIR file
Summary: Intermittent parallel build failures related to GIR file
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CMake (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-07-01 07:41 PDT by Jan Palus
Modified: 2023-07-10 00:02 PDT (History)
1 user (show)

See Also:


Attachments
Patch (2.90 KB, patch)
2023-07-01 07:41 PDT, Jan Palus
no flags Details | Formatted Diff | Diff
Log (58.64 KB, text/x-log)
2023-07-01 07:42 PDT, Jan Palus
no flags Details
Patch for non parallel build (1.66 KB, patch)
2023-07-10 00:02 PDT, Jan Palus
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Palus 2023-07-01 07:41:39 PDT
Created attachment 466892 [details]
Patch

Sometimes build fails with errors like:

[100%] Generating WPEWebKit-1.0.typelib
cd /tmp/B.0d8_p500/BUILD/wpewebkit-2.38.6/build-soup2/Source/WebKit && /usr/bin/g-ir-compiler --includedir=/tmp/B.0d8_p500/BUILD/wpewebkit-2.38.6/build-soup2 --output=/tmp/B.0d8_p500/BUILD/wp
ewebkit-2.38.6/build-soup2/WPEWebKit-1.0.typelib /tmp/B.0d8_p500/BUILD/wpewebkit-2.38.6/build-soup2/WPEWebKit-1.0.gir
error parsing file /tmp/B.0d8_p500/BUILD/wpewebkit-2.38.6/build-soup2/WPEWebKit-1.0.gir: Error on line 1 char 1: Document was empty or contained only whitespace

(see attached log)

While most recent occurrence of this issue is related to WPEWebKit, the same behavior was observed for "normal" WebKit as well. Mechanism in question is exactly the same in both.

The reason for the errors are multiple commands generating same GIR file executed in parallel.

See attached patch for more details and fix. Feel free to use it or not. Unfortunately it was not possible to create pull request as the baroque `git-webkit setup` script has hard dependency on keyring which I unfortunately cannot satisfy.
Comment 1 Jan Palus 2023-07-01 07:42:04 PDT
Created attachment 466893 [details]
Log
Comment 2 Radar WebKit Bug Importer 2023-07-08 07:42:14 PDT
<rdar://problem/111953858>
Comment 3 Jan Palus 2023-07-10 00:02:51 PDT
Created attachment 466996 [details]
Patch for non parallel build

Follow up patch for issue found and fixed by Jakub Bogusz with non parallel build.