Opened 7 years ago

Closed 7 years ago

#10201 closed defect (fixed)

Firefox ESR 24 sometimes hangs during exit on Mac OS

Reported by: mcs Owned by: erinn
Priority: Medium Milestone:
Component: Applications/Tor bundles/installation Version:
Severity: Keywords:
Cc: brade, gk, mikeperry, Sebastian Actual Points:
Parent ID: #10103 Points:
Reviewer: Sponsor:

Description

Kathy Brade and I have observed frequent hangs during exit on Mac OS 10.8.5 with our own ESR 24 Tor Browser builds as well as a recent build supplied by gk. We are not sure what triggers the hang, but it occurs often after loading a few web pages in the browser.

Activity Monitor shows that TorBrowser is consuming 100% CPU. dtrace shows this series of system calls repeated over and over:

write(0x9, "8\a\0", 0x1) = 1 0
write(0x9, "8\a\0", 0x1) = 1 0
select(0x9, 0xB0288B20, 0xB0288AA0, 0xB0288A20, 0xB0288A18) = 1 0
read(0x8, "88\0", 0x400) = 2 0

lsof shows that file descriptors 8 and 9 are pipes:

firefox 65737 brade 8 PIPE 0xffffff804948f210 16384 ->0xffffff8049491e10
firefox 65737 brade 9 PIPE 0xffffff8049491e10 16384 ->0xffffff804948f210

So it looks like the firefox process is repeatedly writing to and reading the same data from a pipe. I am not sure what the significance of '8' is....

Child Tickets

Change History (8)

comment:1 Changed 7 years ago by cypherpunks

I don't mean to be pedantic, but was this observed with Firefox ESR 24.1 or 24.1.1?

comment:2 in reply to:  1 Changed 7 years ago by mcs

Replying to cypherpunks:

I don't mean to be pedantic, but was this observed with Firefox ESR 24.1 or 24.1.1?

A fair question. We have seen it with both. I just did some more experimenting with gk's test build (see https://lists.torproject.org/pipermail/tor-qa/2013-November/000243.html)

With that bundle – which appears to be based on 24.1.1 – I experience a hang during exit every time I follow these steps:

1) Open the browser and let it establish a Tor connection.

2) Answer "No" to the spurious "Are you sure you want to enable plugins?" prompt.

3) Press Cmd-Q to quit.

comment:3 Changed 7 years ago by erinn

Cc: Sebastian added

I was unable to reproduce this on 10.6.8 with gk's bundle. Adding Sebastian to Cc in case he has some time to run gk's test bundle to see if he can reproduce.

comment:4 Changed 7 years ago by gk

FWIW: I am as well not able to reproduce the problem on 10.6.8. I don't think it should matter in this case but I don't get the plugin prompt due to not having plugins on my test Mac.

comment:5 in reply to:  4 Changed 7 years ago by brade

Replying to gk:

FWIW: I am as well not able to reproduce the problem on 10.6.8. I don't think it should matter in this case but I don't get the plugin prompt due to not having plugins on my test Mac.

We can reproduce the problem on a 10.6.8 system.
The steps that Mark gave above are correct but you need to follow them after you have started an exited TBB once. In other words, we do not see the hang the first time you quit the TBB browser but we see it on the 2nd or 3rd run and subsequent runs.

Mark and I will investigate further to see what is causing the problem.

comment:6 Changed 7 years ago by brade

We do not fully understand what is going on, but Mark and I came up with a fix.

It turns out that the hang does not occur if, when using the socket transport service, you close the input and output streams before closing the socket. Doing so inside Torbutton fixes this hang (Torbutton opens a connection to the tor control port at startup to check that the browser's proxy settings point to tor). We will make a similar fix inside Tor Launcher just in case.

We are probably masking an underlying Firefox ESR24 bug (the socket transport service never shuts down). But I think we have spent enough time looking at this for now.

We will commit the Torbutton and Tor Launcher fixes to the brade repos early next week and comment again here.

Last edited 7 years ago by brade (previous) (diff)

comment:7 Changed 7 years ago by mcs

Status: newneeds_review

comment:8 Changed 7 years ago by mikeperry

Resolution: fixed
Status: needs_reviewclosed

FWIW, this hang did not happen on my 10.6 mac either using the latest FF24 TBB builds, so unfortunately I can't verify. Perhaps it is specific to later MacOS versions only.

But I merged the fix, since it is simple. Thanks!

Note: See TracTickets for help on using tickets.