[jboss-jira] [JBoss JIRA] Resolved: (JBAS-8369) JBoss AS CPU loop - incorrect synchronization on HashMap?

Remy Maucherat (JIRA) jira-events at lists.jboss.org
Fri Aug 27 09:16:12 EDT 2010


     [ https://jira.jboss.org/browse/JBAS-8369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remy Maucherat resolved JBAS-8369.
----------------------------------

    Fix Version/s: 6.0.0.CR1
       Resolution: Out of Date


At some point, it was believed that JSP pages were a valid injection target (they are not, the EE spec specifically forbids it), thus requiring adding "dynamic" bean support to the injection code. As I look into the code there is indeed a sync issue. To fix it, all you need to do it drop the line dynamicClassLoaders.add("...JasperLoader"); from TomcatInjectionContainer.
AS 6 did already remove injection for JSP pages.

> JBoss AS CPU loop - incorrect synchronization on HashMap?
> ---------------------------------------------------------
>
>                 Key: JBAS-8369
>                 URL: https://jira.jboss.org/browse/JBAS-8369
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Web (Tomcat) service
>    Affects Versions: JBossAS-5.1.0.GA
>         Environment: SUSE Linux 2.6.27.19-5-default #1 SMP 2009-02-28 04:40:21 +0100 x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: Stephen Potter
>            Assignee: Remy Maucherat
>             Fix For: 6.0.0.CR1
>
>
> Web application becomes unresponsive.  JBoss java CPU at 340%.  jstack shows 3 JBoss web threads in HashMap.get suggesting that the cause is incorrectly synchronized use of a HashMap.  Extract of stack dump:
> "ajp-127.0.0.1-50113-55" daemon prio=10 tid=0x000000004c364800 nid=0x4f1 runnable [0x00007f6f09cd7000]
>    java.lang.Thread.State: RUNNABLE
> 	at java.util.HashMap.get(HashMap.java:303)
> 	at org.jboss.injection.InjectionUtil.collapseXmlMethodInjectors(InjectionUtil.java:71)
> 	at org.jboss.injection.InjectionUtil.collapseXmlMethodInjectors(InjectionUtil.java:92)
> 	at org.jboss.injection.InjectionUtil.collapseXmlMethodInjectors(InjectionUtil.java:92)
> 	at org.jboss.web.tomcat.service.injection.TomcatInjectionUtils.processDynamicBeanAnnotations(TomcatInjectionUtils.java:59)
> 	at org.jboss.web.tomcat.service.TomcatInjectionContainer.processAnnotations(TomcatInjectionContainer.java:407)
> 	at org.jboss.web.tomcat.service.TomcatInjectionContainer.processDynamicBeanAnnotations(TomcatInjectionContainer.java:382)
> 	at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:274)
> 	at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:265)
> 	at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:145)
> 	- locked <0x00007f6f8d353200> (a org.apache.jasper.servlet.JspServletWrapper)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>         . . . . . . . . . . . . . 
> "ajp-127.0.0.1-50113-15" daemon prio=10 tid=0x000000005caa6800 nid=0x15f2 runnable [0x00007f6f4073d000]
>    java.lang.Thread.State: RUNNABLE
> 	at java.util.HashMap.get(HashMap.java:303)
> 	at org.jboss.injection.InjectionUtil.collapseXmlMethodInjectors(InjectionUtil.java:71)
> 	at org.jboss.injection.InjectionUtil.collapseXmlMethodInjectors(InjectionUtil.java:92)
> 	at org.jboss.injection.InjectionUtil.collapseXmlMethodInjectors(InjectionUtil.java:92)
> 	at org.jboss.web.tomcat.service.injection.TomcatInjectionUtils.processDynamicBeanAnnotations(TomcatInjectionUtils.java:59)
> 	at org.jboss.web.tomcat.service.TomcatInjectionContainer.processAnnotations(TomcatInjectionContainer.java:407)
> 	at org.jboss.web.tomcat.service.TomcatInjectionContainer.processDynamicBeanAnnotations(TomcatInjectionContainer.java:382)
> 	at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:274)
> 	at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:265)
> 	at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:145)
> 	- locked <0x00007f6fd8a886b0> (a org.apache.jasper.servlet.JspServletWrapper)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>         . . . . . . . . . . . . . 
> "ajp-127.0.0.1-50113-6" daemon prio=10 tid=0x00000000418f0000 nid=0x25d7 runnable [0x00007f6f41045000]
>    java.lang.Thread.State: RUNNABLE
> 	at java.util.HashMap.get(HashMap.java:303)
> 	at org.jboss.injection.InjectionUtil.collapseXmlMethodInjectors(InjectionUtil.java:71)
> 	at org.jboss.injection.InjectionUtil.collapseXmlMethodInjectors(InjectionUtil.java:92)
> 	at org.jboss.injection.InjectionUtil.collapseXmlMethodInjectors(InjectionUtil.java:92)
> 	at org.jboss.web.tomcat.service.injection.TomcatInjectionUtils.processDynamicBeanAnnotations(TomcatInjectionUtils.java:59)
> 	at org.jboss.web.tomcat.service.TomcatInjectionContainer.processAnnotations(TomcatInjectionContainer.java:407)
> 	at org.jboss.web.tomcat.service.TomcatInjectionContainer.processDynamicBeanAnnotations(TomcatInjectionContainer.java:382)
> 	at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:274)
> 	at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:265)
> 	at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:145)
> 	- locked <0x00007f6fd40a01b8> (a org.apache.jasper.servlet.JspServletWrapper)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>         . . . . . . . . . . . . . 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list