You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ortwin Glück (Created JIRA)" <ji...@apache.org> on 2011/12/07 17:06:40 UTC

[jira] [Created] (WICKET-4285) PageSavingThread.stop() blocks forever

PageSavingThread.stop() blocks forever
--------------------------------------

                 Key: WICKET-4285
                 URL: https://issues.apache.org/jira/browse/WICKET-4285
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.4.19
            Reporter: Ortwin Glück


The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method.
Properly set the flag in a finally clause.

Is this class still present in 1.5?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (WICKET-4285) PageSavingThread.stop() blocks forever

Posted by "Ortwin Glück (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ortwin Glück updated WICKET-4285:
---------------------------------

    Attachment:     (was: patch.diff)
    
> PageSavingThread.stop() blocks forever
> --------------------------------------
>
>                 Key: WICKET-4285
>                 URL: https://issues.apache.org/jira/browse/WICKET-4285
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: Ortwin Glück
>              Labels: patch
>         Attachments: patch.diff
>
>
> The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method.
> Properly set the flag in a finally clause.
> Is this class still present in 1.5?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (WICKET-4285) PageSavingThread.stop() blocks forever

Posted by "Martin Grigorov (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173153#comment-13173153 ] 

Martin Grigorov commented on WICKET-4285:
-----------------------------------------

Your fix for 1.5 breaks the unit tests. They hang now. See org.apache.wicket.page.persistent.disk.DiskDataStoreTest#store
The patch for 1.4 is not very clear. Did you just wrap it with try/finally {stop = null; } ?
                
> PageSavingThread.stop() blocks forever
> --------------------------------------
>
>                 Key: WICKET-4285
>                 URL: https://issues.apache.org/jira/browse/WICKET-4285
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: Ortwin Glück
>              Labels: patch
>         Attachments: patch.diff, patch.diff
>
>
> The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method.
> Properly set the flag in a finally clause.
> Is this class still present in 1.5?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (WICKET-4285) PageSavingThread.stop() blocks forever

Posted by "Ortwin Glück (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13165129#comment-13165129 ] 

Ortwin Glück commented on WICKET-4285:
--------------------------------------

By the way, this is not a theoretical problem. I encountered this in practice: A ClassNotFoundException (don't worry about the reasons) caused the thread to die. I had then to kill the application server because it refused to shut down properly. Wicket should not prevent my app server from shutting down.
                
> PageSavingThread.stop() blocks forever
> --------------------------------------
>
>                 Key: WICKET-4285
>                 URL: https://issues.apache.org/jira/browse/WICKET-4285
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: Ortwin Glück
>              Labels: patch
>         Attachments: patch.diff, patch.diff
>
>
> The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method.
> Properly set the flag in a finally clause.
> Is this class still present in 1.5?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (WICKET-4285) PageSavingThread.stop() blocks forever

Posted by "Martin Grigorov (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13164473#comment-13164473 ] 

Martin Grigorov commented on WICKET-4285:
-----------------------------------------

In 1.5 see AsynchronousDataStore
                
> PageSavingThread.stop() blocks forever
> --------------------------------------
>
>                 Key: WICKET-4285
>                 URL: https://issues.apache.org/jira/browse/WICKET-4285
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: Ortwin Glück
>              Labels: patch
>         Attachments: patch.diff
>
>
> The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method.
> Properly set the flag in a finally clause.
> Is this class still present in 1.5?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (WICKET-4285) PageSavingThread.stop() blocks forever

Posted by "Ortwin Glück (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173166#comment-13173166 ] 

Ortwin Glück commented on WICKET-4285:
--------------------------------------

Martin, yes the 1.4 patch is as trivial as you think it is :)
                
> PageSavingThread.stop() blocks forever
> --------------------------------------
>
>                 Key: WICKET-4285
>                 URL: https://issues.apache.org/jira/browse/WICKET-4285
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: Ortwin Glück
>              Labels: patch
>         Attachments: patch-1.5.diff, patch.diff
>
>
> The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method.
> Properly set the flag in a finally clause.
> Is this class still present in 1.5?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (WICKET-4285) PageSavingThread.stop() blocks forever

Posted by "Ortwin Glück (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ortwin Glück updated WICKET-4285:
---------------------------------

    Attachment: patch-1.5.diff

patch for 1.5 that passes the test case
                
> PageSavingThread.stop() blocks forever
> --------------------------------------
>
>                 Key: WICKET-4285
>                 URL: https://issues.apache.org/jira/browse/WICKET-4285
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: Ortwin Glück
>              Labels: patch
>         Attachments: patch-1.5.diff, patch.diff
>
>
> The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method.
> Properly set the flag in a finally clause.
> Is this class still present in 1.5?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (WICKET-4285) PageSavingThread.stop() blocks forever

Posted by "Ortwin Glück (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13164480#comment-13164480 ] 

Ortwin Glück commented on WICKET-4285:
--------------------------------------

In 1.5 it's even worse. AsynchronousDataStore.destroy() does an unconditional wait() on the destroy object. The thread may have already exited, and there is no way to detect that.
(Effective Java item 50: never invoke wait() outside a loop, was written exactly for this reason).

Why this trickery with wait/notify if Threads already have isAlive() and join() methods? I suggest to simply keep a reference to the thread. Patch imminent.
                
> PageSavingThread.stop() blocks forever
> --------------------------------------
>
>                 Key: WICKET-4285
>                 URL: https://issues.apache.org/jira/browse/WICKET-4285
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: Ortwin Glück
>              Labels: patch
>         Attachments: patch.diff
>
>
> The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method.
> Properly set the flag in a finally clause.
> Is this class still present in 1.5?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (WICKET-4285) PageSavingThread.stop() blocks forever

Posted by "Martin Grigorov (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4285.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.0.0
                   1.5.4
                   1.4.20
         Assignee: Martin Grigorov
    
> PageSavingThread.stop() blocks forever
> --------------------------------------
>
>                 Key: WICKET-4285
>                 URL: https://issues.apache.org/jira/browse/WICKET-4285
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: Ortwin Glück
>            Assignee: Martin Grigorov
>              Labels: patch
>             Fix For: 1.4.20, 1.5.4, 6.0.0
>
>         Attachments: patch-1.5.diff, patch.diff
>
>
> The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method.
> Properly set the flag in a finally clause.
> Is this class still present in 1.5?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (WICKET-4285) PageSavingThread.stop() blocks forever

Posted by "Ortwin Glück (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ortwin Glück updated WICKET-4285:
---------------------------------

    Attachment: patch.diff

patch for 1.5.x
                
> PageSavingThread.stop() blocks forever
> --------------------------------------
>
>                 Key: WICKET-4285
>                 URL: https://issues.apache.org/jira/browse/WICKET-4285
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: Ortwin Glück
>              Labels: patch
>         Attachments: patch.diff, patch.diff
>
>
> The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method.
> Properly set the flag in a finally clause.
> Is this class still present in 1.5?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (WICKET-4285) PageSavingThread.stop() blocks forever

Posted by "Ortwin Glück (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ortwin Glück updated WICKET-4285:
---------------------------------

    Attachment: patch.diff

put it in a finally clause
                
> PageSavingThread.stop() blocks forever
> --------------------------------------
>
>                 Key: WICKET-4285
>                 URL: https://issues.apache.org/jira/browse/WICKET-4285
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.19
>            Reporter: Ortwin Glück
>              Labels: patch
>         Attachments: patch.diff
>
>
> The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method.
> Properly set the flag in a finally clause.
> Is this class still present in 1.5?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira