------------------------------------------------------------ revno: 13406 revision-id: rousskov@measurement-factory.com-20140509044554-qtglf409zzv9n997 parent: squidadm@squid-cache.org-20140509001430-ptlu3l7tgzc3dtkl committer: Alex Rousskov branch nick: trunk timestamp: Thu 2014-05-08 22:45:54 -0600 message: Temporary fix for segmentation faults in FwdState::serverClosed debugging. See r13404 for details. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: rousskov@measurement-factory.com-20140509044554-\ # qtglf409zzv9n997 # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 996ac44692b9ebfb9289923db18f174afa76ffd9 # timestamp: 2014-05-09 04:53:50 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squidadm@squid-cache.org-20140509001430-\ # ptlu3l7tgzc3dtkl # # Begin patch === modified file 'src/FwdState.cc' --- src/FwdState.cc 2014-05-08 22:43:01 +0000 +++ src/FwdState.cc 2014-05-09 04:45:54 +0000 @@ -619,9 +619,10 @@ void FwdState::serverClosed(int fd) { + // XXX: fd is often -1 here debugs(17, 2, "FD " << fd << " " << entry->url() << " after " << - fd_table[fd].pconn.uses << " requests"); - if (fd >= 0 && serverConnection()->fd == fd) // XXX: fd is often -1 here + (fd >= 0 ? fd_table[fd].pconn.uses : -1) << " requests"); + if (fd >= 0 && serverConnection()->fd == fd) fwdPconnPool->noteUses(fd_table[fd].pconn.uses); retryOrBail(); }