Coda File System

strange lstat*() behaviour

From: Ivan Popov <pin_at_math.chalmers.se>
Date: Mon, 18 Mar 2002 20:35:35 +0100 (MET)
Hello,

just to let you know, after compilation of a new openssh binaries
du -s on the installation directory showed the right amount, about
3 Mbyte.

Then I ran strip ..../TOP/bin/*

and now it shows:
------------------------------------------------------------
$ ls -al /coda/prog/depo/1/TOP/o/openssh/V/3.1p1/L/1/TOP/bin/
total 4
drwxr-xr-x    2 pin      nogroup      2048 Mar 18 20:03 .
drwxr-xr-x    8 pin      nogroup      2048 Mar 18 20:00 ..
-rwxr-xr-x    1 pin      nogroup     27740 Mar 18 20:03 scp
-rwxr-xr-x    1 pin      nogroup     86396 Mar 18 20:03 sftp
lrwxr-xr-x    1 pin      nogroup         3 Mar 18 20:00 slogin -> ssh
-rwx--x--x    1 pin      nogroup    761052 Mar 18 20:03 ssh
-rwxr-xr-x    1 pin      nogroup    554396 Mar 18 20:03 ssh-add
-rwxr-xr-x    1 pin      nogroup    486108 Mar 18 20:03 ssh-agent
-rwxr-xr-x    1 pin      nogroup    559292 Mar 18 20:03 ssh-keygen
-rwxr-xr-x    1 pin      nogroup    409948 Mar 18 20:03 ssh-keyscan
$ du /coda/prog/depo/1/TOP/o/openssh/V/3.1p1/L/1/TOP/bin/
2       /coda/prog/depo/1/TOP/o/openssh/V/3.1p1/L/1/TOP/bin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
------------------------------------------------------------

A strace gives:
------------------------------------------------------------
 ...
chdir("/coda/prog/depo/1/TOP/o/openssh/V/3.1p1/L/1/TOP/bin") = 0
open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not a
directory)
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
fstat64(4, {st_dev=makedev(0, 8), st_ino=228051090, st_mode=S_IFDIR|0755,
st_nlink=2, st_uid=1000, st_gid=65534, st_blksize=8192, st_blocks=4,
st_size=2048, st_atime=2002/03/18-20:28:05, st_mtime=2002/03/18-20:28:23,
st_ctime=2002/03/18-20:28:23}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
brk(0x8053000)                          = 0x8053000
getdents64(0x4, 0x804f610, 0x2000, 0)   = 280
getdents64(0x4, 0x804f610, 0x2000, 0)   = 0
close(4)                                = 0
lstat64("scp", {st_dev=makedev(0, 8), st_ino=229379461,
st_mode=S_IFREG|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=0, st_size=27740, st_atime=2002/03/18-20:28:05,
st_mtime=2002/03/18-20:28:05, st_ctime=2002/03/18-20:28:05}) = 0
lstat64("ssh-keygen", {st_dev=makedev(0, 8), st_ino=229477771,
st_mode=S_IFREG|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=0, st_size=559292,
st_atime=2002/03/18-20:28:21, st_mtime=2002/03/18-20:28:21,
st_ctime=2002/03/18-20:28:22}) = 0
lstat64("ssh-agent", {st_dev=makedev(0, 8), st_ino=229461386,
st_mode=S_IFREG|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=0, st_size=486108,
st_atime=2002/03/18-20:28:20, st_mtime=2002/03/18-20:28:20,
st_ctime=2002/03/18-20:28:21}) = 0
lstat64("sftp", {st_dev=makedev(0, 8), st_ino=229395846,
st_mode=S_IFREG|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=0, st_size=86396, st_atime=2002/03/18-20:28:06,
st_mtime=2002/03/18-20:28:06, st_ctime=2002/03/18-20:28:06}) = 0
lstat64("ssh-add", {st_dev=makedev(0, 8), st_ino=229445001,
st_mode=S_IFREG|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=0, st_size=554396,
st_atime=2002/03/18-20:28:19, st_mtime=2002/03/18-20:28:19,
st_ctime=2002/03/18-20:28:20}) = 0
lstat64("ssh-keyscan", {st_dev=makedev(0, 8), st_ino=229494156,
st_mode=S_IFREG|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=0, st_size=409948,
st_atime=2002/03/18-20:28:22, st_mtime=2002/03/18-20:28:22,
st_ctime=2002/03/18-20:28:23}) = 0
lstat64("ssh", {st_dev=makedev(0, 8), st_ino=229428616,
st_mode=S_IFREG|0711, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=0, st_size=761052,
st_atime=2002/03/18-20:28:16, st_mtime=2002/03/18-20:28:16,
st_ctime=2002/03/18-20:28:19}) = 0
lstat64("slogin", {st_dev=makedev(0, 8), st_ino=228805852,
st_mode=S_IFLNK|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=1, st_size=3, st_atime=2002/03/18-20:28:15,
st_mtime=2002/03/18-20:00:16, st_ctime=2002/03/18-20:00:16}) = 0
fchdir(3)                               = 0
close(3)                                = 0
fstat64(1, {st_dev=makedev(0, 7), st_ino=3, st_mode=S_IFCHR|0620,
st_nlink=1, st_uid=1000, st_gid=5, st_blksize=1024, st_blocks=0,
st_rdev=makedev(136, 1), st_atime=2002/03/18-20:28:36,
st_mtime=2002/03/18-20:28:36, st_ctime=2002/03/18-18:27:15}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40016000
write(1, "2\t/coda/prog/depo/1/TOP/o/openss"..., 54) = 54
 ...
------------------------------------------------------------
Evidently st_blocks is reported wrong...

A couple of minutes later:
------------------------------------------------------------
$ du /coda/prog/depo/1/TOP/o/openssh/V/3.1p1/L/1/TOP/bin/
2821    /coda/prog/depo/1/TOP/o/openssh/V/3.1p1/L/1/TOP/bin
------------------------------------------------------------

strace:
------------------------------------------------------------
 ...
chdir("/coda/prog/depo/1/TOP/o/openssh/V/3.1p1/L/1/TOP/bin") = 0
open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not a
directory)
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
fstat64(4, {st_dev=makedev(0, 8), st_ino=228051090, st_mode=S_IFDIR|0755,
st_nlink=2, st_uid=1000, st_gid=65534, st_blksize=8192, st_blocks=4,
st_size=2048, st_atime=2002/03/18-20:26:35, st_mtime=2002/03/18-20:16:35,
st_ctime=2002/03/18-20:16:35}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
brk(0x8053000)                          = 0x8053000
getdents64(0x4, 0x804f610, 0x2000, 0)   = 280
getdents64(0x4, 0x804f610, 0x2000, 0)   = 0
close(4)                                = 0
lstat64("scp", {st_dev=makedev(0, 8), st_ino=229248381,
st_mode=S_IFREG|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=55, st_size=27740,
st_atime=2002/03/18-20:16:17, st_mtime=2002/03/18-20:16:17,
st_ctime=2002/03/18-20:16:17}) = 0
lstat64("ssh-keygen", {st_dev=makedev(0, 8), st_ino=229346691,
st_mode=S_IFREG|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=1093, st_size=559292,
st_atime=2002/03/18-20:16:30, st_mtime=2002/03/18-20:16:30,
st_ctime=2002/03/18-20:16:30}) = 0
lstat64("ssh-agent", {st_dev=makedev(0, 8), st_ino=229330306,
st_mode=S_IFREG|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=950, st_size=486108,
st_atime=2002/03/18-20:16:29, st_mtime=2002/03/18-20:16:29,
st_ctime=2002/03/18-20:16:29}) = 0
lstat64("sftp", {st_dev=makedev(0, 8), st_ino=229264766,
st_mode=S_IFREG|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=169, st_size=86396,
st_atime=2002/03/18-20:16:18, st_mtime=2002/03/18-20:16:18,
st_ctime=2002/03/18-20:16:18}) = 0
lstat64("ssh-add", {st_dev=makedev(0, 8), st_ino=229313921,
st_mode=S_IFREG|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=1083, st_size=554396,
st_atime=2002/03/18-20:16:28, st_mtime=2002/03/18-20:16:28,
st_ctime=2002/03/18-20:16:28}) = 0
lstat64("ssh-keyscan", {st_dev=makedev(0, 8), st_ino=229363076,
st_mode=S_IFREG|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=801, st_size=409948,
st_atime=2002/03/18-20:16:31, st_mtime=2002/03/18-20:16:31,
st_ctime=2002/03/18-20:16:31}) = 0
lstat64("ssh", {st_dev=makedev(0, 8), st_ino=229297536,
st_mode=S_IFREG|0711, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=1487, st_size=761052,
st_atime=2002/03/18-20:16:26, st_mtime=2002/03/18-20:16:26,
st_ctime=2002/03/18-20:16:26}) = 0
lstat64("slogin", {st_dev=makedev(0, 8), st_ino=228805852,
st_mode=S_IFLNK|0755, st_nlink=1, st_uid=1000, st_gid=65534,
st_blksize=8192, st_blocks=1, st_size=3, st_atime=2002/03/18-20:00:16,
st_mtime=2002/03/18-20:00:16, st_ctime=2002/03/18-20:00:16}) = 0
fchdir(3)                               = 0
close(3)                                = 0
fstat64(1, {st_dev=makedev(0, 7), st_ino=3, st_mode=S_IFCHR|0620,
st_nlink=1, st_uid=1000, st_gid=5, st_blksize=1024, st_blocks=0,
st_rdev=makedev(136, 1), st_atime=2002/03/18-20:27:47,
st_mtime=2002/03/18-20:27:47, st_ctime=2002/03/18-18:27:15}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40016000
write(1, "2821\t/coda/prog/depo/1/TOP/o/ope"..., 57) = 57
 ...
------------------------------------------------------------

I was able to revert to the "wrong" behaviour again by running
"strip ..../bin/*" again.

Is it something to be concerned about?.. :)
Can it help to solve some other mystical things?

Cheers,
--
Ivan
Received on 2002-03-18 14:38:01