aws-samples / amazon-ivs-broadcast-for-android-demo

This repository contains a broadcasting application for Android. The app is built on Amazon IVS and uses the Amazon IVS Broadcast SDK to stream video from an Android device to an Amazon IVS channel.
MIT No Attribution
10 stars 4 forks source link

Live streams ended externally freeze the client Android application with an ANR #12

Closed stephen-mojo closed 6 months ago

stephen-mojo commented 1 year ago

---------------------------------------------------------------------------------------------- Issue: ---------------------------------------------------------------------------------------------- The demo application becomes unresponsive and freezes with an ANR if a live stream session is ended externally.

---------------------------------------------------------------------------------------------- IVS Version ---------------------------------------------------------------------------------------------- 1.11.0

---------------------------------------------------------------------------------------------- Repro Steps - Case #1 - Stream key reset on IVS web dashboard: ----------------------------------------------------------------------------------------------

  1. Start a live stream broadcast from the IVS sample app (this repo)
  2. On the IVS web dashboard, locate the live channel
  3. Scroll down to "Stream configuration" section
  4. Click "Reset stream key"
  5. Check "Also stop any current live stream for this channel"
  6. Click "Reset stream key". This will end the stream.
  7. Wait for the client app to display an error saying "ERROR Broadcast failed"
  8. Navigate to Settings screen
  9. Press the X close button

---------------------------------------------------------------------------------------------- Repro Steps - Case #2 - Stream ended externally due to max bit rate being exceeded: ----------------------------------------------------------------------------------------------

  1. Start a live stream broadcast with a video bitrate configuration that exceeds the allowed limits of a Basic channel
  2. Stream to a Basic channel for 10 seconds
  3. Wait for the app to display an error saying "ERROR Broadcast failed" (This is due to exceeding bit rate limits)
  4. Navigate to Settings screen
  5. Press the X close button

---------------------------------------------------------------------------------------------- Expected Results for Both Cases: ---------------------------------------------------------------------------------------------- The settings screen is closed. The user returns to the broadcast screen.

---------------------------------------------------------------------------------------------- Actual Results: ---------------------------------------------------------------------------------------------- Pressing the close button on the settings screen freezes the application and results in an ANR. Before the ANR occurs, the BroadcastSession.Listener.onError() method is triggered with:

D Amazon_IVS_Broadcast: #onError: Broadcast error: Error is: Attempted to recv after receiving shutdown from peer; code=0; uid=405; source=net W Error is: Attempted to recv after receiving shutdown from peer; code=0; uid=405; source=net E ERROR: [src=net] [type=107 code=0 uid=405] Attempted to recv after receiving shutdown from peer D Amazon_IVS_Broadcast: #onStateChanged: Broadcast state changed: ERROR

And the reason for the ANR is:

E ANR in com.amazon.ivs.broadcast (com.amazon.ivs.broadcast/.ui.activities.MainActivity) PID: 30639 Reason: Input dispatching timed out (950ed15 com.amazon.ivs.broadcast/com.amazon.ivs.broadcast.ui.activities.MainActivity (server) is not responding. Waited 5003ms for MotionEvent) Parent: com.amazon.ivs.broadcast/.ui.activities.MainActivity

---------------------------------------------------------------------------------------------- Notes: ---------------------------------------------------------------------------------------------- It happens on multiple devices including a Pixel 6a and a Samsung Galaxy S22 Ultra.

I was able to reproduce this issue in both of the official IVS sample applications (IVS Demo Repository #1 & IVS Demo Repository #2).

This issue also occurs in my own application that uses the IVS SDK.

Even after the stream has ended due to the error, it looks like there are BroadcastSession.Listener.onAudioStats() calls as if the stream is still alive and sticking around. Is there some sort of cleanup that needs to be done in the BroadcastSession.Listener.onError() method to stop the app from freezing up?

---------------------------------------------------------------------------------------------- Logcat Logs ----------------------------------------------------------------------------------------------

D Amazon_IVS_Broadcast: #onAudioStats: peak: -43.47041320800781 rms: -57.66621780395508 D Amazon_IVS_Broadcast: #onAudioStats: peak: -30.749847412109375 rms: -57.17176055908203 D Amazon_IVS_Broadcast: #onAudioStats: peak: -43.714263916015625 rms: -58.8435173034668 D Amazon_IVS_Broadcast: #onAudioStats: peak: -44.223594665527344 rms: -58.04962921142578 D Amazon_IVS_Broadcast: #onAudioStats: peak: -42.067626953125 rms: -58.03253936767578 D Amazon_IVS_Broadcast: #onAudioStats: peak: -32.267425537109375 rms: -56.554412841796875 W type=1400 audit(0.0:14419): avc: denied { search } for name="thermal" dev="sysfs" ino=16398 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14420): avc: denied { search } for name="thermal" dev="sysfs" ino=16398 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14421): avc: denied { search } for name="thermal" dev="sysfs" ino=16399 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14422): avc: denied { search } for name="thermal" dev="sysfs" ino=16399 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14423): avc: denied { search } for name="thermal" dev="sysfs" ino=16398 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast D Amazon_IVS_Broadcast: #onAudioStats: peak: -43.797096252441406 rms: -57.9532585144043 D Attached thread 30704 to VM D Amazon_IVS_Broadcast: #onError: Broadcast error: Error is: Attempted to recv after receiving shutdown from peer; code=0; uid=405; source=net W Error is: Attempted to recv after receiving shutdown from peer; code=0; uid=405; source=net E ERROR: [src=net] [type=107 code=0 uid=405] Attempted to recv after receiving shutdown from peer D Amazon_IVS_Broadcast: #onStateChanged: Broadcast state changed: ERROR D Amazon_IVS_Broadcast: #onAudioStats: peak: -40.772308349609375 rms: -56.454994201660156 D Amazon_IVS_Broadcast: #onAudioStats: peak: -43.965187072753906 rms: -57.648983001708984 W type=1400 audit(0.0:14426): avc: denied { search } for name="thermal" dev="sysfs" ino=16398 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14427): avc: denied { search } for name="thermal" dev="sysfs" ino=16398 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14428): avc: denied { search } for name="thermal" dev="sysfs" ino=16399 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14429): avc: denied { search } for name="thermal" dev="sysfs" ino=16399 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14430): avc: denied { search } for name="thermal" dev="sysfs" ino=16398 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast D Amazon_IVS_Broadcast: #onAudioStats: peak: -42.70387649536133 rms: -58.06087875366211 D Amazon_IVS_Broadcast: #onAudioStats: peak: -45.3919677734375 rms: -57.975711822509766 D Amazon_IVS_Broadcast: #onAudioStats: peak: -45.64582824707031 rms: -60.251434326171875 W type=1400 audit(0.0:14433): avc: denied { search } for name="thermal" dev="sysfs" ino=16398 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14434): avc: denied { search } for name="thermal" dev="sysfs" ino=16398 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14435): avc: denied { search } for name="thermal" dev="sysfs" ino=16399 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14436): avc: denied { search } for name="thermal" dev="sysfs" ino=16399 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14437): avc: denied { search } for name="thermal" dev="sysfs" ino=16398 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast D Amazon_IVS_Broadcast: #onAudioStats: peak: -32.01838684082031 rms: -54.85007858276367 D Amazon_IVS_Broadcast: #onAudioStats: peak: -43.880733489990234 rms: -57.50470733642578 D Amazon_IVS_Broadcast: #onAudioStats: peak: -44.1365966796875 rms: -58.14192199707031 D Amazon_IVS_Broadcast: #onAudioStats: peak: -43.35101318359375 rms: -56.774818420410156 W type=1400 audit(0.0:14440): avc: denied { search } for name="thermal" dev="sysfs" ino=16398 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14441): avc: denied { search } for name="thermal" dev="sysfs" ino=16398 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14442): avc: denied { search } for name="thermal" dev="sysfs" ino=16399 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14443): avc: denied { search } for name="thermal" dev="sysfs" ino=16399 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast W type=1400 audit(0.0:14444): avc: denied { search } for name="thermal" dev="sysfs" ino=16398 scontext=u:r:untrusted_app:s0:c54,c257,c512,c768 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 app=com.amazon.ivs.broadcast D Amazon_IVS_Broadcast: #afterChange: false D Amazon_IVS_Broadcast: #afterChange: false D Amazon_IVS_Broadcast: #onAudioStats: peak: -40.92028045654297 rms: -56.30204772949219 E updateAcquireFence: Did not find frame. E updateAcquireFence: Did not find frame. E updateAcquireFence: Did not find frame. E updateAcquireFence: Did not find frame. E updateAcquireFence: Did not find frame. D Amazon_IVS_Broadcast: #onAudioStats: peak: -44.267425537109375 rms: -57.955894470214844 D Amazon_IVS_Broadcast: #onAudioStats: peak: -44.62628173828125 rms: -57.190711975097656 D Amazon_IVS_Broadcast: #onAudioStats: peak: -42.55839157104492 rms: -59.1921501159668 D Amazon_IVS_Broadcast: #onAudioStats: peak: -45.44214630126953 rms: -58.222747802734375 D Amazon_IVS_Broadcast: #onAudioStats: peak: -29.611278533935547 rms: -50.725860595703125 D Amazon_IVS_Broadcast: #onViewCreated: onViewCreated D Amazon_IVS_Broadcast: #resetSession: Releasing session D Amazon_IVS_Broadcast: #onAudioStats: peak: -42.239723205566406 rms: -60.484474182128906 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D bufferpool2 0xb40000708a072738 : 5(10240 size) total buffers - 4(8192 size) used buffers - 1393/1399 (recycle/alloc) - 9/2788 (fetch/transfer) D evictor expired: 1, evicted: 1 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 I Thread[5,tid=30644,WaitingInMainSignalCatcherLoop,Thread*=0xb40000711a0262c0,peer=0x141401f8,"Signal Catcher"]: reacting to signal 3 I
D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 I Wrote stack traces to tombstoned D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 E ANR in com.amazon.ivs.broadcast (com.amazon.ivs.broadcast/.ui.activities.MainActivity) PID: 30639 Reason: Input dispatching timed out (950ed15 com.amazon.ivs.broadcast/com.amazon.ivs.broadcast.ui.activities.MainActivity (server) is not responding. Waited 5003ms for MotionEvent) Parent: com.amazon.ivs.broadcast/.ui.activities.MainActivity ErrorId: 75e2a332-9dc0-440e-8302-1cc92fdfbb19 Frozen: false Load: 5.02 / 3.46 / 2.99 ----- Output from /proc/pressure/memory ----- some avg10=0.00 avg60=0.00 avg300=0.00 total=41893786 full avg10=0.00 avg60=0.00 avg300=0.00 total=15182562 ----- End output from /proc/pressure/memory -----

CPU usage from 0ms to 5034ms later (2023-08-15 16:19:09.459 to 2023-08-15 16:19:14.493): 24% 1435/system_server: 12% user + 12% kernel / faults: 4867 minor 827 major 16% 30639/com.amazon.ivs.broadcast: 10% user + 6% kernel / faults: 3768 minor 115 major 12% 3579/com.google.android.inputmethod.latin: 7.8% user + 4.5% kernel / faults: 2302 minor 668 major 7.2% 2026/com.android.systemui: 4.5% user + 2.7% kernel / faults: 2187 minor 371 major 6.2% 1175/media.swcodec: 3.3% user + 2.9% kernel / faults: 4878 minor 33 major 5.5% 1011/samsung.hardware.media.c2@1.0-service: 2.1% user + 3.3% kernel / faults: 29 minor 0.1% 1147/media.extractor: 0% user + 0% kernel / faults: 2837 minor 87 major 0% 1158/media.codec: 0% user + 0% kernel / faults: 1676 minor 73 major 1.5% 1211/adbd: 0.3% user + 1.1% kernel / faults: 257 minor 1.5% 3716/com.android.nfc: 1.3% user + 0.1% kernel / faults: 572 minor 506 major 1.3% 1016/audioserver: 0.3% user + 0.9% kernel / faults: 117 minor 11 major 1.3% 2208/com.android.networkstack.process: 0.7% user + 0.5% kernel / faults: 445 minor 462 major 0% 3767/com.google.android.connectivitythermalpowermanager: 0% user + 0% kernel / faults: 405 minor 730 major 1.3% 30890/kworker/u16:0-adb: 0% user + 1.3% kernel 1.1% 93/kswapd0: 0% user + 1.1% kernel 1.1% 972/android.hardware.audio.service: 0.1% user + 0.9% kernel 0.9% 390/logd: 0.1% user + 0.7% kernel / faults: 33 minor 0.9% 406/sugov:0: 0% user + 0.9% kernel 0% 2264/com.shannon.qualifiednetworksservice: 0% user + 0% kernel / faults: 546 minor 815 major 0.9% 2297/com.google.android.grilservice: 0.5% user + 0.3% kernel / faults: 395 minor 618 major 0% 2360/com.shannon.imsservice: 0% user + 0% kernel / faults: 499 minor 963 major 0.9% 24420/kworker/u17:1-mfc_core/butler: 0% user + 0.9% kernel 0.9% 26573/kworker/u16:7-events_unbound: 0% user + 0.9% kernel 0.7% 85/khugepaged: 0% user + 0.7% kernel 0.7% 1002/android.hardware.sensors@2.1-service.multihal: 0.1% user + 0.5% kernel 0% 2281/com.android.hbmsvmanager: 0% user + 0% kernel / faults: 379 minor 621 major 0% 2301/com.samsung.slsi.telephony.oem.oemrilhookservice: 0% user + 0% kernel / faults: 588 minor 888 major 0% 2328/com.android.se: 0% user + 0% kernel / faults: 393 minor 663 major 0.7% 2404/com.android.phone: 0.5% user + 0.1% kernel / faults: 573 minor 718 major 0% 3750/com.google.SSRestartDetector: 0% user + 0% kernel / faults: 391 minor 669 major 0.7% 5097/com.google.android.GoogleCamera: 0.1% user + 0.5% kernel / faults: 63 minor 0.7% 26479/logcat: 0.3% user + 0.3% kernel 0.5% 12/rcu_preempt: 0% user + 0.5% kernel 0.5% 407/sugov:4: 0% user + 0.5% kernel 0% 611/tombstoned: 0% user + 0% kernel / faults: 2 minor 5 major 0.5% 1234/dhd_rpm_state_t: 0% user + 0.5% kernel 0% 2335/com.shannon.rcsservice: 0% user + 0% kernel / faults: 415 minor 764 major 0% 2390/com.samsung.slsi.telephony.oemril: 0% user + 0% kernel / faults: 544 minor 831 major 0.3% 13/rcuog/0: 0% user + 0.3% kernel 0.3% 49/rcuog/4: 0% user + 0.3% kernel 0.3% 50/rcuop/4: 0% user + 0.3% kernel 0.3% 57/rcuop/5: 0% user + 0.3% kernel 0.3% 71/rcuop/7: 0% user + 0.3% kernel 0.3% 255/mali_jd_thread: 0% user + 0.3% kernel 0.3% 408/sugov:6: 0% user + 0.3% kernel 0.3% 458/surfaceflinger: 0% user + 0.3% kernel / faults: 31 minor 2 major E 0.3% 1152/mediaserver: 0% user + 0.3% kernel / faults: 119 minor 69 major 0% 2389/com.google.android.apps.cbrsnetworkmonitor: 0% user + 0% kernel / faults: 516 minor 761 major 0.3% 12660/irq/304-dwc3: 0% user + 0.3% kernel 0.3% 26251/kworker/5:2-memlat_wq: 0% user + 0.3% kernel 0.3% 26477/kworker/0:1-memlat_wq: 0% user + 0.3% kernel 0.3% 30609/screenrecord: 0.1% user + 0.1% kernel 0.1% 1/init: 0% user + 0.1% kernel / faults: 1 minor 0.1% 35/rcuop/2: 0% user + 0.1% kernel 0.1% 46/ksoftirqd/4: 0% user + 0.1% kernel 0.1% 64/rcuop/6: 0% user + 0.1% kernel 0.1% 240/irq/418-1c8d000: 0% user + 0.1% kernel 0.1% 248/decon0_kthread: 0% user + 0.1% kernel 0.1% 289/kworker/5:1H-kblockd: 0% user + 0.1% kernel 0% 442/keystore2: 0% user + 0% kernel / faults: 15 minor 11 major 0% 633/loop9: 0% user + 0% kernel 0% 682/loop27: 0% user + 0% kernel 0.1% 959/statsd: 0% user + 0.1% kernel / faults: 107 minor 25 major 0.1% 960/netd: 0% user + 0.1% kernel / faults: 41 minor 28 major 0.1% 1010/android.hardware.nfc-service.st: 0% user + 0.1% kernel 0.1% 1015/vendor.google.wifi_ext@1.0-service-vendor: 0% user + 0.1% kernel 0% 1110/drmserver: 0% user + 0% kernel / faults: 65 minor 70 major 0.1% 1130/cameraserver: 0% user + 0.1% kernel / faults: 79 minor 8 major 0.1% 1151/media.metrics: 0% user + 0.1% kernel / faults: 25 minor 11 major 0.1% 1156/wificond: 0% user + 0.1% kernel 0.1% 1194/aocd: 0% user + 0.1% kernel 0.1% 1674/android.hardware.thermal@2.0-service.pixel: 0% user + 0.1% kernel 0.1% 26421/kworker/u16:2-events_unbound: 0% user + 0.1% kernel 0.1% 26469/kworker/4:1-memlat_wq: 0% user + 0.1% kernel 0.1% 26488/process-tracker: 0.1% user + 0% kernel 0.1% 26527/kworker/u16:3-gpu-dvfs-control: 0% user + 0.1% kernel 0.1% 27695/kworker/3:2-memlat_wq: 0% user + 0.1% kernel 0.1% 27999/sport.mojo.android: 0.1% user + 0% kernel / faults: 10 minor 6 major 0.1% 28137/com.google.android.apps.docs.editors.docs: 0.1% user + 0% kernel / faults: 10 minor 0.1% 30590/kworker/1:1-memlat_wq: 0% user + 0.1% kernel 0.1% 30671/kworker/6:2-mm_percpu_wq: 0% user + 0.1% kernel 0.1% 30911/kworker/7:1-mm_percpu_wq: 0.1% user + 0% kernel +0% 30962/kworker/0:2-memlat_wq: 0% user + 0% kernel 16% TOTAL: 7.4% user + 7.4% kernel + 0.4% iowait + 0.6% irq + 0.4% softirq CPU usage from 63ms to 481ms later (2023-08-15 16:19:09.522 to 2023-08-15 16:19:09.939): 43% 1435/system_server: 11% user + 31% kernel / faults: 663 minor 40% 30924/AnrConsumer: 14% user + 25% kernel 12% 30639/com.amazon.ivs.broadcast: 8.5% user + 4.2% kernel / faults: 5 minor 4.2% 30700/st.audioMixer-0: 4.2% user + 0% kernel 2.4% 57/rcuop/5: 0% user + 2.4% kernel 2.5% 406/sugov:0: 0% user + 2.5% kernel 2.7% 1002/android.hardware.sensors@2.1-service.multihal: 0% user + 2.7% kernel 2.7% 1011/samsung.hardware.media.c2@1.0-service: 2.7% user + 0% kernel / faults: 1 minor 2.7% 30720/HwBinder:1011_7: 2.7% user + 0% kernel 2.7% 30727/HwBinder:1011_7: 2.7% user + 0% kernel 2.7% 30728/HwBinder:1011_7: 0% user + 2.7% kernel 2.8% 1211/adbd: 0% user + 2.8% kernel / faults: 257 minor 3.8% 26479/logcat: 3.8% user + 0% kernel 10% TOTAL: 3.3% user + 5.7% kernel + 0.3% iowait + 0.6% irq + 0.3% softirq D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0 D Amazon_IVS_Broadcast: #onAudioStats: peak: -100.0 rms: -100.0

mboulin commented 1 year ago

Thank you for reporting your issue and providing comprehensive details. We'll investigate on our end.

mboulin commented 1 year ago

After investigating, the error is likely coming form the SDK itself. This will be addressed in the next SDK release. For the time being, and if you are able to, you could switch to an earlier version of the SDK, until a new version is made available.

stephen-mojo commented 1 year ago

Thank you for your quick response!

Do you have a recommendation on how far back to downgrade to? I have seen this issue on v1.10.0 and v1.11.0.

mboulin commented 1 year ago

@stephen-mojo we've not seen the same error behavior with this demo when using 1.10.0, 1.90, and 1.8.0.

stephen-mojo commented 1 year ago

I am able to reproduce the issue in the IVS sample application using 1.10.0. I have a parallel ticket open with AWS support where I have provided logcat logs as well as screen recordings of the issue. If these would be helpful for you, let me know how I can send the data over to you.

I am also able to reproduce this issue in our own application when trying 1.9.0 as well as 1.8.0.

mboulin commented 6 months ago

Closing for now as you are already engaged with AWS support.