feat: subprocess support, networking idle-poll fix, and CI improvements#108
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Python agent driver example and host tooling to better support subprocess-style workflows (pip installs and running basic shell utilities inside the guest), along with a small adjustment to socket polling behavior during guest sleep.
Changes:
- Narrow
poll/WSAPollevent masks used by__hl_sleepsocket polling while sleeping. - Increase the warm-up sandbox heap size used during
pyhl setup. - Update the python-agent-driver example rootfs and build inputs to support pip installs (offline wheels) and BusyBox-based subprocess demos.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
host/src/lib.rs |
Adjusts socket poll event masks used during sleep to avoid polling for writability. |
host/src/bin/pyhl.rs |
Increases the fixed heap size used for the warm-up/snapshot sandbox during pyhl setup. |
examples/python-agent-driver/kraft.yaml |
Switches Unikraft/app-elfloader sources to a fork/feature branch and enables additional process/FD config. |
examples/python-agent-driver/hl_pydriver.c |
Adds hex parsing helper and changes how kernel-provided pointer env vars are parsed. |
examples/python-agent-driver/Dockerfile |
Adds offline wheel download, restores pip + needed stdlib pieces, and adds BusyBox + supporting rootfs setup. |
examples/python-agent-driver/demo_pip_install.py |
Adds a demo that installs/imports six via pip at runtime in the guest. |
examples/python-agent-driver/demo_busybox.py |
Adds a demo that runs basic BusyBox commands via subprocess in the guest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Linux Benchmarks
Details
| Benchmark suite | Current: 8084df2 | Previous: 682ad20 | Ratio |
|---|---|---|---|
hello_world (median) |
20 ms |
20 ms |
1 |
pandas (median) |
110 ms |
120 ms |
0.92 |
density (per VM) |
11 MB |
8 MB |
1.38 |
snapshot (disk) |
702 MiB |
653 MiB |
1.08 |
This comment was automatically generated by workflow using github-action-benchmark.
Contributor
There was a problem hiding this comment.
Windows Benchmarks
Details
| Benchmark suite | Current: 8084df2 | Previous: 682ad20 | Ratio |
|---|---|---|---|
hello_world (median) |
354 ms |
291 ms |
1.22 |
pandas (median) |
1095 ms |
1024 ms |
1.07 |
density (per VM) |
11 MB |
7 MB |
1.57 |
snapshot (disk) |
728 MiB |
661 MiB |
1.10 |
This comment was automatically generated by workflow using github-action-benchmark.
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
e84b5e6 to
89c6afb
Compare
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
…demo Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
hyperlight-unikraft writes guest output to stderr with -q flag. The Linux test merges stderr via 2>&1, but the Windows helper only read stdout. Merge both streams so output matching works on Windows. Signed-off-by: danbugs <danilochiarlone@gmail.com>
PR unikraft/unikraft#1860 (epoll bypass guard) is now merged. Signed-off-by: danbugs <danilochiarlone@gmail.com>
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.
Add subprocess support for the Hyperlight platform via vfork/execve, enabling
Python's
subprocess.run()to execute busybox commands and pip installs insidethe guest. Since Hyperlight has no MMU, fork() is promoted to vfork
(CLONE_VM | CLONE_VFORK) — the child shares the parent's address space.
just rootfs