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!
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?
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...
With firejail --noprofile --rlimit-as=...?
Which distro? Which firejail version?
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.
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!
Most helpful comment
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.