You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Ashish Jain (JIRA)" <ji...@apache.org> on 2010/11/10 13:29:13 UTC
[jira] Created: (GERONIMO-5683) Thread safety for needScanJar(),
scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
Thread safety for needScanJar(), scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
-----------------------------------------------------------------------------------------------
Key: GERONIMO-5683
URL: https://issues.apache.org/jira/browse/GERONIMO-5683
Project: Geronimo
Issue Type: Bug
Security Level: public (Regular issues)
Affects Versions: 2.1.6, 2.2.1, 3.0-M1
Environment: geronimo tomcat assembly 2.1.7
Reporter: Ashish Jain
Fix For: 2.1.7, 2.2.2, 3.0
The following error is encountered under heavy load when there are multiple threads accessing "GeronimoTldLocationsCache.scanJars".
java.lang.ArrayIndexOutOfBoundsException
at java.util.ArrayList.ensureCapacity(ArrayList.java:196)
at java.util.ArrayList.add(ArrayList.java:377)
at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
(GeronimoTldLocationsCache.java:479)
at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
(GeronimoTldLocationsCache.java:457)
at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
(GeronimoTldLocationsCache.java:457)
at org.apache.geronimo.jasper.GeronimoTldLocationsCache.init
(GeronimoTldLocationsCache.java:218)
at org.apache.geronimo.jasper.GeronimoTldLocationsCache.getLocation
(GeronimoTldLocationsCache.java:209)
at org.apache.jasper.JspCompilationContext.getTldLocation
(JspCompilationContext.java:550)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:
430)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-5683) Thread safety for needScanJar(),
scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932329#action_12932329 ]
Kevan Miller commented on GERONIMO-5683:
----------------------------------------
I think Jarek is right. In fact, the code as stands isn't really correct. The 'initialized' checks in getLocation() and init() aren't correct, as things stand.
> Thread safety for needScanJar(), scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
> -----------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5683
> URL: https://issues.apache.org/jira/browse/GERONIMO-5683
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.6, 2.2.1, 3.0-M1
> Environment: geronimo tomcat assembly 2.1.7
> Reporter: Ashish Jain
> Assignee: Ashish Jain
> Fix For: 2.1.7, 2.2.2, 3.0
>
>
> The following error is encountered under heavy load when there are multiple threads accessing "GeronimoTldLocationsCache.scanJars".
> java.lang.ArrayIndexOutOfBoundsException
> at java.util.ArrayList.ensureCapacity(ArrayList.java:196)
> at java.util.ArrayList.add(ArrayList.java:377)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:479)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.init
> (GeronimoTldLocationsCache.java:218)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.getLocation
> (GeronimoTldLocationsCache.java:209)
> at org.apache.jasper.JspCompilationContext.getTldLocation
> (JspCompilationContext.java:550)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:
> 430)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-5683) Thread safety for needScanJar(),
scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
Posted by "Ashish Jain (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932397#action_12932397 ]
Ashish Jain commented on GERONIMO-5683:
---------------------------------------
Thank you Jarek/Kevan. I will revert back the changes and will instead make the init method synchronized.
> Thread safety for needScanJar(), scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
> -----------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5683
> URL: https://issues.apache.org/jira/browse/GERONIMO-5683
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.6, 2.2.1, 3.0-M1
> Environment: geronimo tomcat assembly 2.1.7
> Reporter: Ashish Jain
> Assignee: Ashish Jain
> Fix For: 2.1.7, 2.2.2, 3.0
>
>
> The following error is encountered under heavy load when there are multiple threads accessing "GeronimoTldLocationsCache.scanJars".
> java.lang.ArrayIndexOutOfBoundsException
> at java.util.ArrayList.ensureCapacity(ArrayList.java:196)
> at java.util.ArrayList.add(ArrayList.java:377)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:479)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.init
> (GeronimoTldLocationsCache.java:218)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.getLocation
> (GeronimoTldLocationsCache.java:209)
> at org.apache.jasper.JspCompilationContext.getTldLocation
> (JspCompilationContext.java:550)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:
> 430)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-5683) Thread safety for needScanJar(),
scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
Posted by "Ashish Jain (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932942#action_12932942 ]
Ashish Jain commented on GERONIMO-5683:
---------------------------------------
Applied to 2.1 branch At revision: 1036024.
> Thread safety for needScanJar(), scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
> -----------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5683
> URL: https://issues.apache.org/jira/browse/GERONIMO-5683
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.6, 2.2.1, 3.0-M1
> Environment: geronimo tomcat assembly 2.1.7
> Reporter: Ashish Jain
> Assignee: Ashish Jain
> Fix For: 2.1.7, 2.2.2, 3.0
>
>
> The following error is encountered under heavy load when there are multiple threads accessing "GeronimoTldLocationsCache.scanJars".
> java.lang.ArrayIndexOutOfBoundsException
> at java.util.ArrayList.ensureCapacity(ArrayList.java:196)
> at java.util.ArrayList.add(ArrayList.java:377)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:479)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.init
> (GeronimoTldLocationsCache.java:218)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.getLocation
> (GeronimoTldLocationsCache.java:209)
> at org.apache.jasper.JspCompilationContext.getTldLocation
> (JspCompilationContext.java:550)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:
> 430)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-5683) Thread safety for needScanJar(),
scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932324#action_12932324 ]
Rex Wang commented on GERONIMO-5683:
------------------------------------
Shall we close this jira?
> Thread safety for needScanJar(), scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
> -----------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5683
> URL: https://issues.apache.org/jira/browse/GERONIMO-5683
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.6, 2.2.1, 3.0-M1
> Environment: geronimo tomcat assembly 2.1.7
> Reporter: Ashish Jain
> Assignee: Ashish Jain
> Fix For: 2.1.7, 2.2.2, 3.0
>
>
> The following error is encountered under heavy load when there are multiple threads accessing "GeronimoTldLocationsCache.scanJars".
> java.lang.ArrayIndexOutOfBoundsException
> at java.util.ArrayList.ensureCapacity(ArrayList.java:196)
> at java.util.ArrayList.add(ArrayList.java:377)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:479)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.init
> (GeronimoTldLocationsCache.java:218)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.getLocation
> (GeronimoTldLocationsCache.java:209)
> at org.apache.jasper.JspCompilationContext.getTldLocation
> (JspCompilationContext.java:550)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:
> 430)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (GERONIMO-5683) Thread safety for needScanJar(),
scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
Posted by "Ashish Jain (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashish Jain updated GERONIMO-5683:
----------------------------------
Affects Version/s: (was: 3.0-M1)
(was: 2.2.1)
Fix Version/s: (was: 2.2.2)
(was: 3.0)
> Thread safety for needScanJar(), scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
> -----------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5683
> URL: https://issues.apache.org/jira/browse/GERONIMO-5683
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.6
> Environment: geronimo tomcat assembly 2.1.7
> Reporter: Ashish Jain
> Assignee: Ashish Jain
> Fix For: 2.1.7
>
>
> The following error is encountered under heavy load when there are multiple threads accessing "GeronimoTldLocationsCache.scanJars".
> java.lang.ArrayIndexOutOfBoundsException
> at java.util.ArrayList.ensureCapacity(ArrayList.java:196)
> at java.util.ArrayList.add(ArrayList.java:377)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:479)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.init
> (GeronimoTldLocationsCache.java:218)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.getLocation
> (GeronimoTldLocationsCache.java:209)
> at org.apache.jasper.JspCompilationContext.getTldLocation
> (JspCompilationContext.java:550)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:
> 430)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (GERONIMO-5683) Thread safety for needScanJar(),
scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
Posted by "Ashish Jain (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashish Jain closed GERONIMO-5683.
---------------------------------
Resolution: Fixed
Opening a separate track Geronimo- 5709 for g 2.2 and g 3.0.
> Thread safety for needScanJar(), scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
> -----------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5683
> URL: https://issues.apache.org/jira/browse/GERONIMO-5683
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.6
> Environment: geronimo tomcat assembly 2.1.7
> Reporter: Ashish Jain
> Assignee: Ashish Jain
> Fix For: 2.1.7
>
>
> The following error is encountered under heavy load when there are multiple threads accessing "GeronimoTldLocationsCache.scanJars".
> java.lang.ArrayIndexOutOfBoundsException
> at java.util.ArrayList.ensureCapacity(ArrayList.java:196)
> at java.util.ArrayList.add(ArrayList.java:377)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:479)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.init
> (GeronimoTldLocationsCache.java:218)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.getLocation
> (GeronimoTldLocationsCache.java:209)
> at org.apache.jasper.JspCompilationContext.getTldLocation
> (JspCompilationContext.java:550)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:
> 430)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (GERONIMO-5683) Thread safety for needScanJar(),
scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
Posted by "Ashish Jain (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashish Jain reassigned GERONIMO-5683:
-------------------------------------
Assignee: Ashish Jain
> Thread safety for needScanJar(), scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
> -----------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5683
> URL: https://issues.apache.org/jira/browse/GERONIMO-5683
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.6, 2.2.1, 3.0-M1
> Environment: geronimo tomcat assembly 2.1.7
> Reporter: Ashish Jain
> Assignee: Ashish Jain
> Fix For: 2.1.7, 2.2.2, 3.0
>
>
> The following error is encountered under heavy load when there are multiple threads accessing "GeronimoTldLocationsCache.scanJars".
> java.lang.ArrayIndexOutOfBoundsException
> at java.util.ArrayList.ensureCapacity(ArrayList.java:196)
> at java.util.ArrayList.add(ArrayList.java:377)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:479)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.init
> (GeronimoTldLocationsCache.java:218)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.getLocation
> (GeronimoTldLocationsCache.java:209)
> at org.apache.jasper.JspCompilationContext.getTldLocation
> (JspCompilationContext.java:550)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:
> 430)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-5683) Thread safety for needScanJar(),
scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
Posted by "Ashish Jain (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932009#action_12932009 ]
Ashish Jain commented on GERONIMO-5683:
---------------------------------------
Applied to 2.1 At revision: 1035171
> Thread safety for needScanJar(), scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
> -----------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5683
> URL: https://issues.apache.org/jira/browse/GERONIMO-5683
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.6, 2.2.1, 3.0-M1
> Environment: geronimo tomcat assembly 2.1.7
> Reporter: Ashish Jain
> Assignee: Ashish Jain
> Fix For: 2.1.7, 2.2.2, 3.0
>
>
> The following error is encountered under heavy load when there are multiple threads accessing "GeronimoTldLocationsCache.scanJars".
> java.lang.ArrayIndexOutOfBoundsException
> at java.util.ArrayList.ensureCapacity(ArrayList.java:196)
> at java.util.ArrayList.add(ArrayList.java:377)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:479)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.init
> (GeronimoTldLocationsCache.java:218)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.getLocation
> (GeronimoTldLocationsCache.java:209)
> at org.apache.jasper.JspCompilationContext.getTldLocation
> (JspCompilationContext.java:550)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:
> 430)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-5683) Thread safety for needScanJar(),
scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
Posted by "Jarek Gawor (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932090#action_12932090 ]
Jarek Gawor commented on GERONIMO-5683:
---------------------------------------
Seems like the easiest solution is just to synchronize GeronimoTldLocationsCache.init() since it only needs to execute once.
> Thread safety for needScanJar(), scanJar(), and scannedJars.add() in GeronimoTldLocationsCache
> -----------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5683
> URL: https://issues.apache.org/jira/browse/GERONIMO-5683
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.6, 2.2.1, 3.0-M1
> Environment: geronimo tomcat assembly 2.1.7
> Reporter: Ashish Jain
> Assignee: Ashish Jain
> Fix For: 2.1.7, 2.2.2, 3.0
>
>
> The following error is encountered under heavy load when there are multiple threads accessing "GeronimoTldLocationsCache.scanJars".
> java.lang.ArrayIndexOutOfBoundsException
> at java.util.ArrayList.ensureCapacity(ArrayList.java:196)
> at java.util.ArrayList.add(ArrayList.java:377)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:479)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.init
> (GeronimoTldLocationsCache.java:218)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.getLocation
> (GeronimoTldLocationsCache.java:209)
> at org.apache.jasper.JspCompilationContext.getTldLocation
> (JspCompilationContext.java:550)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:
> 430)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.