This project has moved and is read-only. For the latest updates, please go here.

Synch fails with "CAB file is corrupt"

Nov 26, 2011 at 1:18 PM

All synchronization and resynchronization attempts fail with the following error:

Synchronization failed on Friday, November 25, 2011 at 11:54:54 PM.
The synchronization failure reason was: The cab file is corrupt. Download the cab from the Debug menu and try again.
The last successful synchronization was on Monday, November 14, 2011 at 12:37:18 PM.
Synchronization lasted 1 hour, 23 minutes and 30 seconds.

The log file shows:

--- 2011-11-26 01:18:24 [7] Task Failed: WinQualSyncTask_10 StackHashBusinessObjects.StackHashException: Corrupt cab download
   at StackHashWinQual.WinQualAtomFeedServices.UpdateCabs(DateTime lastPullDate, IErrorIndex errorIndex, StackHashProduct stackHashProduct, AtomEvent atomEvent, StackHashFile stackHashFile, StackHashEvent stackHashEvent)
   at StackHashWinQual.WinQualAtomFeedServices.UpdateEvents(DateTime lastPullDate, IErrorIndex errorIndex, StackHashProduct stackHashProduct, Boolean getCabs, AtomFile file, StackHashFile stackHashFile, Int32 daysOverlap)
   at StackHashWinQual.WinQualAtomFeedServices.UpdateFiles(DateTime lastPullDate, IErrorIndex errorIndex, AtomProduct product, StackHashProduct stackHashProduct, Boolean getCabs, Int32 daysOverlap)
   at StackHashWinQual.WinQualAtomFeedServices.UpdateProducts(Boolean forceResynchronize, IErrorIndex errorIndex, AtomProductCollection products, Boolean getEvents, Boolean getCabs)
   at StackHashWinQual.WinQualAtomFeedServices.SynchronizeWithWinQualOnline(IErrorIndex errorIndex, Boolean forceResynchronize, StackHashSyncProgress lastProgress)
   at StackHashTasks.WinQualSyncTask.EntryPoint()

This has been going on for well over a week, so apparently it's not going to go away. How can I get past this?

Nov 28, 2011 at 2:51 AM

Have you tried downloading the cab file from the client? It would also be worth deleting the cab and then trying to download manually again.

Nov 28, 2011 at 8:26 AM

WinQual servers data from 2 sites: one that delivers Product, File, Event, EventInfo and CabInfo data; and the other contains the actual Cab files. So it is possible for failures to only start when downloading cabs.

Do you have ANY cabs at all downloaded? If not, it could be that the cab file server is down. You can check this by manually trying to download a cab file.

The WinQual site delivers CabInfo structures that contain details about the cab file. StackHash attempts to download the cabs specified in the known list of CabInfos. A CabInfo includes the expected Size of the cab. StackHash attempts to download the cab file - and as a check determines if the file size of the cab downloaded is the same as that expected (in the CabInfo). If not it throws the exception that you see above (Corrupt cab download).

However, StackHash doesn't throw this exception immediately. It permits a number of consecutive cab download failures before it throws an exception. This is controlled by StackHash\Tools\ServiceSettings\EditProfile\Advanced\ "Cab download failure limit".

By default this value should be 5 - which means that 5 different cab downloads must fail in a row before StackHash will abort the sync - which seems a bit extreme - unless the cab server is down.

You could try to increase this value to 10 to see if that solves the problem.

Also, I see you had a full sync succeed on Monday November 14th. Was this a full sync with cab downloads - or just the first sync of the product list. i.e. have you managed a complete sync at all yet? 

Nov 28, 2011 at 12:24 PM

@abfo:

"Have you tried downloading the cab file from the client? It would also be worth deleting the cab and then trying to download manually again."

Well, I don't know what cab it is. This occurs during synch, not when I try to open or download a CAB. The service status report doesn't specify the cab name.

@MarkDJackson:

"Do you have ANY cabs at all downloaded? If not, it could be that the cab file server is down. You can check this by manually trying to download a cab file."

Yes, I have plenty of cabs, and I can download individual cabs both from StackHash and WinQual.

"Also, I see you had a full sync succeed on Monday November 14th. Was this a full sync with cab downloads - or just the first sync of the product list. i.e. have you managed a complete sync at all yet?"

Sorry, I don't know how to answer that. 11/14 was the day after StackHash was initially installed. I don't know if there has ever been a complete sync.

@anyone:

Because I need the events for a newly mapped product, I took the step of simply commenting out the statement that throws this exception. I now get a successful synch, but of course I don't really know what the ramifications of what I did are. So far, however, I have not noticed any problems.

Nov 28, 2011 at 2:21 PM

Commenting out the exception should have a similar effect to setting...

StackHash\Tools\ServiceSettings\EditProfile\Advanced\ "Cab download failure limit".

to some very high value.

What you could do is set "Cab download failure limit" above and then, before the exception, call

DiagnosticsHelper

.LogMessage(DiagSeverity.Warning, ....) to log the details of the CabInfo (name and size) and the actual size of the downloaded file.

 This way you will see which cab is causing the problem. If the size of the downloaded file is 0 bytes then that would imply the file doesn't exist at all on the cab server. If it is > 0, then perhaps it is possible for the CabInfo data to mismatch with the cab file size - this would be a Microsoft issue. If this is the case you can email Microsoft WinQual support team to ask why that might be the case. They are usually pretty responsive. You will need the Product, File, Event and Cab information. All of those structures are available in the function where the exception occurs so can be logged (e.g. StackHashProduct, StackHashFile, StackHashEvent, StackHashCab). These also have a ToString() implementation to make logging easy.

  

 

 

Nov 28, 2011 at 8:49 PM

I did that, and here's what's in the log:

!-- 2011-11-28 14:00:52 [15] Cab error in 'D:\StackHash\...\-1629652366-Crash32bit-1480306289.cab': WinQual size=1823336, file size=2041672
!-- 2011-11-28 14:00:58 [15] Cab error in 'D:\StackHash\...\-1629652366-Crash32bit-1477031042.cab': WinQual size=752112, file size=818753
!-- 2011-11-28 14:01:04 [15] Cab error in 'D:\StackHash\...\-1629652366-Crash32bit-1475246896.cab': WinQual size=835061, file size=906436
!-- 2011-11-28 14:01:10 [15] Cab error in 'D:\StackHash\...\-1629652366-Crash32bit-1457541349.cab': WinQual size=770196, file size=835699
!-- 2011-11-28 14:01:15 [15] Cab error in 'D:\StackHash\...\-1629652366-Crash32bit-1457407123.cab': WinQual size=847886, file size=924071

I downloaded the first one manually, and the size on disk is 2,041,672 (same as the log shows), which is different from what WinQual apparently tells us. I'll let MS know.

Thanks much for your help.