Commit c712ebf
Fix IOCP double-completion race and check SetFileCompletionNotificationModes
Two fixes:
1. relay.cpp: Call SetFileCompletionNotificationModes BEFORE
CreateIoCompletionPort. If FILE_SKIP_COMPLETION_PORT_ON_SUCCESS is
not supported for a handle type (e.g. certain socket types), fall
back to event-based mode entirely. Previously the handle was
associated with the IOCP without skip-on-success, causing
synchronous completions to both be processed inline by Schedule()
and queued to the IOCP — a double-processing race that manifests
as ERROR_NO_DATA (232) in ContainerLogs/ContainerAttach tests.
2. localhost.cpp: THROW_IF_WIN32_BOOL_FALSE on
SetFileCompletionNotificationModes in the port relay AcceptThread.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent c5e6526 commit c712ebf
2 files changed
Lines changed: 29 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1219 | 1219 | | |
1220 | 1220 | | |
1221 | 1221 | | |
1222 | | - | |
1223 | | - | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
1224 | 1228 | | |
1225 | | - | |
1226 | | - | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
1230 | 1236 | | |
1231 | 1237 | | |
1232 | 1238 | | |
| |||
1362 | 1368 | | |
1363 | 1369 | | |
1364 | 1370 | | |
1365 | | - | |
1366 | | - | |
| 1371 | + | |
1367 | 1372 | | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
1371 | 1379 | | |
1372 | 1380 | | |
1373 | 1381 | | |
| |||
1618 | 1626 | | |
1619 | 1627 | | |
1620 | 1628 | | |
1621 | | - | |
1622 | | - | |
| 1629 | + | |
1623 | 1630 | | |
1624 | | - | |
1625 | | - | |
1626 | | - | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
1627 | 1637 | | |
1628 | 1638 | | |
1629 | 1639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
679 | | - | |
| 679 | + | |
| 680 | + | |
680 | 681 | | |
681 | 682 | | |
682 | 683 | | |
| |||
0 commit comments