[
https://issues.jboss.org/browse/JBWEB-311?page=com.atlassian.jira.plugin....
]
Aaron Ogburn updated JBWEB-311:
-------------------------------
Description:
JspConfig init isn't thread safe and can cause the following
ConcurrentModificationException:
{code}
java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
at java.util.AbstractList$Itr.next(AbstractList.java:343)
at org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:303)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:112)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:333)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:313)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:300)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
{code}
Issue occurs like so:
1) thread a starts JspConfig.init/proccessWebDotXml
2) thread b starts JspConfig.init/proccessWebDotXml
3) thread a finishes JspConfig.init/proccessWebDotXml and then calls
JspConfig.findJspProperty
4) thread b sets the jspProperties vector before thread a gets an iterator of it
5) thread b modifies the jspProperties vector, causing the ConcurrentModificationException
in thread a
was:
JspConfig init isn't thread safe and can cause the following
ConcurrentModificationException:
{code}
java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
at java.util.AbstractList$Itr.next(AbstractList.java:343)
at org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:303)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:112)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:333)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:313)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:300)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
{code}
JspConfig init isn't thread safe and can cause
ConcurrentModificationException
------------------------------------------------------------------------------
Key: JBWEB-311
URL:
https://issues.jboss.org/browse/JBWEB-311
Project: JBoss Web
Issue Type: Bug
Affects Versions: JBossWeb-2.1.13.GA
Reporter: Aaron Ogburn
Assignee: Aaron Ogburn
Attachments: reproducer.zip
JspConfig init isn't thread safe and can cause the following
ConcurrentModificationException:
{code}
java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
at java.util.AbstractList$Itr.next(AbstractList.java:343)
at org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:303)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:112)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:333)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:313)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:300)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
{code}
Issue occurs like so:
1) thread a starts JspConfig.init/proccessWebDotXml
2) thread b starts JspConfig.init/proccessWebDotXml
3) thread a finishes JspConfig.init/proccessWebDotXml and then calls
JspConfig.findJspProperty
4) thread b sets the jspProperties vector before thread a gets an iterator of it
5) thread b modifies the jspProperties vector, causing the
ConcurrentModificationException in thread a
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)