[Box Backup] VSS on x64 not working with x86 binaries

Achim achim+box at qustodium.net
Fri Oct 21 21:54:04 BST 2011


Good news everyone:

On Tue, 18 Oct 2011 20:51:56 +0100 (BST), Chris Wilson
<chris at qwirx.com> wrote:
>> I will now try to build a x64 version now and report back on the results.
> 
> Unfortunately my Visual Studio Express seems incapable of compiling
> 32-bit code, so unless someone wants to buy me a copy of the full
> Visual Studio, I'm afraid I'm unable to build such binaries myself.

I managed to make VS Express compile working x64 binaries, even using a
x86 host system for compilation. I tried them out on a newly installed
Vista Home Premium x64, and all binaries work, and even VSS is now
working in x64 bbackupd.exe (-:

It basically requires installing VS Express, then Windows SDK 7.1, then
starting VS2010 from within the SDK cmd.exe (after switching to x64
development in cmd.exe), and finally adding a new "Configuration" for
x64. After that, everything more or less works as on x86. The
dependencies have to be recompiled for x64 as well, and I documented
that as well (although I also found some web sites that had precompiled
x64 libs and DLLs that I ended up using).

Some hiccups do occur that ultimately prevent uploading files because
of a failed ASSERT (see details below), but it appears to me that they
are fixable. I have a full TRACE log available, can I send that to you
Chris off-list, in addition to the notes I took on how to create the
build environment?

Best regards, Achim



Ugly details follow ==============================

This happened when I ctrl-c'ed one bbackupd.exe instance, and then
immediately started it again. Not sure that I can reproduce, it might
just be a Windows limitation that it was still trying to clean up the
old snapshot bbackupd.exe had just created. This is perhaps not really
relevant at the moment:

2011-10-21 22:15:03 [TRACE]   VSS: dependencies: 0
2011-10-21 22:15:03 [ERROR]   VSS: Failed to start snapshot set:
IDispatch error #8470 (0x80042316)
2011-10-21 22:15:03 [WARNING] Failed to access directory: C:\:
Permission denied
2011-10-21 22:15:03 [TRACE]   Send
SetClientStoreMarker(0x4afd4ba74ffc0)
2011-10-21 22:15:03 [TRACE]   Receive Success(0x4afd4ba74ffc0)
2011-10-21 22:15:03 [TRACE]   Send Finished()
2011-10-21 22:15:04 [TRACE]   Receive Finished()
2011-10-21 22:15:04 [ERROR]   VSS: BackupComplete() failed: IDispatch
error #8449 (0x80042301)


When I wait a bit longer, the snapshot is indeed generated
successfully:

2011-10-21 22:16:47 [TRACE]   VSS: dependencies: 0
2011-10-21 22:16:47 [TRACE]   VSS: Added volume C:\ for backup location
C:\ to snapshot set
2011-10-21 22:16:47 [INFO]    VSS: waiting for PrepareForBackup() to
complete
2011-10-21 22:16:47 [INFO]    VSS: PrepareForBackup() status: VSS async
operation finished (0x0004230a)
2011-10-21 22:16:47 [INFO]    VSS: waiting for DoSnapshotSet() to
complete
2011-10-21 22:16:48 [INFO]    VSS: DoSnapshotSet() status: VSS async
operation pending (0x00042309)
[.. several of those..]
2011-10-21 22:17:02 [INFO]    VSS: waiting for GatherWriterStatus() to
complete
2011-10-21 22:17:02 [INFO]    VSS: GatherWriterStatus() status: VSS
async operation finished (0x0004230a)
2011-10-21 22:17:02 [TRACE]   VSS: Writer 0 (ASR Writer) is in state
VSS_WS_WAITING_FOR_BACKUP_COMPLETE
2011-10-21 22:17:02 [TRACE]   VSS: Writer 1 (MSSearch Service Writer)
is in state VSS_WS_WAITING_FOR_BACKUP_COMPLETE
2011-10-21 22:17:02 [TRACE]   VSS: Writer 2 (Registry Writer) is in
state VSS_WS_WAITING_FOR_BACKUP_COMPLETE
2011-10-21 22:17:02 [TRACE]   VSS: Writer 3 (Shadow Copy Optimization
Writer) is in state VSS_WS_WAITING_FOR_BACKUP_COMPLETE
2011-10-21 22:17:02 [TRACE]   VSS: Writer 4 (COM+ REGDB Writer) is in
state VSS_WS_WAITING_FOR_BACKUP_COMPLETE
2011-10-21 22:17:02 [TRACE]   VSS: Writer 5 (BITS Writer) is in state
VSS_WS_WAITING_FOR_BACKUP_COMPLETE
2011-10-21 22:17:02 [TRACE]   VSS: Writer 6 (WMI Writer) is in state
VSS_WS_WAITING_FOR_BACKUP_COMPLETE
2011-10-21 22:17:02 [INFO]    VSS: Location C:\ using snapshot path
\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy5\
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot ID:
{5B420ABA-06E5-4E60-9F65-3A9471E81AA0}
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot set ID:
{3C167C25-2938-47F1-B288-665932BAB6E9}
2011-10-21 22:17:02 [TRACE]   VSS: Number of volumes: 1
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot device object:
\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy3
2011-10-21 22:17:02 [TRACE]   VSS: Original volume name:
\\?\Volume{a9db09ef-f915-11e0-ab2f-806e6f6e6963}\
2011-10-21 22:17:02 [TRACE]   VSS: Originating machine: Vista64
2011-10-21 22:17:02 [TRACE]   VSS: Service machine: Vista64
2011-10-21 22:17:02 [TRACE]   VSS: Exposed name: (null)
2011-10-21 22:17:02 [TRACE]   VSS: Exposed path: (null)
2011-10-21 22:17:02 [TRACE]   VSS: Provider ID:
{B5946137-7B9F-4925-AF80-51ABD60B20D5}
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot attributes: 0x00420000
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot creation time:
0x1cc902dc4dc5764
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot status: Created
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot ID:
{8D8518C5-3ED5-4FA4-AC4E-B00D8344B916}
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot set ID:
{85AC4667-CA30-4E78-BCC9-0C3A1FCBD506}
2011-10-21 22:17:02 [TRACE]   VSS: Number of volumes: 1
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot device object:
\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy4
2011-10-21 22:17:02 [TRACE]   VSS: Original volume name:
\\?\Volume{a9db09ef-f915-11e0-ab2f-806e6f6e6963}\
2011-10-21 22:17:02 [TRACE]   VSS: Originating machine: Vista64
2011-10-21 22:17:02 [TRACE]   VSS: Service machine: Vista64
2011-10-21 22:17:02 [TRACE]   VSS: Exposed name: (null)
2011-10-21 22:17:02 [TRACE]   VSS: Exposed path: (null)
2011-10-21 22:17:02 [TRACE]   VSS: Provider ID:
{B5946137-7B9F-4925-AF80-51ABD60B20D5}
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot attributes: 0x00420000
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot creation time:
0x1cc902e1a74e0c5
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot status: Created
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot ID:
{1F97635F-C6A3-4443-AF34-F4C39C6A84C7}
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot set ID:
{769BFE92-112B-4375-8DDC-75C432963DB0}
2011-10-21 22:17:02 [TRACE]   VSS: Number of volumes: 1
2011-10-21 22:17:02 [TRACE]   VSS: Snapshot device object:
\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy5
2011-10-21 22:17:03 [TRACE]   VSS: Original volume name:
\\?\Volume{a9db09ef-f915-11e0-ab2f-806e6f6e6963}\
2011-10-21 22:17:03 [TRACE]   VSS: Originating machine: Vista64
2011-10-21 22:17:03 [TRACE]   VSS: Service machine: Vista64
2011-10-21 22:17:03 [TRACE]   VSS: Exposed name: (null)
2011-10-21 22:17:03 [TRACE]   VSS: Exposed path: (null)
2011-10-21 22:17:03 [TRACE]   VSS: Provider ID:
{B5946137-7B9F-4925-AF80-51ABD60B20D5}
2011-10-21 22:17:03 [TRACE]   VSS: Snapshot attributes: 0x00420000
2011-10-21 22:17:03 [TRACE]   VSS: Snapshot creation time:
0x1cc902e60cf0f77
2011-10-21 22:17:03 [TRACE]   VSS: Snapshot status: Created
2011-10-21 22:17:03 [TRACE]   Stat dir
'\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy5\' found device/inode
0/1407374883553285
2011-10-21 22:17:03 [INFO]    Scanning directory: C:\
2011-10-21 22:17:03 [INFO]    Skipping excluded directory:
C:\$Recycle.Bin
2011-10-21 22:17:03 [WARNING] Ignored directory: C:\Documents and
Settings: is an NTFS junction/reparse point; create a new location if
you want to back it up





However, there are probably some assumptions in the codebase that do
not hold under Windows x64 at least:

2011-10-21 22:17:05 [TRACE]   Upload decision: C:\bootmgr: will
upload(not on server)
2011-10-21 22:17:05 [NOTICE]  Uploading complete file:
\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy5\bootmgr
2011-10-21 22:17:05 [WARNING] Exception thrown:
CommonException(AssertFailed) (sizeof(unsigned long) >= sizeof(void*))
at
c:\users\ajl\boxbackup\boxbackup\lib\backupstore\BackupStoreFile.h(165)
2011-10-21 22:17:05 [ERROR]   Failed to upload file: C:\bootmgr: caught
exception: Common AssertFailed (1/1)
2011-10-21 22:17:05 [TRACE]   Upload decision: C:\BOOTSECT.BAK: will
upload(not on server)
2011-10-21 22:17:05 [NOTICE]  Uploading complete file:
\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy5\BOOTSECT.BAK
2011-10-21 22:17:06 [WARNING] Exception thrown:
CommonException(AssertFailed) (sizeof(unsigned long) >= sizeof(void*))
at
c:\users\ajl\boxbackup\boxbackup\lib\backupstore\BackupStoreFile.h(165)
2011-10-21 22:17:06 [ERROR]   Failed to upload file: C:\BOOTSECT.BAK:
caught exception: Common AssertFailed (1/1)


This failed assert prevents any file from being uploaded.









More information about the Boxbackup mailing list