{"action":"created","issue":{"url":"https://api.github.com/repos/DMOJ/judge/issues/53","labels_url":"https://api.github.com/repos/DMOJ/judge/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/DMOJ/judge/issues/53/comments","events_url":"https://api.github.com/repos/DMOJ/judge/issues/53/events","html_url":"https://github.com/DMOJ/judge/issues/53","id":84339691,"number":53,"title":"Java executor deadlock","user":{"login":"Xyene","id":1403503,"avatar_url":"https://avatars.githubusercontent.com/u/1403503?v=3","gravatar_id":"","url":"https://api.github.com/users/Xyene","html_url":"https://github.com/Xyene","followers_url":"https://api.github.com/users/Xyene/followers","following_url":"https://api.github.com/users/Xyene/following{/other_user}","gists_url":"https://api.github.com/users/Xyene/gists{/gist_id}","starred_url":"https://api.github.com/users/Xyene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xyene/subscriptions","organizations_url":"https://api.github.com/users/Xyene/orgs","repos_url":"https://api.github.com/users/Xyene/repos","events_url":"https://api.github.com/users/Xyene/events{/privacy}","received_events_url":"https://api.github.com/users/Xyene/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DMOJ/judge/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/DMOJ/judge/labels/executors","name":"executors","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"Xyene","id":1403503,"avatar_url":"https://avatars.githubusercontent.com/u/1403503?v=3","gravatar_id":"","url":"https://api.github.com/users/Xyene","html_url":"https://github.com/Xyene","followers_url":"https://api.github.com/users/Xyene/followers","following_url":"https://api.github.com/users/Xyene/following{/other_user}","gists_url":"https://api.github.com/users/Xyene/gists{/gist_id}","starred_url":"https://api.github.com/users/Xyene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xyene/subscriptions","organizations_url":"https://api.github.com/users/Xyene/orgs","repos_url":"https://api.github.com/users/Xyene/repos","events_url":"https://api.github.com/users/Xyene/events{/privacy}","received_events_url":"https://api.github.com/users/Xyene/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2015-06-03T03:43:02Z","updated_at":"2015-06-04T00:57:29Z","closed_at":null,"body":"On Excalibur and Durandal, a user submission for DMPG '15 S5 - Black and White murders the Java executor with an infinitely long grading time.\r\n\r\n```\r\nroot@onlinejudge2:~# java -version\r\njava version \"1.7.0_65\"\r\nOpenJDK Runtime Environment (IcedTea 2.5.1) (7u65-2.5.1-5~deb7u1)\r\nOpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)\r\n```\r\n\r\n```\r\nroot@onlinejudge2:~# uname -a\r\nLinux onlinejudge2 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64 GNU/Linux\r\n```\r\n\r\nThe offending submission:\r\n\r\n```java\r\nimport java.io.*;\r\nimport java.util.*;\r\n\r\npublic class S5\r\n{\r\n   public static void main (String[] args)\r\n   {\r\n      try\r\n      {\r\n         int n =0, m = 0;\r\n      \r\n         int[] x = new int[m];\r\n         int[] y = new int[m];\r\n         int[] w = new int[m];\r\n         int[] h = new int[m];\r\n         \r\n         boolean[][] cells;\r\n         BufferedReader br = new BufferedReader (new InputStreamReader(System.in));\r\n      \r\n         String temp = \"\";\r\n         temp = br.readLine();\r\n         n = Integer.parseInt(temp.split(\" \")[0]);\r\n         cells = new boolean[n][n];\r\n         m = Integer.parseInt(temp.split(\" \")[1]);\r\n         x = new int[m];\r\n         y = new int[m];\r\n         w = new int[m];\r\n         h = new int[m];\r\n         for (int i = 0; i < m; i++)\r\n         {\r\n         \r\n            temp = br.readLine();\r\n            x[i] = Integer.parseInt(temp.split(\" \")[0]);\r\n            y[i] = Integer.parseInt(temp.split(\" \")[1]);\r\n            w[i] = Integer.parseInt(temp.split(\" \")[2]);\r\n            h[i] = Integer.parseInt(temp.split(\" \")[3]);\r\n         }\r\n         \r\n      \r\n         for (int i = 0; i < n; i++)\r\n         {\r\n            for (int k = 0; k <n; k++)\r\n            {\r\n               cells[i][k] = false;\r\n            }\r\n         \r\n         }\r\n      \r\n         for (int com = 0; com < m; com++)\r\n         {\r\n            for (int i = x[com]; i < (x[com] + w[com]); i++)\r\n            {\r\n               for (int k = y[com]; k <y[com] + h[com]; k++)\r\n               {\r\n                  cells[i][k] = !cells[i][k];\r\n               }\r\n            }\r\n         }\r\n      \r\n         int count = 0;\r\n      \r\n         for (int i = 0; i < n; i++)\r\n         {\r\n            for (int k = 0; k < n; k++)\r\n            {\r\n               if (cells[i][k] == true)\r\n               {\r\n                  count++;\r\n               }\r\n            }\r\n         }\r\n      \r\n         System.out.println(count);\r\n      }\r\n      catch (IOException ioe)\r\n      {\r\n      }\r\n   }\r\n\r\n}\r\n```\r\n\r\nSubmission abortion continues to work, however."},"comment":{"url":"https://api.github.com/repos/DMOJ/judge/issues/comments/108662914","html_url":"https://github.com/DMOJ/judge/issues/53#issuecomment-108662914","issue_url":"https://api.github.com/repos/DMOJ/judge/issues/53","id":108662914,"user":{"login":"quantum5","id":461885,"avatar_url":"https://avatars.githubusercontent.com/u/461885?v=3","gravatar_id":"","url":"https://api.github.com/users/quantum5","html_url":"https://github.com/quantum5","followers_url":"https://api.github.com/users/quantum5/followers","following_url":"https://api.github.com/users/quantum5/following{/other_user}","gists_url":"https://api.github.com/users/quantum5/gists{/gist_id}","starred_url":"https://api.github.com/users/quantum5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantum5/subscriptions","organizations_url":"https://api.github.com/users/quantum5/orgs","repos_url":"https://api.github.com/users/quantum5/repos","events_url":"https://api.github.com/users/quantum5/events{/privacy}","received_events_url":"https://api.github.com/users/quantum5/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T00:57:29Z","updated_at":"2015-06-04T00:57:29Z","body":"```shell\r\nquantum@astatine:/tmp/tmpVUlScY$ sudo jstack 23308\r\n23308: Unable to open socket file: target process not responding or HotSpot VM not loaded\r\nThe -F option can be used when the target process is not responding\r\nquantum@astatine:/tmp/tmpVUlScY$ sudo jstack -F 23308\r\nAttaching to process ID 23308, please wait...\r\nDebugger attached successfully.\r\nServer compiler detected.\r\nJVM version is 24.79-b02\r\nDeadlock Detection:\r\n\r\nNo deadlocks found.\r\n\r\nThread 23319: (state = IN_JAVA)\r\n - S5.main(java.lang.String[]) @bci=387, line=80 (Compiled frame; information may be imprecise)\r\n - sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) @bci=0 (Interpreted frame)\r\n - sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=87, line=57 (Interpreted frame)\r\n - sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=43 (Interpreted frame)\r\n - java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=57, line=606 (Interpreted frame)\r\n - ca.dmoj.java.SubmissionThread.run() @bci=54, line=27 (Interpreted frame)\r\n\r\n\r\nThread 23318: (state = BLOCKED)\r\n - java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)\r\n - ca.dmoj.java.ShockerThread.run() @bci=4, line=22 (Interpreted frame)\r\n\r\n\r\nThread 23313: (state = BLOCKED)\r\n\r\n\r\nThread 23312: (state = BLOCKED)\r\n - java.lang.Object.wait(long) @bci=0 (Interpreted frame)\r\n - java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=135 (Interpreted frame)\r\n - java.lang.ref.ReferenceQueue.remove() @bci=2, line=151 (Interpreted frame)\r\n - java.lang.ref.Finalizer$FinalizerThread.run() @bci=36, line=209 (Interpreted frame)\r\n\r\n\r\nThread 23311: (state = BLOCKED)\r\n - java.lang.Object.wait(long) @bci=0 (Interpreted frame)\r\n - java.lang.Object.wait() @bci=2, line=503 (Interpreted frame)\r\n - java.lang.ref.Reference$ReferenceHandler.run() @bci=46, line=133 (Interpreted frame)\r\n\r\n\r\nThread 23309: (state = BLOCKED)\r\n - java.lang.Object.wait(long) @bci=0 (Interpreted frame)\r\n - java.lang.Thread.join(long) @bci=38, line=1281 (Interpreted frame)\r\n - java.lang.Thread.join() @bci=2, line=1355 (Interpreted frame)\r\n - ca.dmoj.java.JavaSafeExecutor.main(java.lang.String[]) @bci=319, line=173 (Interpreted frame)\r\n```"}}