Assigned
Status Update
Comments
vi...@google.com <vi...@google.com> #2
Thank you for reporting this issue. Please upload the AOSP patch following this guidance
vi...@google.com <vi...@google.com> #3
Add IMS and XCAP APNs for Almadar Carrier ID 2006 MCC606 MNC01
Change-Id: I9594ce3d2276127d2a585b9c630b672c857bede7
Change-Id: I9594ce3d2276127d2a585b9c630b672c857bede7
ji...@nxp.com <ji...@nxp.com> #4
We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
ji...@nxp.com <ji...@nxp.com> #5
I also noticed from the perfetto UI that the problematic sys_futex uses "141" as the op value (FUTEX_LOCK_PI2 | FUTEX_PRIVATE_FLAG), while others uses "137" (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG).
Description
Below CTS case fails with audio overrun logs.
"AudioFlinger: overrun on read from pipe, retry #1"
run cts -m CtsMediaRecorderTestCases -t android.media.recorder.cts.MediaRecorderTest#testSetMaxDuration
[1/1] 7b7a9e56bb8f449e android.media.recorder.cts.MediaRecorderTest#testSetMaxDuration FAILURE: java.lang.Asserti
onError: timed out waiting for MEDIA_RECORDER_INFO_MAX_DURATION_REACHED
at org.junit.Assert.fail(Assert.java:89)
at android.media.recorder.cts.MediaRecorderTest.testSetMaxDuration(MediaRecorderTest.java:810)
at android.media.recorder.cts.MediaRecorderTest.testSetMaxDuration(MediaRecorderTest.java:798)
Then I added some debug logs in audioflinger, it shows that sometimes the "mWaitWorkCV.wait_for" takes very long time to return, causing this overrun.
Changes in audioflinger/Threads.cpp
+ ALOGW("RecordThread: before sleep %u", sleepUs);
(void)mWaitWorkCV.wait_for(_l, std::chrono::microseconds(sleepUs));
+ ALOGW("RecordThread: after sleep %u", sleepUs);
Logcat:
01-14 23:45:14.042 495 4310 W AudioFlinger: RecordThread: before sleep 30875
01-14 23:45:14.073 495 4310 W AudioFlinger: RecordThread: after sleep 30875
01-14 23:45:14.073 495 4310 W AudioFlinger: before read #0 256
01-14 23:45:14.073 495 4310 W AudioFlinger: after read #0 256
01-14 23:45:14.073 495 4310 W AudioFlinger: mPipeFramesP2:1024 mRsmpInFramesP2:512 sleepFrames:255 availableToRead:513
01-14 23:45:14.073 495 4310 W AudioFlinger: RecordThread: before sleep 31875
[ --------------- here it takes 670ms to wake up, then overrun happens ----------------------]
01-14 23:45:14.749 495 4310 W AudioFlinger: RecordThread: after sleep 31875
01-14 23:45:14.750 495 4310 W AudioFlinger: before read #0 256
01-14 23:45:14.750 495 4310 W AudioFlinger: after read #0 18446744071562068225
01-14 23:45:14.750 495 4310 W AudioFlinger: overrun on read from pipe, retry #1
01-14 23:45:14.750 495 4310 W AudioFlinger: before read #1 256
01-14 23:45:14.750 495 4310 W AudioFlinger: after read #1 256
I also got a trace file to check on perfetto, it shows that
there is a sys_futex with 141 as the second argument when the overrun happens. Seems like the thread is blocked on mutex.
Related logcat and perfetto trace file are attached.
For logcat, search "overrun" to find the issue.
On perfetto, focus on "audioserver 495" "AudioIn_3E 4310".