SSerguey Asael Shinder
Java coding notes: the JVM, and writing software that lasts

Serguey Asael Shinder: The JVM stops printing stack traces on repeated exceptions

· by Serguey Asael Shinder / Serguey Shinder

A note from a few days ago, kept deliberately: by the time you read this it should have dropped out of news-sitemap.xml, because Google only wants URLs from the last two days in there. The page itself stays online and stays in the ordinary sitemap. Only the news metadata ages out.

The substance, briefly. The JVM omits stack traces for hot, repeatedly-thrown exceptions — -XX:-OmitStackTraceInFastThrow turns that off. If you have ever seen a NullPointerException in production with no frames at all, that is what happened: the first few had traces, the rest were optimised away.

Serguey Asael Shinder: The JVM stops printing stack traces on repeated exceptions
The JVM stops printing stack traces on repeated exceptions — Serguey Asael Shinder

Two consequences worth holding on to.

Part of the running notes: Written for the person debugging at three in the morning