sonatype/nexus — pull request #464 by cstamas (2012-06-27 20:08:23+00:00)
Title: NXCM-4391: not a fix, a "best effort" instead

This change is NOT fixing the cause of OOM at all, but improves
Jetty's capability to at least warn in logs about it.

The original reason for issue NXCM-4391 was another bug (OOM in P2),
but Jetty's handling of Errors (OOM is Error) made us realize that there was
NO any notification about death and removal of the thread. The
OOM went totally unnoticed (original investigation started due to
unreleased locks, there were held by "no one", as the thread holding was
dead actually).

Again, this change only enables "some" notification about extreme
conditions (like thread dying coz of some Error, as Exceptions
ARE logged by Jetty). Only "some", as in OOM state strange things
happens, but still, this is "best effort" to say "hey dude, you'd
better reboot your JVM" at least.

P2 issues (the actual cause of OOM that lead us to this recognition)
are handled in P2 plugin (finally blocks cleanup and memory optimization).