Skip to content

Fix Triton NFS detection crash when df wraps long device names - #8259

Merged
delock merged 2 commits into
deepspeedai:masterfrom
atirna:fix/nfs-df-parsing
Aug 30, 2026
Merged

delock merged 2 commits into
deepspeedai:masterfrom
atirna:fix/nfs-df-parsing

Conversation

@atirna

@atirna atirna commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Description

is_nfs_path() reads the fs type from the second column of the second df output row. With BusyBox df and 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 raises IndexError.

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 -PT so POSIX output keeps every filesystem on one line (BusyBox and coreutils both honour -P with -T), and made the parse treat a short or malformed row as not-NFS instead of raising, so any other unexpected df output 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 parsing
  • pre-commit run --files deepspeed/ops/transformer/inference/triton/matmul_ext.py tests/unit/ops/transformer/inference/test_matmul_ext.py — all hooks pass
  • mocked POSIX nfs4 row is still detected as NFS, so real NFS warnings keep working

Fixes #8249

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.

@pengdurice

Copy link
Copy Markdown
Contributor

lgtm, @tohtana , do you mind having a second eye on it? thank you!

@pengdurice
pengdurice enabled auto-merge August 23, 2026 22:59
@pengdurice
pengdurice added this pull request to the merge queue Aug 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 24, 2026
@pengdurice

Copy link
Copy Markdown
Contributor

@atirna, please take a look at the ci failure.

@atirna

atirna commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor Author

it looks like the runner got oom-killed rather than a real test failure.

i pushed 6f72481 anyway: branch rebased onto current master (it was 5 behind) and the regression test now imports is_nfs_path directly with a positive nfs-detection.

atirna added 2 commits August 30, 2026 14:20
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>
Drop the AST source-scrape in favor of the real import (CI installs
torch/triton) and add the positive case: an nfs fs-type row is still
detected as NFS through the -PT parsing.

Signed-off-by: Atirna <288419661+atirna@users.noreply.github.com>
@atirna
atirna force-pushed the fix/nfs-df-parsing branch from 21a5d40 to 6f72481 Compare August 30, 2026 08:50
@delock
delock enabled auto-merge August 30, 2026 15:19
@delock
delock added this pull request to the merge queue Aug 30, 2026
Merged via the queue into deepspeedai:master with commit c389bae Aug 30, 2026
13 checks passed
@atirna
atirna deleted the fix/nfs-df-parsing branch August 31, 2026 07:19
@auto-pr-labeler-with-jev auto-pr-labeler-with-jev Bot added the skip-gpu-test Requires positive evidence that every changed behavior can be validated without a GPU. label Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-gpu-test Requires positive evidence that every changed behavior can be validated without a GPU.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IndexError in is_nfs_path() when df wraps a long device name (breaks import deepspeed)

4 participants