google / agi

Android GPU Inspector
https://gpuinspector.dev
Apache License 2.0
952 stars 139 forks source link

Pixel 6 fails validation: Failed to initialize HWC reader #1070

Open prodigga opened 2 years ago

prodigga commented 2 years ago

Environment information:

Bug description Fails validation

Reproduction steps Connect device and validate. It fails.

Stacktrace N/a

Screenshots image

ttanatb commented 2 years ago

Thanks for reporting this. Could you also attach the trace file along with gapic.log or gapis.log to the github issue as well?

pengdev commented 2 years ago

@ttanatb I have seen the same issue on my Pixel 6 Pro, please see the attached log files: gapis.log gapic.log

ttanatb commented 2 years ago

Thanks for the additional info, but could you also provide the trace file as well? The link from View trace file should show you the specific trace file in the tmp folder

ttanatb commented 2 years ago

Also, if you could run adb logcat > logcat.txt and upload the logcat.txt file, that would also be helpful for triaging what's going on here.

pengdev commented 2 years ago

@ttanatb here's the trace file and logcat validation2187746757.perfetto.zip logcat.txt

ttanatb commented 2 years ago

Are you using a custom build or OS (or is there something of note with your device)?

It looks like we're unable to capture GPU counter values. This part of the validation process can be non-deterministic especially if the app does not have focus (i.e. if the app is switched or if a notification panel takes over). I've verified with my Pixel 6 Pro and it seems to be validating fine.

pengdev commented 2 years ago

No, I used the latest Android update from the stable channel, and I made sure there's no app or notification running in the foreground. I did see the rendering of agi test graphics, and every time it ended up with the same validation error.

timbo-tj commented 2 years ago

Pengdev's experience mirrors mine exactly with my Pixel 6 (not Pro).

ttanatb commented 2 years ago

@pengdev I'm working with the Pixel team to triage what's going on here. Could you provide me the build number to help bisect what went wrong? It should be in Settings > About phone > Build number

@timbo-tj could you provide:

  1. The trace file -- the link from View trace file should show you the specific trace file in the tmp folder
  2. run adb logcat > logcat.txt and upload the logcat.txt file

so I can verify that this is the same issue?

ttanatb commented 2 years ago

As an update, I've tried flashing the recent, public Pixel 6 builds (the June security patch and the Feb security patch) to try to replicate this issue, but have not been able to replicate this.

Build numbers I've tried: SQ3A.220605.009.B1 SQ1D.220205.004

prodigga commented 2 years ago

Hello, (timbo-tj here, different account)

Validation passes on my workstation at work, but can confirm it still fails here at home. Maybe something wrong with the USB cable I am using? Or something wrong with my system? Unsure.

ttanatb commented 2 years ago

It depends on the error message you're getting. If it's same/similar to the one you posted in the original screenshot, the error is likely to be caused by the phone itself, not the system you're running AGI on. It's also unlikely that it's due to a faulty USB cable (especially if AGI is able to detect the phone in the first place).

I've seen other validation errors occur due to a bad installation, but not with the error message you are seeing.

pengdev commented 2 years ago

@pengdev I'm working with the Pixel team to triage what's going on here. Could you provide me the build number to help bisect what went wrong? It should be in Settings > About phone > Build number

Sorry for the late reply, my build number is SQ3A.220605.009.B1

Btw I don't know if it's related, but I'm running AGI on a MacBook with m1.

ttanatb commented 2 years ago

It's unlikely that this is an issue from M1. I flashed the same build you have on my Pixel 6 and could not replicate the issue, I noticed that your adb logcat result had:

06-08 15:11:38.054   894   894 I perfetto: ing_service_impl.cc:912 Configured tracing session 5, #sources:2, duration:7000 ms, #buffers:1, total buffer size:131072 KB, total sessions:1, uid:2000 session name: ""
06-08 15:11:38.101 22240 22242 E mali_gpu_data_source: Failed to initialize HWC reader
06-08 15:11:38.101 22240 22242 E mali_gpu_data_source: Couldn't start because OnSetup failed
06-08 15:11:38.372  1556  1761 D ConnectivityService: NetReassign [no changes]
06-08 15:11:38.999  1556  1591 E libprocessgroup: getpgid(11780) failed: Permission denied
06-08 15:11:38.997  1556  1556 W ActivityManager: type=1400 audit(0.0:121053): avc: denied { getpgid } for scontext=u:r:system_server:s0 tcontext=u:r:app_zygote:s0:c512,c768 tclass=process permissive=0
06-08 15:11:38.997  1556  1556 W ActivityManager: type=1400 audit(0.0:121054): avc: denied { getpgid } for scontext=u:r:system_server:s0 tcontext=u:r:app_zygote:s0:c512,c768 tclass=process permissive=0
06-08 15:11:39.005  1556  1591 E libprocessgroup: getpgid(11780) failed: Permission denied
06-08 15:11:39.001  1556  1556 W ActivityManager: type=1400 audit(0.0:121055): avc: denied { getpgid } for scontext=u:r:system_server:s0 tcontext=u:r:app_zygote:s0:c512,c768 tclass=process permissive=0
06-08 15:11:39.001  1556  1556 W ActivityManager: type=1400 audit(0.0:121056): avc: denied { getpgid } for scontext=u:r:system_server:s0 tcontext=u:r:app_zygote:s0:c512,c768 tclass=process permissive=0
06-08 15:11:39.012  1556  1591 E libprocessgroup: getpgid(11780) failed: Permission denied
06-08 15:11:39.009  1556  1556 W ActivityManager: type=1400 audit(0.0:121057): avc: denied { getpgid } for scontext=u:r:system_server:s0 tcontext=u:r:app_zygote:s0:c512,c768 tclass=process permissive=0
06-08 15:11:39.018  1556  1591 E libprocessgroup: getpgid(11780) failed: Permission denied
06-08 15:11:39.021   714   714 I Zygote  : Process 11780 exited due to signal 9 (Killed)
06-08 15:11:39.023  1556  1591 I libprocessgroup: Successfully killed process cgroup uid 10155 pid 11780 in 24ms

but I did not have any error messages from mali_gpu_data_source

I'm working with the Pixel team to investigate this further, and will provide updates once I know more

ttanatb commented 1 year ago

Hello, is this still an issue for Pixel 6 devices? (I haven't been able to repro on my end)

amaroney55 commented 1 year ago

Hey I am just gonna butt in and ask. How in the world do you get the pixel 6 pro out of pixel rom recovery (exynos USB boot mode) it is hard bricked and it will register on PC as USB serial device only. Will not go into adb/fastboot mode. Sorry for being rude and jumping in. But I have been working with this issue since 2nd a14 beta. And apparently a lot of other ppl has to. I think there might be a way to boot the phone back to working state with uwb mode from reading a lot of info bout that but it doesn't really say if you can or can't. And I am not comfortable with doing any work with the USB serial communication yet. I really just now have learned a little about jtag and uart. But if you can help please do.