Repository navigation
Reapply "Add silk fibers aware socket implementations" - #107680
Conversation
|
Workflow [PR], commit [59ebbd0] Summary: ❌
AI ReviewSummaryThis PR reapplies the PR Metadata
Missing context / blind spots
Findings
Tests
Final VerdictStatus: Minimum required actions: fix the custom TLS BIO timeout semantics, add focused coverage for the single-timeout cases, and replace the changelog entry with a single user-readable paragraph. |
| { | ||
| 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. |
|
The logical error in RMV refresh is unlikely to be related. The failure in private CI appears to be an infrastructure issue. Merging this PR. |
| silk::initialize(); | ||
| silk::FiberScheduler::Options options; | ||
| /// OpenSSL handshakes run on fiber stacks and need more room than the silk default. | ||
| options.fiberStackSize = 320 * 1024; | ||
| silk::FiberScheduler::initialize(&options); |
There was a problem hiding this comment.
Is this meant to run for all gtests in unit_tests_dbms executable? Because it does run for unrelated tests, e.g. unit_tests_dbms --gtest_filter=Storage/CoordinationTestWithCompression.ChangelogTestBatchOperationsEmpty/MemCompressed. I noticed because it was failing an assert that io_uring_queue_init_params succeeds in FiberScheduler::ProcessorState::initialize:
[07-13 21:46:39] ~/2ClickHouse/build [kref] 0.002s % ./src/unit_tests_dbms --gtest_filter=Storage/CoordinationTestWithCompression.ChangelogTestBatchOperationsEmpty/MemCompressed
Note: Google Test filter = Storage/CoordinationTestWithCompression.ChangelogTestBatchOperationsEmpty/MemCompressed
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !r
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !r
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !r
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !r
zsh: abort (core dumped) ./src/unit_tests_dbms
[07-13 21:46:58] ~/2ClickHouse/build [kref] 4.661s exit: 134 % ./src/unit_tests_dbms --gtest_filter=Storage/CoordinationTestWithCompression.ChangelogTestBatchOperationsEmpty/MemCompressed
Note: Google Test filter = Storage/CoordinationTestWithCompression.ChangelogTestBatchOperationsEmpty/MemCompressed
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !r
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !r
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !r
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !r
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !r
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !r
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !r
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !r
/home/al13n/2ClickHouse/contrib/silk/src/fibers/fiber.cpp:651 assertion failed: !rzsh: abort (core dumped) ./src/unit_tests_dbms
It was failing consistently for a few seconds, then never failed again. Idk what the error was (variable r was optimized out, and the register was clobbered before the crash; but I have a core dump, if that helps somehow).
There was a problem hiding this comment.
It looks like RLIMIT_MEMLOCK was exceeded.
…kets Reapply "Add silk fibers aware socket implementations"
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