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.

Rethinking My Hardware Setup (Again)

A couple of months ago I wrote about how I was thinking about getting a new computer. Here’s the progress I’ve made so far on that project.

Step 1: A new Monitor

The first step was to buy a new 27” monitor (1920×1080 pixels and an LED backlight which uses considerably less power than standard CCFL-backlights) that I could use with my old PC.

MyHardwareSetupMarch2011

Until now I have had only the 15” 1024×768 display of my laptop to work with and was mostly happy with that. However, as is often the case, I had no idea what I was missing out on by settling for such a tiny display. Sure, I have two 22” monitors at work, but the use-case there is a totally different one. I tend to have a lot more applications running, although most don’t require a lot of screen real-estate (Visual Studio being the obvious exception). I told myself for things like email and surfing the web, I wouldn’t need a bigger monitor at home. However, now having a screen this large for Outlook 2010 with it’s four-column layout or a large Excel spreadsheet, it’s just wonderful. I feel so much more productive now and never want to go back.

Interestingly enough, while I’m of course still working with the same computer, it does feel like an entirely different machine. Sounds crazy, I know. It’s not that it runs any faster, but having everything at a glance without the need to switch between apps so much, is a huge productivity boost. Also looking at a gorgeous wallpaper that large is awesome.

Because for many applications it doesn’t make sense to maximize them across the entire screen (most websites, for instance, are optimized for screen 1024 pixels wide), I now use a feature of Windows 7 called Aero Snap to maximize windows across one half of the screen. There are a couple of keyboard shortcuts for Aero Snap making it a snap to use (no pun intended).

Step 2: A new PC

One obvious downside of having this monitor is that it makes we want to watch videos in Full HD or 1080p resolution. Stuff that was high resolution on my old monitor just doesn’t look as good any more on the new monitor. Unfortunately, my computer is too underpowered to play such videos, let alone these super-high-resolution 4K videos on YouTube I would love to check out. Also, since it only has an analog VGA output instead of the digital HDMI, the picture is not as sharp as I could be.

The obvious next step would therefore be to get a new PC. As my current PC has reached the end of my usual 5 year replacement cycle a couple of days ago, now would normally be a good time to get a new one. Also, Intel has just come out with it’s new Sandy Bridge line of processors which offer some pretty nice performance characteristics. Given my budget I therefore went to dell.com and made my picks among the available options. Here’s the configuration I put together:

  • Intel i7-2600 CPU with 4 cores + Hyper-Threading at 3.4GHz and a maximum clock speed of 3.8GHz when Turbo Boost kicks in (I originally wanted to get an i5, but couldn’t resists the lure of the 7 series. I’m not sure though, how loud the fans needed to cool this bad boy are going to be)
  • 2 x 4 GB of RAM (I believe one can never have enough RAM and as this machine has two additional memory slots, I could expand it to 16GB later on),
  • 1 TB hard drive for data (could be smaller, if you ask me, but 1 TB was the smallest option available),
  • 120 GB Intel X25-M solid state disk for operating system and program files (not available from Dell but sells for 200 EUR on Amazon),
  • Windows 7 Ultimate 64 Bit (funny thing: Dell charges 150 EUR for the upgrade from Home Edition to Ultimate, while you can get Windows 7 Ultimate for 147,50 EUR on Amazon plus you also get to keep Home Edition installed on the PC)
  • Blu-ray disk drive (although colleagues’ experiences with playing movies on blu-ray have been mixed at best, I would really want to be able to watch Star Wars when it comes out on BD).

While this machine seems to be ridiculously overpowered, I am after all a computer enthusiast and plan on using it every day for at least the next five years.

Step 1.5: Stick with the old PC for now

Enthusiast or not, this machine doesn’t come cheaply, and I feel a little guilty discarding my old PC just because I want a new toy. So for now I have decided to stick with my current PC and get as much use out of it as I can before I buy a new one. Five years ago my old laptop was a hopeless case and the upgrade was a no-brainer. This time around, however, my current PC isn’t as underpowered in relative terms. Five years ago, I couldn’t watch a DVD or MPEG2-encoded movie during the summer, because it would cause the processor to overheat after a short period of time. This time around, my PC while not comparable to the computer I would like to replace it with, is still OK for most of my day-to-day work, namely Office, emails and surfing the web including standard-definition videos. So there isn’t really a need to upgrade other than me always wanting to have the latest stuff. Hence, I won’t purchase a new computer in the near future and do the environmentally responsible thing of sticking with what I’ve got.