BUG REPORT: Eraser doesnt follow NTFS junctions

bb123

New Member
I tried to post it in Trac, but it wouldn't let me, said it was spam.
--
BUG: Eraser doesn't work with paths that include an NTFS junction.

Steps to reproduce:
1. Put files to delete in D:\todelete\somefolder
2. Use mklink to create a junction from C:
mklink /j c:\todelete d:\todelete
3. Go to c:\todelete in Windows Explorer. Right click somefolder and send it to eraser.

Result: completed with errors
Expected: no error

Same happens when junction is on the same drive.

Note that the somefolder folder is not a junction. It's a normal folder whose path includes a junction.
 
I find all discussion of the file/folder linking types in NTFS confusing, but I don't think this is a bug. Given that junctions fall within the general category of reparse points, the following excerpt from the Eraser manual appears to cover the case:
Reparse points referring to folders are completely ignored as the folder can be accessed by another path and it may not be the intent of the user to erase that folder as well ... when erasing folders, files and subfolders which are reparse points are ignored so as to prevent data loss. To erase such files, specifically tell Eraser to erase the file the reparse point refers to.

As regards Trac, do you have a login, and did it work successfully? I have been able to post to my Trac account since the recent server migration, but it would be surprising if that had not created some user issues.

David
 
I think you need to post the contents of the Task Log. I have a feeling it's because your junction is in the root of the C: drive, which prevents normal users from touching it.
 
I tried to do this at drive D but it still getting the same thing. Are there any workaround?
 
To repeat Joel's questions; is the folder at the root of the drive, and can you post the contents of the Task log? To do the latter (it is perhaps not obvious)
  • start your forum post;
  • open the Eraser Task List, right-click the task in question,and select 'View Task Log';
  • click on the first line of the log, then press Shift+Ctrl+End to select all the lines;
  • right click on a line and select 'Copy Selected Entries';
  • click where wanted in the forum post and press Ctrl+V to paste the entries into your post.

David
 
Because it's at the root of the drive, you probably need to run Eraser as an administrator.

See the FAQ forum for details (it's the 2nd or 3rd topic from the top)
 
hi,

thanks for the copypaste crash course :D Task log contains only a single line:

Session: 2012. március 16. 2:54:34
2012. március 16. 2:54:34 Error Value does not fall within the expected range.

My account has admin privileges, and UAC is turned off. I can access any file anywhere. Besides, as I have said already, the bug happens anywhere, not just in C root.

Do this from a command prompt: (edit: from any directory or drive root)
md notroot\todelete\somefolder
mklink /j notroot\todelete_junction notroot\todelete

Now go to notroot\todelete_junction in Windows Explorer, and try sending somefolder to Eraser. It won't work.
 
Its an odd error that doesn't immediately suggest account privileges issues to me. But you never know.

As you are clearly an experienced user, you could try looking at the Windows Event Viwer. Joel generally uses the messages generated by .NET to trace back any error. It is straightforward to copy and paste these particular messages :)

Also, as you have UAC turned off, you must be using Windows 7 or Vista. That means that your account may have admin privileges but they need to be explicitly invoked on a 'per application' basis. Use the link in my signature to go to the FAQ; in the 'Getting to know Eraser 6' post, you will find a section on running Eraser as Administrator. It's easy, but it's not obvious ... :wink:

It is probably useful for you at least to try running as Admin, just to eliminate that issue. It may be that Joel will need to think some more about this one.

David
 
Since i am an experienced user, I am pretty certain it has nothing to do with access rights. It works in any directory. Have you tried reproducing my bug?
 
I agree with you.

I tried this on my main machine where I am using a rather old 6.1 build (2284), which pre-dates some of the bug fixes in 6.0.9. In this case, trying to reproduce your bug actually crashed Eraser and, because the Black Box is enabled, brought up the crash assistant. The crash assistant is currently trying to compress and upload the crash report, which, in these old builds, is huge, because it includes the memory dump. If previous experience is anything to go by, the upload will fail at some point. But I'm hanging on, just in case.

In case the upload fails, here's the debug.log
Application Information
----------------------------------------------------------------------------------------------------
Version: 6.1.0.2284
Command Line: C:\Program Files\Eraser\Eraser.exe
Current Directory: C:\Users\Owner\Desktop

System Information
----------------------------------------------------------------------------------------------------
Operating System: Microsoft Windows 7 Home Premium 6.1.7601.65536(Service Pack 1) Amd64
.NET Runtime version: 2.0.50727.5448
Processor Count: 4
Physical Memory: 4404297728/6432088064
Virtual Memory: 8795465637888/8796092891136

Running Processes
----------------------------------------------------------------------------------------------------
Process[1]: C:\Program Files (x86)\TweakNow PowerPack 2009\CDAuto.exe [0.0.0.0]
Process[2]: C:\Program Files (x86)\Common Files\Acronis\Schedule2\schedhlp.exe [1.0.0.352 <1,0,0,352>]
Process[3]: C:\Program Files (x86)\Ashampoo\Ashampoo WinOptimizer 9\DfsdkS64.exe [3.6.0.6165 <3,6,0,6165>]
Process[4]: C:\Program Files (x86)\Secunia\PSI\psi_tray.exe [2.0.0.3001 <2.0.0.3001>]
Process[5]: C:\Windows\system32\svchost.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[6]: C:\Program Files (x86)\Common Files\Java\Java Update\jusched.exe [2.0.7.1 <2.0.7.1>]
Process[7]: C:\Program Files\Windows Media Player\wmpnetwk.exe [12.0.7601.17514 <12.0.7600.16385 (win7_rtm.090713-1255)>]
Process[8]: C:\Windows\System32\svchost.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[9]: C:\Windows\system32\smss.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[10]: C:\Program Files (x86)\Bonjour\mDNSResponder.exe [2.0.4.0 <2.0.4.0>]
Process[11]: C:\Windows\system32\SearchIndexer.exe [7.0.7601.17610 <7.00.7600.16385 (win7_rtm.090713-1255)>]
Process[12]: C:\Windows\system32\wininit.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[13]: C:\Program Files (x86)\Secunia\PSI\PSIA.exe [2.0.0.3001 <2.0.0.3001>]
Process[14]: C:\Windows\system32\svchost.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[15]: C:\Windows\system32\lsass.exe [6.1.7601.17725 <6.1.7601.17725 (win7sp1_gdr.111116-1503)>]
Process[16]: C:\Program Files (x86)\Common Files\Acronis\Schedule2\schedul2.exe [1.0.0.352 <1,0,0,352>]
Process[17]: C:\Program Files (x86)\Trusteer\Rapport\bin\RapportMgmtService.exe [3.5.1108.73 <3.5.1108.73>]
Process[18]: C:\Windows\system32\svchost.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[19]: C:\Windows\system32\atieclxx.exe [6.14.11.1110 <6.14.11.1110>]
Process[20]: C:\Program Files (x86)\Trusteer\Rapport\bin\RapportService.exe [3.5.1108.73 <3.5.1108.73>]
Process[21]: C:\Program Files (x86)\Secunia\PSI\sua.exe [1.0.0.5008 <1.0.0.5008>]
Process[22]: C:\Windows\System32\spoolsv.exe [6.1.7601.17514 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[23]: C:\Windows\system32\svchost.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[24]: C:\Windows\system32\svchost.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[25]: C:\Program Files\Common Files\Microsoft Shared\Windows Live\WLIDSVC.EXE [7.250.4225.0 <7.250.4225.0>]
Process[26]: C:\Program Files (x86)\Common Files\Adobe\ARM\1.0\armsvc.exe [1.5.7.0 <1, 5, 7, 0>]
Process[27]: C:\Program Files (x86)\Common Files\Acronis\CDP\afcdpsrv.exe [1.0.0.3532 <1,0,0,3532>]
Process[28]: C:\Windows\Explorer.EXE [6.1.7601.17567 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[29]: C:\Program Files (x86)\HTC\Internet Pass-Through\PassThruSvr.exe [1.2.0.0 <1, 2, 0, 0>]
Process[30]: C:\Windows\system32\csrss.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[31]: C:\Windows\System32\svchost.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[32]: C:\Windows\system32\services.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[33]: C:\Program Files (x86)\Adobe\Elements 9 Organizer\PhotoshopElementsFileAgent.exe [9.0.0.0 <9.0.0.0>]
Process[34]: C:\Windows\system32\atiesrxx.exe [6.14.11.1110 <6.14.11.1110>]
Process[35]: C:\Program Files (x86)\Kaspersky Lab\Kaspersky Internet Security 2012\avp.exe [12.0.0.374 <12.0.0.374>]
Process[36]: C:\Program Files\Common Files\Microsoft Shared\Windows Live\WLIDSvcM.exe [7.250.4225.0 <7.250.4225.0>]
Process[37]: C:\Windows\system32\svchost.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[38]: C:\Program Files (x86)\Mozilla Firefox\firefox.exe [10.0.2.4428 <10.0.2>]
Process[39]: C:\Windows\system32\svchost.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[40]: C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static\MOM.exe [2.0.0.0 <2.0.0.0>]
Process[41]: C:\Windows\system32\taskhost.exe [6.1.7601.17514 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[42]: C:\Windows\system32\wbem\wmiprvse.exe [6.1.7601.17514 <6.1.7601.17514 (win7sp1_rtm.101119-1850)>]
Process[43]: C:\Windows\system32\Dwm.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[44]: C:\Windows\System32\svchost.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[45]: C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\bin\BSQLServer.exe [8.0.3615.26342 <8.0.3615.26342>]
Process[46]: C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static\CCC.exe [2.0.0.0 <2.0.0.0>]
Process[47]: C:\Windows\system32\lsm.exe [6.1.7601.17514 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[48]: C:\Windows\system32\svchost.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[49]: C:\Program Files\Windows Sidebar\sidebar.exe [6.1.7601.17514 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[50]: C:\Program Files\Eraser\Eraser.exe [6.1.0.2284 <6.1.0.2284>]
Process[51]: C:\Windows\system32\svchost.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[52]: C:\Windows\system32\csrss.exe [6.1.7600.16385 <6.1.7600.16385 (win7_rtm.090713-1255)>]
Process[53]: C:\Program Files (x86)\Acronis\TrueImageHome\TrueImageMonitor.exe [13.0.0.6053 <13,0,0,6053>]
Process[54]: C:\Program Files (x86)\Kaspersky Lab\Kaspersky Internet Security 2012\avp.exe [12.0.0.374 <12.0.0.374>]
Process[55]: C:\Program Files (x86)\HTC\HTC Sync 3.0\htcUPCTLoader.exe [1.0.2.34 <1, 0, 2, 34>]
Process[56]: C:\Windows\system32\winlogon.exe [6.1.7601.17514 <6.1.7601.17514 (win7sp1_rtm.101119-1850)>]

Exception Information (Outermost to innermost)
----------------------------------------------------------------------------------------------------
Exception 1:
Message: Value does not fall within the expected range.
Exception Type: System.ArgumentException
Stack Trace [0]: at Eraser.Util.Win32ErrorCode.GetExceptionForWin32Error(Int32 errorCode)
Stack Trace [1]: at Eraser.Util.VolumeInfo.FromMountPoint(String mountPoint)
Stack Trace [2]: at Eraser.DefaultPlugins.FolderErasureTarget.EraseFolder()
Stack Trace [3]: at Eraser.DefaultPlugins.FolderErasureTarget.Execute()
Stack Trace [4]: at Eraser.Manager.DirectExecutor.ExecuteTask(Task task)
Stack Trace [5]: at Eraser.Manager.DirectExecutor.Main()
Stack Trace [6]: at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
Stack Trace [7]: at System.Threading.ThreadHelper.ThreadStart()

and here's the Stack Trace.log:

Exception 1: System.ArgumentException
at Eraser.Util.Win32ErrorCode.GetExceptionForWin32Error(Int32 errorCode)
at Eraser.Util.VolumeInfo.FromMountPoint(String mountPoint)
at Eraser.DefaultPlugins.FolderErasureTarget.EraseFolder()
at Eraser.DefaultPlugins.FolderErasureTarget.Execute()
at Eraser.Manager.DirectExecutor.ExecuteTask(Task task)
at Eraser.Manager.DirectExecutor.Main()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Hope this helps.

David

Later: the report did in fact upload - the first time I have successfully uploaded one of these large reports (and I can't do it too often or it will blow my broadband allowance). Perhaps the new server is better behaved than its predecessor.
 
Since writing the above, I tried the OP's test with the latest 6.1 build (2541), and reproduced the results completely, with one exception.

The task claimed to have completed sucessfully (no error messages in the Task Log, nothing in the Windows Event viewer), but the folder was not erased.

The previous crash is, I suppose irrelevant unless it helps Joel trace the source of the problem. With the layest build there seems, sadly, to be no trace information available.

I'll try this with 6.0.9 when I can, probably tomorrow.

David
 
Since writing the above, I have tested the obvious workaround (which I should have done earlier) and it seems to work. Delete the target folder to the Recycle Bin, and erase that.

David
 
If you are using 6.2, the folder not being erased at the end of a context-menu driven erasure is a bug which has been fixed in r2546.

I'll try to reproduce the crash in 6.0.
 
I just remembered that there's a similar bug report in the Beta Forum. I'm working on a fix now.
 
Fix for 6.0 in r2547 and fix for 6.2 in r2549. I know that David did not manage to reproduce the bug, but I managed to for 6.2.
 
Please test the nightly once you get the opportunity to.
 
Joel said:
Please test the nightly once you get the opportunity to.
I'll do this as soon as I can download 2549.

David
 
Installed 6.1.0.2551, and can confirm that the bug is fixed; using the OP's example, somefolder is satisfactorily erased.

David
 
It did, however occur to me earlier today that my fix would prevent people from erasing files and folders within a junction and if that junction is a volume reparse point (not a directory one like the OP)

I have to think about how to improve the fix.
 
... but even before that, you should probably look at the crash when Eraser tries to delete a task initiated from the context menu and completed (separate report on the Beta forum).

David
 
Back
Top