redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.08k stars 442 forks source link

Extension Doesn't work if Flight Recorder is Enabled #1407

Open brunoborges opened 4 years ago

brunoborges commented 4 years ago

With JFR enabled, the extension does not work at all.

Environment
Steps To Reproduce
  1. Enable JFR in User settings with the following setting:
"java.jdt.ls.vmargs": "-XX:StartFlightRecording=settings=default,dumponexit=true,filename=/Users/bruno/jfrdumps -Xms512m",
  1. Restart extension

  2. Try to work on any Java project

Current Result

Nothing works.

Expected Result

Should work same way as without JFR.

Additional Informations

The language server JVM is up and running and things are happening inside of it. When you quit VS Code or terminate the JVM, a JFR dump will be produced and will highlight thousands of Errors/Exceptions.

fbricon commented 4 years ago

Indeed, it doesn't work. Thread dump when "java.server.launchMode":"Standard" (to simplify start with only 1 server process):

2020-04-22 11:06:30
Full thread dump OpenJDK 64-Bit Server VM (14+36-1461 mixed mode, sharing):

Threads class SMR info:
_java_thread_list=0x00007fbe6c857bf0, length=29, elements={
0x00007fbe6a003800, 0x00007fbe6a801800, 0x00007fbe6a026800, 0x00007fbe6a80d000,
0x00007fbe6a810000, 0x00007fbe6a811000, 0x00007fbe6a037800, 0x00007fbe6b005000,
0x00007fbe6a02d000, 0x00007fbe6a106800, 0x00007fbe6bb17000, 0x00007fbe6b056800,
0x00007fbe6b040800, 0x00007fbe6a8d5000, 0x00007fbe6a51e800, 0x00007fbe6b471800,
0x00007fbe6bbbd000, 0x00007fbe6b517800, 0x00007fbe6ae59800, 0x00007fbe6bc58000,
0x00007fbe6a754800, 0x00007fbe6b53e800, 0x00007fbe6a761000, 0x00007fbe6ae7b000,
0x00007fbe6ba2f000, 0x00007fbe6bbc0000, 0x00007fbe6ba34000, 0x00007fbe6d828800,
0x00007fbe6bd80000
}

"main" #1 prio=5 os_prio=31 cpu=1283.42ms elapsed=26.29s tid=0x00007fbe6a003800 nid=0x2903 in Object.wait()  [0x00007000047d5000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at java.lang.Object.wait(java.base@14/Object.java:321)
    at org.eclipse.jdt.ls.core.internal.LanguageServer.start(LanguageServer.java:33)
    - locked <0x00000007c10a4c30> (a java.lang.Object)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@14/Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@14/NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@14/DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(java.base@14/Method.java:564)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1420)

"Reference Handler" #2 daemon prio=10 os_prio=31 cpu=2.73ms elapsed=26.28s tid=0x00007fbe6a801800 nid=0x4a03 waiting on condition  [0x0000700004adf000]
   java.lang.Thread.State: RUNNABLE
    at java.lang.ref.Reference.waitForReferencePendingList(java.base@14/Native Method)
    at java.lang.ref.Reference.processPendingReferences(java.base@14/Reference.java:241)
    at java.lang.ref.Reference$ReferenceHandler.run(java.base@14/Reference.java:213)

"Finalizer" #3 daemon prio=8 os_prio=31 cpu=0.48ms elapsed=26.28s tid=0x00007fbe6a026800 nid=0x3303 in Object.wait()  [0x0000700004be2000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at java.lang.ref.ReferenceQueue.remove(java.base@14/ReferenceQueue.java:155)
    - locked <0x00000007c05782a8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(java.base@14/ReferenceQueue.java:176)
    at java.lang.ref.Finalizer$FinalizerThread.run(java.base@14/Finalizer.java:170)

"Signal Dispatcher" #4 daemon prio=9 os_prio=31 cpu=0.33ms elapsed=26.27s tid=0x00007fbe6a80d000 nid=0x4203 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Service Thread" #5 daemon prio=9 os_prio=31 cpu=0.07ms elapsed=26.27s tid=0x00007fbe6a810000 nid=0x3c03 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #6 daemon prio=9 os_prio=31 cpu=8129.10ms elapsed=26.27s tid=0x00007fbe6a811000 nid=0x3f03 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"C1 CompilerThread0" #8 daemon prio=9 os_prio=31 cpu=4394.95ms elapsed=26.26s tid=0x00007fbe6a037800 nid=0x5603 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"Sweeper thread" #9 daemon prio=9 os_prio=31 cpu=111.47ms elapsed=26.26s tid=0x00007fbe6b005000 nid=0x5703 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Common-Cleaner" #10 daemon prio=8 os_prio=31 cpu=1.94ms elapsed=26.22s tid=0x00007fbe6a02d000 nid=0xa503 in Object.wait()  [0x000070000537d000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at java.lang.ref.ReferenceQueue.remove(java.base@14/ReferenceQueue.java:155)
    - locked <0x00000007c06dbda8> (a java.lang.ref.ReferenceQueue$Lock)
    at jdk.internal.ref.CleanerImpl.run(java.base@14/CleanerImpl.java:148)
    at java.lang.Thread.run(java.base@14/Thread.java:832)
    at jdk.internal.misc.InnocuousThread.run(java.base@14/InnocuousThread.java:134)

"JFR Recorder Thread" #11 daemon prio=5 os_prio=31 cpu=50.49ms elapsed=25.91s tid=0x00007fbe6a106800 nid=0x5803 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"JFR Periodic Tasks" #12 daemon prio=5 os_prio=31 cpu=101.22ms elapsed=24.55s tid=0x00007fbe6bb17000 nid=0xa003 in Object.wait()  [0x0000700005686000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at jdk.jfr.internal.PlatformRecorder.takeNap(jdk.jfr@14/PlatformRecorder.java:481)
    - locked <0x00000007c00e1af0> (a java.lang.Object)
    at jdk.jfr.internal.PlatformRecorder.periodicTask(jdk.jfr@14/PlatformRecorder.java:474)
    at jdk.jfr.internal.PlatformRecorder.lambda$startDiskMonitor$1(jdk.jfr@14/PlatformRecorder.java:417)
    at jdk.jfr.internal.PlatformRecorder$$Lambda$71/0x0000000800b79440.run(jdk.jfr@14/Unknown Source)
    at java.lang.Thread.run(java.base@14/Thread.java:832)

"JFR Recording Scheduler" #15 daemon prio=5 os_prio=31 cpu=0.14ms elapsed=24.54s tid=0x00007fbe6b056800 nid=0x5c03 in Object.wait()  [0x000070000588c000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <0x00000007c0100a98> (a java.util.TaskQueue)
    at java.lang.Object.wait(java.base@14/Object.java:321)
    at java.util.TimerThread.mainLoop(java.base@14/Timer.java:527)
    - locked <0x00000007c0100a98> (a java.util.TaskQueue)
    at java.util.TimerThread.run(java.base@14/Timer.java:506)

"Notification Thread" #16 daemon prio=9 os_prio=31 cpu=0.08ms elapsed=24.43s tid=0x00007fbe6b040800 nid=0x9a03 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"process reaper" #18 daemon prio=10 os_prio=31 cpu=0.76ms elapsed=23.73s tid=0x00007fbe6a8d5000 nid=0x9703 waiting on condition  [0x0000700005ab9000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at jdk.internal.misc.Unsafe.park(java.base@14/Native Method)
    - parking to wait for  <0x00000007c01058f0> (a java.util.concurrent.SynchronousQueue$TransferStack)
    at java.util.concurrent.locks.LockSupport.parkNanos(java.base@14/LockSupport.java:252)
    at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(java.base@14/SynchronousQueue.java:462)
    at java.util.concurrent.SynchronousQueue$TransferStack.transfer(java.base@14/SynchronousQueue.java:361)
    at java.util.concurrent.SynchronousQueue.poll(java.base@14/SynchronousQueue.java:937)
    at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@14/ThreadPoolExecutor.java:1055)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@14/ThreadPoolExecutor.java:1116)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@14/ThreadPoolExecutor.java:630)
    at java.lang.Thread.run(java.base@14/Thread.java:832)

"Active Thread: Equinox Container: 5d2576b3-9285-4bfd-9c65-9944977f2ad4" #19 prio=5 os_prio=31 cpu=0.87ms elapsed=22.81s tid=0x00007fbe6a51e800 nid=0x9303 waiting on condition  [0x0000700005cbf000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at jdk.internal.misc.Unsafe.park(java.base@14/Native Method)
    - parking to wait for  <0x00000007c00d70a8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(java.base@14/LockSupport.java:252)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@14/AbstractQueuedSynchronizer.java:1661)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@14/ScheduledThreadPoolExecutor.java:1182)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@14/ScheduledThreadPoolExecutor.java:899)
    at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@14/ThreadPoolExecutor.java:1056)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@14/ThreadPoolExecutor.java:1116)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@14/ThreadPoolExecutor.java:630)
    at java.lang.Thread.run(java.base@14/Thread.java:832)

"Framework Event Dispatcher: Equinox Container: 5d2576b3-9285-4bfd-9c65-9944977f2ad4" #21 daemon prio=5 os_prio=31 cpu=6.04ms elapsed=22.54s tid=0x00007fbe6b471800 nid=0x9103 in Object.wait()  [0x0000700005dc2000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at java.lang.Object.wait(java.base@14/Object.java:321)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)
    - locked <0x00000007c006faf0> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:341)

"Start Level: Equinox Container: 5d2576b3-9285-4bfd-9c65-9944977f2ad4" #22 daemon prio=5 os_prio=31 cpu=1077.22ms elapsed=22.53s tid=0x00007fbe6bbbd000 nid=0x8f03 in Object.wait()  [0x0000700005ec5000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at java.lang.Object.wait(java.base@14/Object.java:321)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)
    - locked <0x00000007c06c1148> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:341)

"Worker-JM" #23 prio=5 os_prio=31 cpu=0.23ms elapsed=21.66s tid=0x00007fbe6b517800 nid=0xb803 in Object.wait()  [0x00007000061ce000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at org.eclipse.core.internal.jobs.InternalWorker.run(InternalWorker.java:61)
    - locked <0x00000007c07877f0> (a java.util.ArrayList)

"Worker-0" #24 prio=5 os_prio=31 cpu=2293.69ms elapsed=21.39s tid=0x00007fbe6ae59800 nid=0xbb03 in Object.wait()  [0x00007000062d1000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:200)
    - locked <0x00000007c06f9bd0> (a org.eclipse.core.internal.jobs.WorkerPool)
    at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:242)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

"Worker-1" #25 prio=5 os_prio=31 cpu=2887.45ms elapsed=21.33s tid=0x00007fbe6bc58000 nid=0xbc03 in Object.wait()  [0x00007000063d4000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:200)
    - locked <0x00000007c06f9bd0> (a org.eclipse.core.internal.jobs.WorkerPool)
    at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:242)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

"Java indexing" #26 daemon prio=4 os_prio=31 cpu=4676.27ms elapsed=20.66s tid=0x00007fbe6a754800 nid=0xa207 in Object.wait()  [0x0000700005583000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at java.lang.Object.wait(java.base@14/Object.java:321)
    at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:378)
    - locked <0x00000007c05d3418> (a org.eclipse.jdt.internal.core.search.indexing.IndexManager)
    at java.lang.Thread.run(java.base@14/Thread.java:832)

"C2 CompilerThread1" #7 daemon prio=9 os_prio=31 cpu=7756.58ms elapsed=20.41s tid=0x00007fbe6b53e800 nid=0x14303 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"Worker-2" #27 prio=5 os_prio=31 cpu=275.63ms elapsed=20.21s tid=0x00007fbe6a761000 nid=0xbf03 in Object.wait()  [0x00007000065da000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:200)
    - locked <0x00000007c06f9bd0> (a org.eclipse.core.internal.jobs.WorkerPool)
    at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:242)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

"Bundle File Closer" #28 daemon prio=5 os_prio=31 cpu=4.13ms elapsed=20.18s tid=0x00007fbe6ae7b000 nid=0x14003 in Object.wait()  [0x00007000066dd000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at java.lang.Object.wait(java.base@14/Object.java:321)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)
    - locked <0x00000007c0a29e68> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:341)

"pool-2-thread-1" #30 prio=5 os_prio=31 cpu=0.48ms elapsed=16.60s tid=0x00007fbe6ba2f000 nid=0x6507 waiting on condition  [0x00007000067e0000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at jdk.internal.misc.Unsafe.park(java.base@14/Native Method)
    - parking to wait for  <0x00000007c10a5028> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(java.base@14/LockSupport.java:252)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@14/AbstractQueuedSynchronizer.java:1661)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@14/ScheduledThreadPoolExecutor.java:1182)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@14/ScheduledThreadPoolExecutor.java:899)
    at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@14/ThreadPoolExecutor.java:1056)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@14/ThreadPoolExecutor.java:1116)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@14/ThreadPoolExecutor.java:630)
    at java.lang.Thread.run(java.base@14/Thread.java:832)

"pool-1-thread-1" #31 prio=5 os_prio=31 cpu=73.36ms elapsed=16.32s tid=0x00007fbe6bbc0000 nid=0x13f03 runnable  [0x00007000068e3000]
   java.lang.Thread.State: RUNNABLE
    at java.io.FileInputStream.readBytes(java.base@14/Native Method)
    at java.io.FileInputStream.read(java.base@14/FileInputStream.java:272)
    at java.io.BufferedInputStream.fill(java.base@14/BufferedInputStream.java:244)
    at java.io.BufferedInputStream.read(java.base@14/BufferedInputStream.java:263)
    - locked <0x00000007c00bf5d8> (a java.io.BufferedInputStream)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:79)
    at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
    at java.util.concurrent.Executors$RunnableAdapter.call(java.base@14/Executors.java:515)
    at java.util.concurrent.FutureTask.run(java.base@14/FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@14/ThreadPoolExecutor.java:1130)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@14/ThreadPoolExecutor.java:630)
    at java.lang.Thread.run(java.base@14/Thread.java:832)

"Worker-3" #32 prio=5 os_prio=31 cpu=316.10ms elapsed=16.16s tid=0x00007fbe6ba34000 nid=0x13e03 in Object.wait()  [0x00007000069e6000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:200)
    - locked <0x00000007c06f9bd0> (a org.eclipse.core.internal.jobs.WorkerPool)
    at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:242)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

"Worker-4" #33 prio=5 os_prio=31 cpu=54.58ms elapsed=13.99s tid=0x00007fbe6d828800 nid=0xc503 in Object.wait()  [0x0000700006ae9000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(java.base@14/Native Method)
    - waiting on <no object reference available>
    at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:200)
    - locked <0x00000007c06f9bd0> (a org.eclipse.core.internal.jobs.WorkerPool)
    at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:242)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

"Attach Listener" #36 daemon prio=9 os_prio=31 cpu=0.81ms elapsed=0.11s tid=0x00007fbe6bd80000 nid=0x840f waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"VM Thread" os_prio=31 cpu=534.10ms elapsed=26.29s tid=0x00007fbe6a023800 nid=0x3003 runnable

"GC Thread#0" os_prio=31 cpu=483.20ms elapsed=26.29s tid=0x00007fbe6a00a000 nid=0x4e03 runnable

"GC Thread#1" os_prio=31 cpu=463.70ms elapsed=23.71s tid=0x00007fbe6a8d7800 nid=0x9503 runnable

"GC Thread#2" os_prio=31 cpu=447.85ms elapsed=21.99s tid=0x00007fbe6a6d1800 nid=0xb53b runnable

"GC Thread#3" os_prio=31 cpu=455.43ms elapsed=21.99s tid=0x00007fbe6bc2e000 nid=0x14607 runnable

"VM Periodic Task Thread" os_prio=31 cpu=15.24ms elapsed=24.43s tid=0x00007fbe6a51b000 nid=0x9903 waiting on condition

JNI global refs: 31, weak refs: 3

We need to check if this is also an issue in upstream Eclipse. If it's Equinox related, we'll definitely need an upstream fix

alblue commented 4 years ago

So the commands seem to work as expected for launching the JVM and it isn't hung.

The only thing I can find is when starting the JVM it prints out text message on startup, whereas without it the text remains silent. Could this be a parsing issue with whatever is calling or talking to it over SIGPIPE, or is there another mechanism by which it punts messages back and forth?

 /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dfile.encoding=utf8 -XX:StartFlightRecording=settings=default,filename=/tmp,name=foo -Xmx1g -Xms512m -noverify -jar /Users/alex/.vscode/extensions/redhat.java-0.60.0/server/plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar -configuration "/Users/alex/Library/Application Support/Code/User/globalStorage/redhat.java/0.60.0/config_mac" -data "/Users/alex/Library/Application Support/Code/User/workspaceStorage/5db913778c56f1e3d1e4be3481321392/redhat.java/jdt_ws"
Started recording 1. No limit specified, using maxsize=250MB as default.

Use jcmd 2396 JFR.dump name=foo to copy recording data to file.

If I don't start flight recorder:

/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dfile.encoding=utf8 -Xmx1g -Xms512m -noverify -jar /Users/alex/.vscode/extensions/redhat.java-0.60.0/server/plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar -configuration "/Users/alex/Library/Application Support/Code/User/globalStorage/redhat.java/0.60.0/config_mac" -data "/Users/alex/Library/Application Support/Code/User/workspaceStorage/5db913778c56f1e3d1e4be3481321392/redhat.java/jdt_ws" 

If the stdout of the process is being read, could that affect the way in which the language server operates?

alblue commented 4 years ago

See also https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8244190