• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

grpc / grpc-java / #20343
89%

Build:
DEFAULT BRANCH: master
Ran 01 Jul 2026 04:53PM UTC
Jobs 1
Files 685
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Jul 2026 04:40PM UTC coverage: 89.118% (+0.02%) from 89.099%
#20343

push

github

web-flow
xds: Fix half-close race condition in ext-proc client interceptor (#12888)

Resolve a protocol violation bug in ExternalProcessorClientInterceptor
and fix a related data race in its fail-open unit tests:

1. Interceptor Bug Fix (Incorrect Frame Order):
When the external processor stream fails (extProcStreamState is
FAILED/completed)
but the interceptor has not yet transitioned to pass-through mode, a
call to
sendMessage() is buffered, but a call to halfClose() immediately
executed
super.halfClose() because it only checked stream completion. This sent
the
halfClose frame to the backend server before the buffered message was
drained,
violating the gRPC protocol and causing the backend to drop the message.
   
Fixed by modifying halfClose() to only execute immediately if
passThroughMode
is true. If passThroughMode is false and the stream is completed/failed,
halfClose is buffered (pendingHalfClose = true) and deferred until the
draining
   task drains the buffered messages and triggers it.

2. Test Fix (Deterministic Race Simulation):
Redesigned
givenFailureModeAllowTrue_whenExtProcStreamFails_thenCallFailsOpen
in ExternalProcessorClientInterceptorTest to deterministically simulate
the
interleaving that caused the bug. Used a custom ServerInterceptor on the
backend server to suspend the async onError thread inside activateLine()
(midway through fail-open processing) while the client main thread calls
sendMessage() and halfClose(). This forces the race condition and
verifies
   that the message is no longer dropped.

37983 of 42621 relevant lines covered (89.12%)

0.89 hits per line

Coverage Regressions

Lines Coverage ∆ File
9
96.29
0.01% ../xds/src/main/java/io/grpc/xds/ExternalProcessorClientInterceptor.java
1
87.88
-3.03% ../netty/src/main/java/io/grpc/netty/ClientTransportLifecycleManager.java
1
91.59
-0.47% ../xds/src/main/java/io/grpc/xds/client/ControlPlaneClient.java
Jobs
ID Job ID Ran Files Coverage
1 #20343.1 01 Jul 2026 04:53PM UTC 685
89.12
Source Files on build #20343
  • Tree
  • List 685
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20343
  • 53ebe2de on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc