Skip to content

Race condition when building ocamlbuild with massive parallelism#179

Closed
let-def wants to merge 1 commit intoocaml:trunkfrom
let-def:build-ocamlbuild
Closed

Race condition when building ocamlbuild with massive parallelism#179
let-def wants to merge 1 commit intoocaml:trunkfrom
let-def:build-ocamlbuild

Conversation

@let-def
Copy link
Copy Markdown
Contributor

@let-def let-def commented May 1, 2015

ocamlbuild/Makefile had a race condition which might make the build fail occasionally.

On test machine with 16 cores, make -j failed once every three build.
After patch, I got 12 consecutive successful builds.

@gasche
Copy link
Copy Markdown
Member

gasche commented May 1, 2015

Merged, thanks.

it's well-known that the Makefile are a bit flaky regarding parallelism, and the occasional fix is welcome. (I think ocamldoc may also benefit from a bit of care in this respect.)

@gasche gasche closed this May 1, 2015
@dbuenzli
Copy link
Copy Markdown
Contributor

dbuenzli commented May 1, 2015

@gasche it's not only Makefile, it's also tools that don't atomically write to files.

@gasche
Copy link
Copy Markdown
Member

gasche commented May 1, 2015

@dbuenzli indeed; we discussed a bit of this in PR#4991. Anyone that would be motivated to move things forward on this is welcome.

(My own interest in atomic-copy-if-not-already-present is that it makes timestamp-based build system benefit from the -opaque option out of the box.)

@yakobowski
Copy link
Copy Markdown
Contributor

Thanks a lot @def-lkb . I recently had to bissect the compiler, and those ocamlbuild failures to build (a tad bit ironic...) were a major source of frustration.

@let-def let-def deleted the build-ocamlbuild branch May 6, 2015 21:18
@let-def let-def mentioned this pull request May 22, 2015
chambart pushed a commit to chambart/ocaml-1 that referenced this pull request Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants