How to find source of exit code 137? Flatpak-builder cannot build numpy.


So I have been building Flatpak apps with Flatpak builder on TW KDE.
When I trying to build apps with numpy, it fail.

x86_64-unknown-linux-gnu-gcc: numpy/core/src/umath/umathmodule.c
x86_64-unknown-linux-gnu-gcc: build/src.linux-x86_64-3.8/numpy/core/src/npysort/radixsort.c
x86_64-unknown-linux-gnu-gcc: numpy/core/src/umath/ufunc_type_resolution.c
x86_64-unknown-linux-gnu-gcc: numpy/core/src/umath/override.c
x86_64-unknown-linux-gnu-gcc: numpy/core/src/multiarray/mapping.c
x86_64-unknown-linux-gnu-gcc: numpy/core/src/multiarray/methods.c
Error: module python3-numpy: Child process exited with code 137

While numpy is building, memory usage never go above 3 GB.

So I have been looking into this error. I think it is about OOM killer killing numpy module.
But I have 8 GB RAM and 32 GB swap file.

I look at dmesg, no message with “OOM”
I tried restarting my machine with nothing open and just try build flatpak right away.

Operating System: openSUSE Tumbleweed 20210415
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Kernel Version: 5.11.12-1-default
OS Type: 64-bit
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-3770 CPU @ 3.40GHz
Memory: 7.5 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4000

How can I know what called code 137?

Try adding a _constraints file set to 4GB and maybe disk space as well… it should be using the build constraints, not local system which is possibly why you never see it get above 3GB…

Hi, I did not use OBS to build Flatpak, just pure Flatpak-builder itself. Or does this _constraints work with normal Flatpak as well?

Ahh, ok, not sure then :wink: Is there a flatpak memory constraint configuration option…

I don’t think so, I will ask Flatpak dev then.