Commit c85291c
authored
[BugFix] fix consume_signals barrier deadlock in PD separation (#8034)
In PD separation mode, different ranks may receive cache_info at different
times. When consume_signals gets a layer0 signal, some ranks find the
engine_idx already in idx_cache_task_dict (ready) while others don't (pending).
This causes different ranks to put different batch_engine_signals into the
queue, leading to mismatched finish_send_cache_barrier.wait() calls and
deadlock.
Fix: route all layer0 signals through pending_layer0_signals uniformly,
then immediately recover any that already have cache_info registered.
Each recovered signal is put into the queue individually (single-request
batch) to ensure all ranks have identical batch granularity regardless
of recovery timing.1 parent 513686d commit c85291c
1 file changed
Lines changed: 12 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
1077 | | - | |
1078 | | - | |
1079 | 1077 | | |
1080 | 1078 | | |
1081 | 1079 | | |
| |||
1086 | 1084 | | |
1087 | 1085 | | |
1088 | 1086 | | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | | - | |
1094 | | - | |
1095 | | - | |
| 1087 | + | |
1096 | 1088 | | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
1104 | 1100 | | |
1105 | 1101 | | |
1106 | 1102 | | |
| |||
0 commit comments