JDK-6512095 : SA-JDI: jdb crashes while trying to connect to a core file on Linux 32 bit
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1
  • CPU: x86
  • Submitted: 2007-01-11
  • Updated: 2011-02-16
  • Resolved: 2007-03-09
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)

java version "1.6.0_01-ea"
Java(TM) SE Runtime Environment (build 1.6.0_01-ea-b01)
Java HotSpot(TM) Client VM (build 1.6.0_01-ea-b01, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Linux  2.6.18-1.2868.fc6 #1 SMP Fri Dec 15 17:32:54 EST 2006 i686 i686 i386 GNU/Linux
Linux  2.6.9-34.0.2.ELsmp #1 SMP Fri Jul 7 19:52:49 CDT 2006 i686 i686 i386 GNU/Linux

A DESCRIPTION OF THE PROBLEM :
The jdb utility crashes while trying to connect to a core generated by a java process.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
start any java application e.g jconsole
> jconsole &
force the OS to generate a core file
> gcore pid
try to connect with jdb to the core image
>/usr/java/jdk1.6.0/bin/jdb -connect sun.jvm.hotspot.jdi.SACoreAttachingConnector:javaExecutable=/usr/java/jdk1.6.0/bin/jconsole,core=./core.pid

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
jdb is able to connect to the core file and accepts commands

ACTUAL -
jdb crashes
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xb52856bd, pid=8528, tid=3085192080
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-ea-b01 mixed mode, sharing)
# Problematic frame:
# C  [libsaproc.so+0x36bd]
#
# An error report file with more information is saved as hs_err_pid8528.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted


ERROR MESSAGES/STACK TRACES THAT OCCUR :
Attached Separatly

REPRODUCIBILITY :
This bug can be reproduced always.

Comments
EVALUATION Bug is in SA core_lookup code. Which is doing lookup on an unsorted map array. So it is crashing in core_lookup code. Fix is to resort the map array after adding new map info.
07-03-2007