-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-48752: [Ruby] Investigating ChunkedArray deadlock with Ractor.make_shareable on Windows #48753
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
Conversation
|
I will run the CI multiple times and see if this works.. |
|
|
|
Thanks for investing this but how did you confirm that It seems that require "arrow"
chunked_array = Arrow::ChunkedArray.new([Arrow::Int8Array.new([1])])
pp chunked_array.instance_variables # => []
Ractor.make_sharable(chunked_array)
pp chunked_array.instance_variables # => [:@chunks] |
|
It works fine in my local (did you run it on Windows FWIW..?). I was just suspecting that this is specified to Windows just from my rough code reading and thought that's the only possibility but maybe I am wrong :-). I don't have any evidence for this fix so just wanted to trigger the builds few more times here. |
|
I will update the PR description when I think it's ready to have a look 👍 |
|
Could you add these debug prints for checking the situation on CI? diff --git a/ruby/red-arrow/test/test-ractor.rb b/ruby/red-arrow/test/test-ractor.rb
index 2aef74d01a..6a0c36dd7d 100644
--- a/ruby/red-arrow/test/test-ractor.rb
+++ b/ruby/red-arrow/test/test-ractor.rb
@@ -23,7 +23,9 @@ class RactorTest < Test::Unit::TestCase
require_ruby(3, 1, 0)
array = Arrow::Array.new([1, 2, 3])
chunked_array = Arrow::ChunkedArray.new([array])
+ p chunked_array.instance_variables
Ractor.make_shareable(chunked_array)
+ p chunked_array.instance_variables
ractor = Ractor.new do
recived_chunked_array = Ractor.receive
recived_chunked_array.chunks |
|
Sure! |
|
hmmmmmmmm spending more time to understand the code with speclulation. Still trying to reproduce this in the builds at this PR |
778e0d8 to
d522a64
Compare
…reable on Windows
|
I also tried debug prints kou@076ba52 and https://github.com/kou/arrow/actions/runs/20804091327/job/59760921858#step:13:685 is a reproduced job: It shows that any Ruby code in Let's omit the test test for now: diff --git a/ruby/red-arrow/test/test-ractor.rb b/ruby/red-arrow/test/test-ractor.rb
index 2aef74d01a..efd3cca1d4 100644
--- a/ruby/red-arrow/test/test-ractor.rb
+++ b/ruby/red-arrow/test/test-ractor.rb
@@ -20,6 +20,10 @@ class RactorTest < Test::Unit::TestCase
ractor
test("ChunkedArray") do
+ if Gem.win_platform?
+ omit("Ractor is unstable on Windows: " +
+ "https://github.com/apache/arrow/issues/48752")
+ end
require_ruby(3, 1, 0)
array = Arrow::Array.new([1, 2, 3])
chunked_array = Arrow::ChunkedArray.new([array])I'll report this to Ruby later. |
|
okie dokie! |
|
Actually @kou let me please dig a bit more. With: I wasn't able to reproduce this for 10 builds. With the current fix seems I am reproducing it all in 10 builds. |
|
Although I don't have a clear evidence, I wonder if you feel comfortable with the change. It won't affect any other valid use cases from my understanding. If you feel unconfortable with that, let's just disable it on windows 🫡 |
This reverts commit fe0ba8d.
|
Alright. Let me open a PR to skip this on Windows first, and I will take a look from my end separately! |
|
I think that your assumption is not correct because our debug prints showed that |
TBD