Граф коммитов

423 Коммитов

Автор SHA1 Сообщение Дата
Gabriele Svelto cbadcd16da Bug 1632080 - Stop sending orphaned crash reports with synthesized crash annotations r=mconley
We originally added this functionality in bug 1566855 because we were
seeing a significant amount of orphaned crashes not being submitted.
Notably some of these were early content process startup crashes and
missing them made us unaware of severe issues that would affect our
users. In the meantime we've addressed most of the cases where a crash
would be orphaned. Since the crashes submitted this way have a buildid
that does not match the version of Firefox that actually crashed they
can be confusing during crash triage.

Given the above we can safely remove this functionality. This patch
reverts most of the changes from bug 1566855 but leaves the test
refactorings in place.

Differential Revision: https://phabricator.services.mozilla.com/D78219
2020-06-05 06:32:24 +00:00
Ian Moody 011b59d595 Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.

This was done automatically with a new eslint rule that will be introduced in
the next commit.  One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS.  The rule will be disabled for that instance.

Differential Revision: https://phabricator.services.mozilla.com/D28073
2020-05-05 17:41:36 +00:00
Gijs Kruitbosch 3e3ce6cc06 Bug 1632264 - DONTBUILD really fix comment in browser_aboutCrashesResubmit.js
Differential Revision: https://phabricator.services.mozilla.com/D72811
2020-04-28 10:42:50 +00:00
Gijs Kruitbosch f2ee31dd92 Bug 1632264 - DONTBUILD fix comments in browser_aboutCrashesResubmit.js, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D72389
2020-04-27 20:36:32 +00:00
Andreea Pavel bb95dd40d7 Backed out changeset 22a9a0e02e69 (bug 1632264) on request on a CLOSED TREE DONTBUILD 2020-04-27 23:33:23 +03:00
Gijs Kruitbosch cddf5c0218 Bug 1632264 - fix comments in browser_aboutCrashesResubmit.js, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D72389
2020-04-27 20:07:32 +00:00
Gijs Kruitbosch 1c0a1c9f3e Bug 1631358 - remove traces of CPOWs from browser/, testing/ and toolkit/, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D71510
2020-04-21 14:05:35 +00:00
Gabriele Svelto 958361a3fb Bug 1614933 - Fix a deadlock in Breakpad crash generation on Windows; r=KrisWright
On Windows content process minidump generation goes through the following
steps:

* The child process exception handler invokes the `filter` callback. This is the
  `ChildFPEFilter()` function in nsExceptionHandler.cpp.
* If this callback returns true then the child process sends a request to the
  crash generation server living in the main process and then waits.
* The main process generates a minidump in response to this message.
* Once the minidump has been generated the crash generation server calls the
  `dump_callback` callback with the minidump filename. This is the
  `OnChildProcessDumpRequested()` function in nsExceptionHandler.cpp.
* Once this callback returns the main process signals the child process that
  it has finished generating the dump.
* The child process resumes execution in the exception handler and then
  terminates.

During this process we send crash annotations via a pipe from the child
process to the main process. The function responsible for this is
`PrepareChildExceptionTimeAnnotations()` in nsExceptionHandler.cpp and it's
called within `ChildFPEFilter()`. Because pipe writes are blocking if we send
enough annotations to fill the pipe buffer then the child process will get
stuck in `ChildFPEFilter()` and never request a dump from the main process. Thus
the content process will never shut down and the main process will never see
that it has crashed, it will only appear indefinitely stuck.

To solve this issue a few changes are necessary:

* The crash annotations are not sent from the `filter` callback, they are sent
  from the `minidump` callback which we did not use before. This callback is
  executed in the child process **after** signaling the main process.
* This is not enough to prevent the deadlock though, because the content
  process will still wait before the parent process has responded before
  invoking this new callback. The parent process on the other hand will
  generate the minidump and then call `OnChildProcessDumpRequest()` which will
  wait to read the annotations sent by the child process. Thus both processes
  would be stuck. To solve this other issue we change the order in which the
  parent process responds: instead of invoking the `dump_callback` first and
  then signaling the child process it does the opposite.

I've also added a new test that covers two separate issues solved by this
patch-set: that we don't deadlock when writing too much data (this issue) and
that we don't fail to send an annotation if it's too large (previously the
shared memory buffer was 16KiB in size so this annotation wouldn't fit).

Differential Revision: https://phabricator.services.mozilla.com/D69877

--HG--
extra : moz-landing-system : lando
2020-04-08 06:55:41 +00:00
Nicholas Nethercote 0d565690c2 Bug 1574390 - Implement guard pages in PHC. r=glandium
Each allocation page is now bracketed by a guard page, and allocations are put
at the end of their page so that bounds violations trigger a crash.

Various operations (realloc(), free(), malloc_usable_size()) now require that
the pointer they are given points to the start of an allocation.

Differential Revision: https://phabricator.services.mozilla.com/D43842

--HG--
rename : toolkit/crashreporter/test/unit_ipc/test_content_phc2.js => toolkit/crashreporter/test/unit_ipc/test_content_phc3.js
extra : moz-landing-system : lando
2020-03-27 00:14:53 +00:00
Ed Lee acb960676c Bug 1620556 - Automatic code fixes for Prettier 1.19.1 upgrade. r=Standard8,remote-protocol-reviewers,marionette-reviewers,webcompat-reviewers,perftest-reviewers,sparky,whimboo,denschub
Differential Revision: https://phabricator.services.mozilla.com/D66128

--HG--
extra : moz-landing-system : lando
2020-03-13 23:38:52 +00:00
Kristen Wright cc862d2d30 Bug 1539944 - Get rid of NS_NewThread r=froydnj
Gets rid of `NS_NewThread`. Where it was used in testing, I gave the new named threads names relevant to their tests.

Differential Revision: https://phabricator.services.mozilla.com/D62475

--HG--
extra : source : 541b98270c9985c5bd3569ff3ff8bc6c3d3c650a
2020-02-11 21:01:56 +00:00
Ciure Andrei 0ddf5384e0 Backed out changeset 541b98270c99 (bug 1539944) for causing bc leaks CLOSED TREE 2020-02-12 03:23:15 +02:00
Kristen Wright e40c296db4 Bug 1539944 - Get rid of NS_NewThread r=froydnj
Gets rid of `NS_NewThread`. Where it was used in testing, I gave the new named threads names relevant to their tests.

Differential Revision: https://phabricator.services.mozilla.com/D62475

--HG--
extra : moz-landing-system : lando
2020-02-11 21:01:56 +00:00
David Teller e8dd86b0f2 Bug 1587722 - Tests for memory statistics on crashes;r=gsvelto
Depends on D55457

Differential Revision: https://phabricator.services.mozilla.com/D55933

--HG--
rename : toolkit/crashreporter/test/unit/test_oom_annotation_windows.js => toolkit/crashreporter/test/unit/test_oom_annotation.js
extra : moz-landing-system : lando
2020-01-07 10:07:23 +00:00
Arthur Iakab f26446fbad Backed out 3 changesets (bug 1587722) for causing xpcshell failures on test_crashreporter_crash.js CLOSED TREE
Backed out changeset 6aad53d9e447 (bug 1587722)
Backed out changeset 7d664635c1dc (bug 1587722)
Backed out changeset c9dbcfa6a938 (bug 1587722)

--HG--
rename : toolkit/crashreporter/test/unit/test_oom_annotation.js => toolkit/crashreporter/test/unit/test_oom_annotation_windows.js
2019-12-30 17:28:31 +02:00
David Teller ea6ba5c884 Bug 1587722 - Tests for memory statistics on crashes;r=gsvelto
Depends on D55457

Differential Revision: https://phabricator.services.mozilla.com/D55933

--HG--
rename : toolkit/crashreporter/test/unit/test_oom_annotation_windows.js => toolkit/crashreporter/test/unit/test_oom_annotation.js
extra : moz-landing-system : lando
2019-12-26 15:33:24 +00:00
Kris Maglione 9853440599 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:24 +00:00
Kris Maglione 94e3b0bd8d Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:16 +00:00
shindli 91924fedc7 Backed out 9 changesets (bug 1596918) for causing mochitest permafailures in toolkit/content/tests/chrome/test_findbar_events.xhtml CLOSED TREE
Backed out changeset 45a1c42118f2 (bug 1596918)
Backed out changeset db09910ffa56 (bug 1596918)
Backed out changeset 5c9d9f141c10 (bug 1596918)
Backed out changeset 6a135670d603 (bug 1596918)
Backed out changeset 3a0184e0df72 (bug 1596918)
Backed out changeset 2f0036486823 (bug 1596918)
Backed out changeset a770c6d08d52 (bug 1596918)
Backed out changeset ef062eb7a6ee (bug 1596918)
Backed out changeset a6ea596e98db (bug 1596918)
2019-12-11 03:09:26 +02:00
Kris Maglione 3ca78ce8e3 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:21 +00:00
Kris Maglione 16a9b29848 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:13 +00:00
Noemi Erli 7c58b57c69 Backed out 2 changesets (bug 1587722) for causing Linux browser-chrome failures CLOSED TREE
Backed out changeset c8e7456abc5b (bug 1587722)
Backed out changeset 19ffd117ebbd (bug 1587722)

--HG--
rename : toolkit/crashreporter/test/unit/test_oom_annotation.js => toolkit/crashreporter/test/unit/test_oom_annotation_windows.js
2019-12-10 13:06:50 +02:00
David Teller ff689ffe19 Bug 1587722 - Tests for memory statistics on crashes;r=gsvelto
Depends on D55457

Differential Revision: https://phabricator.services.mozilla.com/D55933

--HG--
rename : toolkit/crashreporter/test/unit/test_oom_annotation_windows.js => toolkit/crashreporter/test/unit/test_oom_annotation.js
extra : moz-landing-system : lando
2019-12-10 08:44:26 +00:00
Noemi Erli 82d41a33b2 Backed out 9 changesets (bug 1596918) for causing multiple browser-chrome failures
Backed out changeset 415007efd8c9 (bug 1596918)
Backed out changeset 011eb5ce927b (bug 1596918)
Backed out changeset e5fd3ee22ea1 (bug 1596918)
Backed out changeset 0bca4de31d40 (bug 1596918)
Backed out changeset 11ec4393f23d (bug 1596918)
Backed out changeset c5404a7c286d (bug 1596918)
Backed out changeset 7e9304405a46 (bug 1596918)
Backed out changeset fa0f0aeabf99 (bug 1596918)
Backed out changeset de196b077000 (bug 1596918)
2019-12-07 22:26:43 +02:00
Kris Maglione fa3556c3fc Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-07 18:44:34 +00:00
Kris Maglione 910eab35d2 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740

--HG--
extra : moz-landing-system : lando
2019-12-07 19:11:58 +00:00
Daniel Varga 84a601a6d4 Backed out 17 changesets (bug 1596918) for multiple browser-chrome and dev-tools failures. On a CLOSED TREE
Backed out changeset ab87d2c1afae (bug 1596918)
Backed out changeset 775f3b06a687 (bug 1596918)
Backed out changeset 67cc63ef5d7f (bug 1596918)
Backed out changeset 7d290bcd2067 (bug 1596918)
Backed out changeset 048db9f4db7c (bug 1596918)
Backed out changeset 96a79d2ba614 (bug 1596918)
Backed out changeset be770d112dd8 (bug 1596918)
Backed out changeset 302c8ab8391c (bug 1596918)
Backed out changeset 44ef8f20732e (bug 1596918)
Backed out changeset 38c11ebfb8ff (bug 1596918)
Backed out changeset b586fc081374 (bug 1596918)
Backed out changeset 12283166716f (bug 1596918)
Backed out changeset 99b0421015d8 (bug 1596918)
Backed out changeset 97ec49dbbbf3 (bug 1596918)
Backed out changeset ec79478f58f1 (bug 1596918)
Backed out changeset c6d356833bb8 (bug 1596918)
Backed out changeset 5ef6026806c8 (bug 1596918)
2019-12-07 03:12:07 +02:00
Kris Maglione b5238224ba Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-06 22:14:22 +00:00
Kris Maglione 20da940e14 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740

--HG--
extra : moz-landing-system : lando
2019-12-06 22:14:14 +00:00
Gabriele Svelto d0e4d2c6c2 Bug 1420363 - Write crash annotations as JSON r=froydnj,agi
This patch rolls up all the required changes for this purpose. Since the
whole crash reporting flow must understand the new format it's not possible
to land this as separate patches as individually they would be broken. This
patch includes the following changes:

* Changes to the crash reporting machinery to write out annotations as JSON,
  these includes changes to the DLL blocklist code that must be run at crash
  time.
* Modifications to the crash reporter client so that it can read and
  submit the new format; this includes platform-specific changes to the
  Breakpad libraries it uses for submitting crashes.
* Modifications to the minidump-analyzer to understand and process the new
  format correctly.
* Modifications to the crash manager to understand and process the new format
  correctly.
* Modifications to GeckoView's crash handler to understand and submit the
  new format correctly.
* Added new tests to cover the new format and modified existing ones to
  accomodate the new one.

Differential Revision: https://phabricator.services.mozilla.com/D46848

--HG--
extra : moz-landing-system : lando
2019-12-02 13:18:35 +00:00
Razvan Maries b90bde90fc Backed out changeset 1603f5abc56e (bug 1420363) for perma fails on test_busy_hang.xul. CLOSED TREE
--HG--
extra : rebase_source : 02c0d2f9f92f0a01ef57e4f9b38a008f6bc0eb50
2019-11-16 13:00:43 +02:00
Gabriele Svelto fb2b45f492 Bug 1420363 - Write crash annotations as JSON r=froydnj,agi
This patch rolls up all the required changes for this purpose. Since the
whole crash reporting flow must understand the new format it's not possible
to land this as separate patches as individually they would be broken. This
patch includes the following changes:

* Changes to the crash reporting machinery to write out annotations as JSON,
  these includes changes to the DLL blocklist code that must be run at crash
  time.
* Modifications to the crash reporter client so that it can read and
  submit the new format; this includes platform-specific changes to the
  Breakpad libraries it uses for submitting crashes.
* Modifications to the minidump-analyzer to understand and process the new
  format correctly.
* Modifications to the crash manager to understand and process the new format
  correctly.
* Modifications to GeckoView's crash handler to understand and submit the
  new format correctly.
* Added new tests to cover the new format and modified existing ones to
  accomodate the new one.

Differential Revision: https://phabricator.services.mozilla.com/D46848

--HG--
extra : moz-landing-system : lando
2019-11-16 08:29:07 +00:00
Nicholas Nethercote 928e9e1d00 Bug 1594598 - Use uint8_t* to avoid a bunch of casts. r=glandium
Currently the PHC code uses char* and uintptr_t in various address
computations. This patch changes it to use uint8_t* instead, which is clearer
than char* and avoids the need for various casts.

Differential Revision: https://phabricator.services.mozilla.com/D43840

--HG--
extra : moz-landing-system : lando
2019-11-06 23:56:48 +00:00
Anny Gakhokidze f1c694e18f Bug 1582531 - Update fission annotations for skipped tests that are now passing succesfully, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47347

--HG--
extra : moz-landing-system : lando
2019-09-27 14:25:10 +00:00
Cosmin Sabou 62c067e92f Bug 1578037 - Disable tests that cause leaks on fission. r=johannh
Differential Revision: https://phabricator.services.mozilla.com//D44599
2019-09-04 07:18:42 +03:00
Nicholas Nethercote adb9edf389 Bug 1574388 - Implement PHC on Mac. r=gsvelto,glandium
But it is not yet enabled; bug 1576515 will do that.

Differential Revision: https://phabricator.services.mozilla.com/D42264

--HG--
extra : moz-landing-system : lando
2019-08-25 23:16:05 +00:00
Gabriele Svelto 303c5ce8d0 Bug 1566855 - Submit incomplete crashes by synthesizing a minimal .extra file with sensible crash annotations r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D42575

--HG--
rename : toolkit/crashreporter/test/browser/browser_aboutCrashesResubmit.js => toolkit/crashreporter/test/browser/browser_aboutCrashesIncomplete.js
extra : moz-landing-system : lando
2019-08-20 20:54:35 +00:00
Nicholas Nethercote 38dbbfcffc Bug 1523276 - Implement PHC, a probabilistic heap checker. r=glandium,gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D25021

--HG--
extra : rebase_source : 86e94499f746b18a596130341692c6a9992d4867
2019-07-03 09:26:11 +10:00
Victor Porof 30de4722a3 Bug 1561435 - Format toolkit/crashreporter/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36054

--HG--
extra : source : 0b29c27eb14e47c44674fc7aa8e90f74e4430233
2019-07-05 11:15:04 +02:00
Gabriele Svelto 74276da797 Bug 1536221 - Re-enable mochitests and xpcshell tests that depend on the crash reporter on Windows/AArch64 r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D35995

--HG--
extra : moz-landing-system : lando
2019-06-26 13:15:24 +00:00
Andrew McCreight 1b901ff2db Bug 1542024 - Eliminate nsXPCWrappedJSClass by moving its methods into nsXPCWrappedJS. r=bzbarsky
I changed DelegatedQueryInterface and CallMethod to be non-static
methods rather than taking an explicit |self| parameter.

There is already a method nsXPCWrappedJS::CallMethod() with the same
signature, but it is a shim, so I inlined it into the version in
XPCWrappedJSClass.cpp.

I also fixed up a few comments that mention nsXPCWrappedJSClass.

The new comments starting with "We now need to enter the realm" were
written by Boris, and are a little more explicit so they are easier to
understand.

I renamed DebugDump() to DebugDumpInterfaceInfo() to be more
informative.

Differential Revision: https://phabricator.services.mozilla.com/D26422

--HG--
extra : moz-landing-system : lando
2019-04-08 21:39:27 +00:00
Ciure Andrei 3ff6ff6d6f Backed out changeset 5937ad352b2d (bug 1542024) for perma failing 406106-1.html CLOSED TREE 2019-04-09 00:12:32 +03:00
Andrew McCreight ccc11f67db Bug 1542024 - Eliminate nsXPCWrappedJSClass by moving its methods into nsXPCWrappedJS. r=bzbarsky
I changed DelegatedQueryInterface and CallMethod to be non-static
methods rather than taking an explicit |self| parameter.

I did a tiny bit of cleanup in the nsIXPConnectJSObjectHolder case of
DelegatedQueryInterface().

There is already a method nsXPCWrappedJS::CallMethod() with the same
signature, but it is a shim, so I inlined it into the version in
XPCWrappedJSClass.cpp.

I also fixed up a few comments that mention nsXPCWrappedJSClass.

The new comments starting with "We now need to enter the realm" were
written by Boris, and are a little more explicit so they are easier to
understand.

I renamed DebugDump() to DebugDumpInterfaceInfo() to be more
informative.

Differential Revision: https://phabricator.services.mozilla.com/D26422

--HG--
extra : moz-landing-system : lando
2019-04-08 19:44:45 +00:00
Sylvestre Ledru 03fc65347c Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26280

--HG--
extra : moz-landing-system : lando
2019-04-05 21:42:17 +00:00
Csoregi Natalia ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu 24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru 399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Mark Banner dba6983e75 Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:14 +00:00
Nicholas Nethercote a955ca9592 Bug 1535226 - Remove uses of XP_WIN32 in Gecko. r=glandium
The definitions can't be entirely removed yet because NSS still needs them.

Differential Revision: https://phabricator.services.mozilla.com/D23454

--HG--
extra : moz-landing-system : lando
2019-03-21 01:28:50 +00:00