Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 910185 - Weld's TypeSafeObserverResolver cache is unbounded
Weld's TypeSafeObserverResolver cache is unbounded
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CDI/Weld (Show other bugs)
6.0.1
Unspecified Unspecified
unspecified Severity medium
: ER6
: EAP 6.2.0
Assigned To: Jozef Hartinger
Ron Šmeral
:
Depends On:
Blocks: 1003581
  Show dependency treegraph
 
Reported: 2013-02-11 18:53 EST by James Livingston
Modified: 2016-10-31 21:37 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The Weld class `TypeSafeObserverResolver` used by `TransactionalObserverNotifier` does not have any configuration options for limiting or expiring entries. Usually the number of CDI qualifiers is small, but this may not be true if an application uses `AnnotationLiteral`-derived classes with arbitrary data in the annotation. As a result, the `TypeSafeObserverResolver` cache could grow very large and cause an `OutOfMemoryError` if a large number of distinct qualifiers are used. This issue has been fixed in this release of JBoss EAP 6 by implementing a configurable upper boundary for the resolved cache in `TypeSafeObserverResolver`. Users can configure the `org.jboss.weld.resolution.cacheSize` property to limit the maximum number of resolved cache entries. The default value of the maximum boundary is 1048576 cache entries.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-15 11:55:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WELD-1323 Major Resolved resolved cache in TypeSafeObserverResolver is unbounded 2018-02-07 11:10 EST

  None (edit)
Description James Livingston 2013-02-11 18:53:34 EST
The cache in TypeSafeObserverResolver, as used by TransactionalObserverNotifier does not have any form of limiting or expiry, which means that it could grow very large and cause an OutOfMemoryError if a large number of distinct qualifier are used.

Usually the number of qualifiers is finite (and relatively small), but this is not true if an application uses AnnotationLiteral-derived classes with arbitrary data in the annoation. An example of where this occurs is Solder's ServletEventBridgeListener, which emits events with a qualifier annotation containing the URL path and method.

The cache should have some form of limit or expiry, so that it does not grow arbitrarily large.
Comment 2 JBoss JIRA Server 2013-05-17 07:25:12 EDT
Jozef Hartinger <jharting@redhat.com> updated the status of jira WELD-1323 to Resolved
Comment 8 Marek Schmidt 2013-10-17 10:15:26 EDT
Should this be moved to ON_QA?
Comment 9 Brian Stansberry 2013-10-17 11:31:00 EDT
If this was fixed in some release of Weld that's in the EAP 6.x branch, please move it to ON_QA, setting the Target Release to EAP 6.2.0 and the Target Milestone to ER6. If you know the # of the first ER that had the fix in the build, then use that, but if you don't know then ER6 is fine.
Comment 10 Marek Schmidt 2013-10-22 04:38:24 EDT
Verified on EAP 6.2.0.ER6

Note You need to log in before you can comment on or make changes to this bug.