Issue #20250 has been reported by zetter (Chris Zetter).
----------------------------------------
Bug #20250: Crash with "Object ID seen, but not in mapping table: proc" error
https://bugs.ruby-lang.org/issues/20250
* Author: zetter (Chris Zetter)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
Hello, I experienced a crash which I was able to reliably reproduce with the following:
``` ruby
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'activesupport', '7.1.3'
end
require 'active_support'
logger = ActiveSupport::Logger.new('log/log.log', 1, 100 * 1024 * 1024)
logger.formatter = proc {|_, _, _, message| "#{message}\n" }
logger = ActiveSupport::TaggedLogging.new(logger)
logger.tagged("TAG").info "hello"
logger.tagged("TAG").info "hello" # usually crashes here
GC.start # sometimes need to trigger crash with GC
```
It looks like this is caused by the interaction with the formatter proc and the tagged logging features of activesupport. Let me know if a more minimal example would be useful.
I can reproduce this with:
* ruby 3.3.0 on arm64-darwin23
* ruby 3.3.0 on x86_64-linux
* latest ruby HEAD (5e12b75716) on arm64-darwin23
I cannot reproduce this on ruby 3.2.2.
Thanks for any help
---Files--------------------------------
ruby-2024-02-09-092829.ips (13.2 KB)
output.log (142 KB)
crash_test_2.rb (465 Bytes)
--
https://bugs.ruby-lang.org/
Issue #19907 has been reported by peterzhu2118 (Peter Zhu).
----------------------------------------
Bug #19907: Method calls with keyword arguments in eval leaks callcache and callinfo objects
https://bugs.ruby-lang.org/issues/19907
* Author: peterzhu2118 (Peter Zhu)
* Status: Open
* Priority: Normal
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
The following script leaks callcache and callinfo objects:
```ruby
def foo(a:); end
10.times do
10_000.times do
eval(<<~RUBY)
foo(a: 1)
RUBY
end
puts "Number of live objects: #{GC.stat(:heap_live_slots)}"
puts "Memory usage: #{`ps -o rss= -p #{$$}`}"
puts
end
```
Output is:
```
Number of live objects: 46248
Memory usage: 16160
Number of live objects: 65902
Memory usage: 19888
Number of live objects: 92656
Memory usage: 24032
Number of live objects: 126791
Memory usage: 28048
Number of live objects: 132919
Memory usage: 28816
Number of live objects: 180687
Memory usage: 32384
Number of live objects: 181957
Memory usage: 32464
Number of live objects: 227485
Memory usage: 34224
Number of live objects: 256101
Memory usage: 37200
Number of live objects: 274151
Memory usage: 38752
```
After performing a `ObjectSpace.dump_all`, I found that it is leaking callcache and callinfo objects that is being held on by the `Object` class.
```json
{"address":"0x102ecef70", "type":"CLASS", "shape_id":2, "slot_size":160, "class":"0x102ecf8d0", "variation_count":0, "superclass":"0x102ecfd30", "real_class_name":"Object", "singleton":true, "references":[ ... ]}
{"address":"0x1030c90a0", "type":"IMEMO", "shape_id":0, "slot_size":40, "imemo_type":"callinfo", "mid":"foo", "memsize":40, "flags":{"wb_protected":true}}
{"address":"0x102fad568", "type":"IMEMO", "shape_id":0, "slot_size":40, "imemo_type":"callcache", "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}}
```
--
https://bugs.ruby-lang.org/
Issue #20246 has been reported by bestwebua (Vladislav Trotsenko).
----------------------------------------
Bug #20246: Unexpected behavior for Regexp in Subexpression Calls on Ruby 3.3.0
https://bugs.ruby-lang.org/issues/20246
* Author: bestwebua (Vladislav Trotsenko)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin22]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
Hello! A few days ago, after migration on 3.3.0 I have faced with issue inside subexpression calls.
An expected result on Ruby up to 3.3.0:
```ruby
'1.2.3'[/(\d+)(\.\g<1>){2}/] # => "1.2.3"
```
An actual result on Ruby 3.3.0:
```ruby
'1.2.3'[/(\d+)(\.\g<1>){2}/] # => nil
```
--
https://bugs.ruby-lang.org/
Issue #20184 has been reported by aalin (Andreas Alin).
----------------------------------------
Bug #20184: Ruby segfaults on Fly.io with 256 MB RAM
https://bugs.ruby-lang.org/issues/20184
* Author: aalin (Andreas Alin)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I've been running a Ruby 3.2 app on Fly.io with 256 MB RAM and it has been working fine.
When I upgraded to Ruby 3.3.0, any Ruby script would crash immediately with a segfault.
I haven't been able to reproduce it outside of fly.io.
I created a repository with a basic rack app which crashes on fly.io.
The readme includes the full output and a GDB backtrace.
https://github.com/aalin/ruby-3-3-0-fly-crash
--
https://bugs.ruby-lang.org/
Issue #20095 has been reported by sisyphus_cg (Sisyphus CG).
----------------------------------------
Bug #20095: Regex lookahead behaving strangely in 3.3.0
https://bugs.ruby-lang.org/issues/20095
* Author: sisyphus_cg (Sisyphus CG)
* Status: Open
* Priority: Normal
* ruby -v: 3.3.0
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
Multiple regex lookaheads seem to behave strangely in 3.3.0:
```ruby
p "xxx" =~ /(?=.*x)x(?=banana)/ # 2
```
Clearly, the string `xxx` does not contain `banana`, so this regex should never match, but it does.
--
https://bugs.ruby-lang.org/
Issue #20207 has been reported by Sundeep (Sundeep Agarwal).
----------------------------------------
Bug #20207: Segmentation fault for a regexp containing positive and negative lookaheads
https://bugs.ruby-lang.org/issues/20207
* Author: Sundeep (Sundeep Agarwal)
* Status: Open
* Priority: Normal
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I'm getting segmentation fault for the following regexp with Ruby 3.3.0:
``` ruby
puts 'clan'.match?(/(?=.*a)(?!.*n)/)
```
This is the minimal example for which I was able to produce the issue. `a` and `n` in the above example
are just a sample, can be other character combinations too. There has to be at least two characters
before them in the input string (`cl` in the above example).
The error is seen when the above code is run from a file, but only occasionally from irb.
When run from a file, most of the time I get segmentation fault (see attached log file),
but sometimes I get the following error:
``` ruby
lookaround.rb:1:in `match?': undefined bytecode (bug): /(?=.*a)(?!.*n)/ (RegexpError)
from lookaround.rb:1:in `<main>'
```
When asked in the r/ruby forum, somebody else was able to reproduce this issue.
They also mentioned that the issue wasn't seen in the Ruby 3.2.2 version.
---Files--------------------------------
lookaround_segfault.log (15.9 KB)
--
https://bugs.ruby-lang.org/
Issue #20203 has been reported by vo.x (Vit Ondruch).
----------------------------------------
Bug #20203: `TestEnumerable` test failures with GCC 14
https://bugs.ruby-lang.org/issues/20203
* Author: vo.x (Vit Ondruch)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
There is ongoing mass rebuild in Fedora and that is first time GCC 14 is used and we observe test failures in `TestEnumerable`. Here are a few examples:
~~~
[ 3000/26419] TestEnumerable#test_transient_heap_sort_bymalloc_consolidate(): unaligned fastbin chunk detected
~~~
~~~
[ 2455/26535] TestEnumerable#test_transient_heap_sort_bycorrupted size vs. prev_size in fastbins
~~~
~~~
[ 9716/26532] TestEnumerable#test_any_with_unused_blockdouble free or corruption (fasttop)
~~~
The full logs are accessible [here](https://koji.fedoraproject.org/koji/taskinfo?taskID=112176941). Please drill through `Descendants` and `build.log`
--
https://bugs.ruby-lang.org/
Issue #20209 has been reported by alanwu (Alan Wu).
----------------------------------------
Bug #20209: YJIT can leak memory by retaining objects with singleton class
https://bugs.ruby-lang.org/issues/20209
* Author: alanwu (Alan Wu)
* Status: Closed
* Priority: Normal
* Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED
----------------------------------------
We've received [reports](https://github.com/ruby/ruby/pull/9693) of YJIT causing memory leaks in production Rails apps by keeping objects that have singleton classes alive. The symptom is similar to #19436. We have found a workaround with https://github.com/ruby/ruby/pull/9693 and would like to have it in the next 3.3 point release.
--
https://bugs.ruby-lang.org/