Channel access client deadlock in tcpRecvThread
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Won't Fix
|
Low
|
Jeff Hill |
Bug Description
In a multi-threaded application I get a deadlock situation with epics CA library
I could extract the following stack trace showing where the lock occur:
=======
Thread 37 (Thread 0xaa4dbb90 (LWP 4604)):
#0 0x00bc6422 in __kernel_vsyscall ()
#1 0x002280b9 in __lll_lock_wait () from /lib/libpthread
#2 0x00223864 in _L_lock_824 () from /lib/libpthread
#3 0x0022371d in pthread_mutex_lock () from /lib/libpthread
#4 0x0071eca6 in pthread_mutex_lock () from /lib/libc.so.6
#5 0x048f4746 in epicsMutexOsdLock (pmutex=0x88b0668) at ../../.
#6 0x048ec700 in epicsMutexLock (pmutexNode=
#7 0x048ece1f in epicsMutex::lock (this=0x88f0b9c) at ../../.
#8 0x0560df9c in tcpRecvThread::run (this=0x89388dc) at ../../.
#9 0x048ec50a in epicsThreadCall
#10 0x048f360b in start_routine (arg=0x88f6f20) at ../../.
#11 0x0022149b in start_thread () from /lib/libpthread
#12 0x0071242e in clone () from /lib/libc.so.6
=======
Just messages in the stderr with logs in DEBUG:
=======
CAS Response: cmd=0 id=0 typ=0 cnt=11 psz=0 avail=0 outBuf ptr=0x9b822b8
Socket outgoing: 16 byte socket: 0000001C status: 16
Socket incoming: 16 byte socket: 0000002A
CAS outgoing: 16 byte reply to 152.81.45.163:56305
CAS Response: cmd=22 id=1 typ=0 cnt=0 psz=0 avail=3 outBuf ptr=0x9b822b8
CAS Response: cmd=18 id=1 typ=4 cnt=2008 psz=0 avail=1 outBuf ptr=0x9b822c8
Socket outgoing: 32 byte socket: 0000001C status: 32 <========= This is never received by CA
CAS outgoing: 32 byte reply to 152.81.45.163:56305
CAS Response: cmd=1 id=1 typ=19 cnt=1 psz=16 avail=1e outBuf ptr=0x9b922b8
CAS Response: cmd=1 id=1 typ=19 cnt=1 psz=16 avail=26 outBuf ptr=0x9b922d8
CAS Response: cmd=1 id=1 typ=19 cnt=1 psz=16 avail=1e outBuf ptr=0x9b922f8
CAS Response: cmd=1 id=1 typ=19 cnt=1 psz=16 avail=20 outBuf ptr=0x9b92318
CAS Response: cmd=1 id=1 typ=19 cnt=1 psz=16 avail=26 outBuf ptr=0x9b8a2b8
CAS Response: cmd=1 id=1 typ=19 cnt=1 psz=16 avail=102 outBuf ptr=0x9b8a2d8
CAS Response: cmd=1 id=1 typ=19 cnt=1 psz=16 avail=29 outBuf ptr=0x9b8a2f8
CAS Response: cmd=1 id=1 typ=19 cnt=1 psz=16 avail=105 outBuf ptr=0x9b8a318
CAS Response: cmd=1 id=1 typ=20 cnt=1 psz=24 avail=2f outBuf ptr=0x9b8a338
CAS Response: cmd=1 id=1 typ=20 cnt=1 psz=24 avail=10b outBuf ptr=0x9b8a360
CAS Response: cmd=1 id=1 typ=19 cnt=1 psz=16 avail=26 outBuf ptr=0x9b8a388
CAS Response: cmd=1 id=1 typ=19 cnt=1 psz=16 avail=102 outBuf ptr=0x9b8a3a8
CAS Response: cmd=1 id=1 typ=19 cnt=1 psz=16 avail=23 outBuf ptr=0x9b8a3c8
CAS Response: cmd=1 id=1 typ=0 cnt=1 psz=16 avail=e7 outBuf ptr=0x9b8a3e8
Socket outgoing: 336 byte socket: 0000001B status: 336
Socket incoming: 336 byte socket: 000000A2
=======
visibility: | public → private |
visibility: | private → public |
Changed in epics-base: | |
importance: | Undecided → Low |
Please indicate which version of EPICS Base you were using, which target architecture for both the CA client and server, which server (was it an IOC or a CAS tool such as the PV Gateway) and tell us more about the client program.