Skip to content

Crash reporting on Linux is incompatible with sandbox #23124

@nornagon

Description

@nornagon

On Linux, Electron uses breakpad, as opposed to crashpad which is the crash reporting tool on macOS and Windows. Breakpad requires manually initializing the crash reporter in every process to be monitored, including renderers. Initializing the crash reporter in the renderer currently requires calling crashReporter.start from within the renderer, which can only be done from JavaScript. Initializing the crash reporter requires performing privileged operations, such as installing signal handlers and writing to the filesystem. Thus, when the crash reporter is initialized on Linux in the renderer process, if the sandbox is enabled, the renderer process crashes.

Chromium works around this by enabling the crash reporter before the sandbox is initialized. We'll need to do the same, which means the crash reporter will need to be initialized before JavaScript has the chance to run.

IMO, this is also a good thing for the API, because it would reduce the differences between the crash reporter API on Linux vs. macOS/Windows, and it would mean that crashReporter could become a main-process-only module. It is, however, a breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions