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

DebugSymbolsTest.debugSymbolsQuarkus fails with latest GraalVM master #154

Closed
jerboaa opened this issue May 8, 2023 · 5 comments · Fixed by #155
Closed

DebugSymbolsTest.debugSymbolsQuarkus fails with latest GraalVM master #154

jerboaa opened this issue May 8, 2023 · 5 comments · Fixed by #155
Assignees

Comments

@jerboaa
Copy link
Collaborator

jerboaa commented May 8, 2023

debugSymbolsSmokeGDB fails with (both with Java 17 and Java 20):

Error:  Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 724.231 s <<< FAILURE! - in org.graalvm.tests.integration.DebugSymbolsTest
Error:  debugSymbolsQuarkus{TestInfo}  Time elapsed: 543.363 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: 
There were errors in the GDB session. Note that commands in the session might depend on each other. Errors: 
Command 'b ConfigTestController.java:33' did not match the expected pattern '.*Breakpoint 1 at .*: file com/example/quarkus/config/ConfigTestController.java, line 33.*'.
Output was:
(gdb) (gdb) (gdb) GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
 ==> expected: <true> but was: <false>
	at org.graalvm.tests.integration.DebugSymbolsTest.carryOutGDBSession(DebugSymbolsTest.java:394)
	at org.graalvm.tests.integration.DebugSymbolsTest.debugSymbolsQuarkus(DebugSymbolsTest.java:219)

Error:  debugSymbolsSmokeGDB{TestInfo}  Time elapsed: 180.857 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: 
There were errors in the GDB session. Note that commands in the session might depend on each other. Errors: 
Command 'break Main.java:71' did not match the expected pattern '.*Breakpoint 2 at .*: file debug_symbols_smoke/Main.java, line 71.*'.
Output was:
(gdb) Breakpoint 2 at 0x55555569bcf0: file debug_symbols_smoke/Main.java, line 76.
, 
Command 'c' did not match the expected pattern '.*Breakpoint 3, debug_symbols_smoke.Main::main.*at debug_symbols_smoke/Main.java:76.*String l = sc.nextLine\(\);.*'.
Output was:
(gdb) Continuing.

Thread 1 "debug-symbols-s" hit Breakpoint 2, debug_symbols_smoke.Main::main(java.lang.String[]*) (args=<optimized out>) at debug_symbols_smoke/Main.java:76
76	                String l = sc.nextLine();
, 
Command 'c' did not match the expected pattern '.*Breakpoint 2, debug_symbols_smoke.Main::main.*at debug_symbols_smoke/Main.java:71.* if \(myString != null.*'.
Output was:
(gdb) Continuing.
fdc7c50f390c145bc58a0bedbe5e6d2e35177ac73d12e2b23df149ce496a5572
[Thread 0x7ffff7d68740 (LWP 9357) exited]
[Thread 0x7ffff737f640 (LWP 9358) exited]
[New process 9357]
[Inferior 1 (process 9357) exited normally]
, 
Command 'c' did not match the expected pattern '.*Breakpoint 2, debug_symbols_smoke.Main::main.*at debug_symbols_smoke/Main.java:71.* if \(myString != null.*'.
Output was:
(gdb) The program is not being run.
, 
Command 'c' did not match the expected pattern '.*fdc7c50f390c145bc58a0bedbe5e6d2e35177ac73d12e2b23df149ce496a5572.*exited normally.*'.
Output was:
(gdb) (gdb) The program is not being run.
 ==> expected: <true> but was: <false>
	at org.graalvm.tests.integration.DebugSymbolsTest.carryOutGDBSession(DebugSymbolsTest.java:394)
	at org.graalvm.tests.integration.DebugSymbolsTest.debugSymbolsSmokeGDB(DebugSymbolsTest.java:137)

Latest passing run was https://github.com/graalvm/mandrel/actions/runs/4878221407/jobs/8703969691 (4 days ago).
The github image runner in both cases is Image: ubuntu-22.04 Version: 20230426.1 indicating this is not due to a change in the github runners (e.g. gdb version)

@jerboaa
Copy link
Collaborator Author

jerboaa commented May 8, 2023

Copying from: #102 (comment)

The regression was introduced with oracle/graal#6504 and more specifically by oracle/graal@b70c640

It's also worth noting that oracle/graal@00eaa8e makes -H:-OmitInlinedMethodDebugLineInfo the default.

The above changes result in making the breakpoint appear in a different line (even with -H:+OmitInlinedMethodDebugLineInfo). Further investigation is required to see if this is an upstream issue.

@zakkak
Copy link
Collaborator

zakkak commented May 8, 2023

The regression is due to defaulting to not using SourceMappings when building the CompilationResultTree. This choice was made in order to improve build times, but as expected it comes at the cost of less accurate generated code to source mapping.

Building the native image with -H:+DebugCodeInfoUseSourceMappings brings back the old behavior.

This doesn't look like an upstream bug, but we probably want:

  1. to add this flag to Quarkus when creating debug builds.
  2. test both with and without the flag

@Karm @jerboaa thoughts?

@zakkak zakkak self-assigned this May 8, 2023
@jerboaa
Copy link
Collaborator Author

jerboaa commented May 8, 2023

Building the native image with -H:+DebugCodeInfoUseSourceMappings brings back the old behavior.

This doesn't look like an upstream bug, but we probably want:

1. to add this flag to Quarkus when creating debug builds.

That seems fine. We'll have to add to the debugtest for the non-quarkus app as well, though.

2. test both with and without the flag

Like test it as two variations of the debug info tests? Not sure if it's worth it.

zakkak added a commit to zakkak/mandrel-integration-tests that referenced this issue May 8, 2023
New defaults coming in 23.1 (and possibly 23.0?)

Closes: Karm#154
zakkak added a commit to zakkak/mandrel-integration-tests that referenced this issue May 8, 2023
New defaults coming in 23.1 (and possibly 23.0?)

Closes: Karm#154
zakkak added a commit to zakkak/mandrel-integration-tests that referenced this issue May 9, 2023
New defaults coming in 23.1 (and possibly 23.0?)

Closes: Karm#154
zakkak added a commit to zakkak/mandrel-integration-tests that referenced this issue May 9, 2023
New defaults coming in 23.1 (and possibly 23.0?)

Closes: Karm#154
zakkak added a commit to zakkak/mandrel-integration-tests that referenced this issue May 9, 2023
New defaults coming in 23.1 (and possibly 23.0?)

Closes: Karm#154
zakkak added a commit to zakkak/mandrel-integration-tests that referenced this issue May 9, 2023
New defaults coming in 23.1 (and possibly 23.0?)

Closes: Karm#154
zakkak added a commit to zakkak/mandrel-integration-tests that referenced this issue May 9, 2023
New defaults coming in 23.1 (and possibly 23.0?)

Closes: Karm#154
zakkak added a commit that referenced this issue May 9, 2023
New defaults coming in 23.1 (and possibly 23.0?)

Closes: #154
@jerboaa
Copy link
Collaborator Author

jerboaa commented May 10, 2023

Re-opening this until the quarkus fix is in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants