errlog causes crash on IOC exit

Bug #693534 reported by mdavidsaver
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Fix Released
Medium
Unassigned

Bug Description

I ran into a case were errlogPrintf() is getting called after the errlog exit handler has run. This handler frees resources and sets a flag (AtExit) when this happens, but errlogPrintf() is ignoring the flag. This results in an attempt to lock a mutex which has been destroyed. Since it is using epicsMutexMustLock() a failure to lock results in an epicsAssert() failure, which calls errlogPrintf()... Which recurses until it overflows the stack.

Solution is to return before the call to msgbufGetFree(). Patch attached.

Revision history for this message
mdavidsaver (mdavidsaver) wrote :
Andrew Johnson (anj)
Changed in epics-base:
importance: Undecided → Medium
status: New → Fix Committed
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.