[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] preparing 2.0

Matthias Sohn skrev 2012-05-25 12.31:
2012/5/25 Markus Duft <markus.duft@xxxxxxxxxx <mailto:markus.duft@xxxxxxxxxx>>

    On 05/25/2012 08:20 AM, Matthias Sohn wrote:
     > try starting the JVM with
     >
     > |-XX:+HeapDumpOnOutOfMemoryError
     >
     > -XX:HeapDumpPath=<value>|
     >
     > then you should get a heap dump when OOM happens

    ok, does jgit really catch a throwable OOM and continues? because the vm does not die - i just get the message, and everybody pretends all is fine...


yes, jgit handles OOM in several places: - DeltaWindow - ObjectLoader - PackFile - SimilarityIndex - TemporaryBuffer

Eclipse rarely dies on out-of-memory, even when it's not handled. Sometimes you just get an stack trace on stderr.

An IOException could also lead to missing objects and perhaps we should log it.

				} catch (IOException e) {
					// Assume the pack is corrupted.
					//
					removePack(p);

-- robin