You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Ben Sommerville (JIRA)" <de...@tapestry.apache.org> on 2007/06/14 05:44:26 UTC

[jira] Commented: (TAPESTRY-1571) CheckForUpdatesFilter can cause deadlock

    [ https://issues.apache.org/jira/browse/TAPESTRY-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504531 ] 

Ben Sommerville commented on TAPESTRY-1571:
-------------------------------------------

I can think of a couple of approaches for solving this.
a) put a timeout on the request for a write lock.
b) define a flag/parameter in a request/url that will disable checking for updates.

(a) seems the better approach to me.  In fact, given that checking is primarily for development (where load will be very light), it would probably work to turn the write lock request into a tryLock, & continue straight away if another thread has the read lock.



> CheckForUpdatesFilter can cause deadlock
> ----------------------------------------
>
>                 Key: TAPESTRY-1571
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1571
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.5
>            Reporter: Ben Sommerville
>
> CheckForUpdatesFilter will cause a deadlock in the following circumstances.
> 1) Initial request is received and processing starts  (CheckForUpdatesFilter read lock obtained)
> 2) Request processing triggers another http request to the same application
> 3) Nested request is received
> 4) CheckForUpdatesFilter determines it is time to check for file updates
> 5) CheckForUpdatesFilter tries to obtain write lock
> 6) Deadlock: Nested request is blocked waiting for read lock held by parent request to be released.
> This is an unusual situation, generally I wouldn't try to to access a page via http whilst trying to process another request.  However I ran across this problem whilst using a third party library (JasperReports) that referenced resources via http links.  
> Although uncommon, I believe Tapestry should be able to handle this without deadlocking

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org