#216 Standalone JVM does not shutdown

v3.3.3
open-fixed
API (14)
5
2009-08-02
2009-03-25
No

When running an application in Standalone JVM mode, the WrapperManager.stopAndReturn() does not return. We have traced the code and the method stops on the synchronized lock on the WrapperManager class, which is still being held by the WrapperManager.start() method.

We noticed this when we upgraded from version 3.3.1 to version 3.3.3, the main change seems to be the call to startCompleted() by the startRunner. The startRunner then waits for the lock which is owned by the main thread to be released, the main thread subequently joins the runner thread and waits for the runner to completed. See the attached file for a simplified example.

Discussion

  • Main thread blocks on the runner

     
    Attachments
  • Leif Mortenson
    Leif Mortenson
    2009-03-26

    Robbert,
    Thank you for pointing this out. I was able to reproduce the problem but it is going to be quite a bit of work to fix it safely because of where it is in the code. It will require moving from using the synchronized command to using a lock-release semaphore because of the multiple threads involved.

    This problem does not occur when the Wrapper is being run under normal operation. It only happens when running in standalone mode without the Wrapper binary.

    Could you please let me know the priority of this problem? Is it causing you problems?

    Cheers,
    Leif

     
  • Leif Mortenson
    Leif Mortenson
    2009-03-26

    • labels: --> API
    • assigned_to: nobody --> mortenson
    • status: open --> open-accepted
     
  • This is them main method I use to launch our application when developing, so it's _very_ inconvenient.

    -anders

     
  • Leif Mortenson
    Leif Mortenson
    2009-08-02

    This problem has been fixed for the 3.3.6 release.

    Cheers,
    Leif

     
  • Leif Mortenson
    Leif Mortenson
    2009-08-02

    • status: open-accepted --> open-fixed