I get segfaults in my JVM at roughly the same phase of the application, but with varying stack traces in the crash report. It always seems to happen during GC, however.
Since the crash happens in all three JVMs I tried (OpenJDK 6, Oracle 1.6.0_25 and 1.7.0) and with two GCs each (Parallel Collector and CMS), and it happens around the same area in the application, I figured, if I could find what the GC was trying to collect, I might spot some peculiarity in my code that causes this crash.
- Are there any coding practices that are well known to be problematic for GC?
- What methods are available for diagnosing this problem?
- Can I make any educated guesses on where in my application this problem is triggered?
- What (GC tuning) parameters can I play with to narrow the problem down?
- Is there a way to spot (possibly) problematic data in a heap dump?