sassc-ruby: Segmentation fault when precompiling assets

Sometimes, when I make some changes to my .scss files in my Rails 6 app, I get the following when running rails assets:precompile

Screen Shot 2020-05-14 at 9 45 36 PM

And also, when deploying to Heroku, I get rubyDone in 4.85s. remote: /tmp/build_929254ebef3a89a9f40b4b26f007bde3/vendor/bundle/ruby/2.7.0/gems/sassc-2.3.0/lib/sassc/engine.rb:43: [BUG] Segmentation fault at 0x0000000000000000 remote: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux] -- Control frame information ----------------------------------------------- remote: c:0059 p:---- s:0449 e:000448 CFUNC :compile_data_context remote: c:0058 p:0314 s:0444 e:000443 METHOD /tmp/build_c5dc2802730effed8a887745a1195bb5/vendor/bundle/ruby/2.7.0/gems/sassc-2.3.0/lib/sassc/engine.rb:43 along with Aborted. remote: ! Precompiling assets failed. and it won’t do the deployment successfully. I keep getting

remote:        
remote:        Aborted
remote: 
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !	Push rejected 

I don’t get any other errors, so I think it’s merely related to that compilation thing. I tried upgrading & downgrading the version of the gem but still can’t get it through. I’ve been having this problem a while ago now and it had been sort of random, it wouldn’t show up always, but recently, I get it almost every time I make a CSS change.

Can anybody help me out here? Thanks a lot in advance.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 41
  • Comments: 21

Commits related to this issue

Most upvoted comments

I saw something very similar after upgrading an older app to Sprockets 4, which introduced concurrent asset compilation. I’m guessing that something within sassc-ruby or libsass isn’t thread-safe.

The problem goes away (for me) with Sprockets.export_concurrent = false in an initializer.

Yes, that’s same as doing

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

in the application.rb, but not always works.

I saw something very similar after upgrading an older app to Sprockets 4, which introduced concurrent asset compilation. I’m guessing that something within sassc-ruby or libsass isn’t thread-safe.

The problem goes away (for me) with Sprockets.export_concurrent = false in an initializer.

I had the same issue on Intel Mac using Ruby 2.7.4, Rails 5.0.7.1, Sprockets 3.7.1, sassc 2.0.1, ffi 1.14.2, and libffi 3.4.2.

For me, only updating ffi gem to 1.15.4 fixed the issue. It seems the issue was triggered by a subtle incompatibility among libffi, ffi gem, and sassc native ext.

I believe I’m seeing the same thing while running tests on CircleCI. My test suite runs fine until it hits my integration tests which compile assets.

I’ve tried with these combos: ruby 2.6.6 & sassc 2.4.0 ruby 2.6.6 & sassc 2.3.0

Test output:

# Running:

.........................../home/circleci/project/vendor/bundle/ruby/2.6.0/gems/sassc-2.3.0/lib/sassc/engine.rb:43: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0048 p:---- s:0351 e:000350 CFUNC  :compile_data_context
c:0047 p:0318 s:0346 e:000345 METHOD /home/circleci/project/vendor/bundle/ruby/2.6.0/gems/sassc-2.3.0/lib/sassc/engine.rb:43
c:0046 p:0006 s:0334 e:000333 BLOCK  /home/circleci/project/vendor/bundle/ruby/2.6.0/gems/sassc-rails-2.1.2/lib/sassc/rails/template.rb:40
c:0045 p:0028 s:0331 e:000330 METHOD /home/circleci/project/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/utils.rb:138
c:0044 p:0164 s:0324 e:000323 METHOD /home/circleci/project/vendor/bundle/ruby/2.6.0/gems/sassc-rails-2.1.2/lib/sassc/rails/template.rb:39
c:0043 p:0053 s:0315 e:000314 METHOD /home/circleci/project/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:84
c:0042 p:0016 s:0307 e:000306 BLOCK  /home/circleci/project/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:66 [FINISH]
c:0041 p:---- s:0302 e:000301 CFUNC  :reverse_each
c:0040 p:0039 s:0298 e:000297 METHOD /home/circleci/project/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65
c:0039 p:0015 s:0290 e:000289 BLOCK  /home/circleci/project/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:22
c:0038 p:0013 s:0285 e:000284 METHOD /home/circleci/project/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:33
c:0037 p:0053 s:0280 e:000279 METHOD /home/circleci/project/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:84
c:0036 p:0016 s:0272 e:000271 BLOCK  /home/circleci/project/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:66 [FINISH]
c:0035 p:---- s:0267 e:000266 CFUNC  :reverse_each

@stevenwilliamson I am sympathetic!

I’ve been trying to figure out how to reduce the number of dependencies that I use in Rails, and this is an example of why… I’m maintaining an app that is 8 years old now, and it’s a reminder that while my app may not change, the architectures under it are constantly evolving…

I have created an example app that reproduces this problem: https://github.com/mvz/example-app-sprockets-crash

I was having a similar problem to @rlgreen91, my tests were also failing… And I found that the problem was in my code…

I was @importing a file from a dependency that I was just removed. After I removed the @import the segmentation fault was gone… It was not the best error message jeje, but the error was in my code.

… So if you are reading this thread, because you have a similar error, maybe your problem could also be a bad @import.

I use sass-rails, but stumbled on the same issue after upgrading ruby from 2.7.2 to 2.7.5, using rails 6.0.4.6 and sass-rails 6.0.0. Deleting everything from the assets folder (except config/manifest.js) did not help.

The problem vanished after I downgraded sass-rails to the newest 5.x version (5.1.0). I also had to downgrade sprockets from 4.0.3 to 3.7.2, because sass-rails 5.1.0 requires sprockets version <4.

Just adding another comment saying that disabling the concurrent mode fixes the issue for me. Basically, I did this:

Sprockets.export_concurrent = false if Rails.env.test?

So I can run the tests in my CI job.

I think we can close this issue because this is an issue with Sprockets, not with sassc-ruby.

I can reproduce the crash with Sprockets v3.7.2 and confirmed that it was indeed a thread-safety issue that has now been fixed in Sprockets v4.2.0 via https://github.com/rails/sprockets/pull/759. Those of you having trouble might want to upgrade to v4.2.1. I’m not sure if Sprockets.export_concurrent is still needed, but it might be.

In GitLab, we use Sidekiq to run background jobs to send notification e-mails. I can easily reproduce a seg fault by:

  1. Clear the Sprockets cache: rm -rf tmp/cache/assets/sprockets/v3.0.
  2. Run many instances of the job at the same time. In the Rails console, I scheduled the same job:
20.times { NewIssueWorker.perform_async(1, 1) }

I believe this was happening:

  1. When multiple Sidekiq jobs attempt to render SCSS in notification e-mails, Sprockets invokes SassC::Rails::SassTemplate.call on a singleton object via processor_utils.rb.

  2. Sprockets::Utils.module_include was previously not thread-safe, so the SASS functions list passed to libsass would be corrupted by one thread.

  3. When libasss attempted to look up a SASS function, it would hit a seg fault if the function it needed wasn’t in the list.

The following contains the Ruby and C backtrace:

/home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43: [BUG] Segmentation fault at 0x0000000000000000
ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]

– Control frame information ----------------------------------------------- c:0251 p:---- s:1513 e:001512 CFUNC :compile_data_context c:0250 p:0314 s:1508 E:0013d0 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43 c:0249 p:0004 s:1496 E:0000e0 BLOCK /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-rails-2.1.0/lib/sassc/rails/template.rb:40 c:0248 p:0050 s:1493 E:001888 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/utils.rb:171 c:0247 p:0166 s:1486 E:000748 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-rails-2.1.0/lib/sassc/rails/template.rb:39 c:0246 p:0007 s:1477 E:001568 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/sass_processor.rb:30 c:0245 p:0047 s:1472 E:001c40 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75 c:0244 p:0013 s:1464 E:000920 BLOCK /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57 [FINISH] c:0243 p:---- s:1459 e:001458 CFUNC :reverse_each c:0242 p:0035 s:1455 E:000040 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56 c:0241 p:0337 s:1447 E:001290 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134 c:0240 p:0068 s:1427 E:000cb8 BLOCK /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60 c:0239 p:0033 s:1421 E:0001d0 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317 c:0238 p:0129 s:1411 E:0026b8 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44 c:0237 p:0010 s:1402 E:000ef0 BLOCK /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20 [FINISH] c:0236 p:0007 s:1394 E:001658 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47 c:0235 p:0006 s:1387 E:0019c8 BLOCK /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:23 c:0234 p:0079 s:1383 E:000e28 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/utils.rb:200 c:0233 p:0091 s:1372 E:0000d8 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:24 c:0232 p:0047 s:1357 E:001150 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75 c:0231 p:0013 s:1349 E:000fe0 BLOCK /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57 [FINISH] c:0230 p:---- s:1344 e:001343 CFUNC :reverse_each c:0229 p:0035 s:1340 E:000080 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56 c:0228 p:0337 s:1332 E:001d30 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134 c:0227 p:0068 s:1312 E:002078 BLOCK /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60 c:0226 p:0033 s:1306 E:001250 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317 c:0225 p:0129 s:1296 E:000138 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44 c:0224 p:0010 s:1287 E:002230 BLOCK /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20 [FINISH] c:0223 p:0007 s:1279 E:000348 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47 c:0222 p:0031 s:1272 E:002670 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66 c:0221 p:0007 s:1264 E:002298 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:92 c:0220 p:0013 s:1259 E:002290 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:358 c:0219 p:0009 s:1253 E:002368 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:337 c:0218 p:0015 s:1246 E:0022c0 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:326 c:0217 p:0011 s:1238 E:0021b8 BLOCK /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:103 c:0216 p:0005 s:1234 E:001570 BLOCK /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:243 [FINISH] c:0215 p:---- s:1229 E:001150 IFUNC c:0214 p:---- s:1226 e:001225 CFUNC :each c:0213 p:---- s:1223 E:001ba0 CFUNC :detect c:0212 p:0006 s:1219 E:001540 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:242 c:0211 p:0008 s:1215 E:001bb0 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:102 c:0210 p:0019 s:1209 E:001550 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:80 c:0209 p:0144 s:1199 E:0003b0 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/actionview-7.0.8/lib/action_view/helpers/asset_url_helper.rb:203 c:0208 p:0015 s:1189 E:001690 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/actionview-7.0.8/lib/action_view/helpers/asset_url_helper.rb:348 c:0207 p:0008 s:1183 E:000bd0 BLOCK /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/actionview-7.0.8/lib/action_view/helpers/asset_tag_helper.rb:180 [FINISH] c:0206 p:---- s:1176 e:001175 CFUNC :map c:0205 p:0085 s:1172 E:0006b0 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/actionview-7.0.8/lib/action_view/helpers/asset_tag_helper.rb:179 c:0204 p:0030 s:1160 E:000ea8 BLOCK /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:186 [FINISH] c:0203 p:---- s:1156 e:001155 CFUNC :map c:0202 p:0053 s:1152 E:0016f8 METHOD /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:184 c:0201 p:0104 s:1145 E:000200 METHOD /home/gdk/gitlab-development-kit/gitlab/app/views/layouts/notify.html.haml:7 [FINISH] c:0200 p:---- s:1129 e:001128 CFUNC :public_send <snip> – C level backtrace information ------------------------------------------- /home/gdk/.asdf/installs/ruby/3.1.4/lib/libruby.so.3.1(rb_print_backtrace+0x11) [0x7fc3e158f5bf] vm_dump.c:759 /home/gdk/.asdf/installs/ruby/3.1.4/lib/libruby.so.3.1(rb_vm_bugreport) vm_dump.c:1045 /home/gdk/.asdf/installs/ruby/3.1.4/lib/libruby.so.3.1(rb_bug_for_fatal_signal+0xf4) [0x7fc3e138a474] error.c:821 /home/gdk/.asdf/installs/ruby/3.1.4/lib/libruby.so.3.1(sigsegv+0x4d) [0x7fc3e14e3e6d] signal.c:964 /lib/x86_64-linux-gnu/libpthread.so.0(__restore_rt+0x0) [0x7fc3e1283420] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(sass_value_get_tag+0x10) [0x7fc3d1d840d2] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass4EvalclEPNS_13Function_CallE+0x1db5) [0x7fc3d1c721d7] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass13Function_Call7performEPNS_9OperationIPNS_10ExpressionEEE+0x34) [0x7fc3d1bfdec8] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6ExpandclEPNS_11DeclarationE+0x227) [0x7fc3d1c8c615] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass11Declaration7performEPNS_9OperationIPNS_9StatementEEE+0x32) [0x7fc3d1ba5d12] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6Expand12append_blockEPNS_5BlockE+0xe7) [0x7fc3d1c93d39] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6ExpandclEPNS_5BlockE+0x15b) [0x7fc3d1c8a359] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6ExpandclEPNS_9StyleRuleE+0x7b2) [0x7fc3d1c8abe4] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass9StyleRule7performEPNS_9OperationIPNS_9StatementEEE+0x32) [0x7fc3d1ba51ea] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6Expand12append_blockEPNS_5BlockE+0xe7) [0x7fc3d1c93d39] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6ExpandclEPNS_5BlockE+0x15b) [0x7fc3d1c8a359] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6ExpandclEPNS_9StyleRuleE+0x7b2) [0x7fc3d1c8abe4] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass9StyleRule7performEPNS_9OperationIPNS_9StatementEEE+0x32) [0x7fc3d1ba51ea] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6Expand12append_blockEPNS_5BlockE+0xe7) [0x7fc3d1c93d39] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6ExpandclEPNS_5BlockE+0x15b) [0x7fc3d1c8a359] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6ExpandclEPNS_9StyleRuleE+0x7b2) [0x7fc3d1c8abe4] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass9StyleRule7performEPNS_9OperationIPNS_9StatementEEE+0x32) [0x7fc3d1ba51ea] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6Expand12append_blockEPNS_5BlockE+0xe7) [0x7fc3d1c93d39] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6ExpandclEPNS_5BlockE+0x15b) [0x7fc3d1c8a359] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6ExpandclEPNS_9StyleRuleE+0x7b2) [0x7fc3d1c8abe4] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass9StyleRule7performEPNS_9OperationIPNS_9StatementEEE+0x32) [0x7fc3d1ba51ea] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6Expand12append_blockEPNS_5BlockE+0xe7) [0x7fc3d1c93d39] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6ExpandclEPNS_11Import_StubE+0x4b5) [0x7fc3d1c8e0fb] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass11Import_Stub7performEPNS_9OperationIPNS_9StatementEEE+0x32) [0x7fc3d1ba636e] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6Expand12append_blockEPNS_5BlockE+0xe7) [0x7fc3d1c93d39] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass6ExpandclEPNS_5BlockE+0x15b) [0x7fc3d1c8a359] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass7Context7compileEv+0x2d3) [0x7fc3d1c31fa5] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(_ZN4Sass12Data_Context5parseEv+0x470) [0x7fc3d1c31b2e] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(0x7fc3d1d801ff) [0x7fc3d1d801ff] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(sass_compiler_parse+0xb6) [0x7fc3d1d80f8b] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(0x7fc3d1d80765) [0x7fc3d1d80765] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so(sass_compile_data_context+0xb9) [0x7fc3d1d80ccf] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/ffi-1.15.5/lib/ffi_c.so(0x7fc3dbd0b886) [0x7fc3dbd0b886] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/ffi-1.15.5/lib/ffi_c.so(0x7fc3dbd0b0fe) [0x7fc3dbd0b0fe] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/ffi-1.15.5/lib/ffi_c.so(0x7fc3dbd0b17f) [0x7fc3dbd0b17f] /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/ffi-1.15.5/lib/ffi_c.so(rbffi_CallFunction+0x1b9) [0x7fc3dbcfdae9] Call.c:400 /home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/ffi-1.15.5/lib/ffi_c.so(custom_trampoline+0x37) [0x7fc3dbd01b37] MethodHandle.c:220 /home/gdk/.asdf/installs/ruby/3.1.4/lib/libruby.so.3.1(vm_call_cfunc_with_frame+0x128) [0x7fc3e15669d8] vm_insnhelper.c:3037 /home/gdk/.asdf/installs/ruby/3.1.4/lib/libruby.so.3.1(vm_sendish+0x10) [0x7fc3e1574c82] vm_insnhelper.c:4751 /home/gdk/.asdf/installs/ruby/3.1.4/lib/libruby.so.3.1(vm_exec_core) insns.def:778 /home/gdk/.asdf/installs/ruby/3.1.4/lib/libruby.so.3.1(rb_vm_exec+0xd3) [0x7fc3e157a863] vm.c:2211 /home/gdk/.asdf/installs/ruby/3.1.4/lib/libruby.so.3.1(rb_yield+0x266) [0x7fc3e157fd76] vm.c:1316 /home/gdk/.asdf/installs/ruby/3.1.4/lib/libruby.so.3.1(RB_FL_TEST_RAW+0x0) [0x7fc3e12f23ee] array.c:2625

I got this on sassc-2.4.0 and ruby-2.7.0

We are seeing the same problem segfault in the compile_data_context function. It is intermittent and we do not hit it every build but we tend to see the issue in CI when tests are running and Rails is compiling assets on the fly.

It does not look like there has been a commit to this repo for over a year, is this gem still active gem, is it deprecated, is it in maintenance, EOL?

It’s not clear from looking at the Git repo if this is an active project or not, should we be using something else etc ?

@bhserna your commented fixed my problem! Thhank you!