elastic / elastic/elastic-agent-libs

Improper shutdown on Windows causing issues with integrations

Open
#85 0 comments 0 reactions 1 assignee Claimed by @AndersonQ View on GitHub
Dominant language
Go
Stars
6
Forks
57
Avg merge
6d 7h
Merged PRs (30d)
3

Description

tl;dr:
- on Windows a `CTRL_CLOSE_EVENT`, `CTRL_LOGOFF_EVENT` or `CTRL_SHUTDOWN_EVENT` is sent as a `syscall.SIGTERM` to [`signal.Notify`]
- the code dealing with the SCM might not be triggered when a `syscall.SIGTERM` is received
- the shutdown code relies on `defer` which does not run when `os-Exit` is called.

A detailed explanation is found on https://github.com/elastic/elastic-agent/issues/1525. This issue is seen in the Elastic Agent, and part of the problem resides on the `elastic-agent-libs`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.