]> git.ipfire.org Git - thirdparty/squid.git/commit
Temporary fix for segmentation faults in FwdState::serverClosed.
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 8 May 2014 22:43:01 +0000 (16:43 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 8 May 2014 22:43:01 +0000 (16:43 -0600)
commit55bf37d57da1a9b6acf4e6be434cf5972ce2425d
tree27e8fc07afdf8fec4663597f6cadd808cbcd4040
parentb01023dc897895f203f0dca0a3f3006e541c9386
Temporary fix for segmentation faults in FwdState::serverClosed.

r13388 (cache_peer standby=N) moved noteUses() call from Comm to FwdState, to
avoid exposing Comm to pconn pools. Unfortunately, the closing handler does
not get a valid FD value when the closing callback shares the Connection
object with the code that called conn->close(). It gets -1. The FD of the
FwdState connection itself is already -1 at that point, for similar reasons.
The code thinks it got a matching FD and calls noteUses() with an invalid FD.

This temporary workaround prevents noteUses() calls when FD is unknown.
Without those calls, pconn usage statistics will be wrong. A different
long-term solution is needed.
src/FwdState.cc