The client libs receive thread last chance except handler should cause abort shutdown

Bug #541389 reported by Jeff Hill
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Fix Released
Medium
Jeff Hill

Bug Description

I am looking at line 594 in tcpiiu.cpp and wondering if initiateAbortShutdown should be called when an unexpected exception arrives.

Original Mantis Bug: mantis-366
    http://www.aps.anl.gov/epics/mantis/view_bug_page.php?f_id=366

Tags: ca 3.14
Revision history for this message
Jeff Hill (johill-lanl) wrote :

committed a fix

cvs diff -wb -- tcpiiu.cpp (in directory C:\hill\epics\base\src\ca\)
Index: tcpiiu.cpp
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/ca/tcpiiu.cpp,v
retrieving revision 1.154.2.48
diff -u -b -w -b -r1.154.2.48 tcpiiu.cpp
--- tcpiiu.cpp 14 Aug 2009 17:31:34 -0000 1.154.2.48
+++ tcpiiu.cpp 11 Sep 2009 00:44:25 -0000
@@ -582,17 +582,23 @@
             "CA client library tcp receive thread "
             "terminating due to no space in pool "
             "C++ exception\n" );
+ epicsGuard < epicsMutex > guard ( this->iiu.mutex );
+ this->iiu.initiateCleanShutdown ( guard );
     }
     catch ( std::exception & except ) {
         errlogPrintf (
             "CA client library tcp receive thread "
             "terminating due to C++ exception "%s"\n",
             except.what () );
+ epicsGuard < epicsMutex > guard ( this->iiu.mutex );
+ this->iiu.initiateCleanShutdown ( guard );
     }
     catch ( ... ) {
         errlogPrintf (
             "CA client library tcp receive thread "
- "terminating due to a C++ exception\n" );
+ "terminating due to a non-standard C++ exception\n" );
+ epicsGuard < epicsMutex > guard ( this->iiu.mutex );
+ this->iiu.initiateCleanShutdown ( guard );
     }
 }

Revision history for this message
Jeff Hill (johill-lanl) wrote :

seems to work after some limited testing throwing an artificial exception

Revision history for this message
mdavidsaver (mdavidsaver) wrote :

Looks like this change was in 3.14.11.

Changed in epics-base:
status: In Progress → 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.