Skip to content

bugfix: remove spurious backslash breaking output redirection in launch scripts.#1248

Open
kuishou68 wants to merge 1 commit intojd-opensource:mainfrom
kuishou68:fix/issue-1247-launch-script-redirect-syntax
Open

bugfix: remove spurious backslash breaking output redirection in launch scripts.#1248
kuishou68 wants to merge 1 commit intojd-opensource:mainfrom
kuishou68:fix/issue-1247-launch-script-redirect-syntax

Conversation

@kuishou68
Copy link
Copy Markdown

Closes #1247

Problem

In docs/en/getting_started/launch_xllm.md, all three platform launch scripts (NPU, NVIDIA GPU, MLU) contain a shell syntax error on the final argument line:

--node_rank=$i \ > $LOG_FILE 2>&1 &

The \ > sequence causes the shell to interpret > as a literal escaped character rather than a redirection operator. As a result:

  • The log file is never created
  • All xllm stdout/stderr prints to the terminal instead of being captured
  • Users running the launch script lose all logs

Fix

Remove the spurious \ before > in all three script blocks (lines 46, 87, 123):

# Before (broken):
    --node_rank=$i \ > $LOG_FILE 2>&1 &

# After (correct):
    --node_rank=$i > $LOG_FILE 2>&1 &

Testing

# Demonstrate the bug (no file created):
echo hello \ > /tmp/test_broken.log
cat /tmp/test_broken.log  # file empty or missing

# Correct form:
echo hello > /tmp/test_fixed.log
cat /tmp/test_fixed.log   # prints: hello

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request cleans up shell command examples in the documentation by removing unnecessary backslashes before output redirection in docs/en/getting_started/launch_xllm.md. I have no feedback to provide as there were no review comments.

@liutongxuan liutongxuan changed the title fix: remove spurious backslash breaking output redirection in launch scripts bugfix: remove spurious backslash breaking output redirection in launch scripts Apr 10, 2026
@liutongxuan liutongxuan changed the title bugfix: remove spurious backslash breaking output redirection in launch scripts bugfix: remove spurious backslash breaking output redirection in launch scripts. Apr 10, 2026
@kuishou68
Copy link
Copy Markdown
Author

Hi! Just following up on this PR — it removes the spurious backslash that was breaking output redirection in the launch scripts. The automated review (Gemini) found no issues. Would appreciate a maintainer review when you get a chance. Thanks!

@XuZhang99
Copy link
Copy Markdown
Collaborator

Hi @kuishou68, we couldn't reproduce this issue in our all docker image.

@kuishou68
Copy link
Copy Markdown
Author

Thanks for checking. The issue I observed was on a bare Ubuntu 22.04 host running the launch scripts directly (not via Docker image). The backslash on line N breaks the shell redirection when the script is run with bash outside a container, since bash interprets the backslash differently than the Docker entrypoint. If the Docker image wraps the script in a way that skips the problematic redirection path, it would explain why it's not reproducible there. Happy to add a test case or provide the exact environment if that helps narrow it down.

@XuZhang99
Copy link
Copy Markdown
Collaborator

Thanks for checking. The issue I observed was on a bare Ubuntu 22.04 host running the launch scripts directly (not via Docker image). The backslash on line N breaks the shell redirection when the script is run with bash outside a container, since bash interprets the backslash differently than the Docker entrypoint. If the Docker image wraps the script in a way that skips the problematic redirection path, it would explain why it's not reproducible there. Happy to add a test case or provide the exact environment if that helps narrow it down.

Currently, xllm only can run on docker images provided by us.

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.

fix: Shell syntax error in launch_xllm.md - broken output redirection (\ > LOG)

2 participants