QuicheQuicStreamChannel does not properly handle QUICHE_ERR_DONE
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #16917 by @schiemon — closed without merging
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- java
- Domain
- networking
Research direction
Start with QuicheQuicStreamChannel's handling of quiche_conn_stream_send results, then inspect QuicStreamShutdownTest#testShutdownInputClosureCausesStreamStopped and its shutdown sequence. Reproduce the described write after input shutdown and verify that QUICHE_ERR_DONE fails the promise and updates the stream channel lifecycle; also assess how output shutdown should be exposed.
Written by the indexing model from the issue text.
Description
When writing a buffer, quiche_conn_stream_send can return QUICHE_ERR_DONE which implies the buffer could not be written because the stream is considered as closed and therefore the associated promise should be failed, most likely an event should be emitted as well.
Steps to reproduce: modify QuicStreamShutdownTest#testShutdownInputClosureCausesStreamStopped such as
- replace
channelReadreaction byuserEventTriggeredreacting toChannelInputShutdownEventwith a buffer write to the stream - the remote side now should perform the sequence
- stream write and flush (creates the stream)
- shutdown input (which sends a stop sending frame, with which Quiche will respond with a reset frame)
- shutdown output (which sends a stream frame with fin bit set)
Since output is shutdown, Quiche does not handle report the write as a QUICHE_ERR_STREAM_STOPPED error but instead considers the stream is closed and reports QUICHE_ERR_DONE.
Technically the stream is closed (both ways are shutdown), I can see two issues here
- the write promise should be failed (like with
QUICHE_ERR_STREAM_STOPPED) - this should be update the stream channel lifecycle
Another concern, as it stands the only way to detect output shutdown (because a STOP_SENDING frame was received) is with a stream write operation that signals QUICHE_ERR_STREAM_STOPPED or QUICHE_ERR_DONE, which does not seem ideal for developing application protocols.
This echoes the concern I raised in the reset issue.
- Dominant language
- Java
- Stars
- 35.1k
- Forks
- 16.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 385
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from netty/netty
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
CONNECT with forbidden :scheme/:path is acceptedPossibly taken @zsewasdsdsd claimed this 42 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Informational response HEADERS with END_STREAM is acceptedPossibly taken @kimsanhaa claimed this 58 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
resetStream can send RST_STREAM for an idle streamPossibly taken @Asthenia0412 claimed this 45 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Deprecated code in 5.x documentationMay be free again @seanxuu claimed this 84 days ago, and no pull request is open. Open
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
netty/netty#17372 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Android Bug Core Drape
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
organicmaps/organicmaps#14449 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openhab/openhab-addons#22512 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/lints#1871 ·
Maintainers usually reply within 1 day
-
help wanted maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/maven-war-plugin#694 ·
Maintainers usually reply within 1 day
-
help wanted maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/maven-resolver-ant-tasks#219 ·
Maintainers usually reply within 1 day