ioi / isolate

Sandbox for securely executing untrusted programs
Other
1.05k stars 157 forks source link

Unable to timeout blocking code #76

Closed rohanraarora closed 5 years ago

rohanraarora commented 5 years ago

I am using isolate to run unsafe code inside docker environment for quite some time. Usually isolate does the job and kills long running code after the time limit but isolate is unable to kill blocking python code.

import queue
q = queue.Queue()
q.get()

Above code doesn't get killed even after using the timeout option. get() method of Queue class is a blocking code. How to timeout the above code? TIA.

gollux commented 5 years ago

Did you set the wall clock limit?

rohanraarora commented 5 years ago

Wall clock limit does the job as expected. Thanks.