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 251782 - Deadlock while editing
Summary: Deadlock while editing
Status: REOPENED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-12 22:58 UTC by scanti
Modified: 2016-05-24 16:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The threaddump (36.81 KB, application/octet-stream)
2015-04-12 22:58 UTC, scanti
Details
the message.log with the exceptiom (406.56 KB, text/plain)
2015-04-12 22:59 UTC, scanti
Details
Another thread dump (34.65 KB, application/octet-stream)
2015-09-29 16:07 UTC, Leperous
Details
More threaddumps (32.79 KB, application/x-zip-compressed)
2016-04-21 09:48 UTC, Leperous
Details

Note You need to log in before you can comment on or make changes to this bug.
Description scanti 2015-04-12 22:58:18 UTC
Created attachment 153148 [details]
The threaddump

I was working with a .java file and NetBeans froze. I waited for 15mins and it is still frozen. I am attaching the threaddump I also can see there was an excetpion in the log file (attached ad well)
Comment 1 scanti 2015-04-12 22:59:03 UTC
Created attachment 153149 [details]
the message.log with the exceptiom
Comment 2 Tomas Zezula 2015-04-15 15:44:51 UTC
It's a live lock in:

"Module-Actions" #483 daemon prio=1 os_prio=0 tid=0x00007f69fc82f000 nid=0x2594 runnable [0x00007f6a761c9000]
   java.lang.Thread.State: RUNNABLE
	at java.net.URI$Parser.scan(URI.java:2998)
	at java.net.URI$Parser.checkChars(URI.java:3019)
	at java.net.URI$Parser.parse(URI.java:3058)
	at java.net.URI.<init>(URI.java:588)
	at java.net.URL.toURI(URL.java:939)
	at org.netbeans.api.java.source.ClasspathInfo.toURIs(ClasspathInfo.java:442)
	at org.netbeans.api.java.source.ClasspathInfo.equals(ClasspathInfo.java:224)
	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:483)
	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:174)
	at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:620)
	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:256)
	at org.netbeans.modules.parsing.api.ResultIterator.getParserResult(ResultIterator.java:138)
	at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:485)
	at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:598)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:155)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:139)
	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:206)
	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:203)
	at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:176)
	at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:360)
	at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:74)
	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:203)
	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:106)
	at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:443)
	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:414)
	at org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.getLocalVerifiedSpans(BatchSearch.java:264)
	at org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.access$600(BatchSearch.java:99)
	at org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch$LocalIndexEnquirer.validateResource(BatchSearch.java:574)
	at org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.getVerifiedSpans(BatchSearch.java:207)
	at org.netbeans.modules.java.hints.spiimpl.batch.BatchUtilities.applyFixes(BatchUtilities.java:191)
	at org.netbeans.modules.java.hints.onsave.RemoveUnusedAfterSave.performTask(RemoveUnusedAfterSave.java:108)


To reporter: Can you reproduce the problem?
If so, can you attach 3 successive thread dumps to find out where the thread cycles.
Thanks!
Comment 3 scanti 2015-04-15 15:47:03 UTC
Sorry it happened once randomly
Comment 4 Svata Dedic 2015-05-06 15:02:25 UTC
Could not reproduce; please supply more thread dumps.
Comment 5 Leperous 2015-09-29 16:07:55 UTC
Created attachment 156468 [details]
Another thread dump

I see this randomly occur about once a month. My latest thread dump was when I inserted a static slf4j Logger, seems to have locked up trying to resolve the imports.
Comment 6 Leperous 2015-09-29 16:08:16 UTC
Reopened, would be good to get this looked at & fixed.
Comment 7 Leperous 2015-09-29 16:09:23 UTC
Bleh. Need to read the prior comments. Will re-open with 3 dumps next time.
Comment 8 Tomas Zezula 2015-09-30 09:01:28 UTC
Even better than 3 tread dumps will be a self sampler file, running sampler for 1 minute when the life lock happens.
Here is a wiki how to generate the self sampling log: http://wiki.netbeans.org/FitnessViaPartnership
Comment 9 Leperous 2015-09-30 17:10:17 UTC
Alas this is not possible, as the whole IDE locks up.
Comment 10 Leperous 2016-04-21 09:48:19 UTC
Created attachment 159365 [details]
More threaddumps

Attached more thread dumps.
Comment 11 Tomas Zezula 2016-05-24 16:12:40 UTC
Java hints are calling JavaSource.rUAT under document write lock:
	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:407)
	at org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.getLocalVerifiedSpans(BatchSearch.java:264)
	at org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.access$600(BatchSearch.java:99)
	at org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch$LocalIndexEnquirer.validateResource(BatchSearch.java:574)
	at org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.getVerifiedSpans(BatchSearch.java:207)
	at org.netbeans.modules.java.hints.spiimpl.batch.BatchUtilities.applyFixes(BatchUtilities.java:192)
	at org.netbeans.modules.java.hints.onsave.RemoveUnusedAfterSave.performTask(RemoveUnusedAfterSave.java:108)
	at org.netbeans.modules.editor.lib.BeforeSaveTasks$TaskRunnable$1.run(BeforeSaveTasks.java:173)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:356)


It's not a deadlock but the EDT is locked.