Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak-builder exited with code 137, but plenty of un-use memory. #389

Closed
kevinsmia1939 opened this issue Apr 27, 2021 · 4 comments
Closed

Comments

@kevinsmia1939
Copy link

kevinsmia1939 commented Apr 27, 2021

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

flatpak-builder 1.0.12

Flatpak 1.11.1

I am building Avogadro2 on my local machine.
https://github.com/flathub/org.openchemistry.Avogadro2

I simply fork and clone all the files.
Build with
flatpak-builder --install --user build org.openchemistry.Avogadro2 --force-clean

During python3-numpy module, the error occurred.

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

I look around for this code 137 and found that it is cause by not enough memory, which OOM killer kill it.

But I look at htop all the time and memory never exceed 7.5 GiB.

I could build other project that use more memory, but not Avogadro2 for some reason.
I tried deleting .flatpak-builder and build folder, same error.

Why am I getting code 137? Does it mean OOM killer kill flatpak-builder? Why do it got kill when memory is not full?

@vchernin
Copy link

vchernin commented Aug 23, 2021

I have a theory this is somehow linked to using build-commands when building a module.

The Avogadro2 manifest above uses build-commands to build some modules.

I have seen this trying to build PulseEffects, which used build-commands to build boost.

And lately in EasyEffects I have found just adding build-commands and running ls to the EasyEffects module is enough to consistently OOM it. This has never happened building modern versions of EasyEffects before.

@TheEvilSkeleton has also observed this trying to build Tenacity locally (also uses build-commands).

My system is in no way actually out of memory. For whatever reason, the Flathub builders never seem to have this problem.

I'm curious if anyone has examples of this happening when not using build-commands at all as that would disprove my theory.

On Fedora 34 Silverblue using zram defaults.

Edit: now it seems I continue getting 137 in EasyEffects despite there being no build-commands.

@vchernin
Copy link

vchernin commented Aug 23, 2021

Ok apparently this is all due to this, nothing to do with build-commands: flatpak/xdg-desktop-portal#478

Workaround:
flatpak permission-reset app-id
And make sure to click allow when asked whether your app can run in the background.

I've been testing this briefly and it seems to work.

@kevinsmia1939 does this solve the problem for you?

@kevinsmia1939
Copy link
Author

Ok apparently this all due to this, nothing to do with build-commands: flatpak/xdg-desktop-portal#478

Workaround:
flatpak permission-reset app-id
And make sure to click allow when prompted to ask whether your app can run in the background.

I've been testing this briefly and it seems to work.

@kevinsmia1939 does this solve the problem for you?

I did not encounter this issue anymore because I change my hardware. So I could not test this again.
I will close this for now, I will revisit this when I got it again.

@TheJackiMonster
Copy link

TheJackiMonster commented Dec 11, 2021

Ok apparently this all due to this, nothing to do with build-commands: flatpak/xdg-desktop-portal#478

Workaround: flatpak permission-reset app-id And make sure to click allow when prompted to ask whether your app can run in the background.

I've been testing this briefly and it seems to work.

@kevinsmia1939 does this solve the problem for you?

I have encountered a similar issue with the current flatpak of Manuskript:

Error: module python3-lxml: Child process exited with code 137

The work-around by @vchernin solves the issue but it's a really weird quirk to be honest and I think flatpak-builder should address that. Otherwise more developers will struggle with maintaining their flatpaks.

Edit (to add some details of my system):
Operating System: Arch Linux
GNOME Version: 41.2
Qt Version: 5.15.2
Kernel Version: 5.15.7-arch1-1
OS Type: 64-bit
Graphics Platform: Wayland
Processors: AMD® Ryzen 7 2700x eight-core processor × 16
Memory: 31,3 GiB
Graphics Processor: Mesa, AMD® Radeon rx 5700

flatpak-builder 1.2.0

Flatpak 1.12.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants