Skip to content

Likely race conditions when core library files are modified #5540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cristianoc opened this issue Jul 11, 2022 · 11 comments
Closed

Likely race conditions when core library files are modified #5540

cristianoc opened this issue Jul 11, 2022 · 11 comments
Labels
stale Old issues that went stale
Milestone

Comments

@cristianoc
Copy link
Collaborator

See for example #5539 (comment)

Commands behaving non-deterministically, i.e. run it again and you might get a different result:
1 ./scripts/ninja.js clean, config , build
2 node scripts/install -force-lib-rebuild

It could be that running with ninja -j 1 makes this more deterministic. If so that would confirm.

@cristianoc
Copy link
Collaborator Author

CC @cknitt

@cristianoc
Copy link
Collaborator Author

On the linked pr, command 2 seems to be wrong approximately half of the times

@cristianoc
Copy link
Collaborator Author

cristianoc commented Jul 11, 2022

I have run node scripts/install -force-lib-rebuild 10 times on #5539 with -j 1 and not once has it given a wrong result.

@cristianoc
Copy link
Collaborator Author

Another observation is that clean / config / build would sometime produce garbled js files with the closing } appearing twice.

@cristianoc
Copy link
Collaborator Author

Also every single time: doing build a second time runs about 700 steps again. The third time it does nothing.

@cknitt
Copy link
Member

cknitt commented Jul 11, 2022

The problem seems to be that there are two copies of the Js module, and you only modified one of them in #5539.

The duplicate Js module was introduced here: 148d57f

@cristianoc
Copy link
Collaborator Author

The duplicate Js module was introduced here: 148d57f

Looks like it might have been only introduced to hide certain types used by the compiler and not exposed to the user.

@cristianoc
Copy link
Collaborator Author

Still, there are race conditions. This file duplication is simply something that makes the race conditions obvious.

@cristianoc
Copy link
Collaborator Author

CC @TheSpyder

@TheSpyder
Copy link
Contributor

Turns out my problem wasn't race conditions, rather actual compile errors caused by changes on the master branch. Sorry for jumping to conclusions.

@cristianoc cristianoc added this to the v11.0 milestone Mar 21, 2023
@cristianoc cristianoc modified the milestones: v11.0, v12 Apr 9, 2023
Copy link

github-actions bot commented Oct 6, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Old issues that went stale label Oct 6, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Old issues that went stale
Projects
None yet
Development

No branches or pull requests

3 participants