mei.chan@Corp 1997-01-16
Debugging a java application on a remote site, with jdb, giving
a host and password, seems to work a little bit. You can
connect to the running program and print its list of classes,
but setting a breakpoint crashes it. Running this program
remotely with "java -debug loop"
import java.lang.*;
public class loop {
public static void main (String argv[]) {
for(int i=0; ; i++) {
System.out.println("i=" + i);
try {
Thread.sleep(2*1000);
} catch (Exception e) {
}
}
}
}
commands like "suspend", "resume", "threads", "locals", and
"classes" work, but this causes a crash:
suspend
stop at loop:9
resume
The messages are:
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_ACCERR [addr: 0xde7a8]
stackbase=EE2D9000, stackpointer=EE2D76A0
Full thread dump:
"main" (TID:0xee7a1860, sys_thread_t:0xee2d8de0, state:R) prio=5
*current thread*
loop.main(loop.java:7)
sun.tools.debug.MainThread.run(Agent.java:55)
"main" (TID:0xee7a0f20, sys_thread_t:0xee2fade0, state:MS) prio=5
loop.main(loop.java:9)
sun.tools.debug.MainThread.run(Agent.java:55)
"Breakpoint handler" (TID:0xee79f868, sys_thread_t:0xee31cde0,
state:CW) prio=9
sun.tools.debug.BreakpointQueue.nextEvent(BreakpointQueue.java)
sun.tools.debug.BreakpointHandler.run(BreakpointHandler.java:187)
"Debugger agent" (TID:0xee793dd0, sys_thread_t:0xee33ede0, state:CW)
prio=10
java.net.SocketInputStream.read(SocketInputStream.java:92)
java.io.BufferedInputStream.fill(BufferedInputStream.java)
java.io.BufferedInputStream.read(BufferedInputStream.java)
java.io.FilterInputStream.read(FilterInputStream.java)
sun.tools.debug.Agent.run(Agent.java:343)
java.lang.Thread.run(Thread.java)
"Finalizer thread" (TID:0xee78f2f8, sys_thread_t:0xee3a5de0,
state:CW) prio=1
"Async Garbage Collector" (TID:0xee78f2b0, sys_thread_t:0xee3c7de0,
state:MS) prio=1
"Idle thread" (TID:0xee78f268, sys_thread_t:0xee3e9de0, state:R)
prio=0
"clock handler" (TID:0xee78f180, sys_thread_t:0xee40bde0, state:CW)
prio=11
"main" (TID:0xee78f150, sys_thread_t:0x465b0, state:MS) prio=5
loop.main(loop.java:9)
Monitor Cache Dump:
java.io.BufferedInputStream@EE79F980/EE828600
(key=0xee79f980): monitor owner ee33ede0: "Debugger agent"
sun.tools.debug.BreakpointQueue@EE79F898/EE827D98
(key=0xee79f898): unowned
Waiting to be notified:
"Breakpoint handler"
unknown key (key=0x465b0): unowned
unknown key (key=0xee2fade0): unowned
unknown key (key=0xee3c7de0): unowned
Registered Monitor Dump:
Finalize me queue lock: unowned
Waiting to be notified:
"Finalizer thread"
Thread queue lock: unowned
Name and type hash table lock: unowned
String intern lock: unowned
JNI global reference lock: unowned
BinClass lock: unowned
Class loading lock: unowned
Java stack lock: unowned
Code rewrite lock: unowned
Heap lock: unowned
Has finalization queue lock: unowned
Monitor IO lock: unowned
Child death monitor: unowned
Event monitor: unowned
I/O monitor: unowned
Alarm monitor: unowned
Waiting to be notified:
"clock handler"
Sbrk lock: unowned
Monitor cache expansion lock: unowned
Monitor registry: monitor owner ee2d8de0: "main"
Thread Alarm Q:
Abort
In this case the machine where I was running "jdb" was
Windows 95, and the remote machine was Solaris.
The problem also reproduces if jdb runs on Solaris.
Debugging a java application on a remote site, with jdb, giving
a host and password, seems to work a little bit. You can
connect to the running program and print its list of classes,
but setting a breakpoint crashes it. Running this program
remotely with "java -debug loop"
import java.lang.*;
public class loop {
public static void main (String argv[]) {
for(int i=0; ; i++) {
System.out.println("i=" + i);
try {
Thread.sleep(2*1000);
} catch (Exception e) {
}
}
}
}
commands like "suspend", "resume", "threads", "locals", and
"classes" work, but this causes a crash:
suspend
stop at loop:9
resume
The messages are:
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_ACCERR [addr: 0xde7a8]
stackbase=EE2D9000, stackpointer=EE2D76A0
Full thread dump:
"main" (TID:0xee7a1860, sys_thread_t:0xee2d8de0, state:R) prio=5
*current thread*
loop.main(loop.java:7)
sun.tools.debug.MainThread.run(Agent.java:55)
"main" (TID:0xee7a0f20, sys_thread_t:0xee2fade0, state:MS) prio=5
loop.main(loop.java:9)
sun.tools.debug.MainThread.run(Agent.java:55)
"Breakpoint handler" (TID:0xee79f868, sys_thread_t:0xee31cde0,
state:CW) prio=9
sun.tools.debug.BreakpointQueue.nextEvent(BreakpointQueue.java)
sun.tools.debug.BreakpointHandler.run(BreakpointHandler.java:187)
"Debugger agent" (TID:0xee793dd0, sys_thread_t:0xee33ede0, state:CW)
prio=10
java.net.SocketInputStream.read(SocketInputStream.java:92)
java.io.BufferedInputStream.fill(BufferedInputStream.java)
java.io.BufferedInputStream.read(BufferedInputStream.java)
java.io.FilterInputStream.read(FilterInputStream.java)
sun.tools.debug.Agent.run(Agent.java:343)
java.lang.Thread.run(Thread.java)
"Finalizer thread" (TID:0xee78f2f8, sys_thread_t:0xee3a5de0,
state:CW) prio=1
"Async Garbage Collector" (TID:0xee78f2b0, sys_thread_t:0xee3c7de0,
state:MS) prio=1
"Idle thread" (TID:0xee78f268, sys_thread_t:0xee3e9de0, state:R)
prio=0
"clock handler" (TID:0xee78f180, sys_thread_t:0xee40bde0, state:CW)
prio=11
"main" (TID:0xee78f150, sys_thread_t:0x465b0, state:MS) prio=5
loop.main(loop.java:9)
Monitor Cache Dump:
java.io.BufferedInputStream@EE79F980/EE828600
(key=0xee79f980): monitor owner ee33ede0: "Debugger agent"
sun.tools.debug.BreakpointQueue@EE79F898/EE827D98
(key=0xee79f898): unowned
Waiting to be notified:
"Breakpoint handler"
unknown key (key=0x465b0): unowned
unknown key (key=0xee2fade0): unowned
unknown key (key=0xee3c7de0): unowned
Registered Monitor Dump:
Finalize me queue lock: unowned
Waiting to be notified:
"Finalizer thread"
Thread queue lock: unowned
Name and type hash table lock: unowned
String intern lock: unowned
JNI global reference lock: unowned
BinClass lock: unowned
Class loading lock: unowned
Java stack lock: unowned
Code rewrite lock: unowned
Heap lock: unowned
Has finalization queue lock: unowned
Monitor IO lock: unowned
Child death monitor: unowned
Event monitor: unowned
I/O monitor: unowned
Alarm monitor: unowned
Waiting to be notified:
"clock handler"
Sbrk lock: unowned
Monitor cache expansion lock: unowned
Monitor registry: monitor owner ee2d8de0: "main"
Thread Alarm Q:
Abort
In this case the machine where I was running "jdb" was
Windows 95, and the remote machine was Solaris.
The problem also reproduces if jdb runs on Solaris.
- duplicates
-
JDK-4024764 Using JDB and the applet viewer together does not work
- Closed
- relates to
-
JDK-4036847 The non-debugging VM allows breakpoints to be set, but breakpoints crash it
- Closed