Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 652200 - dev-qt/qtwebengine:5 doesn't respect MAKEOPTS=-j1
Summary: dev-qt/qtwebengine:5 doesn't respect MAKEOPTS=-j1
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
: 666270 683776 (view as bug list)
Depends on: 630834
Blocks: makeopts-ignored
  Show dependency tree
Reported: 2018-04-02 10:37 UTC by Toralf Förster
Modified: 2022-05-18 07:07 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---

27.20180402-012705 (27.20180402-012705,83.73 KB, text/plain)
2018-04-02 10:37 UTC, Toralf Förster
load.23.20190117-142310 (load.23.20190117-142310,97.89 KB, text/plain)
2019-01-17 18:47 UTC, Toralf Förster

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2018-04-02 10:37:02 UTC
pls see attached pstree - at least ninja ignores it, although the tinderbox set this:

RUSTFLAGS="-C codegen-units=1"
Comment 1 Toralf Förster gentoo-dev 2018-04-02 10:37:26 UTC
Created attachment 526316 [details]

Comment 2 Arfrever Frehtes Taifersar Arahesis 2018-04-03 03:45:22 UTC
Patch #1 from patchset in bug #630834 should fix this problem.

Your attachment shows that src/3rdparty/chromium/tools/gn/bootstrap/ was run and exactly this file is changed by sed in the aforementioned patch.
Comment 3 Andreas Sturmlechner gentoo-dev 2018-09-15 13:35:30 UTC
*** Bug 666270 has been marked as a duplicate of this bug. ***
Comment 4 Toralf Förster gentoo-dev 2019-01-17 18:47:43 UTC
Created attachment 561864 [details]

this is from qt-webengine-5.11.3, where 13 c++ processes are spawned
Comment 5 Davide Pesavento (RETIRED) gentoo-dev 2019-04-18 16:09:32 UTC
*** Bug 683776 has been marked as a duplicate of this bug. ***
Comment 6 Nathan Shearer 2019-04-18 16:33:08 UTC
I have encountered this bug on a 4-core system with only 1GB of ram (and 8 GB of swap). At times there were 6 instances of cc1plus, and the system was swapping so hard I could barely open top or even kill the compilation.

This seems to be an issue with the way ninja is allocating resources on the build system for maximum performance:

Is there a way, any way, to force ninja to stop fork bombing my computer? Even if it is forced to run in a throttled sandbox of some kind?
Comment 7 Toralf Förster gentoo-dev 2019-04-18 17:30:39 UTC
FWIW these settings here seems not to be enough but might be a starting point:
Comment 8 Alessandro Barbieri 2021-05-05 18:40:00 UTC
Any plan on fixing this? I don't even know how to workaround it
Comment 9 Nathan Shearer 2021-05-05 21:33:49 UTC
Perhaps inside the portage sandbox a wrapper script can be used that does in fact respect the environment MAKEOPTS -j variable.

It would just postpone launching the actual process until the existing ones have returned, preventing the forkbomb.
Comment 10 Chiitoo gentoo-dev 2021-06-24 10:30:59 UTC
Quick testing with 'dev-qt/qtwebengine-5.15.2_p20210521' suggests that the '-j' option is being respected.

Some things I did:

- Set MAKEOPTS="-j 1" in 'make.conf'.
- Start build while watching CPU cores being used, 'pstree -l', and 'pstree -al' for about 10 minutes.

- Set NINJAFLAGS="-j 100" on the command-line for emerge.
- Start build while watching CPU cores being used, 'pstree -l', and 'pstree -al' for about 10 minutes.

Closing now since there seems to be nothing for us to do here.

Please do re-open in case this can still be re-produced somehow.

Comment 11 Robert Booth 2022-05-18 06:16:38 UTC
The "-j" in my MAKEOPTS is not being respected for a build of dev-qt/qtwebengine-5.15.3_p20220406. Despite using MAKEOPTS="-j 1", the build uses all CPU cores.

I've tried setting NINJAJOBS and NINJAFLAGS on the command line for emerge, but there is no change.

I'll be happy to provide any other information if necessary.
Comment 12 Robert Booth 2022-05-18 07:07:50 UTC
Apologies, I see that the CPU usage settles down after an initial spike. Please disregard my previous message.