Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d6bdd10 authored by Shuzhen Wang's avatar Shuzhen Wang
Browse files

Camera: Generate tombstone when watchdog bites

Bug: 237118046
Test: Add artificial delay of 20 seconds in close, see tombstone
Change-Id: I9b90f8cdb04f4b96bb8b26eb60db6b842481fca1
Merged-In: I11254e04d9d883e839dc1a7eee309e249613957e
parent 0b6f7b00
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -41,8 +41,10 @@ bool CameraServiceWatchdog::threadLoop()
            tidToCycleCounterMap[currentThreadId]++;

            if (tidToCycleCounterMap[currentThreadId] >= mMaxCycles) {
                ALOGW("CameraServiceWatchdog triggering kill for pid: %d", getpid());
                kill(getpid(), SIGKILL);
                ALOGW("CameraServiceWatchdog triggering abort for pid: %d", getpid());
                // We use abort here so we can get a tombstone for better
                // debugging.
                abort();
            }
        }
    }