[Bug] Server spams chunk sink send failure logs when client drops ungracefully #1

Closed
opened 2026-08-10 21:28:10 +00:00 by Serkyo · 0 comments
Owner

Synvael Version or Commit Hash

64fec97d4f

Operating System

Cachy OS

Description

When a client connects to the server, requests a chunk subscription, and then disconnects ungracefully before the server finishes sending all requested chunks, the server begins heavily spamming debug logs.

Because the chunk_stream_task ends when the stream is broken, the ChunkSink receiver is dropped. However, the simulation loop doesn't instantly drop the client (waiting for a QUIC timeout). ClientStream::flush() continues attempting to send up to 32 chunks per tick to the dropped receiver, resulting in the log chunk sink send failed; connection task has ended printing hundreds of times per second until the QUIC connection finally times out (~10 seconds later).

Steps to Reproduce

  1. Run the server.
  2. Connect with a client.
  3. Ungracefully kill the client (e.g., force quit the process or disconnect the network) before it finishes downloading the chunks.
  4. Observe the server's debug output being flooded with chunk sink send failed messages until it reports a client timeout.

Logs / Backtrace

2026-08-10T21:20:18.410319Z DEBUG net::chunk: chunk sink send failed; connection task has ended
[... repeats up to 640 times per second ...]
2026-08-10T21:20:28.418086Z  INFO server: client disconnected id=0 reason=timed out

Scope of Changes

server, networking

### Synvael Version or Commit Hash 64fec97d4f ### Operating System Cachy OS ### Description When a client connects to the server, requests a chunk subscription, and then disconnects ungracefully before the server finishes sending all requested chunks, the server begins heavily spamming debug logs. Because the `chunk_stream_task` ends when the stream is broken, the `ChunkSink` receiver is dropped. However, the simulation loop doesn't instantly drop the client (waiting for a QUIC timeout). `ClientStream::flush()` continues attempting to send up to 32 chunks per tick to the dropped receiver, resulting in the log `chunk sink send failed; connection task has ended` printing hundreds of times per second until the QUIC connection finally times out (~10 seconds later). ### Steps to Reproduce 1. Run the server. 2. Connect with a client. 3. Ungracefully kill the client (e.g., force quit the process or disconnect the network) before it finishes downloading the chunks. 4. Observe the server's debug output being flooded with chunk sink send failed messages until it reports a client timeout. ### Logs / Backtrace ````shell 2026-08-10T21:20:18.410319Z DEBUG net::chunk: chunk sink send failed; connection task has ended [... repeats up to 640 times per second ...] 2026-08-10T21:20:28.418086Z INFO server: client disconnected id=0 reason=timed out ```` ### Scope of Changes server, networking
Serkyo self-assigned this 2026-08-10 21:30:32 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Synvael/synvael#1
No description provided.