pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Rust, MAKE_JOBS, and "failed to spawn helper thread"



Paul Ripke <stix%stix.id.au@localhost> writes:

> Reviving an old thread...
>
> On Thu, Sep 16, 2021 at 02:00:58PM +0000, nia wrote:
>> Hi, anyone else seeing this failure when compiling Rust crates on NetBSD
>> with a high number of parallel jobs? I see this for nearly every crate
>> in my pbulk builds.
>> 
>> Is there a system limit that needs to be adjusted?
>
> Of late, I've hit the system wide thread limit numerous times. I've now
> discovered that kern.maxlwp defaults to a max of 2048 in netbsd-9
> (cpu_maxlwp()), and in -current this was lifted to a default of either
> 4096 or 1 per 1MiB RAM (whichever is greater), with an absolute max of
> 65535 (MAXMAXLWP).
>
> I'm staying on netbsd-9 for now, but looking forward to upgrading soon.

2048 is just not enough threads given how thread-piggy modern code is.
My desktop has firefox, thunderbird, qgis, some xfce4 taskbar stuff, and
a bunch of xterms, and is building qt5-qtwebengine.  It's not the least
bit stressed in general (24G of RAM), but it has 1104 threads.

I had tried to up the thread limit in login.conf but indeed I cannot
sysctl -w kern.maxlwp=8192.   So maybe that should just be upped, or you
can do so in a private kernel build?

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index