none
SMB server on WCE6/7 - file corruption when client is Win7 RRS feed

  • Question

  • Hi,

    On WinCE CEPC device I serve SMB shares (say to the "Storage Card" or "Hard Disk"). 

    The files are getting corrupted when uploaded from Win7 client to the device.  WinXP client works fine. It does not seem to currupt smaller files (looks like it starts at about 10MB). The download (device-to-PC) works fine. The corruption looks like randomly inserted data (the file always gets slightly bigger). To copy file I simply used cmd and copy command.

    I have tried this  with both WinCE6 and WEC7 RC (as of Jan'11).

     

    Any ideas?

     

    Regards,

    Michal

    Saturday, February 26, 2011 2:35 AM

All replies

  • What can you tell us about the files?  For example, text files might get messed up as a result of conversion of CR or LF characters to CR/LF pairs.  I'd like to understand the specific characteristics of the error, if you can identify anything that is repeatable.  A file compare after uploading and then downloading the file should do it.  Where are these files being stored when they arrive at Windows CE?  Is there any correlation between where they are stored (RAM filesystem, SDIO storage card, hard disk), and the error?  If one storage location always works, that's a good clue.

    Paul T.

    Monday, February 28, 2011 6:23 AM
  • What can you tell us about the files?  For example, text files might get messed up as a result of conversion of CR or LF characters to CR/LF pairs.  

    1) The same file upload operation works with XP clients but it does not with Win7 clients (target not rebooted in between tests etc). I can copy the file to another XP or Win7 machine (from Win7 client) and it is fine.

    2) I should not expect CR/LF conversion from a file system itself. This is not FTP bin/text mode problem. 

    3) Destination on target does not matter - tried different  ATAPI (IDE/SATA) devices. Would need to try ram though.

    The corruption place and frequency is random. The pattern is interesting. It appears to write a 0-filled data on 32KB offset boundary. The test file is ascii line by line list of line numbers.

     

    000000
    000000
    000001
    000002
    000003
    000004
    000005
    000006
    000007
    000007
    000008
    000009
    000010

    Here is hexdump output around corruption area (* marks repeated data).

    00497fe0  35 32 36 38 34 34 0d 0a  35 32 36 38 34 35 0d 0a  |526844..526845..|

    00497ff0  35 32 36 38 34 36 0d 0a  35 32 36 38 34 37 0d 0a  |526846..526847..|
    00498000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    004a0000  35 33 30 34 33 32 0d 0a  35 33 30 34 33 32 0d 0a  |530432..530432..|
    004a0010  35 33 30 34 33 33 0d 0a  35 33 30 34 33 34 0d 0a  |530433..530434..|

    And another:

     

    00047fe0  30 33 32 32 35 32 0d 0a  30 33 32 32 35 33 0d 0a  |032252..032253..|
    00047ff0  30 33 32 32 35 34 0d 0a  30 33 32 32 35 35 0d 0a  |032254..032255..|
    00048000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    00050000  30 33 35 38 34 30 0d 0a  30 33 35 38 34 30 0d 0a  |035840..035840..|
    00050010  30 33 35 38 34 31 0d 0a  30 33 35 38 34 32 0d 0a  |035841..035842..|

    More:

    0008ffe0 30 36 34 35 30 38 0d 0a 30 36 34 35 30 39 0d 0a |064508..064509..|
    0008fff0 30 36 34 35 31 30 0d 0a 30 36 34 35 31 31 0d 0a |064510..064511..|
    00090000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    *
    00098000 30 36 38 30 39 36 0d 0a 30 36 38 30 39 36 0d 0a |068096..068096..|
    00098010 30 36 38 30 39 37 0d 0a 30 36 38 30 39 38 0d 0a |068097..068098..|

     And here is a binary file to rule out any fishy business

    00247fe0 00 24 36 a0 00 24 36 a4 00 24 36 a8 00 24 36 ac |.$6 .$6☼.$6".$6¬|
    00247ff0 00 24 36 b0 00 24 36 b4 00 24 36 b8 00 24 36 bc |.$6°.$6'.$6,.$6¼|
    00248000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    *
    00250000 00 24 b6 c0 00 24 b6 c4 00 24 b6 c8 00 24 b6 cc |.$¶A.$¶Ä.$¶E.$¶I|
    00250010 00 24 b6 d0 00 24 b6 d4 00 24 b6 d8 00 24 b6 dc |.$¶D.$¶O.$¶O.$¶Ü|

     

    Thanks!

     


    Michal
    • Edited by mkromb Tuesday, March 1, 2011 1:19 AM
    Monday, February 28, 2011 11:29 PM
  • That's good information.  I'm looking for a possible cause.  Windows 7 is fully updated, right?

    Paul T.

    Tuesday, March 1, 2011 12:18 AM
  • It would also be useful to try temporarily disabling SMB 2.0 on the Windows 7 side, if possible.  Take a look at this:

    http://www.petri.co.il/how-to-disable-smb-2-on-windows-vista-or-server-2008.htm

    Paul T.

    Tuesday, March 1, 2011 12:25 AM
  • Yes, not much in terms of googling for ....I did try disabling SMB 2. No help. :-(. And AFAIK it should not go SMB2 as WinCE is not SMB2 capable...

    Win7 is fully upgraded AFAIK, on our IT autopilot :-)


    Michal
    Wednesday, March 2, 2011 3:42 AM
  • Try using a different network card on your Windows CE device (with a different driver, of course).  That's the last of the problem sources I can think of, bad data appearing as good data in the network communication, possibly because of a bad network card driver.

    I've not found anything else to explain the problem. Since you've not received any more help in the last week, I'd start a support incident with Microsoft, unless the network card change reveals something.  You should get two free incidents with Platform Builder.  This works well in the US, but is spotty elsewhere in the world; it's the best we have, though.

    Paul T.

    Tuesday, March 8, 2011 8:34 PM
  • I see the same problems as described in the first post. However, I see it with WinCE 5.0 updates installed until 2011M09.

    With Win CE 6.0 I could not reproduce the problem so far. On Win CE 5.0 it happens more if I read form the Storage Card while I transfer the files via SMB.

    The problem looks very similar to this old issue, but I made sure this updates are installed.

    http://support.microsoft.com/kb/919267


    Michal, did you fond the reason for the problem?

     


    • Edited by birudan Thursday, January 12, 2012 6:00 AM Add link
    Thursday, January 12, 2012 5:55 AM
  • Nope, no solution. We have gave up on SMB. Ideally one would submit this to MS but I am tired of convincing first line support people that MS indeed has a product called WinCE aka Windows Embedded Compact 7 :-) 
    Michal
    Saturday, January 21, 2012 10:09 PM
  • See Update 11 (May 2012) - It specifically addresses this issue.

    Component: Servers

    120522_KB2706634 - This update addresses file corruption issue.

    Steve.


    Steve Heynemand

    • Proposed as answer by Paul G. Tobey Tuesday, September 4, 2012 5:18 PM
    Friday, August 31, 2012 6:08 PM
  • Thanks for posting that Steve!

    Paul T.

    Tuesday, September 4, 2012 5:18 PM