-
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
Synchronize GraalVM upstream's and Quarkus'-only debug info stripping #31258
Comments
Note that upstream GraalVM's functionality currently is inferior to the quarkus impl as the upstream version uses absolute paths for the debug link. Making it less usable (the chance of the path being the same on the build host and the debug host is pretty slim; expecially for in-container builds). I'll get an upstream GraalVM issue filed today. |
Starting with GraalVM/Mandrel 23.0, `native-image` strips debug info in a separate file by default. Quarkus already does this, so for the time being we disable GraalVM/Mandrel's splitting as in contrast to Quarkus it uses absolute paths which makes debugging harder especially for in-container builds. Fixes quarkusio#31258
Hmm, so this doesn't seem to be the case. For a simple hello-world:
Then looking at the debuglink we see it being relative:
Looks like objcopy is smart enough (and/or the man page is outdated). Either way, this is a non-issue (or at least I'm not able to reproduce). |
Starting with GraalVM/Mandrel 23.0, native-image strips debug info in a separate file by default. Fixes quarkusio#31258
For the record, I've reached out to Nick Clifton and clarified this point. It's merely an outdated code comment that the path to files need to be relative and he'll submit a patch to fix the wrong comment. Since the embedded path will only be relative it exposes an interesting problem, though. Only well-known-locations are being searched for debuginfo files. This shouldn't be a problem for our case, though, as the directory where the binary is located is one of them. |
Starting with GraalVM/Mandrel 23.0, native-image strips debug info in a separate file by default. Fixes quarkusio#31258
Describe the bug
GraalVM 23.0 will gain functionality to strip debuginfo. This is turned on by default when debuginfo generation is being turned on. As a result, quarkus applications trying to turn on debuginfo and then trying to use it in a debugger results in a CRC mismatch when loading them with gdb (for example):
This is caused by two
.gnu_debuglink
sections trying to get created. The first one by GraalVM, the second by quarkus's native image build steps. The second attempt will fail and then the debuginfo won't match the CRC.Expected behavior
Either use upstream's feature or turn it off using
-H:-StripDebugInfo
and keep using quarkus's approach.Actual behavior
Debuginfo isn't working. See:
Karm/mandrel-integration-tests#138
How to Reproduce?
Build a quarkus up in native with a GraalVM 23.0.0 snapshot build with debuginfo. Try to debug the binary in gdb. Observe the CRC warning and debuginfo not usable for source-file-based break points.
Output of
uname -a
orver
No response
Output of
java -version
17.0.7+1
GraalVM version (if different from Java)
23.0.0
Quarkus version or git rev
main
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: