Opened 5 years ago

Closed 5 years ago

#13072 closed defect (duplicate)

Reproducable bug: Tor Browser v3.6.5 gets into a non-responsive state on startup about 15% of the time, possibly due to the HTTPS-Everywhere plugin

Reported by: Gravitas Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Keywords: tbb-hang
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I noticed that there is a reproducable Bug (at least on my PC) with Tor Browser v3.6.5 (latest version as of 2014-09-06).

If I open and close Tor Browser a few times, it always get into a state where "firefox.exe" is running in the background, and you click on the icon, but nothing happens.

Sometimes, it pops up dialogue box "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system."

If I manually kill the "firefox.exe" process, then everything starts to work properly.

In the short term, I would suggest that you enhance this error message, so instead of telling you to "Close the existing Firefox process" (which might be difficult for someone like my Mum to understand), it offers to automatically fix the problem, which is a matter of killing the process "firefox.exe" and retrying again.

Environment: Windows 7 x64, latest service packs.

p.s. In this ticket, I couldn't fill out "Milestone", "Version" or "Compnent" as it didn't mention "Tor Browser v3.6.5". Might want to fix this.

p.p.s. Tor Browser is awesome in every way, it is an incredible service to help people living in oppressive regimes who like to shoot people for posting their thoughts online.

Child Tickets

Attachments (2)

TorBrowser.png (13.4 KB) - added by Gravitas 5 years ago.
This is the message that pops up when I run "Start Tor Browser.exe", and there is a zombie process "firefox.exe" in the background (can fix it by killing this process, recommend making this easier for the user by automating the process).
TorBrowserNoVisibleWindows.png (122.2 KB) - added by Gravitas 5 years ago.
When "firefox.exe" is in its zombie state when it does not close down properly, using Process Explorer to try to bring it to the front fails - it has no visible windows. Restarting the process makes everything work again.

Download all attachments as: .zip

Change History (11)

Changed 5 years ago by Gravitas

Attachment: TorBrowser.png added

This is the message that pops up when I run "Start Tor Browser.exe", and there is a zombie process "firefox.exe" in the background (can fix it by killing this process, recommend making this easier for the user by automating the process).

comment:1 Changed 5 years ago by Gravitas

To reproduce this error under Windows 7 x64, dual-CPU Xeon with 12 cores and 32GB of ECC RAM, for Tor Browser v3.6.5:

  1. Run "Start Tor Browser.exe". About 15% of the time, it will fail to start up and display a window, producing a "zombie firefox.exe process".
  2. Run "Start Tor Browser.exe" again. You will get error message in the attached png.
  3. Kill "firefox.exe".
  4. Now run "Start Tor Browser.exe", and everything will work fine.

I could not reproduce this error on my quad-core i7 laptop, Windows 7, x64 with both TorBrowser v3.6.2 and v3.6.5, as everything worked flawlessly.

Last edited 5 years ago by Gravitas (previous) (diff)

Changed 5 years ago by Gravitas

When "firefox.exe" is in its zombie state when it does not close down properly, using Process Explorer to try to bring it to the front fails - it has no visible windows. Restarting the process makes everything work again.

comment:2 Changed 5 years ago by Gravitas

Tag: QUICKFIX

So, after much research, I can recommend a quick fix:

  1. Do not display this error: "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system."
  2. Instead, display this error: "Firefox is already running, but is not responding. Do you want to restart Firefox? (y/n).". If the user clicks "Yes", then restart Firefox.
Last edited 5 years ago by Gravitas (previous) (diff)

comment:3 Changed 5 years ago by Gravitas

Tag: THOROUGHFIX

After much more research, I think I might have narrowed down the cause of this error. Its related to the "HTTPS-Anywhere" plugin not starting up properly about 15% of the time on my machine, leaving "firefox.exe" as a zombie process on startup.

  • If I disable all plugins, then I *cannot* reproduce the zombie process error.
  • If I then enable all plugins, then I can reproduce the zombie process error after 5 restarts.
  • If I then disable nothing but the "Torbutton 1.6.12.1" plugin, then I can still reproduce the zombie process error after 6 restarts.
  • If I then disable nothing but the "NoScript 2.6.8.40" plugin, then I can reproduce the zombie process error after 4 restarts.
  • If I disable nothing but the "TorLauncher 0.2.5.6" plugin, then I can reproduce the zombie process error after 5 restarts.
  • If I then enable all plugins, including the "HTTPS-Everywhere 4.0.0" plugin, then I can reproduce the zombie process error after 7 restarts.
  • If I then upgrade to the "HTTPS-Everywhere 4.0.16" plugin, then I can reproduce the zombie process error after 2 restarts.
  • If I then upgrade to the "HTTPS-Everywhere 4.0.17" plugin, then I can reproduce the zombie process error after 6 restarts.
  • If I then upgrade to the "HTTPS-Everywhere 5" plugin, then I can reproduce the zombie process error after 3 restarts.
  • If I then downgrade to the "HTTPS-Everywhere 3.5.3" plugin, then I can reproduce the zombie process error after 5 restarts.
  • If I then disable the "HTTPS-Everywhere 5" plugin, then I *cannot* reproduce the zombie process error (despite restarting the browser 25 times)
  • If I then enable the "HTTPS-Everywhere 3.5.3" plugin, then I can reproduce the zombie process error after 2 restarts.
  • If I then downgrade to the "HTTPS-Everywhere 3.4.5" plugin, then I can reproduce the zombie process error after 2 restarts.
  • If I then downgrade to the "HTTPS-Everywhere 3.4.5" plugin, then I can reproduce the zombie process error after 1 restarts.
  • If I then downgrade to the "HTTPS-Everywhere 3.5.1" plugin, then I can reproduce the zombie process error after 1 restarts.
  • If I then disable the "HTTPS-Everywhere" plugin, then I *cannot* reproduce the zombie process error (despite restarting the browser 25 times)

I then switched to normal Firefox v31.0

  • If I then run the "HTTPS-Everywhere" plugin, then I *cannot* reproduce the zombie process error (despite restarting the browser 25 times)

Thus, I conclude that there is some issue with HTTPS-Anywhere that is preventing Tor Browser from starting up, about 15% of the time on my machine.

I am not recommending moving away from using a plugin that enforces SSL, but I am recommending either fixing the startup issue with HTTPS-Everywhere, or switching to another plugin that performs the same job.

Last edited 5 years ago by Gravitas (previous) (diff)

comment:4 Changed 5 years ago by Gravitas

Keywords: HTTPS-Anywhere added
Version: HTTPS-E 4.0dev14

comment:5 Changed 5 years ago by Gravitas

Summary:

  • HTTPS-Everywhere is preventing Tor browser from starting up about 15% of the time on my machine, so "firefox.exe" get into a Zombie state.
  • Might have to split this into two tickets, one for the QUICKFIX tag (mentioned in the comment above), and one for the THOROUGHFIX tag (mentioned in the comment above).

comment:6 Changed 5 years ago by Gravitas

Summary: Reproducable bug: Tor Browser v3.6.5 gets into a non-responsive state on startup, which can be fixed by killing "firefox.exe".Reproducable bug: Tor Browser v3.6.5 gets into a non-responsive state on startup about 15% of the time, possibly due to the HTTPS-Everywhere plugin

comment:7 in reply to:  3 Changed 5 years ago by gk

Keywords: tbb-hang added; Tor Browser HTTPS-Anywhere removed
Version: HTTPS-E 4.0dev14

Replying to Gravitas:

I then switched to normal Firefox v31.0

  • If I then run the "HTTPS-Everywhere" plugin, then I *cannot* reproduce the zombie process error (despite restarting the browser 25 times)

What happens with a vanilla Firefox 24.8.0 ESR which Tor Browser is using?

Thus, I conclude that there is some issue with HTTPS-Anywhere that is preventing Tor Browser from starting up, about 15% of the time on my machine.

Hm... Have you made sure that Firefox was really shut down before you relaunched it? If so, how?

comment:8 Changed 5 years ago by Gravitas

What happens with a vanilla Firefox 24.8.0 ESR which Tor Browser is using?

With a vanilla Firefox 24.8.0 ESR which Tor browser is using, everything works perfectly. As described in the tests above, the hang on startup only occurs if HTTPS-Anywhere is enabled.

Hm... Have you made sure that Firefox was really shut down before you relaunched it? If so, how?

Its not related to an issue with shutdown. Its related to an issue with startup.

I just reproduced the entire issue again now:

  1. Started Tor browser.
  2. It hung on startup.
  3. I waited 2 minutes, then manually killed "firefox.exe".
  4. I waited 1 minute.
  5. I started Tor browser again.
  6. It hung on startup.
  7. I waited 2 minutes, then manually killed "firefox.exe".
  8. I waited 1 minute.
  9. I started Tor browser again.
  10. This time it worked.
  11. I then disabled HTTPS-Anywhere, and restarted it 25 times in a row, and it started perfectly every time.
  12. I then re-enabled HTTPS-Anywhere, and it failed on try number 3 (usual symptom - firefox.exe hanging with no response).

I don't think this issue can be reproduced unless you have an extremely fast machine. My machine is a Xeon with dual CPU's with a total of 12 processing cores. The system is fantastically stable, and has no issues at all with any other programs.

Speaking as one programmer with 20 years of experience to other programmers with probably more experience than I, I suspect that this is some issue to do with a threading deadlock on startup. These can be notoriously tricky to track down. I am happy to run any tests you want to lay this bug to rest once and for all, we can probably find the line of code its deadlocking on on startup if we have the right tools.

Finally, this is not a new issue: its been recurring consistently on machines I've used for the last 6 months, which is why I spent so much time tracking down its cause and documenting it.

Last edited 5 years ago by Gravitas (previous) (diff)

comment:9 in reply to:  8 Changed 5 years ago by gk

Resolution: duplicate
Status: newclosed

Replying to Gravitas:

Speaking as one programmer with 20 years of experience to other programmers with probably more experience than I, I suspect that this is some issue to do with a threading deadlock on startup. These can be notoriously tricky to track down.

Yes, see comment:23:ticket:9531 for the likely issue. The start-up part is tracked in #10804. Thus, making this a duplicate of it.

Note: See TracTickets for help on using tickets.