Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Deadlock condition in EntityManagerFactoryImpl?

Turns out that it is not an issue with EclipseLink (but you probably already knew that...) According to the debugger, it looked as if the threads were getting blocked  on line 108 of org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl. After spending some time with this and stepping through a large amount of GlassFish code I managed to get down to the code that was causing the blocking. It seems that this is an issue with our database server. At some point, GlassFish is attempting to begin a transaction, which in turn calls out to our database server (Sybase ASE) to begin a transaction. For some reason it seems to be dying in a stream reader while attempting to read the next result set. Something down in the database is blocking so this call never returns, which blocks all other calls as well.

Chris Mathrusse
christopher.mathrusse@xxxxxxxxxx
Sybase, Inc



From: <Christopher.Mathrusse@xxxxxxxxxx>
To: Eclipselink-Users <eclipselink-users@xxxxxxxxxxx>
Date: 01/14/2010 12:33 PM
Subject: [eclipselink-users] Deadlock condition in EntityManagerFactoryImpl?
Sent by: <eclipselink-users-bounces@xxxxxxxxxxx>





I'm running into a rather odd problem that we have encountered in both our DEV and TEST environment.s We are using EclipseLink 1.1.2 in our production application that is deployed to GlassFish v2.1 (we also see this in gf v2.1.1) We have EclipseLink 1.1.2 embedded within our application as GlassFish v2.1 comes bundled with TopLink and we wanted to use EclipseLink, which should be of no consequence. Our application deploys and loads successfully but when a user logs into the application, which is authenticated against LDAP, and succeeds, the context gets transferred from the web application context over to the EJB application context. At this point there are permission's that are checked and everything appears to go normally, but the at one point the thread simply hangs. No exception, no nothing and the user is blocked at the login screen.

This happens as well to all of our scheduled tasks that are launched with the Quartz scheduler in exactly the same place with the same behavior. In desperation I finally attached a remote debugging session to the GlassFish environment that we are seeing this behavior on. I was able to step through the GlassFish code successfully, ensuring that everything was working correctly, and finally managed to see the thread get stuck on line 108 of org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl which is enclosed in a synchronized block on this reference. From here there is no activity and everything comes to a halt. I don't see this behavior on my local environment, only in our TEST and DEV environments, which are clustered (if that has any impact). I somewhat at a loss as to why this would work in one environment and not in another so I'm hoping that you may be able to shed some light onto this for me.


Thanks for the help...


Chris Mathrusse
christopher.mathrusse@xxxxxxxxxx
Sybase, Inc
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top