Git Product home page Git Product logo

Comments (5)

marten-seemann avatar marten-seemann commented on June 15, 2024

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.

ansemjo avatar ansemjo commented on June 15, 2024

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.
image


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

image


Now I noticed that if I initiate the stream in the client with 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. (Doesn't always work either.)

from webtransport-go.

ansemjo avatar ansemjo commented on June 15, 2024

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.

marten-seemann avatar marten-seemann commented on June 15, 2024

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.

ansemjo avatar ansemjo commented on June 15, 2024

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):

Screenshot from 2023-07-14 14-05-14

And the browser only "received" 889941 bytes. (The CHUNKs 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.)

Screenshot from 2023-07-14 14-04-50

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.