From: Rainer Toebbicke Date: Thu, 15 May 2003 16:51:59 +0000 (+0000) Subject: STABLE12-viced-shutdown-avoid-deadlock-20030424 X-Git-Tag: openafs-stable-1_2_10~71 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=83c67b1f9b2bcf5baa2f85fda14999605c4ccc1e;p=packages%2Fo%2Fopenafs.git STABLE12-viced-shutdown-avoid-deadlock-20030424 don't deadlock on H_LOCK if we need to shut down in an emergency (cherry picked from commit 05be212fea360747dbe5a9681ca81459b3d6ac62) --- diff --git a/src/viced/callback.c b/src/viced/callback.c index 9538686d8..be5561a1d 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -442,7 +442,7 @@ static CDel(cb) assert(0); ViceLog(0,("CDel: Internal Error -- shutting down: wanted %d from %d, now at %d\n",cbi,fe->firstcb,*cbp)); DumpCallBackState(); - ShutDown(); + ShutDownAndCore(PANIC); } } CDelPtr(fe, cbp); @@ -492,7 +492,7 @@ static u_short *FindCBPtr(fe, host) if (safety > cbstuff.nblks) { ViceLog(0,("FindCBPtr: Internal Error -- shutting down.\n")); DumpCallBackState(); - ShutDown(); + ShutDownAndCore(PANIC); } cb = itocb(*cbp); if (cb->hhead == hostindex) @@ -695,7 +695,7 @@ AddCallBack1_r(host, fid, thead, type, locked) if (safety > cbstuff.nblks) { ViceLog(0,("AddCallBack1: Internal Error -- shutting down.\n")); DumpCallBackState(); - ShutDown(); + ShutDownAndCore(PANIC); } if (cb->hhead == h_htoi(host)) break; @@ -1361,7 +1361,7 @@ CleanupTimedOutCallBacks_r() if (ntimedout > cbstuff.nblks) { ViceLog(0,("CCB: Internal Error -- shutting down...\n")); DumpCallBackState(); - ShutDown(); + ShutDownAndCore(PANIC); } } while (cbi != *thead); *thead = 0; diff --git a/src/viced/viced.c b/src/viced/viced.c index a619631dd..19e6349dc 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -898,7 +898,7 @@ int dopanic; } #endif DFlush(); - PrintCounters(); + if (!dopanic) PrintCounters(); /* do not allows new reqests to be served from now on, all new requests are returned with an error code of RX_RESTARTING ( transient failure ) */