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 262655 - ide hangs
Summary: ide hangs
Status: RESOLVED DUPLICATE of bug 267614
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.2
Hardware: PC Linux
: P2 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-01 16:12 UTC by tbrunhoff
Modified: 2016-09-05 16:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump (33.91 KB, text/plain)
2016-07-01 16:12 UTC, tbrunhoff
Details
log file (967.55 KB, text/x-log)
2016-07-01 16:12 UTC, tbrunhoff
Details
thread dump 2016-07-17 (31.08 KB, text/plain)
2016-07-17 22:26 UTC, tbrunhoff
Details
messages.log 2016-07-17 (1007.49 KB, text/x-log)
2016-07-17 22:27 UTC, tbrunhoff
Details
log file showing scans of files outside of ~/src/src2. (79.47 KB, text/x-log)
2016-07-17 23:38 UTC, tbrunhoff
Details
complete NB project files (no sources) (6.99 MB, application/x-tar)
2016-07-17 23:40 UTC, tbrunhoff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tbrunhoff 2016-07-01 16:12:00 UTC
Created attachment 160224 [details]
thread dump

The IDE just hung... totally non-responsive.  Leading up to this:
 - 24 hours running
 - 4 projects open
 - lots of editing, builds, switching between projects, a bit of debugging.
 - this morning, started debugging, stepping through code.
 - got some email about an issue, and while stopped at a breakpoint, I overwrote three files in a different project (changes from a colleague).
 - Then I switched to a different project (already opened) and started browsing the code.
 - At one point I could not navigate to a method, so I selected "reparse project". It started parsing.
 - To minimize confusion, I cancelled the debug session.
 - At this point the reparse showed 28% and made no more progress.
 - Eventually I decided to close the ide and start again, got a dialog about cancelling the parse, and when I hit OK, the ide hung.

Attached are a thread dump and messages.log.
Comment 1 tbrunhoff 2016-07-01 16:12:38 UTC
Created attachment 160225 [details]
log file
Comment 2 tbrunhoff 2016-07-01 16:14:39 UTC
Product Version: NetBeans IDE Dev (Build 201606070002)
Updates: Updates available
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Linux version 4.1.13-100.fc21.x86_64 running on amd64; UTF-8; en_US (nb)
User directory: /home/toddb/.netbeans/dev
Cache directory: /home/toddb/.cache/netbeans/dev
Comment 3 Vladimir Voskresensky 2016-07-14 11:42:25 UTC
Todd, thanks for the log/dump.

Have you got it only once or the other times when you closed the IDE it was hung?

From stacks I see that some threads can not finish fixFakeRegistrations for the same file, because one of threads entered it and then was stuck on "CloneableEditorSupport.openDocument" by waiting for the document.
While document is not read by any threads. 
Probably editor-open task was cancelled when debugger was stopped and debugger mode was switching to editing mode thus debug-session related files were closed.

It would be great to have reproducible case, because from threads it's not clear why editor could be not opened by CloneableEditorSupport.openDocument
Comment 4 Vladimir Voskresensky 2016-07-14 11:47:54 UTC
Btw, from stacks it is visible that for the same file ( dcmerror.h) fixFakeFunctionRegistrations is called from different threads through FakeRegistrationWorker$FixRegistrationRunnable.run

Shouldn't we fix fakes for one file only from one thread?
Comment 5 tbrunhoff 2016-07-17 22:26:30 UTC
Created attachment 160417 [details]
thread dump 2016-07-17

Another instance.  This time simpler: I was having problems with the ide, so I shut it down and restarted it.  When it came up, two projects were open and the progress showed 80% done with scan and then it totally locked up.  No user input. So this instance was pretty clean.
Comment 6 tbrunhoff 2016-07-17 22:27:25 UTC
Created attachment 160418 [details]
messages.log 2016-07-17
Comment 7 tbrunhoff 2016-07-17 22:29:48 UTC
This one on:
Product Version: NetBeans IDE Dev (Build 201607030002)
Updates: Updates available
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Linux version 4.1.13-100.fc21.x86_64 running on amd64; UTF-8; en_US (nb)
User directory: /home/toddb/.netbeans/dev
Cache directory: /home/toddb/.cache/netbeans/dev
Comment 8 tbrunhoff 2016-07-17 23:19:10 UTC
removed ~/.netbeans/dev/cnd/model and restarted ide. Hung again, but it hung parsing the second project at 58% and I noticed the log ended with

INFO [cnd.parsing.problem.detector]: Lack of Memory, Heap Size=1,778Mb, Used Memory=1,603Mb

So I killed it, changed from -J-Xmx2000m to -J-Xmx3000m, removed ~/.cache/netbeans/dev/cnd/model/ and restarted.
This time it kept making progress, but very slowly.  When I clicked on the progress it showed parsing parsing 25000 / 33000 at about one file every half second. About every other file showed "Lack of memory" in red!  This machine has an i7 with 32GB memory)

So I exited the ide (it was not hung). and changed to -J-Xmx4000m.  I still saw messages in the log like:

INFO [cnd.parsing.problem.detector]: Lack of Memory, Heap Size=3,556Mb, Used Memory=3,213Mb

After about 10 minutes the ide finished parsing.  In the log, I found many messages like:

INFO [org.netbeans.modules.subversion]: cli: ERROR "svn: E155036: Please see the 'svn upgrade' command"
INFO [org.netbeans.modules.subversion]: cli: ERROR "svn: E155036: The working copy at '/home/toddb/src/src7.8/libmapi'"
INFO [org.netbeans.modules.subversion]: cli: ERROR "is too old (format 29) to work with client version '1.8.13 (r1667537)' (expects format 31). You need to upgrade the working copy first."

Shouldn't these be relative path names? I then edited configurations.xml and changed all the absolute pathnames to point to the right directory, leaving them as absolute. Still the same svn messages popped up.  There are projects on those directories, but they are not opened in the ide.  Why are they being scanned? I have searched all .xml and .properties files in all projects and have changed all absolute pathnames to match the directory in which they appear.
Comment 9 tbrunhoff 2016-07-17 23:31:48 UTC
Ok, I found that the project included a source folder that pointed to several other project.  This was a folder that the ide chose to include.

So that takes us back to just the out-of-memory condition.
Comment 10 tbrunhoff 2016-07-17 23:37:34 UTC
All dev folders are under ~/src.  The projects currently open are under ~/src/src2. The ide showed ~/src in the project, which is why many projects were being scanned.  But even after removing ~/src from the project and restarting the ide, 
No... even after using the ide to remove the ~/src from the project, the log showed that it was still scanning these other projects.
Comment 11 tbrunhoff 2016-07-17 23:38:15 UTC
Created attachment 160419 [details]
log file showing scans of files outside of ~/src/src2.
Comment 12 tbrunhoff 2016-07-17 23:40:21 UTC
Created attachment 160420 [details]
complete NB project files (no sources)
Comment 13 Vladimir Voskresensky 2016-09-05 16:06:31 UTC
should be fixed already

*** This bug has been marked as a duplicate of bug 267614 ***