iocLogClient does not unregister its errlog listener

Bug #1392634 reported by Ralph Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Fix Released
High
Ralph Lange

Bug Description

Line numbers as of 3.15.0.2:

iocLog registers a listener with the errlog facility (line 94 of iocLog.c), but never unregisters. Called as an exit hook, logClientDestroy() destroys the client mutex (line 157 of logClient.c), while the client is still registered as a listener with errlog.

This can lead to situations where the errlog thread, trying to send a message to a client, finds the client mutex being gone.

A call to 'assert(status == epicsMutexLockOK)'
    by thread 'errlog' failed in ../../../src/libCom/log/logClient.c line 241.
Dumping a stack trace of thread 'errlog':
[ 0x7f14388c8363]: /opt/codac-5.0/epics/base/lib/linux-x86_64/libCom.so.3.15(epicsStackTrace+0x73)
[ 0x7f14388c24ed]: /opt/codac-5.0/epics/base/lib/linux-x86_64/libCom.so.3.15(epicsAssert+0x4d)
[ 0x7f14388b6a1a]: /opt/codac-5.0/epics/base/lib/linux-x86_64/libCom.so.3.15(logClientSend+0x9a)
[ 0x7f14388ae3da]: /opt/codac-5.0/epics/base/lib/linux-x86_64/libCom.so.3.15(errlogGetSevEnumString+0x24a)
[ 0x7f14388c3b24]: /opt/codac-5.0/epics/base/lib/linux-x86_64/libCom.so.3.15(epicsThreadSuspendSelf+0x174)
[ 0x38186079d1]: /lib64/libpthread.so.0(<no symbol information>)
[ 0x3817ee8b5d]: /lib64/libc.so.6(clone+0x6d)
EPICS Release EPICS R3.15.0.2 $$Date$$.
Local time is 2014-11-12 09:55:17.723897076 UTC
Please E-mail this message to the author or to <email address hidden>
Calling epicsThreadSuspendSelf()

Tags: libcom ioclog
Changed in epics-base:
status: New → Fix Committed
importance: Undecided → High
milestone: none → 3.15.1
tags: added: ioclog libcom
removed: errlog
Andrew Johnson (anj)
Changed in epics-base:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.