Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault #633

Open
9mm opened this issue Oct 8, 2019 · 24 comments
Open

Segfault #633

9mm opened this issue Oct 8, 2019 · 24 comments

Comments

@9mm
Copy link

9mm commented Oct 8, 2019

I received a Segfault after upgrading to sprockets 4.0. I haven't gotten the error again, but I wanted to post it anyway. I'm not sure if this is the best spot for this, or if it needs to go under the sassc gem.

System configuration

  • Sprockets version 4.0.0
  • Ruby version 2.6.5
 Rendered dashboard/summary/index.html.erb within layouts/application (Duration: 40.0ms | Allocations: 22075)
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/engine.rb:42: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin18]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   for more details.
Don't forget to include the above Crash Report log file in bug reports.

-- Control frame information -----------------------------------------------
c:0046 p:---- s:0336 e:000335 CFUNC  :compile_data_context
c:0045 p:0298 s:0331 E:0020a0 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/engine.rb:42
c:0044 p:0006 s:0319 E:0021a0 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-rails-2.1.2/lib/sassc/rails/template.rb:40
c:0043 p:0028 s:0316 E:002158 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/utils.rb:138
c:0042 p:0164 s:0309 E:0020e8 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-rails-2.1.2/lib/sassc/rails/template.rb:39
c:0041 p:0053 s:0300 E:0021a0 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:84
c:0040 p:0016 s:0292 E:002210 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:66 [FINISH]
c:0039 p:---- s:0287 e:000286 CFUNC  :reverse_each
c:0038 p:0039 s:0283 E:0021e0 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65
c:0037 p:0015 s:0275 E:002240 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:22
c:0036 p:0013 s:0270 E:002268 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:33
c:0035 p:0053 s:0265 E:0022b0 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:84
c:0034 p:0016 s:0257 E:002320 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:66 [FINISH]
c:0033 p:---- s:0252 e:000251 CFUNC  :reverse_each
c:0032 p:0039 s:0248 E:0022f0 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65
c:0031 p:0476 s:0240 E:0023d0 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:182
c:0030 p:0073 s:0218 E:002458 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:59
c:0029 p:0038 s:0212 E:0024e0 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:335
c:0028 p:0157 s:0202 E:002418 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:43
c:0027 p:0022 s:0193 E:002508 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/cached_environment.rb:44
c:0026 p:0111 s:0185 E:0025a0 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/bundle.rb:27
c:0025 p:0053 s:0167 E:0025e0 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:84
c:0024 p:0016 s:0159 E:002650 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:66 [FINISH]
c:0023 p:---- s:0154 e:000153 CFUNC  :reverse_each
c:0022 p:0039 s:0150 E:002620 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65
c:0021 p:0476 s:0142 E:002700 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:182
c:0020 p:0073 s:0120 E:000078 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:59
c:0019 p:0038 s:0114 E:000100 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:335
c:0018 p:0157 s:0104 E:000038 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:43
c:0017 p:0022 s:0095 E:000128 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/cached_environment.rb:44
c:0016 p:0037 s:0087 E:000170 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/base.rb:81
c:0015 p:0027 s:0079 E:0001f8 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/base.rb:88
c:0014 p:0010 s:0068 E:001510 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/manifest.rb:125
c:0013 p:0021 s:0065 E:000270 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/safe_task_executor.rb
c:0012 p:0003 s:0058 E:002160 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/mutex_lockable [FINISH]
c:0011 p:---- s:0055 e:000054 CFUNC  :synchronize
c:0010 p:0018 s:0051 E:001c20 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/mutex_lockable
c:0009 p:0005 s:0047 E:000228 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/safe_task_executor.rb
c:0008 p:0023 s:0042 E:0002d8 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/promise.rb:563
c:0007 p:0009 s:0036 E:000320 METHOD /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_exec
c:0006 p:0049 s:0028 E:000398 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_exec [FINISH]
c:0005 p:---- s:0022 e:000021 CFUNC  :loop
c:0004 p:0006 s:0018 E:002110 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_exec [FINISH]
c:0003 p:---- s:0015 e:000014 CFUNC  :catch
c:0002 p:0020 s:0010 E:000360 BLOCK  /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_exec [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `block in create_worker'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `catch'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `block (2 levels) in create_worker'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `loop'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in `block (3 levels) in create_worker'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in `run_task'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/promise.rb:563:in `block in realize'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/safe_task_executor.rb:19:in `execute'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/mutex_lockable_object.rb:41:in `block in synchronize'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/safe_task_executor.rb:24:in `block in execute'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/manifest.rb:125:in `block (2 levels) in find'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/base.rb:88:in `find_all_linked_assets'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/base.rb:81:in `find_asset'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/cached_environment.rb:44:in `load'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:43:in `load'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:335:in `fetch_asset_from_dependency_cache'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:59:in `block in load'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:182:in `load_from_unloaded'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65:in `call_processors'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65:in `reverse_each'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:84:in `call_processor'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/bundle.rb:27:in `call'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/cached_environment.rb:44:in `load'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:43:in `load'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:335:in `fetch_asset_from_dependency_cache'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:59:in `block in load'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:182:in `load_from_unloaded'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65:in `call_processors'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65:in `reverse_each'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:84:in `call_processor'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:33:in `call'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:22:in `block in <class:CompositeProcessor>'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65:in `call_processors'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65:in `reverse_each'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:84:in `call_processor'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-rails-2.1.2/lib/sassc/rails/template.rb:39:in `call'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/utils.rb:138:in `module_include'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-rails-2.1.2/lib/sassc/rails/template.rb:40:in `block in call'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/engine.rb:42:in `render'
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/engine.rb:42:in `compile_data_context'

-- Machine register context ------------------------------------------------
 rax: 0x00007f9b2eb04100 rbx: 0x00007f9b2eb04118 rcx: 0x6be10b18a8aa008e
 rdx: 0x6be10b18a8aa008e rdi: 0x000070000a5ca7f0 rsi: 0x000070000a5ca7f0
 rbp: 0x000070000a5cb1d0 rsp: 0x000070000a5ca820  r8: 0x00007f9b26ad4328
  r9: 0x00007f9b2b3dadd0 r10: 0x0000000107cd3e68 r11: 0x0000000107cd3e30
 r12: 0x0000000000000000 r13: 0x00007f9b2eb5e950 r14: 0x0000000000000000
 r15: 0x00007f9b2ebf0920 rip: 0x0000000107e59b36 rfl: 0x0000000000010293

-- C level backtrace information -------------------------------------------
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_vm_bugreport+0x82) [0x1045e7ad2]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_bug_context+0x1d6) [0x1044372d6]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(sigsegv+0x51) [0x10454ca01]
/usr/lib/system/libsystem_platform.dylib(_sigtramp+0x1d) [0x7fff656ceb1d]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/libsass.bundle(_ZN4Sass4EvalclEPNS_13Function_CallE+0x2da6) [0x107e59b36]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/libsass.bundle(0x107e6f40d) [0x107e6f40d]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/libsass.bundle(0x107e7e490) [0x107e7e490]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/libsass.bundle(0x107e6c53b) [0x107e6c53b]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/libsass.bundle(0x107e6d1c6) [0x107e6d1c6]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/libsass.bundle(0x107e7e490) [0x107e7e490]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/libsass.bundle(0x107e6c53b) [0x107e6c53b]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/libsass.bundle(0x107d2c7b3) [0x107d2c7b3]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/libsass.bundle(0x107d32080) [0x107d32080]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/libsass.bundle(0x107e48e5a) [0x107e48e5a]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/libsass.bundle(0x107e48bea) [0x107e48bea]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/lib/ffi_c.bundle(ffi_call_unix64+0x55) [0x107cd3c6d]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/lib/ffi_c.bundle(0x107cd2e4b) [0x107cd2e4b]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/lib/ffi_c.bundle(0x107cd2996) [0x107cd2996]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/lib/ffi_c.bundle(rbffi_CallFunction+0xde) [0x107cc767e]
/Users/9mm/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/lib/ffi_c.bundle(custom_trampoline+0x19) [0x107ccb249]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_call_cfunc+0x156) [0x1045da3b6]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_exec_core+0x33ea) [0x1045c0fda]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_vm_exec+0xac4) [0x1045d4df4]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_yield+0x9e) [0x1045cdf9e]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_ary_reverse_each+0x8b) [0x1043b588b]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_call_cfunc+0x156) [0x1045da3b6]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_exec_core+0x3153) [0x1045c0d43]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_vm_exec+0xac4) [0x1045d4df4]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_yield+0x9e) [0x1045cdf9e]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_ary_reverse_each+0x8b) [0x1043b588b]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_call_cfunc+0x156) [0x1045da3b6]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_exec_core+0x3153) [0x1045c0d43]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_vm_exec+0xac4) [0x1045d4df4]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_yield+0x9e) [0x1045cdf9e]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_ary_reverse_each+0x8b) [0x1043b588b]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_call_cfunc+0x156) [0x1045da3b6]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_exec_core+0x3153) [0x1045c0d43]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_vm_exec+0xac4) [0x1045d4df4]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_yield+0x9e) [0x1045cdf9e]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_ensure+0xf5) [0x104442df5]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_call_cfunc+0x156) [0x1045da3b6]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_exec_core+0x3153) [0x1045c0d43]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_vm_exec+0xac4) [0x1045d4df4]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(loop_i+0x23) [0x1045e39c3]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_rescue2+0x155) [0x1044429b5]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_call_cfunc+0x156) [0x1045da3b6]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_exec_core+0x3153) [0x1045c0d43]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_vm_exec+0xac4) [0x1045d4df4]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(catch_i+0x5e) [0x1045e394e]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_catch_protect+0xd5) [0x1045d02c5]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_f_catch+0x57) [0x1045d0aa7]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_call_cfunc+0x156) [0x1045da3b6]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(vm_exec_core+0x3153) [0x1045c0d43]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(rb_vm_exec+0xac4) [0x1045d4df4]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(thread_do_start+0x2e8) [0x1045929c8]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(thread_start_func_2+0x1f5) [0x1045923b5]
/Users/9mm/.rbenv/versions/2.6.5/bin/ruby(thread_start_func_1+0x117) [0x104591fe7]
/usr/lib/system/libsystem_pthread.dylib(_pthread_start+0x7d) [0x7fff656d9d76]

-- Other runtime information -----------------------------------------------

* Loaded script: puma: cluster worker 1: 45174 [app]

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so
    4 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/x86_64-darwin18/enc/encdb.bundle
    5 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/x86_64-darwin18/enc/trans/transdb.bundle
    6 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/x86_64-darwin18/rbconfig.rb
    7 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/compatibility.rb
    8 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/defaults.rb
    9 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/deprecate.rb
   10 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/errors.rb
   11 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/version.rb
   12 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/requirement.rb
   13 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/platform.rb
   14 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/basic_specification.rb
   15 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/stub_specification.rb
   16 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/delegate.rb
   17 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/uri/rfc2396_parser.rb
   18 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/uri/rfc3986_parser.rb
   19 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/uri/common.rb
   20 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/uri/generic.rb
   21 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/uri/file.rb
   22 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/uri/ftp.rb
   23 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/uri/http.rb
   24 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/uri/https.rb
   25 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/uri/ldap.rb
   26 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/uri/ldaps.rb
   27 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/uri/mailto.rb
   28 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/uri.rb
   29 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/specification_policy.rb
   30 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/util/list.rb
   31 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/x86_64-darwin18/stringio.bundle
   32 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/specification.rb
   33 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/exceptions.rb
   34 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/util.rb
   35 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/bundler_version_finder.rb
   36 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/dependency.rb
   37 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/core_ext/kernel_gem.rb
   38 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/monitor.rb
   39 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb
   40 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/core_ext/kernel_warn.rb
   41 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems.rb
   42 /Users/9mm/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/path_support.rb

   ... 5000 more lines ...

@kernow
Copy link

kernow commented Oct 19, 2019

Looks like this could be the same issue sass/sassc-rails#122

@bigmonkey
Copy link

bigmonkey commented Oct 20, 2019

I got the same error after upgrading to 4.0.0 but it is inconsistent. The consistent bug was stylesheet variables set in one sheet were not recognized:

ActionView::Template::Error (Error: Undefined variable:

After running rake assets:clobber I got the exact same error message as @9mm (Control frame and Ruby level backtrace) so am not re-posting. That error showed up once and then I got the ActionView::Template::Error again.

Going back to 'sprockets', '3.7.2' fixed the problem.

My setup when the error occurred

ruby 2.6.4
rails 5.2.3
sass-rails 6.0.0
sprockets 4.0.0

@tjwallace
Copy link

We only see the segfault with 5.3.x linux kernels. On 4.15.x linux kernels we don't have the error. Downgrading to 3.7.2 fixes on 5.3.x kernels.

@vinc
Copy link

vinc commented Nov 13, 2019

Can confirm the segfault with 5.3.7 kernel on Arch Linux.

@Lukom
Copy link

Lukom commented Nov 15, 2019

I had a similar segmentation fault issue caused by asset_path call after upgrading to sprockets 4.0.0, though I was able to fix the issue by downgrading sassc gem from 2.2.1 to 2.1.0

@adesurirey
Copy link

Downgrading sassc didn't work for me, had to revert the sproket upgrade

@bartoszkopinski
Copy link

Removing this line from assets.rb worked for me:

Rails.application.config.assets.precompile += %w(manifest.js)

@kernow
Copy link

kernow commented Nov 21, 2019

Removing this line from assets.rb worked for me:

Rails.application.config.assets.precompile += %w(manifest.js)

This does not resolve the problem for us, we followed the upgrade guide when upgrading which states to switch to using a manifest file https://github.com/rails/sprockets/blob/master/UPGRADING.md#manifestjs so never attempted to run it with Rails.application.config.assets.precompile in the code and still encountered this issue.

@epipheus
Copy link

epipheus commented Dec 3, 2019

I don't know if this is helpful, but I can tell you how I tracked down my problem. Maybe it will help you, because I'm my case it was a ridiculous needle in the haystack. I used gemified assets on my large projects so it was particularly hard to track down especially since other projects used the same pack of assets. I went old-school and forked sassc-ruby and printed debug messages before the offending line.

Looking at my own segfault and others’, the offending line is almost always this line in the sassc-ruby engine

I went old-school and printed a few debug messages before the offending line

status = Native.compile_data_context(data_context)

As for instance variable, in my case:

  • filename is almost always empty
  • context and data_context, native_options all hold FFI pointers with the same address
  • options almost always just has {style: :compressed} in it

Sadly the only useful instance variable seems to be template which holds the contents of the asset (css or scsss). Luckily enough for me it was a vendor css file with it’s name at the top. I went to that file exactly to see what was wrong and turns out that the file name was blah.css but it was edited to have asset_url helpers in it. Literally just renaming the file to blah.scss meant all of my assets compiled. And not just for sprockets 3.7.2 but for 4.0.0 as well.

I don’t have much experience binding C and Ruby but seems to me that we need to wrap sassc-ruby’s line:

status = Native.compile_data_context(data_context)

with something that can fail gracefully (?).

Also why aren’t file names non-empty/present? That would help people tremendously to have a mode like rails assets:precompile --verbose that simply prints the current asset being processed so we have a place to look for issues.

Lastly, given css is a subset of scss, would it be a bad idea to import all css as scss/sass, expecially if config.assets.css_compressor = :sass ?

@jnettome
Copy link

jnettome commented Apr 1, 2020

After adding (and downgrading at same time) gem 'sprockets', '3.7.2' to my Gemfile, on my Rails 6 app, it works again. 👊

@dmz006
Copy link

dmz006 commented Apr 4, 2020

I just downgraded to 3.7.2 and it fixed things. I noticed before the memory dump the last line in the trace was coffee_script.rb. What else can we provide to help trace this?

@albb0920
Copy link

I also have this issue when using with sassc_rails.

I need to access a variable that is defined in scss by a gem.
When first importing the gem, then import my file, I got "Error: Undefined variable".
When I try to import the gem again in my file, I got segment fault.

Setting export_concurrent = false didn't help, downgrade to 3.7.2 fixed everything.

@optijon
Copy link

optijon commented Jun 3, 2020

I've been able to repro this reliably on OSX.

With sprockets 4.0.0, delete the tmp/cache directory. Run rake assets:precompile you should see the segfault error. Run rake assets:precompile again and it should succeed successfully. If you delete the tmp/cache directory again, which looks like it now contains sprocket assets, it will fail. Downgrading to 3.7.2 fixes the issue.

Please let me know if you need any additional information.

@CaptainAwesomeDi
Copy link

CaptainAwesomeDi commented Jul 10, 2020

can confirm Segfault seeing on Rails 5.2.4.3 with Sprocket 4.0.2 ruby version 2.6.5. like the post said. i was running rspec with render_option
sassc version 2.4.0

@gertjanjansen
Copy link

I've experienced this issue with different rails projects with Docker on Linux, not on MacOS. For me, upgrading to sassc 2.4.0 solved the issue.

@ingedmundo
Copy link

Downgrading spockets to 3.7.2 also worked for me.

@Uysim
Copy link

Uysim commented Aug 21, 2020

Downgrading spockets to 3.7.2 also worked for me too.
Hope it can be fix in the latest version soon.

@schneems
Copy link
Member

There's basically nothing I can do without an example app. I'll need an example app that reproduces the behavior (https://www.codetriage.com/example_app). Otherwise i'll need to close the issue.

@schneems
Copy link
Member

Might be related to #581 which has a PR

@rlgreen91
Copy link

rlgreen91 commented Feb 6, 2021

Chiming in to say that this is an issue for me as well, using Ruby 2.6.6 and Rails 5.0.7. I'm on the latest version of Sprockets and sassc. I'm still getting segfaults when trying to run tests locally, even with the recommended fix to disable concurrent asset compilation. Also my Linux kernel is 5.4.72-microsoft-standard-WSL2.

Piping back in to say that this may also prevent us from upgrading to the heroku-20 stack on Heroku, as that also uses Ubuntu 20.04, which appears to use Linux kernel version 5.4+ as the default.

As for an example app, I can offer EBWiki - if you clone the repo and run rspec spec/requests/cases_spec.rb you will consistently see a segfault error.

@mockdeep
Copy link

mockdeep commented Feb 7, 2021

For what it's worth, we needed to set export_concurrent = false in a block:

Rails.application.config.assets.configure do |env|
  env.export_concurrent = false
end

I'm not sure what the difference is, but setting it in a one-liner did not make a difference.

# THIS DOES NOT WORK
Rails.application.config.assets.export_concurrent = false

@rlgreen91
Copy link

Yes, I want to confirm that nesting that setting did in fact resolve the issue with segfaults. I'm honestly not sure why.

damianlegawiec added a commit to spree/spree that referenced this issue Mar 7, 2021
damianlegawiec added a commit to spree/spree that referenced this issue Mar 23, 2021
shaun-technovation added a commit to Iridescent-CM/technovation-app that referenced this issue Aug 5, 2021
Various suggestions to downgrade sprockets to fix a segfault crash:

sass/sassc-ruby#207
sass/sassc-rails#122
rails/sprockets#633

We'll see if that fixes it for us.

Refs: #2872
shaun-technovation added a commit to Iridescent-CM/technovation-app that referenced this issue Aug 6, 2021
Various suggestions to downgrade sprockets to fix a segfault crash:

sass/sassc-ruby#207
sass/sassc-rails#122
rails/sprockets#633

We'll see if that fixes it for us.

Refs: #2872
@kyrylo
Copy link

kyrylo commented Jan 14, 2022

@schneems you can find an example app here https://github.com/mvz/example-app-sprockets-crash (crafted by @mvz).

kevindew added a commit to alphagov/govuk_publishing_components that referenced this issue Mar 21, 2022
Using Sassc and Sprockets seems somewhat prone to segmentation faults
which seems to be a common issue with Sprockets 4. As per
rails/sprockets#633 and
sass/sassc-ruby#207, switching concurrent
asset generation seems to resolve the problem. The unproven theory is
that this reflects that Sprockets 4 uses threads which causes problems
for sassc.

A consequence of this is that asset pre-compilation may be slower than
it could be.
kevindew added a commit to alphagov/govuk_publishing_components that referenced this issue Mar 21, 2022
Using Sassc and Sprockets seems somewhat prone to segmentation faults
which seems to be a common issue with Sprockets 4. As per
rails/sprockets#633 and
sass/sassc-ruby#207, switching concurrent
asset generation seems to resolve the problem. The unproven theory is
that this reflects that Sprockets 4 uses threads which causes problems
for sassc.

A consequence of this is that asset pre-compilation may be slower than
it could be.
kevindew added a commit to alphagov/govuk_publishing_components that referenced this issue Mar 21, 2022
Using Sassc and Sprockets seems somewhat prone to segmentation faults
which seems to be a common issue with Sprockets 4. As per
rails/sprockets#633 and
sass/sassc-ruby#207, switching concurrent
asset generation seems to resolve the problem. The unproven theory is
that this reflects that Sprockets 4 uses threads which causes problems
for sassc.

A consequence of this is that asset pre-compilation may be slower than
it could be.
kevindew added a commit to alphagov/govuk_publishing_components that referenced this issue Mar 21, 2022
Using Sassc and Sprockets seems somewhat prone to segmentation faults
which seems to be a common issue with Sprockets 4. As per
rails/sprockets#633 and
sass/sassc-ruby#207, switching concurrent
asset generation seems to resolve the problem. The unproven theory is
that this reflects that Sprockets 4 uses threads which causes problems
for sassc.

A consequence of this is that asset pre-compilation may be slower than
it could be.
kevindew added a commit to alphagov/govuk_publishing_components that referenced this issue Mar 21, 2022
Using Sassc and Sprockets seems somewhat prone to segmentation faults
which seems to be a common issue with Sprockets 4. As per
rails/sprockets#633 and
sass/sassc-ruby#207, switching concurrent
asset generation seems to resolve the problem. The unproven theory is
that this reflects that Sprockets 4 uses threads which causes problems
for sassc.

A consequence of this is that asset pre-compilation may be slower than
it could be.
@cesc1989
Copy link

I know this is old but came across this error today. The way I got it fixed was upgrading Sprockets to 4.2.1 as suggested here

My setup:

  • Rails 7.0.4
  • Ruby 3.0.2
  • sass-rails 6.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.