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

gdb show version times out with JDK 21+32 and latest graal/master #173

Closed
zakkak opened this issue Jul 26, 2023 · 1 comment · Fixed by #174
Closed

gdb show version times out with JDK 21+32 and latest graal/master #173

zakkak opened this issue Jul 26, 2023 · 1 comment · Fixed by #174

Comments

@zakkak
Copy link
Collaborator

zakkak commented Jul 26, 2023

CI runs fail due to show version command timing out (see #168 (comment))

Augmenting mandrel-integration-tests with #172, I see that show version takes ~15s:

show version


Command took 15001 ms

What's really interesting is that the next command which is setting a breakpoint and should be the one taking ~15s only takes 1s

b ConfigTestController.java:33


Command took 1000 ms

(gdb) Breakpoint 1 at 0x40e806: file com/example/quarkus/config/ConfigTestController.java, line 33.
@zakkak
Copy link
Collaborator Author

zakkak commented Jul 26, 2023

OK, so the 15s are actually spent in the first command gdb ./target/quarkus-runner but since the buffer matches the expected pattern before the completion of the command waitForBufferToMatch returns faster and then it appears like show version is taking these 15s.

zakkak added a commit to zakkak/mandrel-integration-tests that referenced this issue Jul 26, 2023
Instead of waiting till the gdb output matches the expected command or
timeouts, wait for the command to complete (or timeout), i.e. for the
prompt to appear. This way if a command prints the expected output but
doesn't complete, it's execution time is not being counted by the next
`waitForBufferToMatch` invocation, additionally if the command completes
but doesn't return the expected result we don't have to wait for the
timeout. Furthermore, we can enhance the logging to see if the command
timed out or completed but without matching the expected output.

To ensure the prompt appears consistently across gdb versions after
every command we use the GDB/MI mode, i.e. the "--interpreter=mi"
option.

Closes Karm#173
zakkak added a commit to zakkak/mandrel-integration-tests that referenced this issue Jul 26, 2023
Instead of waiting till the gdb output matches the expected command or
timeouts, wait for the command to complete (or timeout), i.e. for the
prompt to appear. This way if a command prints the expected output but
doesn't complete, it's execution time is not being counted by the next
`waitForBufferToMatch` invocation, additionally if the command completes
but doesn't return the expected result we don't have to wait for the
timeout. Furthermore, we can enhance the logging to see if the command
timed out or completed but without matching the expected output.

To ensure the prompt appears consistently across gdb versions after
every command we use the GDB/MI mode, i.e. the "--interpreter=mi"
option.

Closes Karm#173
@Karm Karm closed this as completed in #174 Jul 26, 2023
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.

1 participant