Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322921 - OutOfMemory in annotation processor
Summary: OutOfMemory in annotation processor
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P2 critical (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: submitted_patch
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-17 11:56 EDT by Serge CLA
Modified: 2022-06-09 10:18 EDT (History)
4 users (show)

See Also:


Attachments
sample exception (3.59 KB, text/plain)
2010-08-17 11:57 EDT, Serge CLA
no flags Details
proposed patch (798 bytes, patch)
2010-08-18 05:50 EDT, Serge CLA
no flags Details | Diff
Proposed changes (7.24 KB, patch)
2010-10-18 15:32 EDT, Guy Pelletier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Serge CLA 2010-08-17 11:56:08 EDT
Build Identifier: 2.1.0

Initially discovered if annotation processing is enabled in netbeans, but also separate test case is available. The issue have a workaround patch already discovered. OOM cause hangs.

Reproducible: Always

Steps to Reproduce:
Just run attached sample application.
Comment 1 Serge CLA 2010-08-17 11:57:51 EDT
Created attachment 176805 [details]
sample exception
Comment 2 Serge CLA 2010-08-17 12:00:40 EDT
Just found I can't attach sample application because of attachment size limit.
I can provide it on demand by email or some file hosting service.
Comment 3 Serge CLA 2010-08-18 05:48:59 EDT
The issue is reported against jvm, see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6977402
But have clear workaround on eclipselink side and can be fixed this way, will attach proposed patch.
Also you can see corresponding netbeans issue http://netbeans.org/bugzilla/show_bug.cgi?id=187653
Comment 4 Serge CLA 2010-08-18 05:50:21 EDT
Created attachment 176879 [details]
proposed patch
Comment 5 Guy Pelletier CLA 2010-08-18 14:02:20 EDT
The MetadataMirrorFactory is already a static in the 2.1 stream. Unless I am missing something, the proposed patch will not patch anything?

I checked our 2.0 and 2.2 streams and same thing there, that is:

protected static MetadataMirrorFactory factory;
Comment 6 Serge CLA 2010-08-19 05:08:34 EDT
occasionally patch is created in reverse order.
Comment 7 Guy Pelletier CLA 2010-08-19 08:30:04 EDT
Unfortunately, right now we do have a dependency on the static (at least within Eclipse) where we use it as our 'transactional cache', that is, to remember what has been done from one compile round to another.

I can re-investigate this however and see if I can come up with another solution.
Comment 8 Tom Ware CLA 2010-08-24 13:32:38 EDT
We should finish triaging this for 2.2 and set target based on the result of the triage.
Comment 9 Guy Pelletier CLA 2010-10-18 15:32:53 EDT
Created attachment 181125 [details]
Proposed changes
Comment 10 Guy Pelletier CLA 2010-10-18 15:45:00 EDT
Bug 322921 - OutOfMemory in annotation processor

Reviewed by: Tom Ware

Test manually and through our build scripts. Also verified by reporter.
Comment 11 Eclipse Webmaster CLA 2022-06-09 10:18:57 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink