Reapply "Add silk fibers aware socket implementations"#107680
Conversation
| { | ||
| auto * socket_impl = static_cast<Poco::Net::SocketImpl *>(BIO_get_data(bio)); | ||
| const int fd = socket_impl->sockfd(); | ||
| const uint64_t timeout_ns = timeoutNs(socket_impl->getReceiveTimeout()); |
There was a problem hiding this comment.
SecureSocketImpl bounds TLS handshakes and SSL I/O by getMaxTimeoutOrLimit, so either a send or receive timeout should be enough to stop the operation. This BIO read waits only on getReceiveTimeout; if only setSendTimeout is configured and the peer never sends TLS data, SSL_do_handshake never returns to the outer RemainingTimeCounter / mustRetry loop, so the fiber can hang indefinitely. The write side has the symmetric problem with only setReceiveTimeout. Please use the same max(send, receive) timeout semantics here, with non-positive values meaning no timeout, or make the BIO operation return WANT_READ / WANT_WRITE so SecureSocketImpl owns the remaining-time accounting.
|
@groeneai Help sort out the CI failures. |
|
@nikitamikhaylov Triaged the 3 failing checks on Stress test (amd_tsan) - Stress test (amd_asan_ubsan) - Hung check. The hung query is an AST-fuzzer runaway: Stateless tests (arm_binary, parallel) - vadimskipin already approved. None of these block the reapply. Suggest rebasing on master and re-running (the TSAN |
|
@groeneai Link the existing issues or fixing PRs for all the failures. |
|
@nikitamikhaylov Links per failure:
|
|
@nikitamikhaylov Links per failure: Stress (amd_tsan) Stress (amd_asan_ubsan) hung check (arrayFold runaway): umbrella issue #107941 ("Hung check failed, possible deadlock found"); diagnostic logging in open #105905. No dedicated fix for this specific fuzzer cancelled-query-not-terminating shape, it is the chronic fuzzer hung-check flake (39 PRs + 9 master in 30d). Stateless (arm_binary, parallel) |
|
@groeneai, provide a fix for runaway |
|
It will be reasonable to update the branch and check for CI again. |
|
@alexey-milovidov fix for the runaway
|
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 375/441 (85.03%) | Lost baseline coverage (was covered on master, now uncovered in this PR): 5 line(s) · Uncovered code |
|
@groeneai what's up with the CI failures? |
|
@nikitamikhaylov The only real failure on the current head (
Re-running the arm_tsan stress job should clear it; the assertion is intermittent and not produced by this PR. |

Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Reapply #106078 after #107539.
Add silk fiber aware secure and plain socket implementations.
Version info
26.6.1.1148