Skip to content

fix: adding logging/timeout protection - #27

Merged
Xuan-1998 merged 1 commit into
amazon-contributing:mainfrom
Xuan-1998:fix/untimed-polls
Nov 7, 2026
Merged

Xuan-1998 merged 1 commit into
amazon-contributing:mainfrom
Xuan-1998:fix/untimed-polls

Conversation

@Xuan-1998

@Xuan-1998 Xuan-1998 commented Oct 22, 2026 •

Copy link
Copy Markdown

The Gin barrier flushed every context without a timeout. It now goes
through flush_with_timeout, so a NIC that never completes its writes
prints a flush timeout and traps instead of spinning.

The combine scale-up wait prints one timeout line per scale-up rank
instead of one per lane, and the epilogue drain timeout names the ranks.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Xuan-1998 Xuan-1998 changed the title Fix/untimed polls Adding logging/timeout protection Oct 22, 2026
@Xuan-1998 Xuan-1998 changed the title Adding logging/timeout protection fix: adding logging/timeout protection Oct 22, 2026
Comment thread deep_ep/include/deep_ep/common/comm.cuh Resolved
Comment thread deep_ep/include/deep_ep/common/comm.cuh Resolved
@whn09

whn09 commented Nov 3, 2026

Copy link
Copy Markdown

Tested on 2× p6-b300 (NCCL 2.31.2). Full matrix + pressure pass; perf flat. With EP_DEBUG_CHECKS=1 on a227152's stale-header hang it prints grid sync timeout (barrier start) ... SMs arrived: 10 of 12, which does point at the stuck SMs. One note: after a timed-out grid sync, the workspace counter is left mid-round, so every later grid sync on that buffer will hang (debug-only, but worth a comment). The EP_DEBUG_CHECKS line in compiler.hpp is the same as #33's, and the barrier signature change conflicts with #13 and #29.

@Xuan-1998
Xuan-1998 requested a review from hershys-aws November 4, 2026 21:13
@Xuan-1998
Xuan-1998 force-pushed the fix/untimed-polls branch 2 times, most recently from cdead70 to ac94cf7 Compare November 5, 2026 16:41
@Xuan-1998
Xuan-1998 requested review from vladimiraerov and removed request for vladimiraerov November 5, 2026 16:55
The Gin barrier flushed every context without a timeout. It now goes
through `flush_with_timeout`, so a NIC that never completes its writes
prints a flush timeout and traps instead of spinning.

The combine scale-up wait prints one timeout line per scale-up rank
instead of one per lane, and the epilogue drain timeout names the ranks.
@akkart-aws
akkart-aws self-requested a review November 7, 2026 01:19
@akkart-aws
akkart-aws self-requested a review November 7, 2026 01:20

@akkart-aws akkart-aws left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think overflow should still not be an issue, if we use this
cudaDeviceSetLimit
to set the size of the printf buffer. But according to the documentation, this only works
before the first kernel that uses printf is launched. So if the user application launches
any kernel that uses printf before buffer creation, this fails, but the buffer is normally
created before any such kernel, so in practice it should work, and we can print a warning
when it does fail.

@Xuan-1998

Copy link
Copy Markdown
Author

I think overflow should still not be an issue, if we use this cudaDeviceSetLimit to set the size of the printf buffer. But according to the documentation, this only works before the first kernel that uses printf is launched. So if the user application launches any kernel that uses printf before buffer creation, this fails, but the buffer is normally created before any such kernel, so in practice it should work, and we can print a warning when it does fail.

Thanks Arun. Yes we can, just a bit worried when the user is not setting it to be enough and then we need to ask them to set and run the logs for us etc. When the log buffer is overflow it just silently drops the earliest ones.

@Xuan-1998
Xuan-1998 removed the request for review from vladimiraerov November 7, 2026 06:35
@Xuan-1998
Xuan-1998 merged commit 7529a22 into amazon-contributing:main Nov 7, 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.

6 participants