Closed Bug 1345728 Opened 3 years ago Closed 3 years ago

Intermittent netwerk/test/mochitests/test_user_agent_updates.html | application crashed [@ mozilla::net::nsSocketTransport::InitiateSocket]

Categories

(Core :: Networking, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox-esr52 --- unaffected
firefox53 --- fixed
firefox54 --- fixed
firefox55 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: jmaher)

Details

(Keywords: intermittent-failure, Whiteboard: [stockwell fixed])

Attachments

(1 file, 1 obsolete file)

Filed by: philringnalda [at] gmail.com

https://treeherder.mozilla.org/logviewer.html#?job_id=82631124&repo=autoland

https://queue.taskcluster.net/v1/task/Op68ush1SRa0pz2CsLETDA/runs/0/artifacts/public/logs/live_backing.log

Since this started when the number of chunks of Android mochitests was increased, the test is probably depending (racily and itermittently, even better) on some other test having run before it runs, some other test which no longer runs in the same chunk.
this is android-debug chunk 47 fyi
this goes back a ways, happens 4-5% of the time, but looking at the failure we have network access to:
https://hg.mozilla.org/mozilla-central/annotate/8dd496fd015a2b6e99573070279d9d1593836ea9/mobile/android/app/mobile.js#l785

which is this line:
pref("general.useragent.updates.url", "https://dynamicua.cdn.mozilla.net/0/%APP_ID%");


and the test case is actually setting the pref to the .sjs file and trying to test updates, so I propose we change the value of this pref in automation in general:
pref("general.useragent.updates.url", "https://example.com/0/%APP_ID%");
here is a clip from the log showing the access to external resources:
[task 2017-03-09T02:50:09.634704Z] 02:50:09     INFO -  03-08 18:47:28.339 I/GeckoDump(  777): ⰲ겿{"action":"test_status","time":1489027648285,"thread":null,"pid":null,"source":"mochitest","test":"/tests/netwerk/test/mochitests/test_user_agent_updates.html","subtest":"A valid string reason is expected","status":"PASS","js_source":"TestRunner.js"}ⰲ겿
[task 2017-03-09T02:50:09.635259Z] 02:50:09     INFO -  03-08 18:47:28.349 I/GeckoDump(  777): ⰲ겿{"action":"test_status","time":1489027648353,"thread":null,"pid":null,"source":"mochitest","test":"/tests/netwerk/test/mochitests/test_user_agent_updates.html","subtest":"Reason cannot be empty","status":"PASS","js_source":"TestRunner.js"}ⰲ겿
[task 2017-03-09T02:50:09.635807Z] 02:50:09     INFO -  03-08 18:47:28.710 W/GeckoConsole(  777): [JavaScript Warning: "The character encoding of a framed document was not declared. The document may appear different if viewed without the document framing it." {file: "http://mochi.test:8888/tests/netwerk/test/mochitests/test_user_agent_updates.html" line: 0}]
[task 2017-03-09T02:50:09.636211Z] 02:50:09     INFO -  03-08 18:47:30.710 I/Gecko   (  777): ++DOCSHELL 0x5d6c7800 == 35 [pid = 777] [id = {863b73f8-c3ce-4b16-aa4e-9e8c4257c90a}]
[task 2017-03-09T02:50:09.636583Z] 02:50:09     INFO -  03-08 18:47:30.710 I/Gecko   (  777): ++DOMWINDOW == 192 (0x5d83a000) [pid = 777] [serial = 195] [outer = 0x0]
[task 2017-03-09T02:50:09.636857Z] 02:50:09     INFO -  03-08 18:47:30.760 I/Gecko   (  777): ++DOMWINDOW == 193 (0x5d83a800) [pid = 777] [serial = 196] [outer = 0x5d83a000]
[task 2017-03-09T02:50:09.637202Z] 02:50:09     INFO -  03-08 18:47:30.959 I/Gecko   (  777): [777] WARNING: NS_ENSURE_TRUE(standardURL) failed: file /home/worker/workspace/build/src/caps/nsPrincipal.cpp, line 229
[task 2017-03-09T02:50:09.637443Z] 02:50:09     INFO -  03-08 18:47:31.460 I/Gecko   (  777): ++DOCSHELL 0x5d843400 == 36 [pid = 777] [id = {48aa90ab-2063-4a8a-96ba-eebdbc2fb62c}]
[task 2017-03-09T02:50:09.637683Z] 02:50:09     INFO -  03-08 18:47:31.460 I/Gecko   (  777): ++DOMWINDOW == 194 (0x5d843c00) [pid = 777] [serial = 197] [outer = 0x0]
[task 2017-03-09T02:50:09.638076Z] 02:50:09     INFO -  03-08 18:47:31.500 I/Gecko   (  777): ++DOMWINDOW == 195 (0x5d844000) [pid = 777] [serial = 198] [outer = 0x5d843c00]
[task 2017-03-09T02:50:09.638480Z] 02:50:09     INFO -  03-08 18:47:31.989 I/Gecko   (  777): FATAL ERROR: Non-local network connections are disabled and a connection attempt to dynamicua.cdn.mozilla.net (54.192.119.148) was made.
[task 2017-03-09T02:50:09.638884Z] 02:50:09     INFO -  03-08 18:47:31.989 I/Gecko   (  777): You should only access hostnames available via the test networking proxy (if running mochitests) or from a test-specific httpd.js server (if running xpcshell tests). Browser services should be disabled or redirected to a local server.
[task 2017-03-09T02:50:09.639159Z] 02:50:09     INFO -  03-08 18:47:31.989 F/MOZ_CRASH(  777): Hit MOZ_CRASH(Attempting to connect to non-local address!) at /home/worker/workspace/build/src/netwerk/base/nsSocketTransport2.cpp:1285
feel free to assign the review to others.

here is a try run:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=3a5f53f0557d5b9717a321b641b03b431d498b28  (just pushed, might need a few hours for results)
Assignee: nobody → jmaher
Status: NEW → ASSIGNED
Attachment #8847766 - Flags: review?(mcmanus)
my patch had a problem with %APP_ID%, I needed %%APP_ID%%, here is a try push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=72bb270413f344e13c3c8043ba49ea98ebe6dfbb&selectedJob=84118548

and mochitest-47:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=72bb270413f344e13c3c8043ba49ea98ebe6dfbb&filter-searchStr=android%20mochitest-47

funny that the one orange is the same test, yet the timeout, not the crash bug.
Attachment #8847766 - Attachment is obsolete: true
Attachment #8847766 - Flags: review?(mcmanus)
Attachment #8848051 - Flags: review?(mcmanus)
Attachment #8848051 - Flags: review?(mcmanus) → review+
Pushed by jmaher@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/431cfe4f484e
Intermittent netwerk/test/mochitests/test_user_agent_updates.html- fix preferences for testing. r=mcmanus
Whiteboard: [stockwell needswork] → [stockwell fixed]
https://hg.mozilla.org/mozilla-central/rev/431cfe4f484e
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.