[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: event handle leak in TortoiseSVN.dll

From: Simon Large <simon.tortoisesvn_at_gmail.com>
Date: Thu, 25 Nov 2010 20:05:33 +0000

On 25 November 2010 13:57, Joost-Jan van Klaveren <info_at_elwave.com> wrote:

There's a gradual increase in Handles (Windows Task Manager) for
explorer.exe noticable, related to how frequent a working copy is
browsed/accessed through Windows Explorer. Over time this runs well
into thousands (some 33000, a limit seems to get reached).
I've tracked these handles down to being unnamed kernel event objects
using ProcessExplorer(SysInternals) and NTObjects (Russell Osterlund,
www.smidgeonsoft.com).

Further debugging revealed the objects getting created at line 117 of
src\TortoiseShell\RemoteCacheLink.cpp
(http://code.google.com/p/tortoisesvn/source/browse/trunk/src/TortoiseShell/RemoteCacheLink.cpp?r=20529)
m_hEvent gets reassigned without first checking for NULL or
INVALID_HANDLE_VALUE.
I thought of two solutions, either closing the previous handle or not
reassigning when already assigned a proper value. Not knowing the
exact impact of closing a handle that may already be in use I tried
the latter fix (why else make m_hEvent a member with only local use in
CRemoteCacheLink::GetStatusFromRemoteCache? seems also more in line
with how m_hPipe is created/destroyed). This at least keeps the number
of system handles down but not knowing the full impact (specifically,
m_hEvent 'handed' to overlapped IO and seeing as this is supposed to
handle exceptional cases like crashes) I hesitate to submit this as
solution.

Kind regards,

Joost-Jan van Klaveren

--
Prognosis Software Development
Phone: +31.15.2123543    Fax: +31.15.2132558
email: info_at_elwave.com
internet: http://www.elwave.com
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2685712
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-11-25 21:05:50 CET

This is an archived mail posted to the TortoiseSVN Users mailing list.