liveBook · Manning

Postmortem

As explained in Troubleshooting Java, Second Edition

A postmortem investigation is troubleshooting performed after an application has crashed and stopped running.

Postmortem investigation troubleshoots an application after it crashes and stops running. Traditional debugging is no longer available, so the investigation relies on evidence captured during or after the failure. section 1.1

The practical goal is to identify the crash’s root cause quickly enough to implement a fix and prevent another failure, especially when a production service has stopped. section 1.1

Collect and interpret evidence such as:

  • Logs, which record application activity leading up to the failure. section 1.1
  • Heap dumps, which provide a snapshot of application memory. section 1.1
  • Thread dumps, which show the state of all threads at a particular moment. section 1.1
  • Application output, when execution produces a useful result before stopping. section 1.1

Investigating a failed process through logs

A process fails after producing hundreds of thousands of log lines over several days. Filter for exceptions related to database locks, then group them by query or apparent calling method. An AI assistant can accelerate extraction and classification, but the findings still require investigation because some entries may be missed or misclassified. section 4.1

How Troubleshooting Java, Second Edition covers it

How deep it goes
Defines the technique and identifies evidence sources, but defers detailed dump analysis and implementation procedures.
Examples
Uses production crashes, memory errors, large log files, and database-lock exceptions as investigative examples.
What it assumes
Assumes basic application behavior and logs, while introducing why stopped processes require evidence-based investigation.
What you can do after
Diagnose crash causes by correlating logs, heap dumps, thread dumps, and other evidence collected around the failure.
How it connects
Connects logs, heap dumps, thread dumps, debugging, profiling, and root-cause analysis.

Also explained in

Compare how 3 books explain postmortem →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java, Second Edition. The section links point to the parts of the book it draws on.