Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Перейти к файлу
Gabriele Svelto 896f9b03cb Bug 1682518 - Add minidump generation for child processes in the WER module r=KrisWright
This also notifies the main process after the minidump has been generated.
I refactored the code a bit so the patch is probably larger than it should be
but the code should be a bit more readable overall.

With this change the minidump generation flow works like this:
- When the callback gets invoked in the WER process we read the structure that
  is stored in every process' to figure out if it's the main process or a child
  one. This is done by reading said process' memory, the pointer has been
  passed to the runtime exception module when it was registered.
- If the main process crashed everything works like it used to.
- If it was a child process then we first capture a minidump of it.
- Then we read the structure representing it in the main process:
  WindowsErrorReportingData. The address of this structure was passed into the
  child process' command-line so we need to parse that first, then we read it
  from the main process memory.
- We fill the structure and write it back into the main process memory.
- At this point if everything went fine we create a new thread in the main
  process just to execute the WerNotifyProc function that will inform the main
  process to the presence of the new minidump.

There's one important tidbit that's worth keeping in mind: the synchronization
between the main process and the WER process is implicit. The
WindowsErrorReportingData structure in the main process is kept alive until the
child process dies, the main process will destroy it only after that point. As
long as we're in the runtime exception module the crashed process is kept alive
so this will prevent the main process from touching that structure.
We explicitly terminate the crashed process **after** we're done with the
structure so nothing bad could happen... unless someone makes a change to
Gecko that breaks the previous assumption.

Another important thing to keep in mind: we wait for the newly created thread
to inform the main process but only for 5 seconds. We don't want to wait
indefinitely because the function that we're calling is taking a lock and if
it blocks for some reason WER will get stuck waiting for it, so it will never
kill the crashed process which in turn will prevent the main process from
moving ahead. In principle this should never happen but better be safe than
sorry.

Depends on D115379

Differential Revision: https://phabricator.services.mozilla.com/D115380
2021-06-10 22:01:32 +00:00
.cargo Bug 1715731 - Bump jsparagus for bug 1709956 and some more. r=nbp 2021-06-10 13:24:16 +00:00
.vscode Bug 1701913 - Documentation regarding Remote Development over SSH using VS Code. r=marco 2021-03-30 14:44:51 +00:00
accessible Bug 1713758 - Make everyone outside editor module use `EditorBase` instead of `TextEditor` if the instance can be an `HTMLEditor` instance r=m_kato 2021-06-09 23:51:37 +00:00
browser Bug 1715348 - Add telemetry environment boolean scalar for kept in macOS Dock r=pdahiya 2021-06-10 20:58:08 +00:00
build Bug 1714788 - Fixed more Sphinx warnings in 'mach doc' r=sylvestre DONTBUILD 2021-06-10 19:33:53 +00:00
caps Part 1: Bug 1700623 - Add storagePrincipal to WindowGlobalParent. r=nika,timhuang 2021-05-26 07:14:03 +00:00
chrome Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag 2021-03-17 15:49:46 +00:00
config Bug 1686052 - Part 4: Update tzdata in ICU data files to 2021a. r=jwalden 2021-06-04 17:42:19 +00:00
devtools Bug 1686727 - [devtools] Migrate browser_storage_dynamic_windows to ResourceCommand. r=ladybenko 2021-06-10 21:26:14 +00:00
docs Bug 1714788 - Fixed more Sphinx warnings in 'mach doc' r=sylvestre DONTBUILD 2021-06-10 19:33:53 +00:00
docshell Bug 1715865 - Make BrowsingContext skippable, r=nika,mccr8 2021-06-10 19:54:45 +00:00
dom Bug 1714788 - Fixed more Sphinx warnings in 'mach doc' r=sylvestre DONTBUILD 2021-06-10 19:33:53 +00:00
editor Bug 1713821 - Make `EditorEventListener::Blur()` ignore coming events whose target is an element, but the editor is in the design mode r=smaug 2021-06-09 22:26:16 +00:00
extensions Bug 1713757 - Make `mozInlineSpellChecker`, `mozInlineSpellWordUtil` and `TextServicesDocument` use `EditorBase` instead of `TextEditor` r=m_kato 2021-06-09 09:02:31 +00:00
gfx Bug 1714543 - Handle possible DWrite failures better when enumerating available fonts. r=lsalzman 2021-06-10 16:21:27 +00:00
gradle/wrapper
hal Bug 1710473 - Remove hal::SetProcessPrioritySupported(). r=gsvelto,geckoview-reviewers,aklotz 2021-05-10 19:59:24 +00:00
image Bug 1696093 - AVIF image transform support. r=aosmond 2021-06-08 18:30:46 +00:00
intl Bug 1711902 - Add Calendar::GetCanonicalTimeZoneID; r=dminor 2021-06-10 20:14:17 +00:00
ipc Bug 1697895 - Register the WER runtime exception module in child processes r=KrisWright 2021-06-10 22:01:32 +00:00
js Bug 1699271 - Part 13: Add auto generated static assertions for non gc pointer arguments to MIR ops. r=iain 2021-06-10 21:00:32 +00:00
layout Backed out changeset 3fa7dc1e1303 (bug 1715586) for causing reftest failures on fixed-pos-scrollable-1.html. CLOSED TREE 2021-06-10 23:31:41 +03:00
media Bug 1714686 - Disable libjxl updates; r=saschanaz 2021-06-04 23:38:29 +00:00
memory Backed out changeset 49f8a4acd649 (bug 1712674) for stack walking crashes on older Windows versions (bug 1715633). 2021-06-10 11:39:30 +03:00
mfbt Bug 1695817 - Part 5: Add std::equal_range equivalent in MFBT. r=glandium 2021-05-28 22:35:58 +00:00
mobile Backed out changeset 7cede79b33b2 (bug 1699794) for causing mochitest failures in browser_autocomplete_footer. CLOSED TREE 2021-06-11 00:10:21 +03:00
modules Bug 1713335 - Add a pref to control use of XPCOM thread pool, default off r=KrisWright 2021-06-10 15:14:16 +00:00
mozglue Backed out changeset 49f8a4acd649 (bug 1712674) for stack walking crashes on older Windows versions (bug 1715633). 2021-06-10 11:39:30 +03:00
netwerk Bug 1714788 - Fixed more Sphinx warnings in 'mach doc' r=sylvestre DONTBUILD 2021-06-10 19:33:53 +00:00
nsprpub Bug 1715584 - NSPR_4_32_BETA1. r=bbeurdouche UPGRADE_NSPR_RELEASE 2021-06-10 09:15:06 +00:00
other-licenses Bug 1710751: Create LINKS_TO relation to track anchors and their corresponding elements r=eeejay 2021-05-26 21:31:42 +00:00
parser Bug 737785 - Un-prefix -moz-tab-size (keeping the prefixed version as an alias for now). r=layout-reviewers,dholbert 2021-06-10 09:19:24 +00:00
python Bug 1714788 - Fixed more Sphinx warnings in 'mach doc' r=sylvestre DONTBUILD 2021-06-10 19:33:53 +00:00
remote Bug 1691414 - [remote] Extract WebDriver capabilities specific classes into their own Capability module. r=webdriver-reviewers,jdescottes 2021-06-09 08:19:01 +00:00
security No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=jcristau 2021-06-10 14:50:41 +00:00
services Bug 1714788 - Fixed more Sphinx warnings in 'mach doc' r=sylvestre DONTBUILD 2021-06-10 19:33:53 +00:00
servo Bug 1663740 - Specify has_no_effect_on_gecko_scrollbars on inherited internal properties. r=boris 2021-06-10 11:50:23 +00:00
startupcache Bug 708901 - Migrate to nsTHashSet in startupcache. r=dthayer 2021-03-23 10:36:39 +00:00
storage Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert 2021-03-25 10:19:44 +00:00
taskcluster Bug 1698193 - [ci] Enable mochitest-plain-fis with linux64 tsan r=jmaher 2021-06-10 20:15:07 +00:00
testing Bug 1663740 - Specify has_no_effect_on_gecko_scrollbars on inherited internal properties. r=boris 2021-06-10 11:50:23 +00:00
third_party Bug 1715731 - Bump jsparagus for bug 1709956 and some more. r=nbp 2021-06-10 13:24:16 +00:00
toolkit Bug 1682518 - Add minidump generation for child processes in the WER module r=KrisWright 2021-06-10 22:01:32 +00:00
tools Bug 1714788 - Fixed more Sphinx warnings in 'mach doc' r=sylvestre DONTBUILD 2021-06-09 20:27:09 +00:00
uriloader Bug 1710933 - Save LaunchWithApplication downloads into downloads folder for windows and unix r=mtigley 2021-06-07 13:39:03 +00:00
view Bug 1710533 - Apply the widget size constraints to newBounds r=mstange,gfx-reviewers 2021-05-13 09:34:26 +00:00
widget Bug 1715895 - Disable sw-wr on non-x86 Linux in late beta and release. r=aosmond 2021-06-10 21:32:17 +00:00
xpcom Bug 1708070 - Change InputVsyncState in InputPriorityController::WillRunTask r=smaug 2021-06-09 17:01:30 +00:00
xpfe/appshell Bug 1710687, null check mDocShell before using it, r=peterv 2021-05-25 12:25:41 +00:00
.arcconfig Bug 1460463 - Update .arcconfig to make history mutable; r=gps 2018-05-09 23:49:52 +00:00
.babel-eslint.rc.js Bug 1702166 - Update ESLint, Babel and associated modules to the latest versions. r=mossop,nchevobbe 2021-04-04 08:05:39 +00:00
.clang-format
.clang-format-ignore Bug 1714577 - Part 5 - Add GeckoTraceEvent.h to clang-format-ignore. r=gerald 2021-06-09 15:43:38 +00:00
.cron.yml Bug 1707937 - Consolidate live performance tests into a single schedule; r=perftest-reviewers,sparky 2021-05-05 11:45:03 +00:00
.eslintignore Bug 1693993 - [marionette] Move Marionette server code to /remote/marionette. r=remote-protocol-reviewers,marionette-reviewers,jdescottes,webdriver-reviewers 2021-05-31 17:36:06 +00:00
.eslintrc.js Bug 1710273 - Stop using ChromeUtils.import(..., null) for importing EnterprisePolicies.jsm. r=nhnt11,extension-reviewers,preferences-reviewers,zombie 2021-05-12 23:16:33 +00:00
.flake8 Bug 1714641: Remove usages of vendored "wptserve_py2" library r=jgraham,ahal 2021-06-09 15:48:51 +00:00
.git-blame-ignore-revs
.gitattributes
.gitignore
.hg-annotate-ignore-revs
.hg-format-source
.hgignore Bug 1703105 - wasm: Move generate-spectest tool into tree. r=lth 2021-04-13 16:41:46 +00:00
.hgtags No bug - tagging b724ec4440e0fec4dd6e02ac019f43b2e0b32f85 with FIREFOX_NIGHTLY_90_END a=release DONTBUILD CLOSED TREE 2021-05-31 17:00:09 +00:00
.lando.ini Bug 1714470: add `.lando.ini` file r=zeid DONTBUILD 2021-06-08 12:52:25 +00:00
.lldbinit
.mailmap
.prettierignore
.prettierrc
.taskcluster.yml Bug 1696944 - Part 3 - Add new image to taskcluster.yml. r=aki 2021-03-17 11:22:02 +00:00
.trackerignore
.yamllint
.ycm_extra_conf.py
AUTHORS
CLOBBER Bug 1686052 - Part 11: Updating ICU requires a clobber. r=jwalden 2021-06-04 17:42:27 +00:00
Cargo.lock Bug 1715731 - Bump jsparagus for bug 1709956 and some more. r=nbp 2021-06-10 13:24:16 +00:00
Cargo.toml Bug 1710685 - Part 1: Update RLBox lucetc to fix clock() on mac r=tjr 2021-06-08 17:40:21 +00:00
GNUmakefile
LICENSE
Makefile.in
README.txt
aclocal.m4
build.gradle
client.mk
client.py No bug - fix client.py update_nss on python3. r=firefox-build-system-reviewers,mhentges,bbeurdouche 2021-05-05 16:59:09 +00:00
configure.in
configure.py
gradle.properties
gradlew
gradlew.bat
mach Bug 1713173 - Add `--profile-command` flag for profiling `mach` commands. r=firefox-build-system-reviewers,mhentges 2021-06-02 21:28:56 +00:00
mach.ps1
moz.build Bug 1705403 - Replace FOG's Glean autodocs with link to Glean Dictionary r=janerik DONTBUILD 2021-05-10 13:33:09 +00:00
moz.configure Bug 1714397 - Apply `mach lint --fix` to `/moz.configure`. r=firefox-build-system-reviewers,mhentges 2021-06-03 18:04:23 +00:00
mozilla-config.h.in
old-configure.in Backed out 3 changesets (bug 1709640) for causing android-4-1-armv7 pgo build bustages. 2021-06-08 03:58:27 +03:00
package-lock.json Bug 1702858 - Update node modules for latest versions, remove obsolete. r=mossop 2021-05-19 16:53:53 +00:00
package.json Bug 1702858 - Update node modules for latest versions, remove obsolete. r=mossop 2021-05-19 16:53:53 +00:00
settings.gradle
substitute-local-geckoview.gradle Backed out 3 changesets (bug 1709640) for causing android-4-1-armv7 pgo build bustages. 2021-06-08 03:58:27 +03:00
test.mozbuild

README.txt

An explanation of the Firefox Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://firefox-source-docs.mozilla.org/contributing/directory_structure.html

For information on how to build Firefox from the source code and create the patch see:

    https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

If you have a question about developing Firefox, and can't find the solution
on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.


Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Firefox developers for
testing, may be buggy.