Skip to content

Trying to kill a discovery process on Windows might fail with a TerminateProcess access is denied #1587

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

Closed
silvanocerza opened this issue Dec 10, 2021 · 3 comments
Assignees
Labels
conclusion: invalid Issue/PR not valid os: windows Specific to Windows operating system topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface type: imperfection Perceived defect in any part of project

Comments

@silvanocerza
Copy link
Contributor

silvanocerza commented Dec 10, 2021

Bug Report

Current behavior

I only verified this behaviour when running the arduino-cli in daemon mode.
It probably happens also when running a CLI command but it should not affect the end user in that case since the discovery processes would quit in any case.

This line returns an error so the CLI doesn't consider the discovery process to be closed.

This prevents the quit message to be sent to any client listening for boards connection and disconnection event, so these client won't know they must restart the board list watch process and listen from a new communication channel, thus the clients won't see any more events.

The quit message has been added with #1460.

Expected behavior

I expect the discovery process to be killed only if it's still running.

Environment

  • CLI version (output of arduino-cli version): 0.20.2
  • OS and platform: Windows

Additional context

My guess is that it's failing because the process we're trying to kill already has quit, we should probably only kill it if it's still running.

@silvanocerza silvanocerza added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project topic: gRPC Related to the gRPC interface labels Dec 10, 2021
@silvanocerza silvanocerza self-assigned this Dec 10, 2021
@cmaglie
Copy link
Member

cmaglie commented Mar 17, 2023

@MatteoPologruto could you check if this is still an issue?

@MatteoPologruto MatteoPologruto added the os: windows Specific to Windows operating system label Apr 5, 2023
@MatteoPologruto
Copy link
Contributor

We were not able to reproduce this error. If this kind of problem will present itself in the future, we will open it again. In this event, could you provide us with the steps to reproduce it @silvanocerza ?

@MatteoPologruto MatteoPologruto added the conclusion: invalid Issue/PR not valid label Apr 5, 2023
@silvanocerza
Copy link
Contributor Author

@MatteoPologruto no idea really, if I remember correctly it was happening while restarting the discovery processes or something like that.

I might be wrong though, the issue is quite old. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: invalid Issue/PR not valid os: windows Specific to Windows operating system topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants