[net] quic: establish a "happened-before" relationship between stream write and read

0 views
Skip to first unread message

Nicholas Husin (Gerrit)

unread,
May 15, 2026, 12:34:58 PM (17 hours ago) May 15
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Nicholas Husin, Damien Neil, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

Nicholas Husin submitted the change

Change information

Commit message:
quic: establish a "happened-before" relationship between stream write and read

This ensures that our race detector will not get tripped off in tests
where we do something like the following:

1. Client writes to a shared variable.
2. Client sends a request to a server.
3. Server handler reads the shared variable.

We are technically over-synchronizing right now by always using the
address of quicSync when calling runtime.RaceAcquire and
runtime.RaceReleaseMerge. However, that is fine for now since this
mostly matters just for testing, and creating a mapping of stream ID to
addressess are rather unclean.

For golang/go#78737
Change-Id: Id65964ad3aa0b2e998e8faf11bfda3c76a6a6964
Reviewed-by: Damien Neil <dn...@google.com>
Reviewed-by: Nicholas Husin <hu...@google.com>
Files:
  • A quic/race_disabled.go
  • A quic/race_enabled.go
  • M quic/stream.go
  • M quic/stream_test.go
Change size: M
Delta: 4 files changed, 85 insertions(+), 2 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: net
Gerrit-Branch: master
Gerrit-Change-Id: Id65964ad3aa0b2e998e8faf11bfda3c76a6a6964
Gerrit-Change-Number: 777940
Gerrit-PatchSet: 3
Gerrit-Owner: Nicholas Husin <n...@golang.org>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Nicholas Husin <hu...@google.com>
Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages