You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One way to reproduce is to set a breakpoint in PushRequestHandler's constructor and DefaultBroadcasterFactory.lookup(Class,Object,boolean,boolean) . Then open two URLs mapped to different servlets, e.g. /integration and /run/BasicPush. The race condition comes from addAtmosphereHandler. Depending on which thread enters the synchronized block in lookup first, it either works or throws an exception:
Apr 2, 2014 7:58:26 PM org.atmosphere.cpr.AtmosphereFramework interceptor
INFO: Installed AtmosphereInterceptor Track Message Size Interceptor using | with priority BEFORE_DEFAULT
Apr 2, 2014 7:58:34 PM org.atmosphere.cpr.AtmosphereFramework configureBroadcaster
SEVERE: Unable to configure Broadcaster/Factory/Cache
java.lang.IllegalStateException: Broadcaster already exists /*. Use BroadcasterFactory.lookup instead
at org.atmosphere.cpr.DefaultBroadcasterFactory.lookup(DefaultBroadcasterFactory.java:189)
at org.atmosphere.cpr.DefaultBroadcasterFactory.get(DefaultBroadcasterFactory.java:121)
at org.atmosphere.cpr.DefaultBroadcasterFactory.get(DefaultBroadcasterFactory.java:108)
at org.atmosphere.cpr.AtmosphereFramework.configureBroadcaster(AtmosphereFramework.java:1041)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:714)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:616)
at com.vaadin.server.communication.PushRequestHandler.<init>(PushRequestHandler.java:113)
at com.vaadin.server.VaadinServletService.createRequestHandlers(VaadinServletService.java:92)
at com.vaadin.server.VaadinService.init(VaadinService.java:179)
at com.vaadin.server.VaadinServlet.createServletService(VaadinServlet.java:190)
at com.vaadin.server.VaadinServlet.init(VaadinServlet.java:96)
at com.vaadin.server.LegacyVaadinServlet.init(LegacyVaadinServlet.java:48)
at com.vaadin.launcher.ApplicationRunnerServlet.init(ApplicationRunnerServlet.java:60)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:519)
at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:402)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:642)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:488)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:932)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:994)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
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:628)
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:695)
Apr 2, 2014 7:58:34 PM org.atmosphere.cpr.AtmosphereFramework autoDetectWebSocketHandler
INFO: Auto detecting WebSocketHandler in /WEB-INF/classes/
Originally by @Artur-
One way to reproduce is to set a breakpoint in PushRequestHandler's constructor and DefaultBroadcasterFactory.lookup(Class,Object,boolean,boolean) . Then open two URLs mapped to different servlets, e.g. /integration and /run/BasicPush. The race condition comes from addAtmosphereHandler. Depending on which thread enters the synchronized block in lookup first, it either works or throws an exception:
Imported from https://dev.vaadin.com/ issue #13528
The text was updated successfully, but these errors were encountered: