Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#10198 closed defect (duplicate)

TBB 2.3.25-15 crashes on Debian w/Google Drive

Reported by: cypherpunks Owned by: mikeperry
Priority: Medium Milestone: TorBrowserBundle 2.3.x-stable
Component: Applications/Tor bundles/installation Version:
Severity: Keywords: tbb-crash, MikePerry201403R
Cc: isis Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


A reoccurring issue (#8930), when any google drive document completes loading, 64-bit browser will crash on Debian. It doesn't seem to affect the 32-bit windows version nor the 32-bit linux version on Xubuntu.

I didn't notice any recent tickets related to this, but if there is, sorry for the duplicate.

Child Tickets

Change History (7)

comment:1 Changed 7 years ago by boklm

It might be related to #10195.

comment:2 Changed 7 years ago by tor-trout

I'm also seeing this, on x86_64 Debian with TBB 2.3.25-15. Not on Google drive, but on random news sites etc.

I've looked into to debugging this. My first attempt was running 'start-tor-browser --debug' but that seems to be for debugging Vidalia not the browser. I had a look a the 'start-tor-browser' script but it seems like firefox is not actually launched by the script but by Vidalia.

comment:3 Changed 7 years ago by tor-trout

I'd like to run the TBB firefox under GDB, but can't figure out how it gets started by Vidalia. Is there any documentation on how to debug TTB crashes? I searched the Trac, but nothing came up.

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

Cc: isis added
Component: - Select a componentTor bundles/installation
Status: newneeds_information

Replying to tor-trout:

I'd like to run the TBB firefox under GDB, but can't figure out how it gets started by Vidalia. Is there any documentation on how to debug TTB crashes? I searched the Trac, but nothing came up.

Running gdb on it is pretty easy, though it will be rather hard to understand because the firefox in TBB has been compiled and then stripped of its debug symbols. To my knowledge, the TBB-2.4 series was never compiled with debugging info, meaning that there aren't any debug symbols for your version and to get them you would have to recompile your TBB-2.4.x yourself.

Enabling debug logs

If you're deadset on figuring out what's going on with your TBB-2.4, you could try seeing what information you can get out of the debug logs. To enable those, set these preferences in your about:config:

extensions.torbutton.loglevel 2
extensions.torbutton.logmethod 0

If you're running TBB-3.0 with TorLauncher, you'll likely want these ones too:

extensions.torlauncher.loglevel 2
extensions.torlauncher.logmethod 0

And then find the line in the start-tor-browser script in your TBB directory which starts firefox, and change it like this:

# for TBB-2.4, find this line:
./App/vidalia --datadir Data/Vidalia/ -style Cleanlooks
# and change it to:
./App/vidalia --loglevel debug --logfile vidalia-debug.log --datadir Data/Vidalia/ -style Cleanlooks &>> ./tbb-debug.log

# for TBB-3.0, find this line:
./Browser/firefox -no-remote -profile Data/Browser/profile.default
# and change it to:
./Browser/firefox -no-remote -profile Data/Browser/profile.default &>> ./tbb-debug.log

Those logs might give you hints as to what's crashing it. For TBB-2.4, you'll probably need to run a system Tor daemon, and tell TorButton what its SocksPort is set to. For information on what the magic preference numbers mean, see the TorButton design docs.

Using gdb

Attaching an already running TBB

You could still attach a your TBB firefox process to a gdb instance, it's just that everything will be a bit gibberish with lots of ?? () instead of nice line numbers and function names. To do this, find the pid of your running TBB firefox, then tell gdb to attach the running process:

$ for p in `pgrep firefox` ; do ps -v $p ; done
[...find the pid for your TBB firefox...]
$ gdb
$ attach <pid>

for example:

∃!isisⒶwintermute:(master *+$)~/dt/tor-browser_en-US ∴ ls
Browser  Data  Debug  Docs  tor-browser-selenium.log  start-tor-browser  tbb-debug.log  tbb3.0b1.core.1342  Tor
∃!isisⒶwintermute:(master *+$)~/dt/tor-browser_en-US ∴ for p in `pgrep firefox` ; do ps -v $p ; done
 1515 ?        Sl    32:16    127    74 1723329 723804  9.0 ./Browser/firefox -no-remote -profile Data/Browser/profile.default
26120 ?        Ssl  140:30    376   112 1438855 392396  4.9 firefox
∃!isisⒶwintermute:(master *+$)~/dt/tor-browser_en-US ∴ gdb -q
(gdb) attach 1515
Attaching to process 1515
Reading symbols from /home/isis/dt/tor-browser-3.0-b1/Browser/firefox...(no debugging symbols found)...done.
warning: Could not load shared library symbols for
Do you need "set solib-search-path" or "set sysroot"?
Reading symbols from /lib/x86_64-linux-gnu/ symbols from /usr/lib/debug/lib/x86_64-linux-gnu/
[New LWP 17232]
[New LWP 12369]

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
Loaded symbols for /lib/x86_64-linux-gnu/
Reading symbols from /lib/x86_64-linux-gnu/ symbols from /usr/lib/debug/lib/x86_64-linux-gnu/
Loaded symbols for /lib/x86_64-linux-gnu/
Reading symbols from /usr/lib/x86_64-linux-gnu/ debugging symbols found)...done.

(gdb) bt
#0  0x00003a87be1a824d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00003a87bb5890c3 in ?? () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#2  0x00003a87b94a3194 in ?? () from /lib/x86_64-linux-gnu/
#3  0x00003a87b94a329c in g_main_context_iteration () from /lib/x86_64-linux-gnu/
#4  0x00003a87bb588f4f in ?? () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#5  0x00003a87bb5a0b35 in ?? () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#6  0x00003a87bb5a0d2a in ?? () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#7  0x00003a87bb74de76 in ?? () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#8  0x00003a87bb7209be in ?? () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#9  0x00003a87bb6559c5 in ?? () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#10 0x00003a87bb76d7d6 in ?? () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#11 0x00003a87bb5a0e69 in ?? () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#12 0x00003a87bb45ed60 in ?? () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#13 0x00003a87babc9ab5 in ?? () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#14 0x00003a87babcd7de in ?? () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#15 0x00003a87babcda2a in XRE_main () from /home/isis/dt/tor-browser-3.0-b1/Browser/
#16 0x00003a87bf2d4d4a in _start ()
(gdb) x/10i 0x00003a87bf2d4d4a
   0x3a87bf2d4d4a <_start+1402>:        mov    %eax,%ebx
   0x3a87bf2d4d4c <_start+1404>:        mov    0x20(%rsp),%rdi
   0x3a87bf2d4d51 <_start+1409>:        test   %rdi,%rdi
   0x3a87bf2d4d54 <_start+1412>:        je     0x3a87bf2d4d5c <_start+1420>
   0x3a87bf2d4d56 <_start+1414>:        mov    (%rdi),%rax
   0x3a87bf2d4d59 <_start+1417>:        callq  *0x10(%rax)
   0x3a87bf2d4d5c <_start+1420>:        callq  0x3a87bf2d5703 <_start+3891>
   0x3a87bf2d4d61 <_start+1425>:        callq  0x3a87bf2d5969 <_start+4505>
   0x3a87bf2d4d66 <_start+1430>:        jmp    0x3a87bf2d4d6d <_start+1437>
   0x3a87bf2d4d68 <_start+1432>:        mov    $0xff,%ebx
(gdb) detach
Detaching from program: /home/isis/dt/tor-browser-3.0-b1/Browser/firefox, process 1515
(gdb) q
∃!isisⒶwintermute:(master *+$)~/dt/tor-browser_en-US ∴

Starting firefox from inside gdb

Starting firefox inside gdb, getting stacktraces and coredumps:

1) Start firefox with

./App/Firefox/firefox -no-remote -profile ./Data/profile -g

(for TBB-2.4) or

./Browser/firefox -no-remote -profile Data/Browser/profile.default -g

(for TBB-3.0).

2) At the gdb prompt (gdb), type:

run --safe-mode.

3) To get a stacktrace from a gdb shell, do:

thread apply all bt full.

4) To get a stacktrace from a coredump file (e.g. 'core.1234'), do:

gdb <name-of-program> <core-filename>

then the command from step 3. Note that some distros disable coredumps by default in /etc/profile, to enable it temporarily in a shell do:

ulimit -c unlimited.

The easiest thing to do

Rather than go to all the work of reading assembler backtraces, or recompiling TBB, (equally difficult tasks, the latter of which would soon be undone, as soon as a stable TBB-3.0 is released and we deprecate the 2.4 series), you could try using one of the new TBB-3.0 builds. I believe that support for detached debug symbols was first enabled in TBB-3.0.2a (see #10126). If you were to get a copy of the new TBB-3.0 release candidate bundle, in that directory there should also be a tor-browser-linux64-debug.tar.gz file. You'd want to untarball that debug.tar.gz archive in the top level of its corresponding TBB-3.0 directory. (In the example above, where I did ls, you can see the Debug/ directory - that comes from untarballing the debug.tar.gz.) Then load the TBB firefox into gdb, as above, and then (I believe) the gdb command you want is:

(gdb) thread apply all load ./Debug/Browser/

or whichever lib*.so in ./Debug/Browser you're still missing symbols from.

A tiny request

If you discover anything helpful while figuring out how to debug your firefox, could you try to document it and add it to this ticket, so that myself or someone else can make a better HACKING doc for TBB? It will help save other hackers the trouble in the future. :)

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

comment:6 Changed 6 years ago by gk

Resolution: duplicate
Status: needs_informationclosed

Resolving this as duplicate of #10195. (Really good debugging instructions, isis. We should fold them into a HACKING doc for TBB >= 3.0 some day...)

comment:7 Changed 6 years ago by mikeperry

Keywords: MikePerry201403R added

Reminder to self: Fold in into the TBB hacking/jargon file.

Note: See TracTickets for help on using tickets.