Bob,
Thanks for responding. One thing I probably did not make clear is that I've
tried 8.5 both depots and sources from the "HP Porting and Archive Centre"
(http://hpux.connect.org.uk/). I realize that changes they make are out of your
control however for a sysadmin like me they make my job easier in our
heterogeneous environment.
I started to trace through the code and it seems that the problem is that
getacl fails on our StorNext File System cvfs (aka snfs) does not support the
getacl call. I could easily accept better warnings when using cp or mv across
file systems where acls are not supported on both but the problem is that we
see the problems with other commands such as ls -l. Tusc output for an ls is
attached and you can see that it is the getacl call that fails.
Patrick M. Callahan Senior Engineer
[email protected]
General Dynamics Advanced Information Systems
10467 White Granite Drive Ste 304
Oakton VA 22124
work: 703.277.1471
-----Original Message-----
From: Bob Proulx [mailto:[email protected]]
Sent: Monday, June 07, 2010 8:10 PM
To: Callahan, Patrick M.; [email protected]
Subject: Re: bug#6053: cp, ls, and mv bug: unknown error (252)
Pádraig Brady wrote:
> Callahan, Patrick M. wrote:
> > When using coreutils binaries either built from sources or installed
> > from the Porting And Archive Centre for HP-UX we see errors of the type
> > below when copying (cp), listing (ls), or moving (mv) files or
> > directories on Quantum's StorNext file system (cvfs). When we build
> > "--without-acl" we do not see these errors.
> >
> >> mv SEG_5_1* ~/release-input/dev-to-integration
> > mv: preserving permissions for
> > `/usr/people/archive/release-input/dev-to-integation/SEG_5_1.txt':
> > Unknown error (252)
>
> It seems the file system is returning that which we're dutifully reporting.
> An strace or equivalent would be informative.
> Also the version of coreutils you're using would be good to note
> (8.5 was just released).
On HP-UX the tool 'tusc' (trace unix system call) is the equivalent
tool to 'strace'. Using it you should be able to see the underlying
system calls and their status returns. That would provide a valuable
clue as to where the problem lies.
You are using a combination of operating system and filesystem that
isn't very commonly seen. Nor is it available to the developers
here. You may very well have found a bug. But is the bug in
coreutils mv or in the filesystem or in the kernel? Any of those are
almost equally likely possibilites. And not having such a system to
try it means that we will need to rely upon you to help.
Bob
# /usr/local/bin/tusc ./ls -l wc
execve("./ls", 0x9ffffffffffff6c8, 0x9ffffffffffff6e8)
........................................................................................................................
= 0 [32-bit]
mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0)
............................................................................................
= 0x777fc000
open("/usr/lib/hpux32/dld.so", O_RDONLY, 0)
...................................................................................................................................
= 3
read(3, "7fE L F 0102010101\0\0\0\0\0\0\0".., 1024)
...........................................................................................................................
= 1024
mmap(NULL, 735056, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_FILE|MAP_SHLIB, 3, 0)
..................................................................................................
= 0xc0016000
sysconf(_SC_PAGE_SIZE)
........................................................................................................................................................
= 4096
mmap(NULL, 6760, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_SHLIB, -1,
0)
............................................................................................
= 0x777fa000
mmap(0x777f7000, 11480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FILE|MAP_SHLIB,
3, 786432)
......................................................................................
= 0x777f7000
close(3)
......................................................................................................................................................................
= 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0)
............................................................................................
= 0x777f5000
sysconf(_SC_PAGE_SIZE)
........................................................................................................................................................
= 4096
stat("/usr/lib/hpux32/dpd", 0x7ffff2d0)
.......................................................................................................................................
= 0
open("/usr/lib/hpux32/dpd", O_RDONLY, 0)
......................................................................................................................................
= 3
fcntl(3, F_SETFD, 0)
..........................................................................................................................................................
= 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0)
...........................................................................................
= 0x777f0000
getdents(3, 0x777f0028, 8192)
.................................................................................................................................................
= 80
getdents(3, 0x777f0028, 8192)
.................................................................................................................................................
= 0
close(3)
......................................................................................................................................................................
= 0
getuid()
......................................................................................................................................................................
= 0 (0)
getgid()
......................................................................................................................................................................
= 3 (3)
open("./ls", O_RDONLY, 0)
.....................................................................................................................................................
= 3
pread(3, "\0\0\002\0\0\0, \0\0\0\aH P \0\0".., 60, 436)
.......................................................................................................................
= 60
close(3)
......................................................................................................................................................................
= 0
utssys(0x7fffe730, 60, 0)
.....................................................................................................................................................
= 0
gettune("privileges_enabled", 0x7fffe6f0)
.....................................................................................................................................
= 0
open("/usr/local/lib/hpux32/libintl.so", O_RDONLY, 0)
.........................................................................................................................
= 3
fstat(3, 0x7ffff290)
..........................................................................................................................................................
= 0
pread(3, "7fE L F 0102010101\0\0\0\0\0\0\0".., 1024, 0)
.......................................................................................................................
= 1024
mmap(NULL, 157296, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0)
...........................................................................................................
= 0xc7d7b000
mmap(NULL, 2740, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_SHLIB, 3, 196608)
......................................................................................................
= 0x777f4000
close(3)
......................................................................................................................................................................
= 0
open("/usr/local/lib/hpux32/libiconv.so", O_RDONLY, 0)
........................................................................................................................
= 3
fstat(3, 0x7ffff290)
..........................................................................................................................................................
= 0
pread(3, "7fE L F 0102010101\0\0\0\0\0\0\0".., 1024, 0)
.......................................................................................................................
= 1024
mmap(NULL, 1057312, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0)
..........................................................................................................
= 0xc97b1000
mmap(NULL, 6660, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_SHLIB, 3, 1114112)
.....................................................................................................
= 0x777ee000
close(3)
......................................................................................................................................................................
= 0
open("/usr/local/lib/hpux32/libsec.so.1", O_RDONLY, 0)
........................................................................................................................
ERR#2 ENOENT
open("/usr/lib/hpux32/libsec.so.1", O_RDONLY, 0)
..............................................................................................................................
= 3
fstat(3, 0x7ffff220)
..........................................................................................................................................................
= 0
read(3, "7fE L F 0102010101\0\0\0\0\0\0\0".., 52)
.............................................................................................................................
= 52
pread(3, "7fE L F 0102010101\0\0\0\0\0\0\0".., 1024, 0)
.......................................................................................................................
= 1024
mmap(NULL, 292960, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0)
...........................................................................................................
= 0xc0405000
mmap(NULL, 33248, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_SHLIB,
-1, 0)
...........................................................................................
= 0x777e4000
mmap(0x777e0000, 15613, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_SHLIB, 3, 294912)
...............................................................................................
= 0x777e0000
close(3)
......................................................................................................................................................................
= 0
open("/usr/local/lib/hpux32/libc.so.1", O_RDONLY, 0)
..........................................................................................................................
ERR#2 ENOENT
open("/usr/lib/hpux32/libc.so.1", O_RDONLY, 0)
................................................................................................................................
= 3
fstat(3, 0x7ffff220)
..........................................................................................................................................................
= 0
read(3, "7fE L F 0102010101\0\0\0\0\0\0\0".., 52)
.............................................................................................................................
= 52
pread(3, "7fE L F 0102010101\0\0\0\0\0\0\0".., 1024, 0)
.......................................................................................................................
= 1024
mmap(NULL, 2632384, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0)
..........................................................................................................
= 0xc0167000
madvise(0xc0167000, 0x282ac0, MADV_NORMAL)
....................................................................................................................................
= 0
mmap(NULL, 41256, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_SHLIB,
-1, 0)
...........................................................................................
= 0x777d4000
mmap(0x777cd000, 26548, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_SHLIB, 3,
2633728)
..............................................................................................
= 0x777cd000
close(3)
......................................................................................................................................................................
= 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0)
............................................................................................
= 0x777cb000
open("/usr/local/lib/hpux32/libiconv.so", O_RDONLY, 0)
........................................................................................................................
= 3
fstat(3, 0x7ffff220)
..........................................................................................................................................................
= 0
read(3, "7fE L F 0102010101\0\0\0\0\0\0\0".., 52)
.............................................................................................................................
= 52
close(3)
......................................................................................................................................................................
= 0
open("/usr/lib/hpux32/libm.so.1", O_RDONLY, 0)
................................................................................................................................
= 3
fstat(3, 0x7ffff220)
..........................................................................................................................................................
= 0
read(3, "7fE L F 0102010101\0\0\0\0\0\0\0".., 52)
.............................................................................................................................
= 52
pread(3, "7fE L F 0102010101\0\0\0\0\0\0\0".., 1024, 0)
.......................................................................................................................
= 1024
mmap(NULL, 4930912, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0)
..........................................................................................................
= 0xc044d000
mmap(NULL, 8940, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_SHLIB, 3, 4980736)
.....................................................................................................
= 0x777c8000
close(3)
......................................................................................................................................................................
= 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0)
...........................................................................................
= 0x777c4000
open("/usr/lib/hpux32/libdl.so.1", O_RDONLY, 0)
...............................................................................................................................
= 3
fstat(3, 0x7ffff220)
..........................................................................................................................................................
= 0
read(3, "7fE L F 0102010101\0\0\0\0\0\0\0".., 52)
.............................................................................................................................
= 52
pread(3, "7fE L F 0102010101\0\0\0\0\0\0\0".., 1024, 0)
.......................................................................................................................
= 1024
mmap(NULL, 15856, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0)
............................................................................................................
= 0xc03ea000
mmap(NULL, 224, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_SHLIB, 3, 65536)
........................................................................................................
= 0x777ed000
close(3)
......................................................................................................................................................................
= 0
sigsetreturn(NULL, 0x6211988, 48640)
..........................................................................................................................................
= 0
mmap(NULL, 0, PROT_NONE, MAP_VARIABLE|0x200000, -1, 0)
........................................................................................................................
ERR#25 ENOTTY
mmap(NULL, 3352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
......................................................................................................
= 0x777df000
sysconf(_SC_CPU_VERSION)
......................................................................................................................................................
= 768
brk(0x400123f0)
...............................................................................................................................................................
= 0
brk(0x400143e0)
...............................................................................................................................................................
= 0
brk(0x40015000)
...............................................................................................................................................................
= 0
brk(0x40016000)
...............................................................................................................................................................
= 0
brk(0x40017000)
...............................................................................................................................................................
= 0
open("/usr/lib/nls/loc/hpux32/locales.1/C", O_RDONLY, 0)
......................................................................................................................
ERR#2 ENOENT
brk(0x40018000)
...............................................................................................................................................................
= 0
brk(0x40019000)
...............................................................................................................................................................
= 0
ioctl(1, TCGETA, 0x7ffff2a0)
..................................................................................................................................................
= 0
ioctl(1, TIOCGWINSZ, 0x7ffff2e8)
..............................................................................................................................................
= 0
brk(0x4001a000)
...............................................................................................................................................................
= 0
brk(0x4001e000)
...............................................................................................................................................................
= 0
lstat64("wc", 0x40019f68)
.....................................................................................................................................................
= 0
getacl("wc", 0, NULL)
.........................................................................................................................................................
ERR#252 ENOTSUP
fcntl(1, F_GETFL, 34)
.........................................................................................................................................................
= 133122
./ls: write(2, ". / l s : ", 6)
...................................................................................................................................................
= 6
brk(0x40021000)
...............................................................................................................................................................
= 0
wcwrite(2, "w c ", 2)
...........................................................................................................................................................
= 2
: Unknowwrite(2, ": U n k n o w ", 8)
...............................................................................................................................................
= 8
n error write(2, "n e r r o r ", 8)
...............................................................................................................................................
= 8
(252)write(2, "( 2 5 2 ) ", 5)
.....................................................................................................................................................
= 5
write(2, "\n", 1)
.............................................................................................................................................................
= 1
open("/var/spool/pwgr/status", O_RDONLY, 0)
...................................................................................................................................
= 3
mmap(NULL, 532, PROT_READ, MAP_SHARED|MAP_VARIABLE|MAP_FILE|MAP_ADDR32, 3, 0)
.................................................................................................
= 0xc0c3a000
close(3)
......................................................................................................................................................................
= 0
socket(AF_UNIX, SOCK_DGRAM, 0)
................................................................................................................................................
= 3
getpid()
......................................................................................................................................................................
= 21059 (21058)
unlink("/var/spool/sockets/pwgr/client21059")
.................................................................................................................................
ERR#2 ENOENT
bind(3, 0x777d5bf0, 38)
.......................................................................................................................................................
= 0
fcntl(3, F_SETFD, 1)
..........................................................................................................................................................
= 0
time(NULL)
....................................................................................................................................................................
= 1276000668
poll(0x7fffdf48, 1, 0)
........................................................................................................................................................
= 1
sendto(3, "\0\0\00 \0\0\001\0\0\0\0\0\0\001".., 48, 0, 0x777d5c50, 0x19)
......................................................................................................
= 48
poll(0x7fffdf48, 1, 1000)
.....................................................................................................................................................
= 1
recvfrom(3, "\0\0\0^ \0\0\0\0\0\0\0\0\0\0\0N ".., 2064, 0, 0x7fffdf50,
0x7fffdf40)
............................................................................................
= 94
brk(0x40023000)
...............................................................................................................................................................
= 0
getpid()
......................................................................................................................................................................
= 21059 (21058)
poll(0x7fffd748, 1, 0)
........................................................................................................................................................
= 1
sendto(3, "\0\0\00 \0\0\001\0\0\001\0\0\003".., 48, 0, 0x777d5c50, 0x19)
......................................................................................................
= 48
poll(0x7fffd748, 1, 1000)
.....................................................................................................................................................
= 1
recvfrom(3, "\0\0\019\0\0\001\0\0\0\0\0\0\0\t".., 2064, 0, 0x7fffd750,
0x7fffd740)
............................................................................................
= 25
sigsetstatemask(0x17, NULL, 1073815040)
.......................................................................................................................................
= 0
brk(0x40025000)
...............................................................................................................................................................
= 0
ioctl(1, TCGETA, 0x7fffe900)
..................................................................................................................................................
= 0
-rwxrwxr-x 1 write(1, "- r w x r w x r - x 1 ", 13)
....................................................................................................................................
= 13
patrickcwrite(1, "p a t r i c k c ", 8)
...............................................................................................................................................
= 8
ttywrite(1, " t t y ", 4)
.......................................................................................................................................................
= 4
brk(0x40026000)
...............................................................................................................................................................
= 0
stat("/usr/lib/tztab", 0x7fffe7a0)
............................................................................................................................................
= 0
open("/usr/lib/tztab", O_RDONLY, 01210)
.......................................................................................................................................
= 4
mmap(NULL, 20949, PROT_READ, MAP_PRIVATE, 4, 0)
...............................................................................................................................
= 0x777be000
close(4)
......................................................................................................................................................................
= 0
gettimeofday(0x7fffe930, NULL)
................................................................................................................................................
= 0
625620 Jun 8 07:57 write(1, " 6 2 5 6 2 0 J u n 8 0 ".., 21)
............................................................................................................................
= 21
wc
write(1, "w c \n", 3)
.........................................................................................................................................................
= 3
close(1)
......................................................................................................................................................................
= 0
close(2)
......................................................................................................................................................................
= 0
getpid()
......................................................................................................................................................................
= 21059 (21058)
unlink("/var/spool/sockets/pwgr/client21059")
.................................................................................................................................
= 0
exit(0)
.......................................................................................................................................................................
WIFEXITED(0)