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

Flaky specs due to sassc "Segmentation fault" errors #2130

Closed
jordan-brough opened this issue Jan 24, 2022 · 7 comments
Closed

Flaky specs due to sassc "Segmentation fault" errors #2130

jordan-brough opened this issue Jan 24, 2022 · 7 comments
Labels
bug breakages in functionality that is implemented

Comments

@jordan-brough
Copy link
Contributor

The Ruby 2.6 & 2.7 tests seem to have suddenly become flaky:
image

I saw some failures like that in a couple of my PRs, that usually went away if I retried the specs (e.g. by pushing an empty commit).

It might be something from one of my recent commits? It doesn't look like they were flaky before that, unless y'all have already been retrying failures like that on master branch when they happened?

Example failure:
https://app.circleci.com/pipelines/github/thoughtbot/administrate/1662/workflows/238e328c-cdd2-4f65-ae6a-24f9789c20c4/jobs/8803

Some example outputs:

>> BUNDLE_GEMFILE=/home/circleci/administrate/gemfiles/rails61.gemfile bundle exec rspec

Randomized with seed 48932
..................../home/circleci/administrate/gemfiles/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
>> BUNDLE_GEMFILE=/home/circleci/administrate/gemfiles/rails52.gemfile bundle exec rspec
warning: parser/current is loading parser/ruby26, which recognizes2.6.9-compliant syntax, but you are running 2.6.3.
Please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.

Randomized with seed 24433
............/home/circleci/administrate/gemfiles/vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
>> BUNDLE_GEMFILE=/home/circleci/administrate/gemfiles/rails60.gemfile bundle exec rspec
warning: parser/current is loading parser/ruby26, which recognizes2.6.9-compliant syntax, but you are running 2.6.3.
Please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.

Randomized with seed 52838
............................................................................/home/circleci/administrate/gemfiles/vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
>> BUNDLE_GEMFILE=/home/circleci/administrate/gemfiles/rails60.gemfile bundle exec rspec

Randomized with seed 42679
............................................................................/home/circleci/administrate/gemfiles/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
@jordan-brough jordan-brough added the bug breakages in functionality that is implemented label Jan 24, 2022
@jordan-brough
Copy link
Contributor Author

FYI I tried to repro the failure from this one by running the following locally, but I wasn't able to reproduce the error:

rm -r gemfiles/*.lock

export RBENV_VERSION=2.7.5

bin/setup

bundle exec rspec --seed 3813

bundle exec appraisal install

BUNDLE_GEMFILE=gemfiles/rails50.gemfile bundle exec rspec --seed 38463
BUNDLE_GEMFILE=gemfiles/rails51.gemfile bundle exec rspec --seed 18633
BUNDLE_GEMFILE=gemfiles/rails52.gemfile bundle exec rspec --seed 3575
BUNDLE_GEMFILE=gemfiles/rails60.gemfile bundle exec rspec --seed 42679 # This one failed in Circle with a segfault

@jordan-brough
Copy link
Contributor Author

jordan-brough commented Jan 24, 2022

If this is something that has occasionally happened in the past, then it could be that some of the extra flakiness is due to the fact that we're now running more tests on Circle, due to #2125 being merged?

@jordan-brough
Copy link
Contributor Author

jordan-brough commented Jan 24, 2022

I verified that for the example in my comment above (the "FYI I tried to repro the failure ..." one) that the test that segfaulted was the first feature test run for that commit + seed value. And the stack trace shows it's executing some sprockets and concurrent-ruby code.

I wonder if any of the comments in sass/sassc-ruby#207 are applicable?

nickcharlton added a commit that referenced this issue Jan 25, 2022
We've been seeing (more regular) test failures due to sassc concurrency
issues. This should disable concurrency with Sprockets, as suggested on
the `sassc-ruby` project and might mitigate it until we adjust the asset
build system.

Fixes #2130

sass/sassc-ruby#207
@nickcharlton
Copy link
Member

Hmm, interesting. I've seen this in the past and it seems much worse now.

I just pushed up this branch with a potential solution. I'm going to run it a few times and see how it behaves on CI: https://github.com/thoughtbot/administrate/compare/nc-sassc-seg-fault-fix?expand=1

@gathuku
Copy link

gathuku commented Jan 27, 2022

I have an app that I have been to upgrade to cssbundling-rails. Unfortunately, I have faced the Segmentation fault errors. After trying everything with no success I want to get rid of the sassc-rails gem. Is it possible to run administrate without this gem?

@nickcharlton
Copy link
Member

That branch did no good and I'm not necessarily convinced that spending much time on it is worthwhile.

@gathuku, hmm, good question. I don't see why you wouldn't in principle be able to do so. But you might need to fork the gem and change the dependencies around so that it's never bundled.

@nickcharlton nickcharlton mentioned this issue Jan 20, 2023
3 tasks
@pablobm
Copy link
Collaborator

pablobm commented Mar 8, 2024

With #2397 merged, we are not using sassc any more. I think this should be fixed...?

If not let us know and we'll reopen.

@pablobm pablobm closed this as completed Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug breakages in functionality that is implemented
Projects
None yet
Development

No branches or pull requests

4 participants