Project

General

Profile

Actions

Bug #20694

closed

"try to mark T_NONE object" error for very large hash

Added by ngan (Ngan Pham) 3 months ago. Updated 3 months ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
[ruby-core:118933]

Description

In CI, we've been occasionally seeing [BUG] try to mark T_NONE object. I don't have any way to reproduce it but I'm going to put some information here in case anyone has any ideas.

One thing I've noticed is that it happens for very large arrays:

<OBJ_INFO:gc_mark_ptr@gc.c:7072> 0x00007f587d04fc90 [0 M    ] T_NONE
/usr/local/bundle/ruby/3.3.0/gems/simpleidn-0.2.2/lib/simpleidn/uts46mapping.rb: [BUG] try to mark T_NONE object
ruby 3.3.4 (2024-07-09 revision be1089c8ec) [x86_64-linux]

https://github.com/mmriis/simpleidn/blob/master/lib/simpleidn/uts46mapping.rb#L17

and...

<OBJ_INFO:gc_mark_ptr@gc.c:7072> 0x00007f7ec426fdc8 [0 M    ] T_NONE
/usr/local/bundle/ruby/3.3.0/gems/domain_name-0.6.20240107/lib/domain_name/etld_data.rb: [BUG] try to mark T_NONE object
ruby 3.3.1 (2024-04-23 revision c56cd86388) [x86_64-linux]

https://github.com/knu/ruby-domain_name/blob/master/lib/domain_name/etld_data.rb#L4


Files

backtrace.txt (9.12 KB) backtrace.txt ngan (Ngan Pham), 08/23/2024 12:21 AM

Updated by mame (Yusuke Endoh) 3 months ago

Can you share the full backtrace, not only "Control frame information" section but also "C level backtrace information" section?

Updated by byroot (Jean Boussier) 3 months ago

very large arrays

You mean hashes right?

This smells like a missing write barrier in the compiler or iseq loader (impossible to tell without the C backtrace).

Updated by ngan (Ngan Pham) 3 months ago

Ah yes, I meant hash.

I’ll upload the full back trace when I’m back online later today.

Updated by ngan (Ngan Pham) 3 months ago

  • Subject changed from "try to mark T_NONE object" error for very large arrays to "try to mark T_NONE object" error for very large hash

This is the complete backtrace: https://gist.github.com/ngan/0e81cf7a4d822e46aab12acbadd10765

Sorry for the delay!

Updated by ngan (Ngan Pham) 3 months ago

Looking at the backtrace, looks like it's coming from the ffi gem. The problem seems to have been fixed here:
https://github.com/ffi/ffi/commit/9a2368651fa8fe5a3e8504ccd08b3ce9afbe0a46

We're going to upgrade and see how it goes. Please feel free to close this out if you agree with my findings. Thanks everyone!

Updated by byroot (Jean Boussier) 3 months ago

  • Status changed from Open to Third Party's Issue

Yep, it's a bug in ffi or a gem using ffi.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0