Skip to content

[pull] master from ruby:master#838

Merged
pull[bot] merged 11 commits intoturkdevops:masterfrom
ruby:master
Mar 10, 2026
Merged

[pull] master from ruby:master#838
pull[bot] merged 11 commits intoturkdevops:masterfrom
ruby:master

Conversation

@pull
Copy link

@pull pull bot commented Mar 10, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

luke-gruber and others added 11 commits March 9, 2026 15:25
Registering a ubf was considered problematic in some cases because it could
result in lock ordering inversions with the ubf function itself. I believe
this is the reason that in patch be1bbd5, the ubf was registered outside of
the `thread_sched_lock`.

For example, `thread_sched_to_waiting_until_wakeup()` (native_sleep)
should register the ubf with the thread_sched_lock (TSL) taken. The ordering
is (TSL -> UBF lock). During the ubf call itself, since the UBF lock is
always acquired during the call, the ordering is (UBF lock -> TSL). This
inversion was avoided by registering the ubf outside the TSL.

This inversion is benign in this case, though. Since there can be no ubf on the
thread before the call to `ubf_set`, and this ubf is the only place where the
(UBF lock -> TSL lock) ordering is done, it is okay to register it with the TSL.
In fact registering the ubf outside the TSL can result in problamatic race conditions,
so we now register the ubf with the TSL lock.

This fixes a race condition whereby a newly registered ubf is called before the thing it's
protecting (the sleep) is actually run. The sleeping thread can never be interrupted if this
happens.

Fixes [Bug #21926]
It appears that shims for individual commands are no longer being
created.
@pull pull bot locked and limited conversation to collaborators Mar 10, 2026
@pull pull bot added the ⤵️ pull label Mar 10, 2026
@pull pull bot merged commit ae3ad5e into turkdevops:master Mar 10, 2026
1 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants