blob: 2fc14185fd74810e4c1ea1c361956c050cbcc3fb [file] [log] [blame] [view]
andybonse6a8f2bd2015-08-31 22:46:011# Tips for debugging on Linux
andybons3322f762015-08-24 21:37:092
andybonsad92aa32015-08-31 02:27:443This page is for Chromium-specific debugging tips; learning how to run gdb is
4out of scope.
andybons3322f762015-08-24 21:37:095
andybonsad92aa32015-08-31 02:27:446[TOC]
andybons3322f762015-08-24 21:37:097
8## Symbolized stack trace
9
andybonsad92aa32015-08-31 02:27:4410The sandbox can interfere with the internal symbolizer. Use `--no-sandbox` (but
11keep this temporary) or an external symbolizer (see
12`tools/valgrind/asan/asan_symbolize.py`).
andybons3322f762015-08-24 21:37:0913
andybonsad92aa32015-08-31 02:27:4414Generally, do not use `--no-sandbox` on waterfall bots, sandbox testing is
15needed. Talk to security@chromium.org.
andybons3322f762015-08-24 21:37:0916
17## GDB
andybonsad92aa32015-08-31 02:27:4418
andybons3322f762015-08-24 21:37:0919**GDB-7.7 is required in order to debug Chrome on Linux.**
20
21Any prior version will fail to resolve symbols or segfault.
22
23### Basic browser process debugging
24
andybonsad92aa32015-08-31 02:27:4425 gdb -tui -ex=r --args out/Debug/chrome --disable-seccomp-sandbox \
26 http://google.com
andybons3322f762015-08-24 21:37:0927
28### Allowing attaching to foreign processes
andybonsad92aa32015-08-31 02:27:4429
30On distributions that use the
31[Yama LSM](https://www.kernel.org/doc/Documentation/security/Yama.txt) (that
32includes Ubuntu and Chrome OS), process A can attach to process B only if A is
33an ancestor of B.
andybons3322f762015-08-24 21:37:0934
35You will probably want to disable this feature by using
andybonsad92aa32015-08-31 02:27:4436
37 echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
andybons3322f762015-08-24 21:37:0938
39If you don't you'll get an error message such as "Could not attach to process".
40
andybonsad92aa32015-08-31 02:27:4441Note that you'll also probably want to use `--no-sandbox`, as explained below.
andybons3322f762015-08-24 21:37:0942
43### Multiprocess Tricks
andybonsad92aa32015-08-31 02:27:4444
andybons3322f762015-08-24 21:37:0945#### Getting renderer subprocesses into gdb
andybonsad92aa32015-08-31 02:27:4446
47Since Chromium itself spawns the renderers, it can be tricky to grab a
48particular with gdb. This command does the trick:
49
andybons3322f762015-08-24 21:37:0950```
51chrome --no-sandbox --renderer-cmd-prefix='xterm -title renderer -e gdb --args'
52```
andybonsad92aa32015-08-31 02:27:4453
54The `--no-sandbox` flag is needed because otherwise the seccomp sandbox will
55kill the renderer process on startup, or the setuid sandbox will prevent xterm's
56execution. The "xterm" is necessary or gdb will run in the current terminal,
57which can get particularly confusing since it's running in the background, and
58if you're also running the main process in gdb, won't work at all (the two
59instances will fight over the terminal). To auto-start the renderers in the
60debugger, send the "run" command to the debugger:
61
62 chrome --no-sandbox --renderer-cmd-prefix='xterm -title renderer -e gdb -ex \
63 run --args
64
andybons3322f762015-08-24 21:37:0965If you're using Emacs and `M-x gdb`, you can do
andybons3322f762015-08-24 21:37:0966
andybonsad92aa32015-08-31 02:27:4467 chrome "--renderer-cmd-prefix=gdb --args"
andybons3322f762015-08-24 21:37:0968
andybonsad92aa32015-08-31 02:27:4469Note: using the `--renderer-cmd-prefix` option bypasses the zygote launcher, so
70the renderers won't be sandboxed. It is generally not an issue, except when you
71are trying to debug interactions with the sandbox. If that's what you are doing,
72you will need to attach your debugger to a running renderer process (see below).
andybons3322f762015-08-24 21:37:0973
andybonsad92aa32015-08-31 02:27:4474You may also want to pass `--disable-hang-monitor` to suppress the hang monitor,
75which is rather annoying.
76
77You can also use `--renderer-startup-dialog` and attach to the process in order
78to debug the renderer code. Go to
79http://www.chromium.org/blink/getting-started-with-blink-debugging for more
80information on how this can be done.
andybons3322f762015-08-24 21:37:0981
82#### Choosing which renderers to debug
andybons3322f762015-08-24 21:37:0983
andybonsad92aa32015-08-31 02:27:4484If you are starting multiple renderers then the above means that multiple gdb's
85start and fight over the console. Instead, you can set the prefix to point to
86this shell script:
87
88```sh
andybons3322f762015-08-24 21:37:0989#!/bin/sh
90
91echo "**** Child $$ starting: y to debug"
92read input
93if [ "$input" = "y" ] ; then
94 gdb --args $*
95else
96 $*
97fi
98```
99
100#### Selective breakpoints
andybonsad92aa32015-08-31 02:27:44101
102When debugging both the browser and renderer process, you might want to have
103separate set of breakpoints to hit. You can use gdb's command files to
104accomplish this by putting breakpoints in separate files and instructing gdb to
105load them.
andybons3322f762015-08-24 21:37:09106
107```
andybonsad92aa32015-08-31 02:27:44108gdb -x ~/debug/browser --args chrome --no-sandbox --disable-hang-monitor \
109 --renderer-cmd-prefix='xterm -title renderer -e gdb -x ~/debug/renderer \
110 --args '
andybons3322f762015-08-24 21:37:09111```
112
andybonsad92aa32015-08-31 02:27:44113Also, instead of running gdb, you can use the script above, which let's you
114select which renderer process to debug. Note: you might need to use the full
115path to the script and avoid `$HOME` or `~/.`
andybons3322f762015-08-24 21:37:09116
117#### Connecting to a running renderer
118
andybonsad92aa32015-08-31 02:27:44119Usually `ps aux | grep chrome` will not give very helpful output. Try
120`pstree -p | grep chrome` to get something like
andybons3322f762015-08-24 21:37:09121
122```
123 | |-bash(21969)---chrome(672)-+-chrome(694)
124 | | |-chrome(695)---chrome(696)-+-{chrome}(697)
125 | | | \-{chrome}(709)
126 | | |-{chrome}(675)
127 | | |-{chrome}(678)
128 | | |-{chrome}(679)
129 | | |-{chrome}(680)
130 | | |-{chrome}(681)
131 | | |-{chrome}(682)
132 | | |-{chrome}(684)
133 | | |-{chrome}(685)
134 | | |-{chrome}(705)
135 | | \-{chrome}(717)
136```
137
andybonsad92aa32015-08-31 02:27:44138Most of those are threads. In this case the browser process would be 672 and the
139(sole) renderer process is 696. You can use `gdb -p 696` to attach.
140Alternatively, you might find out the process ID from Chrome's built-in Task
141Manager (under the Tools menu). Right-click on the Task Manager, and enable
142"Process ID" in the list of columns.
andybons3322f762015-08-24 21:37:09143
andybonsad92aa32015-08-31 02:27:44144Note: by default, sandboxed processes can't be attached by a debugger. To be
145able to do so, you will need to pass the `--allow-sandbox-debugging` option.
andybons3322f762015-08-24 21:37:09146
andybonsad92aa32015-08-31 02:27:44147If the problem only occurs with the seccomp sandbox enabled (and the previous
148tricks don't help), you could try enabling core-dumps (see the **Core files**
149section). That would allow you to get a backtrace and see some local variables,
150though you won't be able to step through the running program.
andybons3322f762015-08-24 21:37:09151
andybonsad92aa32015-08-31 02:27:44152Note: If you're interested in debugging LinuxSandboxIPC process, you can attach
153to 694 in the above diagram. The LinuxSandboxIPC process has the same command
154line flag as the browser process so that it's easy to identify it if you run
155`pstree -pa`.
andybons3322f762015-08-24 21:37:09156
157#### Getting GPU subprocesses into gdb
andybons3322f762015-08-24 21:37:09158
andybonsad92aa32015-08-31 02:27:44159Use `--gpu-launcher` flag instead of `--renderer-cmd-prefix` in the instructions
160for renderer above.
161
162#### Getting `browser_tests` launched browsers into gdb
163
164Use environment variable `BROWSER_WRAPPER` instead of `--renderer-cmd-prefix`
165switch in the instructions above.
andybons3322f762015-08-24 21:37:09166
167Example:
andybonsad92aa32015-08-31 02:27:44168
169```shell
170BROWSER_WRAPPER='xterm -title renderer -e gdb --eval-command=run \
171 --eval-command=quit --args' out/Debug/browser_tests --gtest_filter=Print
172```
andybons3322f762015-08-24 21:37:09173
174#### Plugin Processes
andybons3322f762015-08-24 21:37:09175
andybonsad92aa32015-08-31 02:27:44176Same strategies as renderers above, but the flag is called `--plugin-launcher`:
177
178 chrome --plugin-launcher='xterm -e gdb --args'
179
180_Note: For now, this does not currently apply to PPAPI plugins because they
181currently run in the renderer process._
andybons3322f762015-08-24 21:37:09182
183#### Single-Process mode
andybons3322f762015-08-24 21:37:09184
andybonsad92aa32015-08-31 02:27:44185Depending on whether it's relevant to the problem, it's often easier to just run
186in "single process" mode where the renderer threads are in-process. Then you can
187just run gdb on the main process.
andybons3322f762015-08-24 21:37:09188
andybonsad92aa32015-08-31 02:27:44189 gdb --args chrome --single-process
190
191Currently, the `--disable-gpu` flag is also required, as there are known crashes
192that occur under TextureImageTransportSurface without it. The crash described in
193http://crbug.com/361689 can also sometimes occur, but that crash can be
194continued from without harm.
195
196Note that for technical reasons plugins cannot be in-process, so
197`--single-process` only puts the renderers in the browser process. The flag is
198still useful for debugging plugins (since it's only two processes instead of
199three) but you'll still need to use `--plugin-launcher` or another approach.
andybons3322f762015-08-24 21:37:09200
201### Printing Chromium types
andybons3322f762015-08-24 21:37:09202
andybonsad92aa32015-08-31 02:27:44203gdb 7 lets us use Python to write pretty-printers for Chromium types. The
204directory `tools/gdb/` contains a Python gdb scripts useful for Chromium code.
205There are similar scripts [in WebKit](http://trac.webkit.org/wiki/GDB) (in fact,
206the Chromium script relies on using it with the WebKit one).
207
208To include these pretty-printers with your gdb, put the following into
209`~/.gdbinit`:
210
211```python
andybons3322f762015-08-24 21:37:09212python
213import sys
214sys.path.insert(0, "<path/to/chromium/src>/third_party/WebKit/Tools/gdb/")
215import webkit
216sys.path.insert(0, "<path/to/chromium/src>/tools/gdb/")
217import gdb_chrome
218```
219
andybonsad92aa32015-08-31 02:27:44220Pretty printers for std types shouldn't be necessary in gdb 7, but they're
221provided here in case you're using an older gdb. Put the following into
222`~/.gdbinit`:
223
andybons3322f762015-08-24 21:37:09224```
225# Print a C++ string.
226define ps
227 print $arg0.c_str()
228end
229
230# Print a C++ wstring or wchar_t*.
231define pws
232 printf "\""
233 set $c = (wchar_t*)$arg0
234 while ( *$c )
235 if ( *$c > 0x7f )
236 printf "[%x]", *$c
237 else
238 printf "%c", *$c
239 end
240 set $c++
241 end
242 printf "\"\n"
243end
244```
245
246[More STL GDB macros](http://www.yolinux.com/TUTORIALS/src/dbinit_stl_views-1.01.txt)
247
248### Graphical Debugging Aid for Chromium Views
249
250The following link describes a tool that can be used on Linux, Windows and Mac under GDB.
251
andybonsad92aa32015-08-31 02:27:44252[graphical_debugging_aid_chromium_views](graphical_debugging_aid_chromium_views.md)
andybons3322f762015-08-24 21:37:09253
254### Faster startup
255
andybonsad92aa32015-08-31 02:27:44256Use the `gdb-add-index` script (e.g.
257`build/gdb-add-index out/Debug/browser_tests`)
andybons3322f762015-08-24 21:37:09258
andybonsad92aa32015-08-31 02:27:44259Only makes sense if you run the binary multiple times or maybe if you use the
260component build since most .so files won't require reindexing on a rebuild.
andybons3322f762015-08-24 21:37:09261
andybonsad92aa32015-08-31 02:27:44262See
263https://groups.google.com/a/chromium.org/forum/#!searchin/chromium-dev/gdb-add-index/chromium-dev/ELRuj1BDCL4/5Ki4LGx41CcJ
264for more info.
andybons3322f762015-08-24 21:37:09265
266Alternatively, specify:
andybons3322f762015-08-24 21:37:09267
andybonsad92aa32015-08-31 02:27:44268 linux_use_debug_fission=0
269
270in `GYP_DEFINES`. This improves load time of gdb significantly at the cost of
271link time.
andybons3322f762015-08-24 21:37:09272
273## Core files
andybons3322f762015-08-24 21:37:09274
andybonsad92aa32015-08-31 02:27:44275`ulimit -c unlimited` should cause all Chrome processes (run from that shell) to
276dump cores, with the possible exception of some sandboxed processes.
andybons3322f762015-08-24 21:37:09277
andybonsad92aa32015-08-31 02:27:44278Some sandboxed subprocesses might not dump cores unless you pass the
279`--allow-sandbox-debugging` flag.
280
281If the problem is a freeze rather than a crash, you may be able to trigger a
282core-dump by sending SIGABRT to the relevant process:
283
284 kill -6 [process id]
andybons3322f762015-08-24 21:37:09285
286## Breakpad minidump files
287
andybonsad92aa32015-08-31 02:27:44288See [linux_minidump_to_core.md](linux_minidump_to_core.md)
andybons3322f762015-08-24 21:37:09289
290## Running Tests
andybonsad92aa32015-08-31 02:27:44291
292Many of our tests bring up windows on screen. This can be annoying (they steal
293your focus) and hard to debug (they receive extra events as you mouse over them).
294Instead, use `Xvfb` or `Xephyr` to run a nested X session to debug them, as
295outlined on [layout_tests_linux.md](layout_tests_linux.md).
andybons3322f762015-08-24 21:37:09296
297### Browser tests
andybonsad92aa32015-08-31 02:27:44298
299By default the `browser_tests` forks a new browser for each test. To debug the
300browser side of a single test, use a command like
301
andybons3322f762015-08-24 21:37:09302```
303gdb --args out/Debug/browser_tests --single_process --gtest_filter=MyTestName
304```
andybonsad92aa32015-08-31 02:27:44305
306**note the underscore in `single_process`** -- this makes the test harness and
307browser process share the outermost process.
andybons3322f762015-08-24 21:37:09308
309
310To debug a renderer process in this case, use the tips above about renderers.
311
312### Layout tests
andybonsad92aa32015-08-31 02:27:44313
314See [layout_tests_linux.md](layout_tests_linux.md) for some tips. In particular,
315note that it's possible to debug a layout test via `ssh`ing to a Linux box; you
316don't need anything on screen if you use `Xvfb`.
andybons3322f762015-08-24 21:37:09317
318### UI tests
andybons3322f762015-08-24 21:37:09319
andybonsad92aa32015-08-31 02:27:44320UI tests are run in forked browsers. Unlike browser tests, you cannot do any
321single process tricks here to debug the browser. See below about
322`BROWSER_WRAPPER`.
323
324To pass flags to the browser, use a command line like
325`--extra-chrome-flags="--foo --bar"`.
andybons3322f762015-08-24 21:37:09326
327### Timeouts
andybonsad92aa32015-08-31 02:27:44328
329UI tests have a confusing array of timeouts in place. (Pawel is working on
330reducing the number of timeouts.) To disable them while you debug, set the
331timeout flags to a large value:
332
333* `--test-timeout=100000000`
334* `--ui-test-action-timeout=100000000`
335* `--ui-test-terminate-timeout=100000000`
andybons3322f762015-08-24 21:37:09336
337### To replicate Window Manager setup on the bots
andybonsad92aa32015-08-31 02:27:44338
339Chromium try bots and main waterfall's bots run tests under Xvfb&openbox
340combination. Xvfb is an X11 server that redirects the graphical output to the
341memory, and openbox is a simple window manager that is running on top of Xvfb.
342The behavior of openbox is markedly different when it comes to focus management
343and other window tasks, so test that runs fine locally may fail or be flaky on
344try bots. To run the tests on a local machine as on a bot, follow these steps:
andybons3322f762015-08-24 21:37:09345
346Make sure you have openbox:
andybonsad92aa32015-08-31 02:27:44347
348 apt-get install openbox
349
andybons3322f762015-08-24 21:37:09350Start Xvfb and openbox on a particular display:
andybonsad92aa32015-08-31 02:27:44351
352 Xvfb :6.0 -screen 0 1280x1024x24 & DISPLAY=:6.0 openbox &
353
andybons3322f762015-08-24 21:37:09354Run your tests with graphics output redirected to that display:
andybonsad92aa32015-08-31 02:27:44355
356 DISPLAY=:6.0 out/Debug/browser_tests --gtest_filter="MyBrowserTest.MyActivateWindowTest"
357
andybons3322f762015-08-24 21:37:09358You can look at a snapshot of the output by:
andybonsad92aa32015-08-31 02:27:44359
360 xwd -display :6.0 -root | xwud
andybons3322f762015-08-24 21:37:09361
362Alternatively, you can use testing/xvfb.py to set up your environment for you:
andybons3322f762015-08-24 21:37:09363
andybonsad92aa32015-08-31 02:27:44364 testing/xvfb.py out/Debug out/Debug/browser_tests \
365 --gtest_filter="MyBrowserTest.MyActivateWindowTest"
andybons3322f762015-08-24 21:37:09366
andybonsad92aa32015-08-31 02:27:44367### `BROWSER_WRAPPER`
368
369You can also get the browser under a debugger by setting the `BROWSER_WRAPPER`
370environment variable. (You can use this for `browser_tests` too, but see above
371for discussion of a simpler way.)
372
373 BROWSER_WRAPPER='xterm -e gdb --args' out/Debug/browser_tests
andybons3322f762015-08-24 21:37:09374
375### Replicating Trybot Slowness
376
andybonsad92aa32015-08-31 02:27:44377Trybots are pretty stressed, and can sometimes expose timing issues you can't
378normally reproduce locally.
andybons3322f762015-08-24 21:37:09379
andybonsad92aa32015-08-31 02:27:44380You can simulate this by shutting down all but one of the CPUs
381(http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/) and
382running a CPU loading tool (e.g., http://www.devin.com/lookbusy/). Now run your
383test. It will run slowly, but any flakiness found by the trybot should replicate
384locally now - and often nearly 100% of the time.
andybons3322f762015-08-24 21:37:09385
386## Logging
andybons3322f762015-08-24 21:37:09387
andybonsad92aa32015-08-31 02:27:44388### Seeing all LOG(foo) messages
389
390Default log level hides `LOG(INFO)`. Run with `--log-level=0` and
391`--enable-logging=stderr` flags.
392
393Newer versions of chromium with VLOG may need --v=1 too. For more VLOG tips, see
394the chromium-dev thread:
395http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/dcd0cd7752b35de6?pli=1
andybons3322f762015-08-24 21:37:09396
397### Seeing IPC debug messages
andybons3322f762015-08-24 21:37:09398
andybonsad92aa32015-08-31 02:27:44399Run with `CHROME_IPC_LOGGING=1` eg.
400
401 CHROME_IPC_LOGGING=1 out/Debug/chrome
402
403or within gdb:
404
405 set environment CHROME_IPC_LOGGING 1
406
407If some messages show as unknown, check if the list of IPC message headers in
408`chrome/common/logging_chrome.cc` is up-to-date. In case this file reference
409goes out of date, try looking for usage of macros like `IPC_MESSAGE_LOG_ENABLED`
410or `IPC_MESSAGE_MACROS_LOG_ENABLED`.
andybons3322f762015-08-24 21:37:09411
412## Using valgrind
413
andybonsad92aa32015-08-31 02:27:44414To run valgrind on the browser and renderer processes, with our suppression file
415and flags:
416
417 $ cd $CHROMIUM_ROOT/src
418 $ tools/valgrind/valgrind.sh out/Debug/chrome
andybons3322f762015-08-24 21:37:09419
420You can use valgrind on chrome and/or on the renderers e.g
421`valgrind --smc-check=all ../sconsbuild/Debug/chrome`
422or by passing valgrind as the argument to `--render-cmd-prefix`.
423
andybonsad92aa32015-08-31 02:27:44424Beware that there are several valgrind "false positives" e.g. pickle, sqlite and
425some instances in webkit that are ignorable. On systems with prelink and address
426space randomization (e.g. Fedora), you may also see valgrind errors in libstdc++
427on startup and in gnome-breakpad.
andybons3322f762015-08-24 21:37:09428
429Valgrind doesn't seem to play nice with tcmalloc. To disable tcmalloc run GYP
andybonsad92aa32015-08-31 02:27:44430
431 $ cd $CHROMIUM_ROOT/src
432 $ build/gyp_chromium -Duse_allocator=none
433
andybons3322f762015-08-24 21:37:09434and rebuild.
435
436## Profiling
andybonsad92aa32015-08-31 02:27:44437
438See
439https://sites.google.com/a/chromium.org/dev/developers/profiling-chromium-and-webkit
440and
441http://code.google.com/p/chromium/wiki/LinuxProfiling
andybons3322f762015-08-24 21:37:09442
443## i18n
andybons3322f762015-08-24 21:37:09444
andybonsad92aa32015-08-31 02:27:44445We obey your system locale. Try something like:
andybons3322f762015-08-24 21:37:09446
andybonsad92aa32015-08-31 02:27:44447 LANG=ja_JP.UTF-8 out/Debug/chrome
448
449If this doesn't work, make sure that the `LANGUAGE`, `LC_ALL` and `LC_MESSAGE`
450environment variables aren't set -- they have higher priority than LANG in the
451order listed. Alternatively, just do this:
452
453 LANGUAGE=fr out/Debug/chrome
454
455Note that because we use GTK, some locale data comes from the system -- for
456example, file save boxes and whether the current language is considered RTL.
457Without all the language data available, Chrome will use a mixture of your
458system language and the language you run Chrome in.
andybons3322f762015-08-24 21:37:09459
460Here's how to install the Arabic (ar) and Hebrew (he) language packs:
andybonsad92aa32015-08-31 02:27:44461
462 sudo apt-get install language-pack-ar language-pack-he \
463 language-pack-gnome-ar language-pack-gnome-he
464
andybons3322f762015-08-24 21:37:09465Note that the `--lang` flag does **not** work properly for this.
466
andybonsad92aa32015-08-31 02:27:44467On non-Debian systems, you need the `gtk20.mo` files. (Please update these docs
468with the appropriate instructions if you know what they are.)
andybons3322f762015-08-24 21:37:09469
470## Breakpad
andybonsad92aa32015-08-31 02:27:44471
472See the last section of [linux_crash_dumping.md](linux_crash_dumping.md); you
473need to set a gyp variable and an environment variable for the crash dump tests
474to work.
andybons3322f762015-08-24 21:37:09475
476## Drag and Drop
andybonsad92aa32015-08-31 02:27:44477
478If you break in a debugger during a drag, Chrome will have grabbed your mouse
479and keyboard so you won't be able to interact with the debugger! To work around
480this, run via `Xephyr`. Instructions for how to use `Xephyr` are on the
481[layout_tests_linux.md](layout_tests_linux.md) page.
andybons3322f762015-08-24 21:37:09482
483## Tracking Down Bugs
484
485### Isolating Regressions
andybons3322f762015-08-24 21:37:09486
andybonsad92aa32015-08-31 02:27:44487Old builds are archived here:
488http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/
489
490`tools/bisect-builds.py` in the tree automates bisecting through the archived
491builds. Despite a computer science education, I am still amazed how quickly
492binary search will find its target.
andybons3322f762015-08-24 21:37:09493
494### Screen recording for bug reports
andybonsad92aa32015-08-31 02:27:44495
496 sudo apt-get install gtk-recordmydesktop
andybons3322f762015-08-24 21:37:09497
498## Version-specific issues
499
500### Google Chrome
andybonsad92aa32015-08-31 02:27:44501
502Google Chrome binaries don't include symbols. Googlers can read where to get
503symbols from
504[the Google-internal wiki](http://wiki/Main/ChromeOfficialBuildLinux#The_Build_Archive).
andybons3322f762015-08-24 21:37:09505
506### Ubuntu Chromium
andybonsad92aa32015-08-31 02:27:44507
508Since we don't build the Ubuntu packages (Ubuntu does) we can't get useful
509backtraces from them. Direct users to https://wiki.ubuntu.com/Chromium/Debugging
andybons3322f762015-08-24 21:37:09510
511### Fedora's Chromium
andybonsad92aa32015-08-31 02:27:44512
513Like Ubuntu, but direct users to
514https://fedoraproject.org/wiki/TomCallaway/Chromium_Debug
andybons3322f762015-08-24 21:37:09515
516### Xlib
andybonsad92aa32015-08-31 02:27:44517
andybons3322f762015-08-24 21:37:09518If you're trying to track down X errors like:
andybonsad92aa32015-08-31 02:27:44519
andybons3322f762015-08-24 21:37:09520```
521The program 'chrome' received an X Window System error.
522This probably reflects a bug in the program.
523The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
524```
andybonsad92aa32015-08-31 02:27:44525
andybons3322f762015-08-24 21:37:09526Some strategies are:
andybonsad92aa32015-08-31 02:27:44527
528* pass `--sync` on the command line to make all X calls synchronous
529* run chrome via [xtrace](http://xtrace.alioth.debian.org/)
530* turn on IPC debugging (see above section)
andybons3322f762015-08-24 21:37:09531
532### Window Managers
andybons3322f762015-08-24 21:37:09533
andybonsad92aa32015-08-31 02:27:44534To test on various window managers, you can use a nested X server like `Xephyr`.
535Instructions for how to use `Xephyr` are on the
536[layout_tests_linux.md](layout_tests_linux.md) page.
537
538If you need to test something with hardware accelerated compositing
539(e.g., compiz), you can use `Xgl` (`sudo apt-get install xserver-xgl`). E.g.:
540
541 Xgl :1 -ac -accel glx:pbuffer -accel xv:pbuffer -screen 1024x768
542
andybons3322f762015-08-24 21:37:09543## Mozilla Tips
andybonsad92aa32015-08-31 02:27:44544
545https://developer.mozilla.org/en/Debugging_Mozilla_on_Linux_FAQ