aws-samples / amazon-ivs-broadcast-android-sample

MIT No Attribution
10 stars 8 forks source link

App hangs on real device #58

Closed fbinz closed 6 months ago

fbinz commented 9 months ago

Hi, I'm currently investigating a problem that seems to have emerged when my phone upgraded to Android 14 (API 34). In an API 34 Emulator, everything is working fine. On my phone (Samsung S22 - if that matters) however, the example app just hangs when I try to start a broadcast.

Logcat does not show any suspicious output, as far as I can see.

Is there anything I can provide or do to help debug the issue?

FWIW, I attached a logcat log that starts just before I press the "START" button and ends just after I manually kill the app: samsung-SM-S901B-Android-14_2023-12-15_131457.zip

caleighm commented 9 months ago

Hi @fbinz, thanks for providing the logs. Our team will take a look.

caleighm commented 8 months ago

Hi @fbinz, I was wondering if you are still able to reproduce this issue with our latest release. Can you confirm that your device is a Samsung S22 (not Samsung S22+ or Samsung S22 Ultra)?

Thanks.

caleighm commented 8 months ago

Hi @fbinz , I have one additional question.

Could you also please share your phone's exact build ID? This information should be somewhere under device settings -> about phone.

Thanks.

fbinz commented 8 months ago

Hey, thanks for having a look.

My device is a S22 - the exact model is: SM-S901B/DS

I've attached the output of adb shell getprop as a file: props.txt

$ cat props.txt | grep build.id
[ro.bootimage.build.id]: [SP1A.210812.016]
[ro.build.id]: [UP1A.231005.007]
[ro.omc.build.id]: [74686147]
[ro.product.build.id]: [UP1A.231005.007]
[ro.system.build.id]: [UP1A.231005.007]
[ro.system_ext.build.id]: [UP1A.231005.007]
[ro.vendor.build.id]: [SP1A.210812.016]
[ro.vendor_dlkm.build.id]: [SP1A.210812.016]
caleighm commented 8 months ago

Hi @fbinz , thanks for the information. It appears the build IDs you've provided actually map up to Google Pixel devices, not Samsung.

Is it possible you checked the build IDs on the wrong device? Or are you hitting the ANR on a Pixel, not a Samsung? We'd like to know the exact build ID of the Samsung S22 that hits the ANR.

kvasilye commented 8 months ago

Hi @fbinz can you please also confirm your Samsung S22's (if that's what it is) CPU information?

Is it Exynos or Qualcomm?

If in doubt, you can install CPU-Z from Google Play to check, it's free (and I'm sure there are other apps that can show this info).

fbinz commented 8 months ago

It's definitely a Samsung. So very strange that those IDs map to Pixel devices... Here's the full Build ID: UP1A.231005.007.S901BXXS7DWL3

Here's the CPU-Z log:

CPUs : 8
SoCs : 1

CPU 0 :
Name : ARM Cortex-A510+ARM Cortex-A710+ARM Cortex-X2
Model : s5e9925
CPUs : 8
Max Frequency : 2803 MHz

Core set 0 : ARM Cortex-A510
Core set 0 Nb Cores : 4
Core set 0 Max Clock : 1824 MHz
Core set 0 Impl.id : 0x41
Core set 0 Arch.id : 0x8
Core set 0 Var.id : 0
Core set 0 Part.id : 0xd46
Core set 0 Rev.id : 2
Core set 0 Revision : r0p2

Core set 1 : ARM Cortex-A710
Core set 1 NbCores : 3
Core set 1 Max Clock : 2515 MHz
Core set 1 Impl.id : 0x41
Core set 1 Arch.id : 0x8
Core set 1 Var.id : 2
Core set 1 Part.id : 0xd47
Core set 1 Rev.id : 0
Core set 1 Revision : r2p0

Core set 2 : ARM Cortex-X2
Core set 2 NbCores : 1
Core set 2 Max Clock : 2803 MHz
Core set 2 Impl.id : 0x41
Core set 2 Arch.id : 0x8
Core set 2 Part.id : 0xd48

Arch : 4x ARM Cortex-A510 @1,82 GHz+3x ARM Cortex-A710 @2,52 GHz+1x ARM Cortex-X2 @2,80 GHz
Codename :
GPU Vendor : Samsung Electronics Co., Ltd.
GPU Renderer : ANGLE (Samsung Xclipse 920) on Vulkan 1.3.231

Model : SM-S901B (r0sxeea)
Manufacturer : samsung
Board : s5e9925
Hardware : s5e9925
Android Ver. : 14
Kernel Arch. : aarch64
Soc #1 : s5e9925
Soc #2 :
Soc #3 :
Platform : universal9925

Battery capacity : 3590

--- CPUInfos ---
abi : arm64-v8a
abi2 :
supported abis : [arm64-v8a, armeabi-v7a, armeabi]
supported 32-bit abis : [armeabi-v7a, armeabi]
supported 64-bit abis : [arm64-v8a]
processor : 0
BogoMIPS : 51.20
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd46
CPU revision : 2

processor : 1
BogoMIPS : 51.20
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd46
CPU revision : 2

processor : 2
BogoMIPS : 51.20
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd46
CPU revision : 2

processor : 3
BogoMIPS : 51.20
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd46
CPU revision : 2

processor : 4
BogoMIPS : 51.20
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x2
CPU part : 0xd47
CPU revision : 0

processor : 5
BogoMIPS : 51.20
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x2
CPU part : 0xd47
CPU revision : 0

processor : 6
BogoMIPS : 51.20
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x2
CPU part : 0xd47
CPU revision : 0

processor : 7
BogoMIPS : 51.20
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x2
CPU part : 0xd48
CPU revision : 0

According to my understanding, this s5e9925 is an Exynos CPU.

kvasilye commented 8 months ago

Yes it's Exynos and the build ID I was looking for is S901BXXS7DWL3

Thank you @fbinz

fbinz commented 7 months ago

Hey @kvasilye, @caleighm,

any news on the subject? I just tried the newest SDK (1.14.1) and the issue is still present. Unfortunately, by now it also affects some of our customers. I suspect it has something to do with Samsungs OneUI, since for me the issue first appeared after a bigger update was installed on my phone.

kvasilye commented 7 months ago

Hello @fbinz no resolution yet but we are looking at it

Took some time to obtain the right phone - the issue is only present on the Exynos variant of S22 / S22+ (and we are US based so we get Qualcomm, and the issue is not present there... also not present on other devices with Android 14).

Looking at stack traces, it's a deadlock deep inside Android's graphics code, doing things we're not even touching. And yes it appears specific to Samsung's Android 14 update, the issue did not exist on S22 / S22+ Exynos with Android 13.

fbinz commented 7 months ago

Oh, wow, thanks for investigating! Really hope you can figure it out somehow.

kvasilye commented 7 months ago

@fbinz We've fixed the issue and the fix will be available in a future release.

fbinz commented 7 months ago

Thanks! Will test ASAP. I guess this will be the 1.16.0 release?

kvasilye commented 7 months ago

Maybe :) Can't say more as we don't comment on any specifics ahead of time. My advice is to watch our releases and check their release notes.

kvasilye commented 7 months ago

@fbinz We just published the IVS Broadcast SDK 1.16.0-rc.1 for Android

https://central.sonatype.com/artifact/com.amazonaws/ivs-broadcast

implementation 'com.amazonaws:ivs-broadcast:1.16.0-rc.1'

The Samsung Exynos freeze fix is included, it would be great if you could validate.

Note that this is an "RC" release, so it will not be announced same as our "full" releases, and it may be less stable than the "full" releases (not intentionally of course, it did go through QA).

fbinz commented 6 months ago

Cool, thanks for the heads up. I was on vacation last week, but will test it today or tomorrow!

fbinz commented 6 months ago

@kvasilye

Everything seems to be working correctly now. Thank's for your help, really appreciated!

kvasilye commented 6 months ago

@fbinz Excellent, thank you for letting us know!

kvasilye commented 6 months ago

We just released 1.16.0 "official stable" version, the fix is of course included as well