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

Reduced accuracy in source positions when debugging native executables with latest GraalVM #30772

Closed
zakkak opened this issue Feb 1, 2023 · 1 comment · Fixed by #30949
Closed
Assignees
Labels
area/native-image kind/bug Something isn't working
Milestone

Comments

@zakkak
Copy link
Contributor

zakkak commented Feb 1, 2023

Describe the bug

oracle/graal@67cc5c2 disables the TrackNodeSourcePosition flag when generating debug info (-Dquarkus.native.debug.enabled). This results in less accurate mappings of native code to source code position (see Karm/mandrel-integration-tests#131).

The change was motivated by the fact that TrackNodeSourcePosition is a global flag of the compiler and enabling it by default when generating debug info clashes with IncludeNodeSourcePosition an option used for Truffle languages.

That said, I was thinking about the following options:

  1. Explicitly enable -H:+TrackNodeSourcePosition in Quarkus since it doesn't officially support polyglot/truffle anyway. Users using these features will need to explicitly pass -H:-TrackNodeSourcePosition

  2. Accept the reduced accuracy by default and mention -H:+TrackNodeSourcePosition in Quarkus docs.

cc @galderz @geoand @gsmet

Expected behavior

Setting a breakpoint in gdb at line 71, e.g. break Main.java:71, is expected to set the breakpoint at line 71.

Actual behavior

Setting a breakpoint in gdb at line 71 results in a breakpoint at line 72.

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@zakkak zakkak added the kind/bug Something isn't working label Feb 1, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Feb 1, 2023

/cc @Karm (mandrel), @galderz (mandrel)

@zakkak zakkak self-assigned this Feb 1, 2023
zakkak added a commit to zakkak/quarkus that referenced this issue Feb 7, 2023
Instruct GraalVM / Mandrel to keep more accurate debug information about
source locations when generating debug info for debugging and monitoring
tools. This parameter may break compatibility with Truffle.  Affected
users should explicitly pass `-H:-TrackNodeSourcePosition` through
`quarkus.native.additional-build-args` to override it.

Closes: quarkusio#30772
zakkak added a commit to zakkak/quarkus that referenced this issue Feb 7, 2023
Instruct GraalVM / Mandrel to keep more accurate debug information about
source locations when generating debug info for debugging and monitoring
tools. This parameter may break compatibility with Truffle.  Affected
users should explicitly pass `-H:-TrackNodeSourcePosition` through
`quarkus.native.additional-build-args` to override it.

Closes: quarkusio#30772
@quarkus-bot quarkus-bot bot added this to the 3.0 - main milestone Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/native-image kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant