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

Commit 5aa8d157 authored by Kean Mariotti's avatar Kean Mariotti
Browse files

dumpstate.cpp: increase perfetto serialization timeout

This commit increases the timeout of "perfetto --save-for-bugreport"
from 10s to 30s, thus giving more time to data sources to process
OnFlush.

30s seems a bit extreme but in production we ran into cases
(e.g. b/369053554), where the serialization took >18s.

Fix: 369053554
Flag: EXEMPT bugfix
Test: atest com.android.os.bugreports.tests.BugreportManagerTest
Ignore-AOSP-First: depends on changes not available in AOSP
       (I343813929a537c601132dd15db5e2c4d3fbbdcb1)
Change-Id: Ie976c7d86fef854f24b115b347890a3d40be9885
parent 5c7cd859
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3533,7 +3533,7 @@ std::future<std::string> Dumpstate::MaybeSnapshotSystemTraceAsync() {
            // the dumpstate's own activity which is irrelevant.
            RunCommand(
                SERIALIZE_PERFETTO_TRACE_TASK, {"perfetto", "--save-for-bugreport"},
                CommandOptions::WithTimeout(10).DropRoot().CloseAllFileDescriptorsOnExec().Build(),
                CommandOptions::WithTimeout(30).DropRoot().CloseAllFileDescriptorsOnExec().Build(),
                false, outFd);
            // MaybeAddSystemTraceToZip() will take care of copying the trace in the zip
            // file in the later stages.