Skip to content

bin/tapioca dsl and bin/tapioca gem --all frequently segfault #2390

@francois

Description

@francois

Hi all! Tapioca frequently segfaults for me. This happens either when using bin/tapioca dsl or bin/tapioca gem --all.

Today was one time too many, and I finally managed to capture STDOUT/STDERR and the crash diagnostic files.

Reproduction

Sadly, I cannot give you a good recipe 😞 I will run the same tapioca dsl command 2, 3, 5 times in a row, and it will succeed after a couple of retries. Today, it took 5 retries to run the dsl subcommand. This morning, Tapioca crashed when I used gem --all while updating signature files for the daily Dependabot upgrade. I think it succeeded on the 2nd attempt.

What I’m running is:

$ bin/tapioca dsl

bin/tapioca is the Bundler-provided binstub:

#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'tapioca' is installed as part of a gem, and
# this file is here to facilitate running it.
#

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
  if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
    load(bundle_binstub)
  else
    abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
  end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("tapioca", "tapioca")

Environment info:

The device is a 2022 M1 MacBook Pro with 32 GB RAM. Monitor says I'm using 24 GB.

$ uname -a
Darwin MacBook-Pro-de-Francois.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000 arm64

$ ruby --version
ruby 3.4.6 (2025-09-16 revision dbd83256b1) +PRISM [arm64-darwin24]

$ bundle show | ag 'rails|sorbet|tapioca'
  * rails (7.2.2.2)
  * sorbet (0.6.12534)
  * sorbet-runtime (0.6.12534)
  * sorbet-static (0.6.12534)
  * sorbet-static-and-runtime (0.6.12534)
  * tapioca (0.17.7)

$ bundle --version
Bundler version 2.5.16

$ gem --version
3.6.9

This ZIP file contains all the *.ips from ~/Library/Logs/DiagnosticReports from today. Included is a rustc one around the time I tried to run tapioca gem --all this morning. I don't know if Tapioca or Sorbet uses Rust?
segfault.zip

ruby -rrbconfig -e 'pp RbConfig::CONFIG' > rbconfig-config.txt generated this file:
rbconfig-config.txt

bin/tapioca dsl 2>&1 | tee tapioca-dsl.log generated this file:
tapioca-dsl.log

I'm hoping this will help someone, because this is clearly out of my depth!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions