-
Type:
Bug
-
Resolution: Obsolete
-
Priority:
Low
-
None
-
Affects Version/s: 1.5.0, 1.4.1, 1.5.1, 1.5.2
-
Component/s: Mercurial
-
None
-
Environment:
Windows 8.1 SourceTree with Mercurial hosted on KilnHg.com. Typically have several c++ repositories open in tabs.
Version 1.5.2.0
Just having SourceTree open results in thrashing sometimes several times a second of the users hard disk.
A temp file is created with an apparent cookie in order to connect to mercurial. This file is then deleted and a new one created over and over again 24/7 as long as SourceTree is open.
At one point the files were failing to get deleted and I had thousands of them.
The contents of the temp file are like this:
- Netscape HTTP Cookie File
- http://www.netscape.com/newsref/std/cookie_spec.html
- This is a generated file! Do not edit.
company.kilnhg.com FALSE / FALSE fSetNewFogBugzAuthCookie 1
company.kilnhg.com FALSE / FALSE fbToken 01a2b3c4defgh05ijklm6789nopqrs
In addition, there were periodic files with nothing in them:
hg-bundle-dqzslc.hg
The path in question is:
%userprofile%\AppData\Local\Temp
The files are being created in the root.
I ran Process Monitor to see what is creating this:
4:07:16.8791615 PM hg.exe 3004 CreateFile C:\Users\KALBRIGHT\AppData\Local\Temp\tmppsz4zf SUCCESS Desired Access: Generic Read/Write, Disposition: Create, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: 0, OpenResult: Created
4:07:16.8794614 PM hg.exe 3004 QueryInformationVolume C:\Users\KALBRIGHT\AppData\Local\Temp\tmppsz4zf BUFFER OVERFLOW VolumeCreationTime: 10/1/2012 3:57:33 PM, VolumeSerialNumber: 7000-64BD, SupportsObjects: True, VolumeLabel: Winē
4:07:16.8795009 PM hg.exe 3004 QueryAllInformationFile C:\Users\KALBRIGHT\AppData\Local\Temp\tmppsz4zf BUFFER OVERFLOW CreationTime: 4/30/2014 4:07:16 PM, LastAccessTime: 4/30/2014 4:07:16 PM, LastWriteTime: 4/30/2014 4:07:16 PM, ChangeTime: 4/30/2014 4:07:16 PM, FileAttributes: A, AllocationSize: 0, EndOfFile: 0, NumberOfLinks: 1, DeletePending: False, Directory: False, IndexNumber: 0x34c0000000016c0, EaSize: 0, Access: Generic Read/Write, Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word
If I close SourceTree, there's no longer an hg.exe process running to create these temp files.
Surely there's a better way to save off the authentication rather than redoing it over and over possibly prematurely wearing out hard drives in the process.
[Update]: added .csv log file from SysInternals ProcMon showing the flurry of file activity from hg.exe (spawned by SourceTree). Over the span of 3 1/2 minutes, there are 474,486 events! Not just the temp files but there is a very frequent read of library.zip. If I close SourceTree, there is NO activity appearing in ProcMon. (I'm filtering on Process hg.exe)