Closed
Bug 1235509
Opened 9 years ago
Closed 9 years ago
Refreshing IPv6 addresses kills all TCP connections
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla46
| Tracking | Status | |
|---|---|---|
| firefox46 | --- | fixed |
People
(Reporter: u559402, Assigned: dragana)
References
Details
Attachments
(1 file, 2 obsolete files)
|
7.37 KB,
patch
|
dragana
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0
Build ID: 20151210085006
Steps to reproduce:
When an IPv6 router advertisement is received, Firefox closes open sockets, causing data loss.
This is the case even if the router advertisement doesn't actually change the IPv6 addresses, but only refreshes the lifetimes of existing addresses. On an IPv6-capable network, this happens fairly frequently (once every few minutes or once every few seconds).
See similar problem on Chromium: https://code.google.com/p/chromium/issues/detail?id=100690
Actual results:
Firefox closes TCP sockets.
Expected results:
Firefox sockets are closed only if the addresses really changed.
| Assignee | ||
Comment 1•9 years ago
|
||
This probably has something to do with network link change events.
Asking Daniel.
i could take a look too
Flags: needinfo?(daniel)
| Assignee | ||
Comment 2•9 years ago
|
||
| Assignee | ||
Comment 3•9 years ago
|
||
Assignee: nobody → dd.mozilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(daniel)
Attachment #8703524 -
Flags: feedback?(daniel)
Comment 4•9 years ago
|
||
doesn't this risk of growing a bit too much if we never evict old entries from that hash? Like for a long-running browser on a system that changes IPv6 address very frequently?
| Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Daniel Stenberg [:bagder] from comment #4)
> doesn't this risk of growing a bit too much if we never evict old entries
> from that hash? Like for a long-running browser on a system that changes
> IPv6 address very frequently?
We also listen to RTM_DELADDR so addresses will be deleted too. If it is only a change to an existing ip address we are not making a new entry.
Comment 6•9 years ago
|
||
Oh right. So the hash contains added addresses and removed addresses get removed from the hash again. So it basically stops sending network change requests if RTM_NEWADDR arrives and it actually wasn't a new address but one we already have. Right? Seems fine!
Is this really what happens? We subscribe to IP address and route changes on the netlink socket, I don't understand why it signals us without an actual change. But it looks like this was exactly what Chrome did to their code to avoid the similar problem. (https://src.chromium.org/viewvc/chrome/trunk/src/net/base/address_tracker_linux.cc)
It smells like this could also be related to which Linux kernel that's used too, potentially even how it has been configured/built.
| Assignee | ||
Comment 7•9 years ago
|
||
(In reply to Daniel Stenberg [:bagder] from comment #6)
> Oh right. So the hash contains added addresses and removed addresses get
> removed from the hash again. So it basically stops sending network change
> requests if RTM_NEWADDR arrives and it actually wasn't a new address but one
> we already have. Right? Seems fine!
>
yes.
> Is this really what happens? We subscribe to IP address and route changes on
> the netlink socket, I don't understand why it signals us without an actual
> change. But it looks like this was exactly what Chrome did to their code to
> avoid the similar problem.
> (https://src.chromium.org/viewvc/chrome/trunk/src/net/base/
> address_tracker_linux.cc)
>
It changes the lifetime of ipv6v address but we should not care about these changes
valid_lft or preferred_lft changes
> It smells like this could also be related to which Linux kernel that's used
> too, potentially even how it has been configured/built.
| Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8703524 -
Attachment is obsolete: true
Attachment #8703524 -
Flags: feedback?(daniel)
Attachment #8705124 -
Flags: review?(daniel)
Comment 9•9 years ago
|
||
As I'm not a peer in the networking code (yet), I'd like to get a formal OK from someone like :mcmanus so that I can review and r+ it properly !
Flags: needinfo?(mcmanus)
Comment 10•9 years ago
|
||
(In reply to Daniel Stenberg [:bagder] from comment #9)
> As I'm not a peer in the networking code (yet), I'd like to get a formal OK
> from someone like :mcmanus so that I can review and r+ it properly !
go ahead
Flags: needinfo?(mcmanus)
Comment 11•9 years ago
|
||
Comment on attachment 8705124 [details] [diff] [review]
bug_1235509_v2.patch
It looks good!
What could possibly be added, at least when working for this particular case, is a more dedicated log output for when an identical address is detected (and ignored) as it would more positively prove that we have addressed the problem we suspect is happening.
Attachment #8705124 -
Flags: review?(daniel) → review+
Comment 13•9 years ago
|
||
as discussed in the necko meeting - we're going to pref off the linux link monitor code for 45 and 44 under only Linux (if allowed, but I tihnk its a good idea) and pursue the fix on the trunk only. That will make 44 work like 42 - essentially reintroducing the long standing problems resuming from sleep that 43 fixed, but fixing this problem that hits you when you aren't doing anything unusual like sleeping or moving. :bagder and ::dd.mozilla are taking responsibility for making that happen.
| Reporter | ||
Comment 15•9 years ago
|
||
Setting network.notify.changed pref to false really fixes this problem on Firefox v43 installed from Ubuntu repos. Thank you!
| Assignee | ||
Comment 18•9 years ago
|
||
only logging added
Attachment #8705124 -
Attachment is obsolete: true
Attachment #8706373 -
Flags: review+
| Assignee | ||
Comment 19•9 years ago
|
||
| Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 20•9 years ago
|
||
Keywords: checkin-needed
Comment 21•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in
before you can comment on or make changes to this bug.
Description
•