Skip to content

Conversation

Keno
Copy link
Member

@Keno Keno commented Apr 29, 2025

The jl_get_binding_partition_with_hint version of the bpart lookup did not properly set the max_world of the gap, leaving it at ~(size_t)0. Having a gap with that max_world, but with gap.replace set is inconsistent and ended up causing an integer overflow downstream in the computation of expected_prev_min_world, which looked like a concurrent modification causing an infinite retry. Fixes #58257

The `jl_get_binding_partition_with_hint` version of the bpart lookup did not properly set
the `max_world` of the gap, leaving it at `~(size_t)0`. Having a `gap` with that `max_world`,
but with `gap.replace` set is inconsistent and ended up causing an integer overflow downstream
in the computation of `expected_prev_min_world`, which looked like a concurrent modification
causing an infinite retry.
@Keno Keno added the backport 1.12 Change should be backported to release-1.12 label Apr 29, 2025
@Keno Keno merged commit fc8e6e7 into master Apr 30, 2025
6 of 9 checks passed
@Keno Keno deleted the kf/58257 branch April 30, 2025 10:10
## The sequence of events is critical here.
A58257.get! # Creates binding partition in A, N+1:∞
A58257.B58257.get! # Creates binding partition in A.B, N+1:∞
Base.invoke_in_world(UInt(38678), getglobal, A58257, :get!) # Expands binding partition in A through <N
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you using random numbers as worlds? This will break very badly someday...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was supposed to be captured earlier, just forgot to commit the change. will fix.

serenity4 pushed a commit to serenity4/julia that referenced this pull request May 1, 2025
The `jl_get_binding_partition_with_hint` version of the bpart lookup did
not properly set the `max_world` of the gap, leaving it at `~(size_t)0`.
Having a `gap` with that `max_world`, but with `gap.replace` set is
inconsistent and ended up causing an integer overflow downstream in the
computation of `expected_prev_min_world`, which looked like a concurrent
modification causing an infinite retry. Fixes JuliaLang#58257
@KristofferC KristofferC mentioned this pull request May 5, 2025
53 tasks
KristofferC pushed a commit that referenced this pull request May 5, 2025
The `jl_get_binding_partition_with_hint` version of the bpart lookup did
not properly set the `max_world` of the gap, leaving it at `~(size_t)0`.
Having a `gap` with that `max_world`, but with `gap.replace` set is
inconsistent and ended up causing an integer overflow downstream in the
computation of `expected_prev_min_world`, which looked like a concurrent
modification causing an infinite retry. Fixes #58257

(cherry picked from commit fc8e6e7)
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label May 9, 2025
charleskawczynski pushed a commit to charleskawczynski/julia that referenced this pull request May 12, 2025
The `jl_get_binding_partition_with_hint` version of the bpart lookup did
not properly set the `max_world` of the gap, leaving it at `~(size_t)0`.
Having a `gap` with that `max_world`, but with `gap.replace` set is
inconsistent and ended up causing an integer overflow downstream in the
computation of `expected_prev_min_world`, which looked like a concurrent
modification causing an infinite retry. Fixes JuliaLang#58257
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.

bpart-related hang during precompilation
3 participants