summaryrefslogtreecommitdiffstats
path: root/chrome/app/breakpad_linux.h
Commit message (Collapse)AuthorAgeFilesLines
* [Linux] Implement the crash key logging mechanism.rsesek@chromium.org2013-05-291-41/+11
| | | | | | | | BUG=77656 Review URL: https://chromiumcodereview.appspot.com/16019015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203006 0039d316-1c4b-4281-b951-d872f2087c98
* Enable breakpad building by default on Android.yfriedman@chromium.org2013-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | After https://chromiumcodereview.appspot.com/10407058 we can compile breakpad by default and still have it disabled for non-official builds. Changes the Android build to allow compiling breakpad but not use it by not creating the crash fd and not passing it to the renderer process unless breakpad is enabled. Changes linux and Android to use a switch for enabling breakpad since that's a lot easier to test with on android then an environment variable. BUG=105778,170530 Review URL: https://chromiumcodereview.appspot.com/11969025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178111 0039d316-1c4b-4281-b951-d872f2087c98
* Specify a file size limit for minidumpsmkrebs@chromium.org2012-11-221-0/+6
| | | | | | | | | | | | | | | | When there are upwards of 200 threads in a crashing process, each having an 8KB stack, this can result in a huge, 1.8MB minidump file. The Crash Server throws away any uploaded file larger than 1.2MB. Setting the minidump size limit (see https://breakpad.appspot.com/487002/) will result in less stack being dumped when there are so many threads. BUG=chromium-os:31447, chromium:154546 Contributed by Michael Krebs <mkrebs@chromium.org> Review URL: https://chromiumcodereview.appspot.com/11142010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169221 0039d316-1c4b-4281-b951-d872f2087c98
* Because of UID isolation on Android, crash dump generation has to happenjcivelli@chromium.org2012-10-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | in-process for renderers as well (as the browser cannot access all the necessary states of the renderer process). Breakpad has support for generating minidumps to a passed FD (as the renderer process on Android does not have permission to create file), so the flow on Android is: - when a render process is created the browser creates a file and passes its FD to the process - the renderer process initializes Breakpad with that FD - if there is a crash, Breakpad generates the minidump to that FD. - when the browser process detects a renderer stopped it checks the minidump file. If it's empty it deletes the file. If it's not empty, it means there was a crasher in which case it moves it to the crash dump folder for it to be picked up and uploaded by the Java side. BUG=None TEST=Test that minidumps are generated and uploaded when visiting about:crash and about:crashbrowserforrealz on Android and desktop Chrome. Review URL: https://chromiumcodereview.appspot.com/11189068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163917 0039d316-1c4b-4281-b951-d872f2087c98
* Breakpad support for ASan: take 2.glider@chromium.org2012-08-231-0/+8
| | | | | | | | | | | | | This is an updated version of https://chromiumcodereview.appspot.com/10703116/ which got reverted. When the code is built with ASan, Chrome should register a callback which notifies the browser about a memory error. The error report message is passed to the crash handler and is then sent to the crash server along with the minidump. BUG=143657 Review URL: https://chromiumcodereview.appspot.com/10860006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152989 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r150326 - "Breakpad support for AddressSanitizer."mnissler@chromium.org2012-08-071-8/+0
| | | | | | | | | | | Causes compile failures on the official builders. BUG=None TBR=glider@chromium.org Review URL: https://chromiumcodereview.appspot.com/10836131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150331 0039d316-1c4b-4281-b951-d872f2087c98
* Breakpad support for AddressSanitizer.glider@chromium.org2012-08-071-0/+8
| | | | | | | | When the code is built with ASan, Chrome should register a callback which notifies the browser about a memory error. The error report message is passed to the crash handler and is then sent to the crash server along with the minidump. Review URL: https://chromiumcodereview.appspot.com/10703116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150326 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Rename back _linuxish to linux.wangxianzhu@chromium.org2012-06-261-0/+36
| | | | | | | | | | | | | | | _linuxish is ambiguous. Use 'target_conditions' to include the required files that are for linux on Android. (TBR because the changes in chrome/browser/ui/gtk and content/app/android are all simple changes of #include file names) BUG=none TEST=Build successfully TBR=erg@chromium.org,jrg@chromium.org Review URL: https://chromiumcodereview.appspot.com/10532178 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144176 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream crash changes for android.carlosvaldivia@google.com2012-04-101-35/+0
| | | | | | | | | | | | | | | | | | | | | Third time is a charm. Original Reviews: https://chromiumcodereview.appspot.com/9838033/ http://codereview.chromium.org/9967017 Revert "Revert 131593" This reverts commit e306ea7f630d4264075913ea3a1a728d98ca9605. BUG= TEST= Review URL: http://codereview.chromium.org/9960072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131662 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 131593erg@google.com2012-04-101-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Speculatively reverting due to gyp update error on official bots: KeyError: 'src/breakpad/breakpad.gyp:dump_syms#target while trying to load target src/remoting/remoting.gyp:remoting_linux_symbols#target' This is the only patch in the regression range that touches breakpad.gyp. --- Upstream Android native crash handling changes. This is actulaly the second time. Revert "Revert 131404 - Upstream native crash handling changes for Android." This reverts commit 421df96aab6267e963ddff16c9f738aa903a2cba. Conflicts: chrome/browser/chrome_browser_main.cc BUG= TEST= Review URL: http://codereview.chromium.org/9967017 TBR=carlosvaldivia@google.com Review URL: https://chromiumcodereview.appspot.com/10037013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131600 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream Android native crash handling changes.carlosvaldivia@google.com2012-04-101-35/+0
| | | | | | | | | | | | | | | | | | | | This is actulaly the second time. Revert "Revert 131404 - Upstream native crash handling changes for Android." This reverts commit 421df96aab6267e963ddff16c9f738aa903a2cba. Conflicts: chrome/browser/chrome_browser_main.cc BUG= TEST= Review URL: http://codereview.chromium.org/9967017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131593 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 131404 - Upstream native crash handling changes for Android.msw@chromium.org2012-04-091-0/+35
| | | | | | | | | | | | | | | | | | | | Android native crash handling is almost identical to linux handling with some differences. Note that even after this change Chrome on Android will not compile with the USE_LINUX_BREAKPAD flag. Forthcomming changes in breakpad should remedy this state of affairs. BUG= TEST= Review URL: http://codereview.chromium.org/9838033 TBR=carlosvaldivia@google.com Review URL: https://chromiumcodereview.appspot.com/9999004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131420 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream native crash handling changes for Android.carlosvaldivia@google.com2012-04-091-35/+0
| | | | | | | | | | | | | | | | | Android native crash handling is almost identical to linux handling with some differences. Note that even after this change Chrome on Android will not compile with the USE_LINUX_BREAKPAD flag. Forthcomming changes in breakpad should remedy this state of affairs. BUG= TEST= Review URL: http://codereview.chromium.org/9838033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131404 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Report the failed memory allocation size on OOM crashes.thestig@chromium.org2012-03-231-0/+1
| | | | | | | | | BUG=111733 TEST=none Review URL: http://codereview.chromium.org/9834001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128351 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Better organize Linux HandleCrashDump() function; do more error ↵thestig@chromium.org2012-02-261-13/+13
| | | | | | | | | | checking; remove shadow variables. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9460032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123706 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Fix the uptime in crash reports for renderers and plugins.thestig@chromium.org2010-12-031-2/+3
| | | | | | | | BUG=65202 TEST=Start chrome, run it for a few minutes, then open a tab and visit about:crash. Verify the crash report says the renderer has a very low uptime. Review URL: http://codereview.chromium.org/5541003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68146 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Revert r33888. We no longer need to collect the list of loaded ↵thestig@chromium.org2010-01-231-2/+0
| | | | | | | | | | plugins since we do not unload them now, thus they already show up in the module list. BUG=none TEST=none Review URL: http://codereview.chromium.org/551122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36937 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Implement RecordBreakpadStatusUMA.thestig@chromium.org2009-12-101-0/+1
| | | | | | | | BUG=21732 TEST=none Review URL: http://codereview.chromium.org/489002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34220 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Record the list of plugins loaded in browser process crash reports.thestig@chromium.org2009-12-041-0/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/459015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33888 0039d316-1c4b-4281-b951-d872f2087c98
* Build fix take 2.agl@chromium.org2009-09-281-0/+2
| | | | | | | (We don't have try servers for ChromeOS yet.) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27385 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: remove --google-internal-crash-reporting.agl@chromium.org2009-09-281-17/+0
| | | | | | | | | It's time to kill this. It's been marginally useful, but only marginally. http://codereview.chromium.org/222021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27375 0039d316-1c4b-4281-b951-d872f2087c98
* Make Linux Breakpad initialization call to lsb_release asynchronous. Also ↵thestig@chromium.org2009-09-231-2/+0
| | | | | | | | | | | | wrap more things in USE_LINUX_BREAKPAD while we're at it. BUG=21782 TEST=Add time.sleep(10) to /usr/bin/lsb_release; starting Chrome should not take 10 seconds more. Review URL: http://codereview.chromium.org/209042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27001 0039d316-1c4b-4281-b951-d872f2087c98
* Allow Chromium Linux to be built with Breakpad. Enable Linux CHROME_HEADLESS ↵thestig@chromium.org2009-08-261-2/+5
| | | | | | | | | | | | | support. (Try 2) TEST=none BUG=19663 Original Review URL: http://codereview.chromium.org/173095 Review URL: http://codereview.chromium.org/173397 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24378 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 24220.yutak@chromium.org2009-08-251-5/+2
| | | | | | | | | | It seemed that r24220 caused failures on all of Linux UI (valgrind) bots. TBR=thestig@chromium.org Review URL: http://codereview.chromium.org/173345 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24228 0039d316-1c4b-4281-b951-d872f2087c98
* Allow Chromium Linux to be built with Breakpad. Enable Linux CHROME_HEADLESS ↵thestig@chromium.org2009-08-251-2/+5
| | | | | | | | | | support. TEST=none BUG=19663 Review URL: http://codereview.chromium.org/173095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24220 0039d316-1c4b-4281-b951-d872f2087c98
* Build breakpad / crash reporting on Linux 64-bit.deanm@chromium.org2009-08-141-3/+3
| | | | | | | Review URL: http://codereview.chromium.org/165493 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23396 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: add internal core dump reporting.agl@chromium.org2009-07-281-0/+15
| | | | | | | | | | | | | | | In order to get a handle on a number of browser crashes, this patch adds an options for Google internal folks to upload full core files when the browser crashes. The core files are uploaded to an internal IP address and will be available to other developers. This is only enabled for Chrome branded builds and then, only if --google-internal-crash-reporting is given on the command line. http://codereview.chromium.org/160212 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21782 0039d316-1c4b-4281-b951-d872f2087c98
* Include output of "lsb_release -d" in crash reports.thestig@chromium.org2009-07-171-7/+14
| | | | | | | | | /etc/lsb-release does not exist on all distros, and sometimes it does not provide any useful info. Whereas all LSB complaint distros return useful data with the lsb_release command. Review URL: http://codereview.chromium.org/155653 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20936 0039d316-1c4b-4281-b951-d872f2087c98
* Make Linux crash death signal message constant sized.thestig@chromium.org2009-07-151-0/+6
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/149709 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20803 0039d316-1c4b-4281-b951-d872f2087c98
* Report the process type in Linux crash reports.thestig@chromium.org2009-06-231-0/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/147031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19036 0039d316-1c4b-4281-b951-d872f2087c98
* Generate GUIDs for users who wish to upload crash reports. Include it in ↵thestig@google.com2009-06-021-2/+5
| | | | | | | | | | crash reports. BUG=none TEST=none Review URL: http://codereview.chromium.org/118096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17372 0039d316-1c4b-4281-b951-d872f2087c98
* Respect Linux user prefs with regards to crash reporting.thestig@chromium.org2009-05-281-1/+1
| | | | | | | | | | This involves implementing GoogleUpdateSettings::[GS]etCollectStatsConsent, and a whole lot of refactoring. BUG=none TEST=delete config dir, run official Linux build, don't enable crash reporting, crash browser -> no crash reporting. Review URL: http://codereview.chromium.org/115808 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17104 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: add Breakpad supportagl@chromium.org2009-05-221-0/+12
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: svn://svn.chromium.org/chrome/trunk/src@16719 0039d316-1c4b-4281-b951-d872f2087c98