[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] [Jetty 8] Deadlock in JDBCSessionManager
|
Stefan,
As part of some changes for the mongo session manager, the sync block
was removed from JDBCSessionManager.invalidateSession(String) in
jetty-9:
https://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/diff/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionManager.java?id=092c53b335c6ca8aa49a20698faf008d0469dbf4
cheers
Jan
On 14 January 2014 00:03, Stefan Magnus Landrø <stefan.landro@xxxxxxxxx> wrote:
> Hi there,
>
> We're currently experiencing a deadlock in the JDBCSessionManager in latest
> jetty 8.
>
> There lots of synchronization code, which in addition to cause this
> deadlock, also performs really slow, since there are lots of synchronized
> blocks around jdbc calls.
>
> Has this been fixed in jetty 9?
>
> Anyone else seen this?
>
> Stefan
>
> --------------
>
> Found one Java-level deadlock:
> =============================
> "qtp235217511-3361":
> waiting to lock monitor 0x000000000992e268 (object 0x00000000c4f29a38, a
> org.eclipse.jetty.server.session.JDBCSessionManager),
> which is held by "qtp235217511-136"
> "qtp235217511-136":
> waiting to lock monitor 0x0000000009e027e8 (object 0x00000000c4e3aaa8, a
> java.util.HashSet),
> which is held by "qtp235217511-128"
> "qtp235217511-128":
> waiting to lock monitor 0x000000000992e268 (object 0x00000000c4f29a38, a
> org.eclipse.jetty.server.session.JDBCSessionManager),
> which is held by "qtp235217511-136"
>
> Java stack information for the threads listed above:
> ===================================================
> "qtp235217511-3361":
> at
> org.eclipse.jetty.server.session.JDBCSessionManager.getSession(JDBCSessionManager.java:459)
> - waiting to lock <0x00000000c4f29a38> (a
> no.posten.dpost.jetty.config.DpostJDBCSessionManager)
> at
> org.eclipse.jetty.server.session.JDBCSessionManager.getSession(JDBCSessionManager.java:75)
> at
> org.eclipse.jetty.server.session.AbstractSessionManager.getHttpSession(AbstractSessionManager.java:312)
> at
> org.eclipse.jetty.server.session.SessionHandler.checkRequestedSessionId(SessionHandler.java:279)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:159)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> at org.eclipse.jetty.server.Server.handle(Server.java:370)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
> at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
> at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> at java.lang.Thread.run(Thread.java:744)
>
> "qtp235217511-136":
> at
> org.eclipse.jetty.server.session.JDBCSessionIdManager.removeSession(JDBCSessionIdManager.java:409)
> - waiting to lock <0x00000000c4e3aaa8> (a java.util.HashSet)
> at
> org.eclipse.jetty.server.session.JDBCSessionManager.loadSession(JDBCSessionManager.java:870)
> at
> org.eclipse.jetty.server.session.JDBCSessionManager.getSession(JDBCSessionManager.java:482)
> - locked <0x00000000c4f29a38> (a
> no.posten.dpost.jetty.config.DpostJDBCSessionManager)
> at
> org.eclipse.jetty.server.session.JDBCSessionManager.getSession(JDBCSessionManager.java:75)
> at
> org.eclipse.jetty.server.session.AbstractSessionManager.getHttpSession(AbstractSessionManager.java:312)
> at
> org.eclipse.jetty.server.session.SessionHandler.checkRequestedSessionId(SessionHandler.java:279)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:159)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> at org.eclipse.jetty.server.Server.handle(Server.java:370)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
> at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
> at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> at java.lang.Thread.run(Thread.java:744)
>
> "qtp235217511-128":
> at
> org.eclipse.jetty.server.session.JDBCSessionManager.invalidateSession(JDBCSessionManager.java:621)
> - waiting to lock <0x00000000c4f29a38> (a
> no.posten.dpost.jetty.config.DpostJDBCSessionManager)
> at
> org.eclipse.jetty.server.session.JDBCSessionIdManager.invalidateAll(JDBCSessionIdManager.java:503)
> - locked <0x00000000c4e3aaa8> (a java.util.HashSet)
> at
> org.eclipse.jetty.server.session.JDBCSessionManager.removeSession(JDBCSessionManager.java:729)
> at
> org.eclipse.jetty.server.session.AbstractSession.invalidate(AbstractSession.java:335)
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
'Expert Jetty/CometD developer,production,operations advice'