Java executor deadlock #53
Comments
I suspect a regression in the OpenJDK JIT compiler in that version. Other judges use 7u79. Then again the other available judges are all 32-bit... |
Will confirm tomorrow by deploying a 64-bit judge VM. |
Submission It would appear that input must be consumed for the issue to manifest, though it may just be a timing thing. |
I'm hesitant to rule this issue out as an OpenJDK bug. |
After about 30 minutes, the judge indeed crashes.
|
According to @quantum5 the |
quantum@astatine:/tmp/tmpVUlScY$ cat state
1236 0 35812 0 0 OK
quantum@astatine:/tmp/tmpVUlScY$ ps aux | grep java
judge 23308 82.0 32.7 1230564 165568 ? Sl 20:49 3:09 java -client -Xmx262144K -jar /home/quantum/judge/executors/java_executor.jar /tmp/tmpVUlScY S5 4000 state |
Never thought |
quantum@astatine:/tmp/tmpVUlScY$ sudo jstack 23308
23308: Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding
quantum@astatine:/tmp/tmpVUlScY$ sudo jstack -F 23308
Attaching to process ID 23308, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.79-b02
Deadlock Detection:
No deadlocks found.
Thread 23319: (state = IN_JAVA)
- S5.main(java.lang.String[]) @bci=387, line=80 (Compiled frame; information may be imprecise)
- sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) @bci=0 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=87, line=57 (Interpreted frame)
- sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=43 (Interpreted frame)
- java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=57, line=606 (Interpreted frame)
- ca.dmoj.java.SubmissionThread.run() @bci=54, line=27 (Interpreted frame)
Thread 23318: (state = BLOCKED)
- java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
- ca.dmoj.java.ShockerThread.run() @bci=4, line=22 (Interpreted frame)
Thread 23313: (state = BLOCKED)
Thread 23312: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=135 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove() @bci=2, line=151 (Interpreted frame)
- java.lang.ref.Finalizer$FinalizerThread.run() @bci=36, line=209 (Interpreted frame)
Thread 23311: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=503 (Interpreted frame)
- java.lang.ref.Reference$ReferenceHandler.run() @bci=46, line=133 (Interpreted frame)
Thread 23309: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Thread.join(long) @bci=38, line=1281 (Interpreted frame)
- java.lang.Thread.join() @bci=2, line=1355 (Interpreted frame)
- ca.dmoj.java.JavaSafeExecutor.main(java.lang.String[]) @bci=319, line=173 (Interpreted frame) |
OK the state file is from the previous test case:
|
The offending line seems to be |
Running the test case on plain java, no fancy executor:
You know you are screwed when SIGTERM doesn't kill the JVM after this. |
Worth noting that the submission is very far from actually finishing. The snapshot is taken a couple of seconds in, when the same submission is still busy in the toggling loop when run on the oracle java 8 vm and another computer. The idea of execution at line 80 seems impossible. |
I think I will close this one, as it is confirmed bug in the JRE. |
On Excalibur and Durandal, a user submission for DMPG '15 S5 - Black and White murders the Java executor with an infinitely long grading time.
The offending submission:
Submission abortion continues to work, however.
The text was updated successfully, but these errors were encountered: