On Fri, Sep 2, 2011 at 11:25, Paul Eggert <[email protected]> wrote:
> On 09/02/11 01:10, Kevin Brott wrote:
>
> > using /bin/ksh ...
>
> Yes, that's fine.
>
> > kopen("archive", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE,
> S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) = 3
> > fstatx(3, 0x20004640, 128, 010) = 0
> > kfcntl(1, F_GETFL, 0x1006D360) = 67110914
> > kfcntl(1, F_GETFL, 0x2FF22FFC) = 67110914
> > src/tarkwrite(2, " s r c / t a r", 7) = 7
> > : kwrite(2, " : ", 2) = 2
> > file1kwrite(2, " f i l e 1", 5) = 5
> > : Cannot kwrite(2, " : C a n n o t ", 9) = 9
> > statkwrite(2, " s t a t", 4) = 4
>
> My guess is that tar is invoking this:
>
> fstatat (AT_FDCWD, "file1", &st, 0)
>
> and somehow fstatat is rejecting this call.
> This could be due to a bug in our fstatat replacement, or in
> AIX fstatat. Can you please try to figure out which, by building
> tar 1.26 with the following patch instead of the earlier
> one that I sent you, and then re-running he test? On a
> properly-configured host, the command
>
> echo xxxx > file1
> TAR_OPTIONS=--numeric-owner truss ./tar chof archive file1
>
> should output something like this:
>
> fstatat (-100, "file1", 0x7fffc37ce430, 0) -> 0; st_size = 5
>
> and should succeed.
>
>
Nope. Applied patch to clean extract of the 1.26 source ...
$ echo xxxx > file1
$ TAR_OPTIONS=--numeric-owner truss src/tar chof archive file1
execve("src/tar", 0x2FF229C8, 0x200132A8) argc: 4
sbrk(0x00000000) = 0x20004B5C
vmgetinfo(0x2FF21BB0, 7, 16) = 0
sbrk(0x00000000) = 0x20004B5C
sbrk(0x00000004) = 0x20004B5C
__libc_sbrk(0x00000000) = 0x20004B60
getuidx(4) = 510
getuidx(2) = 510
getuidx(1) = 510
getgidx(4) = 500
getgidx(2) = 500
getgidx(1) = 500
__loadx(0x01480080, 0x2FF21580, 0x00000A50, 0x2FF220E0, 0x00000000) =
0xD0544128
__loadx(0x01480180, 0x2FF21580, 0x00000A50, 0xF0A11960, 0xF0A11890) =
0xF0B00580
__loadx(0x07080000, 0xF0A11930, 0xFFFFFFFF, 0xF0B00580, 0x00000000) =
0xF0B0152C
__loadx(0x07080000, 0xF0A11870, 0xFFFFFFFF, 0xF0B00580, 0x00000000) =
0xF0B01538
__loadx(0x07080000, 0xF0A11940, 0xFFFFFFFF, 0xF0B00580, 0x00000000) =
0xF0B01568
__loadx(0x07080000, 0xF0A11880, 0xFFFFFFFF, 0xF0B00580, 0x00000000) =
0xF0B01574
__loadx(0x07080000, 0xF0A11900, 0xFFFFFFFF, 0xF0B00580, 0x00000000) =
0xF0B01544
__loadx(0x07080000, 0xF0A118A0, 0xFFFFFFFF, 0xF0B00580, 0x00000000) =
0xF0B0155C
__loadx(0x07080000, 0xF0A11910, 0xFFFFFFFF, 0xF0B00580, 0x00000000) =
0xF0B01580
__loadx(0x07080000, 0xF0A11920, 0xFFFFFFFF, 0xF0B00580, 0x00000000) =
0xF0B015B0
__loadx(0x07080000, 0xF0A118B0, 0xFFFFFFFF, 0xF0B00580, 0x00000000) =
0xF0B01598
__loadx(0x07080000, 0xF0A118C0, 0xFFFFFFFF, 0xF0B00580, 0x00000000) =
0xF0B01610
getuidx(4) = 510
getuidx(2) = 510
getuidx(1) = 510
getgidx(4) = 500
getgidx(2) = 500
getgidx(1) = 500
__loadx(0x01480080, 0x2FF21580, 0x00000A50, 0x2FF220E0, 0x00000000) =
0xD0544128
getuidx(4) = 510
getuidx(2) = 510
getuidx(1) = 510
getgidx(4) = 500
getgidx(2) = 500
getgidx(1) = 500
__loadx(0x01480080, 0x2FF21580, 0x00000A50, 0x2FF220E0, 0x00000000) =
0xD0544128
getuidx(4) = 510
getuidx(2) = 510
getuidx(1) = 510
getgidx(4) = 500
getgidx(2) = 500
getgidx(1) = 500
__loadx(0x01480080, 0x2FF21580, 0x00000A50, 0x2FF220E0, 0x00000000) =
0xD0544128
getuidx(4) = 510
getuidx(2) = 510
getuidx(1) = 510
getgidx(4) = 500
getgidx(2) = 500
getgidx(1) = 500
__loadx(0x01480080, 0x2FF21580, 0x00000A50, 0x2FF220E0, 0x00000000) =
0xD0544128
getuidx(4) = 510
getuidx(2) = 510
getuidx(1) = 510
getgidx(4) = 500
getgidx(2) = 500
getgidx(1) = 500
__loadx(0x01480080, 0x2FF21580, 0x00000A50, 0x2FF220E0, 0x00000000) =
0xD0544128
kfcntl(0, F_GETFD, 0x20004110) = 0
kfcntl(1, F_GETFD, 0x2FF22FFC) = 0
kfcntl(2, F_GETFD, 0x2FF22FFC) = 0
_sigaction(20, 0x2FF228A0, 0x2FF228B0) = 0
kopen("archive", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE,
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) = 3
fstatx(3, 0x20004660, 128, 010) = 0
fstatat (kwrite(2, " f s t a t a t (", 9) = 9
-kwrite(2, " -", 1) = 1
2kwrite(2, " 2", 1) = 1
, "kwrite(2, " , "", 3) = 3
file1kwrite(2, " f i l e 1", 5) = 5
", kwrite(2, " " , ", 3) = 3
2ff22668kwrite(2, " 2 f f 2 2 6 6 8", 8) = 8
, kwrite(2, " , ", 2) = 2
0kwrite(2, " 0", 1) = 1
) -> kwrite(2, " ) - > ", 5) = 5
-kwrite(2, " -", 1) = 1
1kwrite(2, " 1", 1) = 1
; kwrite(2, " ; ", 2) = 2
access("/usr/lib/nls/msg/en_US/libc.cat", 0) = 0
_getpid() = 12845536
kopen("/usr/lib/nls/msg/en_US/libc.cat", O_RDONLY) = 4
kioctl(4, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY
kfcntl(4, F_SETFD, 0x00000001) = 0
kioctl(4, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY
kread(4, "\0\001 ù\007\007 I S O 8".., 4096) = 4096
lseek(4, 0, 1) = 4096
lseek(4, 0, 1) = 4096
lseek(4, 0, 1) = 4096
_getpid() = 12845536
lseek(4, 0, 1) = 4096
lseek(4, 4373, 0) = 4373
kread(4, " A s y s t e m c a l".., 4096) = 4096
close(4) = 0
errno = kwrite(2, " e r r n o = ", 8) = 8
22kwrite(2, " 2 2", 2) = 2
(kwrite(2, " (", 2) = 2
A system call received a parameter that is not valid.kwrite(2, " A s y s t
e m c a l".., 53) = 53
)
kwrite(2, " )\n", 2) = 2
kfcntl(1, F_GETFL, 0x1006D3F8) = 67110914
kfcntl(1, F_GETFL, 0x2FF22FFC) = 67110914
src/tarkwrite(2, " s r c / t a r", 7) = 7
: kwrite(2, " : ", 2) = 2
file1kwrite(2, " f i l e 1", 5) = 5
: Cannot kwrite(2, " : C a n n o t ", 9) = 9
statkwrite(2, " s t a t", 4) = 4
access("/usr/lib/nls/msg/en_US/libc.cat", 0) = 0
_getpid() = 12845536
kopen("/usr/lib/nls/msg/en_US/libc.cat", O_RDONLY) = 4
kioctl(4, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY
kfcntl(4, F_SETFD, 0x00000001) = 0
kioctl(4, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY
kread(4, "\0\001 ù\007\007 I S O 8".., 4096) = 4096
lseek(4, 0, 1) = 4096
lseek(4, 0, 1) = 4096
lseek(4, 0, 1) = 4096
_getpid() = 12845536
lseek(4, 0, 1) = 4096
lseek(4, 4373, 0) = 4373
kread(4, " A s y s t e m c a l".., 4096) = 4096
close(4) = 0
: kwrite(2, " : ", 2) = 2
A system call received a parameter that is not valid.kwrite(2, " A s y s t
e m c a l".., 53) = 53
kwrite(2, "\n", 1) = 1
kfcntl(2, F_GETFL, 0x2FF22FFC) = 67110914
kwrite(3, "\0\0\0\0\0\0\0\0\0\0\0\0".., 10240) = 10240
close(3) = 0
kfcntl(1, F_GETFL, 0x100728D0) = 67110914
kfcntl(1, F_GETFL, 0x2FF22FFC) = 67110914
src/tarkwrite(2, " s r c / t a r", 7) = 7
: kwrite(2, " : ", 2) = 2
Exiting with failure status due to previous errorskwrite(2, " E x i t i n
g w i t h".., 50) = 50
kwrite(2, "\n", 1) = 1
kfcntl(2, F_GETFL, 0x2FF22FFC) = 67110914
kfcntl(1, F_GETFL, 0x00000002) = 67110914
close(1) = 0
close(2) = 0
_exit(2)
*fstatat (-2, "file1", 2ff22688, 0) -> -1; errno = 22 (A system call
received a parameter that is not valid.)
src/tar: file1: Cannot stat: A system call received a parameter that is not
valid.
src/tar: Exiting with failure status due to previous errors
*
*$ src/tar cf archive file1
fstatat (-2, "file1", 2ff226a8, 1) -> 0; st_size = 5
*
--
# include <stddisclaimer.h>
/* Kevin Brott <[email protected]> */