none
Synctoy crashes when syncing a lot of symlinks RRS feed

  • General discussion

  • Hello,

    This is a bug report about a crash in SyncToy x64 v 2.0.100.0, in Vista x64.

    When syncing directories with a certain number of symlinks, Synctoy crashes with an exception "Attempted to divide by zero". The full message from SyncToyLog.log is the following:

    ----
    SYNC: 05/30/2009 16:33:03:550: *** Exception during run: {0} :
     System.DivideByZeroException: Attempted to divide by zero.
       at Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics)
       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, Int32& changesApplied, Int32& changesFailed)
       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncProvider sourceProvider, SyncProvider destinationProvider, Int32& changesApplied, Int32& changesFailed)
       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize()
       at Microsoft.Synchronization.SyncOrchestrator.Synchronize()
       at SyncToy.SyncEngine.CreateAndStartSession(FileSyncProvider destinationProvider, FileSyncProvider sourceProvider)
       at SyncToy.SyncEngine.RunSyncSessionsForChosenSyncType(FileSyncProvider leftProvider, FileSyncProvider rightProvider, SyncMode syncMode)
       at SyncToy.SyncEngine.Run(Boolean previewMode)
       at SyncToy.SyncEngine.Sync()
       at SyncToyUI.PreviewDialog.RunOnePair(SyncEngine syncEngine)
    SYNC: 05/30/2009 16:33:03:551: *** Exception during run: Attempted to divide by zero.
    ----

    At first, I thought that SyncToy just cannot handle any symlinks - but this is not the case. When I created a simple testcase with a directory containing just a single symlink, SyncToy didn't crash. Syncing a few symlinks in a directory works as well; the crash only happens for me if the directory contains many symlinks pointing to files over a certain size. I initially tried the sync on a directory with 376 symlinks pointing to files of total size of around 64MB,  the smallest testcase that crashes for me consistently is directory with 4 symlinks that point to files of the total size of about 2MB. So I guess the testcase to use is to create a directory with dozens of symlinks pointing to large files and try the sync. When enough symlinks in the sync directory, I can reproduce the problem 100% of the time.

    The symlinks are created by "mklink target source", i.e. it's a file symbolic link. All symlinks point to files that exist, the files they point to reside on a different logical volume.

    When SyncToy crashes, it leaves a temporary file in the target folder. The name of the file is "FSP-{SomeGuidHere}.tmp. This is the copy of a source file (or rather the symlink that is being synced). The very beginning of the temporary file has contents equal to the source file, but the temporary file is larger than the source file, and the two files start to differ at offset lower than the size of the source file.

    I have not found a workaround, other than not attempting to sync a large number of symlinks.
    Saturday, May 30, 2009 2:55 PM

All replies

  • Hi -

    Thanks for reporting this problem. We have not seen this problem before. I have filed a bug for this and will get back to you once we investigate the problem and figure out what is going on.

    Thanks
    Deepa
    Deepa ( Microsoft Sync Framework)
    Monday, June 1, 2009 5:52 PM
    Moderator
  • Hi -

    Looks like we have fixed this in our next release. So you are going to have to wait for us to come out with our next version. Currently there is no workaround - sorry !

    Thanks
    Deepa
    Deepa ( Microsoft Sync Framework)
    Monday, June 1, 2009 7:32 PM
    Moderator
  • Hi!

    when is the next release of the sync tool?
    I have the same problem: lots of symlinks.

    Thanks!
    Thursday, October 29, 2009 4:10 PM