Plugin-container and out-of-process plugins: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(On Mac OS, "plugin-container" is called "<app-name> Plugin Process (<plugin-name>", other minore edits)
(SUMO links)
Line 15: Line 15:
For each plugin for which the "OOPP" crash protection feature is enabled,  a separate plugin process will be started when you first visit a webpage that evokes that plugin.  When you exit Firefox,  those plugin-container processes will terminate.  This plugin process is named "plugin-container" on Linux, "plugin-container.exe" on Windows, and "Firefox Plugin Process (<plugin-name>)" on Mac OS.
For each plugin for which the "OOPP" crash protection feature is enabled,  a separate plugin process will be started when you first visit a webpage that evokes that plugin.  When you exit Firefox,  those plugin-container processes will terminate.  This plugin process is named "plugin-container" on Linux, "plugin-container.exe" on Windows, and "Firefox Plugin Process (<plugin-name>)" on Mac OS.


'''Important:'''  Your [[Firewalls |firewall]] or other security software may block the plugin-container process and prevent a plugin from working.  If you are asked  for permission to allow the plugin-container process to access the Internet, you should allow it.  If you previously denied access,  you should change your security software program settings to allow plugin-container.  [http://forums.mozillazine.org/viewtopic.php?f=38&t=1939469] [http://forums.mozillazine.org/viewtopic.php?f=38&t=1929275] [http://support.mozilla.com/forum/1/704794] [http://support.mozilla.com/forum/1/703573] [http://forums.mozillazine.org/viewtopic.php?f=23&t=1989839&start=15]
'''Important:'''  Your [[Firewalls |firewall]] or other security software may block the plugin-container process and prevent a plugin from working.  If you are asked  for permission to allow the plugin-container process to access the Internet, you should allow it.  If you previously denied access,  you should change your security software program settings to allow plugin-container.  [http://forums.mozillazine.org/viewtopic.php?f=38&t=1939469] [http://forums.mozillazine.org/viewtopic.php?f=38&t=1929275] [http://forums.mozillazine.org/viewtopic.php?f=23&t=1989839&start=15]


===Plugin error dialog===
===Plugin error dialog===
Line 21: Line 21:


==Disabling crash protection==
==Disabling crash protection==
In some cases you may want to disable the "out-of-process plugins" (OOPP) crash protection feature; e.g.,  to troubleshoot problems  that first appeared in Firefox 3.6.4 or above.  To disable crash protection, go to  [[about:config]] and set to '''false''' all preferences starting with '''dom.ipc.plugins.enabled'''.  (It is possible that your browser has only that preference entry without any addition.) This will prevent the "plugin-container" process from running and all plugins will run within the Firefox browser process.   [http://support.mozilla.com/en-US/forum/1/703573?forumId=1&comments_offset=20#threadId708295]  [http://support.mozilla.com/en-US/forum/1/713600]
In some cases you may want to disable the "out-of-process plugins" (OOPP) crash protection feature; e.g.,  to troubleshoot problems  that first appeared in Firefox 3.6.4 or above.  To disable crash protection, go to  [[about:config]] and set to '''false''' all preferences starting with '''dom.ipc.plugins.enabled'''.  (It is possible that your browser has only that preference entry without any addition.) This will prevent the "plugin-container" process from running and all plugins will run within the Firefox browser process.  


===Firefox 3.6.x===
===Firefox 3.6.x===
Line 69: Line 69:
*[https://developer.mozilla.org/devnews/index.php/2010/06/22/firefox-3-6-4-with-crash-protection-now-available/ Firefox 3.6.4 with Crash Protection Now Available (MDC News)]
*[https://developer.mozilla.org/devnews/index.php/2010/06/22/firefox-3-6-4-with-crash-protection-now-available/ Firefox 3.6.4 with Crash Protection Now Available (MDC News)]
*[https://developer.mozilla.org/en/Plugins/Out_of_process_plugins/The_plugin_hang_detector The plugin hang detector (MDC)]
*[https://developer.mozilla.org/en/Plugins/Out_of_process_plugins/The_plugin_hang_detector The plugin hang detector (MDC)]
*[http://support.mozilla.com/kb/Plugin+crash+reports Plugin crash reports (Firefox Support)]
*[https://support.mozilla.org/kb/Plugin+crash+reports Plugin crash reports (Firefox Support)]
*[http://support.mozilla.com/kb/What+is+plugin-container What is plugin-container (Firefox Support)]
*[https://support.mozilla.org/kb/What+is+plugin-container What is plugin-container (Firefox Support)]
* [http://mozillalinks.org/wp/2010/06/firefox-3-6-4-now-available/ Firefox 3.6.4 now available with out of process plugins] at mozillalinks.org
* [http://mozillalinks.org/wp/2010/06/firefox-3-6-4-now-available/ Firefox 3.6.4 now available with out of process plugins] at mozillalinks.org
* [https://wiki.mozilla.org/Firefox/Crash_Protection Firefox/Crash Protection - MozillaWiki]
* [https://wiki.mozilla.org/Firefox/Crash_Protection Firefox/Crash Protection - MozillaWiki]

Revision as of 00:12, 30 December 2011

This article describes a crash protection feature in current Mozilla browsers, in which plugins are run in a separate process. It was written for Firefox but also applies to SeaMonkey 2.1 and above.

Crash protection

Starting in Firefox 3.6.4 on Windows and Linux, a new crash protection feature isolates certain plugins from the browser process and sets those plugins to each run in a separate plugin-container process. Before this new "out-of-process plugins" ("OOPP") crash protection feature, a problem with a plugin (e.g, Adobe Flash) would often cause the entire Firefox browser to crash. When an "out-of-process plugin" stops working, Firefox can remain running and just the portions of a webpage that need the plugin will be disabled (i.e., missing the plugin content).

In Firefox 3.6 releases since Firefox 3.6.4, the crash protection feature that sets plugins to run in a separate process is enabled for specified plugins only. By default, the plugins enabled to run "out-of-process" are the NPAPI test plugin, Adobe Flash, Apple QuickTime (Windows) and Microsoft Silverlight (Windows). [1]

These "whitelisted" plugins in Firefox 3.6 releases (Firefox 3.6.4 and above) are each specified in a separate dom.ipc.plugins.enabled.<filename> preference that is set to true for each OOPP-enabled plugin. (Crash protection is disabled by default for all other plugins so, by default, the dom.ipc.plugins.enabled preference that permits all plugins to run "out-of process" is set to false.)

Note: This new crash protection feature is available for Mac OS (10.6 or higher) in Firefox 4 and above. [2] [3]

Plugin-container

For each plugin for which the "OOPP" crash protection feature is enabled, a separate plugin process will be started when you first visit a webpage that evokes that plugin. When you exit Firefox, those plugin-container processes will terminate. This plugin process is named "plugin-container" on Linux, "plugin-container.exe" on Windows, and "Firefox Plugin Process (<plugin-name>)" on Mac OS.

Important: Your firewall or other security software may block the plugin-container process and prevent a plugin from working. If you are asked for permission to allow the plugin-container process to access the Internet, you should allow it. If you previously denied access, you should change your security software program settings to allow plugin-container. [4] [5] [6]

Plugin error dialog

Firefox will automatically use an installed and enabled plugin for embedded webpage content, such as Flash videos on YouTube. If the plugin crashes or if Firefox detects that the plugin has stopped responding, the plugin will terminate and you will see an error dialog on the webpage, instead of the content that uses the plugin. To send a crash report to Mozilla, click the Send crash report link in the error dialog.

Disabling crash protection

In some cases you may want to disable the "out-of-process plugins" (OOPP) crash protection feature; e.g., to troubleshoot problems that first appeared in Firefox 3.6.4 or above. To disable crash protection, go to about:config and set to false all preferences starting with dom.ipc.plugins.enabled. (It is possible that your browser has only that preference entry without any addition.) This will prevent the "plugin-container" process from running and all plugins will run within the Firefox browser process.

Firefox 3.6.x

To disable crash protection in Firefox 3.6 releases (3.6.4 and above) type about:config in the Location Bar (address bar) and press the Enter key. When the list of preferences appears, type dom.ipc.plugins.enabled to find the following preferences. (Each preference specifies an "out-of-process" plugin by its filename; the name shown in parentheses is for informational purposes only):

On Linux:

  • dom.ipc.plugins.enabled.libflashplayer.so (Adobe Flash)
  • dom.ipc.plugins.enabled.libnptest.so (NPAPI test plugin)

On Windows:

  • dom.ipc.plugins.enabled.npctrl.dll (Microsoft Silverlight)
  • dom.ipc.plugins.enabled.npqtplugin.dll (Apple QuickTime)
  • dom.ipc.plugins.enabled.npswf32.dll (Adobe Flash)
  • dom.ipc.plugins.enabled.nptest.dll (NPAPI test plugin)

Toggle (double-click) each preference to change the value from "true" to false, as shown below on Windows.

Note: In Firefox 3.6 releases (3.6.4 and above) the preference dom.ipc.plugins.enabled is already set to "false", by default.

Firefox 4 and above

This applies to Firefox pre-release builds (3.7a1pre and above) and Firefox 4 Beta as well as Firefox 4.0 and later releases. For more information about Firefox test builds, see Testing pre-release versions.

Mac OS

On Mac OS (10.6 or above), in Firefox 4 Beta releases previous to Beta 7, only certain plugins (Flash Player and Java) were "whitelisted" to run out-of-process by default. These plugins were set to "true" in the preference dom.ipc.plugins.enabled.<filename>.

Starting in Firefox 4 Beta 7, the following preferences are set to "true" , by default:

  • dom.ipc.plugins.enabled.i386.flash player.plugin
  • dom.ipc.plugins.enabled.i386.javaplugin2_npapi.plugin
  • dom.ipc.plugins.enabled.x86_64

Important: When Firefox 4 Beta 7 is run in 64-bit mode (the default for 64-bit Mac OS 10.6) all plugins are set to run out-of-process via the preference dom.ipc.plugins.enabled.x86_64, which is set to "true" by default. If you change this preference to "false" when running in 64-bit mode, some or all of your plugins (e.g, Flash) will not work. Note that not all 32-bit plugins will run on Firefox 4 in 64-bit mode. Only plugins that use the Cocoa version of NPAPI will load; any i386 (32-bit) plugin still using Carbon NPAPI won’t load (e.g., Flash plugins previous to version 10.1 will not work when Firefox 4 is run in 64-bit mode). [7] [8] To troubleshoot plugins in Firefox 4.0 Beta 7 and later, set Firefox to run in 32-bit mode (close Firefox, control-click the Firefox.app icon, select "Get Info", and then check the box, "Open in 32-bit mode") before disabling crash protection.

Windows and Linux

In Firefox 4 and above on Windows and Linux, the OOPP crash protection feature is enabled for all plugins and the preference dom.ipc.plugins.enabled is set to true, by default. To disable crash protection, toggle this preference from "true" to false. If you only want to disable certain plugins from running "out-of-process", you can "blacklist" each plugin by creating a new boolean preference dom.ipc.plugins.enabled.<filename> and setting its value to false. Filenames of specific plugins can be found in about:plugins and should be entered in lower-case. For example, to disable OOPP for the Adobe Flash plugin on Windows, create a new boolean preference named dom.ipc.plugins.enabled.npswf32.dll and set its value to false. [9]

Note: Starting in trunk builds after 10-15-2010, a new preference dom.ipc.plugins.java.enabled has been added. [10] On Windows builds, this preference will be set to false by default, due to stability issues when OOPP for Java is enabled (bug 603417).

Plugin hang detector

In Firefox 3.6.4 and above, a plugin hang detector determines when an out-of-process plugin or plugin script has stopped responding, so that Firefox can terminate the plugin. The time period that must pass before the plugin is assumed to be locked up is set in the preference dom.ipc.plugins.timeoutSecs (the default is 45 seconds in Firefox 3.6.6). [11] When Firefox terminates a plugin that is no longer responding, you will see the "plugin has crashed" error dialog shown above. To prevent Firefox from terminating plugins it considers non-responsive, set dom.ipc.plugins.timeoutSecs to -1 in about:config. This disables the plugin hang detector but does not disable OOPP or stop "plugin-container" from running; to do that, you must set the dom.ipc.plugins.enabled.* preferences to "false" (see above).

See also

External links

Related bug reports