Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2882)

Unified Diff: crash_sender

Issue 3040013: Start invoking core2md to implement full system crash reporting (Closed) Base URL: ssh://git@chromiumos-git//crash-reporter.git
Patch Set: Replace all STREQ macros Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crash_reporter.cc ('k') | system_logging.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crash_sender
diff --git a/crash_sender b/crash_sender
index 90cd661ebee3693226f771bcd18857538cc21650..6da893354c4ad918d2685df7bb628e7a06f80428 100644
--- a/crash_sender
+++ b/crash_sender
@@ -46,13 +46,8 @@ lecho() {
logger -t "${TAG}" "$@"
}
-log_done() {
- lecho "Done"
-}
-
cleanup_tmp_dir() {
rm -rf "${TMP_DIR}"
- log_done
}
cleanup_run_file_and_tmp_dir() {
@@ -119,6 +114,12 @@ check_rate() {
return 0
}
+# Return if $1 is a .core file
+is_core_file() {
+ local filename=$1
+ [ "${filename##*.}" = "core" ]
+}
+
send_crash() {
local sleep_time=$(generate_uniform_random $SECONDS_SEND_SPREAD)
local url="${MINIDUMP_UPLOAD_STAGING_URL}"
@@ -183,6 +184,7 @@ send_crash() {
send_crashes() {
local dir="$1"
lecho "Considering crashes in ${dir}"
+
# Cycle through minidumps, most recent first. That way if we're about
# to exceed the daily rate, we send the most recent minidumps.
if [ ! -d "${dir}" ]; then
@@ -190,11 +192,15 @@ send_crashes() {
fi
for file in $(ls -1t "${dir}"); do
local minidump_path="${dir}/${file}"
- lecho "Considering crash ${minidump_path}"
+ lecho "Considering file ${minidump_path}"
+ if is_core_file "${minidump_path}"; then
+ lecho "Ignoring core file."
+ continue
+ fi
if ! check_rate; then
lecho "Sending ${minidump_path} would exceed rate. Leaving for later."
return 0
- fi
+ fi
local chromeos_version=$(get_version)
if is_feedback_disabled; then
lecho "Uploading is disabled. Removing crash."
@@ -212,9 +218,6 @@ send_crashes() {
}
main() {
- lecho "Starting"
- trap log_done EXIT INT
-
if [ -e "${PAUSE_CRASH_SENDING}" ]; then
lecho "Exiting early due to ${PAUSE_CRASH_SENDING}"
exit 1
« no previous file with comments | « crash_reporter.cc ('k') | system_logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698