From f4c39b09f4f3559fc544fb6a7a47d6418b67ffad Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 6 Dec 2013 18:19:01 -0500 Subject: [PATCH] crash_sender: upload oldest crashes first The current logic is sorting crashes by date (which is good), except it sorts it such that the newest is first (which is bad). This means if a new process continues to crash, old crash reports will be perpetually stalled (it's a stack). Instead, let's start with the oldest first (like a fifo). BUG=chromium:326583 TEST=`cbuildbot x86-generic-full` passes VMTests Change-Id: Ifadedba80cb8c602c094c91d419e4d9645abda51 Reviewed-on: https://chromium-review.googlesource.com/179210 Reviewed-by: Ben Chan Commit-Queue: Mike Frysinger Tested-by: Mike Frysinger --- crash_reporter/crash_sender | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crash_reporter/crash_sender b/crash_reporter/crash_sender index a523d98d7..1764ba832 100755 --- a/crash_reporter/crash_sender +++ b/crash_reporter/crash_sender @@ -490,7 +490,7 @@ send_crashes() { done # Look through all metadata (*.meta) files, if any exist. - for meta_path in $(ls -1t "${dir}"/*.meta 2>/dev/null); do + for meta_path in $(ls -1tr "${dir}"/*.meta 2>/dev/null); do lecho "Considering metadata ${meta_path}." local kind=$(get_kind "${meta_path}")