|
[
Permlink
| « Hide
]
Mark Thomas added a comment - 02/Feb/08 06:49 PM
Once there has been an OOME the only safe course of action is to shut the JVM down, assuming you have enough control left to be able to do that. Swallowing the OOME will make it impossible to detect that the system needs to shut down, so I am against any such change.
Added a patch implementing solution 1 plus unit test.
I can see your argument, but still want to put forward that
I agree with Mark that swallowing Throwable here is not a good idea, so am also -1 on the patch.
Assigning fix version 1.5 and leaving open because we should log the error. Also affects 1.4, since behavior there is the same. One more comment I have on this is that while we need to and will continue to support the Evictor, heavily loaded applications should be careful depending on it as a pseudo-garbage collector. OOME's could indicate resource leaks and these should be investigated and addressed directly (assuming that is contributing to the problem). This has been fixed by logging the throwable (to stderr) and trying to carry on. Note that exceptions are still silently swallowed.
I am -1 for the commited solution either. There's no real difference. You may never catch a ThreadDeath. All we should do is to handle OOME instead of the Throwable and try to recover from that. Anything else is really bad.
Scope reduced as requested. I'm getting close to pulling the whole patch and marking this as WONTFIX as it is, in my view, a generally pointless exercise.
Well, handling OOME might be really useful. It is not of help, if you have a memory leak, but sometimes a user simply tries to process a really big document, image or something similar and the system recovers immediately from memory shortage as soon as the silly process has been stopped. Thanks for changing the implementation agian, though.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||