Closed Bug 1353959 Opened 8 years ago Closed 8 years ago

Need a test webextension to crash the extension process

Categories

(WebExtensions :: General, defect, P1)

defect

Tracking

(firefox55 verified)

RESOLVED FIXED
Tracking Status
firefox55 --- verified

People

(Reporter: krupa--use, Assigned: kmag)

References

(Blocks 1 open bug)

Details

(Whiteboard: [triaged])

Attachments

(2 files)

Is it possible to build a webextension that would allow to trigger a crash in the extension process to test how well Firefox recovers for out of process?
Flags: needinfo?(kmaglione+bmo)
Summary: Test webextension to crash the extension process → Need a test webextension to crash the extension process
No, it's not possible. We could do it with an unsigned add-on on non-release builds, but I can answer the question for you now: We don't currently make any attempt to recover from an extension process crash, so filing a bug for that would probably be the place to start.
Flags: needinfo?(kmaglione+bmo)
Depends on: 1355239
This should be doable with a simple browser console code snippet.
Assignee: nobody → kmaglione+bmo
Priority: -- → P1
Whiteboard: [triaged]
Running this in the browser console should do:

Cu.import("resource://gre/modules/Extension.jsm").GlobalManager.extensionMap.values().next().value.parentMessageManager.loadProcessScript("data:,Components.utils.import('resource://gre/modules/ctypes.jsm'); ctypes.cast(ctypes.uintptr_t(1), ctypes.int.ptr).contents", false);
I've been told this would be more impressive without any semicolons, so:

Cu.import("resource://gre/modules/Extension.jsm").GlobalManager.extensionMap.values().next().value.parentMessageManager.loadProcessScript("data:,Components.utils.import('resource://gre/modules/ctypes.jsm').ctypes.cast(ctypes.uintptr_t(1), ctypes.int.ptr).contents", false);
Attached image Crash2.gif
Using the snippet from comment 4 will cause Firefox to crash, do you have any opinion about this Kris? 

Here is the crash report: https://crash-stats.mozilla.com/report/index/ded6c3d8-ebc8-4b2a-9e9c-cdc260170427

Verified on Firefox 55.0a1 (2017-04-27) under Wind 7 -64 bit.

Please see the attached file.
Flags: needinfo?(kmaglione+bmo)
Currently, WebExtensions normally run in the main browser process, so that's what this snippet will crash. If you set "extensions.webextensions.remote" to true, it will crash the separate extensions process.
Flags: needinfo?(kmaglione+bmo)
I can confirm that using the snippet from comment 4 after "extensions.webextensions.remote" was set to true will crash the extensions process.

As you can see in the attached video,the WebExtensions will not work after the crash of the extensions process.

This issue is verified as fixed on Firefox 55.0a1 (2017-04-28) under Wind 7 64-bit and Ubuntu 16.04 32-bit.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: