From: "Benoit_Tigeot (Benoit Tigeot) via ruby-core" <ruby-core@...>
Date: 2025-01-24T12:11:35+00:00
Subject: [ruby-core:120781] [Ruby master Bug#21021] "try to mark T_NONE object" with 3.4.1

Issue #21021 has been updated by Benoit_Tigeot (Benoit Tigeot).


I started again with a fresh build with the last [two patch proposals[(https://github.com/ruby/ruby/compare/master...benoittgt:ruby:crash-on-t_none). Yjit is enable in dev mode, bootsnap too (`ruby 3.4.1 (2025-01-23 revision e4722fe585) +YJIT dev +PRISM [x86_64-linux]`). Our build process is complicated so I started from scratch I think the last crash report is interesting. It reports Alan patch proposal. https://gist.github.com/benoittgt/141abcef14a78b97e637c677bae12eca

byroot (Jean Boussier) wrote in #note-18:
> Looks like it crash while compiling your `app/models/kubernetes_item.rb`. Are you able to reproduce this consistently?

That's the main issue. It's random. Sometimes is on every cron task every 30min, sometimes once for few hours. I added logs to try to narrow the issue but similar logs are repeated thousands of time before the crash. [kubernetes_item.rb](https://gist.github.com/benoittgt/2c29c1c29ab3bdca7cdac67472c9e920) use `psych` and `YAML.load(content, permitted_classes: [Time, Symbol, Date])`. I am wondering if this could be the issue, for example for a very specific YAML. If I increase concurency with `Concurrent::FixedThreadPool.new(20)` and `Concurrent::Future.execute(executor: pool) do` it seems I can increase the chance of crash.

alanwu (Alan Wu) wrote in #note-19:
> Are you able to crash it without bootsnap?

I'm gonna try now.

alanwu (Alan Wu) wrote in #note-19:
> You can also try enabling GC.stress for just the body of the filed `require`d.

Using `GC.stress` complelty block the app. Locally I'm getting quickly 100% CPU usage from the Ruby process.

----------------------------------------
Bug #21021: "try to mark T_NONE object" with 3.4.1
https://bugs.ruby-lang.org/issues/21021#change-111649

* Author: Benoit_Tigeot (Benoit Tigeot)
* Status: Open
* ruby -v: ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +YJIT +PRISM [x86_64-linux]                                                                                                                                  ���
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Hello

We upgraded to 3.4.1 yesterday but we are seeing crash since then.

```
/bundle/ruby/3.4.0/gems/activejob-7.2.2.1/lib/active_job/enqueuing.rb:93: [BUG] try to mark T_NONE object
```

I saw the other issue related to ffi gem https://bugs.ruby-lang.org/issues/20694

But in our case the `C level backtrace information` looks different.

https://gist.github.com/benoittgt/13507c2000281aa7740bc782adab68c5


We migrated this part of the code to parallel->concurrent-ruby and we do not see the error yet again but I am a little bit worried we could see the issue again. 



-- 
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/lists/ruby-core.ml.ruby-lang.org/