Skip to content

Conversation

@jlahoda
Copy link
Contributor

@jlahoda jlahoda commented Oct 1, 2017

…me changed, adjusted. License Apache License v2.0. -notice.txt added based on NOTICE from Felix.

-checked Rat report; no license header in binaries-list (added)

-fixed version in -license.txt

-skimmed through the module, did not notice additional problems

…me changed, adjusted. License Apache License v2.0. -notice.txt added based on NOTICE from Felix.

-checked Rat report; no license header in binaries-list (added)

-fixed version in -license.txt

-skimmed through the module, did not notice additional problems
@matthiasblaesing
Copy link
Contributor

Looks good - comment from #33 about the commit message applies here as well.

@jlahoda
Copy link
Contributor Author

jlahoda commented Oct 6, 2017

@jlahoda jlahoda closed this Oct 6, 2017
matthiasblaesing added a commit to matthiasblaesing/netbeans that referenced this pull request Jan 22, 2026
…cument

It was observed, that with the rust-analyzer language server inserting a
completion led to a dead-lock. Checking the stacks of running threads shows,
that the LS tries to publish diagostics, while in parallel a documentFormat is
called.

The assumption is, that the rust side block execution of the `documentFormat`
request until the `publishDiagnostics` call from the LS finishes. The latter
though needs access to the document lock and that is already taken by the
`documentFormat` task.

"AWT-EventQueue-0" apache#35 prio=6 os_prio=0 cpu=8224,39ms elapsed=119,39s tid=0x00007f5384156f60 nid=0x2b0da7 waiting on condition  [0x00007f537e7f9000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@17.0.9/Native Method)
	- parking to wait for  <0x00000006448493e8> (a java.util.concurrent.CompletableFuture$Signaller)
	at java.util.concurrent.locks.LockSupport.park(java.base@17.0.9/LockSupport.java:211)
	at java.util.concurrent.CompletableFuture$Signaller.block(java.base@17.0.9/CompletableFuture.java:1864)
	at java.util.concurrent.ForkJoinPool.unmanagedBlock(java.base@17.0.9/ForkJoinPool.java:3465)
	at java.util.concurrent.ForkJoinPool.managedBlock(java.base@17.0.9/ForkJoinPool.java:3436)
	at java.util.concurrent.CompletableFuture.waitingGet(java.base@17.0.9/CompletableFuture.java:1898)
	at java.util.concurrent.CompletableFuture.get(java.base@17.0.9/CompletableFuture.java:2072)
	at org.netbeans.modules.lsp.client.bindings.Formatter.documentFormat(Formatter.java:122)
	at org.netbeans.modules.lsp.client.bindings.Formatter.reformat(Formatter.java:87)
	at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:550)
	at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:309)
	at org.netbeans.modules.editor.indent.IndentImpl.reformat(IndentImpl.java:349)
	at org.netbeans.modules.editor.indent.api.Reformat.reformat(Reformat.java:129)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.run(CodeTemplateInsertHandler.java:352)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:333)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.insertTemplate(CodeTemplateInsertHandler.java:258)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.processTemplate(CodeTemplateInsertHandler.java:229)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateManagerOperation.insert(CodeTemplateManagerOperation.java:273)
	at org.netbeans.lib.editor.codetemplates.api.CodeTemplate.insert(CodeTemplate.java:82)
	at org.netbeans.modules.lsp.client.bindings.CompletionProviderImpl$3.lambda$commit$0(CompletionProviderImpl.java:307)
	at org.netbeans.modules.lsp.client.bindings.CompletionProviderImpl$3$$Lambda$825/0x00007f53e4ae8498.run(Unknown Source)
	at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:296)
	at org.openide.text.NbDocument.runAtomic(NbDocument.java:411)
	at org.netbeans.modules.lsp.client.bindings.CompletionProviderImpl$3.commit(CompletionProviderImpl.java:254)
	at org.netbeans.modules.lsp.client.bindings.CompletionProviderImpl$3.defaultAction(CompletionProviderImpl.java:231)
	at org.netbeans.modules.editor.completion.CompletionImpl.dispatchKeyEvent(CompletionImpl.java:785)
	at org.netbeans.modules.editor.completion.CompletionImpl.keyPressed(CompletionImpl.java:386)
	at java.awt.AWTEventMulticaster.keyPressed(java.desktop@17.0.9/AWTEventMulticaster.java:258)
        [...]

"pool-4-thread-1" apache#75 prio=5 os_prio=0 cpu=136,37ms elapsed=76,96s tid=0x00007f5380ae1080 nid=0x2b0e84 in Object.wait()  [0x00007f52e99fc000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@17.0.9/Native Method)
	- waiting on <no object reference available>
	at java.lang.Object.wait(java.base@17.0.9/Object.java:338)
	at javax.swing.text.AbstractDocument.readLock(java.desktop@17.0.9/AbstractDocument.java:1421)
	- locked <0x000000063c6af680> (a org.netbeans.modules.csl.core.GsfDocument)
	at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1405)
	at org.openide.text.PositionRef$Manager$DocumentRenderer.render(PositionRef.java:927)
	at org.openide.text.PositionRef$Manager$DocumentRenderer.renderToObject(PositionRef.java:948)
	at org.openide.text.PositionRef$Manager.addPosition(PositionRef.java:389)
	at org.openide.text.PositionRef.init(PositionRef.java:105)
	at org.openide.text.PositionRef.<init>(PositionRef.java:90)
	at org.openide.text.PositionRef.<init>(PositionRef.java:68)
	at org.openide.text.CloneableEditorSupport.createPositionRef(CloneableEditorSupport.java:1264)
	at org.netbeans.modules.editor.hints.HintsControllerImpl.linePart(HintsControllerImpl.java:231)
	at org.netbeans.spi.editor.hints.ErrorDescriptionFactory.createErrorDescription(ErrorDescriptionFactory.java:245)
	at org.netbeans.spi.editor.hints.ErrorDescriptionFactory.createErrorDescription(ErrorDescriptionFactory.java:218)
	at org.netbeans.modules.lsp.client.bindings.LanguageClientImpl.lambda$publishDiagnostics$0(LanguageClientImpl.java:176)
	at org.netbeans.modules.lsp.client.bindings.LanguageClientImpl$$Lambda$705/0x00007f53e4ac73a8.apply(Unknown Source)
	at java.util.stream.ReferencePipeline$3$1.accept(java.base@17.0.9/ReferencePipeline.java:197)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(java.base@17.0.9/ArrayList.java:1625)
	at java.util.stream.AbstractPipeline.copyInto(java.base@17.0.9/AbstractPipeline.java:509)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(java.base@17.0.9/AbstractPipeline.java:499)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(java.base@17.0.9/ReduceOps.java:921)
	at java.util.stream.AbstractPipeline.evaluate(java.base@17.0.9/AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(java.base@17.0.9/ReferencePipeline.java:682)
	at org.netbeans.modules.lsp.client.bindings.LanguageClientImpl.publishDiagnostics(LanguageClientImpl.java:177)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@17.0.9/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@17.0.9/NativeMethodAccessorImpl.java:77)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.9/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(java.base@17.0.9/Method.java:568)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$recursiveFindRpcMethods$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint$$Lambda$648/0x00007f53e4a4dd50.apply(Unknown Source)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:160)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:231)
        [...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants