[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #10198 [Tor bundles/installation]: TBB 2.3.25-15 crashes on Debian w/Google Drive
#10198: TBB 2.3.25-15 crashes on Debian w/Google Drive
-------------------------------------+-------------------------------------
Reporter: cypherpunks | Owner: mikeperry
Type: defect | Status: needs_information
Priority: normal | Milestone: TorBrowserBundle
Component: Tor | 2.3.x-stable
bundles/installation | Version:
Resolution: | Keywords: tbb-crash
Actual Points: | Parent ID:
Points: |
-------------------------------------+-------------------------------------
Changes (by isis):
* cc: isis (added)
* status: new => needs_information
* component: - Select a component => Tor bundles/installation
Comment:
Replying to [comment:3 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`:
|| SETTING NAME || VALUE ||
|| 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 [https://www.torproject.org/torbutton/en/design/
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
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
1515 ? Sl 32:16 127 74 1723329 723804 9.0
./Browser/firefox -no-remote -profile Data/Browser/profile.default
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
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 linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Reading symbols from /lib/x86_64-linux-gnu/libpthread.so.0...Reading
symbols from /usr/lib/debug/lib/x86_64-linux-
gnu/libpthread-2.17.so...done.
done.
[New LWP 17232]
[New LWP 12369]
[â]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Loaded symbols for /lib/x86_64-linux-gnu/libpthread.so.0
Reading symbols from /lib/x86_64-linux-gnu/libdl.so.2...Reading symbols
from /usr/lib/debug/lib/x86_64-linux-gnu/libdl-2.17.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libdl.so.2
Reading symbols from /usr/lib/x86_64-linux-gnu/libstdc++.so.6...(no
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/libxul.so
#2 0x00003a87b94a3194 in ?? () from /lib/x86_64-linux-
gnu/libglib-2.0.so.0
#3 0x00003a87b94a329c in g_main_context_iteration () from /lib/x86_64
-linux-gnu/libglib-2.0.so.0
#4 0x00003a87bb588f4f in ?? () from /home/isis/dt/tor-
browser-3.0-b1/Browser/libxul.so
#5 0x00003a87bb5a0b35 in ?? () from /home/isis/dt/tor-
browser-3.0-b1/Browser/libxul.so
#6 0x00003a87bb5a0d2a in ?? () from /home/isis/dt/tor-
browser-3.0-b1/Browser/libxul.so
#7 0x00003a87bb74de76 in ?? () from /home/isis/dt/tor-
browser-3.0-b1/Browser/libxul.so
#8 0x00003a87bb7209be in ?? () from /home/isis/dt/tor-
browser-3.0-b1/Browser/libxul.so
#9 0x00003a87bb6559c5 in ?? () from /home/isis/dt/tor-
browser-3.0-b1/Browser/libxul.so
#10 0x00003a87bb76d7d6 in ?? () from /home/isis/dt/tor-
browser-3.0-b1/Browser/libxul.so
#11 0x00003a87bb5a0e69 in ?? () from /home/isis/dt/tor-
browser-3.0-b1/Browser/libxul.so
#12 0x00003a87bb45ed60 in ?? () from /home/isis/dt/tor-
browser-3.0-b1/Browser/libxul.so
#13 0x00003a87babc9ab5 in ?? () from /home/isis/dt/tor-
browser-3.0-b1/Browser/libxul.so
#14 0x00003a87babcd7de in ?? () from /home/isis/dt/tor-
browser-3.0-b1/Browser/libxul.so
#15 0x00003a87babcda2a in XRE_main () from /home/isis/dt/tor-
browser-3.0-b1/Browser/libxul.so
#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`.
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 [https://archive.torproject.org/tor-
package-archive/torbrowser/ 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
#10148). If you were to get a copy of the new
[https://archive.torproject.org/tor-package-archive/torbrowser/3.0rc1
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/libxul.so
}}}
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. :)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10198#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs