fix: Windows hyperlight networking — use host-side poll fix - #596
Closed
danbugs wants to merge 2 commits into
Closed
fix: Windows hyperlight networking — use host-side poll fix#596danbugs wants to merge 2 commits into
danbugs wants to merge 2 commits into
Conversation
Signed-off-by: danbugs <danilochiarlone@gmail.com>
… polling Point the hyperlight-unikraft dependency at the fix/wsapoll-pollout-spin branch which replaces WSAPoll with select() on Windows and adds a 50ms minimum poll timeout when read-readiness is checked. This fixes urlopen() without an explicit timeout hanging in the micro-VM. Signed-off-by: danbugs <danilochiarlone@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates MXC’s Hyperlight backend wiring to consume Hyperlight host-side networking fixes (to prevent urlopen() without explicit timeouts from hanging in Windows Hyperlight micro-VMs) while also adapting the integration to the v0.11.x API/snapshot layout.
Changes:
- Switch Hyperlight backend dependency from the old
hyperlight-unikraft-hostsource to thehyperlight-unikraftgit branch containing the Windows poll readiness fixes. - Update snapshot handling from a single file (
snapshot.hls) to a directory format (snapshot/index.json) across the backend and E2E prereq checks. - Update CI Hyperlight E2E workflow to pull the v0.11.0 kernel/initrd images.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/testing/wxc_e2e_tests/src/lib.rs |
Updates the Windows Hyperlight snapshot prereq probe to the new snapshot/index.json layout. |
src/backends/hyperlight/common/src/lib.rs |
Adapts Hyperlight runner integration to hyperlight-unikraft and v0.11.x API changes (snapshot dir + new options + Runtime::new signature). |
src/backends/hyperlight/common/Cargo.toml |
Updates the Hyperlight dependency to a git branch providing the host-side networking fix. |
src/Cargo.lock |
Locks in the updated Hyperlight dependency graph (including moving to hyperlight-unikraft and new transitive deps). |
.github/workflows/hyperlight-e2e.yml |
Updates the GHCR image tag used to download Hyperlight kernel/initrd for Windows E2E. |
Comment on lines
10
to
+11
| [target.'cfg(target_arch = "x86_64")'.dependencies] | ||
| hyperlight-unikraft-host = { git = "https://github.com/hyperlight-dev/hyperlight-unikraft", tag = "v0.10.0", optional = true } | ||
| hyperlight-unikraft = { git = "https://github.com/hyperlight-dev/hyperlight-unikraft.git", branch = "fix/wsapoll-pollout-spin", optional = true } |
Comment on lines
+246
to
247
| let snapshot = home.join("pyhl").join("snapshot").join("index.json"); | ||
| if snapshot.is_file() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix
urlopen()without an explicit timeout hanging in Hyperlight micro-VMs on Windows.hyperlight-unikraftat thefix/wsapoll-pollout-spinbranch (hyperlight-unikraft PR #105) which fixes Windows networking read-readiness detectionmax_surrogates,Runtime::newsignature)The existing
hyperlight_networking.jsone2e test (urlopen('http://example.com/')without timeout) verifies this fix — it was timing out at 30s without the host-side changes (see PR #591 CI failure).What PR #105 changes on the host side
WSAPoll→select():WSAPollhas knownPOLLRDNORMreliability issues on Windowswritefdsinhl_sleep_poll_sockets: POLLOUT was never reported, breakingsettimeout()pathsnet_poll(timeout_ms=0)from starving readiness detectionSO_RCVTIMEO/SO_SNDTIMEOafterconnect_timeout()which clears themRelationship to the Unikraft kernel fix
A complementary kernel-level fix (unikraft
fix/net-poll-sleep) registers ahalt_irqPM ops callback so the cooperative scheduler's idle thread polls sockets via__hl_sleepinstead of doing a no-op spinwait. This fixes the root cause (scheduler not polling during idle), while PR #105 fixes independent Windows host-side bugs. Both should land.Test plan
hyperlight_networking.jsone2e test exercisesurlopen()without timeouthyperlight-e2e.yml(Windows)Microsoft Reviewers: Open in CodeFlow