Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LemMinX loading local artifacts doesn't seem to finish and makes whole of Eclipse a bitlaggy #517

Open
mbrandl87 opened this issue Oct 6, 2023 · 14 comments

Comments

@mbrandl87
Copy link

Hi there,

since I updated Eclipse to 23-09 this task seems to run all the time and never getting through.
In Progress it states LemMinX - loading local artifacts from , 170k of 200k...
Which in turn is strange as well, the folder doesn't even have 200k files :)
It started shortly after I first opened a pom.xml. When I interrupt it from progress view, it comes up again in the next pom.

This constantly consumes ~10% of CPU. Its Running since 5 hours now and the numbers don't move.

Is there anything I can check or some way to speed it up? :)

Best
Martin

@angelozerr
Copy link
Contributor

When I interrupt it from progress view, it comes up again in the next pom.

Interrupt doesn't interrupt the job, see issue eclipse/lsp4e#742

In Progress it states LemMinX - loading local artifacts from , 170k of 200k...
Which in turn is strange as well, the folder doesn't even have 200k files :)

Have you this problem with another local repo?

@mbrandl87
Copy link
Author

I'm only using one maven local repo folder so far, lets see what happens when I try a fresh one.

@mbrandl87
Copy link
Author

It looks like that somehow did the trick. I Just opened the pom again and this time the scan showed up for some seconds and then disappeared. But is this just a matter of size? The original had about 57k files with ~15 gb. The new one is just at ~2 gb sofar.
I noted that this thime the .lemminx-maven also contains a part of the repository - why does it download the artifacts to two places now? With the old repo this folder just contained lifecycle-mapping-1.0.0.jar.lastUpdated with the corresponding parrent folder structure as if it got stuck there.

@angelozerr
Copy link
Contributor

I noted that this thime the .lemminx-maven also contains a part of the repository - why does it download the artifacts to two places now?

It is to avoid polluating your real local repository when you are typing, see #213 (comment)

@mbrandl87
Copy link
Author

Ah I see. Seems fine now. Do you have an idea how I could track down what in the repo caused the problem? Otherwise I have to keep a copy of the old one, because some artifacts can't be retrieved automatically., e.g. eclipse factory path entries.

@angelozerr
Copy link
Contributor

Do you have an idea how I could track down what in the repo caused the problem?

no sorry -( If you can investigate which artifactic provide this issue, it should be really nice. Thanks!

@markuswernig
Copy link

Sorry for reviving this thread ...

The issue still persists and it makes Eclipse almost unusable now... The org.eclipse.lemminx.XMLServerLauncher process that gets started when a pom.xml is opened, uses 100% of one CPU, and it never stops. The fan on my laptop is spinning at max all the time.

I did an strace -f -p {pid of XMLServerLauncher process}, and found that is is constantly scanning my home directory. Scanning means opening every single file with statx(...), then closing it. Doing so, it appears it blindly follows symlinks, regardless of where they point. If they point to directories, those directories get scanned as well.

In the case where symlinks point out of my home directory (more precisely to "/"), that leads to a circular read loop.
Imagine this layout

/
/var/
/usr/
/home/
/home/user
/home/user/a_symlink_to_root -> /
/home/user/regular_file

Now XMLServerLauncher scans /home/user, finds /home/user/a_symlink_to_root and starts scanning /, until it finds /home/user again and in it /home/user/a_symlink_to_root, starts scanning / again, and so on and so forth in all eternity.
It actually never reaches /home/user/regular_file, btw.

The progress bar stays at LemMinX: (90%), with the text "Loading local artifacts from ""...: Scanning folder ".mypaint" (1915 / 2127)...

If I close the pom, the XMLServerLauncher process eventually stops (after some minutes).

The next time I open a pom again, it all starts over, againg hanging at 90%.
If I remove the ".mypaint" folder, it will display another folder name and other numbers, still hanging at 90%.

The OS (Linux in this case) does eventually (after ~10 min) cancel the statx() calls with "Too many levels of symbolic links" errors, but that does not stop the XMLServerLauncher from continuing. It seems to just go up one level and continue from there, always running into the same dead end.

Not sure how to implement this, but I think there needs to be a protection against circular reads.

@fbricon
Copy link
Contributor

fbricon commented Mar 7, 2024

can you report the result of jstack <lemminx-PID>?

@markuswernig
Copy link

jstack 10646
2024-03-07 15:35:24
Full thread dump OpenJDK 64-Bit Server VM (21.0.2+13-LTS mixed mode):

Threads class SMR info:
_java_thread_list=0x00007f7a8402fd80, length=25, elements={
0x00007f7b0421cc40, 0x00007f7b0421de10, 0x00007f7b04228830, 0x00007f7b04229da0,
0x00007f7b0422b340, 0x00007f7b04220420, 0x00007f7b04221a90, 0x00007f7b042c5cf0,
0x00007f7b042ca880, 0x00007f7b045d4c50, 0x00007f7b0466b040, 0x00007f7b04029920,
0x00007f7a8805a830, 0x00007f7a88076830, 0x00007f7a88086f40, 0x00007f7a88088950,
0x00007f7a88089f70, 0x00007f7a8808b390, 0x00007f7a88169ce0, 0x00007f7a60000ff0,
0x00007f7a645e0600, 0x00007f7a646a1260, 0x00007f7a646aace0, 0x00007f7ac0000ff0,
0x00007f7a8402f050
}

"Reference Handler" #9 [10658] daemon prio=10 os_prio=0 cpu=2.48ms elapsed=110.11s tid=0x00007f7b0421cc40 nid=10658 waiting on condition [0x00007f7aec231000]
java.lang.Thread.State: RUNNABLE
at java.lang.ref.Reference.waitForReferencePendingList([email protected]/Native Method)
at java.lang.ref.Reference.processPendingReferences([email protected]/Reference.java:246)
at java.lang.ref.Reference$ReferenceHandler.run([email protected]/Reference.java:208)

"Finalizer" #10 [10659] daemon prio=8 os_prio=0 cpu=0.45ms elapsed=110.11s tid=0x00007f7b0421de10 nid=10659 in Object.wait() [0x00007f7aec131000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait0([email protected]/Native Method)
- waiting on <0x0000000709c00078> (a java.lang.ref.NativeReferenceQueue$Lock)
at java.lang.Object.wait([email protected]/Object.java:366)
at java.lang.Object.wait([email protected]/Object.java:339)
at java.lang.ref.NativeReferenceQueue.await([email protected]/NativeReferenceQueue.java:48)
at java.lang.ref.ReferenceQueue.remove0([email protected]/ReferenceQueue.java:158)
at java.lang.ref.NativeReferenceQueue.remove([email protected]/NativeReferenceQueue.java:89)
- locked <0x0000000709c00078> (a java.lang.ref.NativeReferenceQueue$Lock)
at java.lang.ref.Finalizer$FinalizerThread.run([email protected]/Finalizer.java:173)

"Signal Dispatcher" #11 [10660] daemon prio=9 os_prio=0 cpu=0.26ms elapsed=110.11s tid=0x00007f7b04228830 nid=10660 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Service Thread" #12 [10661] daemon prio=9 os_prio=0 cpu=6.27ms elapsed=110.11s tid=0x00007f7b04229da0 nid=10661 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Monitor Deflation Thread" #13 [10662] daemon prio=9 os_prio=0 cpu=6.54ms elapsed=110.11s tid=0x00007f7b0422b340 nid=10662 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #14 [10663] daemon prio=9 os_prio=0 cpu=2009.49ms elapsed=110.11s tid=0x00007f7b04220420 nid=10663 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
No compile task

"C1 CompilerThread0" #17 [10664] daemon prio=9 os_prio=0 cpu=1426.44ms elapsed=110.11s tid=0x00007f7b04221a90 nid=10664 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
No compile task

"Notification Thread" #18 [10665] daemon prio=9 os_prio=0 cpu=0.15ms elapsed=110.08s tid=0x00007f7b042c5cf0 nid=10665 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Common-Cleaner" #19 [10666] daemon prio=8 os_prio=0 cpu=2.38ms elapsed=110.07s tid=0x00007f7b042ca880 nid=10666 waiting on condition [0x00007f7add626000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x0000000709c10a98> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos([email protected]/LockSupport.java:269)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await([email protected]/AbstractQueuedSynchronizer.java:1847)
at java.lang.ref.ReferenceQueue.await([email protected]/ReferenceQueue.java:71)
at java.lang.ref.ReferenceQueue.remove0([email protected]/ReferenceQueue.java:143)
at java.lang.ref.ReferenceQueue.remove([email protected]/ReferenceQueue.java:218)
at jdk.internal.ref.CleanerImpl.run([email protected]/CleanerImpl.java:140)
at java.lang.Thread.runWith([email protected]/Thread.java:1596)
at java.lang.Thread.run([email protected]/Thread.java:1583)
at jdk.internal.misc.InnocuousThread.run([email protected]/InnocuousThread.java:186)

"pool-4-thread-1" #25 [10673] prio=5 os_prio=0 cpu=10.06ms elapsed=109.65s tid=0x00007f7b045d4c50 nid=10673 waiting on condition [0x00007f7adceec000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x0000000709c044b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos([email protected]/LockSupport.java:269)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos([email protected]/AbstractQueuedSynchronizer.java:1758)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take([email protected]/ScheduledThreadPoolExecutor.java:1182)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take([email protected]/ScheduledThreadPoolExecutor.java:899)
at java.util.concurrent.ThreadPoolExecutor.getTask([email protected]/ThreadPoolExecutor.java:1070)
at java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1130)
at java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:642)
at java.lang.Thread.runWith([email protected]/Thread.java:1596)
at java.lang.Thread.run([email protected]/Thread.java:1583)

"pool-5-thread-1" #26 [10676] prio=5 os_prio=0 cpu=406.77ms elapsed=109.46s tid=0x00007f7b0466b040 nid=10676 runnable [0x00007f7adcdec000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes([email protected]/Native Method)
at java.io.FileInputStream.read([email protected]/FileInputStream.java:287)
at java.io.BufferedInputStream.fill([email protected]/BufferedInputStream.java:291)
at java.io.BufferedInputStream.implRead([email protected]/BufferedInputStream.java:325)
at java.io.BufferedInputStream.read([email protected]/BufferedInputStream.java:312)
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([email protected]/Executors.java:572)
at java.util.concurrent.FutureTask.run([email protected]/FutureTask.java:317)
at java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1144)
at java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:642)
at java.lang.Thread.runWith([email protected]/Thread.java:1596)
at java.lang.Thread.run([email protected]/Thread.java:1583)

"DestroyJavaVM" #27 [10648] prio=5 os_prio=0 cpu=686.24ms elapsed=109.46s tid=0x00007f7b04029920 nid=10648 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"pool-6-thread-1" #30 [10684] prio=5 os_prio=0 cpu=0.23ms elapsed=109.23s tid=0x00007f7a8805a830 nid=10684 waiting on condition [0x00007f7adcaea000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x0000000709c086e8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos([email protected]/LockSupport.java:269)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos([email protected]/AbstractQueuedSynchronizer.java:1758)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take([email protected]/ScheduledThreadPoolExecutor.java:1182)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take([email protected]/ScheduledThreadPoolExecutor.java:899)
at java.util.concurrent.ThreadPoolExecutor.getTask([email protected]/ThreadPoolExecutor.java:1070)
at java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1130)
at java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:642)
at java.lang.Thread.runWith([email protected]/Thread.java:1596)
at java.lang.Thread.run([email protected]/Thread.java:1583)

"ForkJoinPool.commonPool-worker-1" #31 [10685] daemon prio=5 os_prio=0 cpu=106082.10ms elapsed=109.22s tid=0x00007f7a88076830 nid=10685 runnable [0x00007f7adc9e4000]
java.lang.Thread.State: RUNNABLE
at sun.nio.fs.UnixNativeDispatcher.stat0([email protected]/Native Method)
at sun.nio.fs.UnixNativeDispatcher.stat2([email protected]/UnixNativeDispatcher.java:335)
at sun.nio.fs.UnixFileAttributes.getIfExists([email protected]/UnixFileAttributes.java:86)
at sun.nio.fs.UnixFileSystemProvider.readAttributesIfExists([email protected]/UnixFileSystemProvider.java:185)
at java.nio.file.Files.isDirectory([email protected]/Files.java:2319)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.getSubDirectories(LocalRepositorySearcher.java:297)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:223)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.doUpdate(LocalRepositorySearcher.java:119)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.lambda$getArtifacts$0(LocalRepositorySearcher.java:91)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache$$Lambda/0x00000008003ab5f8.apply(Unknown Source)
at java.util.concurrent.CompletableFuture$UniApply.tryFire([email protected]/CompletableFuture.java:646)
at java.util.concurrent.CompletableFuture$Completion.exec([email protected]/CompletableFuture.java:483)
at java.util.concurrent.ForkJoinTask.doExec([email protected]/ForkJoinTask.java:387)
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec([email protected]/ForkJoinPool.java:1312)
at java.util.concurrent.ForkJoinPool.scan([email protected]/ForkJoinPool.java:1843)
at java.util.concurrent.ForkJoinPool.runWorker([email protected]/ForkJoinPool.java:1808)
at java.util.concurrent.ForkJoinWorkerThread.run([email protected]/ForkJoinWorkerThread.java:188)

"ForkJoinPool.commonPool-worker-2" #32 [10686] daemon prio=5 os_prio=0 cpu=99.24ms elapsed=109.22s tid=0x00007f7a88086f40 nid=10686 waiting on condition [0x00007f7adc8ea000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x0000000709c048f0> (a java.util.concurrent.ForkJoinPool)
at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:371)
at java.util.concurrent.ForkJoinPool.awaitWork([email protected]/ForkJoinPool.java:1893)
at java.util.concurrent.ForkJoinPool.runWorker([email protected]/ForkJoinPool.java:1809)
at java.util.concurrent.ForkJoinWorkerThread.run([email protected]/ForkJoinWorkerThread.java:188)

"ForkJoinPool.commonPool-worker-3" #33 [10687] daemon prio=5 os_prio=0 cpu=7.35ms elapsed=109.21s tid=0x00007f7a88088950 nid=10687 waiting on condition [0x00007f7adc7ea000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x0000000709c048f0> (a java.util.concurrent.ForkJoinPool)
at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:371)
at java.util.concurrent.ForkJoinPool.awaitWork([email protected]/ForkJoinPool.java:1893)
at java.util.concurrent.ForkJoinPool.runWorker([email protected]/ForkJoinPool.java:1809)
at java.util.concurrent.ForkJoinWorkerThread.run([email protected]/ForkJoinWorkerThread.java:188)

"ForkJoinPool.commonPool-worker-4" #34 [10688] daemon prio=5 os_prio=0 cpu=1318.73ms elapsed=109.21s tid=0x00007f7a88089f70 nid=10688 waiting on condition [0x00007f7adc6ea000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x0000000709c048f0> (a java.util.concurrent.ForkJoinPool)
at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:371)
at java.util.concurrent.ForkJoinPool.awaitWork([email protected]/ForkJoinPool.java:1893)
at java.util.concurrent.ForkJoinPool.runWorker([email protected]/ForkJoinPool.java:1809)
at java.util.concurrent.ForkJoinWorkerThread.run([email protected]/ForkJoinWorkerThread.java:188)

"ForkJoinPool.commonPool-worker-5" #35 [10689] daemon prio=5 os_prio=0 cpu=4.39ms elapsed=109.21s tid=0x00007f7a8808b390 nid=10689 waiting on condition [0x00007f7adc5ea000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x0000000709c048f0> (a java.util.concurrent.ForkJoinPool)
at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:371)
at java.util.concurrent.ForkJoinPool.awaitWork([email protected]/ForkJoinPool.java:1893)
at java.util.concurrent.ForkJoinPool.runWorker([email protected]/ForkJoinPool.java:1809)
at java.util.concurrent.ForkJoinWorkerThread.run([email protected]/ForkJoinWorkerThread.java:188)

"ForkJoinPool.commonPool-worker-6" #37 [10691] daemon prio=5 os_prio=0 cpu=0.80ms elapsed=109.03s tid=0x00007f7a88169ce0 nid=10691 waiting on condition [0x00007f7adc3e9000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x0000000709c048f0> (a java.util.concurrent.ForkJoinPool)
at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:371)
at java.util.concurrent.ForkJoinPool.awaitWork([email protected]/ForkJoinPool.java:1893)
at java.util.concurrent.ForkJoinPool.runWorker([email protected]/ForkJoinPool.java:1809)
at java.util.concurrent.ForkJoinWorkerThread.run([email protected]/ForkJoinWorkerThread.java:188)

"ForkJoinPool.commonPool-worker-7" #38 [10692] daemon prio=5 os_prio=0 cpu=0.27ms elapsed=109.03s tid=0x00007f7a60000ff0 nid=10692 waiting on condition [0x00007f7adc2e9000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x0000000709c048f0> (a java.util.concurrent.ForkJoinPool)
at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:371)
at java.util.concurrent.ForkJoinPool.awaitWork([email protected]/ForkJoinPool.java:1893)
at java.util.concurrent.ForkJoinPool.runWorker([email protected]/ForkJoinPool.java:1809)
at java.util.concurrent.ForkJoinWorkerThread.run([email protected]/ForkJoinWorkerThread.java:188)

"Thread-0" #40 [10698] daemon prio=5 os_prio=0 cpu=0.40ms elapsed=107.99s tid=0x00007f7a645e0600 nid=10698 waiting on condition [0x00007f7a53ffe000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep0([email protected]/Native Method)
at java.lang.Thread.sleep([email protected]/Thread.java:509)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher.lambda$new$0(LocalRepositorySearcher.java:317)
at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$$Lambda/0x00000008003ab838.run(Unknown Source)
at java.lang.Thread.runWith([email protected]/Thread.java:1596)
at java.lang.Thread.run([email protected]/Thread.java:1583)

"HttpClient-1-SelectorManager" #41 [10699] daemon prio=5 os_prio=0 cpu=3.73ms elapsed=107.73s tid=0x00007f7a646a1260 nid=10699 runnable [0x00007f7a53efe000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPoll.wait([email protected]/Native Method)
at sun.nio.ch.EPollSelectorImpl.doSelect([email protected]/EPollSelectorImpl.java:121)
at sun.nio.ch.SelectorImpl.lockAndDoSelect([email protected]/SelectorImpl.java:130)
- locked <0x00000007093f06e0> (a sun.nio.ch.Util$2)
- locked <0x00000007093f0690> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select([email protected]/SelectorImpl.java:142)
at jdk.internal.net.http.HttpClientImpl$SelectorManager.run([email protected]/HttpClientImpl.java:1366)

"pool-7-thread-1" #42 [10700] prio=5 os_prio=0 cpu=7.91ms elapsed=107.70s tid=0x00007f7a646aace0 nid=10700 waiting on condition [0x00007f7a53dfe000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x000000070a0866c8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:371)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block([email protected]/AbstractQueuedSynchronizer.java:519)
at java.util.concurrent.ForkJoinPool.unmanagedBlock([email protected]/ForkJoinPool.java:3780)
at java.util.concurrent.ForkJoinPool.managedBlock([email protected]/ForkJoinPool.java:3725)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await([email protected]/AbstractQueuedSynchronizer.java:1707)
at java.util.concurrent.PriorityBlockingQueue.take([email protected]/PriorityBlockingQueue.java:535)
at java.util.concurrent.ThreadPoolExecutor.getTask([email protected]/ThreadPoolExecutor.java:1070)
at java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1130)
at java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:642)
at java.lang.Thread.runWith([email protected]/Thread.java:1596)
at java.lang.Thread.run([email protected]/Thread.java:1583)

"Attach Listener" #45 [10748] daemon prio=9 os_prio=0 cpu=0.37ms elapsed=70.34s tid=0x00007f7ac0000ff0 nid=10748 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"process reaper" #46 [10750] daemon prio=10 os_prio=0 cpu=2.65ms elapsed=69.64s tid=0x00007f7a8402f050 nid=10750 waiting on condition [0x00007f7add426000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x000000070a9cee90> (a java.util.concurrent.SynchronousQueue$Transferer)
at java.util.concurrent.locks.LockSupport.parkNanos([email protected]/LockSupport.java:410)
at java.util.concurrent.LinkedTransferQueue$DualNode.await([email protected]/LinkedTransferQueue.java:452)
at java.util.concurrent.SynchronousQueue$Transferer.xferLifo([email protected]/SynchronousQueue.java:194)
at java.util.concurrent.SynchronousQueue.xfer([email protected]/SynchronousQueue.java:233)
at java.util.concurrent.SynchronousQueue.poll([email protected]/SynchronousQueue.java:336)
at java.util.concurrent.ThreadPoolExecutor.getTask([email protected]/ThreadPoolExecutor.java:1069)
at java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1130)
at java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:642)
at java.lang.Thread.runWith([email protected]/Thread.java:1596)
at java.lang.Thread.run([email protected]/Thread.java:1583)
at jdk.internal.misc.InnocuousThread.run([email protected]/InnocuousThread.java:186)

"VM Thread" os_prio=0 cpu=148.44ms elapsed=110.13s tid=0x00007f7b0418f300 nid=10656 runnable

"GC Thread#0" os_prio=0 cpu=212.77ms elapsed=110.16s tid=0x00007f7b040915d0 nid=10650 runnable

"GC Thread#1" os_prio=0 cpu=206.49ms elapsed=109.77s tid=0x00007f7ac4007a70 nid=10669 runnable

"GC Thread#2" os_prio=0 cpu=212.41ms elapsed=109.77s tid=0x00007f7ac4008550 nid=10670 runnable

"GC Thread#3" os_prio=0 cpu=215.82ms elapsed=109.77s tid=0x00007f7ac4009030 nid=10671 runnable

"GC Thread#4" os_prio=0 cpu=208.03ms elapsed=109.77s tid=0x00007f7ac4009b10 nid=10672 runnable

"GC Thread#5" os_prio=0 cpu=207.48ms elapsed=109.36s tid=0x00007f7ac40120d0 nid=10677 runnable

"GC Thread#6" os_prio=0 cpu=199.47ms elapsed=109.36s tid=0x00007f7ac4011640 nid=10678 runnable

"GC Thread#7" os_prio=0 cpu=197.33ms elapsed=109.17s tid=0x00007f7ac400b6f0 nid=10690 runnable

"G1 Main Marker" os_prio=0 cpu=13.75ms elapsed=110.16s tid=0x00007f7b040a2370 nid=10651 runnable

"G1 Conc#0" os_prio=0 cpu=1882.03ms elapsed=110.16s tid=0x00007f7b040a3310 nid=10652 runnable

"G1 Conc#1" os_prio=0 cpu=1891.23ms elapsed=108.93s tid=0x00007f7ae0000d90 nid=10695 runnable

"G1 Refine#0" os_prio=0 cpu=56.26ms elapsed=110.16s tid=0x00007f7b0412e0b0 nid=10653 runnable

"G1 Service" os_prio=0 cpu=14.75ms elapsed=110.16s tid=0x00007f7b0412f060 nid=10654 runnable

"VM Periodic Task Thread" os_prio=0 cpu=35.44ms elapsed=110.16s tid=0x00007f7b0413f000 nid=10655 waiting on condition

JNI global refs: 18, weak refs: 0

@markuswernig
Copy link

The list of "at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher$Cache.updateArtifacts(LocalRepositorySearcher.java:241)" lines under "ForkJoinPool.commonPool-worker-1" #31 [10685]
gets longer with every invocation of jstack

@markuswernig
Copy link

Definitely.

But there's also the question why lemminx would look for artifacts in my entire home directory in the first place.
As I have the habit of keeping old artifacts (and old versions of my .m2 repo) in my home directory, this could lead to some funny behaviour, don't you think?

@fbricon
Copy link
Contributor

fbricon commented Mar 7, 2024

lemminx-maven indexes your local repository so it can provide content-assist when editing <dependency> nodes in your pom.xml. I don't think it exposes any preference to disable that behavior (which would need to be surfaced in Eclipse/m2e as well).

@markuswernig
Copy link

Yes, agreed. But what is the definition of "local repository"? I'd expect it to index the repositories under ~/.m2, but not everything in my home directory. Can the scope of "local repository" be configured anywhere in Eclipse?

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

No branches or pull requests

4 participants