Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: cp(1) from ntfs fails
On Thu, Apr 24, 2008 at 11:35:08PM +0200, Jukka Salmi wrote:
> Jukka Salmi --> current-users (2008-04-24 20:25:43 +0200):
> > Hello,
> >
> > trying to copy files from a ntfs (win xp) file system using cp(1) on
> > a 4.99.60 i386 system currently fails (IIRC this used to work):
> >
> > $ mount
> > [...]
> > /dev/wd0n on /mnt/win type ntfs (read-only, local)
> >
> > $ ls -l /mnt/win/BOOT.INI
> > -rwxr-xr-x 1 root wheel 194 Sep 18 2006 /mnt/win/BOOT.INI
> >
> > $ cp /mnt/win/BOOT.INI .
> > cp: ./BOOT.INI: Invalid argument
[...]
> BTW, copying files larger than 8 MB seems to work fine; cp(1) doesn't
> use mmap(2) in this case. Furthermore, reading files also works fine,
> so I can use e.g. tar(1) as a workaround to copy files.
>
> And, cmp(1) even dumps core if one of the files to be compared is on
> the ntfs:
>
> $ cmp /bin/ls /mnt/win/BOOT.INI
> Segmentation fault (core dumped)
[...]
> Seems to be somehow mmap(2) related... Anybody able to reproduce this?
Likewise here on a -current amd64 machine ...
njoly@petaure [~]> uname -a
NetBSD petaure.lan 4.99.60 NetBSD 4.99.60 (PETAURE) #111: Thu Apr 24 01:01:23
CEST 2008
njoly%petaure.lan@localhost:/local/src/NetBSD/obj.amd64/sys/arch/amd64/compile/PETAURE
amd64
njoly@petaure [~]> mount | grep ntfs
/dev/wd0e on /mount/windows/C type ntfs (read-only, local)
njoly@petaure [~]> ls -l /mount/windows/C/boot.ini
-rwxr-xr-x 0 root wheel 212 Feb 28 12:57 /mount/windows/C/boot.ini
njoly@petaure [~]> cp /mount/windows/C/boot.ini .
cp: ./boot.ini: Invalid argument
njoly@petaure [~]> cmp /bin/ls /mount/windows/C/boot.ini
zsh: segmentation fault (core dumped) cmp /bin/ls /mount/windows/C/boot.ini
njoly@petaure [~]> gdb cmp cmp.core
GNU gdb 6.5
[...]
Core was generated by `cmp'.
Program terminated with signal 11, Segmentation fault.
#0 0x000000000040145c in c_regular (fd1=3, file1=0x7f7ffffff9bc "/bin/ls",
skip1=0, len1=<value optimized out>, fd2=5,
file2=0x7f7ffffff9c4 "/mount/windows/C/boot.ini", skip2=0, len2=212)
at /local/src/NetBSD/src/usr.bin/cmp/regular.c:92
92 if ((ch = *p1) != *p2) {
(gdb) bt
#0 0x000000000040145c in c_regular (fd1=3, file1=0x7f7ffffff9bc "/bin/ls",
skip1=0, len1=<value optimized out>, fd2=5,
file2=0x7f7ffffff9c4 "/mount/windows/C/boot.ini", skip2=0, len2=212)
at /local/src/NetBSD/src/usr.bin/cmp/regular.c:92
#1 0x0000000000401169 in main (argc=<value optimized out>,
argv=<value optimized out>) at /local/src/NetBSD/src/usr.bin/cmp/cmp.c:152
--
Nicolas Joly
Biological Software and Databanks.
Institut Pasteur, Paris.
Home |
Main Index |
Thread Index |
Old Index