-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Inconsistent configuration between build time and run time initialized classes of netty #42945
Comments
/cc @Karm (mandrel), @cescoffier (netty), @franz1981 (netty), @galderz (mandrel), @jponge (netty), @radcortez (config) |
@zakkak would marking these classes as re-initialized make sense? We do not want to limit too much our ability to pre-initialize at build time, but this would be reasonable. WDYT? |
Yes, that would resolve the issue if we really want to allow runtime configuration of Netty. If instead we want to limit netty configuration at build-time then we need to find another way to make the values consistent.
It depends on what we consider reasonable. The build-time initialization of some of these classes may be resulting in optimized code generation due to better dead code elimination (e.g. whether unsafe is available or not is decided at build-time). Similarly some static initializers of these classes are not trivial so they might add a bit of overhead at startup time. The impact of the former is hard to measure without some "targeted" benchmarsk, while the latter is easier to measure. |
Yeah, that's what I'm seeing. Unfortunately, the only way to determine whether it's "reasonable" is to do it and measure. |
Describe the bug
In #37347 we marked
PlatformDependent
for runtime (re)initialization. However there are still places were the (re)initialization has no effect because of classes usingPlatformDependent
in their static initializers being build time initialized. E.g.:This results in some parts of the code assuming something is always true while others depend on runtime configuration.
Expected behavior
All places in code should follow the same assumptions.
Actual behavior
Some parts of the code assume something is always
true
(orfalse
) while others depend on runtime configuration to figure out the actual value.How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
Mandrel or GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
Detected while investigating #42903
The text was updated successfully, but these errors were encountered: