Fix Triton NFS detection crash when df wraps long device names - #8259
Open
atirna wants to merge 5 commits into
Open
Fix Triton NFS detection crash when df wraps long device names#8259atirna wants to merge 5 commits into
atirna wants to merge 5 commits into
Conversation
BusyBox df wraps device names longer than ~20 characters onto their own line, so the second output row holds only the device field and the fs-type lookup raised IndexError. The check runs while printing an informational NFS warning at import time, so this could kill 'import deepspeed' in BusyBox containers with long EBS device names. Use POSIX -P output to keep each filesystem on one line and treat any short/malformed row as not-NFS instead of raising. Add a mocked regression test for the wrapped-output case. Signed-off-by: Atirna <288419661+atirna@users.noreply.github.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Contributor
|
lgtm, @tohtana , do you mind having a second eye on it? thank you! |
sfc-gh-truwase
approved these changes
Aug 20, 2026
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.
Description
is_nfs_path()reads the fs type from the second column of the seconddfoutput row. With BusyBoxdfand a device name longer than ~20 characters (common on AWS, where the EBS device is derived from the volume id), the device wraps onto its own line, the row has a single field, and the[1]lookup raisesIndexError.Since the check runs while printing an informational NFS warning during
import deepspeed, that exception kills the whole import in BusyBox-based containers.I changed the call to
df -PTso POSIX output keeps every filesystem on one line (BusyBox and coreutils both honour-Pwith-T), and made the parse treat a short or malformed row as not-NFS instead of raising, so any other unexpecteddfoutput just skips the warning.Testing
pytest -q tests/unit/ops/transformer/inference/test_matmul_ext.py— new mocked regression test covering the wrapped-device case passes, and fails with IndexError on the old parsingpre-commit run --files deepspeed/ops/transformer/inference/triton/matmul_ext.py tests/unit/ops/transformer/inference/test_matmul_ext.py— all hooks passnfs4row is still detected as NFS, so real NFS warnings keep workingFixes #8249