errlog causes crash on IOC exit

Reported by mdavidsaver on 2010-12-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
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.

Related branches

mdavidsaver (mdavidsaver) wrote :
Andrew Johnson (anj) on 2011-01-07
Changed in epics-base:
importance: Undecided → Medium
status: New → Fix Committed
Andrew Johnson (anj) on 2011-04-26
Changed in epics-base:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers