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

Used VM option to config vert.x deployment option, But setter invoke method is Unreachable. #5301

Open
EasonLyo opened this issue Sep 9, 2024 · 4 comments
Assignees
Labels
Milestone

Comments

@EasonLyo
Copy link

EasonLyo commented Sep 9, 2024

Questions
I used -Dvertx.deployment.options.threadingModel=VIRTUAL_THREAD to config vert.x deployment option, when i debug it, I found some code is Unreachable.

Version
4.5.9

Context
In io.vertx.core.impl.launcher.commands.BareCommand#configureFromSystemProperties method ,when the param 'prefix' value is 'vertx.deployment.options.', but log is null, thats why vertx options setter invoke not execute. after this, I found in io.vertx.core.impl.launcher.commands.BareCommand#startVertx method line 226, the code 'configureFromSystemProperties.set(null);' make log is null.

the chain is :
io.vertx.core.impl.launcher.VertxCommandLauncher#execute
io.vertx.core.impl.launcher.commands.RunCommand#run
io.vertx.core.impl.launcher.commands.BareCommand#run(java.lang.Runnable)
io.vertx.core.impl.launcher.commands.BareCommand#startVertx
and in BareCommand line 226 code 'configureFromSystemProperties.set(null);'

Do you have a reproducer?
This is easy to reproducer

Steps to reproduce
config -Dvertx.deployment.options.threadingModel=VIRTUAL_THREAD VM option
use launcher to deploy, like new Launcher().dispatch(args)
debug
reproduce
Extra
OS: Apple M1 Pro ventura 13.6
JDK: java version "21.0.4" 2024-07-16 LTS

finally, I used beforeDeployingVerticle() method in Launcher class to resolve my problem by hook deployment options, but Im still think this is a bug...

if i do it in wrong way, reply and close this issue plz.

@EasonLyo EasonLyo added the bug label Sep 9, 2024
@vietj
Copy link
Member

vietj commented Sep 9, 2024

@tsegismont
Copy link
Contributor

@EasonLyo can you please prepare a small reproducer and share it on GitHub? Thank you

@EasonLyo
Copy link
Author

EasonLyo commented Oct 8, 2024

https://github.com/EasonLyo/reproducer-vertx-core, this is a small reproducer, it have some note in class MainLaucher.

@tsegismont tsegismont self-assigned this Oct 10, 2024
@tsegismont tsegismont added this to the 4.5.11 milestone Oct 10, 2024
@tsegismont
Copy link
Contributor

Thanks, I'll take a look

@vietj vietj modified the milestones: 4.5.11, 4.5.12 Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants