Continue creating a report even if an error has occured 16/258916/1
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Thu, 27 May 2021 20:44:40 +0000 (22:44 +0200)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Thu, 27 May 2021 20:44:40 +0000 (22:44 +0200)
If an error occurs during minicoredump or dumpsystemstate creation,
report creation is not aborted to preserve as much information about the
crash as possible.

Change-Id: I133eae76335fb0a3a2f6d676393a23576493a44c

src/crash-manager/crash-manager.c

index d525588..8dd6a00 100644 (file)
@@ -1277,7 +1277,8 @@ static bool run(struct crash_info *cinfo)
                /* Exec dump_systemstate */
                if (!dump_system_state(cinfo, &dump_state_pid)) {
                        _E("Failed to get system state report");
-                       return false;
+                       // continue creating a raport even if it does not
+                       // contain the correct coredump
                }
 
                if (config.extra_script && !extra_script(cinfo, &extra_script_pid))
@@ -1291,7 +1292,8 @@ static bool run(struct crash_info *cinfo)
                /* Exec crash modules */
                if (!execute_crash_modules(cinfo)) {
                        _E("Failed to get basic crash information");
-                       return false;
+                       // continue creating a raport even if it does not
+                       // contain the correct coredump
                }
 
                if (!cinfo->livedump && config.release_early)