[JBoss JIRA] (GADGETS-71) Occasional ConcurrentModificationException when starting up gadget web UI
by Eric Wittmann (JIRA)
[ https://issues.jboss.org/browse/GADGETS-71?page=com.atlassian.jira.plugin... ]
Eric Wittmann commented on GADGETS-71:
--------------------------------------
After looking into this a bit here is what I have to report. Basically the google closure compiler is not thread-safe. The class that's using it is:
org.apache.shindig.gadgets.rewrite.js.ClosureJsCompiler
Fortunately, the google compiler itself is being created new each time. However, the compiler options is cached in the ClosureJsCompiler and it turns out that the compiler options are *also* not thread safe.
I believe the fix would be to no longer cache the google compiler options (in the 'compilerOptions' variable of ClosureJsCompiler). This is a fix to an apache shindig class, so we would presumably need to patch shindig.
The relevant line of code is line 83 of ClosureJsCompiler -> remove that line and then fix errors as appropriate.
> Occasional ConcurrentModificationException when starting up gadget web UI
> -------------------------------------------------------------------------
>
> Key: GADGETS-71
> URL: https://issues.jboss.org/browse/GADGETS-71
> Project: Gadget Server and Gadgets
> Issue Type: Bug
> Reporter: Gary Brown
> Assignee: Eric Wittmann
>
> This exception occurs periodically when starting up the gadget server and adding the gadgets to a page. It appears to be related to the service overview gadget, as that does not display any content when this exception occurs.
> {noformat}
> 10:23:09,459 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/gadget-web].[js]] (http-/127.0.0.1:8080-4) JBWEB000236: Servlet.service() for servlet js threw exception: java.util.ConcurrentModificationException
> at java.util.TreeMap$NavigableSubMap$SubMapIterator.prevEntry(TreeMap.java:1605) [rt.jar:1.7.0_07]
> at java.util.TreeMap$NavigableSubMap$DescendingSubMapKeyIterator.next(TreeMap.java:1682) [rt.jar:1.7.0_07]
> at com.google.javascript.jscomp.ComposeWarningsGuard.addGuards(ComposeWarningsGuard.java:99) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.ComposeWarningsGuard.addGuard(ComposeWarningsGuard.java:89) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.ComposeWarningsGuard.addGuards(ComposeWarningsGuard.java:100) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.ComposeWarningsGuard.<init>(ComposeWarningsGuard.java:79) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.Compiler.initOptions(Compiler.java:277) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.Compiler.initModules(Compiler.java:332) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.Compiler.init(Compiler.java:312) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.Compiler.compile(Compiler.java:511) [closure-compiler-r1741.jar:]
> at org.apache.shindig.gadgets.rewrite.js.ClosureJsCompiler.doCompile(ClosureJsCompiler.java:205) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.shindig.gadgets.rewrite.js.ClosureJsCompiler.compile(ClosureJsCompiler.java:172) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.shindig.gadgets.js.CompilationProcessor.process(CompilationProcessor.java:48) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.shindig.gadgets.js.DefaultJsProcessorRegistry.process(DefaultJsProcessorRegistry.java:53) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.shindig.gadgets.js.DefaultJsServingPipeline.execute(DefaultJsServingPipeline.java:41) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.shindig.gadgets.servlet.JsServlet.doGet(JsServlet.java:93) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.shindig.gadgets.servlet.ETagFilter.doFilter(ETagFilter.java:55) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.shindig.common.servlet.HostFilter.doFilter(HostFilter.java:39) [shindig-common-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (GADGETS-71) Occasional ConcurrentModificationException when starting up gadget web UI
by Eric Wittmann (JIRA)
[ https://issues.jboss.org/browse/GADGETS-71?page=com.atlassian.jira.plugin... ]
Work on GADGETS-71 started by Eric Wittmann.
> Occasional ConcurrentModificationException when starting up gadget web UI
> -------------------------------------------------------------------------
>
> Key: GADGETS-71
> URL: https://issues.jboss.org/browse/GADGETS-71
> Project: Gadget Server and Gadgets
> Issue Type: Bug
> Reporter: Gary Brown
> Assignee: Eric Wittmann
>
> This exception occurs periodically when starting up the gadget server and adding the gadgets to a page. It appears to be related to the service overview gadget, as that does not display any content when this exception occurs.
> {noformat}
> 10:23:09,459 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/gadget-web].[js]] (http-/127.0.0.1:8080-4) JBWEB000236: Servlet.service() for servlet js threw exception: java.util.ConcurrentModificationException
> at java.util.TreeMap$NavigableSubMap$SubMapIterator.prevEntry(TreeMap.java:1605) [rt.jar:1.7.0_07]
> at java.util.TreeMap$NavigableSubMap$DescendingSubMapKeyIterator.next(TreeMap.java:1682) [rt.jar:1.7.0_07]
> at com.google.javascript.jscomp.ComposeWarningsGuard.addGuards(ComposeWarningsGuard.java:99) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.ComposeWarningsGuard.addGuard(ComposeWarningsGuard.java:89) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.ComposeWarningsGuard.addGuards(ComposeWarningsGuard.java:100) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.ComposeWarningsGuard.<init>(ComposeWarningsGuard.java:79) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.Compiler.initOptions(Compiler.java:277) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.Compiler.initModules(Compiler.java:332) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.Compiler.init(Compiler.java:312) [closure-compiler-r1741.jar:]
> at com.google.javascript.jscomp.Compiler.compile(Compiler.java:511) [closure-compiler-r1741.jar:]
> at org.apache.shindig.gadgets.rewrite.js.ClosureJsCompiler.doCompile(ClosureJsCompiler.java:205) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.shindig.gadgets.rewrite.js.ClosureJsCompiler.compile(ClosureJsCompiler.java:172) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.shindig.gadgets.js.CompilationProcessor.process(CompilationProcessor.java:48) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.shindig.gadgets.js.DefaultJsProcessorRegistry.process(DefaultJsProcessorRegistry.java:53) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.shindig.gadgets.js.DefaultJsServingPipeline.execute(DefaultJsServingPipeline.java:41) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.shindig.gadgets.servlet.JsServlet.doGet(JsServlet.java:93) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.shindig.gadgets.servlet.ETagFilter.doFilter(ETagFilter.java:55) [shindig-gadgets-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.shindig.common.servlet.HostFilter.doFilter(HostFilter.java:39) [shindig-common-3.0.0-beta4.jar:3.0.0-beta4]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months