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

High CPU usage and memory consumption even if doing nothing #3196

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented Jun 17, 2024

@snjeza
Copy link
Contributor Author

snjeza commented Jun 17, 2024

test this please

Copy link
Contributor

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It definitely seems to be consistently halting the build after about 6 or so build jobs (for openjdk/ , do you know why there's multiple?)

I'm seeing now in the logs :

!ENTRY org.eclipse.jdt.apt.pluggable.core 4 1 2024-06-18 15:45:20.369
!MESSAGE Exception thrown by Java annotation processor org.netbeans.modules.openide.util.ServiceProviderProcessor@4ca43248
!STACK 0
java.lang.Exception: java.lang.IllegalArgumentException: Unsupported location: SOURCE_PATH
	at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:171)
	at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:123)
	at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:172)
	at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134)
	at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:952)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:449)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:425)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:410)
	at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:211)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:341)
	at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:79)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:286)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:192)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1077)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:296)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:352)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:441)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:444)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:555)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:503)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:585)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:207)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:300)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.IllegalArgumentException: Unsupported location: SOURCE_PATH
	at org.eclipse.jdt.internal.apt.pluggable.core.filer.IdeFilerImpl.getFileFromOutputLocation(IdeFilerImpl.java:236)
	at org.eclipse.jdt.internal.apt.pluggable.core.filer.IdeFilerImpl.getResource(IdeFilerImpl.java:204)
	at org.openide.util.lookup.implspi.AbstractServiceProviderProcessor.registerImpl(AbstractServiceProviderProcessor.java:199)
	at org.openide.util.lookup.implspi.AbstractServiceProviderProcessor.register(AbstractServiceProviderProcessor.java:159)
	at org.netbeans.modules.openide.util.ServiceProviderProcessor.register(ServiceProviderProcessor.java:81)
	at org.netbeans.modules.openide.util.ServiceProviderProcessor.handleProcess(ServiceProviderProcessor.java:61)
	at org.openide.util.lookup.implspi.AbstractServiceProviderProcessor.process(AbstractServiceProviderProcessor.java:103)
	at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:141)
	... 25 more

With that said this seems to improve things. I would just rename the commit message to something like :

"Ensure every null analysis annotation has a value defined when enabled."

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
@snjeza
Copy link
Contributor Author

snjeza commented Jun 18, 2024

With that said this seems to improve things. I would just rename the commit message to something like :
"Ensure every null analysis annotation has a value defined when enabled."

I have renamed it.

@snjeza
Copy link
Contributor Author

snjeza commented Jun 19, 2024

It definitely seems to be consistently halting the build after about 6 or so build jobs (for openjdk/ , do you know why there's multiple?)

JDT will start the build job again and again, forever.

cpu

You can try to set a breakpoint at

This PR fixes the issue.

@rgrunber rgrunber merged commit 8d06711 into eclipse-jdtls:master Jun 19, 2024
7 checks passed
@rgrunber
Copy link
Contributor

rgrunber commented Jun 19, 2024

Yes, it builds forever without your change, but with it, there are still some build jobs that run according to the server status bar. It looks like :

cfbc2da3 Importing Maven project(s) [Done]
14f9b052 Synchronizing projects [Done]
63eec92a LookupJDKToolchainsJob [Done]
7da408a1 Synchronizing projects [Done]
39f42377 Validate documents [Done]
c8fa0941 Publish Diagnostics [Done]
2b3080a9 Building [Done]
8d3a0eaf Building [Done]
9b36ec88 Building [Done]
30a495ff Building [Done]
c545e4e9 Building [Done]
ee516b47 Building [Done]
0fe881a2 Building [Done]
bad6de7f Building [Done]
f4c4fcd1 Building [Done]
f2938d1b Building [Done]

It does in fact stop there. Just wondering why there are that many.

@snjeza
Copy link
Contributor Author

snjeza commented Jun 19, 2024

I'm seeing now in the logs :

I have seen it, too, when setting "java.compile.nullAnalysis.mode": "disabled".
It is another issue. org.netbeans.modules.openide.util.ServiceProviderProcessor throws this exception. It doesn't cause a high CPU usage.

@snjeza
Copy link
Contributor Author

snjeza commented Jun 19, 2024

there are still some build jobs that run according to the server status bar...
It does in fact stop there. Just wondering why there are that many.

Eclipse platform starts the build job for different events mostly when a watched file changes.
An annotation processor probably causes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

High CPU usage and memory consumption even if doing nothing
2 participants