From f174fc08dca7201b493be4187c450d925e113689 Mon Sep 17 00:00:00 2001 From: Hugh Dickins Date: Wed, 8 Sep 2010 20:55:26 -0700 Subject: [PATCH] Fix collection of kernel crash into /var/spool/crash No kcrash was collected because the IsEnabled() test always failed: we must do the kernel_collector->Enable() first. I've not checked if this might break the Override path (for local testing): it's more important for the feature to work for real than in an artificial test. BUG=837,5865 TEST=logging_KernelCrashServer or manual procedure Signed-off-by: Hugh Dickins Review URL: http://codereview.chromium.org/3317007 --- crash_reporter/crash_reporter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crash_reporter/crash_reporter.cc b/crash_reporter/crash_reporter.cc index e850e3070..37c62a6fb 100644 --- a/crash_reporter/crash_reporter.cc +++ b/crash_reporter/crash_reporter.cc @@ -89,6 +89,7 @@ static int Initialize(KernelCollector *kernel_collector, bool was_kernel_crash = false; bool was_unclean_shutdown = false; + kernel_collector->Enable(); if (kernel_collector->IsEnabled()) { was_kernel_crash = kernel_collector->Collect(); } @@ -111,7 +112,6 @@ static int Initialize(KernelCollector *kernel_collector, } // Must enable the unclean shutdown collector *after* collecting. - kernel_collector->Enable(); unclean_shutdown_collector->Enable(); user_collector->Enable();