[ 
http://jira.jboss.com/jira/browse/JBAS-1664?page=comments#action_12316784 ]
     
Arto Huusko commented on JBAS-1664:
-----------------------------------

Yes, sorry, I do mean OutOfMemoryError.

However, if it is true that JVM is unusable after OutOfMemoryError, JBoss 
should be changed to terminate immediately the first time it sees that error. 
And, I'm curious as to why the JVM itself bothers to throw an error, if it 
really is so that application can never do anything to recover.

The fact is that in the face of OutOfMemoryError, the JVM really was 
surprisingly usable and in working state. Our code was able to do some real 
work off and on for hours while also seeing OOMEs -- but also some damage, when 
those BMP beans started misbehaving.

And we had a heavily tweaked configuration: BMP beans with commit option A, 
maximum cache size of 10000 instances and maximum memory of 1GB (which, though, 
is a slightly moot point because at the time we were bitten by issue JBAS-1662).

Anyway, I feel very strongly that something should be done about this, even if 
it is that immediate termination of JVM, because otherwise some really bad 
things can happen if there is some other problem (be it in JBoss or 
application) that causes the JVM to run out of memory.

> Unloaded entities returned in low memory conditions
> ---------------------------------------------------
>
>          Key: JBAS-1664
>          URL: http://jira.jboss.com/jira/browse/JBAS-1664
>      Project: JBoss Application Server
>         Type: Bug
>   Components: EJBs
>     Versions: JBossAS-3.2.6 Final
>     Reporter: Arto Huusko

>
>
> In low memory conditions (that is, when OutOfMemoryExceptions are seen 
> frequently all over the place), JBoss can behave wrong in a way that is 
> critically wrong.
> I have seen on several occasions that a finder returns an entity with the 
> correct identity, but where ejbLoad() has either not been called at all, or 
> where ejbLoad() has failed at some point (I have no way of knowing which is 
> the case).
> I have observed this behaviour only with BMP beans (and so there is a 
> possibility that I am doing something wrong in the BMP code, but I doubt 
> this). However, the fact that I haven't seen this with CMP beans may be just 
> because CMP beans work differently, or just plain luck. When this occurs, the 
> wrong behaviour can be seen because the instance variables of the entity bean 
> contain what ever they had when the entity instance was previously attached 
> to some other identity.
> For example, I may store the primary key of the entity in some instance 
> variable. Let's say I can access the primary key via method "Long 
> getMyPrimaryKey()". If the finder returns an entity with the correct identity 
> (what I asked for in the finder call), but where ejbLoad() is not called or 
> it fails, then
>    entity.getMyPrimaryKey().equals(entity.getPrimaryKey())
> is false. And this is exactly what I have seen.
> I have no idea where the problem is, and, as I said above, it may be a 
> problem with my code.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to