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

GH2577: Add '-Xlog:jni+resolve=off' to the default vmargs #2646

Merged
merged 2 commits into from
Aug 26, 2022

Conversation

testforstephen
Copy link
Collaborator

Signed-off-by: Jinbo Wang [email protected]

Mitigate the issue #2577 (comment). The parameter -Xlog:jni+resolve=off is used to prevent some unexpected jni logs from being logged to stdout, because Java language server uses stdio as the jsonrpc channel by default.

@fbricon
Copy link
Collaborator

fbricon commented Aug 25, 2022

I think you should also add it dynamically if necessary (like we do for logging or jpms modules), in case user already uses custom VM args.

@testforstephen
Copy link
Collaborator Author

I think you should also add it dynamically if necessary (like we do for logging or jpms modules), in case user already uses custom VM args.

done.

Copy link
Member

@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.

Looks fine to me. I did some quick research and noticed there's -Xlog:disable also. If the language server is communicating via std streams, there's probably a good argument to make for disabling logging completelyin the JVM when the client/server are using the standard streams, but maybe we can investigate that after.

It would be interesting to know if there's older issues with similar failure.

@rgrunber rgrunber merged commit e53156d into redhat-developer:master Aug 26, 2022
@testforstephen testforstephen deleted the jinbo_vmargs branch August 27, 2022 08:07
datho7561 pushed a commit to FieteO/vscode-java that referenced this pull request Sep 2, 2022
…eloper#2646)

* Add '-Xlog:jni+resolve' to vmargs dynamically

Signed-off-by: Jinbo Wang <[email protected]>
gayanper pushed a commit to gayanper/vscode-java that referenced this pull request Sep 8, 2022
…eloper#2646)

* Add '-Xlog:jni+resolve' to vmargs dynamically

Signed-off-by: Jinbo Wang <[email protected]>
@Aankhen
Copy link

Aankhen commented Oct 23, 2022

Looks fine to me. I did some quick research and noticed there's -Xlog:disable also.

Just wanted to note that this fixed the issue for me (Windows 10, VS Code 1.72.2, Java 17) when the other version didn’t.

@rgrunber
Copy link
Member

Looks fine to me. I did some quick research and noticed there's -Xlog:disable also.

Just wanted to note that this fixed the issue for me (Windows 10, VS Code 1.72.2, Java 17) when the other version didn’t.

This should be the default now. After discovering other issues that seemed very related to this, I thought there might be other JVM components that use the logging facility, so best to disable it entirely ( #2690 )

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.

Extension never activates, throwing error "Header must provide a Content-Length property"
4 participants