QMux TCP shutdown can withhold FIN after a macOS peer half-close

Open
#10,419 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
linux, macos, rust
Domain
networking

Research direction

Start with rs/qmux/src/socket.rs at TcpStats::shutdown and the driver shutdown call in rs/qmux/src/driver.rs. Reproduce the retained stats handle and peer half-close on macOS, then check that Linux still uses two-way shutdown and admits bytes into TCP_INFO during linger. Done means the macOS peer receives EOF with the duplicate handle retained while Linux behavior is preserved.

Written by the indexing model from the issue text.

Description

quest

A macOS TCP loopback probe reproduced a shutdown failure after the peer sent FIN. With a duplicated server descriptor open, shutdown(SHUT_RDWR) failed and the peer was still waiting for EOF. shutdown(SHUT_WR) delivered EOF while the duplicate remained open.

QMux calls TcpStats::shutdown when its driver ends. It drops its own reference, and callers can retain a copy of the stats handle. On macOS that copy can keep the peer waiting if two-way shutdown failed. Shutdown · Driver

Exercise a peer half-close with a retained stats handle on macOS. Preserve Linux two-way shutdown: a separate loopback probe showed that write-only shutdown admitted bytes into TCP_INFO during linger.

(Written by GPT-6.2 Sol with xhigh)

Dominant language
Rust
Stars
1.6k
Forks
251
Avg merge
10h 10m
Merged PRs (30d)
822

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from moq-dev/moq

All issues in moq-dev/moq

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.