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

icerpc / icerpc-csharp / 34867492348
86%

Build:
DEFAULT BRANCH: main
Ran 14 Sep 2026 04:19PM UTC
Jobs 1
Files 273
Run time 3min
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

14 Sep 2026 04:15PM UTC coverage: 85.602% (-0.2%) from 85.762%
34867492348

push

github

web-flow
Send the deferred Slic StreamReadsClosed frame when the peer closes writes first (#4947)

A client that cancels an invocation while the server is still sending
the response can leak a bidirectional stream slot on its connection.
Each such cancellation leaves one stream that never closes, and once the
connection's bidirectional stream limit is reached, every new invocation
on it blocks until the connection is closed.

The cause is on the server side of the stream. When the server has
consumed the whole request, it defers its `StreamReadsClosed` frame so
that it can be bundled with the response's `StreamLast` frame in a
single write. When the client's own `StreamReadsClosed` frame (sent when
it stops reading the response) closes the server's writes first, the
`StreamLast` frame is never written and the deferred `StreamReadsClosed`
frame was never sent: the client stream is left waiting for it and is
never released.

This happens in three timings, each covered by a new test:

- the response's endStream write is parked (exhausted peer window or
connection write semaphore) and is canceled by the client's frame;
- the client's frame arrives before the endStream write is attempted, so
the write fails right away;
- no endStream write is attempted at all (`CopyFromAsync` returns as
soon as writes are closed and the dispatch completes the output).

The rollback added in #4765 doesn't cover these cases because
`_writesClosedTcs`, which it keys on, is also completed when the peer
closes writes.

The leak shows up when the client's `StreamLast` frame is sent by the
output completion rather than by an endStream write: raw
`IMultiplexedStream` usage, or a plain `PipeWriter` payload decorator
such as the compressor. After an endStream write, `CloseWrites`
currently closes the local stream's writes as soon as the output is
completed instead of waiting for the peer's `StreamReadsClosed` frame
(#4788), which hides the leak for that shape; the tests therefore send
the cl... (continued)

12818 of 14974 relevant lines covered (85.6%)

2812.11 hits per line

Coverage Regressions

Lines Coverage ∆ File
19
89.14
-1.51% IceRpc/Transports/Slic/Internal/SlicConnection.cs
15
92.34
-0.78% IceRpc/Transports/Slic/Internal/SlicStream.cs
5
91.41
-0.54% IceRpc/Server.cs
3
89.5
-0.31% IceRpc/Internal/IceProtocolConnection.cs
2
77.2
-0.8% IceRpc/Transports/Tcp/Internal/TcpConnection.cs
Jobs
ID Job ID Ran Files Coverage
1 34867492348.1 14 Sep 2026 04:19PM UTC 3798
15.58
GitHub Action Run
Source Files on build 34867492348
  • Tree
  • List 273
  • Changed 204
  • Source Changed 0
  • Coverage Changed 204
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34867492348
  • f1d5e4ec on github
  • Prev Build on main (#34866942006)
  • Next Build on main (#34884782851)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc