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

Re: TSCNCache.exe goes into infinite loop

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 04 Jul 2014 17:39:09 +0200

On 04.07.2014 16:32, ROUET, Jean Michel wrote:
> Dear all,
>
> I recently observed that TSVNCache.exe was eating up 100% of a single
> core on my machine. This does not always happen, but when it starts it
> is very frustrating because it never stops…
>
> I downloaded a recent nightly-build version (TortoiseSVN 1.8.7, Build
> 25627 - 64 Bit -dev, 2014/06/30 07:45:56) and the corresponding PDB
> files for debugging.
>
> I found out that CDirectoryWatcher::WorkerThread() function loops onto a
> …/…/.svn/wc.db databasefile (either the main topdir one, or one of the
> externals of the project)
>
> The TSCNCacheWindow constantly shows:
>
> …
>
> Crawling folder: <SOMEPATH>\subPath1
>
> Invalidating and refreshing folder: <SOMEPATH>
>
> Crawling folder: <SOMEPATH>\subPath2
>
> Invalidating and refreshing folder: <SOMEPATH>
>
> Crawling folder: <SOMEPATH>\subPath3
>
> Invalidating and refreshing folder: <SOMEPATH>
>
> Crawling folder: <SOMEPATH>\subPath1
>
> Invalidating and refreshing folder: <SOMEPATH>
>
> Crawling folder: <SOMEPATH>\subPath2
>
> Invalidating and refreshing folder: <SOMEPATH>
>
> Crawling folder: <SOMEPATH>\subPath3
>
> Invalidating and refreshing folder: <SOMEPATH>
>
> …
>
> And in CDirectoryWatcher::WorkerThread(), the following lines (around
> line 477):
>
> CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) L": change
> notification for %s\n", buf);
>
> notifyPaths.push_back(CTSVNPath(buf));
>
> constantly repeats itself with buf being “<SOMEPAT>\.svn\wc.db”
>
> then this path is always added to m_FolderCrawler:
>
> m_FolderCrawler->AddPathForUpdate(…);
>
> I also checked with SysInternals’ Process Monitor that only
> TSVNCache.exe accesses the file. So no interference with AntiVirus or
> other backup software.
>
> …
>
> 16:13:23.2511028 TSVNCache.exe
> QueryStandardInformationFile
> C:\Project\.svn\wc.db SUCCESS AllocationSize: 155,648,
> EndOfFile: 152,576, NumberOfLinks: 1, DeletePending: False, Directory: False
>
> 16:13:23.2511218 TSVNCache.exe ReadFile
>
> C:\Project\.svn\wc.db SUCCESS Offset: 19,456, Length: 1,024
>
> 16:13:23.2511400 TSVNCache.exe ReadFile
>
> C:\Project\.svn\wc.db SUCCESS Offset: 140,288, Length: 1,024
>
> 16:13:23.2511581 TSVNCache.exe ReadFile
>
> C:\Project\.svn\wc.db SUCCESS Offset: 18,432, Length: 1,024
>
> 16:13:23.2511734 TSVNCache.exe ReadFile
>
> C:\Project\.svn\wc.db SUCCESS Offset: 120,832, Length: 1,024
>
> 16:13:23.2511897 TSVNCache.exe ReadFile
>
> C:\Project\.svn\wc.db SUCCESS Offset: 13,312, Length: 1,024
>
> 16:13:23.2512349 TSVNCache.exe ReadFile
>
> C:\Project\.svn\wc.db SUCCESS Offset: 9,216, Length: 1,024
>
> 16:13:23.2512763 TSVNCache.exe ReadFile
>
> C:\Project\.svn\wc.db SUCCESS Offset: 1,024, Length: 1,024
>
> 16:13:23.2513298 TSVNCache.exe ReadFile
>
> C:\Project\.svn\wc.db SUCCESS Offset: 17,408, Length: 1,024
>
> 16:13:23.2513574 TSVNCache.exe UnlockFileSingle
> C:\Project\.svn\wc.db
> SUCCESS Offset: 1,073,741,826, Length: 510
>
> 16:13:23.2514241 TSVNCache.exe LockFile
> C:\Project\.svn\wc.db
> SUCCESS Exclusive: True, Offset: 1,073,741,824, Length: 1, Fail
> Immediately: True
>
> 16:13:23.2514382 TSVNCache.exe LockFile
>
> C:\Project\.svn\wc.db SUCCESS Exclusive: False, Offset:
> 1,073,741,826, Length: 510, Fail Immediately: True
>
> 16:13:23.2514508 TSVNCache.exe UnlockFileSingle
> C:\Project\.svn\wc.db
> SUCCESS Offset: 1,073,741,824, Length: 1
>
> 16:13:23.2515682 TSVNCache.exe
> QueryStandardInformationFile
> C:\Project\.svn\wc.db SUCCESS AllocationSize: 155,648,
> EndOfFile: 152,576, NumberOfLinks: 1, DeletePending: False, Directory: False
>
> 16:13:23.2515820 TSVNCache.exe ReadFile
>
> C:\Project\.svn\wc.db SUCCESS Offset: 24, Length: 16
>
> 16:13:23.2515971 TSVNCache.exe
> QueryStandardInformationFile
> C:\Project\.svn\wc.db SUCCESS AllocationSize: 155,648,
> EndOfFile: 152,576, NumberOfLinks: 1, DeletePending: False, Directory: False
>
> 16:13:23.2517525 TSVNCache.exe
> QueryStandardInformationFile
> C:\Project\.svn\wc.db SUCCESS AllocationSize: 155,648,
> EndOfFile: 152,576, NumberOfLinks: 1, DeletePending: False, Directory: False
>
> 16:13:23.2517712 TSVNCache.exe ReadFile
>
> C:\Project\.svn\wc.db SUCCESS Offset: 32,768, Length: 1,024
>
> 16:13:23.2517927 TSVNCache.exe UnlockFileSingle
> C:\Project\.svn\wc.db
> SUCCESS Offset: 1,073,741,826, Length: 510
>
> 16:13:23.2522925 TSVNCache.exe LockFile
>
> C:\Project\.svn\wc.db SUCCESS Exclusive: True, Offset:
> 1,073,741,824, Length: 1, Fail Immediately: True
>
> 16:13:23.2523079 TSVNCache.exe LockFile
>
> C:\Project\.svn\wc.db SUCCESS Exclusive: False, Offset:
> 1,073,741,826, Length: 510, Fail Immediately: True
>
> …
>
> I think there is some race condition during which TSCNCache asks for the
> status of some files, which raise a FileModified (or equivalent) event
> on the working copy database (wc.db), which in turn triggers the
> CDirectoryWatcher::WorkerThread(), but for some mysterious reason keeps
> from asking the status of wc.db
>
> I am not sure, but shouldn’t CDirectoryWatcher::WorkerThread() ignore
> changes on the sqlite file (wc.db) ???

Reading the status should not modify the db at all (it's a read
operation!). If it does, then your working copy might be corrupt and a
fresh checkout might be a good idea. At least, run a cleanup and see if
that fixes the problem.

And no: the cache must not ignore change notifications for the wc db
because if you run a commit, that db is the only thing that changes but
the status of all committed files changes from 'modified' to 'normal'.
That's why the cache must react to changes in the wc db file.

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=3084542
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2014-07-04 17:38:56 CEST

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.