Closed Bug 1602832 Opened 11 months ago Closed 5 months ago

[socket process] Enable xpcshell tests for socket process

Categories

(Core :: Networking, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: kershaw, Assigned: kershaw)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(6 files, 4 obsolete files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

Currently, the socket process is disabled when e10s is not enabled.
This means that we are unable to run all unit tests in netwerk/test/unit/ for socket process.

Summary: [socket process] Enable xpcshell tests socket process → [socket process] Enable xpcshell tests for socket process
Assignee: nobody → kershaw
Priority: -- → P2
Whiteboard: [necko-triaged]
Blocks: socket-proc

(In reply to Kershaw Chang [:kershaw] from comment #0)

Currently, the socket process is disabled when e10s is not enabled.
This means that we are unable to run all unit tests in netwerk/test/unit/ for socket process.

So, does it work when e10s is enabled? Because if so, that would mean that tests in netwerk/test/unit_ipc/ are run, which normally just wrap the ones in netwerk/test/unit/ - I assume the problem is that we want to test main process things as with the regular unit tests, but exercise the codepaths of the socket process?

(In reply to Valentin Gosu [:valentin] (he/him) [PTO until Jan 6th] from comment #1)

(In reply to Kershaw Chang [:kershaw] from comment #0)

Currently, the socket process is disabled when e10s is not enabled.
This means that we are unable to run all unit tests in netwerk/test/unit/ for socket process.

So, does it work when e10s is enabled? Because if so, that would mean that tests in netwerk/test/unit_ipc/ are run, which normally just wrap the ones in netwerk/test/unit/ - I assume the problem is that we want to test main process things as with the regular unit tests, but exercise the codepaths of the socket process?

Yes, I think running regulat unit tests with socket process is really important. Tests in netwerk/test/unit_ipc/ are not enough.

Byron, could you remind me again why you added the code here?

Flags: needinfo?(docfaraday)

(In reply to Kershaw Chang [:kershaw] from comment #2)

(In reply to Valentin Gosu [:valentin] (he/him) [PTO until Jan 6th] from comment #1)

(In reply to Kershaw Chang [:kershaw] from comment #0)

Currently, the socket process is disabled when e10s is not enabled.
This means that we are unable to run all unit tests in netwerk/test/unit/ for socket process.

So, does it work when e10s is enabled? Because if so, that would mean that tests in netwerk/test/unit_ipc/ are run, which normally just wrap the ones in netwerk/test/unit/ - I assume the problem is that we want to test main process things as with the regular unit tests, but exercise the codepaths of the socket process?

Yes, I think running regulat unit tests with socket process is really important. Tests in netwerk/test/unit_ipc/ are not enough.

Byron, could you remind me again why you added the code here?

I think it was because none of the IPC interfaces worked when the parent process was calling API on the socket process. All of that API was written to be exposed to a content process.

Flags: needinfo?(docfaraday)

(In reply to Byron Campen [:bwc] from comment #5)

(In reply to Kershaw Chang [:kershaw] from comment #2)

(In reply to Valentin Gosu [:valentin] (he/him) [PTO until Jan 6th] from comment #1)

(In reply to Kershaw Chang [:kershaw] from comment #0)

Currently, the socket process is disabled when e10s is not enabled.
This means that we are unable to run all unit tests in netwerk/test/unit/ for socket process.

So, does it work when e10s is enabled? Because if so, that would mean that tests in netwerk/test/unit_ipc/ are run, which normally just wrap the ones in netwerk/test/unit/ - I assume the problem is that we want to test main process things as with the regular unit tests, but exercise the codepaths of the socket process?

Yes, I think running regulat unit tests with socket process is really important. Tests in netwerk/test/unit_ipc/ are not enough.

Byron, could you remind me again why you added the code here?

I think it was because none of the IPC interfaces worked when the parent process was calling API on the socket process. All of that API was written to be exposed to a content process.

I'm not sure which API is exposed to content process only. Maybe you can give me an example?

Everything in here:

https://searchfox.org/mozilla-central/source/dom/media/webrtc/PMediaTransport.ipdl

Note that all of the "parent" API runs on the socket process. If the parent process wanted to use that API, it would need to use it as a child, which I don't think works.

I'll come back to this when bug 1512471 is completed.

Depends on: 1512471
Depends on: 1621601
See Also: → 1622855
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9c955a99c95d
P1: Run xpcshell tests without e10s with socket process r=dragana
https://hg.mozilla.org/integration/autoland/rev/4c3764b3d7bc
P2: Create 'socketprocess_networking' test variant r=ahal
https://hg.mozilla.org/integration/autoland/rev/9123faab0d42
P3: Skip failed tests r=dragana

Backed out 3 changesets (bug 1602832) for assertion failing on IOInterposer.cpp

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=os%2Cx%2C10.14%2Cdebug%2Ctest-macosx1014-64%2Fdebug-gtest-1proc%2C%28gtest%29&fromchange=d70d390ee53c8cf38d305d999f3155fc56e5cc01&tochange=1c9eb89172abbf4668dd27026053bc629fa90c15&selectedJob=294032309

Backout link: https://hg.mozilla.org/integration/autoland/rev/b7b401010ae84a441fd15b800e26e1932a4fc462

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=294032309&repo=autoland&lineNumber=338628

[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  TEST-START | SrtpParamInit/TransportSrtpParameterTest.TestSrtpCiphersMismatchCombinations/1
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  Checking cipher: 8
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  TEST-PASS | SrtpParamInit/TransportSrtpParameterTest.TestSrtpCiphersMismatchCombinations/1 | test completed (time: 224ms)
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  TEST-START | SrtpParamInit/TransportSrtpParameterTest.TestSrtpCiphersMismatchCombinations/2
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  Checking cipher: 1
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  TEST-PASS | SrtpParamInit/TransportSrtpParameterTest.TestSrtpCiphersMismatchCombinations/2 | test completed (time: 399ms)
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  TEST-PASS | GTest unit test: passed
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  Passed: 4452
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  Failed: 0
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  [1706, Main Thread] WARNING: NS_ENSURE_SUCCESS_VOID(rv) failed with result 0x80070057: file /builds/worker/checkouts/gecko/extensions/permissions/nsPermissionManager.cpp, line 1664
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  [1706, Main Thread] WARNING: '!gBaseDirPath', file /builds/worker/checkouts/gecko/dom/quota/ActorsParent.cpp, line 3188
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  [1706, Main Thread] WARNING: profile-do-change must precede profile-before-change-qm!: file /builds/worker/checkouts/gecko/dom/quota/ActorsParent.cpp, line 3189
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  Assertion failure: curThreadData, at /builds/worker/checkouts/gecko/xpcom/build/IOInterposer.cpp:516
[task 2020-03-20T11:42:43.284Z] 11:42:43     INFO -  #01: nsThread::ThreadFunc(void*) [xpcom/threads/nsThread.cpp:491]
[task 2020-03-20T11:42:43.678Z] 11:42:43     INFO -  #02: _pt_root [nsprpub/pr/src/pthreads/ptthread.c:204]
[task 2020-03-20T11:42:43.678Z] 11:42:43     INFO -  #03: libsystem_pthread.dylib + 0x32eb
[task 2020-03-20T11:42:43.678Z] 11:42:43     INFO -  #04: libsystem_pthread.dylib + 0x6249
[task 2020-03-20T11:42:43.679Z] 11:42:43     INFO -  Finished running GTest tests.
Flags: needinfo?(kershaw)

Also seeing linux gtest crashes starting with the backed out chages:
https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=gtest&tochange=1c9eb89172abbf4668dd27026053bc629fa90c15&fromchange=d70d390ee53c8cf38d305d999f3155fc56e5cc01&selectedJob=294062020

https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=294062020&repo=autoland&lineNumber=340093

[task 2020-03-20T14:21:07.647Z] 14:21:07     INFO -  TEST-START | SrtpParamInit/TransportSrtpParameterTest.TestSrtpCiphersMismatchCombinations/2
[task 2020-03-20T14:21:07.651Z] 14:21:07     INFO -  Checking cipher: 1
[task 2020-03-20T14:21:07.868Z] 14:21:07     INFO -  TEST-PASS | SrtpParamInit/TransportSrtpParameterTest.TestSrtpCiphersMismatchCombinations/2 | test completed (time: 213ms)
[task 2020-03-20T14:21:07.868Z] 14:21:07     INFO -  TEST-PASS | GTest unit test: passed
[task 2020-03-20T14:21:07.868Z] 14:21:07     INFO -  Passed: 4555
[task 2020-03-20T14:21:07.868Z] 14:21:07     INFO -  Failed: 0
[task 2020-03-20T14:21:07.912Z] 14:21:07     INFO -  Finished running GTest tests.
[task 2020-03-20T14:21:07.988Z] 14:21:07     INFO -  gtest INFO | gtest | process wait complete, returncode=0
[task 2020-03-20T14:21:07.988Z] 14:21:07     INFO -  mozcrash INFO | Downloading symbols from: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/JgXBhfxrSQCXSegwavZRcg/artifacts/public/build/target.crashreporter-symbols.zip
[task 2020-03-20T14:21:12.228Z] 14:21:12     INFO -  mozcrash INFO | Copy/paste: /builds/worker/fetches/minidump_stackwalk/minidump_stackwalk /builds/worker/workspace/build/tests/gtest/309a772e-f2db-4c09-99b2-8b34bee70951.dmp /tmp/tmpx2X2PS
[task 2020-03-20T14:21:17.130Z] 14:21:17     INFO -  mozcrash INFO | Saved minidump as /builds/worker/workspace/build/blobber_upload_dir/309a772e-f2db-4c09-99b2-8b34bee70951.dmp
[task 2020-03-20T14:21:17.131Z] 14:21:17     INFO -  mozcrash INFO | Saved app info as /builds/worker/workspace/build/blobber_upload_dir/309a772e-f2db-4c09-99b2-8b34bee70951.extra
[task 2020-03-20T14:21:17.131Z] 14:21:17  WARNING -  PROCESS-CRASH | gtest | application crashed [@ mozilla::SetSocketProcessSandbox(int)]
[task 2020-03-20T14:21:17.131Z] 14:21:17     INFO -  Crash dump filename: /builds/worker/workspace/build/tests/gtest/309a772e-f2db-4c09-99b2-8b34bee70951.dmp
[task 2020-03-20T14:21:17.131Z] 14:21:17     INFO -  Operating system: Linux
[task 2020-03-20T14:21:17.131Z] 14:21:17     INFO -                    0.0.0 Linux 4.4.0-1014-aws #14taskcluster1-Ubuntu SMP Tue Apr 3 10:27:00 UTC 2018 x86_64
[task 2020-03-20T14:21:17.133Z] 14:21:17     INFO -  CPU: amd64
[task 2020-03-20T14:21:17.133Z] 14:21:17     INFO -       family 6 model 62 stepping 4
[task 2020-03-20T14:21:17.134Z] 14:21:17     INFO -       8 CPUs
[task 2020-03-20T14:21:17.134Z] 14:21:17     INFO -  GPU: UNKNOWN
[task 2020-03-20T14:21:17.134Z] 14:21:17     INFO -  Crash reason:  SIGSEGV /SEGV_MAPERR
[task 2020-03-20T14:21:17.134Z] 14:21:17     INFO -  Crash address: 0x0
[task 2020-03-20T14:21:17.135Z] 14:21:17     INFO -  Process uptime: not available
[task 2020-03-20T14:21:17.135Z] 14:21:17     INFO -  Thread 0 (crashed)
[task 2020-03-20T14:21:17.135Z] 14:21:17     INFO -   0  libmozsandbox.so!mozilla::SetSocketProcessSandbox(int) [Sandbox.cpp:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 688 + 0x0]
[task 2020-03-20T14:21:17.135Z] 14:21:17     INFO -      rax = 0x0000000000000000   rdx = 0x00007fcfd6165710
[task 2020-03-20T14:21:17.135Z] 14:21:17     INFO -      rcx = 0x0000000000000003   rbx = 0x0000000000000013
[task 2020-03-20T14:21:17.136Z] 14:21:17     INFO -      rsi = 0x0000000000000000   rdi = 0x00007fcfd6165710
[task 2020-03-20T14:21:17.136Z] 14:21:17     INFO -      rbp = 0x00007ffe3b1186b0   rsp = 0x00007ffe3b118690
[task 2020-03-20T14:21:17.136Z] 14:21:17     INFO -       r8 = 0x0000000000000000    r9 = 0x0000000000000003
[task 2020-03-20T14:21:17.136Z] 14:21:17     INFO -      r10 = 0x00007fcfd648d1c0   r11 = 0x0000000000000009
[task 2020-03-20T14:21:17.136Z] 14:21:17     INFO -      r12 = 0x00007fcfd615eb38   r13 = 0x0000000000000001
[task 2020-03-20T14:21:17.137Z] 14:21:17     INFO -      r14 = 0x00007fcfc1f8c5a8   r15 = 0x00007fcfd6183820
[task 2020-03-20T14:21:17.137Z] 14:21:17     INFO -      rip = 0x00007fcfd77d021b
[task 2020-03-20T14:21:17.137Z] 14:21:17     INFO -      Found by: given as instruction pointer in context
[task 2020-03-20T14:21:17.137Z] 14:21:17     INFO -   1  libxul.so!mozilla::net::SocketProcessChild::RecvInitLinuxSandbox(mozilla::Maybe<mozilla::ipc::FileDescriptor> const&) [SocketProcessChild.cpp:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 187 + 0x7]
[task 2020-03-20T14:21:17.138Z] 14:21:17     INFO -      rbx = 0x0000000000000013   rbp = 0x00007ffe3b1186f0
[task 2020-03-20T14:21:17.138Z] 14:21:17     INFO -      rsp = 0x00007ffe3b1186c0   r12 = 0x00007fcfd615eb38
[task 2020-03-20T14:21:17.138Z] 14:21:17     INFO -      r13 = 0x0000000000000001   r14 = 0x00007ffe3b1186c8
[task 2020-03-20T14:21:17.138Z] 14:21:17     INFO -      r15 = 0x00007fcfd6183820   rip = 0x00007fcfc409e3ff
[task 2020-03-20T14:21:17.138Z] 14:21:17     INFO -      Found by: call frame info
[task 2020-03-20T14:21:17.139Z] 14:21:17     INFO -   2  libxul.so!mozilla::net::PSocketProcessChild::OnMessageReceived(IPC::Message const&) [PSocketProcessChild.cpp: : 1566 + 0x8]
[task 2020-03-20T14:21:17.139Z] 14:21:17     INFO -      rbx = 0x00007ffe3b118740   rbp = 0x00007ffe3b118830
[task 2020-03-20T14:21:17.139Z] 14:21:17     INFO -      rsp = 0x00007ffe3b118700   r12 = 0x00007fcfd615eb38
[task 2020-03-20T14:21:17.139Z] 14:21:17     INFO -      r13 = 0x0000000000000001   r14 = 0x00007fcfd615eb40
[task 2020-03-20T14:21:17.139Z] 14:21:17     INFO -      r15 = 0x00007fcfd6183820   rip = 0x00007fcfc42b685a
[task 2020-03-20T14:21:17.140Z] 14:21:17     INFO -      Found by: call frame info
[task 2020-03-20T14:21:17.140Z] 14:21:17     INFO -   3  libxul.so!mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) [MessageChannel.cpp:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 2187 + 0xd]
[task 2020-03-20T14:21:17.140Z] 14:21:17     INFO -      rbx = 0x0000000000000001   rbp = 0x00007ffe3b118b00
[task 2020-03-20T14:21:17.140Z] 14:21:17     INFO -      rsp = 0x00007ffe3b118840   r12 = 0x0000000000000000
[task 2020-03-20T14:21:17.140Z] 14:21:17     INFO -      r13 = 0x00007fcfd615eb00   r14 = 0x00007fcfc20fd860
[task 2020-03-20T14:21:17.140Z] 14:21:17     INFO -      r15 = 0x00007fcfd6183910   rip = 0x00007fcfc7904b2b
[task 2020-03-20T14:21:17.141Z] 14:21:17     INFO -      Found by: call frame info
[task 2020-03-20T14:21:17.141Z] 14:21:17     INFO -   4  libxul.so!mozilla::ipc::MessageChannel::MessageTask::Run() [MessageChannel.cpp:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 1990 + 0xdf]
[task 2020-03-20T14:21:17.141Z] 14:21:17     INFO -      rbx = 0x00007fcfd615eb38   rbp = 0x00007ffe3b118b50
[task 2020-03-20T14:21:17.141Z] 14:21:17     INFO -      rsp = 0x00007ffe3b118b10   r12 = 0x00007fcfd615eae0
[task 2020-03-20T14:21:17.141Z] 14:21:17     INFO -      r13 = 0x00007fcfd611c5e0   r14 = 0x00007fcfc1f25890
[task 2020-03-20T14:21:17.142Z] 14:21:17     INFO -      r15 = 0x00007fcfd6183910   rip = 0x00007fcfc7905c59
[task 2020-03-20T14:21:17.142Z] 14:21:17     INFO -      Found by: call frame info
[task 2020-03-20T14:21:17.142Z] 14:21:17     INFO -   5  libxul.so!nsThread::ProcessNextEvent(bool, bool*) [nsThread.cpp:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 1220 + 0x6]
[task 2020-03-20T14:21:17.142Z] 14:21:17     INFO -      rbx = 0x0000000000000000   rbp = 0x00007ffe3b119070
[task 2020-03-20T14:21:17.142Z] 14:21:17     INFO -      rsp = 0x00007ffe3b118b60   r12 = 0x0000000000000000
[task 2020-03-20T14:21:17.142Z] 14:21:17     INFO -      r13 = 0x00007fcfd61a6800   r14 = 0x0000000000000000
[task 2020-03-20T14:21:17.143Z] 14:21:17     INFO -      r15 = 0x00000000ffffffff   rip = 0x00007fcfc78d1919
[task 2020-03-20T14:21:17.143Z] 14:21:17     INFO -      Found by: call frame info
[task 2020-03-20T14:21:17.143Z] 14:21:17     INFO -   6  libxul.so!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [MessagePump.cpp:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 109 + 0x27]
[task 2020-03-20T14:21:17.143Z] 14:21:17     INFO -      rbx = 0x00007ffe3b1191a8   rbp = 0x00007ffe3b1190c0
[task 2020-03-20T14:21:17.143Z] 14:21:17     INFO -      rsp = 0x00007ffe3b119080   r12 = 0x0000000080004000
[task 2020-03-20T14:21:17.144Z] 14:21:17     INFO -      r13 = 0x0000000000000000   r14 = 0x00007fcfc20f1a60
[task 2020-03-20T14:21:17.144Z] 14:21:17     INFO -      r15 = 0x00007fcfd61a6800   rip = 0x00007fcfc79060e0
[task 2020-03-20T14:21:17.144Z] 14:21:17     INFO -      Found by: call frame info
[task 2020-03-20T14:21:17.144Z] 14:21:17     INFO -   7  libxul.so!MessageLoop::Run() [message_loop.cc:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 290 + 0xc]
[task 2020-03-20T14:21:17.144Z] 14:21:17     INFO -      rbx = 0x00007fcfc1f11f40   rbp = 0x00007ffe3b1190f0
[task 2020-03-20T14:21:17.145Z] 14:21:17     INFO -      rsp = 0x00007ffe3b1190d0   r12 = 0x0000000080004005
[task 2020-03-20T14:21:17.145Z] 14:21:17     INFO -      r13 = 0x00007ffe3b11a568   r14 = 0x00007fcfd61a6800
[task 2020-03-20T14:21:17.145Z] 14:21:17     INFO -      r15 = 0x0000000000000499   rip = 0x00007fcfc8d2603f
[task 2020-03-20T14:21:17.145Z] 14:21:17     INFO -      Found by: call frame info
[task 2020-03-20T14:21:17.145Z] 14:21:17     INFO -   8  libxul.so!nsBaseAppShell::Run() [nsBaseAppShell.cpp:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 137 + 0x18]
[task 2020-03-20T14:21:17.145Z] 14:21:17     INFO -      rbx = 0x00007fcfc1f11f40   rbp = 0x00007ffe3b119110
[task 2020-03-20T14:21:17.146Z] 14:21:17     INFO -      rsp = 0x00007ffe3b119100   r12 = 0x0000000080004005
[task 2020-03-20T14:21:17.146Z] 14:21:17     INFO -      r13 = 0x00007ffe3b11a568   r14 = 0x00007fcfd61a6800
[task 2020-03-20T14:21:17.146Z] 14:21:17     INFO -      r15 = 0x0000000000000499   rip = 0x00007fcfc94c1794
[task 2020-03-20T14:21:17.146Z] 14:21:17     INFO -      Found by: call frame info
[task 2020-03-20T14:21:17.146Z] 14:21:17     INFO -   9  libxul.so!XRE_RunAppShell() [nsEmbedFunctions.cpp:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 911 + 0x6]
[task 2020-03-20T14:21:17.147Z] 14:21:17     INFO -      rbx = 0x00007fcfd6183800   rbp = 0x00007ffe3b119140
[task 2020-03-20T14:21:17.147Z] 14:21:17     INFO -      rsp = 0x00007ffe3b119120   r12 = 0x0000000080004005
[task 2020-03-20T14:21:17.147Z] 14:21:17     INFO -      r13 = 0x00007ffe3b11a568   r14 = 0x000000000000000a
[task 2020-03-20T14:21:17.147Z] 14:21:17     INFO -      r15 = 0x0000000000000499   rip = 0x00007fcfc9a10354
[task 2020-03-20T14:21:17.147Z] 14:21:17     INFO -      Found by: call frame info
[task 2020-03-20T14:21:17.148Z] 14:21:17     INFO -  10  libxul.so!MessageLoop::Run() [message_loop.cc:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 290 + 0xc]
[task 2020-03-20T14:21:17.148Z] 14:21:17     INFO -      rbx = 0x00007fcfd6183800   rbp = 0x00007ffe3b119170
[task 2020-03-20T14:21:17.148Z] 14:21:17     INFO -      rsp = 0x00007ffe3b119150   r12 = 0x0000000080004005
[task 2020-03-20T14:21:17.148Z] 14:21:17     INFO -      r13 = 0x00007ffe3b11a568   r14 = 0x000000000000000a
[task 2020-03-20T14:21:17.148Z] 14:21:17     INFO -      r15 = 0x0000000000000499   rip = 0x00007fcfc8d2603f
[task 2020-03-20T14:21:17.149Z] 14:21:17     INFO -      Found by: call frame info
[task 2020-03-20T14:21:17.149Z] 14:21:17     INFO -  11  libxul.so!XRE_InitChildProcess(int, char**, XREChildData const*) [nsEmbedFunctions.cpp:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 742 + 0x5]
[task 2020-03-20T14:21:17.149Z] 14:21:17     INFO -      rbx = 0x00007fcfd6183800   rbp = 0x00007ffe3b119400
[task 2020-03-20T14:21:17.149Z] 14:21:17     INFO -      rsp = 0x00007ffe3b119180   r12 = 0x0000000080004005
[task 2020-03-20T14:21:17.150Z] 14:21:17     INFO -      r13 = 0x00007ffe3b11a568   r14 = 0x000000000000000a
[task 2020-03-20T14:21:17.150Z] 14:21:17     INFO -      r15 = 0x0000000000000499   rip = 0x00007fcfc9a0ffe2
[task 2020-03-20T14:21:17.150Z] 14:21:17     INFO -      Found by: call frame info
[task 2020-03-20T14:21:17.150Z] 14:21:17     INFO -  12  firefox-bin!main [nsBrowserApp.cpp:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 303 + 0x28]
[task 2020-03-20T14:21:17.150Z] 14:21:17     INFO -      rbx = 0x00007fcfd6102f90   rbp = 0x00007ffe3b11a480
[task 2020-03-20T14:21:17.151Z] 14:21:17     INFO -      rsp = 0x00007ffe3b119410   r12 = 0x00007ffe3b11a5d8
[task 2020-03-20T14:21:17.151Z] 14:21:17     INFO -      r13 = 0x00007ffe3b11a560   r14 = 0x000000000000000c
[task 2020-03-20T14:21:17.151Z] 14:21:17     INFO -      r15 = 0x00007ffe3b11a568   rip = 0x000055d44cafc519
[task 2020-03-20T14:21:17.151Z] 14:21:17     INFO -      Found by: call frame info
task 2020-03-20T14:21:17.151Z] 14:21:17     INFO -  13  libc.so.6 + 0x21b97
[task 2020-03-20T14:21:17.152Z] 14:21:17     INFO -      rbx = 0x0000000000000000   rbp = 0x000055d44cb0fe40
[task 2020-03-20T14:21:17.152Z] 14:21:17     INFO -      rsp = 0x00007ffe3b11a490   r12 = 0x000055d44cafc288
[task 2020-03-20T14:21:17.152Z] 14:21:17     INFO -      r13 = 0x00007ffe3b11a560   r14 = 0x0000000000000000
[task 2020-03-20T14:21:17.152Z] 14:21:17     INFO -      r15 = 0x0000000000000000   rip = 0x00007fcfd6328b97
[task 2020-03-20T14:21:17.153Z] 14:21:17     INFO -      Found by: call frame info
[task 2020-03-20T14:21:17.153Z] 14:21:17     INFO -  14  firefox-bin!frame_dummy + 0x10
[task 2020-03-20T14:21:17.153Z] 14:21:17     INFO -      rsp = 0x00007ffe3b11a4b0   rip = 0x000055d44cafc3b0
[task 2020-03-20T14:21:17.153Z] 14:21:17     INFO -      Found by: stack scanning
[task 2020-03-20T14:21:17.153Z] 14:21:17     INFO -  15  firefox-bin!double_conversion::FastDtoa(double, double_conversion::FastDtoaMode, int, double_conversion::Vector<char>, int*, int*) [fast-dtoa.cc:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 652 + 0x1e]
[task 2020-03-20T14:21:17.154Z] 14:21:17     INFO -      rsp = 0x00007ffe3b11a4c8   rip = 0x000055d44cafc288
[task 2020-03-20T14:21:17.154Z] 14:21:17     INFO -      Found by: stack scanning
[task 2020-03-20T14:21:17.154Z] 14:21:17     INFO -  16  ld-linux-x86-64.so.2 + 0x10733
[task 2020-03-20T14:21:17.154Z] 14:21:17     INFO -      rsp = 0x00007ffe3b11a510   rip = 0x00007fcfd7672733
[task 2020-03-20T14:21:17.154Z] 14:21:17     INFO -      Found by: stack scanning
[task 2020-03-20T14:21:17.154Z] 14:21:17     INFO -  17  libdl.so.2 + 0x202d80
[task 2020-03-20T14:21:17.155Z] 14:21:17     INFO -      rsp = 0x00007ffe3b11a518   rip = 0x00007fcfd7441d80
[task 2020-03-20T14:21:17.155Z] 14:21:17     INFO -      Found by: stack scanning
[task 2020-03-20T14:21:17.155Z] 14:21:17     INFO -  18  libpthread.so.0 + 0x219bb0
[task 2020-03-20T14:21:17.155Z] 14:21:17     INFO -      rsp = 0x00007ffe3b11a520   rip = 0x00007fcfd765cbb0
[task 2020-03-20T14:21:17.155Z] 14:21:17     INFO -      Found by: stack scanning
[task 2020-03-20T14:21:17.155Z] 14:21:17     INFO -  19  firefox-bin!double_conversion::FastDtoa(double, double_conversion::FastDtoaMode, int, double_conversion::Vector<char>, int*, int*) [fast-dtoa.cc:9123faab0d42f8b61512f9f79cb7c332ead0d3a3 : 652 + 0x1e]
[task 2020-03-20T14:21:17.156Z] 14:21:17     INFO -      rsp = 0x00007ffe3b11a540   rip = 0x000055d44cafc288
[task 2020-03-20T14:21:17.156Z] 14:21:17     INFO -      Found by: stack scanning
[task 2020-03-20T14:21:17.156Z] 14:21:17     INFO -  20  firefox-bin!_start + 0x29
[task 2020-03-20T14:21:17.156Z] 14:21:17     INFO -      rsp = 0x00007ffe3b11a550   rip = 0x000055d44cafc2b1
[task 2020-03-20T14:21:17.156Z] 14:21:17     INFO -      Found by: stack scanning
...

(In reply to Bogdan Tara[:bogdan_tara | bogdant] from comment #11)

Backed out 3 changesets (bug 1602832) for assertion failing on IOInterposer.cpp

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=os%2Cx%2C10.14%2Cdebug%2Ctest-macosx1014-64%2Fdebug-gtest-1proc%2C%28gtest%29&fromchange=d70d390ee53c8cf38d305d999f3155fc56e5cc01&tochange=1c9eb89172abbf4668dd27026053bc629fa90c15&selectedJob=294032309

Backout link: https://hg.mozilla.org/integration/autoland/rev/b7b401010ae84a441fd15b800e26e1932a4fc462

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=294032309&repo=autoland&lineNumber=338628

[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  TEST-START | SrtpParamInit/TransportSrtpParameterTest.TestSrtpCiphersMismatchCombinations/1
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  Checking cipher: 8
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  TEST-PASS | SrtpParamInit/TransportSrtpParameterTest.TestSrtpCiphersMismatchCombinations/1 | test completed (time: 224ms)
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  TEST-START | SrtpParamInit/TransportSrtpParameterTest.TestSrtpCiphersMismatchCombinations/2
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  Checking cipher: 1
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  TEST-PASS | SrtpParamInit/TransportSrtpParameterTest.TestSrtpCiphersMismatchCombinations/2 | test completed (time: 399ms)
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  TEST-PASS | GTest unit test: passed
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  Passed: 4452
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  Failed: 0
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  [1706, Main Thread] WARNING: NS_ENSURE_SUCCESS_VOID(rv) failed with result 0x80070057: file /builds/worker/checkouts/gecko/extensions/permissions/nsPermissionManager.cpp, line 1664
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  [1706, Main Thread] WARNING: '!gBaseDirPath', file /builds/worker/checkouts/gecko/dom/quota/ActorsParent.cpp, line 3188
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  [1706, Main Thread] WARNING: profile-do-change must precede profile-before-change-qm!: file /builds/worker/checkouts/gecko/dom/quota/ActorsParent.cpp, line 3189
[task 2020-03-20T11:42:16.481Z] 11:42:16     INFO -  Assertion failure: curThreadData, at /builds/worker/checkouts/gecko/xpcom/build/IOInterposer.cpp:516
[task 2020-03-20T11:42:43.284Z] 11:42:43     INFO -  #01: nsThread::ThreadFunc(void*) [xpcom/threads/nsThread.cpp:491]
[task 2020-03-20T11:42:43.678Z] 11:42:43     INFO -  #02: _pt_root [nsprpub/pr/src/pthreads/ptthread.c:204]
[task 2020-03-20T11:42:43.678Z] 11:42:43     INFO -  #03: libsystem_pthread.dylib + 0x32eb
[task 2020-03-20T11:42:43.678Z] 11:42:43     INFO -  #04: libsystem_pthread.dylib + 0x6249
[task 2020-03-20T11:42:43.679Z] 11:42:43     INFO -  Finished running GTest tests.

I think I've figured out the reason of this.

  1. In patch 1, socket process is launched in nsHttpHandler::Init.
  2. Socket process is launched by gtest TestCookie.TestCookieMain.
  3. ProfilerChild thread is created and IOInterposer::RegisterCurrentThread is called.
  4. IOInterposer::Init is not called on socket process, so IOInterposer::RegisterCurrentThread early returns at here.
  5. Then, IOInterposer::Init is called by gtest GeckoProfiler.FeaturesAndParams and sThreadLocalDataInitialized is set to true.
  6. When socket process is going to be destroyed, IOInterposer::UnregisterCurrentThread is called. We hit this assertion, since curThreadData was not set in IOInterposer::RegisterCurrentThread.

I am not sure how to fix this. It seems that we should call IOInterposer::Init on socket process, but other child processes (e.g. GPU and RDD) don't do this. Or should we just remove the assertion in ``IOInterposer::UnregisterCurrentThread`?

Nathan, I think you probably know IOInterposer better. Could you shed some light on this problem?
Thanks.

Flags: needinfo?(kershaw) → needinfo?(nfroyd)

Hi Aaron,

I think you implemented IOInterposer before.
Could you take a look at comment #13 and suggest me what to do?

Thanks.

Flags: needinfo?(aklotz)

I assume that the GPU process and RDD don't use the particular facilities of xpcom etc. that would trigger things like IOInterposer::RegisterCurrentThread being called. So we should call IOInterposer::Init in socket processes.

Flags: needinfo?(nfroyd)

(In reply to Nathan Froyd [:froydnj] from comment #15)

I assume that the GPU process and RDD don't use the particular facilities of xpcom etc. that would trigger things like IOInterposer::RegisterCurrentThread being called. So we should call IOInterposer::Init in socket processes.

Thanks.
But that mean we need to call IOInterposer::Init really in XRE_InitChildProcess, since IOInterposer::Init needs to called before the first thread, which is this one. This also means that IOInterposer::Init will be called for every child process.

Flags: needinfo?(aklotz)

(In reply to Kershaw Chang [:kershaw] from comment #16)

(In reply to Nathan Froyd [:froydnj] from comment #15)

I assume that the GPU process and RDD don't use the particular facilities of xpcom etc. that would trigger things like IOInterposer::RegisterCurrentThread being called. So we should call IOInterposer::Init in socket processes.

Thanks.
But that mean we need to call IOInterposer::Init really in XRE_InitChildProcess, since IOInterposer::Init needs to called before the first thread, which is this one. This also means that IOInterposer::Init will be called for every child process.

I was wrong about this. We just need to call IOInterposer::Init(); before SocketProcessImpl is constructed.

Depends on: 1625621

Depends on D72134

Attached file Bug 1602832 - P3: Skip failed tests (obsolete) —

Depends on D72135

Attachment #9142687 - Attachment is obsolete: true
Attachment #9142686 - Attachment is obsolete: true
Attachment #9142685 - Attachment is obsolete: true
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f9388129262a
P1: Run xpcshell tests without e10s with socket process r=dragana
https://hg.mozilla.org/integration/autoland/rev/da106d35137e
P2: Create 'socketprocess_networking' test variant r=ahal
https://hg.mozilla.org/integration/autoland/rev/3de4624b41dc
P3: Skip failed tests r=dragana
https://hg.mozilla.org/integration/autoland/rev/a5cc1585581f
P4: Call IOInterposer::Init in socket process r=froydnj
Flags: needinfo?(kershaw)
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ee00e846104e
P1: Run xpcshell tests without e10s with socket process r=dragana
https://hg.mozilla.org/integration/autoland/rev/5ea85726cc48
P2: Create 'socketprocess_networking' test variant r=ahal
https://hg.mozilla.org/integration/autoland/rev/24d1ce1b0ac9
P3: Skip failed tests r=dragana
https://hg.mozilla.org/integration/autoland/rev/2f3cc391b48a
P4: Call IOInterposer::Init in socket process r=froydnj
https://hg.mozilla.org/integration/autoland/rev/059a7f44d1a9
P5: Make sure ChildDNSService is created on main thread r=dragana
Flags: needinfo?(kershaw)
Regressions: 1639263
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2d54acd78124
P1: Run xpcshell tests without e10s with socket process r=dragana
https://hg.mozilla.org/integration/autoland/rev/bea1f3aeea49
P2: Create 'socketprocess_networking' test variant r=ahal
https://hg.mozilla.org/integration/autoland/rev/ca0c207dca21
P3: Skip failed tests r=dragana
https://hg.mozilla.org/integration/autoland/rev/db012c05d64e
P4: Call IOInterposer::Init in socket process r=froydnj
https://hg.mozilla.org/integration/autoland/rev/534fedb3836e
P5: Make sure ChildDNSService is created on main thread r=dragana
https://hg.mozilla.org/integration/autoland/rev/0e9c378df995
P6: Make sure we don't launch socket process for xpcshell http server r=dragana
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e251c2af1161
P1: Run xpcshell tests without e10s with socket process r=dragana
https://hg.mozilla.org/integration/autoland/rev/cb68b5b991be
P2: Create 'socketprocess_networking' test variant r=ahal
https://hg.mozilla.org/integration/autoland/rev/71525d5fea41
P3: Skip failed tests r=dragana
https://hg.mozilla.org/integration/autoland/rev/55f83d3a5819
P4: Call IOInterposer::Init in socket process r=froydnj
https://hg.mozilla.org/integration/autoland/rev/69e1e0497cb7
P5: Make sure ChildDNSService is created on main thread r=dragana
https://hg.mozilla.org/integration/autoland/rev/ad211af10bf2
P6: Make sure we don't launch socket process for xpcshell http server r=dragana
Attachment #9152067 - Attachment is obsolete: true
Regressions: 1641427
Regressions: 1641100
Regressions: 1647096
You need to log in before you can comment on or make changes to this bug.