Opened 12 months ago

Last modified 3 months ago

#22581 reopened defect

Tor browser is crashing on exit on Windows

Reported by: WalrusInAnus Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-crash, tbb-7.0-issues, tbb-regression, GeorgKoppen201803, TorBrowserTeam201803
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Ever since I updated to the latest version 7, the browser crashes every single time on exit.
I have no idea if there are any hidden logs anywhere, but this is what I can see in Windows EventLog:
Faulting application name: firefox.exe, version: 52.1.2.6242, time stamp: 0x00000000
Faulting module name: nssckbi.dll_unloaded, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x624cda4c
Faulting process id: 0x1344
Faulting application start time: 0x01d2e38545d0b59e
Faulting application path: F:\Programy\Tor Browser\Browser\firefox.exe
Faulting module path: nssckbi.dll
Report Id: bf91d4dc-4f78-11e7-bfb4-902b34ddceaf

Child Tickets

Attachments (2)

Capture.JPG (22.2 KB) - added by WalrusInAnus 12 months ago.
prefs.js (14.2 KB) - added by WalrusInAnus 12 months ago.

Download all attachments as: .zip

Change History (73)

comment:1 Changed 12 months ago by WalrusInAnus

Component: - Select a componentApplications/Tor Browser
Owner: set to tbb-team

comment:2 Changed 12 months ago by gk

Keywords: tbb-crash added
Priority: MediumHigh
Severity: NormalMajor
Status: newneeds_information
Summary: TOR crashing on exitTor browser is crashing on exit on Windows

Does the browser crash as well if you are not surfing to some website but are rather just opening it and then closing it again? Which Windows version is that?

Changed 12 months ago by WalrusInAnus

Attachment: Capture.JPG added

comment:3 Changed 12 months ago by WalrusInAnus

I am on Windows 7 x64.
It doesn't matter if I close the browser right after starting it or after an hour. I always get the crash message right after the window disappears.

Now that I think about it, I get crashes after running for longer periods of time too, but I don't do that very often so I am not sure if it's the same type of crash (the dll in question).

comment:4 Changed 12 months ago by cypherpunks

Measure the time from pressing Exit and a crash, if it is more than 60 sec - it's a "feature"!

comment:5 Changed 12 months ago by WalrusInAnus

No, it's like half a second to a second.

Last edited 12 months ago by WalrusInAnus (previous) (diff)

comment:6 Changed 12 months ago by cypherpunks

dll_unloaded is suspicious. Do you have some "security" programs installed?

comment:7 Changed 12 months ago by WalrusInAnus

Yes. I use Eset Smart Security.

comment:8 Changed 12 months ago by cypherpunks

Remove it and test again.

comment:9 Changed 12 months ago by WalrusInAnus

That's complete nonsense.
Are you even a part of the TOR devteam? I don't want to waste time talking to someone who has no idea.

comment:10 Changed 12 months ago by cypherpunks

Nonsense is your "Eset Smart Security". Tor team is busy with Tor, and this is a Tor Browser, and its team is busy too.

comment:11 Changed 12 months ago by gk

Calm down folks. WalrusInAnus could you remove that tool (disabling might not be enough) and test again? This is actually no nonsense. We have seen in the past a lot of "security" tools that are intercepting/interfering (with) the browser or tor and are causing crashes. This might be another instance of that.

Last edited 12 months ago by gk (previous) (diff)

comment:12 Changed 12 months ago by WalrusInAnus

Well I've been using it for several years now AND I didn't have the crashing problem with TOR version 6 (any of them I believe), so it definitely is not the cause. It started again when TOR updated to v7.

comment:13 Changed 12 months ago by WalrusInAnus

I've tried it on different PC with no antivirus software installed though, and with same result.

comment:14 Changed 12 months ago by cypherpunks

Then it's a virus))

comment:15 Changed 12 months ago by WalrusInAnus

Please stop commenting.

comment:16 in reply to:  12 Changed 12 months ago by gk

Replying to WalrusInAnus:

Well I've been using it for several years now AND I didn't have the crashing problem with TOR version 6 (any of them I believe), so it definitely is not the cause. It started again when TOR updated to v7.

Alright, I just looked at it on my Windows 7 64bit machine but could not reproduce these problems. Do they go away if you set browser.tabs.remote.autostart.2 to false in your about:config and restart Tor Browser (this disables the multiprocess mode, maybe the crash is related to that one on your computer)?

comment:17 Changed 12 months ago by WalrusInAnus

Nope, unfortunately no change.
I tried a fresh "installation" as well in case it was something wrong with the profile (which I've been using for quite some time), but no luck.
Are there old TOR versions to be downloaded from somewhere? I'd like to confirm v6 doesn't crash like I believe it didn't.

comment:19 Changed 12 months ago by WalrusInAnus

Ok. Version 6.5a6 does not crash. Version 7 does (and so did the alphas or whatever the unstable versions are called).

comment:20 Changed 12 months ago by gk

Could you test 6.5.2 which is the last stable before the switch to 7.0? Would you be willing to run test builds if I'd give some to you to track the problem down? Oh, another question: Does a normal Firefox 52 ESR crash for you as well (https://www.mozilla.org/en-US/firefox/organizations/all/)?

comment:21 Changed 12 months ago by WalrusInAnus

Oh I thought I grabbed the last version before 7. Let me try again.
I'll go with completely clean installation too. Brb.

comment:22 Changed 12 months ago by WalrusInAnus

Well, uh. I downloaded v7 again, installed to completely new folder with a new profile, and thus far it seems it's not crashing.
Are you interested in a log from my regular installation to maybe try to figure out what went wrong? Something might have broken during upgrade from v6 to v7 (which could happen to others I guess).

edit: Firefox works just fine.

Last edited 12 months ago by WalrusInAnus (previous) (diff)

comment:23 in reply to:  22 Changed 12 months ago by gk

Replying to WalrusInAnus:

Well, uh. I downloaded v7 again, installed to completely new folder with a new profile, and thus far it seems it's not crashing.
Are you interested in a log from my regular installation to maybe try to figure out what went wrong? Something might have broken during upgrade from v6 to v7 (which could happen to others I guess).

What do you mean with "log"? What would help would be a diff between both folders trying to narrow down the difference that is causing the problem. Could you help with that?

comment:24 Changed 12 months ago by WalrusInAnus

Well, Tor has logging built in, which is enabled from within torrc file. I thought it might be of some use.
Don't know how to do the diff thing though, unfortunately. Which folders should I compare and how?

comment:25 Changed 12 months ago by cypherpunks

No matter

Last edited 12 months ago by cypherpunks (previous) (diff)

comment:26 in reply to:  24 Changed 12 months ago by gk

Replying to WalrusInAnus:

Well, Tor has logging built in, which is enabled from within torrc file. I thought it might be of some use.

Hm, maybe although I currently doubt that as it is the browser which is crashing. So, let's take this road later in case we have not solved the issue and have no clue on how to make progress.

Don't know how to do the diff thing though, unfortunately. Which folders should I compare and how?

Not sure how to do that efficiently on Windows but you could do the following things:

1) Copy the broken setup to a new folder (only use the one in the new folder for debugging; in case anything goes wrong you still have the broken setup at the original location to start over)
2) Test that it is still broken in the new folder
3) If 2) is the case remove the TorBrowser directory and everything below it (it is located in the Browser folder) and replace it with the TorBrowser contents of the working setup
4) Test whether it is still broken

This should help us narrow the issue down a lot and we can think about how to proceed further depending on the results.

comment:27 Changed 12 months ago by WalrusInAnus

Replacing the TorBrowser folder stopped the crashing.

comment:28 Changed 12 months ago by gk

Thanks, then you could start with 1) again but this time replace the Data directory in Browser\TorBrowser and see whether the problem is in that one.

comment:29 Changed 12 months ago by WalrusInAnus

Still no crashes. We're getting somewhere.

comment:30 Changed 12 months ago by gk

Okay, the crashes are caused by something in your Data directory then. Let's see. Do the crashes stop if you replace Browser\TorBrowser\Data\Browser? If som please test with replacing Browser\TorBrowser\Data\Tor as well to double-check that we did not make any mistakes. Exactly one of them should still lead to crashes.

comment:31 Changed 12 months ago by WalrusInAnus

Replacing \Browser\TorBrowser\Data\Tor\ had no effect, but \Browser\TorBrowser\Data\Browser\ stopped the crashes.

That could indicate something rotten in the user profile, BUT if I do a clean install and copy the existing profile in there, it's not crashing.

comment:32 Changed 12 months ago by cypherpunks

Can you find nssckbi.dll_unloaded somewhere in the broken browser's folders?

comment:33 in reply to:  31 Changed 12 months ago by gk

Replying to WalrusInAnus:

Replacing \Browser\TorBrowser\Data\Tor\ had no effect, but \Browser\TorBrowser\Data\Browser\ stopped the crashes.

That could indicate something rotten in the user profile, BUT if I do a clean install and copy the existing profile in there, it's not crashing.

Weird. But we still have a way forward to narrow things down. I don't know how your profile directory looks like but I guess you know how to narrow the issue down further? Could you get back to us if you have found the culprit? And the question regarding nssckbi.dll_unloaded is a good one as well.

comment:34 Changed 12 months ago by WalrusInAnus

There's no such file anywhere. Only nssckbi.dll in \Browser\
I'll keep trying to randomly replace files and see if I come up with something.

comment:35 Changed 12 months ago by WalrusInAnus

It seems like it could be something in prefs.js (when I deleted and let it regenerate, the crashing stopped), but that's as far as I'm able to troubleshoot it. I don't know anything about the inner workings of Firefox.

Last edited 12 months ago by WalrusInAnus (previous) (diff)

comment:36 Changed 12 months ago by cypherpunks

Attach it here, let's take a look.

Changed 12 months ago by WalrusInAnus

Attachment: prefs.js added

comment:37 Changed 12 months ago by WalrusInAnus

Allright, done.

comment:38 Changed 12 months ago by cypherpunks

Just don't use TorBrowser for Windows. Firefox for Windows were never used for real after to be built with MinGW.
PS: or use it only with default settings (private browsing mode must be enabled for TorBrowser, etc)

Last edited 12 months ago by cypherpunks (previous) (diff)

comment:39 in reply to:  37 Changed 12 months ago by gk

Replying to WalrusInAnus:

Allright, done.

Thanks. So, looking at your preferences file and on our previous issues it seems you might have been running into something we had fixed in #13610/#10761. Could you go to about:preferences#privacy in your broken Tor Browser and make sure to select the "Never remember history" option and do a restart. Do the crashes still occur afterwards?

comment:40 Changed 12 months ago by WalrusInAnus

I thought we were finished (in part due to the other guy's nonsense comments here) and have since deleted the old profile and started anew. Sorry.

comment:41 in reply to:  40 Changed 12 months ago by gk

Resolution: worksforme
Status: needs_informationclosed

Replying to WalrusInAnus:

I thought we were finished (in part due to the other guy's nonsense comments here) and have since deleted the old profile and started anew. Sorry.

No worries. If similar things come up again we'll know where to look I guess. :)

comment:42 Changed 12 months ago by cypherpunks

worksforme

Then you need to disable changing for about:preferences#privacy or something yet, who knows what config can to brick user's privacy/expirience again if browser unsupport mingw build env for real.

comment:43 in reply to:  42 Changed 12 months ago by gk

Replying to cypherpunks:

worksforme

Then you need to disable changing for about:preferences#privacy or something yet, who knows what config can to brick user's privacy/expirience again if browser unsupport mingw build env for real.

It's not clear whether my theory in comment:39 is actually true. I could not reproduce the problem following the steps in #10761.

comment:44 Changed 12 months ago by cypherpunks

I could not reproduce the problem following the steps in #10761.

Because it's race condition, in ideal world (where users with bug lives) dll unloaded just after last FreeLibrary() called, in non-ideal world (where users without bug lives) code with thunk from freed library still in place and PR_Free() successfully finished.

comment:45 Changed 12 months ago by gk

I am wondering, though, why this is happening again (assuming it is really something like #10761) because it seemed to me the underlying issues got fixed and the fixes are available in esr45/esr52.

comment:47 Changed 11 months ago by cypherpunks

Keywords: tbb-regression added

comment:48 in reply to:  46 Changed 11 months ago by gk

Replying to cypherpunks:

https://hg.mozilla.org/mozilla-central/rev/169d5dfe505f

What do you mean to say with that changelog? That the usage of -mnop-fun-dllimport is back and the reason for the crashes (even though it got fixed in upstream NSS with https://bugzilla.mozilla.org/show_bug.cgi?id=1151447)?

comment:50 Changed 11 months ago by gk

Keywords: tbb-7.0-issues added
Priority: HighMedium
Resolution: worksforme
Severity: MajorNormal
Status: closedreopened

comment:51 Changed 10 months ago by gk

Keywords: TorBrowserTeam20707 GeorgKoppen20107 added

I have found a machine where I can reproduce this issue. Putting this ticket on my radar then.

comment:52 Changed 10 months ago by gk

Keywords: TorBrowserTeam20708 GeorgKoppen20108 added; TorBrowserTeam20707 GeorgKoppen20107 removed

comment:53 Changed 10 months ago by gk

Keywords: TorBrowserTeam201708 GeorgKoppen201708 added; TorBrowserTeam20708 GeorgKoppen20108 removed

comment:54 Changed 9 months ago by gk

Keywords: GeorgKoppen201709 added; GeorgKoppen201708 removed

Moving my tickets to the new month.

comment:55 Changed 9 months ago by gk

Keywords: TorBrowserTeam201709 added; TorBrowserTeam201708 removed

Items for September 2017.

comment:57 Changed 8 months ago by sudha@…

I have seen this bug since ages ago, most likely from the first 7a version. Certainly it is present on all 7 alphas for windows.

Steps to reproduce from fresh install are very easy -- I have reproduced that on three different systems, Win8.1, Win10 1703 and 1607 builds.

What's worse, after quite a while of such usage the Tor profile can appear very corrupted -- to the point that tor browser starts crashing on start, or more specifically -- start browser and then click on a tab get a crash.

comment:58 Changed 8 months ago by gk

Keywords: TorBrowserTeam201710 added; TorBrowserTeam201709 removed

Items for October 2017

comment:59 Changed 8 months ago by gk

Keywords: GeorgKoppen201710 added; GeorgKoppen201709 removed

comment:60 Changed 7 months ago by gk

Keywords: GeorgKoppen201711 added; GeorgKoppen201710 removed

Moving my tickets to November.

comment:61 Changed 7 months ago by gk

FWIW here is the stack trace I get when crashing:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1048.0x1cc]
0x6edfda4c in ?? ()
(gdb) bt
#0  0x6edfda4c in ?? ()
#1  0x634cca60 in _PR_DestroyThreadPrivate ()
   from C:\Users\user\Desktop\Tor Browser\Browser\nss3.dll
#2  0x634cbb1a in _PR_CleanupThread ()
   from C:\Users\user\Desktop\Tor Browser\Browser\nss3.dll
#3  0x634ca36c in _PR_NativeRunThread ()
   from C:\Users\user\Desktop\Tor Browser\Browser\nss3.dll
#4  0x634bc19e in pr_root@4 ()
   from C:\Users\user\Desktop\Tor Browser\Browser\nss3.dll
#5  0x6c29c556 in endthreadex ()
   from C:\Users\user\Desktop\Tor Browser\Browser\msvcr100.dll
#6  0x6c29c600 in endthreadex ()
   from C:\Users\user\Desktop\Tor Browser\Browser\msvcr100.dll
#7  0x7572ef8c in KERNEL32!AcquireSRWLockExclusive ()
   from C:\Windows\system32\kernel32.dll
#8  0x76ed367a in ntdll!RtlInsertElementGenericTableAvl ()
   from C:\Windows\system32\ntdll.dll
#9  0x76ed364d in ntdll!RtlInsertElementGenericTableAvl ()
   from C:\Windows\system32\ntdll.dll
#10 0x00000000 in ?? ()

comment:62 Changed 7 months ago by gk

Keywords: TorBrowserTeam201711 added; TorBrowserTeam201710 removed

Moving tickets over to November.

comment:63 Changed 6 months ago by gk

Moving tickets to December 2017

comment:64 Changed 6 months ago by gk

Keywords: TorBrowserTeam201712 added; TorBrowserTeam201711 removed

Moving tickets to December 2017, for realz.

comment:65 Changed 6 months ago by gk

Keywords: GeorgKoppen201712 added; GeorgKoppen201711 removed

Moving my tickets to December.

comment:66 Changed 5 months ago by gk

Keywords: GeorgKoppen201801 added; GeorgKoppen201712 removed

Moving my tickets to 2018

comment:67 Changed 5 months ago by gk

Keywords: TorBrowserTeam201801 added; TorBrowserTeam201712 removed

Moving tickets to 2018.

comment:68 Changed 4 months ago by gk

Keywords: GeorgKoppen201802 added; GeorgKoppen201801 removed

Moving my tickets to Feb.

comment:69 Changed 4 months ago by gk

Keywords: TorBrowserTeam201802 added; TorBrowserTeam201801 removed

Moving tickets to Feb

comment:70 Changed 3 months ago by gk

Keywords: GeorgKoppen201803 added; GeorgKoppen201802 removed

Moving my tickets to March.

comment:71 Changed 3 months ago by gk

Keywords: TorBrowserTeam201803 added; TorBrowserTeam201802 removed

Adding to our March plate.

Note: See TracTickets for help on using tickets.