Use posix_spawnp() on Mac to launch the crashreporter to work around bug 1376567

RESOLVED FIXED in Firefox 57

Status

()

RESOLVED FIXED
a year ago
a year ago

People

(Reporter: gsvelto, Assigned: gsvelto)

Tracking

unspecified
mozilla57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

a year ago
In bug 1322611 we simplified the code for running the crashreporter client by removing the Mac-specific path and replacing it with the fork()-based code path we use in Linux. As it turns out this is unreliable due to fork() trying to allocate memory on Mac; so we should revert to using posix_spawnp() instead.
(Assignee)

Comment 1

a year ago
Created attachment 8881532 [details] [diff] [review]
[PATCH] WIP

Here's a WIP for this. I don't have a Mac right now so I can't test it, but I should be able to test it tomorrow.
Assignee: nobody → gsvelto
Status: NEW → ASSIGNED
If you can push to try with this patch I can test it locally.
Flags: needinfo?(gsvelto)
(Assignee)

Comment 3

a year ago
I've tested this locally at the all hands and it doesn't work because of the missing DYLD_LIBRARY_PATH in the environment. Feel free to pick this up while I'm on paternity leave, otherwise I'll fix it as soon as I'm back.
Flags: needinfo?(gsvelto)
Comment hidden (mozreview-request)
(Assignee)

Comment 5

a year ago
I've updated my patch and it seems to work correctly now, it was just a matter of setting DYLD_LIBRARY_PATH before launching the crashreporter client.
(Assignee)

Updated

a year ago
Attachment #8881532 - Attachment is obsolete: true

Comment 6

a year ago
mozreview-review
Comment on attachment 8896454 [details]
bug 1376574 - Do not use fork() for launching the crashreporter on Mac since that might crash too;

https://reviewboard.mozilla.org/r/167702/#review178688

Thanks for fixing this!
Attachment #8896454 - Flags: review?(ted) → review+

Comment 7

a year ago
Pushed by gsvelto@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/512c998741c5
Do not use fork() for launching the crashreporter on Mac since that might crash too; r=ted
https://hg.mozilla.org/mozilla-central/rev/512c998741c5
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.