Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions scripts/docker-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ if [[ $EUID -ne 0 ]]; then
exit 1
fi

KERNEL_RELEASE="$(uname -r)"
case "$KERNEL_RELEASE" in
6.18.4|6.18.4[-+]*|6.18.5|6.18.5[-+]*|\
6.17.0-1015-azure|6.17.0-1015-azure[-+]*|\
6.17.0-1018-azure|6.17.0-1018-azure[-+]*)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This code is duplicated with install.sh. Maybe we can add a file with affeted kernel version and read kernel versions from that file?

cat >&2 <<EOF
warning: Linux kernel ${KERNEL_RELEASE} is known to contain a ublk initialization regression.
Creating the first ublk device may hang or panic the host.
Upgrade to a fixed vendor kernel (upstream 6.18.6+ for 6.18.y) before running AgentENV.
See: https://github.com/kvcache-ai/AgentENV/issues/20
EOF
;;
esac

# ---------------------------------------------------------------------------
# 1. ublk_drv kernel module
# ---------------------------------------------------------------------------
Expand Down
14 changes: 14 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,20 @@ if [[ "$OS" != "linux" ]]; then
exit 1
fi

KERNEL_RELEASE="$(uname -r)"
case "$KERNEL_RELEASE" in
6.18.4|6.18.4[-+]*|6.18.5|6.18.5[-+]*|\
6.17.0-1015-azure|6.17.0-1015-azure[-+]*|\
6.17.0-1018-azure|6.17.0-1018-azure[-+]*)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We can add 6.17.0-1020-azure. Other kernels like 6.17.0-1018-aws also contain the vulnerability.

cat >&2 <<EOF
warning: Linux kernel ${KERNEL_RELEASE} is known to contain a ublk initialization regression.
Creating the first ublk device may hang or panic the host.
Upgrade to a fixed vendor kernel (upstream 6.18.6+ for 6.18.y) before running AgentENV.
See: https://github.com/kvcache-ai/AgentENV/issues/20
EOF
;;
Comment on lines +73 to +79

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[bug · high]
The matched-kernel path only emits a warning and then continues. With the default SKIP_SETUP=0, this script subsequently invokes server --setup-host, which provisions ublk and may trigger the exact host hang/panic described here. Abort before setup on affected kernels (optionally allowing an explicit unsafe override), rather than proceeding automatically.

Suggestion:

Suggested change
cat >&2 <<EOF
warning: Linux kernel ${KERNEL_RELEASE} is known to contain a ublk initialization regression.
Creating the first ublk device may hang or panic the host.
Upgrade to a fixed vendor kernel (upstream 6.18.6+ for 6.18.y) before running AgentENV.
See: https://github.com/kvcache-ai/AgentENV/issues/20
EOF
;;
cat >&2 <<EOF
error: Linux kernel ${KERNEL_RELEASE} is known to contain a ublk initialization regression.
Creating the first ublk device may hang or panic the host.
Upgrade to a fixed vendor kernel (upstream 6.18.6+ for 6.18.y) before running AgentENV.
See: https://github.com/kvcache-ai/AgentENV/issues/20
EOF
exit 1
;;

esac

RELEASE_API="https://api.github.com/repos/${REPO}/releases/latest"
if [[ "$VIRTUALIZATION_MODE" == "pvm" ]]; then
TARBALL="aenv-server-${OS}-${ARCH_TAG}-pvm.tar.gz"
Expand Down
Loading