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

Emacs fails with "Memory exhausted" error #196

Open
alexeiz opened this issue Aug 29, 2017 · 8 comments
Open

Emacs fails with "Memory exhausted" error #196

alexeiz opened this issue Aug 29, 2017 · 8 comments

Comments

@alexeiz
Copy link

alexeiz commented Aug 29, 2017

I'm not able to run Emacs under junest. It starts, but then fails with !MEM FULL! (Memory exhausted) message as soon as I try to do anything.

Here's how to reproduce:

  1. install emacs-nox (or emacs).
# pacman -S emacs-nox
  1. start emacs
  2. open emacs manual page with C-h r

Result: "memory exhausted" message. Note that emacs doesn't crash, but it's pretty useless in this state.
However, emacs doesn't consume any excessive memory amount as shown by ps:

$ ps -e -o rss,size,cmd | grep emacs
17368 16748 emacs
@fsquillace
Copy link
Owner

Hi,

I reproduced the issue and I've got the same problem.

I suspect the issue is due to limitation with proot backend.

Does your JuNest work with proot as backend? Is the SECCOMP disabled?

@alexeiz
Copy link
Author

alexeiz commented Aug 31, 2017

I agree, it's likely caused by proot, because the issue doesn't reproduce with junest -u (namespaces). I tried it with PROOT_NO_SECCOMP=1 as well, the issue still reproduces. Do you know what particular proot limitation may cause it?

@fsquillace
Copy link
Owner

Unfortunately proot is having a lot of limitation on recent linux kernel in which is not possible to enable SECCOMP. Support for proot is really poor (the comparison with other backends https://github.com/fsquillace/junest#execution-modes-comparison-table)

Hopefully, proot will be replaced by linux namespaces in the future which will make JuNest much more reliable.

Whenever the linux OS you are using has the user namespace configured, try to use junest -u instead.

@vincenthage
Copy link

Hi,
for proot, you can try compiling the version on this PR, which has a fix for seccomp. The binaries will arrive slighly later.

@fsquillace
Copy link
Owner

Hi @vincenthage,

Thanks a lot about the effort for fixing proot.

Hopefully during the next days I will test the PR and let you know if such solution works.

@fsquillace
Copy link
Owner

I have just run a small test by compiling the PR from @vincenthage suggestion.

Before:

[17:46:59  feel@myarch (hotfix/seccomp) src $]> JUNEST_HOME=/home/feel/.junest-test junest -f                                                                 
proot info: pid 6158: terminated with signal 11                                                                                                               
Warn: Proot is not working, disabling SECCOMP instead. Expect the application to run slowly in particular when it uses syscalls intensively.

After:

[17:11:49  feel@myarch (hotfix/seccomp) src $]> ./proot -0 -b /dev -b /proc -b /sys/ -b /tmp/ -b /home/feel/ -r ~/.junest-test/
[root@myarch src]#

It seems SECCOMP is enabled indeed, but when running emacs command in both cases is stuck when loading the initial emacs config and I cannot use the manual by typing C-h r.

@vincenthage
Copy link

vincenthage commented Sep 14, 2017

Which kernel version do you have?
We're currently investigating issues with seccomp on recent kernel versions (>= 4.8, and especially 4.11 and 4.12).

@fsquillace
Copy link
Owner

The kernel version is:

[22:50:03  feel@myarch ~ $]> uname -r
4.12.6-1-ARCH

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