Bug 562461 - In some cases debugger fails with org.eclipse.jdi.TimeoutException and the executed java-application is no longer responding
Summary: In some cases debugger fails with org.eclipse.jdi.TimeoutException and the ex...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.12   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-24 07:23 EDT by Nobody - feel free to take it CLA
Modified: 2024-04-11 15:48 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nobody - feel free to take it CLA 2020-04-24 07:23:03 EDT
When executing the following code in eclipse debugger, the debugger will fail with a org.eclipse.jdi.TimeoutException. The executed java-application will no longer respond. There is no longer any output on the console.

StackTrace in Eclipse-Log:
!ENTRY org.eclipse.jdt.debug 4 125 2020-04-24 13:05:13.535
!MESSAGE Internal error logged from JDI Debug: 
!STACK 0
org.eclipse.jdi.TimeoutException: Timeout occurred while waiting for packet 105811.
	at org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply(PacketReceiveManager.java:196)
	at org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply(PacketReceiveManager.java:207)
	at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:195)
	at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:230)
	at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:246)
	at org.eclipse.jdi.internal.ThreadReferenceImpl.isSuspended(ThreadReferenceImpl.java:330)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread.initialize(JDIThread.java:408)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread.<init>(JDIThread.java:325)
	at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.newThread(JDIDebugTarget.java:668)
	at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.createThread(JDIDebugTarget.java:644)
	at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget$ThreadStartHandler.handleEvent(JDIDebugTarget.java:2267)
	at org.eclipse.jdt.internal.debug.core.EventDispatcher.dispatch(EventDispatcher.java:156)
	at org.eclipse.jdt.internal.debug.core.EventDispatcher.run(EventDispatcher.java:305)
	at java.lang.Thread.run(Thread.java:748)

========================= End of StackTrace ========================= 

Executed Java-Code:

public class TestClass {

    {
	class InnerClass {
	    {
		final class InnerClass2 extends InnerClass {
		    {
			System.out.println("Hey");
		    }
		}
		new InnerClass2();
	    }
	}
	new InnerClass();
    }

    public static void main(final String[] args) {
	new TestClass();
    }

}

========================= End of Java-Code =========================

A few words about the code and the expected behavior:

This code intentionally produces a StackOverflowError. The JVM should then terminate.
  The error is expected to be printed on the console. Instead, the debugger hangs and the JVM does not terminate.
In the debug view of the running threads, I see three threads under the JVM container, all with the status <not responding>.
Comment 1 Nobody - feel free to take it CLA 2020-04-24 07:25:05 EDT
I am using Windows 10 Version 1909 (Build 18363.753) x64
My Eclipse-Version is:
Eclipse IDE for Enterprise Java Developers.
Version: 2019-06 (4.12.0)
Build id: 20190614-1200

My Java-Version is:
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b06)
OpenJDK 64-Bit Server VM GraalVM CE 20.0.0 (build 25.242-b06-jvmci-20.0-b02, mixed mode)
Comment 2 Sarika Sinha CLA 2020-04-27 08:06:28 EDT
Can reprodue the bug, But I don't have a fix for it.
Unless VM sends a VM death or Disconnect Event Debugger waits for it.
Comment 3 Nobody - feel free to take it CLA 2020-04-27 12:45:40 EDT
Thank you for your answer. So if I understand you correctly, is this a problem of the JVM or native debugger functionality and less of a problem of the Eclipse debugger?

Two other thoughts came to mind:
1. In your opinion, is this a bug in the JVM implementation (here GraalVM) for which a report in the GitHub project (https://github.com/oracle/graal/) should be opened?

2. Would it make sense / be possible to expand the Eclipse debugger with a function that recognizes the problem I have described and, if possible, terminates the JVM or at least shows the user a more detailed / concrete message?
Comment 4 Sarika Sinha CLA 2020-04-28 01:45:39 EDT
(In reply to Alexander Guril from comment #3)
> Thank you for your answer. So if I understand you correctly, is this a
> problem of the JVM or native debugger functionality and less of a problem of
> the Eclipse debugger?
> 
> Two other thoughts came to mind:
> 1. In your opinion, is this a bug in the JVM implementation (here GraalVM)
> for which a report in the GitHub project (https://github.com/oracle/graal/)
> should be opened?
> 
> 2. Would it make sense / be possible to expand the Eclipse debugger with a
> function that recognizes the problem I have described and, if possible,
> terminates the JVM or at least shows the user a more detailed / concrete
> message?

Yes, we ahould report a problem to add an explanation and send an intermediate event for the debugger to be notified. In this case it is StackOverflow, it might be something else for a different scenario and Debugger is not supposed to guess, it should get the detailed events from the JVM and respond.
Comment 5 Nobody - feel free to take it CLA 2020-04-29 11:13:52 EDT
Hi Sarika Sinha,

How do we want to report the error to GraalVM?
I lack any information about the actual JVM bug in order to create a reasonable issue.

Do we want to coordinate in this regard?
Do you want to create the issue on GitHub or do you provide me with the information I need to do it?
Comment 6 Eclipse Genie CLA 2022-04-20 16:39:29 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 7 Eclipse Genie CLA 2022-04-21 18:04:34 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 8 Eclipse Genie CLA 2022-04-21 18:04:38 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 9 Eclipse Genie CLA 2024-04-11 15:48:49 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.