Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Determine Electron process from minidump metadata #1049

Merged
merged 8 commits into from
Jan 9, 2025

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Jan 8, 2025

As described in the above issue:

Currently we read minidumps from the crashpad directory when we are notified by Electron that a renderer or child process has crashed. We assume that all the minidumps we find correspond the the Electron event. All minidumps we read at startup are assumed to be main process crashes because they cause the process to exit immediately.

Although these assumptions are usually correct, I've personally seen events recorded incorrectly and so have other users (#1045).

Rather than fully parse the minidumps as described in the above issue (ie. header + enumerate the streams), we just search for the process_type key in the minidump file and pick out the string that follows. This simplified approach is reasonable because Electrons Crashpad is configured to emit minimal minidumps (250-400kb).

If we can't determine the process type from parsing the minidump, we have a new event.process tag of unknown. In most cases, these will be for child processes and I've added a test to confirm that if these are found at startup, they are correctly categorised.

@timfish timfish changed the title feat: Read Electron process from minidump feat: Determine Electron process from minidump metadata Jan 9, 2025
@timfish timfish marked this pull request as ready for review January 9, 2025 19:59
@timfish timfish requested a review from AbhiPrasad January 9, 2025 20:00
@timfish timfish merged commit dabd6da into master Jan 9, 2025
34 checks passed
@timfish timfish deleted the feat/electron-process-from-minidump branch January 9, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parse minidumps to determine which process they came from
2 participants