Use /system/etc/security/cacerts_google as the default certificates
directory. If the crash_reporter.full_certs property is set to 1,
use the full /system/etc/security/cacerts directory. This
property can be set in a target's product.mk, if they decide to
configure crash_reporter with a crash_server not covered by the
cacerts_google subset of certificates.
Bug: 25798318
Change-Id: I617c3d13b74af8d9577823a8f1a61f8375bcb504
Access to /proc files are limited to processes with group
permissions for AID_READPROC, so add that group to the list
of supplemental groups that the user_collector joins.
Bug: 25598241
Change-Id: I26c77b052229346a3ac7150f38e03294f3641f96
Using cfgtree.mk, this change adds support to load the
crash server URL directly from a file in the product tree
during the build.
BUG=25343470
TEST=build image, check in etc for the populated osrelease.d file
Change-Id: I6342a829936809b9553a32be7bc58285c86dd732
Convert the crash reporter upload log to be json objects.
Report the product_id in the crash report upload log. Also add
the exec name to the log to make it easier finding specific
crash reports if multiple binaries are crashing.
Bug: 25121166
Change-Id: I48ad88fcb0bb00b4a21dc6f2aa54f94cead971ea
When doing a clean build, creating this file fails because the dir does
not yet exist:
echo "" > out/target/product/brilloemulator_arm/obj/ETC/crash_server_intermediates/crash_server
/bin/bash: out/target/product/brilloemulator_arm/obj/ETC/crash_server_intermediates/crash_server: No such file or directory
Bug: 24989289
Change-Id: If204dc0eb32e95ee66f97b568b4b9ae4050d3591
Since all of the other configs use os-release.d rather than
system properties, switch the crash server url as well. This also
makes the product configuration more straightforward.
Bug: 24989289
Change-Id: Ia4b423e59937a917c882e74b110b5ea520ca6016
The /data directory isn't guaranteed to be mounted during the
"on boot" trigger, so switch them to using "on post-fs-data".
Bug: 24941965
Change-Id: Iee84ca0e934967cff7bc4d968d9939d398c73980
The product_id and product_version has been moved into the
/etc/os-release.d key-value store, update crash_reporter to
use these values.
Bug: 22874192
Change-Id: I71886574d1aa4e0a3ac18e1c361ec65684af9b49
libchromeos is transitioning to libbrillo and chromeos namespaces
and include directory is changing to brillo.
Bug: 24872993
Change-Id: I797613a38c7444a113f12e38366a424388477276
Rather than assuming the UID and GID of crashing processes is
the same, report and use the actual GID that the process was
running as.
Bug: 24678424
Change-Id: I3cfc415be2feb2863a4f4b850bfd4a3267217a44
In order to read the /proc/<pid> files from non-root users without
using CAP_SYS_PTRACE and CAP_DAC_OVERRIDE, use setresuid(..) and
setresgid(..) to switch to the process's user to copy off necessary
files for generating the breakpad minidump.
Bug: 24678424
Change-Id: I4a43583033587441394483ce678c40c4161808b9
Read in the ro.build.id property for version, and
ro.product.product_id for the Product ID.
Bug: 22874192
Change-Id: I9a3fbf375d49d04fc7bf6700c5987cb9e435c318
Instead of grepping the build description for "Official", use
the property ro.secure.
Bug: 24404853
Change-Id: Ia0423b3524ac9472db6a782509b56c9834c8d26e
We can use the LOCAL_INIT_RC variable for init.rc files.
Also, switch to use <service>.rc for the filename, since this is what
Android does now.
Bug: 24465893
Change-Id: I924acbe758ba9994020093005e27c8c06d0686ff
Rather than share the guid with metrics, crash_reporter should
use its own guid that is persistent across reboots but not
across factory resets.
Bug: 24102242
Change-Id: I1bcc1a10aa8e1c09372386fe8e1661a8894b8d70
When calculating the crash_sender spread time, make sure that the
random number is not negative when converted to a shell int variable.
Bug: 24004011
Change-Id: I3b95dc244a26270ef2b93d5af4b0593a93eedcad
Read the crash server URL from the crash_reporter.server
property. If it is not set, return a configuration error.
Bug: 22874192
Change-Id: Iac341b6352fe9c1b54cd2e8561ed4a5bbe8ddddc
- Added grep to the list of required modules.
- Run crash_sender with the 'system' group to allow calls to
metrics_client to read both metrics files owned by system and
crash_reporter files owned by root.
- Fix periodic_scheduler's check delay to actually be 5 minutes.
Bug: 23122375
Change-Id: Iff214c4e591a676a516162a92ea5aedcf0824f46
- Remove all the ChromeOS specific logic.
- Fix paths to correct Android paths.
- Add periodic_scheduler, and add crash_sender to init.
Bug: 23231196
Bug: 23233267
Change-Id: I12de28bfbe5d5b08831eda9b28c6d7a669c22290
Convert the call to dbus-send from system() to chromeos::ProcessImpl
so that the shell_exec selinux policy can be removed.
Bug: 23280203
Change-Id: I692ebecf5b7f0611de252225cedabcdefd56dff8
In order to use metrics_lib, crash_reporter needs to be run with
system group permissions. To use dbus, it needs dbus group
permissions.
Bug: 23406290
Change-Id: Ic679a057afa46aaadd59429aab0aea072c1973c5
It is unsafe to use /data/local/tmp. Use our own temporary
directory under /data/misc/crash_reporter.
Bug: 23430484
Change-Id: I186ba6b146bd884064177a3bb29b18b8edcc0b62
MODULE_LICENSE_BSD and NOTICE were removed as the license is no longer
different from the rest of system/core.
Bug: 23368756
Change-Id: I31e48eb7c3d153c7c5ec4f694c61474dedac2eeb
This builds:
* crash_reporter: Client for collecting crash data.
* crash_sender: Installs the script for sending crash reports to the server.
* warn_collector: Flex client for monitoring /var/log/messages for kernel
warnings.
* init.crash_reporter.rc: Init script for setting up crash reporting.
* crash_reporter_logs.conf: Conf file for handling core dumps.
* Unit tests for the different crash collectors. These currently build, but
not all of them pass as the crash reporter client isn't properly configured
yet.
Bug: 22486906
Change-Id: I9337a566f35955d1d41ae94d535eb9e9730bbeb1
Fix various path/directory locations to their Android equivalents
to enable collection of core dumps and generation of mini dumps
to work correctly. Also add the init script to initialize
crash_reporter.
Bug: 22874832
Change-Id: Iffb1529e5259c5da5ba7f6977b2787e738f68a78
Fix some issues to get crash_reporter to compile on Android.
C++ source:
* bits/wordsize.h is used for __WORDSIZE, but is unavailable for most
Android toolchain architectures. It instead is available in sys/cdefs.h
Flex source:
* The Flex compiler toolchain doesn't link against the default fl library
using -lfl. Thus there is no yywrap() function defined. Since the
default fl library implementation just returns 1 (true), instead add a
directive to disable yywrap.
* The index(..) function has been deprecated in favor of strchr(..)
* Add a directive to disable the "deprecated conversion from string constant
to 'char*'" warning in the generated code.
* Remove warning suppression for the input() function which doesn't get
generated with Flex v2.5.39 and the arguments passed in the build command.
Bug: 22874187
Change-Id: I6d7dcf5f801010aeae06db9f0628a6652ee269ee
Removed the ChromeOS specific code so that the code compiles. The code
removed is not needed when running on Android, and includes:
* Chrome collector
* ChromeOS build's gyp file
* ChromeOS-specific DBus calls
* ChromeOS-specific collector path logic
* Chrome bypass logic in user collector
Bug: 22672752
Change-Id: I3c7d87c971a181d8f73293519318e3602d142927
This header pulls in glib dependencies which aren't used in these
codebases.
BUG=chromium:508218
TEST=trybots
Change-Id: Iecf8dfcdd8064b1feb694382eea55c3f0df572d3
Reviewed-on: https://chromium-review.googlesource.com/284053
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
Trybot-Ready: Christopher Wiley <wiley@chromium.org>
The session_manager already had a fully-specified .xml file
describing its DBus API, so toss the one created for use
by crash-reporter.gyp, and point the build to the canonical one.
BUG=None
TEST=build crash-reporter and run unit tests
Change-Id: Id14e1a5a3a2aa7be3caee309c04d85078e43a315
Reviewed-on: https://chromium-review.googlesource.com/267726
Trybot-Ready: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Steve Fung <stevefung@chromium.org>
Commit-Queue: Chris Masone <cmasone@chromium.org>