Closed xlb767923274 closed 1 year ago
because of issue #1965 ,I temporarily modified AndroidSLESMediaPlayer::configureNewRequest()
=====》
stop(m_sourceId); //move stop to here, fix dead lock
std::lock_guard<std::mutex> requestLock{m_requestMutex};
{
// Use global lock to stop player and set new source id.
std::lock_guard<std::mutex> lock{m_operationMutex};
if (m_hasShutdown) {
return ERROR;
}
//stopLocked();
m_sourceId = g_id.fetch_add(1);
m_almostDone = false;
m_initialOffset = offset;
}
......
m_mediaQueue.reset(); // Delete old queue before configuring new one.
ACSDK_DEBUG9(LX(__func__).d("to", "FFmpegDecoder::create()")); // _position1_
And from the log positon1 haven't been print , so thread has blocked in m_mediaQueue.reset();
I guess there is still a deadlock problem here,But I don't know how to fix it, can you give me some suggestions before the next release version is released?
I know the problem, that is blocked at
AndroidSLESMediaPlayer::configureNewRequest
-> m_mediaQueue.reset();
-> AndroidSLESMediaQueue::~AndroidSLESMediaQueue()
-> m_executor.waitForSubmittedTasks();
configureNewRequest() will wait the old m_mediaQueue be destructed, but m_mediaQueue maybe blocked at AndroidSLESMediaQueue::fillBuffer() -> FFmpegDecoder::read() -> FFmpegDecoder::initialize() ->FFmpegUrlInputController::getCurrentFormatContext() ->avformat_open_input() // here maybe blocked by network because of don't set // "avFormatContext->interrupt_callback.callback"
Hello @xlb767923274.
Are you still experiencing this issue on the latest version of the SDK (3.0)?
I am closing this issue due to inactivity. If you have further questions, please open a new ticket and refer to this closed one.
IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.
1965
Briefly summarize your issue:
Repeatedly play music and joke, after a period of time, STATE_PROVIDER_TIMEDOUT error appears,and alexa can wake up no longer。
What is the expected behavior?
STATE_PROVIDER_TIMEDOUT does not appear, alexa can wake up
What behavior are you observing?
STATE_PROVIDER_TIMEDOUT error appears,and alexa can wake up no longer。
Provide the steps to reproduce the issue, if applicable:
Tell us about your environment:
What version of the AVS Device SDK are you using?
Tell us what hardware you're using:
Tell us about your OS (Type & version):
Logfile in debug9 ,The file is too big, I only kept the problematic part avs20210915-090300.log