Paket baut online im OBS, aber nicht local mit osc

Es kommt vor, dass ein Paket beim bau mittels osc auf dem lokalen PC nicht gebaut werden kann.
Online im OpenSUSE Build service funktioniert der Bau aber.

Dabei erschein beim z.B. eine Memory Fehlermeldung:

RangeError: WebAssembly.Instance(): Out of memory: wasm memory

Das ist im build script begründet welches nur lokal den Speicher begrenzt. Online nicht.
Der Sinn erschließßt sich mir nicht.

Folgende Löung kam von Adam Majer <amajer@suse.com>:

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.

- Adam

Bewertung der FAQ

0 (0 Abstimmungen)

Tags