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

Replace handle.exe with fshc.exe #12369

Open
lukebakken opened this issue Sep 24, 2024 · 3 comments
Open

Replace handle.exe with fshc.exe #12369

lukebakken opened this issue Sep 24, 2024 · 3 comments
Assignees
Labels
effort-medium pkg-windows An issue specific to Windows

Comments

@lukebakken
Copy link
Collaborator

lukebakken commented Sep 24, 2024

handle.exe does not reliably produce parsable output. On top of that, it is closed source abandonware.

We should replace it with a small open source alternative our team members have developed as a personal project.

Some things involved

  • Figuring out how best to release fshc.exe.
  • Ensuring that the necessary Windows runtime components are available (they probably are).
  • Integrating the executable into the Windows zip and installer.
  • Signing the fshc.exe executable.

Migration Strategies

fhsc can continue being an optional dependency that, unlike handle.exe is open source and can produce easier to parse output (JSON).

  1. handle.exe will then be deprecated
  2. Both will be supported for a period of time
  3. fshc will eventually become the only option

Or, for 4.1.0 or 4.2.0, we can stop supporting handle.exe since it is optional already, and
move straight to using fshc's JSON output.

Right now the biggest item left is a an Actions workflow that would produce 64-bit builds of fshc for Windows, Linux and macOS (the latter two for anyone who may need it, not for RabbitMQ's own needs).

References

@lukebakken lukebakken added effort-medium pkg-windows An issue specific to Windows labels Sep 24, 2024
@lukebakken lukebakken self-assigned this Sep 24, 2024
@michaelklishin
Copy link
Member

fhsc can continue being an optional dependency that, unlike handle.exe is open source and can produce easier to parse output (JSON).

  1. handle.exe will then be deprecated
  2. Both will be supported for a period of time
  3. fshc will eventually become the only option

Or, for 4.1.0, we can stop supporting handle.exe since it is optional already, and
move straight to using fshc's JSON output.

Right now the biggest item left is a an Actions workflow that would produce 64-bit builds of fshc for Windows, Linux and macOS (the latter two for anyone who may need it, not for RabbitMQ's own needs).

@Digiover
Copy link

For what it's worth, handle.exe (or Windows in general) requires administrator privileges to list file and socket handles and information, as described in the "Installation" section of the documentation.

Notice the difference:
Screenshot 2024-09-27 084924

Screenshot 2024-09-27 084946

In both sessions I started C:\Windows\System32\handle64.exe -nobanner | more.

I'm unsure why the notice is logged when RabbitMq runs as Local System and starts / spawns handle.exe. Maybe someone can catch that using ProcMon :)

@michaelklishin
Copy link
Member

IMO as of 1.2.0, fshc is ready to be integrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort-medium pkg-windows An issue specific to Windows
Projects
None yet
Development

No branches or pull requests

3 participants