liveBook · Manning

What you will learn in Troubleshooting Java, Second Edition

by Laurențiu Spilcă
Foreword by Ben Evans

Chapter by chapter

Chapter 1: Starting to know your apps

1.1 How to more easily understand your app · 1.2 Typical scenarios for using investigation techniques · 1.2.1 Demystifying the unexpected output · 1.2.2 Getting familiar with your external libraries · 1.2.3 Clarifying slowness · 1.2.4 Understanding app crashes · 1.3 AI as a game changer in troubleshooting apps · 1.4 What you will learn in this book · 1.5 Summary

What you learn in chapter 1 →

Chapter 2: Understanding your app’s logic through debugging techniques

2.1 When analyzing code is not enough · 2.2 Investigating code with a debugger · 2.2.1 What is the execution stack trace, and how do I use it? · 2.2.2 Navigating code with the debugger · 2.3 When using the debugger might not be enough · 2.4 Summary

What you learn in chapter 2 →

Chapter 3: Finding problem root causes using advanced debugging techniques

3.1 Minimizing investigation time with conditional breakpoints · 3.2 Using breakpoints that don’t pause the execution · 3.3 Dynamically altering the investigation scenario · 3.4 Rewinding the investigation case · 3.5 Summary

What you learn in chapter 3 →

Chapter 4: Making the most of logs: Auditing an app’s behavior

4.1 Investigating issues with logs · 4.1.1 Using logs to identify exceptions · 4.1.2 Using exception stack traces to identify what calls a method · 4.1.3 Measuring time spent to execute a given instruction · 4.1.4 Investigating problems in multithreaded architectures · 4.2 Implementing logging · 4.2.1 Persisting logs · 4.2.2 Defining logging levels and using logging frameworks · 4.2.3 Problems caused by logging and how to avoid them · 4.3 Summary

What you learn in chapter 4 →

Chapter 5: Identifying resource consumption problems using profiling techniques

5.1 Where would a profiler be useful? · 5.1.1 Identifying abnormal usage of resources · 5.1.2 Finding out what code executes · 5.1.3 Identifying slowness in an app’s execution · 5.2 Using a profiler · 5.2.1 Installing and configuring VisualVM · 5.2.2 Observing the CPU and memory usage · 5.2.3 Identifying memory leaks · 5.3 Using AI assistance · 5.4 Summary

What you learn in chapter 5 →

Chapter 6: Finding hidden problems using profiling techniques

6.1 Sampling to observe executing code · 6.2 Profiling to learn how many times a method is executed · 6.3 Using a profiler to identify SQL queries an app executes · 6.3.1 Using a profiler to retrieve SQL queries not generated by a framework · 6.3.2 Using the profiler to get the SQL queries generated by a framework · 6.3.3 Using the profiler to get programmatically generated SQL queries · 6.4 Summary

What you learn in chapter 6 →

Chapter 7: Investigating locks in multithreaded architectures

7.1 Monitoring threads for locks · 7.2 Analyzing thread locks · 7.3 Analyzing waiting threads · 7.4 Summary

What you learn in chapter 7 →

Chapter 8: Investigating deadlocks with thread dumps

8.1 Getting a thread dump · 8.1.1 Getting a thread dump using a profiler · 8.1.2 Generating a thread dump from the command line · 8.2 Reading thread dumps · 8.2.1 Reading plain-text thread dumps · 8.2.2 Using tools to better grasp thread dumps · 8.3 Summary

What you learn in chapter 8 →

Chapter 9: Profiling memory-related problems

9.1 Sampling to identify memory allocation problems · 9.2 Profiling to find the culprit · 9.3 Summary

What you learn in chapter 9 →

Chapter 10: Investigating memory problems with heap dumps

10.1 Obtaining a heap dump · 10.1.1 Configuring an app to generate a heap dump when it encounters a memory problem · 10.1.2 Obtaining a heap dump using a profiler · 10.1.3 Obtaining a heap dump with the command line · 10.2 Reading a heap dump · 10.3 Using the OQL console to query a heap dump · 10.4 Summary

What you learn in chapter 10 →

Chapter 11: Analyzing potential JVM problems with GC logs

11.1 Enabling GC logs · 11.2 Storing GC logs in files · 11.3 Particular configurations for storing GC logs · 11.4 Analyzing GC logs · 11.4.1 Troubleshooting performance lags with GC pause times · 11.4.2 Identifying memory leaks with heap usage logs · 11.4.3 Identifying insufficient memory with full GC events · 11.4.4 Tuning parallelism in GC · 11.5 Summary

What you learn in chapter 11 →

Chapter 12: Uncovering system-level failures and service communication problems

12.1 Troubleshooting communication patterns: RPC and messaging · 12.1.1 Working with trace IDs and spans · 12.1.2 OpenTelemetry, Jaeger, Zipkin, and other utilities · 12.2 Serialization mismatches and versioning problems · 12.3 Understanding systemic failure modes · 12.3.1 Cascading failures · 12.3.2 Retry storms · 12.3.3 Timeout mismatches · 12.4 Summary

What you learn in chapter 12 →

Chapter 13: Measuring data consistency and transactions

13.1 Troubleshooting inconsistencies across services · 13.1.1 Inspecting time-based anomalies in event flows · 13.1.2 Applying domain invariants to identify invalid states · 13.2 Tracking and correlating multistep transactions · 13.2.1 Reviewing audit logs to reconstruct transaction steps · 13.2.2 Replaying events or examining event logs for missing messages · 13.3 Measuring and monitoring consistency guarantees · 13.3.1 Verifying data integrity using checksums or hashes · 13.4 Running reconciliation jobs to compare expected vs. actual state · 13.5 Summary

What you learn in chapter 13 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.