rails / tailwindcss-rails

Other
1.37k stars 165 forks source link

`rails tailwindcss:build` causes Segmentation fault for Ruby 3.3.0 on aarch64-linux #317

Closed ttanimichi closed 6 months ago

ttanimichi commented 6 months ago

repo: https://github.com/ttanimichi/segv_ruby330_tailwind

This ticket might be related. The steps to reproduce are as follows:

$ rails -v
Rails 7.1.2

$ rails new --css=tailwind --javascript=esbuild segv_ruby330_tailwind

$ cd segv_ruby330_tailwind/

$ cp ../Dockerfile .

$ cat Dockerfile
# syntax=docker/dockerfile:1.4

FROM ruby:3.3.0
RUN apt-get update -qq && apt-get install -y nodejs npm
WORKDIR /segv_ruby330_tailwind

COPY . /segv_ruby330_tailwind

RUN bundle install
RUN bin/rails tailwindcss:build

$ docker build .
[+] Building 16.2s (14/14) FINISHED                                                                                                                                                           docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                                                                          0.0s
 => => transferring dockerfile: 649B                                                                                                                                                                          0.0s
 => [internal] load .dockerignore                                                                                                                                                                             0.0s
 => => transferring context: 745B                                                                                                                                                                             0.0s
 => resolve image config for docker.io/docker/dockerfile:1.4                                                                                                                                                  2.4s
 => [auth] docker/dockerfile:pull token for registry-1.docker.io                                                                                                                                              0.0s
 => CACHED docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24ef1a0dbc                                                                             0.0s
 => [internal] load metadata for docker.io/library/ruby:3.3.0                                                                                                                                                 1.9s
 => [auth] library/ruby:pull token for registry-1.docker.io                                                                                                                                                   0.0s
 => [1/6] FROM docker.io/library/ruby:3.3.0@sha256:5cd4f43195c6dd1190f2652b0ff9ef42ea496a80ba11150677c1daf61883f736                                                                                           0.0s
 => [internal] load build context                                                                                                                                                                             0.1s
 => => transferring context: 96.76kB                                                                                                                                                                          0.0s
 => CACHED [2/6] RUN apt-get update -qq && apt-get install -y nodejs npm                                                                                                                                      0.0s
 => [3/6] WORKDIR /segv_ruby330_tailwind                                                                                                                                                                      0.0s
 => [4/6] COPY . /segv_ruby330_tailwind                                                                                                                                                                       0.0s
 => [5/6] RUN bundle install                                                                                                                                                                                 11.2s
 => ERROR [6/6] RUN bin/rails tailwindcss:build                                                                                                                                                               0.5s
------
 > [6/6] RUN bin/rails tailwindcss:build:
0.441 /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:14: [BUG] Segmentation fault at 0x0072ffff84c906c0
0.441 ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [aarch64-linux]
0.441
0.441 -- Control frame information -----------------------------------------------
0.441 c:0100 p:---- s:0565 e:000564 CFUNC  :resume
0.441 c:0099 p:0007 s:0561 E:000b80 BLOCK  /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:14 [FINISH]
0.441 c:0098 p:---- s:0558 e:000557 CFUNC  :synchronize
0.441 c:0097 p:0026 s:0554 E:001ff8 METHOD /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:12
0.441 c:0096 p:0007 s:0549 e:000548 CLASS  /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:18
0.441 c:0095 p:0025 s:0546 e:000545 TOP    /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:5 [FINISH]
0.441 c:0094 p:---- s:0543 e:000542 CFUNC  :require
0.441 c:0093 p:0030 s:0538 e:000537 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0092 p:0158 s:0532 e:000531 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0091 p:0041 s:0522 e:000521 TOP    /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:7 [FINISH]
0.441 c:0090 p:---- s:0519 e:000518 CFUNC  :require
0.441 c:0089 p:0030 s:0514 e:000513 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0088 p:0158 s:0508 e:000507 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0087 p:0047 s:0498 e:000497 TOP    /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomics.rb:8 [FINISH]
0.441 c:0086 p:---- s:0495 e:000494 CFUNC  :require
0.441 c:0085 p:0030 s:0490 e:000489 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0084 p:0158 s:0484 e:000483 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0083 p:0029 s:0474 e:000473 TOP    /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent.rb:6 [FINISH]
0.441 c:0082 p:---- s:0471 e:000470 CFUNC  :require
0.441 c:0081 p:0030 s:0466 e:000465 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0080 p:0158 s:0460 e:000459 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0079 p:0005 s:0450 e:000449 TOP    /usr/local/bundle/gems/tzinfo-2.0.6/lib/tzinfo/string_deduper.rb:4 [FINISH]
0.441 c:0078 p:---- s:0447 e:000446 CFUNC  :require_relative
0.441 c:0077 p:0025 s:0442 e:000441 TOP    /usr/local/bundle/gems/tzinfo-2.0.6/lib/tzinfo.rb:25 [FINISH]
0.441 c:0076 p:---- s:0439 e:000438 CFUNC  :require
0.441 c:0075 p:0030 s:0434 e:000433 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0074 p:0158 s:0428 e:000427 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0073 p:0005 s:0418 e:000417 TOP    /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/values/time_zone.rb:3 [FINISH]
0.441 c:0072 p:---- s:0415 e:000414 CFUNC  :require
0.441 c:0071 p:0030 s:0410 e:000409 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0070 p:0158 s:0404 e:000403 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0069 p:0017 s:0394 e:000393 TOP    /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/core_ext/time/conversions.rb:5 [FINISH]
0.441 c:0068 p:---- s:0391 e:000390 CFUNC  :require
0.441 c:0067 p:0030 s:0386 e:000385 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0066 p:0158 s:0380 e:000379 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0065 p:0065 s:0370 e:000369 TOP    /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/core_ext/object/json.rb:14 [FINISH]
0.441 c:0064 p:---- s:0367 e:000366 CFUNC  :require
0.441 c:0063 p:0030 s:0362 e:000361 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0062 p:0158 s:0356 e:000355 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0061 p:0005 s:0346 e:000345 TOP    /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/json/encoding.rb:3 [FINISH]
0.441 c:0060 p:---- s:0343 e:000342 CFUNC  :require
0.441 c:0059 p:0030 s:0338 e:000337 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0058 p:0158 s:0332 e:000331 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0057 p:0011 s:0322 e:000321 TOP    /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/json.rb:4 [FINISH]
0.441 c:0056 p:---- s:0319 e:000318 CFUNC  :require
0.441 c:0055 p:0030 s:0314 e:000313 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0054 p:0158 s:0308 e:000307 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0053 p:0011 s:0298 e:000297 TOP    /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/messages/metadata.rb:4 [FINISH]
0.441 c:0052 p:---- s:0295 e:000294 CFUNC  :require_relative
0.441 c:0051 p:0011 s:0290 e:000289 TOP    /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/messages/codec.rb:4 [FINISH]
0.441 c:0050 p:---- s:0287 e:000286 CFUNC  :require
0.441 c:0049 p:0030 s:0282 e:000281 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0048 p:0158 s:0276 e:000275 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0047 p:0023 s:0266 e:000265 TOP    /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/message_encryptor.rb:6 [FINISH]
0.441 c:0046 p:---- s:0263 e:000262 CFUNC  :require
0.441 c:0045 p:0030 s:0258 e:000257 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0044 p:0158 s:0252 e:000251 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0043 p:0017 s:0242 e:000241 TOP    /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/encrypted_file.rb:5 [FINISH]
0.441 c:0042 p:---- s:0239 e:000238 CFUNC  :require
0.441 c:0041 p:0030 s:0234 e:000233 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0040 p:0158 s:0228 e:000227 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0039 p:0011 s:0218 e:000217 TOP    /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/encrypted_configuration.rb:4 [FINISH]
0.441 c:0038 p:---- s:0215 e:000214 CFUNC  :require
0.441 c:0037 p:0030 s:0210 e:000209 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.441 c:0036 p:0158 s:0204 e:000203 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.441 c:0035 p:0041 s:0194 e:000193 TOP    /usr/local/bundle/gems/railties-7.1.2/lib/rails/application.rb:9 [FINISH]
0.441 c:0034 p:---- s:0191 e:000190 CFUNC  :require
0.441 c:0033 p:0030 s:0186 e:000185 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.442 c:0032 p:0158 s:0180 e:000179 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.442 c:0031 p:0059 s:0170 e:000169 TOP    /usr/local/bundle/gems/railties-7.1.2/lib/rails.rb:15 [FINISH]
0.442 c:0030 p:---- s:0167 e:000166 CFUNC  :require
0.442 c:0029 p:0030 s:0162 e:000161 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.442 c:0028 p:0158 s:0156 e:000155 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.442 c:0027 p:0005 s:0146 e:000145 TOP    /usr/local/bundle/gems/railties-7.1.2/lib/rails/all.rb:5 [FINISH]
0.442 c:0026 p:---- s:0143 e:000142 CFUNC  :require
0.442 c:0025 p:0030 s:0138 e:000137 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.442 c:0024 p:0158 s:0132 e:000131 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.442 c:0023 p:0011 s:0122 e:000121 TOP    /segv_ruby330_tailwind/config/application.rb:3 [FINISH]
0.442 c:0022 p:---- s:0119 e:000118 CFUNC  :require_relative
0.442 c:0021 p:0005 s:0114 e:000113 TOP    /segv_ruby330_tailwind/Rakefile:4 [FINISH]
0.442 c:0020 p:---- s:0111 e:000110 CFUNC  :load
0.442 c:0019 p:0005 s:0106 e:000105 METHOD /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/rake_module.rb:29
0.442 c:0018 p:0143 s:0101 e:000100 METHOD /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:734
0.442 c:0017 p:0003 s:0095 e:000094 BLOCK  /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:126
0.442 c:0016 p:0002 s:0092 e:000091 METHOD /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:208
0.442 c:0015 p:0004 s:0087 e:000086 METHOD /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:125
0.442 c:0014 p:0021 s:0083 e:000082 BLOCK  /usr/local/bundle/gems/railties-7.1.2/lib/rails/commands/rake/rake_command.rb:43
0.442 c:0013 p:0023 s:0079 e:000078 METHOD /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/rake_module.rb:59
0.442 c:0012 p:0021 s:0073 e:000072 METHOD /usr/local/bundle/gems/railties-7.1.2/lib/rails/commands/rake/rake_command.rb:41
0.442 c:0011 p:0010 s:0066 e:000065 METHOD /usr/local/bundle/gems/railties-7.1.2/lib/rails/commands/rake/rake_command.rb:20
0.442 c:0010 p:0032 s:0059 e:000058 METHOD /usr/local/bundle/gems/railties-7.1.2/lib/rails/command.rb:156
0.442 c:0009 p:0035 s:0052 e:000051 BLOCK  /usr/local/bundle/gems/railties-7.1.2/lib/rails/command.rb:73
0.442 c:0008 p:0015 s:0049 e:000048 METHOD /usr/local/bundle/gems/railties-7.1.2/lib/rails/command.rb:149
0.442 c:0007 p:0048 s:0043 e:000042 METHOD /usr/local/bundle/gems/railties-7.1.2/lib/rails/command.rb:69
0.442 c:0006 p:0038 s:0032 e:000031 TOP    /usr/local/bundle/gems/railties-7.1.2/lib/rails/commands.rb:18 [FINISH]
0.442 c:0005 p:---- s:0027 e:000026 CFUNC  :require
0.442 c:0004 p:0030 s:0022 e:000021 BLOCK  /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74
0.442 c:0003 p:0158 s:0016 e:000015 METHOD /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32
0.442 c:0002 p:0024 s:0006 e:000005 EVAL   bin/rails:4 [FINISH]
0.442 c:0001 p:0000 s:0003 E:001fd0 DUMMY  [FINISH]
0.442
0.442 -- Ruby level backtrace information ----------------------------------------
0.442 bin/rails:4:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/railties-7.1.2/lib/rails/commands.rb:18:in `<main>'
0.442 /usr/local/bundle/gems/railties-7.1.2/lib/rails/command.rb:69:in `invoke'
0.442 /usr/local/bundle/gems/railties-7.1.2/lib/rails/command.rb:149:in `with_argv'
0.442 /usr/local/bundle/gems/railties-7.1.2/lib/rails/command.rb:73:in `block in invoke'
0.442 /usr/local/bundle/gems/railties-7.1.2/lib/rails/command.rb:156:in `invoke_rake'
0.442 /usr/local/bundle/gems/railties-7.1.2/lib/rails/commands/rake/rake_command.rb:20:in `perform'
0.442 /usr/local/bundle/gems/railties-7.1.2/lib/rails/commands/rake/rake_command.rb:41:in `with_rake'
0.442 /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/rake_module.rb:59:in `with_application'
0.442 /usr/local/bundle/gems/railties-7.1.2/lib/rails/commands/rake/rake_command.rb:43:in `block in with_rake'
0.442 /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:125:in `load_rakefile'
0.442 /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:208:in `standard_exception_handling'
0.442 /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:126:in `block in load_rakefile'
0.442 /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:734:in `raw_load_rakefile'
0.442 /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/rake_module.rb:29:in `load_rakefile'
0.442 /usr/local/lib/ruby/gems/3.3.0/gems/rake-13.1.0/lib/rake/rake_module.rb:29:in `load'
0.442 /segv_ruby330_tailwind/Rakefile:4:in `<main>'
0.442 /segv_ruby330_tailwind/Rakefile:4:in `require_relative'
0.442 /segv_ruby330_tailwind/config/application.rb:3:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/railties-7.1.2/lib/rails/all.rb:5:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/railties-7.1.2/lib/rails.rb:15:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/railties-7.1.2/lib/rails/application.rb:9:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/encrypted_configuration.rb:4:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/encrypted_file.rb:5:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/message_encryptor.rb:6:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/messages/codec.rb:4:in `<main>'
0.442 /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/messages/codec.rb:4:in `require_relative'
0.442 /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/messages/metadata.rb:4:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/json.rb:4:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/json/encoding.rb:3:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/core_ext/object/json.rb:14:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/core_ext/time/conversions.rb:5:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/values/time_zone.rb:3:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/tzinfo-2.0.6/lib/tzinfo.rb:25:in `<main>'
0.442 /usr/local/bundle/gems/tzinfo-2.0.6/lib/tzinfo.rb:25:in `require_relative'
0.442 /usr/local/bundle/gems/tzinfo-2.0.6/lib/tzinfo/string_deduper.rb:4:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent.rb:6:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomics.rb:8:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:7:in `<main>'
0.442 /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
0.442 /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
0.442 /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:5:in `<main>'
0.442 /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:18:in `<module:Concurrent>'
0.442 /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:12:in `mutex_owned_per_thread?'
0.442 /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:12:in `synchronize'
0.442 /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:14:in `block in mutex_owned_per_thread?'
0.442 /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:14:in `resume'
0.442
0.442 -- Threading information ---------------------------------------------------
0.442 Total ractor count: 1
0.442 Ruby thread count for this ractor: 1
0.442
0.442 -- Machine register context ------------------------------------------------
0.442   x0: 0x0000aaaacb211b50  x1: 0x0000aaaacbe5e5e0  x2: 0x0000ffffc1bc6500
0.442   x3: 0x0000ffff6a98ff60  x4: 0x0000ffff6a990018  x5: 0x0000ffff6a9b0000
0.442   x6: 0x0000ffff851e7b88  x7: 0x0000000000000000 x18: 0x0000000000000000
0.442  x19: 0x0000000000000000 x20: 0x0000000000000000 x21: 0x0000000000000000
0.442  x22: 0x0000000000000000 x23: 0x0000000000000000 x24: 0x0000000000000000
0.442  x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000
0.442  x28: 0x0000000000000000 x29: 0x0000000000000000  sp: 0x0000ffff6a990000
0.442  fau: 0x0072ffff84c906c0
0.442
0.442 -- C level backtrace information -------------------------------------------
0.446 Segmentation fault
------
Dockerfile:10
--------------------
   8 |
   9 |     RUN bundle install
  10 | >>> RUN bin/rails tailwindcss:build
  11 |
--------------------
ERROR: failed to solve: process "/bin/sh -c bin/rails tailwindcss:build" did not complete successfully: exit code: 139
exit status: 1
flavorjones commented 6 months ago

@ttanimichi Sorry you're having a problem, I'll try to help.

This command:

rails new --css=tailwind --javascript=esbuild segv_ruby330_tailwind

does not add tailwindcss-rails to your app (check your Gemfile). The stack trace in the crash report does not include any code from tailwindcss-rails.

Can you help me understand why you think this gem is causing the problem you're seeing?

flavorjones commented 6 months ago

I think you're right that https://bugs.ruby-lang.org/issues/20085 is the root cause here; the line in concurrent-ruby that segfaulted is

      Fiber.new { mutex.owned? }.resume

so I'm going to close this as unrelated to tailwindcss-rails. Hopefully the fix gets released in ruby 3.3.1 soon! :crossed_fingers:

ttanimichi commented 6 months ago

Oh? I didn't realize that the latest version of Rails no longer uses tailwindcss-rails (I thought Rails used to depend on it)