Closed Bug 1381517 Opened 7 years ago Closed 7 years ago

Level 3 sandboxing for OSX builds with obj-dir outside of source-dir breaks PeerConnection mochitests

Categories

(Core :: Security: Process Sandboxing, defect)

Unspecified
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1380690

People

(Reporter: mjf, Assigned: haik)

References

Details

(Whiteboard: sbmc2)

When running many (possibly all) PeerConnection mochitests on OSX builds with the obj-dir outside of the source tree, we see:
GECKO(59809) | [Main Thread]: E/signaling [main|PeerConnectionImpl] PeerConnectionImpl.cpp:204: NSS_NoDB_Init failed.
GECKO(59809) | JavaScript error: file:///MozillaBuilds/obj/opt/dist/Nightly.app/Contents/Resources/components/PeerConnection.js, line 456: NS_ERROR_FAILURE:
8 INFO TEST-UNEXPECTED-FAIL | dom/media/tests/mochitest/test_peerConnection_basicVideo.html | Error executing test: [Exception... "Unexpected error"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: http://mochi.test:8888/tests/dom/media/tests/mochitest/pc.js :: PeerConnectionWrapper :: line 780"  data: no] PeerConnectionWrapper@http://mochi.test:8888/tests/dom/media/tests/mochitest/pc.js:780:14 ... PeerConnectionTest@http://mochi.test:8888/tests/dom/media/tests/mochitest/pc.js:98:20 ... @http://mochi.test:8888/tests/dom/media/tests/mochitest/test_peerConnection_basicVideo.html:16:12 ... runNetworkTest/<@http://mochi.test:8888/tests/dom/media/tests/mochitest/pc.js:2060:13 ... async*runTestWhenReady/<@http://mochi.test:8888/tests/dom/media/tests/mochitest/head.js:370:41 ... promise callback*runTestWhenReady@http://mochi.test:8888/tests/dom/media/tests/mochitest/head.js:370:10 ... runNetworkTest@http://mochi.test:8888/tests/dom/media/tests/mochitest/pc.js:2042:9 ... async*@http://mochi.test:8888/tests/dom/media/tests/mochitest/test_peerConnection_basicVideo.html:15:3 ...
    runTestWhenReady/<@dom/media/tests/mochitest/head.js:372:7
    Async*runTestWhenReady@dom/media/tests/mochitest/head.js:370:10
    async*@dom/media/tests/mochitest/test_peerConnection_basicVideo.html:15:3


This error does not happen when running the same test with --disable-e10s, or when building with the obj-dir inside the source tree.

An example command is:
./mach mochitest dom/media/tests/mochitest/test_peerConnection_basicVideo.html
As a workaround, set MOZ_DEVELOPER_OBJ_DIR to be the path to the object dir.

  $ MOZ_DEVELOPER_OBJ_DIR=/path/to/object/dir ./mach mochitest dom/media/tests/mochitest/test_peerConnection_basicVideo.html

I confirmed that mach is not setting MOZ_DEVELOPER_OBJ_DIR which prevents the object directory from being whitelisted in the content sandbox, but haven't looked further.

I have some patches posted for review on bug 1380690 which address this problem. I'll either close this as a dupe or make sure it gets fixed independently.
Assignee: nobody → haftandilian
To confirm, the workaround _does_ work for me.  Thank you!
The workaround works for me as well, thanks!
(In reply to Nico Grunbaum [:ng] from comment #3)
> The workaround works for me as well, thanks!

I spoke too soon. It is not working for me.
(In reply to Nico Grunbaum [:ng] from comment #4)
> (In reply to Nico Grunbaum [:ng] from comment #3)
> > The workaround works for me as well, thanks!
> 
> I spoke too soon. It is not working for me.

After several mach clobber -> hg purge --all -> mach build, cycles it is working.
Whiteboard: sbmc2
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.