On Mittwoch, 25. Januar 2023, 14:35:05 CET Adam Majer wrote:
On 12/23/22 09:54, Eric Schirra wrote:
Hello all,
I have now noticed with a wide variety of packages that they build in OBS itself, but not locally using osc. It comes then memory error. e.g.: RangeError: WebAssembly.Instance(): Out of memory: wasm memory
The problem is kind of a hack in the build script.
/usr/lib/build/build
see function setmemorylimit()
and remove the
ulimit -d $limit echo "Memory limit set to ${limit}KB"
This is kind of this legacy mechanism that is used to prevent the local build from blowing up and stalling your machine (which doesn't always work anyway). But, if you run NodeJS with webassembly, it will allocate a whole 4GB address space for every instance, even if it uses just a few bytes. So when you run a few of these concurrently, like in the nodejs unit tests, it will go past the `ulimit` set with the above error.
yes ... please note that this limit is only active in chroot builds, where this is the only protection against OOM situations. You won't run into this when using a KVM build env. -- Adrian Schroeter <adrian@suse.de> Build Infrastructure Project Manager SUSE Software Solutions Germany GmbH, Frankenstraße 146, 90461 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev