[Extensions] Log instances of invalid extensions being added
In theory, we should never add an extension with an invalid location
(install source). However, in practice, bugs imply that this might be
able to happen.
Add some more tracking in ExtensionService::AddExtension to both upload
a crash dump and gracefully early-out any case where we try to add
invalid extensions.
BUG=692069
BUG=698736
Review-Url: https://codereview.chromium.org/2738553002
Cr-Commit-Position: refs/heads/master@{#455897}
Committed: https://chromium.googlesource.com/chromium/src/+/08ada0f645a7440d60b0004392b6330582c1da7e
/cc lfg about base::debug::Alias() https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/extension_service.cc#newcode1487 chrome/browser/extensions/extension_service.cc:1487: // TODO(devlin): We should *never* ...
3 years, 9 months ago
(2017-03-06 23:08:11 UTC)
#3
/cc lfg about base::debug::Alias()
https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/e...
File chrome/browser/extensions/extension_service.cc (right):
https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/e...
chrome/browser/extensions/extension_service.cc:1487: // TODO(devlin): We should
*never* add an extension with an invalid
nit: the TODO should also be explicitly talking about removing this temporary
call to DumpWithoutCrashing.
https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/e...
chrome/browser/extensions/extension_service.cc:1492:
base::debug::DumpWithoutCrashing();
On 2017/03/06 22:10:00, Devlin wrote:
> I don't think I've ever actually used this before - do I need to do anything
> else here?
I think this is fine, however, the Alias on the line above needs tweaking, as
far as I understand. You *probably* want stuff on the stack (on a local
variable) to be sure to record. Also |extension| contains too much info on it to
be recorded properly (I assume there's a limit?), you want to specifically pull
out parts/members of extension variable that would help you investigate the
crash, e.g. put extension->id() in a char[] and Alias that.
Also: return; here?
Devlin
The CQ bit was checked by rdevlin.cronin@chromium.org to run a CQ dry run
3 years, 9 months ago
(2017-03-07 01:29:32 UTC)
#4
https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/extension_service.cc#newcode1487 chrome/browser/extensions/extension_service.cc:1487: // TODO(devlin): We should *never* add an extension with ...
3 years, 9 months ago
(2017-03-07 01:31:40 UTC)
#6
https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/e...
File chrome/browser/extensions/extension_service.cc (right):
https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/e...
chrome/browser/extensions/extension_service.cc:1487: // TODO(devlin): We should
*never* add an extension with an invalid
On 2017/03/06 23:08:11, lazyboy wrote:
> nit: the TODO should also be explicitly talking about removing this temporary
> call to DumpWithoutCrashing.
Done.
https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/e...
chrome/browser/extensions/extension_service.cc:1492:
base::debug::DumpWithoutCrashing();
On 2017/03/06 23:08:11, lazyboy wrote:
> On 2017/03/06 22:10:00, Devlin wrote:
> > I don't think I've ever actually used this before - do I need to do anything
> > else here?
>
> I think this is fine, however, the Alias on the line above needs tweaking, as
> far as I understand. You *probably* want stuff on the stack (on a local
> variable) to be sure to record. Also |extension| contains too much info on it
to
> be recorded properly (I assume there's a limit?), you want to specifically
pull
> out parts/members of extension variable that would help you investigate the
> crash, e.g. put extension->id() in a char[] and Alias that.
Ah, got it. Done (I think) in the latest patch set.
> Also: return; here?
Right, done.
https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/extension_service.cc#newcode1492 chrome/browser/extensions/extension_service.cc:1492: base::debug::DumpWithoutCrashing(); On 2017/03/07 01:31:40, Devlin wrote: > On 2017/03/06 ...
3 years, 9 months ago
(2017-03-07 17:00:30 UTC)
#8
https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/e...
File chrome/browser/extensions/extension_service.cc (right):
https://codereview.chromium.org/2738553002/diff/1/chrome/browser/extensions/e...
chrome/browser/extensions/extension_service.cc:1492:
base::debug::DumpWithoutCrashing();
On 2017/03/07 01:31:40, Devlin wrote:
> On 2017/03/06 23:08:11, lazyboy wrote:
> > On 2017/03/06 22:10:00, Devlin wrote:
> > > I don't think I've ever actually used this before - do I need to do
anything
> > > else here?
> >
> > I think this is fine, however, the Alias on the line above needs tweaking,
as
> > far as I understand. You *probably* want stuff on the stack (on a local
> > variable) to be sure to record. Also |extension| contains too much info on
it
> to
> > be recorded properly (I assume there's a limit?), you want to specifically
> pull
> > out parts/members of extension variable that would help you investigate the
> > crash, e.g. put extension->id() in a char[] and Alias that.
>
> Ah, got it. Done (I think) in the latest patch set.
>
> > Also: return; here?
>
> Right, done.
Yes, this is fine. In most cases now, you don't even need to alias anymore
because the dump tool captures indirect data referenced from the stack (see bug
587139), but in this case, you do need the alias to capture the
Manifest::location, which is a pointer owned by the Extension and won't be
referenced on the stack.
lazyboy
https://codereview.chromium.org/2738553002/diff/40001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/2738553002/diff/40001/chrome/browser/extensions/extension_service.cc#newcode1492 chrome/browser/extensions/extension_service.cc:1492: char extension_id_copy[32]; I think you need 33 here, b/c ...
3 years, 9 months ago
(2017-03-08 19:01:01 UTC)
#9
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1489094026489650, "parent_rev": "4fe3a084bcf7a2782c29498761186eac282306b5", "commit_rev": "08ada0f645a7440d60b0004392b6330582c1da7e"}
3 years, 9 months ago
(2017-03-09 23:29:56 UTC)
#18
CQ is committing da patch.
Bot data: {"patchset_id": 60001, "attempt_start_ts": 1489094026489650,
"parent_rev": "4fe3a084bcf7a2782c29498761186eac282306b5", "commit_rev":
"08ada0f645a7440d60b0004392b6330582c1da7e"}
commit-bot: I haz the power
Description was changed from ========== [Extensions] Log instances of invalid extensions being added In theory, ...
3 years, 9 months ago
(2017-03-09 23:30:38 UTC)
#19
Message was sent while issue was closed.
Description was changed from
==========
[Extensions] Log instances of invalid extensions being added
In theory, we should never add an extension with an invalid location
(install source). However, in practice, bugs imply that this might be
able to happen.
Add some more tracking in ExtensionService::AddExtension to both upload
a crash dump and gracefully early-out any case where we try to add
invalid extensions.
BUG=692069
BUG=698736
==========
to
==========
[Extensions] Log instances of invalid extensions being added
In theory, we should never add an extension with an invalid location
(install source). However, in practice, bugs imply that this might be
able to happen.
Add some more tracking in ExtensionService::AddExtension to both upload
a crash dump and gracefully early-out any case where we try to add
invalid extensions.
BUG=692069
BUG=698736
Review-Url: https://codereview.chromium.org/2738553002
Cr-Commit-Position: refs/heads/master@{#455897}
Committed:
https://chromium.googlesource.com/chromium/src/+/08ada0f645a7440d60b0004392b6...
==========
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/08ada0f645a7440d60b0004392b6330582c1da7e
3 years, 9 months ago
(2017-03-09 23:30:39 UTC)
#20
Issue 2738553002: [Extensions] Log instances of invalid extensions being added
(Closed)
Created 3 years, 9 months ago by Devlin
Modified 3 years, 9 months ago
Reviewers: lazyboy, lfg, battre, Andrew T Wilson (Slow)
Base URL:
Comments: 8