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 268697 - Netbeans becomes unresponsive for a long time after doing any operation with Git
Summary: Netbeans becomes unresponsive for a long time after doing any operation with Git
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 8.2
Hardware: PC Mac OS X
: P1 normal with 1 vote (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-26 17:09 UTC by titosanxez
Modified: 2017-03-28 16:03 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
.npss file attached from NetBeans (241.96 KB, application/x-npss)
2016-10-26 17:10 UTC, titosanxez
Details
Another snapshot of the same issue (862.13 KB, application/octet-stream)
2016-11-21 18:23 UTC, titosanxez
Details
messages.log associated to the run of the second selfSampler snapshot (95.98 KB, application/octet-stream)
2016-11-21 18:25 UTC, titosanxez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description titosanxez 2016-10-26 17:09:18 UTC
NetBeans becomes unresponsive right after a Git operation is performed on the local repository that holds the files that are part of the NetBeans project.

Attached is the snapshot taken from the NetBeans profiler. The profiled time windows shows that:
1. NetBeans is idle simply displaying the text editor. IDE is very responsive and CPU usage is low.
2. After executing a Git operation, in this case 'git pull', IDE becomes unresponsive and CPU usage is extremely high. This period lasts for several seconds.
3. NetBeans recovers responsiveness and gets back to the state in 1.

This issue affects considerably to the usability of the IDE. The issue occurs for any type of language as long as the sources are part of a Git repository.
Comment 1 titosanxez 2016-10-26 17:10:07 UTC
Created attachment 162651 [details]
.npss file attached from NetBeans

.npss file
Comment 2 Tomas Hurka 2016-11-21 07:57:38 UTC
Thanks for self-sampler snapshot. 
The snapshot shows that the problem seems to be caused by excessive GC. Please try to reproduce it once more and attach new self-sampler snapshot and messages.log file from the same IDE run. 
Thanks.
Comment 3 titosanxez 2016-11-21 18:23:44 UTC
Created attachment 162970 [details]
Another snapshot of the same issue
Comment 4 titosanxez 2016-11-21 18:25:05 UTC
Created attachment 162971 [details]
messages.log associated to the run of the second selfSampler snapshot
Comment 5 titosanxez 2016-11-21 18:27:14 UTC
Hi Tomas,

Thank you for your answer. I just added the two attachments you requested. This issue seems to happen only when I use Git. I have not seen it with any other usage.
Comment 6 Tomas Hurka 2017-03-28 07:30:16 UTC
messages.log shows that there is OutOfMemoryException. Did you reported this exception via exception reporter? You should see it after NetBeans restart.
Comment 7 Tomas Hurka 2017-03-28 07:33:01 UTC
it looks like one of yours OOME is reported as issue #268697.
Comment 8 Tomas Hurka 2017-03-28 07:33:51 UTC
(In reply to Tomas Hurka from comment #7)
> it looks like one of yours OOME is reported as issue #268697.
Correct issue number is #270220.
Comment 9 Tomas Hurka 2017-03-28 07:41:02 UTC
Unfortunately issue #270220 does not have heap dump attached. To diagnose it, we need a heap dump from java.lang.OutOfMemoryError. Please upload zipped heap dump
(/Users/asanchez/Library/Application Support/NetBeans/8.2/var/log/heapdump.hprof.old)
here: <http://deadlock.netbeans.org/job/upload/build>. Thanks.
Comment 10 Tomas Hurka 2017-03-28 07:48:33 UTC
Another OOME report - issue #270221, has the heap dump. So it can be used to analyse OOME.
Comment 11 Tomas Hurka 2017-03-28 14:30:43 UTC
Based on the heap dump from issue #270221, I was able to find out what is going on. The problem is in your git repository. It contains very long (several megabytes) tag messages. There is also several hundreds of tags. All this can occupy a few gigabytes of memory.
Comment 12 titosanxez 2017-03-28 16:03:20 UTC
Hi Tomas,

After looking into my repository it appears that there are actually tons of tag messages, some of them very long. We are working with a repository that has more than 20 years of history :)

The question now is, why does it affect NetBeans so much? Other IDEs seem not to have a problem with this. Also, how can we fix it? is there any setting or workaround to fix this problem? Honestly it's a very annoying problem and makes the IDE almost unusable when working with Git.

(In reply to Tomas Hurka from comment #11)
> Based on the heap dump from issue #270221, I was able to find out what is
> going on. The problem is in your git repository. It contains very long
> (several megabytes) tag messages. There is also several hundreds of tags.
> All this can occupy a few gigabytes of memory.