Firefox 4 Starts Child Processes on Shutdown

I love Firefox, it’s my favorite browser. So without hesitation I upgraded to the long awaited 4.0 release when it came out the other day. The new UI is pretty nice, I like how clean and free of clutter it is, especially in conjunction with the Personal Menu add-on.

I’ve always had Firefox configured to clear all cookies, browsing history, cache et cetera, so basically everything from one browsing session is gone when I close Firefox. Because I don’t want sites to track me, I am closing and restarting Firefox frequently. It only takes a second and I thus make sure that sites I visit after a restart don’t know where I came from.

Since upgrading to Firefox 4, however, I got this message way more often than I used to after restarting:

FirefoxIsAlreadyRunning

Apparently, Firefox was still in the process of shutting  down even 15 seconds after I had exited the application. A quick look into SysInternal’s ProcessExplorer (a must-have tool for anybody who cares what’s going on with his or her PC) revealed that not only was firefox.exe still running, but it had created a bunch of child processes that were consuming quite a bit of CPU and RAM.

Firefox4Processes

These plugin-container.exe processes are normally used by Firefox to run plugins such as Flash Player in a separate process, so when the plugin crashes, it won’t crash Firefox (more info). This is actually a good thing, because it means the browser is more stable. Except I wasn’t using any plugins at the time. So where did these processes come from? It turns out, these processes were created only after I had clicked File –> Exit in Firefox. The command line arguments these processes were started with (as shown by ProcessExplorer) didn’t give any indication as to what they were supposed to do, except that there seemed to be at least one process per installed plugin. However, I assumed that Firefox, as part of its shutdown and clean-up routine, was telling these plugins do some clean-up of their own, so I used that as a starting point for the following investigation.

Turns out, I was right, because unchecking “Clear history when Firefox closes” got rid of this rather annoying behavior. However, I did in fact want Firefox to clear my history when it closes, so I set out to figure out which of the many things Firefox was clearing was causing this. It took some disabling, closing, waiting and restarting Firefox, but eventually I found out that it was the Clear Cookies option, that was causing all this. Check out the documentation on how to enable/disable this option.

Because I have already configured Firefox to accept all cookies, but keep them only until I close it, this option seems redundant. I actually verified that with this option disabled, but the keep cookies until I close Firefox enabled, all cookies were deleted in fact when I closed the browser. I’m still curious though, what all those plugins are doing when the former option is enabled and why the heck it takes them so long.

Finally, prior to my own investigation, I naturally did a quick Bing (and Google) search, but I couldn’t find anything for “Firefox starting child processes on shutdown” and similar search terms that was related to Firefox 4. This is why I decided to write this post. maybe people running into the same problem as I find it useful.

[2011-03-27 Update] Found this bug report describing my exact problem.

Advertisements

2 thoughts on “Firefox 4 Starts Child Processes on Shutdown”

  1. Thanks for the information. I was having the same problem after installing ff4. This has fixed my problem. great work

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s