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 256062 - NetBeans completely hung up
Summary: NetBeans completely hung up
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 8.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-21 01:18 UTC by mclaborn
Modified: 2016-08-22 15:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log file (180.84 KB, application/octet-stream)
2015-10-21 01:18 UTC, mclaborn
Details
Stack trace (36.24 KB, text/plain)
2015-10-21 01:19 UTC, mclaborn
Details
Screen shot (24.06 KB, image/png)
2015-10-21 01:20 UTC, mclaborn
Details
log file 2 (155.05 KB, text/x-log)
2015-10-21 01:31 UTC, mclaborn
Details
stack trace 2 (33.86 KB, text/plain)
2015-10-21 01:31 UTC, mclaborn
Details
screen shot 2 (22.93 KB, image/png)
2015-10-21 01:32 UTC, mclaborn
Details
IDE log from today's occurrence (949.29 KB, text/x-log)
2015-10-24 18:37 UTC, mclaborn
Details
Stack trace from today's occurrence (44.61 KB, text/plain)
2015-10-24 18:37 UTC, mclaborn
Details
message log for today's failure, with the document patch turned on (228.04 KB, text/x-log)
2015-11-11 16:49 UTC, mclaborn
Details
stack trace to match message log just attached (53.66 KB, text/plain)
2015-11-11 16:49 UTC, mclaborn
Details
Stack trace from today's occurrence (45.21 KB, text/plain)
2015-12-01 14:03 UTC, mclaborn
Details
Message log from today's occurrence (13.48 KB, text/x-log)
2015-12-01 14:05 UTC, mclaborn
Details
messages log from today (798.63 KB, text/x-log)
2016-01-04 19:07 UTC, mclaborn
Details
stack trace from today (67.51 KB, text/plain)
2016-01-04 19:15 UTC, mclaborn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mclaborn 2015-10-21 01:18:01 UTC
Product Version = NetBeans IDE 8.1 RC2 (Build 201510122201)
Operating System = Linux version 3.13.0-66-generic running on amd64
Java; VM; Vendor = 1.8.0_51
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.51-b03

Reproducibility: Happens sometimes, but not always

Netbeans completely hung up while editing a javascript file. Stack trace, log file and screen shot of where I was editing coming shortly. 
Referring to the screen shot: I had just pasted in the highlighted text, replacing what was there and then double clicked on the "true" that is still selected. 

The symptoms of this feel a lot like 252781, but I'm creating a new bug for the 8.1 RC and the stack trace looks a bit different (to me)
Comment 1 mclaborn 2015-10-21 01:18:52 UTC
Created attachment 156856 [details]
Log file
Comment 2 mclaborn 2015-10-21 01:19:38 UTC
Created attachment 156857 [details]
Stack trace
Comment 3 mclaborn 2015-10-21 01:20:07 UTC
Created attachment 156858 [details]
Screen shot
Comment 4 mclaborn 2015-10-21 01:24:41 UTC
This happened twice in a row at the exact same place and actions in the editor, so it may be repeatable.  I'll save a copy of the file as is, then try some different tactics to get my work done.
Comment 5 mclaborn 2015-10-21 01:30:56 UTC
Wow - this is really broken!  It locked up again just deleting some characters in the same spot.  I'm attaching another stack track, log and screen shot and changing to P1.

Ref the screen shot.  I had just backspace deleted a few characters where you can see the cursor.
Comment 6 mclaborn 2015-10-21 01:31:28 UTC
Created attachment 156859 [details]
log file 2
Comment 7 mclaborn 2015-10-21 01:31:57 UTC
Created attachment 156860 [details]
stack trace 2
Comment 8 mclaborn 2015-10-21 01:32:26 UTC
Created attachment 156861 [details]
screen shot 2
Comment 9 Jiri Kovalsky 2015-10-21 05:33:09 UTC
Reassigned for further evaluation.
Comment 10 Petr Pisl 2015-10-21 09:49:27 UTC
If you are able to reproduce, could you please provide test case? It would be helpful. Thanks
Comment 11 Petr Pisl 2015-10-21 11:56:04 UTC
One more question. What exactly means that NetBeans hang up? Is the processor of your machine consumed or does nothing? Could you try to create profiling snapshot?
Comment 12 mclaborn 2015-10-21 14:24:41 UTC
I cannot reproduce the problem this morning, but last night it was so bad that I had to switch back to 8.0.2 to get my work done.
Comment 13 mclaborn 2015-10-21 14:26:24 UTC
"hung up" meaning that the IDE was completely unresponsive to any mouse or keyboard activity, in any part of the NB window, as if the EDT was deadlocked. There was not high resource usage.
Comment 14 Petr Pisl 2015-10-22 09:26:43 UTC
There is not any useful information in the stacktraces. We need more data. I'm marking this issue as incomplete. Please reopen, if you are still able to reproduce and it would be great, if you could provide more information, how to reproduce. Could you attach the file, where it happens?
Comment 15 mclaborn 2015-10-24 18:36:29 UTC
This continues to happen to me, so I'm reopening this issue at P2.  I realize how difficult it is to troubleshoot a problem when you can't reliably reproduce it (I AM a developer myself), but there is something broken here somewhere. I'm attaching stack trace and message log from another occurrence.
Comment 16 mclaborn 2015-10-24 18:37:19 UTC
Created attachment 156951 [details]
IDE log from today's occurrence
Comment 17 mclaborn 2015-10-24 18:37:51 UTC
Created attachment 156952 [details]
Stack trace from today's occurrence
Comment 18 Petr Pisl 2015-10-27 10:08:38 UTC
All the stacktraces looks similar. The AWT is trying to render the document. 

Reassigning to Mila, we talked about this. Milo, please try to evaluate, what is happening.
Comment 19 Miloslav Metelka 2015-11-04 09:47:30 UTC
(In reply to mclaborn from comment #17)
> Created attachment 156952 [details]
> Stack trace from today's occurrence

There's let's say a suspicious thread being in notify() - was the CPU usage of the java process close to 0% (e.g. in 'top' program)?

Anyway I've made a JDK patch to diagnose pending document lock threads. It's described at http://wiki.netbeans.org/EditorShowDocumentLockingThreads could you please run the IDE with and once the problem happens again could you please attach its output to the issue? Thanks.
Comment 20 mclaborn 2015-11-04 16:06:09 UTC
I don't remember seeing any high CPU usage, but can't say if it was really low.

I've put in the patch jar for my 8.1 RC2 installation and verified that the starting logging message is present.  Will post here next time I hit the problem.
Comment 21 mclaborn 2015-11-11 16:49:03 UTC
Created attachment 157279 [details]
message log for today's failure, with the document patch turned on

I finally captured another occurrence of this. Message log is attached with document patch output in it.  Will attach stack trace shortly.
Comment 22 mclaborn 2015-11-11 16:49:39 UTC
Created attachment 157280 [details]
stack trace to match message log just attached
Comment 23 Miloslav Metelka 2015-11-12 09:31:20 UTC
(In reply to mclaborn from comment #22)
> Created attachment 157280 [details]
> stack trace to match message log just attached

Thanks for the attachments it's again strange. I assume that there was no CPU activity at the time the snapshot was taken?? May I ask you to take two snapshots (after few seconds) when the problem happens? That way there would be a higher probability that if the the threads stepped into a different state we would notice it.

7333f56f0 document - it's write locked and reported by the patch. It's important whether there was any CPU activity or not because if there would be many o.o.text.Line instances (breakpoints,bookmarks etc.) for the document this could be a normal state assuming the CPU was processing them.

7313d3748 document - there seems to be no locker - the patch does not report it. I have to improve the patch to cover this case as well.

Hopefully after one more iteration we should be able to tell precisely what's wrong. Thanks.
Comment 24 mclaborn 2015-11-12 15:04:07 UTC
There was not high CPU, but can't say for certain there was "no cpu".  I'll examine CPU usage more closely next time. 


"May I ask you to take two snapshots (after few seconds) when the problem happens?"

Do you mean stack traces or the built-in NB self-profiler? The self-profiler won't work, as the entire UI portion of NB is locked when this happens, so I have no way to turn it on.  Stack traces is no problem.
Comment 25 Miloslav Metelka 2015-11-12 16:10:40 UTC
> "May I ask you to take two snapshots (after few seconds) when the problem
> happens?"
> 
> Do you mean stack traces or the built-in NB self-profiler? The self-profiler
> won't work, as the entire UI portion of NB is locked when this happens, so I
> have no way to turn it on.  Stack traces is no problem.

I've meant full thread dumps i.e. please either press Ctrl+\ in console or use
kill -QUIT <NB-IDE-process-number>
You may want to run "jps" to only show java processes.
Thanks.
Comment 26 mclaborn 2015-11-12 16:15:14 UTC
I've been using jps and jstack. Is that sufficient, or should I use 

kill -QUIT <NB-IDE-process-number>

instead?
Comment 27 Miloslav Metelka 2015-11-12 17:58:22 UTC
(In reply to mclaborn from comment #26)
> I've been using jps and jstack. Is that sufficient, or should I use 
> 
> kill -QUIT <NB-IDE-process-number>
> 
> instead?

No, jstack is fine.
Comment 28 Miloslav Metelka 2015-11-26 09:08:36 UTC
I've improved the patch to better monitor threads that did not acquire the lock yet.
The patch is now version 1.1 - it should now output "AbstractDocument-read/write logging v1.1 started".
The download URLs are the same - links are in http://wiki.netbeans.org/EditorShowDocumentLockingThreads
Could you please run with the new version of the patch and if the problem happens please check the CPU activity and attach the output to the issue? Thanks in advance.
Comment 29 mclaborn 2015-11-26 20:05:16 UTC
I've installed the updated patch and verified the startup message in the log.

This seems to happen most when I'm editing in Javascript.  It may be a couple of weeks before I do much in Javascript again.
Comment 30 mclaborn 2015-12-01 14:03:21 UTC
Here is stack trace and message.log from another occurrence. There IS high CPU usage from the NetBeans task.
Comment 31 mclaborn 2015-12-01 14:03:56 UTC
Created attachment 157582 [details]
Stack trace from today's occurrence
Comment 32 mclaborn 2015-12-01 14:05:02 UTC
Created attachment 157583 [details]
Message log from today's occurrence

This occurrence - pasted a block of Java code into a normal Java class.
Comment 33 mclaborn 2015-12-01 14:08:17 UTC
Not sure if it matters: In the file I was working in, I noticed bookmark problems very similar to 256154.  Going to a bookmark landed several lines before the actual bookmark icon.
Comment 34 Miloslav Metelka 2015-12-06 20:36:49 UTC
(In reply to mclaborn from comment #32)
> Created attachment 157583 [details]
> Message log from today's occurrence
> 
> This occurrence - pasted a block of Java code into a normal Java class.

Unfortunately the attached messages.log seems to be truncated - it's missing the begining of the output of the patch. Could you please attach the full output of the patch? Thanks.
Comment 35 mclaborn 2015-12-07 16:26:45 UTC
Sorry - I no longer have that log file.  I was out of the office last week so didn't have any backups of that directory. I'm in the office this week and will be coding quite a bit, so I may see this again.
Comment 36 mclaborn 2016-01-04 19:07:39 UTC
Created attachment 157993 [details]
messages log from today

I think this is an occurrence of this problem. I was editing in a JSP file and NB got very, very slow, but not completely locked up.  CPU usage was very high.  Attached is the messages log and a stack trace.
Comment 37 mclaborn 2016-01-04 19:15:55 UTC
Created attachment 157994 [details]
stack trace from today
Comment 38 Miloslav Metelka 2016-01-26 17:08:29 UTC
The records in the log file do not indicate a threading problem but they show a heavy processing of annotations so it's likely there's a high number of annotations (such as breakpoints or bookmarks) and o.o.text.Line objects for some reason.
I've added some more debugs into LineVector in
http://hg.netbeans.org/jet-main/rev/5dcee0855eb5
Comment 39 Quality Engineering 2016-01-27 02:31:27 UTC
Integrated into 'main-silver', will be available in build *201601270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5dcee0855eb5
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #256062 - NetBeans completely hung up - improved logging in LineVector.
Comment 40 Miloslav Metelka 2016-08-17 13:45:55 UTC
Is this problem still happening? If so are there any steps to reproduce?
Comment 41 mclaborn 2016-08-17 13:59:20 UTC
I have not seen this one in some time. I think it is safe to close it.
Comment 42 jocafi 2016-08-22 13:32:51 UTC
Hi there. I updated a few weeks ago my Windows 7 to Windows 10 and I am having the same issue as described here and in the issue #216280 (Typing lag and delays while writing code).

To reproduce the error:

1) Create a new Java Project
2) Create a new Class
3) Insert the code below

     public String whats_Your_Name() {
         String p = 
         return "I have many names and types";
     }

4) Select / Mark the text "I have many names and types"
5) Press quickly CTRL+X , UP Arrow, End, asd
6) Finish. You should notice that Netbeans needs 1000 ms or more to write asd in line above where the cursor was before. The result is:

     public String whats_Your_Name() {
         String p = asd
         return ;
     }
Comment 43 Miloslav Metelka 2016-08-22 15:39:23 UTC
(In reply to jocafi from comment #42)
> Hi there. I updated a few weeks ago my Windows 7 to Windows 10 and I am
> having the same issue as described here and in the issue #216280 (Typing lag
> and delays while writing code).

Does it mean that the problem started after the Win7 -> Win10 upgrade on the same NB installation (same build)?
Btw I was not able reproduce the problem according to the given steps but I'm on Ubuntu 15.04.
The issue #216280 is already fixed so I would suggest to file a new issue for this particular problem. Please describe if (besides OS upgrade) there weren't e.g. any other HW changes that might influence the problem. Thanks.

Considering reply from mclaborn I mark this issue as fixed.