Project

General

Profile

Actions

Bug #19363

open

Fix rb_transient_heap_mark: wrong header (T_STRUCT) segfault

Added by bkuhlmann (Brooke Kuhlmann) almost 2 years ago. Updated 8 months ago.

Status:
Assigned
Target version:
-
ruby -v:
ruby 3.2.0 (2022-12-25 revision a528908271) +YJIT [arm64-darwin22.2.0]
[ruby-core:111956]

Description

Overview

Hello. 👋 I'm hitting an issue where my build is constantly failing with a segfault. The following is a snippet taken from my local machine with YJIT enabled (see attachments for details):

/Users/bkuhlmann/.cache/frum/versions/3.2.0/lib/ruby/gems/3.2.0/gems/puma-6.0.2/lib/puma/runner.rb: [BUG] rb_transient_heap_mark: wrong header, T_STRUCT (0x0000000109ea98a0)
ruby 3.2.0 (2022-12-25 revision a528908271) +YJIT [arm64-darwin22.2.0]

The closest issue I could find that might be related to this issue (but not sure) is this issue: #15358.

Steps to Recreate

You should be able to quickly recreate this issue via these steps:

  • Download/clone my Hemo project.
  • Run the setup steps.
  • Run the test suite by running bin/rspec.

If you need an example of the same segfault (but not on my macOS machine), you can see the same segfault via my Circle CI Build. My Circle CI build is using my Docker Alpine Linux Ruby image which might be of interest as well. This Docker image is also built with YJIT enabled.

Interestingly, is if you were to run the test suite with bin/guard instead of bin/rspec then the segfault doesn't occur.

Environment

ruby 3.2.0 (2022-12-25 revision a528908271) +YJIT [arm64-darwin22.2.0]

1.43.0 (using Parser 3.2.0.0, rubocop-ast 1.24.1, running on ruby 3.2.0) [arm64-darwin22.2.0]
  - rubocop-performance 1.15.2
  - rubocop-rake 0.6.0
  - rubocop-rspec 2.18.1
  - rubocop-sequel 0.3.4
  - rubocop-thread_safety 0.4.4

Files

segfault.txt (237 KB) segfault.txt Segfault bkuhlmann (Brooke Kuhlmann), 01/21/2023 06:41 PM
ruby-2023-01-21-113841.ips (19.6 KB) ruby-2023-01-21-113841.ips Translated Report bkuhlmann (Brooke Kuhlmann), 01/21/2023 06:42 PM
segv.log (14.7 KB) segv.log wanabe (_ wanabe), 03/26/2023 10:35 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like1Like0Like0Like0Like0Like0Like0