[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: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 26 Nov 2010 17:37:09 +0100

On 26.11.2010 16:31, Joost-Jan van Klaveren 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.

http://code.google.com/p/tortoisesvn/source/detail?r=20545

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2685914
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-11-26 17:37:26 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.