Code Change Request

# 27657

Back to Code Changes

Christopher
Technical Support
StableBit CloudDrive
1.0.1.880
Windows 7 (64 bit)
Public
Alex
7 years ago

* [D] [Issue #27657] Added an option to the troubleshooting menu to manually force startup recovery.
    - This is the same recovery that takes place after a power loss.
* [D] [Issue #27657] 0 length ranges were allowed.
    - If read / write / pin maps contain invalid ranges, the maps will automatically recover using unsafe start recovery on the next mount.
Public
Alex
7 years ago

Looks like "Unreadable" shown in disk management means that there is a hardware error reading from the disk. Since it's a virtual disk, then that error is coming from our disk driver.

According the the error reports, it looks like trying to unmount the drive is throwing a Win32 error "Incorrect function". This error code is coming from the kernel, from our disk driver.

According to this map: https://support.microsoft.com/en-us/help/113996/info-mapping-nt-status-error-codes-to-win32-error-codes

ERROR_INVALID_FUNCTION maps to a number of kernel errors, but the one the caught my attention is STATUS_INVALID_DEVICE_REQUEST.

And there seems to be a general error reading from the cloud drive as well:

CloudDrive.Service.exe Warning 0 [PinDiskMetadata] Error pinning file system metadata. Incorrect function. (Exception from HRESULT: 0x80070001) 2017-10-10 11:42:07Z 1546063866901

(this would explain why unmounting throws the same error, as it needs to read from the disk)

Additionally, according to the logs, it seems that there is an issue uploading data to the storage provider:

CloudDrive.Service.exe Warning 0 [CloudDrive] Error writing ranges: 1 Size: 0. Arithmetic operation resulted in an overflow.. 2017-10-12 03:43:01Z 9770869798

To me, that last error indicates that there might be something wrong with the write map (the data structure that keeps track of what needs to be uploaded to the storage provider). The write map is automatically rebuilt on a power loss (unsafe start recovery), but we had no way of manually forcing it, until now.

In short, the local maps may be corrupt. Rebooting the computer using a hardware reset possibly could have fixed this problem, but that's obviously not ideal. I've added a new option to the Troubleshooting menu to manually force unsafe recovery.