ochko / safeexec

safe executor for programming contest auto judge system
http://coder.mn
25 stars 22 forks source link

Mono "hello world" program gives errors #5

Closed dz0 closed 9 years ago

dz0 commented 9 years ago

We try to adapt Websheets for C#, but safeexec experiments with Hello World give strange errors:

cemc fork gives OLE:

$ ./safeexec --exec /usr/bin/mono tests/hello.exe
Output Limit Exceeded
elapsed time: 1 seconds
memory usage: 628 kbytes

and ochko version:

$ ./safeexec --exec /usr/bin/mono tests/hello.exe
CreateThread: Error creating native thread handle Resource temporarily unavailable (11)
Command exited with non-zero status (1)
elapsed time: 0 seconds
memory usage: 64 kbytes
cpu usage: 0.012 seconds
cpu usage: 0.000 seconds

we use Ubuntu 14.04

ochko commented 9 years ago

Mono runtime needs more than 1 thread. Try this:

$ ./safeexec --nproc 3 --exec /usr/bin/mono tests/hello.exe

dz0 commented 9 years ago

Thanks, it helps for your version:

$ ./safeexec --nproc 3 --exec /usr/bin/mono tests/hello.exe
Hello Mono
OK
elapsed time: 0 seconds
memory usage: 18244 kbytes
cpu usage: 0.056 seconds

and in cemc fork:

$ ./safeexec --fsize 5  --nproc 1 --exec /usr/bin/mono tests/hello.exe
Hello Mono
OK
elapsed time: 1 seconds
memory usage: 18492 kbytes
cpu usage: 0.056 seconds
ochko commented 9 years ago

memory usage: 18244 kbytes

If you program run a bit longer it will terminate with Memory Limit Exceeded. That case you could try --mem 60000 or more.