crash on shutdown w/ 3.16.0.1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Fix Released
|
Medium
|
mdavidsaver |
Bug Description
Found an fixed crash on IOC shutdown caused by a combination of the new link support and unittesting changes in 3.16.01. dbCloseLinks() in iocInit.c was changed to do a partial cleanup of DB_LINKs. This frees the link private structs to avoid a leak, but doesn't break up the locksets as this would be a waste of time.
The fix is to restore the previous behavior and only cleanup CA_LINKs unless run in "isolated" (unittest) mode.
http://
The crash occurs (at least) within dbProcess() when the half disconnected DB_LINK is traversed.
> #0 0x00007ffff6c900e8 in dbLockSetAddrTrace (precord=0x6e0d90) at ../../.
> #1 0x00007ffff6c90eff in dbProcess (precord=0x6e0d90) at ../../.
> #2 0x00007ffff6c90e7b in dbScanPassive (pfrom=0x6af7f0, pto=0x6e0d90) at ../../.
> #3 0x00007ffff6ca25a5 in dbDbScanFwdLink (plink=0x6af9f8) at ../../.
> #4 0x00007ffff6ca2d99 in dbScanFwdLink (plink=0x6af9f8) at ../../.
> #5 0x00007ffff6cb000e in recGblFwdLink (precord=0x6af7f0) at ../../.
> #6 0x00007ffff6f1ae2a in process (prec=0x6af7f0) at ../../.
...
> #13 0x00007ffff6cb4361 in dbCaTask (arg=0x0) at ../../.
...
When this happens, the main thread is in dbCloseLinks().
...
> #5 0x00007ffff679f59e in epicsMutexLock (pmutexNode=
> #6 0x00007ffff6c8e4f7 in dbScanLock (precord=0x6b00d0) at ../../.
> #7 0x00007ffff6cd2056 in doCloseLinks (pdbRecordType=
at ../../.
> #8 0x00007ffff6cd1b25 in iterateRecords (func=0x7ffff6c
at ../../.
> #9 0x00007ffff6cd223c in iocShutdown () at ../../.
> #10 0x00007ffff6cd22ce in exitDatabase (dummy=0x0) at ../../.
> #11 0x00007ffff6799882 in epicsExitCallAt
> #12 0x00007ffff6799948 in epicsExitCallAt
> #13 0x00007ffff6799b8c in epicsExit (status=0) at ../../.
> #14 0x00000000004044d7 in main (argc=0, argv=0x7fffffff
Related branches
Changed in epics-base: | |
status: | Fix Committed → Fix Released |