Comments (5)
Sounds like a Firefox issue then? Have you recorded a qlog and loaded it into qvis yet? That would allow you to see why exactly things are getting stuck.
from webtransport-go.
Well, this is fun ..
I am trying to capture a qlog by setting network.http.http3.enable_qlog
in about:config
.. and this generally works. Visiting Google produces a useful trace, too. But my application on localhost
only seems to record the handshake for some reason. When I try to host the application on a Hetzner server, the issue does not appear at all; probably because the round-trip times are long enough to avoid whatever is going wrong here. I'll give it a few more attempts.
The qlog does record beyond the initial handshake but it's broken for some reason.
After quite the odyssey with Wireshark and pcap2qlog
(+ PR 12, and another fix for padding packets) I've generated something that loads in qvis, although it looks really wild and I'm not sure if this is correctly converted. Attached here, if you want to take a look, too @marten-seemann: 97b1e85bb8a8870669739fc5b8f0c52e1665a0bf.qlog.txt
Now I noticed that if I initiate the stream in the client with (Doesn't always work either.)await transport.createBidirectionalStream()
(but still send the same data from the server!), the issue does not occur. Then the qlog saved by Firefox is not corrupted either and it loads fine in qvis.
from webtransport-go.
I somehow managed to grab a successful qlog of a connection where this issue occured. In the visualization it looked like all data has been received successfully by Firefox this time (the "Packetization" tab showed the expected number of "Bytes received"). Yet the async iterator in Firefox was still stuck after about 1.2 MiB.
Two days ago I thought that maybe increasing the receive buffer size would help. But it turns out that decreasing it actually solved my issue.
The setting network.http.http3.recvBufferSize
is set to 1048576
by default for me. I reduced this to 32768
(32 KiB) and all data was transmitted correctly. When network.http.http3.enable_qlog
is also enabled, I can increase the receive buffer size further to 65536
(64 KiB). So it seems that I just need to "slow down" reception of frames somehow.
Anyway. This really seems like a Firefox issue to me, so I'm closing this issue. I have no idea how to debug this further but I'm happy to have found a way around it for now.
from webtransport-go.
You could also try recording a qlog from the quic-go side. Might be interesting to get the server's perspective on this.
from webtransport-go.
Sure. I've added a connection tracer to the reproducer per the example in quic-go
and recorded a connection where this issue occured from "both sides". For this I reset the receive buffer size in Firefox to its default value.
You can see that the server hangs after 19 iterations (~ 1945600 bytes):
And the browser only "received" 889941 bytes. (The CHUNK
s don't map cleanly to iterations because I am just sending zeroes and log the chunks as fast as they arrive in the async iterator.)
I haven't looked at the qvis of those two logs in detail yet but maybe you can find something interesting in them. Luckily, the client log is not corrupted this time; it apprears this also only happens sporadically.
I don't see anything "suspicious" around the 889941 byte mark (around packet 682 on stream 7).
However, there are a few max_stream_data
and stream_data_blocked
frames towards the end (e.g. packet 1295), which is probably the browser correctly applying back-pressure?
Also, 889941 (the bytes that showed up in the browser console) + 1048576 (default recvBufferSize
) = 1938517 is eerily close to 1938520 (the limit in the last stream_data_blocked
frame) ...
The more I look at it, the more I think that this is a Firefox issue somewhere between neqo
and the ReadableStream
API?
from webtransport-go.
Related Issues (20)
- cmd
- webtransport.Stream implementing net.Conn HOT 2
- Media streaming problem HOT 1
- TLS issue for ECDSA cert
- use HTTP/3 capsules for closing the connection
- flaky TestBidirectionalStreamsDataTransfer/server-initiated test HOT 1
- ReadAll() Implementation for bidirectional stream HOT 2
- flaky TestOpenStreamSyncShutdown/bidirectional_streams HOT 1
- Can we enable discussions? HOT 1
- Typescript bindings for webtransport HOT 1
- flaky TestOpenStreamSyncShutdown
- Panic on assignment to entry in nil map at `streamsMap.AddStream` HOT 1
- quic-go: HasPacingBudget Issue HOT 3
- How to negotiate a subprotocol ? HOT 4
- Closing a bidirectional stream
- Reporting a vulnerability HOT 2
- Can I deploy this service in K8s (Kubernetes)? HOT 1
- Corruption of unknown origin in data sent through unidirectional stream HOT 3
- race condition writing the stream header when calling Write and Close HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webtransport-go.