csv icon indicating copy to clipboard operation
csv copied to clipboard

Timeout on Windows

Open nobu opened this issue 4 months ago • 3 comments

Since this run, test.yml seems hanging up and timed out with ruby head on Windows. But it's strange that #341 itself worked fine.

nobu avatar Oct 07 '25 14:10 nobu

https://github.com/ruby/csv/actions/runs/18331063558/job/52206014524

It happens only on unreleased Ruby. Some Ruby changes may be related. (Ractor may be related?)

If you have Windows environment, could you try git bisect Ruby?

kou avatar Oct 08 '25 01:10 kou

Applying the following diff to kill a background thread waiting on Queue (in timeout) makes the hang disappear on my box:

diff --git a/test/csv/interface/test_read.rb b/test/csv/interface/test_read.rb
index bd55ae7..d875863 100644
--- a/test/csv/interface/test_read.rb
+++ b/test/csv/interface/test_read.rb
@@ -7,6 +7,7 @@ class TestCSVInterfaceRead < Test::Unit::TestCase

   def setup
     super
+    t=Timeout.instance_variable_get(:@timeout_thread) and t.kill.join
     @data = ""
     @data << "1\t2\t3\r\n"
     @data << "4\t5\r\n"

I suspect this is another instance of https://bugs.ruby-lang.org/issues/21537. Unfortunately I'm not familiar enough with the code to see how to best fix it.

I'd guess some changes in Ruby master around that time may have introduced new VM barriers, or increased the chance of hitting existing paths (e.g., GC), but that may not be the root cause.

It appears there are also runs that timed out with Ruby 3.0: https://github.com/ruby/csv/actions/runs/16080781808/job/45385069801

rhenium avatar Oct 08 '25 05:10 rhenium

Thanks for the information.

Should we fix this in ruby/csv or ruby/ruby?

kou avatar Oct 08 '25 06:10 kou