Comments (9)
Some libc code now expects the stack to be 16-byte aligned (to use movaps instruction). The way in which the child process is spawned doesn't adhere to this. Here's a quick fix:
--- a/isolate.c
+++ b/isolate.c
@@ -814,7 +814,7 @@ run(char **argv)
proxy_pid = clone(
box_proxy, // Function to execute as the body of the new process
- argv, // Pass our stack
+ (void*)((uintptr_t)argv & ~15), // Pass our stack, aligned to 16-bytes.
SIGCHLD | CLONE_NEWIPC | (share_net ? 0 : CLONE_NEWNET) | CLONE_NEWNS | CLONE_NEWPID,
argv); // Pass the arguments
if (proxy_pid < 0)
@gollux: do you have any better suggestions?
from isolate.
Maybe this has to do with #42 and #43 ?
What's your kernel version?
from isolate.
It's 4.18.0-10-generic.
from isolate.
I seem to have encountered the same problem on Ubuntu 18.10 with a 4.18.0-13-generic Kernel. Any recommendations for how to work around it?
from isolate.
Some additional information:
I get the following message in the syslog:
2019-01-02T21:48:00.633297+01:00 pehrs kernel: [896241.606886] traps: isolate[1622] general protection ip:7ffff7c52cdd sp:7fffffffd9f8 error:0 in libc-2.28.so[7ffff7be5000+171000]
Also attaching a systrace from running isolate, which might help.
strace.log
The strace was generated running the following commands:
pehrs@pehrs:~$ sudo /usr/local/bin/isolate --box-id=0 --cg --cg-timing --processes=128 --env=HOME=/ --env=PATH --env=LANG --dir=/usr= --dir=/usr/lib/ --dir=/etc/alternatives/ --dir=/usr/bin/ --dir=/usr/include/ --dir=/usr/local/lib/ --dir=/usr/share/pyshared/ --env=PYTHONDONTWRITEBYTECODE=1 --env=PYTHONIOENCODING=UTF-8 --dir=/src=/var/lib/kattis/run/subs/comp_158309_206449/compile:rw:noexec --quota=40960,40960 --init
/var/local/lib/isolate/0
pehrs@pehrs:~$ sudo strace /usr/local/bin/isolate --box-id=0 --cg --cg-timing --processes=128 --env=HOME=/ --env=PATH --env=LANG --dir=/usr= --dir=/usr/lib/ --dir=/etc/alternatives/ --dir=/usr/bin/ --dir=/usr/include/ --dir=/usr/local/lib/ --dir=/usr/share/pyshared/ --env=PYTHONDONTWRITEBYTECODE=1 --env=PYTHONIOENCODING=UTF-8 --dir=/src=/var/lib/kattis/run/subs/comp_158309_206449/compile:rw:noexec --stderr=/src/__stderr --meta=/var/lib/kattis/run/subs/comp_158309_206449/compile.meta_file --chdir=/src --time=60 --wall-time=120 --cg-mem=1048580 --run -- /usr/bin/python2 -m py_compile ./hello.py 2> strace.log
from isolate.
Here is a core dump also:
I am not sure how helpful it is:
pehrs@pehrs:/tmp$ gdb /usr/local/bin/isolate core.2.isolate
GNU gdb (Ubuntu 8.2-0ubuntu1) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/bin/isolate...(no debugging symbols found)...done.
[New LWP 2]
Core was generated by `/usr/local/bin/isolate --box-id=0 --cg --cg-timing --processes=128 --env=HOME=/'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007ffff7c52cdd in _IO_str_init_static_internal (sf=sf@entry=0x7fffffffda28, ptr=ptr@entry=0x7fffffffdce8 "", size=size@entry=1023,
pstart=pstart@entry=0x7fffffffdce8 "") at strops.c:41
41 strops.c: No such file or directory.
(gdb)
from isolate.
@seirl @gollux Could you offer any advice on this?
from isolate.
I have tested the patch above, and it seems to solve the issue I was having.
from isolate.
from isolate.
Related Issues (20)
- I tried to build a dynamic library and call it with C #, but there was an error HOT 2
- Program finishing but isolate times out on wall clock? HOT 2
- Cannot set memory.limit_in_bytes to 102404096 HOT 4
- Isolate does not configure loopback in the sandbox on my system HOT 10
- thread error with nodejs HOT 2
- Unable to resolve DNS HOT 2
- Failed to create control group /sys/fs/cgroup/memory/box-0/: Read-only file system. HOT 1
- Compiling with gcc, execve("gcc"): No such file or directory HOT 2
- Directory Mount not working ? HOT 1
- Deployment Using AWS Lambda HOT 1
- Whatever I do when I run isolate --init it returns "Error in config file, line 2: Syntax error, expecting key=value" HOT 4
- execve("/usr/local/bin/julia"): No such file or directory HOT 2
- Option for disabling core dumps HOT 3
- Running Java program with a jar file HOT 20
- Thanks for maintaining and building this isolate environment. my question is, is it necessary to use docker for this isolated environment or can I also go with Linux Ec2 in AWS? HOT 1
- How to run dotnet in isolate? HOT 6
- Does the new cgv2 version of isolate need to be run as a privileged Docker container ? HOT 1
- open("/tmp/sandboxes/421/box/compile.output"): No such file or directory HOT 1
- isolate is significantly slower with CG enabled HOT 10
- java.lang.SecurityException: Can not initialize cryptographic mechanism
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isolate.