Unresolved
Details
Assignee
UnassignedUnassignedReporter
Tim ParkerTim ParkerPriority
MajorLabels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Details
Details
Assignee
Unassigned
UnassignedReporter
Tim Parker
Tim ParkerPriority
Labels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Created 15 June 2017 at 17:06
Updated 6 March 2021 at 00:59
(issue observed in 4.5.3.020, but review of available code on GitHub indicates that this problem is common to Railo, Lucee 4, and Lucee 5)
SoftMethodStorage.storeMethod uses the 'synchronized' keyword, but it's the only method in the class which does - so there's no protection against reading from the collection while it's being modified.
This situation is unlikely, but one of our customers hit it yesterday, resulting in infinite looping and tons of log entries with this stack trace:
0: ........org.apache.commons.collections.map.AbstractHashedMap.getEntry[AbstractHashedMap.java:440]
1: ........org.apache.commons.collections.map.AbstractReferenceMap.getEntry[AbstractReferenceMap.java:405]
2: ........org.apache.commons.collections.map.AbstractReferenceMap.get[AbstractReferenceMap.java:230]
3: ........lucee.runtime.reflection.storage.SoftMethodStorage.getMethods[SoftMethodStorage.java:47]
4: ........lucee.runtime.reflection.Reflector.getMethodInstanceEL[Reflector.java:491]
5: ........lucee.runtime.reflection.Reflector.callMethod[Reflector.java:853]
6: ........lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues[VariableUtilImpl.java:757]
7: ........lucee.runtime.PageContextImpl.getFunction[PageContextImpl.java:1593]
8: CFM....{our CF code attempting to call a method in one of our Java classes)
============
The easy fix (add 'synchronized' to all methods which access the 'map' member) is less than ideal, since it disallows simultaneous reads - but it would eliminate the infinite loop risk