Closed nirvdrum closed 1 year ago
This is a similar issue to https://github.com/oracle/truffleruby/issues/2720, specifically rb_gc_register_address()
is called before the assignment of the corresponding variable, in the backtrace above it's from https://github.com/protocolbuffers/protobuf/blob/f1a939fb69504ff4e1fe386978165faa37fb2979/ruby/ext/google/protobuf_c/protobuf.c#L384-L386.
Moving the rb_gc_register_address()
, the tests complete (with 243 tests, 367572 assertions, 9 failures, 5 errors, 0 pendings, 0 omissions, 0 notifications 94.2387% passed
).
Given the 16 rb_gc_register_address() in google-protobuf
and the fact this is the 2nd time we see this error I think we need an automated way to handle it and not just do PRs upstream, i.e., address https://github.com/oracle/truffleruby/issues/2721.
Thanks for the explanation. I had checked that previous versions of TruffleRuby didn't blow up. What changed on our end?
https://github.com/oracle/truffleruby/commit/76cfbe8deecef1e75530ab6841653f3483cd06ed is what changed (see the new .md file for details), handles are weaker now and so avoids leaking but then also reveal such issues which already existed but accidentally worked due to stronger/leaking handles.
When using TruffleRuby at 76cfbe8deecef1e75530ab6841653f3483cd06ed, I run into a problem with an internal exception escaping. The problem does not exist with cff928c0e14d815d35a2e83ffc77209cff8328e8, indicating the issue appeared with the merge of PR truffleruby/3195. I haven't bisected individual commits.
I'm running into the problem with the google-protobuf gem.
Running the tests, you'll end up with: