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

TSCNCache.exe goes into infinite loop

From: ROUET, Jean Michel <jean-michel.rouet_at_philips.com>
Date: Fri, 4 Jul 2014 14:32:46 +0000

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) ???
Does it make sense ?

Kind regards,
Jean-Michel

________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3084541

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