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

When launcher service is manually stopped, it should remain in the stopped state until manually started #1499

Open
RebeccaMahany opened this issue Dec 7, 2023 · 3 comments

Comments

@RebeccaMahany
Copy link
Contributor

Sometimes, when stopping the launcher service via the Service Manager, we see a pop-up that says "Windows could not stop the LauncherKolideK2Svc service on Local Computer. Error 1067: The process terminated unexpectedly." Querying the service status (either via command line, or by closing and re-opening the Service Manager) shows that the service is then in the Running state.

Since the service terminated unexpectedly, the service manager starts up launcher again, which is why it does not remain in the Stopped state. We should investigate why the service is terminating unexpectedly, and stop it from doing so on service shutdown so that the service manager does not restart launcher.

This issue does not appear to occur when stopping the launcher service via command line (i.e. stop-service LauncherKolideK2Svc) -- in that case, launcher halts and the service remains in the stopped state until manually started again, which is the correct and desired behavior.

We've seen this issue both on 1.2.1 and 1.3.0.

@directionless
Copy link
Contributor

Do you think this is a launcher issue, or a ServiceManager bug?

I've seen some potentially related, buggy behavior in ServiceManager. I never got to the bottom of it, but all kinds of weirdness would happen if I had the service manager open while simultaneous running command line tools or installing a package. It's like something in can only handle a single writer and is missing a lock

@RebeccaMahany
Copy link
Contributor Author

I'm not sure where the issue lies exactly -- maybe only ServiceManager, or maybe ServiceManager+launcher.

@directionless
Copy link
Contributor

The stated bug here is about how adjustments in the service manager don't stick. So I think this is entirely inside the service manager.

Something about how if it doesn't think it succeeded in the shutdown, it doesn't save the change to the desired state.

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

No branches or pull requests

2 participants