io_uring backend silently drops WebSocket messages above ~2KB( works reliably on epoll)
@cap-code ci sta già lavorando.
Dal 26/7/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 50/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- cpp, ubuntu
- Ambito
- backend, networking
Direzione di ricerca
Reproduce with the listed Ubuntu, liburing 2.6, uSockets commit, and three-frame browser test, then compare io_uring with epoll. Start in the uSockets io_uring backend, focusing on registered or ring-mapped buffers and reassembly when a read spans buffers. Done means every frame within maxPayloadLength reaches the WebSocket message callback, with coverage for the larger frame.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
- uSockets commit: 86097c490263ab662d62e8e7b541390bdec7d149
- liburing: liburing-2.6 tag
- OS: Ubuntu 22.04 (container), 6.8.0-124-generic
- Build: compiled with LIBUS_USE_IO_URING, linked against liburing 2.6
- Server: uWebSockets App/ws (C++), single .message handler, compression = uWS::DISABLED
Summary
On the io_uring backend, WebSocket binary messages above roughly 2–5KB are silently lost, they never reach the .message callback at all (confirmed via unconditional std::cerr logging at the very top of the callback, before any parsing). Smaller messages (a few hundred bytes to ~1.4KB) sent on the same connection, interleaved with the large ones, are delivered reliably every time.
Switching the exact same server code to the epoll backend (rebuilding uSockets without LIBUS_USE_IO_URING / WITH_IO_URING) makes the large messages arrive consistently, 100% of the time in repeated testing. No other code changed.
Repro details
- Client: browser WebSocket (binaryType = 'arraybuffer'), sends 3 binary frames in quick succession on one connection: ~1.3KB, ~5KB, ~200B (gzip payloads with a 1-byte transport-tag prefix).
- Confirmed via Chrome DevTools Network → WS frames tab that all 3 frames leave the browser correctly, including the ~5KB one.
- Server-side: added an unconditional debug print as the very first statement inside the .message handler's downstream processing (before any parsing/decompression), dumping message size + first bytes to stderr.
- Result with LIBUS_USE_IO_URING: only the ~1.3KB and ~200B messages ever print. The ~5KB message never appears in the log at all — not truncated, not corrupted, just entirely absent, as if .message was never invoked for that frame.
- Result on epoll (same binary, same client, same test): all 3 messages, including the ~5KB one, print consistently across repeated runs.
Expected behavior
All WebSocket frames within maxPayloadLength should reach the .message callback regardless of backend, the same as they do on epoll.
Additional notes
- maxPayloadLength was set well above the message size (1MB), so this isn't a payload-length rejection — a rejection would also normally close the connection with 1009, which did not happen here (connection stayed open, the surrounding smaller messages kept flowing fine).
- This looks like it could be related to io_uring's registered/ring-mapped buffer handling and reassembly of a socket read that spans more than one ring buffer, but I haven't traced it in the uSockets io_uring backend source myself
- Lingua principale
- C++
- Stelle
- 19k
- Fork
- 1.9k
- Merge medio
- 7h 38m
- PR unite (30g)
- 3
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di uNetworking/uWebSockets
-
PROXY v2 parser rejects headers carrying TLVs, so IPv6 clients behind HAProxy hangForse già presa @HawkForge l’ha presa 6 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
uNetworking/uWebSockets#1957 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
uNetworking/uWebSockets#1956 ·
-
Add collectBody from uWS.jsAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
uNetworking/uWebSockets#1953 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
uNetworking/uWebSockets#1948 ·
-
Some caching featuresAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
uNetworking/uWebSockets#1945 · 3 commenti ·
Tutte le issue di uNetworking/uWebSockets
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA-RTX/NRI#312 ·
I maintainer di solito rispondono entro 1 giorno
-
permute_q_b_proj / permute_wv_proj accept scale factors from another deviceForse già presa @0z5a l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
deepseek-ai/FlashMLA#247 ·
I maintainer di solito rispondono entro 1 giorno
-
Linux npm packaging leaves workspace files that block subsequent CI checkoutForse già presa @Spockkk0225 l’ha presa oggi. Apertaci
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
alibaba/neug#1195 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 3 giorni