-
Notifications
You must be signed in to change notification settings - Fork 153
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
Agent throws exception when uninstalling on windows #5952
Comments
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
@mauri870 does anything jump out at you in the linked stack trace, it doesn't look like a normal panic, rather some kind of execution violation considering the only error is an invalid program counter: |
There is a similar but different error in #3703 which was ultimately closed as not reproducible. That one gave us the following:
|
More occurrences: |
I was able to create an integration tests that reproduces this. The test runs install/uninstall in a loop with the Elastic Agent enrolled into Fleet each time. It normally fails on the 6th to 8th loop. I am testing against 8.16.0 release build.
|
This explains why the standalone uninstall test wasn't finding it. If we can correlate this to a specific change like the new unenrollment notification, it is acceptable to revert that as a fast work around while we work to get the actual root cause resolved. |
If we revert #5302 or just disable it by bypassing the block in elastic-agent/internal/pkg/agent/install/uninstall.go Lines 147 to 150 in 434986e
|
Having an explicit option to skip this step would have helped but it isn't implemented yet. |
I have created a PR that skips this on Windows - #6065 This doesn't actually fix the issue, as the error still happens. Its just that the error happens less likely, 10x less likely. |
Thanks, if you run 8.15 or 8.14 through the same test does it fail at the same rate? I'm wondering if the revert has put the probability back to where it was before, or if there's still something in 8.16 that makes this more likely. |
@cmacknz I will run the tests with those versions and report back. |
I did some more testing on this and I have observed the following: 8.15.0 - Ok It does seem like the I original though that |
What is interesting now is that I cannot reproduce this issue on latest main with I have re-enabled it on Windows with the tests I wrote have it up for merge. I will run it a few more times there to see if it shows up there - #6257 |
For confirmed bugs, please report:
Install and enroll an agent, then uninstall the agent.
On windows, intermittently elastic-agent will throw an exception when uninstalling. Logs in https://gist.github.com/Trinity2019/adddeec9a5ea7314e34c7d443a6bdc2f
The text was updated successfully, but these errors were encountered: