Subject: bin/37422, update: additional information and debug output
To: None <netbsd-bugs@netbsd.org>
From: Kai-Uwe Eckhardt <kuehro@gmx.de>
List: netbsd-bugs
Date: 12/18/2007 21:53:16
Hi,

the problem is still present on a newer kernel (GENERIC 4.99.42) on two
different computers, with two different USB-hard disks. So I
decided to build a debug version of cp. As a reminder: the problem
is that files copied onto an external hard disk (fat32 and ntfs) can
be copied from there with dd but not with cp. As it turned  out, all 
files written  from  WinXP onto the external disk  can only be copied 
with dd.
For debugging I used dd to copy a file blas.tgz from the ntfs partition
(mounted readonly) to the netbsd partition. I can copy this file onto
a fat32 partition an can then use cp without a problem. But if I try
to copy the original file with cp from the ntfs partition, mmap delivers 
an invalid pointer in utils.c (1.34 from 2007/10/26), line 158, leading 
to the error 'Invalid Argument' and a resulting file with zero bytes.  
With the copy of the file on the fat32 partition, mmap returns a pointer 
p to 0xbb9e7000  with the  first bytes of the file as content and 
everything works fine, but with the file from the ntfs partition gbd prints:

0xbb9e7000 <Address out of bounds>

With NetBSD4_RC1 to RC5 file copy works without problems on the
same hardware. And the same is true for FreeBSD7, debian, Scientific 
Linux5 and Win2000.

So, is there anybody else having problems to copy files which have been 
written by WinXP from an external harddisk ?

Thanks a lot,

Kai-Uwe Eckhardt