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

Fix windows 7 support #8714

Merged
merged 1 commit into from Jan 18, 2023
Merged

Fix windows 7 support #8714

merged 1 commit into from Jan 18, 2023

Conversation

atrniv
Copy link
Contributor

@atrniv atrniv commented Jan 18, 2023

This PR fixes Habitat supervisor crashes on Windows 7. The crash arose from the usage of the "GetOverlappedResultEx" system call which is unsupported prior to Windows 8. This call is made by newer versions of the "ipc-channel" crate that is used in Habitat for Inter Process Communcation between the Launcher and Supervisor. As a result of this bug the Habitat Supervisor and Launcher would crash when they tried to communicate between themselves.

  • The version of the "ipc-channel" crate is frozen at 0.15.0 to avoid the usage of the "GetOverlappedResultEx" system call, which was introduced in version 0.16.0.
  • An error type wrapper named "IPCError" is created around "ipc_channel::ipc::IpcError" because it does not implement the "std::error::Error" trait, which is required to use it with the "#[from]" attribute of the "thiserror" crate's "Error" derive macro.

It is important to note that these changes should ideally be reverted once support for Windows 7 is discontinued around January 2024. This will allow for the usage of the "GetOverlappedResultEx" system call and the "ipc_channel::ipc::IpcError" trait. More information about "GetOverlappedResultEx" can be found at the following link: https://learn.microsoft.com/en-us/windows/win32/api/ioapiset/nf-ioapiset-getoverlappedresultex And the information about the commit that introduced the change can be found at: servo/ipc-channel@eb08381

Signed-off-by: Johny Jose johny.jose@progress.com

* The version of the "ipc-channel" crate is frozen at 0.15.0 to avoid the usage of the "GetOverlappedResultEx" system call, which was introduced in version 0.16.0.
* An error type wrapper named "IPCError" is created around "ipc_channel::ipc::IpcError" because it does not implement the "std::error::Error" trait, which is required to use it with the "#[from]" attribute of the "thiserror" crate's "Error" derive macro.

It is important to note that these changes should ideally be reverted once support for Windows 7 is discontinued around January 2024. This will allow for the usage of the "GetOverlappedResultEx" system call and the "ipc_channel::ipc::IpcError" trait.
More information about "GetOverlappedResultEx" can be found at the following link: https://learn.microsoft.com/en-us/windows/win32/api/ioapiset/nf-ioapiset-getoverlappedresultex
And the information about the commit that introduced the change can be found at: servo/ipc-channel@eb08381

Signed-off-by: Johny Jose <johny.jose@progress.com>
@netlify
Copy link

netlify bot commented Jan 18, 2023

👷 Deploy Preview for chef-habitat processing.

Name Link
🔨 Latest commit 97eff71
🔍 Latest deploy log https://app.netlify.com/sites/chef-habitat/deploys/63c7d152cf85070009cb374b

Copy link
Contributor

@mwrock mwrock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mwrock mwrock merged commit 1f6070e into main Jan 18, 2023
@mwrock mwrock deleted the jj/windows-7-support branch January 18, 2023 22:51
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

Successfully merging this pull request may close these issues.

None yet

2 participants