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

Commit eaf9d9c7 authored by Jaideep Sharma's avatar Jaideep Sharma Committed by Andy Hung
Browse files

MediaUtils: Dump HAL pids in Timecheck abort message

Dump list of HAL pids in abort message of tombstone by making sure
HAL information is not missed from tombstones.

Test: instrumented timeout, check tombstone
Bug: 232883977
Change-Id: I7a68a3facdc956da5bf0222c400e7229980adb4f
parent 065fb0f5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -189,15 +189,18 @@ void TimeCheck::TimeCheckHandler::onTimeout() const
    // Generate audio HAL processes tombstones and allow time to complete
    // before forcing restart
    std::vector<pid_t> pids = TimeCheck::getAudioHalPids();
    std::string halPids = "HAL pids [ ";
    if (pids.size() != 0) {
        for (const auto& pid : pids) {
            ALOGI("requesting tombstone for pid: %d", pid);
            halPids.append(std::to_string(pid)).append(" ");
            sigqueue(pid, DEBUGGER_SIGNAL, {.sival_int = 0});
        }
        sleep(1);
    } else {
        ALOGI("No HAL process pid available, skipping tombstones");
    }
    halPids.append("]");

    LOG_EVENT_STRING(LOGTAG_AUDIO_BINDER_TIMEOUT, tag.c_str());

@@ -206,6 +209,7 @@ void TimeCheck::TimeCheckHandler::onTimeout() const
            .append(tag)
            .append(" scheduled ").append(formatTime(startTime))
            .append(" on thread ").append(std::to_string(tid)).append("\n")
            .append(halPids).append("\n")
            .append(summary);

    // Note: LOG_ALWAYS_FATAL limits the size of the string - per log/log.h: