Hello, I got a deadlock while running through gdbserver, this is an implementation of a synchronized queue, Fup side waits via condition variable, main wants to push data, but main fails to acquire the mutex. The mutex is an errorchecking type, without priority inheritance, and not used elsewhere.
The task are as following: CPU PID CLASS TYPE PRI TIMEOUT STAT NAME 1 1686 rt cobalt 4 - Wt main 3 1690 rt cobalt 2 - Wt fup.medium main is stuck in this function int mutex_lock(struct mutex_data *pData) { pthread_t threadId = pthread_self(); // assert(pthread_equal(threadId, pData->m_LockId) == 0); -> int r = pthread_mutex_lock(&pData->m_Mutex); assert(r == 0); pData->m_LockId = threadId; return r; } In libcobalt: do ret = XENOMAI_SYSCALL1(sc_cobalt_mutex_lock, _mutex); while (ret == -EINTR); fup.medium is stuck in: int conditionvar_wait(struct conditionvar_data *pData, struct mutex_data *pMutex) { pthread_t sid = pthread_self(); assert(pthread_equal(sid, pMutex->m_LockId) != 0); pMutex->m_LockId = 0; -> int r = pthread_cond_wait(&pData->m_CondVar, &pMutex->m_Mutex); assert(r == 0); pMutex->m_LockId = sid; return r; } In libcobalt: while (err == -EINTR) err = XENOMAI_SYSCALL2(sc_cobalt_cond_wait_epilogue, _cnd, _mx); Mit besten Grüßen / Kind regards NORBERT LANGE AT-RD3 ANDRITZ HYDRO GmbH Eibesbrunnergasse 20 1120 Vienna / AUSTRIA p: +43 50805 56684 norbert.la...@andritz.com<mailto:norbert.la...@andritz.com> andritz.com<http://www.andritz.com/> ________________________________ This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system. ANDRITZ HYDRO GmbH Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation Firmensitz/ Registered seat: Wien Firmenbuchgericht/ Court of registry: Handelsgericht Wien Firmenbuchnummer/ Company registration: FN 61833 g DVR: 0605077 UID-Nr.: ATU14756806 Thank You ________________________________