github quic-go/quic-go v0.49.0

one day ago

In this release, we added support for HTTP client traces. We also fixed a large number of bugs that could lead to connection stalls, deadlocks and memory leaks. See the "Major Fixes" section for more details.

New Features

  • http3: add support for client traces net/http/httptrace.ClientTrace: #4749. Thanks to @lRoccoon for the contribution!

Major Fixes

  • fix accounting for lost RESET_STREAM frames in the stream, leading to potential connection stalls / deadlocks: #4804. Thanks to @Wondertan for reporting and testing the fix!
  • fix memory leak when the connection ID is rotated when the CONNECTION_CLOSE packet is sent: #4852. Thanks to @MarcoPolo for debugging this issue and contributing a fix!
  • http3: fix QUIC connection re-dialing logic: #4854, #4875, #4879
  • trigger sending of a new packet when a MAX_DATA frame (connection-level flow control update) is queued: #4844
  • Transport.Close was reworked: calls to Transport.Dial are now canceled, and return the newly introduced ErrTransportClosed, as do calls to Transport.Listen: #4883

Enhancements

  • trace dropping of packets by the Transport when no server is set: #4789
  • trace dropping of packets that the Transport doesn't send a stateless for: #4826
  • drain received packets when the connection is closed: #4773
  • add Prometheus metrics for sent and received packets: #4910
  • reduce calls to time.Now all over the code base: #4731, #4885, #4886, #4906
  • packetize DATA_BLOCKED frames in the same QUIC packet that caused us to block on connection-level flow control: #4845
  • packetize STREAM_DATA_BLOCKED frames in the same QUIC packed that caused us to block on stream-level flow control: #4801
  • we now don't enforce that only one Transport listens on any given net.PacketConn: #4851

Other Fixes

  • drain the server's connection accept queue before returning ErrClosed from Accept: #4846. Thanks to @sukunrt for discovering this bug and providing very helpful reviews!
  • preserve the error returned from SendStream.Write if it is closed after is canceled: #4882
  • fix race condition on concurrent calls to Transport.Dial and Transport.Close: #4904
  • qlog: fix logging of packet_in_flight on the metrics_updated event: #4895
  • fix errors.Is error comparisons: #4824, #4825, #4877
  • http3: fix race condition on concurrent calls to http.Response.Body.Close: #4798. Thanks to @RPRX for the contribution!
  • flowcontrol: reset the connection send window on 0-RTT rejection: #4764
  • wait for connection to shut down when the Dial context is cancelled: #4872
  • http3: the http.Request.Body is now properly closed on all code paths that return a non-nil error: #4874
  • NEW_CONNECTION_ID frames are now rejected when zero-length connection IDs are used, as required by the RFC: #4878
  • the stream ID of STREAM_DATA_BLOCKED frames is now validated, as required by the RFC: #4836
  • fix ECN markings of packets sent in GSO batches when the marking changes: #4835
  • the AEAD used to calculate the Retry Integrity Tag is now created lazily, avoiding a panic on initialization when using Go 1.24 FIPS-only mode: #4916
  • use a 24h maximum token age as default value for Transport.MaxTokenAge: #4763

Behind the Scenes

In the v0.48.0 release, we started migrating our test suite away from Ginkgo (tracking issue: #3652). This is an absolutely massive endeavor. Before we started, the number of LOC of Ginkgo tests was more than 41,000.

In this release, we're bringing this number down to less than 8,500 LOC: #4736, #4746, #4775, #4783, #4788, #4790, #4795, #4796, #4797, #4799, #4814, #4816, #4817, #4823, #4837, #4842, #4847, #4848, #4849, #4853, #4857, #4860, #4861, #4862, #4863, #4864, #4865, #4869, #4876, #4881, #4907.

There's still a lot of work ahead, but we'll hopefully be able to finish this item in the next couple of months.

Changelog

New Contributors

Full Changelog: v0.48.2...v0.49.0

Don't miss a new quic-go release

NewReleases is sending notifications on new releases.