[ 
https://issues.apache.org/jira/browse/TAPESTRY-2561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628886#action_12628886
 ] 

Howard M. Lewis Ship commented on TAPESTRY-2561:
------------------------------------------------

Man this is tricky.

Java loads classes as needed.  Accessing a method, such as 
PublicList.getQueryPublicCallback(), is referencing a previously unloaded 
class, which is then loaded. The Java library code is synchronized against the 
class loader instance, while other code in T5 is synchronized against the 
global mutex.

This is a bit like whack-a-mole.

I think I need to be able to reproduce this on my workstation (duh!).

I would think that synchronizing on the global mutex inside 
PackageAwareLoader.findClass() would help ... but that caused a prior deadlock 
(I commented out the code at some point).

Looking at the traces, this kind of thing should only happen on the first load 
of the page (i.e., a race by multiple threads to initialize the page 
instances). Is this true?  If you "warm up the app" then start crushing it with 
requests, does it fail?  In other words, I could use a little more step-by-step 
in how you reach the deadlock, and what operating systems are involved.

> Rapidly refreshing a page, even the same page, can cause a deadlock related 
> to class loading
> --------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2561
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2561
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.14
>         Environment: Mac pro, OS Version:      Mac OS X 10.5.4 (9E17)
> Java HotSpot(TM) Client VM (1.5.0_13-119 mixed mode,
> sharing)
>            Reporter: Steven Woolley
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.15
>
>         Attachments: full thread dump deadlock.txt
>
>
> It was triggered by (accidentally) double clicking a pagelink ;)
> Unfortunately, can't quite repeat it... at least not clicking with a mouse...

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to