Skip to content

THRIFT-6443: Count a client dropped while sending in the dispatch_rejection test - #4037

Merged
Jens-G merged 1 commit into
apache:masterfrom
Jens-G:THRIFT-6443
Oct 22, 2026
Merged

Jens-G merged 1 commit into
apache:masterfrom
Jens-G:THRIFT-6443

Conversation

@Jens-G

@Jens-G Jens-G commented Oct 21, 2026

Copy link
Copy Markdown
Member

THRIFT-6443

dispatch_rejection/too_many_pending_tasks_does_not_end_the_server in TServerIntegrationTest fails intermittently on Windows with "no client was dropped; the pool was not driven into rejection". Since 2026-10-19, 15 of the 45 AppVeyor jobs on commits that contain the case failed that way (MSVC2022 and MinGW), and none of the 15 jobs without it. The GitHub Actions MSVC build is hit too, for example on master 47fe9968f and d01c127d0.

The server does what it should; the test misses the drops. With a non-blocking dispatch, serve() rejects and closes a client right after accepting it, while the test client still writes its request in several send() calls. When the close gets there first, the send fails ("An established connection was aborted by the software in your host machine" in every failing log), the catch (...) discards that client, and it never reaches the end-of-stream check. When that happens to every rejected client, the check finds no drop.

The test now counts a fired client whose send fails with a transport error other than a timeout as dropped, like one that reads end-of-stream or a reset. Test-only change.

Checked in thrift:jammy (Release build of TServerIntegrationTest):

variant result
master test, interleaving forced (each fired client writes one byte, waits 200 ms, then sends) 5 of 5 fail with the CI message; the sends fail with "Broken pipe"
this branch, same forced interleaving 5 of 5 pass
master test, unchanged dispatch_rejection 15 of 15 pass
this branch, unchanged dispatch_rejection 15 of 15 pass, whole module "No errors detected"

The forced interleaving was a local experiment only and is not part of the change. On Windows, only CI can show the effect: the MSVC job and AppVeyor of this PR.

  • Apache Jira ticket: THRIFT-6443
  • Single commit
  • Code change, so the commit carries no CI-skip marker.

🤖 Generated with Claude Code

…ection test

Client: cpp

With a non-blocking dispatch, serve() rejects and closes a client right
after accepting it, while the test client may still be writing its
request. When the close got there first, the send failed, the test
discarded that client, and if that happened to every rejected client
the check found no drop. too_many_pending_tasks_does_not_end_the_server
failed that way in about a third of the Windows CI jobs.

A fired client whose send fails with a transport error other than a
timeout now counts as dropped, like one that reads end-of-stream or a
reset.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@mergeable mergeable Bot added the c++ Pull requests that update C++ code label Oct 21, 2026
@Jens-G
Jens-G merged commit 9931271 into apache:master Oct 22, 2026
200 of 201 checks passed
@Jens-G
Jens-G deleted the THRIFT-6443 branch October 22, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Pull requests that update C++ code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant