google / oboe

Oboe is a C++ library that makes it easy to build high-performance audio apps on Android.
Apache License 2.0
3.68k stars 560 forks source link

when call oboe::AudioStreamBuilder openStream function,the system will be stuck #1202

Open myj420 opened 3 years ago

myj420 commented 3 years ago

Android version(s): android 11 Android device(s):Samsung galaxy s10+ SM-G9750 Oboe version:1.5 stable App name used for testing: (Please try to reproduce the issue using the OboeTester or an Oboe sample.)

Short description (Please only report one bug per Issue. Do not combine multiple bugs.) we are using the oboe 1.5-stable on the android 11, and when we open a stream with the API AAudio, the thread is stuck, but it not stuck when we use the API OpenSLES. We tried all samples of oboe, and they are in the same situation. After we reboot the device, it works correctly again. we print the stack information when stuck:

philburk commented 3 years ago

From the stack trace, it appears that the AAudio MMAP server is not responding to a Binder request to open a stream. The service is probably stuck in a deadlock. It is very important that we fix this. Thank you for reporting this.

Has the service gotten stuck like this more than once? Can you reproduce it?

It would be a very big help if you could capture a bugreport the next time it gets stuck. Hopefully very soon after the problem occurs before the logs get flushed. A bugreport file will have tombstones that we can use to identify the stuck service threads.

@myj420 - Please file a new bug here and attach the bugreport:

https://issuetracker.google.com/issues/new?component=898361&template=1458029

Then let me know the bug number. Do not attach a bugreport file to a public GitHub issue.

myj420 commented 3 years ago

thanks for your reply, it often sticks on this phone, but I couldn't find a way to reproduce it. I will capture a bugreport when it appears again

xzhan96 commented 1 year ago

@philburk I also met this issue in our product, using oboe latest release version. The stuck happens when calling oboe::AudioStreamBuilder.openStream(stream_), but I can't reproduce it, I often suggest our user restart the App, all things works well again.

Do you know how we can provide more information about the issue? such as some android log? we can request use export android log, but can't request user try special debug version.

xzhan96 commented 1 year ago

may the root cause is I am using SharingMode::Exclusive mode?

philburk commented 1 year ago

may the root cause is I am using SharingMode::Exclusive mode?

That should not cause a hang. There is not much we can do without a bugreport.