Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macrobenchmark fails to pull trace on Android 12 #92

Closed
mrmike opened this issue Oct 26, 2021 · 1 comment
Closed

Macrobenchmark fails to pull trace on Android 12 #92

mrmike opened this issue Oct 26, 2021 · 1 comment

Comments

@mrmike
Copy link

mrmike commented Oct 26, 2021

Steps to reproduce issue

  1. Clone performance-samples project
  2. Open MacrobenchmarkSample in Android Studio. I'm using Bumblebee 2021.1.1 Beta 1.
  3. Run TrivialStartupBenchmark on physical device with Android 12 (Pixel 5 in my case)

Expected output

  • Tests are passing

Actual output

  • Macrobenchmark fails to pull trace file
java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.example.macrobenchmark/cache/TrivialStartupBenchmark_startup[mode=COLD]_iter000_2021-10-26-07-09-40.perfetto-trace: open failed: EACCES (Permission denied)
	at libcore.io.IoBridge.open(IoBridge.java:575)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:236)
	at kotlin.io.FilesKt__FileReadWriteKt.appendBytes(FileReadWrite.kt:115)
	at androidx.benchmark.perfetto.UiStateKt.appendUiState(UiState.kt:45)
	at androidx.benchmark.macro.MacrobenchmarkKt.macrobenchmark(Macrobenchmark.kt:200)
	at androidx.benchmark.macro.MacrobenchmarkKt.macrobenchmarkWithStartupMode(Macrobenchmark.kt:273)
	at androidx.benchmark.macro.junit4.MacrobenchmarkRule.measureRepeated(MacrobenchmarkRule.kt:68)
	at androidx.benchmark.macro.junit4.MacrobenchmarkRule.measureRepeated$default(MacrobenchmarkRule.kt:58)
	at com.example.macrobenchmark.StartupUtilsKt.measureStartup(StartupUtils.kt:32)
	at com.example.macrobenchmark.TrivialStartupBenchmark.startup(TrivialStartupBenchmark.kt:34)
	... 37 trimmed
Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
	at libcore.io.Linux.open(Native Method)
	at libcore.io.ForwardingOs.open(ForwardingOs.java:567)
	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:273)
	at libcore.io.ForwardingOs.open(ForwardingOs.java:567)
	at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7728)
	at libcore.io.IoBridge.open(IoBridge.java:561)
	... 47 more

It looks like the file exists cause I can pull it using adb pull

adb pull /storage/emulated/0/Android/data/com.example.macrobenchmark/cache/TrivialStartupBenchmark_startup[mode=COLD]_iter000_2021-10-26-07-09-40.perfetto-trace

/storage/emulated/0/Android/data/com.example.macrobenchmark/... file pulled, 0 skipped. 38.0 MB/s (6161528 bytes in 0.155s)
@mrmike
Copy link
Author

mrmike commented Oct 27, 2021

Ok I found that this issue is already fixed and will be released in the next alpha version - https://issuetracker.google.com/issues/203598149.

@mrmike mrmike closed this as completed Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant