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

Weird mixin SCSS causes massive memory leak #201

Closed
MattReimer opened this issue May 6, 2020 · 2 comments
Closed

Weird mixin SCSS causes massive memory leak #201

MattReimer opened this issue May 6, 2020 · 2 comments

Comments

@MattReimer
Copy link

Let's start by saying this is a difficult issue to report on. I filed it with the foundation-sites folks and they're pretty confident it's a bug in sassc. I'm no ruby expert but I think that there's no situation under which this library should take more than 50Gb of memory so hopefully I can find a home for this issue without too much back and forth.


What should happen?

When I use jekyll to build the scss for foundation-sites the the memory consumption swells to 50+Gb unless I comment out a chunk of the @mixin foundation-button-group

When I comment out these lines it works. I'm not really a SASS expert so I don't know what to suggest. I only found this by commenting out everything and bringing things back until it compiled.

My Environment:

OSX 10.15.4
Ruby: ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-darwin18]

Foundation installed with NPM, copied over to Jekyll's _sass folder.

foundation-sites@6.6.3:
  version "6.6.3"
  resolved "https://registry.yarnpkg.com/foundation-sites/-/foundation-sites-6.6.3.tgz#8ca5f246357db69e6a0e73351ce06aa8acce6540"
  integrity sha512-8X93wUAmUg1HhVv8uWMWnwoBLSQWSmFImJencneIZDctswn724Bq/MV1cbPZN/GFWGOB/9ngoQHztfzd4+ovCg==

Compiling SCSS using jekyll 4.0 and sassc

From my Gemfile.lock

    jekyll (4.0.0)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (>= 0.9.5, < 2)
      jekyll-sass-converter (~> 2.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 2.1)
      kramdown-parser-gfm (~> 1.0)
      liquid (~> 4.0)
      mercenary (~> 0.3.3)
      pathutil (~> 0.9)
      rouge (~> 3.0)
      safe_yaml (~> 1.0)
      terminal-table (~> 1.8)
    jekyll-sass-converter (2.1.0)
      sassc (> 2.0.1, < 3.0)
    sassc (2.3.0)
      ffi (~> 1.9)

Reproducing

I've got a repo that shows the problem here (dev branch):

https://github.com/Riverscapes/riverscapes-jekyll-theme/tree/dev

Repro steps:

  1. clone the repo
  2. Uncomment the following lines: https://github.com/Riverscapes/riverscapes-jekyll-theme/blob/dev/_sass/foundation-sites/scss/components/_button-group.scss#L236-L252
  3. Run bundle install
  4. Run bundle exec jekyll server --verbose

Watch memory consumption go BOOM!
Screen Shot 2020-05-05 at 5 49 33 PM

@ahorek
Copy link

ahorek commented May 14, 2020

I can confirm that #199 fixes the issue

uqs pushed a commit to freebsd/freebsd-ports that referenced this issue May 17, 2020
This is a workaround for gitlab-ce. It should be fixed after rubygem-sassc
updating libsass from 3.6.3 to 3.6.4.

Reference:	https://gitlab.com/gitlab-org/gitlab/-/issues/216740
		sass/sassc-ruby#201
		sass/sassc-ruby#199


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@535562 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue May 17, 2020
- Bump PORTREVISION for dependency change

This is a workaround for gitlab-ce. It should be fixed after rubygem-sassc
updating libsass from 3.6.3 to 3.6.4.

Reference:	https://gitlab.com/gitlab-org/gitlab/-/issues/216740
		sass/sassc-ruby#201
		sass/sassc-ruby#199


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@535563 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue May 17, 2020
This is a workaround for gitlab-ce. It should be fixed after rubygem-sassc
updating libsass from 3.6.3 to 3.6.4.

Reference:	https://gitlab.com/gitlab-org/gitlab/-/issues/216740
		sass/sassc-ruby#201
		sass/sassc-ruby#199
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue May 17, 2020
- Bump PORTREVISION for dependency change

This is a workaround for gitlab-ce. It should be fixed after rubygem-sassc
updating libsass from 3.6.3 to 3.6.4.

Reference:	https://gitlab.com/gitlab-org/gitlab/-/issues/216740
		sass/sassc-ruby#201
		sass/sassc-ruby#199
Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this issue May 18, 2020
This is a workaround for gitlab-ce. It should be fixed after rubygem-sassc
updating libsass from 3.6.3 to 3.6.4.

Reference:	https://gitlab.com/gitlab-org/gitlab/-/issues/216740
		sass/sassc-ruby#201
		sass/sassc-ruby#199


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@535562 35697150-7ecd-e111-bb59-0022644237b5
Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this issue May 18, 2020
- Bump PORTREVISION for dependency change

This is a workaround for gitlab-ce. It should be fixed after rubygem-sassc
updating libsass from 3.6.3 to 3.6.4.

Reference:	https://gitlab.com/gitlab-org/gitlab/-/issues/216740
		sass/sassc-ruby#201
		sass/sassc-ruby#199


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@535563 35697150-7ecd-e111-bb59-0022644237b5
@MattReimer
Copy link
Author

This looks good to me too. Thanks for:
Riverscapes/riverscapes-jekyll-theme#15

svmhdvn pushed a commit to svmhdvn/freebsd-ports that referenced this issue Jan 10, 2024
This is a workaround for gitlab-ce. It should be fixed after rubygem-sassc
updating libsass from 3.6.3 to 3.6.4.

Reference:	https://gitlab.com/gitlab-org/gitlab/-/issues/216740
		sass/sassc-ruby#201
		sass/sassc-ruby#199
svmhdvn pushed a commit to svmhdvn/freebsd-ports that referenced this issue Jan 10, 2024
- Bump PORTREVISION for dependency change

This is a workaround for gitlab-ce. It should be fixed after rubygem-sassc
updating libsass from 3.6.3 to 3.6.4.

Reference:	https://gitlab.com/gitlab-org/gitlab/-/issues/216740
		sass/sassc-ruby#201
		sass/sassc-ruby#199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants