Java Debugging Ľuboš Koščo

Similar documents
Tools in the Box. Quick overview on helpful tools in the JDK and use cases for them. Florin Bunau

THE BUSY DEVELOPER'S GUIDE TO JVM TROUBLESHOOTING

Using jvmstat and visualgc to Solve Memory Management Problems

TDA - Thread Dump Analyzer

Java Troubleshooting and Performance

VisualVM: Integrated and Extensible Troubleshooting Tool for the Java Platform

THE BUSY JAVA DEVELOPER'S GUIDE TO WEBSPHERE DEBUGGING & TROUBLESHOOTING

Debugging Java performance problems. Ryan Matteson

Eclipse Memory Analyzer and other Java stuff

Effective Java Programming. measurement as the basis

USE IMPROVE EVANGELIZE. JVM Internals, Stefan Parvu System Administrator.

Monitoring and Managing a JVM

GlassFish Server Open Source Edition

Production time profiling On-Demand with Java Flight Recorder

How To Improve Performance On An Asa 9.4 Web Application Server (For Advanced Users)

BEAJRockit Mission Control. Using JRockit Mission Control in the Eclipse IDE

How To Use Java On An Ipa (Jspa) With A Microsoft Powerbook (Jempa) With An Ipad And A Microos 2.5 (Microos)

Java Mission Control

Troubleshoot the JVM like never before. JVM Troubleshooting Guide. Pierre-Hugues Charbonneau Ilias Tsagklis

Robert Honeyman

Performance Monitoring and Tuning. Liferay Chicago User Group (LCHIUG) James Lefeu 29AUG2013

What s Cool in the SAP JVM (CON3243)

Glassbox: Open Source and Automated Application Troubleshooting. Ron Bodkin Glassbox Project Leader

A Practical Method to Diagnose Memory Leaks in Java Application Alan Yu

Monitoring, Tracing, Debugging (Under Construction)

Java VM monitoring and the Health Center API. William Smith

Tuning WebSphere Application Server ND 7.0. Royal Cyber Inc.

Manage and Monitor your JVM with JMX

Taming Operations in the Apache Hadoop Ecosystem. Jon Hsieh, Kate Ting, USENIX LISA 14 Nov 14, 2014

Netbeans 6.0. José Maria Silveira Neto. Sun Campus Ambassador

talent. technology. true business value

Instrumentation Software Profiling

Advanced Performance Forensics

Oracle Corporation Proprietary and Confidential

HeapStats: Your Dependable Helper for Java Applications, from Development to Operation

Runtime Monitoring & Issue Tracking

How to use IBM HeapAnalyzer to diagnose Java heap issues

2015 ej-technologies GmbH. All rights reserved. JProfiler Manual

Discovering Performance Bottlenecks with the SAP JVM Profiler and SAP Memory Analyzer

Tuning Your GlassFish Performance Tips. Deep Singh Enterprise Java Performance Team Sun Microsystems, Inc.

Zing Vision. Answering your toughest production Java performance questions

Java Garbage Collection Basics

JBoss Cookbook: Secret Recipes. David Chia Senior TAM, JBoss May 5 th 2011

Java Application Development using Eclipse. Jezz Kelway Java Technology Centre, z/os Service IBM Hursley Park Labs, United Kingdom

An Oracle White Paper September Advanced Java Diagnostics and Monitoring Without Performance Overhead

Java Monitoring. Stuff You Can Get For Free (And Stuff You Can t) Paul Jasek Sales Engineer

Java Performance Tuning

Extreme Performance with Java

Operating System Structures

Debugging Java Applications

Lab 4 In class Hands-on Android Debugging Tutorial

Holly Cummins IBM Hursley Labs. Java performance not so scary after all

Profiling and Testing with Test and Performance Tools Platform (TPTP)

Frysk The Systems Monitoring and Debugging Tool. Andrew Cagney

Top 10 Issues for Java in Production. SriSatish Ambati Cliff Click Jr. Azul Systems, Inc

The power of root on Android emulators

Example of Standard API

PHP vs. Java. In this paper, I am not discussing following two issues since each is currently hotly debated in various communities:

For Introduction to Java Programming, 5E By Y. Daniel Liang

An Oracle White Paper May Ready for Business: Oracle GlassFish Server

WEBLOGIC ADMINISTRATION

Tool - 1: Health Center

Monitoring HP OO 10. Overview. Available Tools. HP OO Community Guides

WebSphere Server Administration Course

GigaSpaces Customer Support Overview

IBM Software Services for Lotus Consulting Education Accelerated Value Program. Log Files IBM Corporation

IBM WebSphere Server Administration

CS3600 SYSTEMS AND NETWORKS

HP Diagnostics. Java Agent Guide. For the Windows, Solaris and Linux operating systems. Software Version: Document Release Date: May 2014

Oracle JRockit Mission Control Overview

Identifying Performance Bottleneck using JRockit. - Shivaram Thirunavukkarasu Performance Engineer Wipro Technologies

Ruby on Rails in GlassFish Sun Microsystems

The Fundamentals of Tuning OpenJDK

OS Observability Tools

Orbix Release Notes

CSCI E 98: Managed Environments for the Execution of Programs

Simba XMLA Provider for Oracle OLAP 2.0. Linux Administration Guide. Simba Technologies Inc. April 23, 2013

Weblogic Server Administration Top Ten Concepts. Mrityunjay Kant, AST Corporation Scott Brinker, College of American Pathologist

.NET and J2EE Intro to Software Engineering

Oracle WebLogic Server Monitoring and Performance Tuning

BICS Connectivity for Web Intelligence in SAP BI 4.0

<Insert Picture Here> Java Application Diagnostic Expert

CSE 403. Performance Profiling Marty Stepp

Peach Fuzzer Platform

Oracle WebLogic Server 11g: Monitor and Tune Performance

1 How to Monitor Performance

ARM-BASED PERFORMANCE MONITORING FOR THE ECLIPSE PLATFORM

Java SE Performance Tuning Revision A

Server-side OSGi with Apache Sling. Felix Meschberger Day Management AG 124

Project SailFin: Building and Hosting Your Own Communication Server.

Eclipse Visualization and Performance Monitoring

Course Description. Course Audience. Course Outline. Course Page - Page 1 of 5

IBM Tivoli Composite Application Manager for WebSphere

Transcription:

Java Debugging Ľuboš Koščo Solaris RPE Prague

Agenda Debugging - the core of solving problems with your application Methodologies and useful processes, best practices Introduction to debugging tools > bundled tools > debuggers in Solaris, Linux and Windows > java core dump analysis > other methods/approaches to debugging Intro of available monitoring tools Sample debugging session of an average problem Backporting of tools, or what if I am locked into old JVM? Community, blogs, links, documentation, resources

Debugging Monitoring of my application A problem occurs (crash, performance) Code overview needed for locating and narrowing the problem (opengrok, lxr,... ) Analyze & get to the root cause Reiterate with the fix

since JDK 5.0 Extensive monitoring and management support > JMX (JSR-3), JMX Remote API (JSR-160), java.lang.management (JSR-163/174). > Out of the box management capabilities > jconsole > JVM Tool Interface (JSR-163) to support a wide range development and production time tools. > Also java.lang.instrument Fatal error handling mechanism jstat utility to collect and report performance stats

JDK 6.0 even more improvements Improvements to java.lang.outofmemoryerror handling Heap dump when OOME thrown (*) Stack trace and improved messages Fatal error log if VM aborts because out of native heap jhat to analyze heap dump Improvements to command-line utilities extend to live process inspection (all platforms) class-wise histogram of objects in heap > jmap -histo <pid> capture heap dump > jmap -dump:file=<file>,live <pid> change manageable options/flags dynamically

JDK 6.0... jconsole improvements start management agent in local VM plug-in support UI improvements,... HotSpotDiagnosticMXBean Built-in DTrace probes (Solaris 10) java.lang.management updated to expose java.util.concurrent lock information (also jstack -l) Improvements to the JVM Tool Interface Improved troubleshooting documentation http://java.sun.com/javase/6/webnotes/trouble/index.html

DTrace need to load agent in 5.0 (1.4.2), transparent in 6.0 hotspot Provider > VM Lifecycle Probes > Thread Lifecycle Probes > Classloading Probes > Garbage Collection Probes > Method Compilation Probes > Monitor Probes > Application Tracking Probes hotspot_jni Provider some methods DO introduce overhead http://java.sun.com/javase/6/docs/technotes/guides/vm/dtrace.html

Bundled tools Java Monitoring and Management Console (jconsole) Experimental JDK Tools and Utilities NOTE - The tools described in this section are unsupported and experimental in nature and should be used with that in mind. They might not be available in future JDK versions. > Monitoring Tools (jps, jstat, jstatd) > Troubleshooting Tools (jinfo, jhat, jmap, jsadebugd, jstack) > Scripting Tools (jrunscript) jhat needs lots of memory (e.g. -J-mx512m ) jhat uses OQL (object query language) Console enabled in ControlPanel http://java.sun.com/javase/6/docs/technotes/tools/

3d party profiling SW Netbeans profiler JProfiler Cougaar Memory Profiler JBoss Profiler JBuilder profiler (OptimizeIt) Jprof Eclipse Test & Performance Tools Platform http://java-source.net/open-source/profilers

Debuggers built in jdb, JPDA knowledge necessary (you can attach remotely! -g compiled code is useful!) dbx (part of SunStudio) Netbeans visually integrates jdb / JPDA JSwat Omniscient Debugger gcore, truss,...

Old JVM tools backporting of new tools doesn't happen some options in latest updates ( -XX: +HeapDumpOnOutOfMemoryError ), outputs can be parsed by latest tools key of how to get info is to look up documentation in latest builds and relevant bug documentation kill -QUIT gives stack trace

DEMO

VisualVM JavaOne 2007 proceedings https://visualvm.dev.java.net/

Links look for JDK troubleshooting(ts) guides (http://java.sun.com/javase/6/webnotes/trouble/tsg -VM/html/index.html ) Blogs! > http://weblogs.java.net/blog/mandychung > http://blogs.sun.com/sundararajan > http://blogs.sun.com/alanb > http://jroller.com/nbprofiler/ Dtrace: http://www.sun.com/bigadmin/features/articles/java_se6_ob servability.html

Even MORE links! http://blogs.sun.com/scblog/entry/swing_based_jhat_oql_execution http://blogs.sun.com/alanb/entry/heap_dumps_are_back_with http://java.sun.com/developer/technicalarticles/j2se/monitoring/ http://weblogs.java.net/blog/kellyohair/archive/2005/09/heap_dump_ snaps.html http://forum.java.sun.com/thread.jspa?threadid=735052&tstart=0 http://developers.sun.com/sunstudio/articles/java_debug/java_deb ug_content.html http://forum.java.sun.com/thread.jspa?threadid=735052&tstart=0 http://forum.java.sun.com/thread.jspa?threadid=765050&tstart=0 http://weblogs.java.net/blog/emcmanus/ http://blogs.sun.com/kamg

Thank YOU! Java Debugging Ľuboš Koščo Solaris RPE Prague Lubos.Kosco@Sun.COM

Troubles with troubleshooting jps problem with hsperfdata_<user> in %TMP% bash-3.2$./jinfo -flag HeapDumpOnOutOfMemoryError 3188 -XX:-HeapDumpOnOutOfMemoryError