Skip to content

Fix hccl-shim deadlock and expand Msprof passthrough exports - #77

Merged
reiase merged 2 commits into
DeepLink-org:masterfrom
VincentCheungKokomo:fix/hccl-shim-msprof-forward
Jul 27, 2026
Merged

Fix hccl-shim deadlock and expand Msprof passthrough exports#77
reiase merged 2 commits into
DeepLink-org:masterfrom
VincentCheungKokomo:fix/hccl-shim-msprof-forward

Conversation

@VincentCheungKokomo

Copy link
Copy Markdown
Contributor

Summary

  • Replace the parking_lot::Mutex around real libprofapi loading with OnceCell, avoiding deadlock when HCCL/MSProf callbacks re-enter the shim's exported Msprof* symbols (previously hung at aclprofStart).
  • Expand passthrough exports for additional Msprof* / prof* symbols so Ascend runtime can resolve libprofapi when the shim is first on LD_LIBRARY_PATH.

Test plan

  • Rebuild shim: make hccl-shim-lib
  • Install real library / set PROBING_HCCL_PROFAPI_REAL, put shim dir first on LD_LIBRARY_PATH
  • Run Ascend HCCL / acl.prof path and confirm aclprofStart no longer hangs
  • Confirm probing still captures HCCL events into hccl.* tables

Made with Cursor

Vincent and others added 2 commits July 27, 2026 16:14
Replace the reentrant Mutex around real libprofapi with OnceCell so HCCL/MSProf
callbacks cannot hang, and forward the additional Msprof/prof* symbols Ascend
needs when the shim is first on LD_LIBRARY_PATH.

Co-authored-by: Cursor <cursoragent@cursor.com>
- rustfmt hccl-shim forward.rs / lib.rs (wrap long fn-pointer types).
- hccl-shim names.rs: use ptr::cast to avoid unnecessary_cast on aarch64.
- cli aarch64 inject: from_mut for ref_as_ptr, add digit separators to hex literals.
- aarch64 inject regression test: wait() the spawned child (zombie_processes).
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@reiase
reiase merged commit 65fa7e5 into DeepLink-org:master Jul 27, 2026
15 of 16 checks passed
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.

2 participants