Project

General

Profile

Bug #17482

Ractor.receive doesnt accept Ctrl+C under some condition

Added by riskwa (riskwa anon) 2 months ago. Updated 26 days ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
[ruby-dev:50984]

Description

When I run this script, Ctrl+C doesn't work.
Waiting forever on #4 is fine, but I think Ctrl+C should work.

r = Ractor.new() {
  # sleep 1                  #1
  File.open(__FILE__){  }    #2
}

# sleep 1                    #3
p Ractor.receive             #4

When I comment out #2, Ctrl+C works.
When I comment in #1 and/or #3, Ctrl+C works.
In my environment, it's reproducable in 100%.

My environment is:
WSL2 ubuntu 5 4.19.128-microsoft-standard #1 i5-10400 6core

Updated by ko1 (Koichi Sasada) 2 months ago

  • Assignee set to ko1 (Koichi Sasada)
  • Status changed from Open to Assigned

Thank you for the report, I could reproduce it.

#2

Updated by ko1 (Koichi Sasada) about 1 month ago

  • Status changed from Assigned to Closed

Applied in changeset git|6f727853cee41195b67ee5d793c1ac23fe1a6ae0.


only main thread can modify vm->ubf_async_safe

vm->ubf_async_safe is VM global resource and only main thread
can manipulate it.
[Bug #17482]

#3

Updated by ko1 (Koichi Sasada) about 1 month ago

  • Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN to 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: REQUIRED

Updated by ko1 (Koichi Sasada) 30 days ago

b2674c1fd725b43adf51af7935c780359d70c2a4 should be backported too.

Updated by naruse (Yui NARUSE) 26 days ago

  • Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: REQUIRED to 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: DONE

ruby_3_0 9aba46d8d80473594e567dff1652626e7b2a77b0 merged revision(s) 6f727853cee41195b67ee5d793c1ac23fe1a6ae0,b2674c1fd725b43adf51af7935c780359d70c2a4.

Also available in: Atom PDF