Fixed
Status Update
Comments
ra...@google.com <ra...@google.com>
ma...@google.com <ma...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
https://android-review.googlesource.com/1123258
https://goto.google.com/android-sha1/b90079595f33f58fece04026a97faa0d243acdb1
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
sc...@gmail.com <sc...@gmail.com> #3
ma...@google.com <ma...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically ( b/140759491 ).
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
https://android-review.googlesource.com/1288456
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
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.