You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Dmitri Blinov (JIRA)" <ji...@apache.org> on 2016/07/12 09:02:20 UTC

[jira] [Created] (JEXL-206) testCancelLoopWait() test hangs sporadically?

Dmitri Blinov created JEXL-206:
----------------------------------

             Summary: testCancelLoopWait() test hangs sporadically?
                 Key: JEXL-206
                 URL: https://issues.apache.org/jira/browse/JEXL-206
             Project: Commons JEXL
          Issue Type: Bug
    Affects Versions: 3.0
            Reporter: Dmitri Blinov


I'm struggling with strange behaviour of the building process, it seems that time after time the process hangs somewhere in the middle of the tests stage. First I thought it was somehow related to memory problems so I changed fork mode of the test plugin by adding                     <forkMode>pertest</forkMode> to maven-surefire-plugin configuration. But that helped for a couple of times to cleanly build jexl and run all tests successfully. The other times it simply hanged on test stage. I have managed to detect that it is the testCancelLoopWait() test that hangs. It writes to the console the message 
{panel}
WARNING: org.apache.commons.jexl3.ScriptCallableTest.testCancelLoopWait@1:20 execution cancelled
{panel}

 and hangs with its stack trace as follows:

{code}
org.apache.commons.jexl3.internal.Interpreter.visit(Interpreter.java:893)
org.apache.commons.jexl3.parser.ASTWhileStatement.jjtAccept(ASTWhileStatement.java:18)
org.apache.commons.jexl3.internal.Interpreter.visit(Interpreter.java:1119)
org.apache.commons.jexl3.parser.ASTJexlScript.jjtAccept(ASTJexlScript.java:55)
org.apache.commons.jexl3.internal.Interpreter.interpret(Interpreter.java:210)
org.apache.commons.jexl3.internal.Script$Callable.interpret(Script.java:364)
org.apache.commons.jexl3.internal.Script$Callable.call(Script.java:372)
   - locked org.apache.commons.jexl3.internal.Script$Callable@18399f62
java.util.concurrent.FutureTask.run(FutureTask.java:262)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:745)
{code}

The problem started manifesting itself right after I had added ScriptInterruptableTest.java (see JEXL-204) but as I understand this test script is completely unrelated to ScriptCallableTest.java so I think it's  merely a conicidence. I could not write anything in ScriptInterruptableTest and screw up ScriptCallableTest, right?

PS. I have managed to catch this exactly behavior after removing ScriptInterruptableTest.java completely and making clean build, so I'm 100% sure there is something wrong with the original code, may be race condition or something.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)