New issue
Advanced search Search tips

Issue 834148 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

CRAS: Audio thread is waken in a busy loop

Project Member Reported by cychiang@chromium.org, Apr 18 2018

Issue description

As 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.
 
timeout.log
476 KB View Download

Comment 1 by dgreid@chromium.org, Apr 18 2018

Looks like a timing bug to me. The calculated sleep time is zero.
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.

Comment 3 by dgreid@chromium.org, Apr 18 2018

Maybe it's two bugs? Both timing and a broken FD?
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!

Comment 5 by hychao@chromium.org, 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