Closed Bug 926544 Opened 11 years ago Closed 7 years ago

subprocess crash during content/base/test/test_bug578096.html on debug B2G emulators

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jgriffin, Assigned: martijn.martijn)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [leave open])

Attachments

(1 file)

The test content/base/test/test_bug578096.html is failing on debug B2G emulators - it causes a child process to crash when started: 12:11:05 INFO - 10-11 19:08:56.950 709 709 I GeckoDump: 28252 INFO TEST-START | /tests/content/base/test/test_bug578096.html 12:11:05 INFO - 10-11 19:09:00.960 709 709 I Gecko : [Child 709] WARNING: This file has not been opened (or could not be opened). Sending an invalid file descriptor to the other process!: file ../../../../gecko/netwerk/base/src/nsFileStreams.cpp, line 557 12:11:05 INFO - 10-11 19:09:00.980 667 667 I Gecko : IPDL protocol error: [PNeckoParent] Received an invalid file descriptor! 12:11:05 INFO - 10-11 19:09:00.980 667 667 I Gecko : [Parent 667] WARNING: Received an invalid file descriptor!: 'fd.IsValid()', file ../../../../gecko/netwerk/base/src/nsFileStreams.cpp, line 596 12:11:05 INFO - 10-11 19:09:01.000 667 667 F MOZ_Assert: Assertion failure: mHandleCreatedByOtherProcessWasUsed, at ../../../gecko/ipc/glue/FileDescriptor.cpp:69 12:11:05 INFO - 10-11 19:09:04.280 33 33 I ServiceManager: service 'media.resource_manager' died 12:11:05 INFO - 10-11 19:09:04.290 709 709 I Gecko : 12:11:05 INFO - 10-11 19:09:04.290 709 709 I Gecko : ###!!! [Child][MessageChannel] Error: Channel error: cannot send/recv 12:11:05 INFO - 10-11 19:09:04.290 709 709 I Gecko : 12:11:05 INFO - 10-11 19:09:04.290 709 709 I Gecko : [Child 709] WARNING: content process _exit()ing: file ../../../gecko/dom/ipc/ContentChild.cpp, line 1098 full log: https://tbpl.mozilla.org/php/getParsedLog.php?id=28998639&tree=Cedar&full=1#error8
Benjamin, do you know if we have access to TmpD in content processes? http://mxr.mozilla.org/mozilla-central/source/content/base/test/test_bug578096.html?force=1#25
Flags: needinfo?(benjamin)
I looked at this test, when I add a dump for the file.path, I get /data/local/tmp/foo.txt back, so it does seem to work (this was in a non-debug emulator, fwiw). I don't know how this works though, because TmpD doesn't exist in DirectoryProvider.js: http://mxr.mozilla.org/mozilla-central/source/b2g/components/DirectoryProvider.js#47 Perhaps, this is related to bug 902271 (and somehow doesn't crash in non-debug)?
I suspect we don't in B2G, and I'm sure we don't *want* to in sandboxed desktop processes. If you need a temp file, you should get the parent to create one for you and send over an open handle.
Flags: needinfo?(benjamin)
So bug in the test?
Martijn, when you're back from PTO next week are you able to work on the alternative way to get a temp file here?
Flags: needinfo?(martijn.martijn)
Sure, we can use loadChromeScript here, but I suspect it wouldn't fix the crash, because that might be because of bug 902271.
Assignee: nobody → martijn.martijn
Flags: needinfo?(martijn.martijn)
Cool. jdm told me he's going to look at bug 902271 again soon.
Attached patch 926544.diffSplinter Review
Something like this. Johnathan, this uses SpecialPowers api that was implemented in bug 914633.
Attachment #824911 - Flags: review?(jgriffin)
Comment on attachment 824911 [details] [diff] [review] 926544.diff Review of attachment 824911 [details] [diff] [review]: ----------------------------------------------------------------- lgtm
Attachment #824911 - Flags: review?(jgriffin) → review+
Keywords: checkin-needed
Whiteboard: [leave open]
Blocks: 933355
Assignee: martijn.martijn → nobody
Depends on: 902271
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Assignee: nobody → martijn.martijn
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: