This commits a rewrite of the Breakpad Linux client.
The old code:
* Had a number of plain bugs in it, but those could just have been
fixed.
* Allocated memory from the heap, which is a no go.
* Made libc calls which can enter the dynamic linker - another source
of crashes.
* Didn't understand some of the tricks needed, like clone() via libc
will write to random areas of memory because it assumes that it's
only called from libpthread
Additionally, we had one more requirement which meant changing the
interface:
* We need to be able to crash dump the renderers from the browser
process.
And that last one really needed a rewrite.
We intend to try and upstream this new code into Breakpad.
The new Breakpad design works like this:
When a renderer crashes, a signal handler runs on an alternative stack
and collects information about the registers of the thread before the
crash. Then we enter Chromium specific code an send a datagram message
to a magic file descriptor (4) containing:
* the registers and tid of the crashing thread
* the active URL
* a file descriptor to a socket
* a CREDENTIALS structure giving the PID of the renderer.
On the other end of the socket is an object on the IO thread
(render_crash_handler_host_linux.cc) which reads and parses the
datagram. The CREDENTIALS structure is validated by the kernel, so the
renderer can't lie about it's PID and try and get the browser to crash
dump the wrong process.
The browser then ptraces the renderer and extracts all the needed
information to write a minidump to a temp file. Then we write a byte
to the file descriptor which the renderer gave the browser in the
datagram and that's the signal to the renderer to finish dying. It
dies by sending itself the same signal which trigger the crash dump in
the first place, so it will appear to crash as normal as far as kernel
core dumps and waitpid are concerned.
The browser then constucts a MIME message in a temp file for upload to
the crash service. We then fork out to /usr/bin/wget to actually do
the upload (since Debian numbers suggest that 99.8% of users have wget
installed.) A second forked child unlinks the temp files once wget has
completed.
For a browser crash, everything works pretty much the same except that
the datagram step is omitted and we clone() off a process to ptrace
ourselves and write the minidump.
This code is only enabled in Chrome branded builds. Stub source files
are substituted in the case of a Chromium build.
http://codereview.chromium.org/115526
BUG=9646,10772
TEST=Build a Chrome branded binary. Send SEGV to a renderer and verify that wget output appears on stderr. Send a SEGV to the main binary and verify the same.
git-svn-id: http://src.chromium.org/svn/trunk/src/build@16719 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Explicitly disable it (/INCREMENTAL:NO) for Release, and for the
following targets that require it:
chrome.dll
interactive_ui_tests.exe
perf_tests.exe
unit_tests.exe
Explicitly specificy /SUBSYSTEM:CONSOLE as default for linking,
and match current practice by overriding with /SUBSYSTEM:WINDOWS for:
chrome.exe
chrome.dll
media_player.exe
sandbox_poc.exe
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/115664
git-svn-id: http://src.chromium.org/svn/trunk/src/build@16698 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Added a default in common.gypi to remove headers from all mac applications that are bundles.
Added a var to control the inclusion of keystone to chrome.gyp defaulted on branding and then honor it for the shipping work.
Review URL: http://codereview.chromium.org/113652
git-svn-id: http://src.chromium.org/svn/trunk/src/build@16510 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The alternative is that gyp silently succeeds and your build mysteriously
doesn't link, even after you've installed the dependencies, and you need
to know to rerun "gclient runhooks --force".
BUG=11432
Review URL: http://codereview.chromium.org/114007
git-svn-id: http://src.chromium.org/svn/trunk/src/build@16002 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
- Add script for running dump_syms on release builds if breakpad is enabled.
- Update the info.plist tweaks to add the breakpad keys if needed
- Add a var to check for breakpad support within the chrome.gyp instead of having the knowledge about breakpad being in official builds spread all around.
Review URL: http://codereview.chromium.org/113305
git-svn-id: http://src.chromium.org/svn/trunk/src/build@15948 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
- Stop using CPP on the info.plist since we have to run a script anyways.
- Set the bundleid into a build setting for simple info.plist processing to pick up.
- Add a script for the chrome/app target to manually tweak the info.plist:
- collect the version number from the build tree
- collect the svn revision from the build tree
- update the info.plist keys that need the version number based on collected data.
- record the svn revision into the info.plist for trouble shooting.
Review URL: http://codereview.chromium.org/115187
git-svn-id: http://src.chromium.org/svn/trunk/src/build@15778 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Add a target to build a dmg out of the app.
Add a target to all that will build everything and the dmg (since we don't include the dmg in all since developers really don't need to wait for that).
Review URL: http://codereview.chromium.org/113152
git-svn-id: http://src.chromium.org/svn/trunk/src/build@15672 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
* build\all.gyp now uses webkit\webkit.gyp and
webkit\tools\test_shell\test_shell.gyp.
* 'svn remove' checked-in .sln and .vcproj files that will now
become gyp-generated files. (We'll leave the other old ones
in place, uncalled, and remove them with a later CL.)
* Add generated *.sln and *.vcproj files to svn:ignore on
the relevant directories.
* Update various chrome\**.vcproj files with the new gyp directory
in which various generated webkit files will now appear.
* Update the checked-in chrome\chrome.sln with all (?) the changes
necessary to reflect the new gyp generation.
Review URL: http://codereview.chromium.org/115115
git-svn-id: http://src.chromium.org/svn/trunk/src/build@15618 4ff67af0-8c30-449e-8e8b-ad334ec8d88c