[GH-ISSUE #2955] Limiting RAM with --rlimit-as #1846

Closed
opened 2026-05-05 08:30:57 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @JIGutierrez on GitHub (Sep 9, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2955

Hey, i'm trying to limit the memory usage of a program with firejail, however I'm getting an error:

firejail --rlimit-as=1000000 python path/to/file.py
Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc

Parent pid 14956, child pid 14957
Error: cannot read /run/firejail/mnt/seccomp.protocol
Error: proc 14956 cannot sync with peer: unexpected EOF
Peer 14957 unexpectedly exited with status 1

I'm not sure if I did something wrong, couldn't find any info on this. Thanks in advance!

Originally created by @JIGutierrez on GitHub (Sep 9, 2019). Original GitHub issue: https://github.com/netblue30/firejail/issues/2955 Hey, i'm trying to limit the memory usage of a program with firejail, however I'm getting an error: ``` firejail --rlimit-as=1000000 python path/to/file.py Reading profile /etc/firejail/default.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-programs.inc Parent pid 14956, child pid 14957 Error: cannot read /run/firejail/mnt/seccomp.protocol Error: proc 14956 cannot sync with peer: unexpected EOF Peer 14957 unexpectedly exited with status 1 ``` I'm not sure if I did something wrong, couldn't find any info on this. Thanks in advance!
gitea-mirror 2026-05-05 08:30:57 -06:00
Author
Owner

@chiraag-nataraj commented on GitHub (Sep 15, 2019):

Hmm, that works for me, both with python specifically and other programs more generally. If you run firejail python path/to/file.py, does it work?

<!-- gh-comment-id:531607925 --> @chiraag-nataraj commented on GitHub (Sep 15, 2019): Hmm, that works for me, both with `python` specifically and other programs more generally. If you run `firejail python path/to/file.py`, does it work?
Author
Owner

@JIGutierrez commented on GitHub (Sep 16, 2019):

Yes, no problems running it.

firejail  python path/to/file.py
Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc

** Note: you can use --noprofile to disable default.profile **

Parent pid 7638, child pid 7639
Child process initialized in 99.75 ms

Parent is shutting down, bye...

<!-- gh-comment-id:531767878 --> @JIGutierrez commented on GitHub (Sep 16, 2019): Yes, no problems running it. ``` firejail python path/to/file.py Reading profile /etc/firejail/default.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-programs.inc ** Note: you can use --noprofile to disable default.profile ** Parent pid 7638, child pid 7639 Child process initialized in 99.75 ms Parent is shutting down, bye... ```
Author
Owner

@rusty-snake commented on GitHub (Sep 16, 2019):

With firejail --noprofile --rlimit-as=...?
Which distro? Which firejail version?

<!-- gh-comment-id:531782443 --> @rusty-snake commented on GitHub (Sep 16, 2019): With `firejail --noprofile --rlimit-as=...`? Which distro? Which firejail version?
Author
Owner

@smitsohu commented on GitHub (Sep 18, 2019):

Did you try to increase the number? 1 MB is certainly too small, for instance I need 28 MB address space on my system to just run the python interpreter.

<!-- gh-comment-id:532848362 --> @smitsohu commented on GitHub (Sep 18, 2019): Did you try to increase the number? 1 MB is certainly too small, for instance I need 28 MB address space on my system to just run the python interpreter.
Author
Owner

@JIGutierrez commented on GitHub (Sep 18, 2019):

With firejail --noprofile --rlimit-as=...?
Which distro? Which firejail version?

firejail v0.9.52 (apt)
running elementary OS 5.0

Did you try to increase the number? 1 MB is certainly too small, for instance I need 28 MB address space on my system to just run the python interpreter.

This is so obvious that I didn't consider it, and it worked haha. Apparently forgot how python works. Thank you!

<!-- gh-comment-id:532852513 --> @JIGutierrez commented on GitHub (Sep 18, 2019): > With `firejail --noprofile --rlimit-as=...`? > Which distro? Which firejail version? firejail v0.9.52 (apt) running elementary OS 5.0 > Did you try to increase the number? 1 MB is certainly too small, for instance I need 28 MB address space on my system to just run the python interpreter. This is so obvious that I didn't consider it, and it worked haha. Apparently forgot how python works. Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1846
No description provided.