Add "Race Cache With Network" status to netmonitor
Categories
(DevTools :: Netmonitor, enhancement, P2)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: valentin, Assigned: tanhengyeow, Mentored)
References
(Blocks 2 open bugs)
Details
(Keywords: good-first-bug)
User Story
See comment #18 for detailed description of what should be done here.
Attachments
(2 files, 10 obsolete files)
20.52 KB,
patch
|
Honza
:
review+
|
Details | Diff | Splinter Review |
6.19 KB,
patch
|
Honza
:
review+
|
Details | Diff | Splinter Review |
Comment 1•8 years ago
|
||
Reporter | ||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
Reporter | ||
Comment 6•8 years ago
|
||
Reporter | ||
Comment 7•8 years ago
|
||
Reporter | ||
Comment 8•8 years ago
|
||
Updated•8 years ago
|
Comment 9•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Comment 11•8 years ago
|
||
Comment 12•8 years ago
|
||
Comment 13•8 years ago
|
||
Updated•7 years ago
|
Reporter | ||
Comment 14•7 years ago
|
||
Updated•7 years ago
|
Comment 15•7 years ago
|
||
Reporter | ||
Comment 16•7 years ago
|
||
Comment 17•7 years ago
|
||
Comment 18•7 years ago
|
||
Comment 19•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Comment 21•7 years ago
|
||
Comment hidden (mozreview-request) |
Comment 23•7 years ago
|
||
Comment 24•7 years ago
|
||
mozreview-review |
Reporter | ||
Comment 25•7 years ago
|
||
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Comment 26•7 years ago
|
||
Comment 27•7 years ago
|
||
Updated•7 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 28•6 years ago
|
||
Comment 29•6 years ago
|
||
Assignee | ||
Comment 30•6 years ago
|
||
Assignee | ||
Comment 31•6 years ago
|
||
Comment 32•6 years ago
|
||
Assignee | ||
Comment 33•6 years ago
|
||
Assignee | ||
Comment 34•6 years ago
|
||
Comment 35•6 years ago
|
||
Reporter | ||
Comment 36•6 years ago
|
||
Assignee | ||
Comment 37•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 38•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 39•6 years ago
|
||
Comment 40•6 years ago
|
||
Assignee | ||
Comment 41•6 years ago
|
||
Comment 42•6 years ago
|
||
Assignee | ||
Comment 43•6 years ago
|
||
Comment 44•6 years ago
|
||
Assignee | ||
Comment 45•6 years ago
|
||
Comment 46•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 47•6 years ago
|
||
Assignee | ||
Comment 48•6 years ago
|
||
Comment 49•6 years ago
|
||
Assignee | ||
Comment 50•6 years ago
|
||
Comment 51•6 years ago
|
||
Assignee | ||
Comment 52•6 years ago
|
||
Assignee | ||
Comment 53•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Comment 54•6 years ago
|
||
Reporter | ||
Comment 55•6 years ago
|
||
Comment 56•6 years ago
|
||
Comment 57•6 years ago
|
||
@Valentin, could you please rebase the platform patch on the latest head?
Thanks!
Honza
Reporter | ||
Comment 58•6 years ago
|
||
Reporter | ||
Comment 59•6 years ago
|
||
Comment on attachment 8976256 [details] [diff] [review]
Add isRacing() to nsICacheInfoChannel
I rebased the patch on top of m-c: see attachment 9036216 [details]
I also added an info line to the test to make sure that it works, at least in non-e10s mode, and it does.
Comment 60•6 years ago
|
||
Rebasing
Honza
Updated•6 years ago
|
Comment 61•6 years ago
•
|
||
Thanks Valentin for the rebase!
(I also rebased the additional patch from Michal)
Similarly to (:tanhengyeow, comment #52), I can't get any request that would have set isRacing
flag to true.
I applied:
-
Bug 1358038 - Add isRacing() to nsICacheInfoChannel r=michal!
The platform API implementation -
force_random_rcwn.patch
Helper from Michal -
Bug 1358038 - Add "Race Cache With Network" status. r=Honza
The UI changes in DevTools
I tried to set the following prefs:
network.http.rcwn.enabled = true
network.http.rcwn.max_wait_before_racing_ms
It looks like nsHTTPChannel.OnCacheEntryCheck
is only called 3 times at the beginning (Firefox start), but never when opening DevTools and loading a page.
channel.isRacing()
returns false all the time for me.
This is what I am doing:
- Apply all the patches above, set prefs above
- Add the following log into network-response-listeners.js, in _getSecurityInfo method:
dump("Racing: " + isRacing)
; - Start Firefox, open DevTools, load google.com
- Select the Network panel, reload the page
- Observe the system console and look for the log from step #2 => It always prints false
@Valentin, could you please check these steps?
Is there anything I am doing wrong?
Does that work for you?
Honza
Comment 62•6 years ago
|
||
@Valentin: do you have time to look at this or should I ask someone else?
Thanks!
Honza
Reporter | ||
Comment 63•6 years ago
•
|
||
(In reply to Jan Honza Odvarko [:Honza] (need-info? me) from comment #62)
@Valentin: do you have time to look at this or should I ask someone else?
Sorry, I've been caught up with other things and I don't know if I can get to it this week.
Comment 65•6 years ago
|
||
I followed the steps in comment #61 and I see false as well as true in the console.
Comment 66•6 years ago
|
||
@Valentin, any chance you could look at this?
Honza
Reporter | ||
Comment 67•6 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #61)
Similarly to (:tanhengyeow, comment #52), I can't get any request that would have set
isRacing
flag to true.I applied:
Bug 1358038 - Add isRacing() to nsICacheInfoChannel r=michal!
The platform API implementationforce_random_rcwn.patch
Helper from MichalBug 1358038 - Add "Race Cache With Network" status. r=Honza
The UI changes in DevTools
Hi Honza,
I applied both D7636 and D8018 (needed a rebase), and I can see both false and a few true results. I tried it on suggested pages in the new tab (wiki, reddit, twitter, etc) and refreshed. The racing=true requests happen in 5-10% of the cases, so the patches seem to work.
Assignee | ||
Comment 68•6 years ago
|
||
Hi Valentin
I'm helping to test this patch. I pulled code from this revision, rebased the patch on top of m-c
's latest changes but failed to build the code.
These are some errors I'm seeing which might aid in investigating the issue:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include/stdarg.h:43:9: note: macro 'va_copy' defined here
10:47.43 #define va_copy(dest, src) __builtin_va_copy(dest, src)
10:47.43 ^
10:47.43 1 warning and 2 errors generated.
10:47.43 make[4]: *** [Unified_cpp_protocol_http1.o] Error 1
11:00.38 make[3]: *** [netwerk/protocol/http/target] Error 2
11:00.38 make[3]: *** Waiting for unfinished jobs....
11:00.52 /Users/seed/Development/mozilla-central/netwerk/sctp/src/netinet/sctp_usrreq.c:1088:11: warning: 'return' will never be executed [-Wunreachable-code-return]
11:00.52 return (0);
11:00.52 ^
11:00.52 /Users/seed/Development/mozilla-central/netwerk/sctp/src/netinet/sctp_usrreq.c:6879:3: warning: code will never be executed [-Wunreachable-code]
11:00.52 sctp_bindx_delete_address(inp, addrs->addr,
11:00.52 ^~~~~~~~~~~~~~~~~~~~~~~~~
11:00.52 /Users/seed/Development/mozilla-central/netwerk/sctp/src/netinet/sctp_usrreq.c:6828:3: warning: code will never be executed [-Wunreachable-code]
11:00.52 sctp_bindx_add_address(so, inp, addrs->addr,
11:00.52 ^~~~~~~~~~~~~~~~~~~~~~
11:00.53 3 warnings generated.
11:00.87 /Users/seed/Development/mozilla-central/netwerk/sctp/src/user_socket.c:2651:37: warning: code will never be executed [-Wunreachable-code]
11:00.87 sa = (struct sockaddr *)((caddr_t)sa + sa->sa_len);
11:00.87 ^~
11:00.87 1 warning generated.
12:12.39 Compiling cert_storage v0.0.1 (/Users/seed/Development/mozilla-central/security/manager/ssl/cert_storage)
12:12.39 Compiling geckoservo v0.0.1 (/Users/seed/Development/mozilla-central/servo/ports/geckolib)
12:31.03 Compiling gkrust v0.1.0 (/Users/seed/Development/mozilla-central/toolkit/library/rust)
12:33.38 Finished release [optimized] target(s) in 10m 56s
12:33.53 Finished release [optimized] target(s) in 10m 56s
12:33.76 Compiling jsrust v0.1.0 (/Users/seed/Development/mozilla-central/js/src/rust)
12:34.16 Finished release [optimized] target(s) in 10m 56s
12:34.21 make[2]: *** [compile] Error 2
12:34.21 make[1]: *** [default] Error 2
12:34.22 make: *** [build] Error 2
12:34.24 155 compiler warnings present.
12:34.37 /usr/local/bin/terminal-notifier -title Mozilla Build System -group mozbuild -message Build failed
Would appreciate some help here!
Reporter | ||
Comment 69•6 years ago
|
||
Can you try to compile it again and look for error:
in the output?
I only see warning:
in what you pasted.
Not sure how va_copy
is related to the failure.
Assignee | ||
Comment 70•6 years ago
|
||
Hi :valentin
Thanks for the help! It turned out to be some rebasing problem that caused the issue faced above so everything's cool now :) Was able to reproduce some racing requests through sites like Reddit/Stack Overflow so the platform side is working correctly. I'm working on updating the DevTools side to show the race status.
:Honza, I've updated D8018 and it successfully shows the race status in the Transferred
column. My test sites were Reddit/Stack Overflow.
Comment 71•6 years ago
|
||
@tanhengyeow:, thanks for the update! (the patch needs rebase)
@valentin: the Network panel UI works for us and we can start landing.
The platform patch needs to be rebased on top of the latest m-c
(conflict with new function arguments).
Can you please rebase, thanks!
Honza
Comment 72•6 years ago
•
|
||
@Michal, can you please rebase the platform patch? Valentin is on PTO for next 3 weeks.
(it's ready to land)
Honza
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 73•6 years ago
|
||
Comment 74•6 years ago
|
||
@tanhengyeow: there are some ESlint failures on try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d7450cf50f3ad8c379f2d8d7324e769e0fd755fd&selectedJob=240406584
Honza
Comment 75•6 years ago
|
||
@Michal: Failed to land, https://lando.services.mozilla.com/D16417/
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. (255, 'applying /tmp/tmpdHz6on\npatching file netwerk/protocol/http/HttpChannelParent.cpp\nHunk #3 FAILED at 1454\n1 out of 3 hunks FAILED -- saving rejects to file netwerk/protocol/http/HttpChannelParent.cpp.rej\npatching file netwerk/protocol/http/HttpChannelChild.cpp\nHunk #4 succeeded at 438 with fuzz 2 (offset 1 lines).\nHunk #6 FAILED at 467\nHunk #7 succeeded at 496 with fuzz 2 (offset 3 lines).\nHunk #8 succeeded at 526 with fuzz 2 (offset 3 lines).\n1 out of 10 hunks FAILED -- saving rejects to file netwerk/protocol/http/HttpChannelChild.cpp.rej\nabort: patch failed to apply', '')
Honza
Assignee | ||
Comment 76•6 years ago
|
||
Attaching the latest patch that is in sync with the Phabricator patch.
Assignee | ||
Comment 77•6 years ago
|
||
This is the latest try results for the attached patch above:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5e005666b61dc36b81c20d1e5b36c4b3e665c444
Haven't look too much into it but the failing tests were mostly related to security tests.
Comment 78•6 years ago
|
||
Thanks!
My try looks better:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d7450cf50f3ad8c379f2d8d7324e769e0fd755fd&selectedJob=240406584
(ESlint failures unrelated)
Honza
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 79•6 years ago
|
||
Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/17f5cadc3b29
Add "Race Cache With Network" status. r=Honza
https://hg.mozilla.org/integration/mozilla-inbound/rev/f1455cdc78ed
"Add "Race Cache With Network" status to netmonitor" r=Honza
Comment 80•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/17f5cadc3b29
https://hg.mozilla.org/mozilla-central/rev/f1455cdc78ed
Comment 81•6 years ago
|
||
I'm a web developer and started seeing (raced) in my network requests as of today, 68.0b13. I'm confused as to what's actually happening though, it seems unclear. I attached an example. Some of the raced requests have status codes, some don't, nothing is grayed out like normal cached requests are. I ran this by a few other people and none of us could figure out exactly what this is supposed to mean.
Don't know if the current UI is final, just putting my two cents out that this is very unclear.
Comment 82•6 years ago
|
||
Actually, I guess I can't add an attachment, sorry for the double comment. It's here: https://i.imgur.com/mA6K80Q.png
Comment 83•6 years ago
|
||
Thanks, I filled a new bug 1561532 (to introduce better UI)
Please comment in that new bug if you have suggestions about how to improve the user experience.
Honza
Description
•