Fixed
Status Update
Comments
ra...@google.com <ra...@google.com>
ma...@google.com <ma...@google.com> #2
Looking at the stacktrace, it seems that the perfetto trace processor is not reachable anymore. Can you please check if there is any other log in the stacktrace tagged perfetto
or trace_processor
?
sc...@gmail.com <sc...@gmail.com> #3
Thank you for looking into it - should I be looking into logcat logs or Gradle output?
ma...@google.com <ma...@google.com> #4
In the logcats: there should be some failure/crash of the perfetto trace processor http server
af...@gmail.com <af...@gmail.com> #5
Facing the same issue on benchmark alpha13
Writing to
/storage/emulated/0/Android/media/com.myapp.app.benchmarkStartupBenchmark_startupFullCompilaton_iter001_2023-04-06-02-56-38perfetto-trace.
Copying
/storage/emulated/0/Android/media/com.myapp.app.benchmarkStartupBenchmark_startupFullCompilaton_iter001_2023-04-06-02-56-38perfetto-trace
to
/sdcard/Android/media/com.myapp.app.benchmark/additional_test_outputStartupBenchmark_startupFullCompilaton_iter001_2023-04-06-02-56-38perfetto-trace
http_server.cc:231 [HTTP] GET /restore_initial_tables [body=0B, origin=""]
http_server.cc:231 [HTTP] GET /restore_initial_tables [body=0B, origin=""]
e_processor_impl.cc:987 Resetting DB
http_server.cc:90 [HTTP] Client disconnected
http_server.cc:83 [HTTP] New connection
http_server.cc:90 [HTTP] Client disconnected
Perfetto trace processor shell
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
at java.net.SocketOutputStream.write(SocketOutputStream.java:156)
at com.android.okhttp.okio.Okio$1.write(Okio.java:78)
at com.android.okhttp.okio.AsyncTimeout$1.write(AsyncTimeout.java:157)
at com.android.okhttp.okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:177)
at com.android.okhttp.okio.RealBufferedSink.write(RealBufferedSink.java:47)
at com.android.okhttp.internal.http.RetryableSink.writeToSocket(RetryableSink.java:80)
at com.android.okhttp.internal.http.Http1xStream.writeRequestBody(Http1xStream.java:234)
at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:618)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:475)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:248)
at androidx.benchmark.macro.perfetto.server.PerfettoHttpServer.httpRequest(PerfettoHttpServer.kt:275)
at androidx.benchmark.macro.perfetto.server.PerfettoHttpServer.httpRequest$default(PerfettoHttpServer.kt:256)
at androidx.benchmark.macro.perfetto.server.PerfettoHttpServer.parse(PerfettoHttpServer.kt:216)
at androidx.benchmark.perfetto.PerfettoTraceProcessor.loadTraceImpl(PerfettoTraceProcessor.kt:295)
at androidx.benchmark.perfetto.PerfettoTraceProcessor.loadTrace(PerfettoTraceProcessor.kt:129)
at androidx.benchmark.macro.MacrobenchmarkKt$macrobenchmark$measurements$1.invoke(Macrobenchmark.kt:255)
at androidx.benchmark.macro.MacrobenchmarkKt$macrobenchmark$measurements$1.invoke(Macrobenchmark.kt:202)
at androidx.benchmark.perfetto.PerfettoTraceProcessor$Companion.runServer(PerfettoTraceProcessor.kt:104)
at androidx.benchmark.macro.MacrobenchmarkKt.macrobenchmark(Macrobenchmark.kt:202)
at androidx.benchmark.macro.MacrobenchmarkKt.macrobenchmarkWithStartupMode(Macrobenchmark.kt:365)
at androidx.benchmark.macro.junit4.MacrobenchmarkRule.measureRepeated(MacrobenchmarkRule.kt:107)
at com.myapp.app.benchmark.StartupBenchmark.startup(StartupBenchmark.kt:35)
at com.myapp.app.benchmark.StartupBenchmark.startupFullCompilation(StartupBenchmark.kt:33)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at androidx.benchmark.macro.junit4.MacrobenchmarkRule$applyInternal$1.evaluate(MacrobenchmarkRule.kt:133)
at androidx.test.rule.GrantPermissionRule$RequestPermissionStatement.evaluate(GrantPermissionRule.java:134)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at androidx.test.ext.junit.runners.AndroidJUnit4.run(AndroidJUnit4.java:162)
---------------------------- PROCESS ENDED (12540) for package com.myapp.debug ----------------------------
la...@team.bumble.com <la...@team.bumble.com> #6
Comment has been deleted.
ma...@google.com <ma...@google.com> #7
I think aosp/2549513 should solve the issue. I believe the problem is in the trivial http request implementation.
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-main
commit 7bb04688b802b7572aaac654629d11cfcf40fcb3
Author: Marcello Albano <maralb@google.com>
Date: Wed Apr 19 15:48:18 2023
Changed PerfettoHttpServer to upload in chuncks
The trace shell processor http server has 64mb of payload hard limit.
Uploading a trace larger than that in a single `parse` call will result
in a `broken pipe` error. This PR ensures that the trace is sent in
chunks of 32Mb max.
Fixes: 269949822
Test: ./gradlew :benchmark:benchmark-macro:cC
Change-Id: Ief831b2c58ebfeac3ae5cb2bfcb8623b920ad356
Relnote: Fixed trace processor parsing for traces larger than 64Mb.
M benchmark/benchmark-macro/lint-baseline.xml
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/perfetto/PerfettoTraceProcessorTest.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/perfetto/server/PerfettoHttpServer.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/perfetto/PerfettoTraceProcessor.kt
https://android-review.googlesource.com/2549513
Branch: androidx-main
commit 7bb04688b802b7572aaac654629d11cfcf40fcb3
Author: Marcello Albano <maralb@google.com>
Date: Wed Apr 19 15:48:18 2023
Changed PerfettoHttpServer to upload in chuncks
The trace shell processor http server has 64mb of payload hard limit.
Uploading a trace larger than that in a single `parse` call will result
in a `broken pipe` error. This PR ensures that the trace is sent in
chunks of 32Mb max.
Fixes: 269949822
Test: ./gradlew :benchmark:benchmark-macro:cC
Change-Id: Ief831b2c58ebfeac3ae5cb2bfcb8623b920ad356
Relnote: Fixed trace processor parsing for traces larger than 64Mb.
M benchmark/benchmark-macro/lint-baseline.xml
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/perfetto/PerfettoTraceProcessorTest.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/perfetto/server/PerfettoHttpServer.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/perfetto/PerfettoTraceProcessor.kt
na...@google.com <na...@google.com> #10
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.benchmark:benchmark-macro:1.2.0-alpha14
Description
Hi!
For the following setup:
Component used:
androidx.benchmark:benchmark-macro-junit4
Version used:
1.2.0-alpha09
Devices/Android versions reproduced on: Zenfone 9 (Android 13) / Pixel 3A (Android 12)
IDE: Android Studio Giraffe + AGP 7.4.1
Gradle 7.6
I keep getting the following exception randomly during test execution:
Happens on both of my devices. It was also present in
1.2.0-alpha07
which I tested some time ago.It seems that this occurs at a random time - sometime just at the beginning of a test or in the middle of it. Happens for both builds with and without baseline profile.
Going back to version 1.1.1 resolves the issue.