-
1. Re: thread deadlocks in Component.getInstanceFromFactory
titou09 Jan 19, 2011 10:24 PM (in response to jeanluc)It looks very similar
What version of seam are you using?
I am the author of JBSEAM-4669. You should also look at JBSEAM-2419
As you can see in the comments I have never been confortable with the proposed patch but was not in position to prove that the patch was not correct. Maybe you've found tye right test case for that...
Yous should try to sketch what factories are implied in the deadlock by looking at the tracebacks on locked threads
-
2. Re: thread deadlocks in Component.getInstanceFromFactory
jeanluc Jan 20, 2011 9:55 AM (in response to jeanluc)Hi Dennis,
We use 2.2.1.CR2.
The deadlock happened in a training environment; we haven't been able to reproduce it elsewhere (but the application is not yet released to production). The load was low (about 15 users).
We suspect it's the conversation factories but am still a bit puzzled as the lock is not on a conversation itself (which would have been understandable, given that Seam synchronizes requests on conversations), but on that static lock factory.
Below is an excerpt from Seam's source.
package org.jboss.seam; @Scope(ScopeType.APPLICATION) public class Component extends Model { static ReentrantLock factoryLock = new ReentrantLock(); //this is the lock ... private static Object getInstanceFromFactory(String name, ScopeType scope) { Object factory = Component.getInstance(factoryMethod.getComponent().getName(), true ); factoryLock.lock(); //and this is where it locks
I'll try go get more details if I can reproduce it.
-
3. Re: thread deadlocks in Component.getInstanceFromFactory
mana.hotmana76.gmail.com Jan 26, 2011 8:49 AM (in response to jeanluc)I will really appreciate your test case if you reproduce it.
-
4. Re: thread deadlocks in Component.getInstanceFromFactory
oskutka Jan 26, 2011 9:16 AM (in response to jeanluc)Hello Jean Luc,
do you have full stack traces of all (relevant) threads running at the moment of the deadlock?
--
Ondra Skutka -
5. Re: thread deadlocks in Component.getInstanceFromFactory
jeanluc Jan 26, 2011 10:33 AM (in response to jeanluc)Unfortunately not.
Ondrej Skutka wrote on Jan 26, 2011 09:16:
Hello Jean Luc,
do you have full stack traces of all (relevant) threads running at the moment of the deadlock?
--
Ondra Skutka