-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[native-image] Finding thread started through static initializers? #432
Comments
The two parts of the error message should be interpreted like this. First the trace:
is generated during scanning of heap roots, i.e., scanning of constants. It represents a chain of concrete objects. The root of this chain is a constant embeded in the The second part
is the point in the static analysis where the error was encountered. The important bit of information there is the tip of the call path: Looking at the code for Looking in the IDE We need to work on improving the trace in such cases. Thanks for reporting. |
Ok, I understand the output a lot better now. It starts to sound like this may be tricky to work around without making changes to netty itself with regards to these static initializers - or am I getting that wrong and you can think of ways to continue? (fwiw, this happens if I add |
I haven't looked much into the static initializers in netty yet. At this point I cannot think of any quick ways to continue, it will probably require a bit more work on our side first. We are also considering the possibility to push some of the static initializers at runtime to deal with situations like this, trading some of the benefits of pre-initializing the entire heap with easing the development and incrementally refactoring libraries code. As for SSL we are still working on that, but it should be ready soon. |
Ok - thanks for the info. Let me know if there's anything I can do to help test things as you continue forward! |
The approach to static initialization has greatly evolved since this issue was reported and the error messages have improved. Please refer to this document for further details https://github.com/oracle/graal/blob/master/substratevm/CLASS-INITIALIZATION.md. |
Hi,
I'm trying to understand how I work out which static initializer leads to a thread being started as per the following error message from native-image:
I'm digging around the classes mentioned in that trace but it's not at all clear to me what static initialiser takes us down this path. How would an experienced SVM user go about this case?
Thanks!
The text was updated successfully, but these errors were encountered: