This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.
One limitation of the current code is that the crash helper process needs to
be running before we can start setting exception handlers in child processes.
This limitation is due to how Breakpad exception handlers register themselves
with the crash generator and prevents us from lazily starting the helper (or
restarting it on Android).
IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.
Differential Revision: https://phabricator.services.mozilla.com/D231083
`cc` upstream breaks a few things that have been handled by prior
patches motivated specifically by this upgrade:
1. `cc::Build` now rejects unknown targets not baked in. This breaks
`swgl`'s usage of the `SWGL` target. We migrated away from this
behavior in D235480.
2. `cc::Build::is_like_msvc`'s underlying logic changed, and now does
not return `true`. This is because of a regression in toolchain
classification heuristics, and has been worked around in D236305.
Differential Revision: https://phabricator.services.mozilla.com/D236029
`cc` upstream breaks a few things that have been handled by prior
patches motivated specifically by this upgrade:
1. `cc::Build` now rejects unknown targets not baked in. This breaks
`swgl`'s usage of the `SWGL` target. We migrated away from this
behavior in D235480.
2. `cc::Build::is_like_msvc`'s underlying logic changed, and now does
not return `true`. This is because of a regression in toolchain
classification heuristics, and has been worked around in D236305.
Differential Revision: https://phabricator.services.mozilla.com/D236029
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.
One limitation of the current code is that the crash helper process needs to
be running before we can start setting exception handlers in child processes.
This limitation is due to how Breakpad exception handlers register themselves
with the crash generator and prevents us from lazily starting the helper (or
restarting it on Android).
IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.
Differential Revision: https://phabricator.services.mozilla.com/D231083
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.
One limitation of the current code is that the crash helper process needs to
be running before we can start setting exception handlers in child processes.
This limitation is due to how Breakpad exception handlers register themselves
with the crash generator and prevents us from lazily starting the helper (or
restarting it on Android).
IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.
Differential Revision: https://phabricator.services.mozilla.com/D231083
Notes:
- because minidump-analyzer is not a root crate, it doesn't need the
workspace hack.
- allocator-api2 was added in bug 1912019, we don't need to work around
its use in hashbrown anymore.
Differential Revision: https://phabricator.services.mozilla.com/D233788
This migration was non-trivial!
On the WebGPU side, a change in how load and store operations in render
attachments were represented meant that we needed to re-work FFI for
`RenderPassDepthStencilAttachment` and `RenderPassColorAttachment`, with
most of the effort going towards the former. These types, along with
`Option`, needed FFI-friendly replacements for `Option` and the related
types in `wgpu-core`.
There was also some housekeeping done to avoid duplicate dependencies:
* Create `thiserror` shim that downgrades v2 → v1. Otherwise, v2 would
be brought in by the new WGPU. We can't go in the opposite direction
yet, because `bitsclient` has code that breaks on upgrade. The next
patch in this series addresses this, and reverses the direction of the
shim.
* Also remove the now-unused shim adapting from `cfg_aliases` 0.1 to
0.2.
Co-Authored-By: Jim Blandy <jimb@red-bean.com>
Differential Revision: https://phabricator.services.mozilla.com/D233192
This migration was non-trivial!
On the WebGPU side, a change in how load and store operations in render
attachments were represented meant that we needed to re-work FFI for
`RenderPassDepthStencilAttachment` and `RenderPassColorAttachment`, with
most of the effort going towards the former. These types, along with
`Option`, needed FFI-friendly replacements for `Option` and the related
types in `wgpu-core`.
There was also some housekeeping done to avoid duplicate dependencies:
* Create `thiserror` shim that downgrades v2 → v1. Otherwise, v2 would
be brought in by the new WGPU. We can't go in the opposite direction
yet, because `bitsclient` has code that breaks on upgrade. The next
patch in this series addresses this, and reverses the direction of the
shim.
* Also remove the now-unused shim adapting from `cfg_aliases` 0.1 to
0.2.
Differential Revision: https://phabricator.services.mozilla.com/D233192
Added code to check if a pointer type is for an external type and if so,
use the correct namespace.
It doesn't feel great to me to iterate over all external types for this.
Also the `crate_name_to_namespace` function seems hacky. I hope to fix
this soon, maybe once the UniFFI bindgen pipline changes are merged and
vendored in.
Refactored some of the test crates to use proc-macros, which made the
testing easier.
Differential Revision: https://phabricator.services.mozilla.com/D232770
Added code to check if a pointer type is for an external type and if so,
use the correct namespace.
It doesn't feel great to me to iterate over all external types for this.
Also the `crate_name_to_namespace` function seems hacky. I hope to fix
this soon, maybe once the UniFFI bindgen pipline changes are merged and
vendored in.
Refactored some of the test crates to use proc-macros, which made the
testing easier.
Differential Revision: https://phabricator.services.mozilla.com/D232770