Comments (10)
Can you try adding -Xmx1000m after /java/bin/java?
Do putting in the same numbers always cause the same errors even if you repeat them?
from java_jail.
Tried with -Xmx1000m
/home/ssad1/safeexec/safeexec --chroot_dir . --exec_dir / --share_newnet --nproc 50 --mem 5000000 --nfile 30 --env_vars CLASSPATH=/cp/:./cp/javax.json-1.0.jar:/java/lib/tools.jar --exec /java/bin/java -Xmx1000m traceprinter.InMemory < cp/traceprinter/test-input.txt
Exception in thread "event-handler" java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at traceprinter.JSONTracingThread.handleEvent(JSONTracingThread.java:221)
at traceprinter.JSONTracingThread.run(JSONTracingThread.java:136)
OK
elapsed time: 2 seconds
memory usage: 4071456 kbytes
cpu usage: 1.577 seconds
As for trying again with the same numbers, I tried all of them again. Everyone produced the same error, except 5000000 printed the log file on the screen itself (said it can't write to log file so dumping to screen). The output is too big and I cannot attach it here it seems (write permission to repo error).
Another observation: every log file present in java_jail is empty.
from java_jail.
You can also try increasing the "Xmx512M" inside of InMemory.java. I know it's annoying to have three parameters to tweak, but the --mem one being gigantic (30 million k = 30 g) should make that one a non-issue.
from java_jail.
I tweaked Xmx512M to Xmx1024M, Xmx2048M, and Xmx4096M. Same result. I had set --mem as 30000000. Here is what I got:
Exception in thread "event-handler" java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at traceprinter.JSONTracingThread.handleEvent(JSONTracingThread.java:221)
at traceprinter.JSONTracingThread.run(JSONTracingThread.java:136)
OK
elapsed time: 1 seconds
memory usage: 5092532 kbytes
cpu usage: 1.523 seconds
from java_jail.
Update: I increased nproc to 100 and mem as 30000000. Got proper output. Even with Xmx512M. But error while running on front end.
from java_jail.
Put all of the values you discovered worked into jv-config.json (safeexec_mem_k, Xmx)
Add
"safeexec_args" : {"nproc" : "100"}
to set the nproc.
from java_jail.
Thank you for everything. 👍
My team is also trying to integrate this with a offline visual debugger called Jeliot, and planning to launch it via JNLP from this site itself.
I'm making changes to the front end, adding save code functionality, and changing the look. I'm attaching a screenshot of the same. Hope you like it :)
from java_jail.
Looks great! If you get it working with Jeliot, let me know, that would be very interesting.
from java_jail.
This is how it looks now. I've added a Save Code button and a Start with Jeliot button, which actually launches jeliot with this code. The written code is saved in the server and a corresponding JNLP file is generated to launch Jeliot on the client side (user still has to launch the JNLP file). I've been working on it's Moodle plugin for a month now, and managed to fix the bugs for the newer Moodle versions, and applied the same technique to achieve this mechanism.
My initial plans were to also integrate your debugger to Moodle, but unfortunately neither me nor my team have much time to achieve that functionality.
from java_jail.
Looks nice, keep up the good work!
from java_jail.
Related Issues (9)
- java_jail Not working in my linux machine HOT 1
- VMStartException when running the main method from InMemory HOT 4
- com.sun.jdi.VMDisconnectedException - Happen often HOT 1
- Error occurred during initialization of VM Could not allocate metaspace: 1073741824 bytes
- Unable to run using safeexec
- Java Visualizer not working HOT 75
- Visualizer freezing HOT 2
- Java Visualizer not working Continuation of issue #6 HOT 7
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 java_jail.