CRAS: Audio thread is waken in a busy loop |
|
Issue descriptionAs in the attached audio thread log, audio thread was waken by client (maybe, since it shows num_fds:1 ). The consequence is client can not close the stream because it can not connect to server. This happens when I was running stress test of assistant app. But the repro rate is very small. I hit this once out of 1000 iterations.
,
Apr 18 2018
Yes I thought about the same thing. But in my memory, when audio thread is waken by the timer, it should be num_fds:0. In the log it shows num_fds:1. That is weird.
,
Apr 18 2018
Maybe it's two bugs? Both timing and a broken FD?
,
Apr 18 2018
Yes that is possible. I think you are right. If time to sleep is 0, that is definitely a bug by itself. num_fds being 1 repeatedly is another issue. Thanks for the suggestion!
,
Apr 18 2018
when audio thread sees non-zero num_fds, handle_playback_thread_message() will read, parse, and execute the command. It seems like audio_thread_read_command() throws error so that nothing was logged to AUDIO_THREAD_PB_MSG. https://chromium.googlesource.com/chromiumos/third_party/adhd/+/master/cras/src/server/audio_thread.c#549 |
|
►
Sign in to add a comment |
|
Comment 1 by dgreid@chromium.org
, Apr 18 2018