[#118346] [Ruby master Bug#20586] Some filesystem calls in dir.c are missing error handling and can return incorrect results if interrupted — "ivoanjo (Ivo Anjo) via ruby-core" <ruby-core@...>
Issue #20586 has been reported by ivoanjo (Ivo Anjo).
13 messages
2024/06/19
[ruby-core:118361] [Ruby master Bug#20588] RangeError: integer 132186463059104 too big to convert to 'int' since cdf33ed5f37f9649c482c3ba1d245f0d80ac01ce with YJIT enabled
From:
"yahonda (Yasuo Honda) via ruby-core" <ruby-core@...>
Date:
2024-06-20 05:35:46 UTC
List:
ruby-core #118361
Issue #20588 has been updated by yahonda (Yasuo Honda).
It also reproduces with the latest master branch.
```
$ ruby -v
ruby 3.4.0dev (2024-06-20T03:52:09Z master fbe56b1c17) [x86_64-linux]
$ RUBY_YJIT_ENABLE=1 bin/test test/cases/scoping/relation_scoping_test.rb test/cases/associations/eager_test.rb --seed 1670
Using sqlite3
Run options: --seed 1670
# Running:
........E
Error:
EagerAssociationTest#test_including_association_based_on_sql_condition_and_no_database_column:
RangeError: integer 137816943299296 too big to convert to 'int'
lib/active_record/relation.rb:548:in 'block in ActiveRecord::Relation#_exec_scope'
lib/active_record/relation.rb:1359:in 'ActiveRecord::Relation#_scoping'
lib/active_record/relation.rb:548:in 'ActiveRecord::Relation#_exec_scope'
lib/active_record/scoping/named.rb:175:in 'block in Owner.scope'
test/cases/associations/eager_test.rb:1524:in 'block in <class:EagerAssociationTest>'
bin/test test/cases/associations/eager_test.rb:1523
............................................................................................................................................................................................................................................................
Finished in 6.238378s, 41.8378 runs/s, 138.8181 assertions/s.
261 runs, 866 assertions, 0 failures, 1 errors, 0 skips
$
```
----------------------------------------
Bug #20588: RangeError: integer 132186463059104 too big to convert to 'int' since cdf33ed5f37f9649c482c3ba1d245f0d80ac01ce with YJIT enabled
https://bugs.ruby-lang.org/issues/20588#change-108867
* Author: yahonda (Yasuo Honda)
* Status: Open
* ruby -v: ruby 3.4.0dev (2024-06-18T16:28:25Z master cdf33ed5f3) [x86_64-linux]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
Managed to reproduce Rails CI failure https://buildkite.com/rails/rails-nightly/builds/679#0190324d-b73c-4602-b026-9c40cf9ca4a8
### Steps to reproduce
```
git clone https://github.com/rails/rails
cd rails/activerecord
bundle install
RUBY_YJIT_ENABLE=1 bin/test test/cases/scoping/relation_scoping_test.rb test/cases/associations/eager_test.rb --seed 1670
```
### Expected behavior
It should pass.
### Actual behavior
It always raises the `RangeError`.
```
$ RUBY_YJIT_ENABLE=1 bin/test test/cases/scoping/relation_scoping_test.rb test/cases/associations/eager_test.rb --seed 1670
Using sqlite3
Run options: --seed 1670
# Running:
........E
Error:
EagerAssociationTest#test_including_association_based_on_sql_condition_and_no_database_column:
RangeError: integer 124299148641408 too big to convert to 'int'
lib/active_record/relation.rb:548:in 'block in ActiveRecord::Relation#_exec_scope'
lib/active_record/relation.rb:1359:in 'ActiveRecord::Relation#_scoping'
lib/active_record/relation.rb:548:in 'ActiveRecord::Relation#_exec_scope'
lib/active_record/scoping/named.rb:175:in 'block in Owner.scope'
test/cases/associations/eager_test.rb:1524:in 'block in <class:EagerAssociationTest>'
bin/test test/cases/associations/eager_test.rb:1523
............................................................................................................................................................................................................................................................
Finished in 6.256788s, 41.7147 runs/s, 138.4097 assertions/s.
261 runs, 866 assertions, 0 failures, 1 errors, 0 skips
$
```
### Additional information
It does not reproduce when YJIT is disabled like `bin/test test/cases/scoping/relation_scoping_test.rb test/cases/associations/eager_test.rb --seed 1670`
According to git bisect, this exception raised since https://github.com/ruby/ruby/commit/cdf33ed5f37f9649c482c3ba1d245f0d80ac01ce
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/