Skip to content

Conversation

@graalvmbot
Copy link
Collaborator

When loading base layer graphs, the graph is used for both stages.

If two threads try to load the same graph, the second thread can steal the lock from the first one.

This happens when the first thread asks for the second stage graph. The second stage will be locked, but the first stage will be left as unparsed.

Then, if the second thread requests the first stage, since the first stage is still unparsed, the lock will not be seen and the thread will steal the lock.

Locking both stages solves the issue.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 17, 2025
@graalvmbot graalvmbot closed this Feb 17, 2025
@graalvmbot graalvmbot deleted the scoppey/GR-62290/graph-loading-race branch February 17, 2025 22:57
@graalvmbot graalvmbot merged commit 2e6bef7 into master Feb 17, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants