This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 262424 - After attaching jpda debugger the debugged ide doesn't response
Summary: After attaching jpda debugger the debugged ide doesn't response
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 8.2
Hardware: PC Linux
: P1 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: 82_HR_FIX
Depends on:
Blocks:
 
Reported: 2016-06-14 12:39 UTC by Petr Pisl
Modified: 2016-09-22 03:01 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump of the debugged ide. (16.48 KB, text/plain)
2016-06-14 12:39 UTC, Petr Pisl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisl 2016-06-14 12:39:49 UTC
Created attachment 160044 [details]
Thread dump of the debugged ide.

I can reproduce this issue on my machine currently always. 

I have one ide that is build from hg repository today. The second ide is daily Java SE build from 20160614. I'm trying to attach the java debugger from the daily build ide (used as develper ide) to the debugged ide (build from trunk). 

The attaching is finished correctly, you can start and stop threads in the debugging window. 

But the debugged ide is not responsive, because the AWT thread is waiting for a lock and it looks like AWT-XAWT thread is still running (consume 100% of one processor). The thread dump of the debugged ide is attached. 

When you finish the debug session, then the debugged ide works correctly. If I connect a debug session to the same debugged ide from NB 8.1, then it works correctly. If I try to connect session from the mentioned daily build, then doesn't work again.
Comment 1 Petr Pisl 2016-06-14 12:41:41 UTC
Adding Mila to the cc, if the problem is in the editor.
Comment 2 Petr Pisl 2016-06-14 12:45:08 UTC
The debugged ide I run with these options:

netbeans -J-Dkenai.com.url=https://testkenai.com -J-XX:+HeapDumpOnOutOfMemoryError -J-Dnetbeans.debug.exceptions=1 -J-Dorg.openide.util.NbBundle.DEBUG=false -J-Dnetbeans.hack.50423=true -J-Xdebug -J-Xnoagent -J-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8002 --jdkhome /home/petr/jdk/jdk1.8.0_31 --userdir /home/petr/ide/userdir/jsdebug10 -J-Dorg.netbeans.modules.javascript2.editor.JsCodeCompletion.level=FINEST -J-Dorg.netbeans.modules.javascript2.editor.parser.SanitizingParser.level=FINE -J-Dorg.netbeans.modules.javascript2.editor.parser.JsParser.level=FINE

and the dev ide i run with these:
netbeans  -J-Dsun.java2d.pmoffscreen=false --jdkhome /home/petr/jdk/jdk1.8.0_31 --userdir /home/petr/ide/userdir/javascript-trunk
Comment 3 Tomas Zezula 2016-06-16 11:59:52 UTC
For me the debugger is very slow in dev build.
Attach takes ~ 3min.
Step over statement i+=2 takes ~ 1min.
Comment 4 Tomas Stupka 2016-09-19 11:55:58 UTC
observed the same 
- attach is slow
- stepping is slow
- the whole debugged application becomes very slow
Comment 5 Martin Entlicher 2016-09-19 14:27:00 UTC
Thanks to Mila's logs it seems that the performance problem is caused by this method breakpoint created by JSJavaBreakpointsManager:
MethodBreakpoint inNashorn = MethodBreakpoint.create("jdk.nashorn.*", "*")
Comment 6 Martin Entlicher 2016-09-20 16:05:41 UTC
Finally reproduced after attaching debugger to another NetBeans instance that have opened and rebuilt JavaFX project.
Comment 7 Martin Entlicher 2016-09-20 17:01:27 UTC
Fixed by changeset:   300823:6f4091c5ad8d
http://hg.netbeans.org/core-main/rev/6f4091c5ad8d
Please verify.
Comment 8 Miloslav Metelka 2016-09-21 15:06:42 UTC
I confirm that the fix eliminates the problem: the debugger attaches quickly to the debugged application and the application does not freeze.
Thanks for fixing.
Comment 9 Martin Entlicher 2016-09-21 15:32:23 UTC
Thanks for the prompt verification, the fix is pushed into release82 branch:
http://hg.netbeans.org/releases/rev/51a2c1fbfc1f
Comment 10 Quality Engineering 2016-09-22 03:01:00 UTC
Integrated into 'main-silver', will be available in build *201609220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6f4091c5ad8d
User: mentlicher@netbeans.org
Log: #262424: Do not use method breakpoints that spans accross too many classes.