From: Andrew Deason Date: Wed, 27 Apr 2011 21:24:46 +0000 (-0500) Subject: viced: Improve deleted client log messages X-Git-Tag: openafs-devel-1_7_1~520 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=047cc473037efa62fa7698878e055ca4665e85ef viced: Improve deleted client log messages Change the information logged related to deleted clients to be a little more useful. In particular this includes adding the client and host refcounts, to help see if the cause is a reference count leak. Change-Id: Iba156fb32a4838cdbd567ca4e55072337c63ba67 Reviewed-on: http://gerrit.openafs.org/4583 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/viced/host.c b/src/viced/host.c index b8006d9..37427ee 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -2574,12 +2574,15 @@ h_FindClient_r(struct rx_connection *tcon) client = oldClient; host = oldClient->host; } else { - ViceLog(0, ("FindClient: deleted client %p(%x) already had " - "conn %p (host %s:%d), stolen by client %p(%x)\n", - oldClient, oldClient->sid, tcon, - afs_inet_ntoa_r(rxr_HostOf(tcon), hoststr), - ntohs(rxr_PortOf(tcon)), - client, client->sid)); + ViceLog(0, ("FindClient: deleted client %p(%x ref %d host %p href " + "%d) already had conn %p (host %s:%d, cid %x), stolen " + "by client %p(%x, ref %d host %p href %d)\n", + oldClient, oldClient->sid, oldClient->refCount, + oldClient->host, oldClient->host->refCount, tcon, + afs_inet_ntoa_r(rxr_HostOf(tcon), hoststr), + ntohs(rxr_PortOf(tcon)), rxr_CidOf(tcon), + client, client->sid, client->refCount, + client->host, client->host->refCount)); /* rx_SetSpecific will be done immediately below */ } } @@ -2666,12 +2669,14 @@ GetClient(struct rx_connection *tcon, struct client **cp) return VICETOKENDEAD; } if (client->deleted) { - ViceLog(0, ("GetClient: got deleted client, this should not happen! " - "Connection will appear to have no rights; " - "tcon %p sid %d epoch %d client %p host %s:%d viceid %d\n", - tcon, (int)rxr_CidOf(tcon), (int)rxr_GetEpoch(tcon), client, + ViceLog(0, ("GetClient: got deleted client, connection will appear " + "anonymous; tcon %p cid %x client %p ref %d host %p " + "(%s:%d) href %d ViceId %d\n", + tcon, rxr_CidOf(tcon), client, client->refCount, + client->host, afs_inet_ntoa_r(client->host->host, hoststr), - (int)ntohs(client->host->port), (int)client->ViceId)); + (int)ntohs(client->host->port), client->host->refCount, + (int)client->ViceId)); } client->refCount++;