Skip to content

docs: make DSv4 startup scripts safe with unset LD_PRELOAD - #279

Draft
matthewygf wants to merge 2 commits into
dsv4_support_045from
codex/fix-dsv4-ld-preload
Draft

matthewygf wants to merge 2 commits into
dsv4_support_045from
codex/fix-dsv4-ld-preload

Conversation

@matthewygf

@matthewygf matthewygf commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Problem

The DSv4 guides start their launch scripts with set -euo pipefail, then expand $LD_PRELOAD directly:

export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD

On a host/container where LD_PRELOAD is unset, Bash exits with LD_PRELOAD: unbound variable before the LMCache controller or vLLM server starts. The pattern appears in the new cross-node P2P guide and both launch examples in the existing DSv4 guide.

Fix

Use Bash's conditional expansion in all three snippets so jemalloc is set when the variable is absent and any existing preload list is preserved when present.

Validation

  • Unset-variable case under bash -u produces exactly the jemalloc path.
  • Existing-value case preserves /existing.so after jemalloc.
  • Repository search confirms no unsafe DSv4 LD_PRELOAD=...:$LD_PRELOAD snippet remains.
  • git diff --check passes.

Risk

Documentation-only, three-line shell correction. It does not change runtime code or the intended jemalloc preload order.

@matthewygf matthewygf changed the title docs: make DSv4 startup script safe with unset LD_PRELOAD docs: make DSv4 startup scripts safe with unset LD_PRELOAD Aug 27, 2026
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.

1 participant