Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Starts dozens (sometimes hundreds) of build processes #53

Closed
nic-hartley opened this issue Aug 3, 2019 · 8 comments · Fixed by #57
Closed

Starts dozens (sometimes hundreds) of build processes #53

nic-hartley opened this issue Aug 3, 2019 · 8 comments · Fixed by #57

Comments

@nic-hartley
Copy link

nic-hartley commented Aug 3, 2019

When building sass-sys, a huge number of cc1plus processes are started, to the point that my entire computer starts to lag and every CPU gets pinned at 100%. The number doesn't change even if I specify MAKE_LIBSASS_JOBS.

The title says "sometimes" because the number of jobs changes over time, possibly as make starts compiling new files/finishes with old ones, and I couldn't get a consistent number. It was always in the same range, though.

At least ctrl+C works fairly quickly to kill the entire bundle.

Platform: WSL (Ubuntu); rustc 1.36.0

@Keats
Copy link
Collaborator

Keats commented Aug 5, 2019

That's weird, can you try to run the commands from sass-sys build.rs manually to see what happens?

@nic-hartley
Copy link
Author

nic-hartley commented Aug 6, 2019

@Keats Finally actually got around to doing what I said I'd do... Sorry it took so long. I kept distracting myself.

Running make --jobs 8 does indeed do the same thing as running build.rs, strangely enough. Maybe a bug in the WSL make, ignoring --jobs? Doesn't seem to be a bug in this, though, unlike I originally thought.

@richardwhiuk
Copy link

richardwhiuk commented Aug 19, 2019

I think https://github.com/sass/libsass/blob/4d229af5500be1023883c38c4a675f0ed919839d/Makefile#L22 is responsible, and is overriding the --jobs argument in some cases...

I can reproduce this phonemenon with regular make on Ubuntu 18.04:

/src/test/make-test# make --jobs 1
sleep infinity
sleep infinity
sleep infinity
sleep infinity
sleep infinity
sleep infinity
sleep infinity
sleep infinity
sleep infinity
sleep infinity
sleep infinity

with a Makefile of:

MAKEFLAGS += "-j 0"

all: a b c d e f g h i j k

a b c d e f g h i j k:
        sleep infinity

@richardwhiuk
Copy link

sass-rs = "0.2"
sass-sys = "=0.4.8"

is sufficient to avoid this.

@richardwhiuk
Copy link

That's reverted in sass/libsass#2977, so the next step is an updated version of sass-sys.

@Keats
Copy link
Collaborator

Keats commented Aug 24, 2019

Good find! I've asked if they can cut a release and I'll update asap

@nic-hartley
Copy link
Author

Wow, I... genuinely didn't expect this to move so fast. Is there any ETA, or will it just happen whenever the libsass folks cut their next release?

snoyberg added a commit to snoyberg/zola that referenced this issue Aug 28, 2019
Keats added a commit that referenced this issue Oct 7, 2019
@Keats Keats mentioned this issue Oct 7, 2019
@Keats
Copy link
Collaborator

Keats commented Oct 7, 2019

They just released a new version, can anyone try #57 to see if it fixes it?

Keats added a commit that referenced this issue Oct 22, 2019
@Keats Keats closed this as completed in #57 Oct 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants