Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firefox connections last ten minutes #1803

Closed
bemasc opened this issue Aug 6, 2015 · 15 comments
Closed

firefox connections last ten minutes #1803

bemasc opened this issue Aug 6, 2015 · 15 comments
Assignees
Labels

Comments

@bemasc
Copy link
Contributor

bemasc commented Aug 6, 2015

Currently, it seems like Firefox (as client) may get bogged down, and eventually disconnect, when in heavy use (i.e. loading several pages simultaneously). More investigation is needed to determine whether this problem is reproducible.

@bemasc bemasc self-assigned this Aug 6, 2015
@bemasc bemasc added this to the v-0.9 Beta milestone Aug 6, 2015
@trevj
Copy link
Contributor

trevj commented Aug 6, 2015

Can you describe your setup?

@bemasc
Copy link
Contributor Author

bemasc commented Aug 6, 2015

Hmm. It's possible that I was not using a new enough build of freedom-for-firefox, and didn't have your fix for the very similar behavior we'd observed previously. I'll test again with the next cut.

@trevj
Copy link
Contributor

trevj commented Aug 6, 2015

Yeah, I''m browsing here with Simple SOCKS on Firefox and don't see any issues...a pretty beefy machine admittedly but, still. I'll continue browsing with it, see how it goes...

@trevj
Copy link
Contributor

trevj commented Aug 7, 2015

Hmm, correction: I am seeing my Firefox proxy die after ~5-10 minutes browsing. Trying to figure out what's happening...looks like I see heartbeat failures, then of course it self-terminates.

@trevj trevj added the P1 label Aug 7, 2015
@trevj trevj changed the title Firefox reliability under load firefox connections last < 10 minutes Aug 7, 2015
@trevj
Copy link
Contributor

trevj commented Aug 7, 2015

I don't know yet what's happening...nothing sticks out to me from the logs. If I had to guess, I'd say there's still some slowdown when there's large numbers of open TCP sockets -- this may happen when actually browsing with the proxy using an actual browser, as a browser typically tries to re-use proxy connections, keeping them open for potentially a long time.

@trevj
Copy link
Contributor

trevj commented Aug 7, 2015

FYI, I only see this with churn.

@bemasc
Copy link
Contributor Author

bemasc commented Aug 10, 2015

EDIT: Moved previous hypothesis to #1830.

Current best thinking from Mozilla is that this is actually a PMTU Discovery bug in usrsctplib. Firefox operates with PMTUD enabled. Detailed tracing shows that something causes packet sizes to start growing, and once a packet reaches 1464 bytes, it can never be received.

This is running through CHURN, which interferes with PMTUD because usrsctplib's implementation is ICMP-based. There is a patch to disable PMTUD under review at https://bugzilla.mozilla.org/show_bug.cgi?id=1194817.

@bemasc bemasc changed the title firefox connections last < 10 minutes High connection latency under load on Firefox with CHURN Aug 13, 2015
@trevj trevj changed the title High connection latency under load on Firefox with CHURN firefox connections last ten minutes Aug 17, 2015
This was referenced Aug 17, 2015
@bemasc
Copy link
Contributor Author

bemasc commented Aug 19, 2015

It looks like this was only showing on localhost-only tests because FF40 and lower were truncating all packets at 1500 bytes. This is fixed in FF41, so we should make sure to test on real networks even if things appear to be working on localhost.

@trevj
Copy link
Contributor

trevj commented Aug 19, 2015

So, you're saying we should incorporate MTU into our tests to prevent false positives on FF 41+?

@bemasc
Copy link
Contributor Author

bemasc commented Aug 19, 2015

Sure, that would be a good way to go.

@trevj
Copy link
Contributor

trevj commented Aug 20, 2015

OK, I've re-opened this issue to track adding MTU to some script we run regularly, e.g. release.py:
#1834

@trevj
Copy link
Contributor

trevj commented Aug 20, 2015

So, to summarise:

  • we have improved uProxy's auto-reconnect feature
  • there is a patch to disable PMTUD worming its way into Firefox
  • this patch should make it into Aurora, i.e. Firefox 42.
  • we will push a little to get this into Firefox 41 (seems reasonable to me, this is a pretty bad bug)

Do you agree, @bemasc?

@bemasc
Copy link
Contributor Author

bemasc commented Aug 20, 2015

OK!

@bemasc
Copy link
Contributor Author

bemasc commented Aug 24, 2015

The underlying Firefox issue has been approved to be merged into Beta, so it will land in stable on Sept. 22.

With the heartbeat timeout change and auto-reconnect (#1836) to mitigate the severity of this issue, I think we've done enough.

@bemasc bemasc closed this as completed Aug 24, 2015
@trevj
Copy link
Contributor

trevj commented Aug 24, 2015

Amazing work!

💯 * 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants