Karm / mandrel-integration-tests

Integration tests for GraalVM and its Mandrel distribution. Runs Quarkus, Helidon and Micronaut applications and small targeted reproducers. The focus is solely on native-image utility and compilation of Java applications into native executables.
Apache License 2.0
5 stars 3 forks source link

Switching Vert.x app to RestEasy Reactive, fails debugging session #229

Closed Karm closed 7 months ago

Karm commented 7 months ago

I have a patch that ports the Vert.x test app to contemporary Quarkus 3.x suggested API, RestEasy Reactive.

quarkus_3.x.reactive.patch.txt

It fails debugging session:

"Cannot execute this command while the selected thread is running"

[ERROR] Failures: 
[ERROR]   DebugSymbolsTest.debugSymbolsQuarkusContainer:396->carryOutGDBSession:501 There were errors in the GDB session. Note that commands in the session might depend on each other. Errors: 
Command 'bt' did not match the expected pattern in time '.*at org/acme/vertx/Fruit.java:48.*'.
Output was:
"bt
""Selected thread is running.
"^error,msg="Selected thread is running."(gdb) , 
Command 'list' did not match the expected pattern in time '.*48.*return client.query\("SELECT id, name FROM fruits ORDER BY name ASC.*'.
Output was:
"list
""1     org/graalvm/compiler/replacements/BoxingSnippets.java: No such file or directory.
"^done(gdb) , 
Command 'c&' did not match the expected pattern in time '.*Continuing.*'.
Output was:
"c&
""Cannot execute this command while the selected thread is running.
"^error,msg="Cannot execute this command while the selected thread is running."(gdb)  ==> expected: <true> but was: <false>
[INFO] 
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
Karm commented 7 months ago

Hello, @zakkak, I will use our version support in GDBSession class to create a compatible debug flow, but I wonder what would be expected here. Do I list threads and select the one that hit the breakpoint or can I tell that to gdb to do it automatically? :(

https://sourceware.org/gdb/current/onlinedocs/gdb.html/All_002dStop-Mode.html

zakkak commented 7 months ago

@Karm I am not sure I get what the issue is.

My understanding of the error you are seeing is that another comment failed earlier. We should only issue bt after we expect the app to hit a breakpoint.

If you set a breakpoint and it's reached gdb automatically selects the thread that hit the breakpoing if I am not mistaken so there is nothing special to do.

jerboaa commented 7 months ago

@Karm You can use commands gdb command to run something based on a set breakpoint number. See: https://sourceware.org/gdb/current/onlinedocs/gdb.html/Break-Commands.html