[OpenAFS] Moving AFS server processes
Michael Aldrich
maldrich@reserveamerica.com
Tue, 19 Feb 2002 10:40:09 -0500
strace -f will send output of child processes to the terminal. This is what
I get:
[root@test1 etc]# man strace
No manual entry for strace
[root@test1 etc]# strace -f /usr/afs/bin/bosserver
execve("/usr/afs/bin/bosserver", ["/usr/afs/bin/bosserver"], [/* 22 vars
*/]) = 0
uname({sys="Linux", node="test1", ...}) = 0
brk(0) = 0x807aaac
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x40017000
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=11836, ...}) = 0
old_mmap(NULL, 11836, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3) = 0
open("/lib/libresolv.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20*\0\000"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=274054, ...}) = 0
old_mmap(NULL, 74080, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001b000
mprotect(0x4002a000, 12640, PROT_NONE) = 0
old_mmap(0x4002a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0xe000) = 0x4002a000
old_mmap(0x4002b000, 8544, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4002b000
close(3) = 0
open("/lib/i686/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\302"..., 1024)
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=5634864, ...}) = 0
old_mmap(NULL, 1242920, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002e000
mprotect(0x40154000, 38696, PROT_NONE) = 0
old_mmap(0x40154000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x125000) = 0x40154000
old_mmap(0x4015a000, 14120, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4015a000
close(3) = 0
munmap(0x40018000, 11836) = 0
getpid() = 4757
geteuid32() = 0
brk(0) = 0x807aaac
brk(0x807af1c) = 0x807af1c
brk(0x807b000) = 0x807b000
brk(0x807c000) = 0x807c000
mmap2(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x4015e000
mmap2(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x4018f000
gettimeofday({1014132701, 617979}, NULL) = 0
rt_sigaction(SIGCHLD, {0x804beac, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {0x804beac, [], 0x4000000}, NULL, 8) = 0
stat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/afs", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/afs/bin", {st_mode=S_IFDIR|S_ISGID|0755, st_size=4096, ...}) =
0
stat64("/usr/afs/etc", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/usr/afs/local", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/usr/afs/db", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/usr/afs/logs", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/vice", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/vice/etc", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
symlink("/usr/afs/etc/ThisCell", "/usr/vice/etc/ThisCell") = -1 EEXIST (File
exists)
symlink("/usr/afs/etc/CellServDB", "/usr/vice/etc/CellServDB") = -1 EEXIST
(File exists)
chdir("/usr/afs/logs") = 0
getpid() = 4757
getpgrp() = 4756
setsid() = 4757
getpid() = 4757
getpgrp() = 4757
fork() = 4758
[pid 4758] open("/dev/tty", O_RDONLY) = -1 ENXIO (No such device or
address)
[pid 4758] rename("BosLog", "BosLog.old") = 0
[pid 4757] _exit(0) = ?
[pid 4758] open("BosLog", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
[pid 4758] fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40018000
fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
_llseek(3, 0, [0], SEEK_SET) = 0
close(3) = 0
munmap(0x40018000, 4096) = 0
stat64("/usr/afs", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/afs/etc", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/usr/afs/bin", {st_mode=S_IFDIR|S_ISGID|0755, st_size=4096, ...}) =
0
stat64("/usr/afs/logs", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/afs/backup", 0xbffff580) = -1 ENOENT (No such file or
directory)
stat64("/usr/afs/db", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/usr/afs/local", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/usr/afs/etc/KeyFile", {st_mode=S_IFREG|0600, st_size=100, ...}) = 0
stat64("/usr/afs/etc/UserList", {st_mode=S_IFREG|0644, st_size=6, ...}) = 0
time(NULL) = 1014132701
open("/etc/localtime", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40018000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 4096) =
1267
close(3) = 0
munmap(0x40018000, 4096) = 0
open("/usr/afs/logs/BosLog", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40018000
fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
_llseek(3, 0, [0], SEEK_SET) = 0
write(3, "Tue Feb 19 10:31:41 2002: Server"..., 58) = 58
close(3) = 0
munmap(0x40018000, 4096) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
bind(3, {sin_family=AF_INET, sin_port=htons(7007),
sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EADDRINUSE (Address already in
use)
gettimeofday({1014132701, 627777}, NULL) = 0
select(0, NULL, NULL, NULL, {9, 990202}) = 0 (Timeout)
gettimeofday({1014132711, 624382}, NULL) = 0
bind(3, {sin_family=AF_INET, sin_port=htons(7007),
sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EADDRINUSE (Address already in
use)
gettimeofday({1014132711, 624674}, NULL) = 0
select(0, NULL, NULL, NULL, {9, 999708}) = 0 (Timeout)
gettimeofday({1014132721, 620923}, NULL) = 0
select(0, NULL, NULL, NULL, {0, 3459}) = 0 (Timeout)
gettimeofday({1014132721, 630919}, NULL) = 0
bind(3, {sin_family=AF_INET, sin_port=htons(7007),
sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EADDRINUSE (Address already in
use)
gettimeofday({1014132721, 631162}, NULL) = 0
select(0, NULL, NULL, NULL, {9, 999757}) = 0 (Timeout)
gettimeofday({1014132731, 630811}, NULL) = 0
select(0, NULL, NULL, NULL, {0, 108}) = 0 (Timeout)
gettimeofday({1014132731, 640804}, NULL) = 0
bind(3, {sin_family=AF_INET, sin_port=htons(7007),
sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EADDRINUSE (Address already in
use)
gettimeofday({1014132731, 641047}, NULL) = 0
select(0, NULL, NULL, NULL, {9, 999757}) = 0 (Timeout)
gettimeofday({1014132741, 640695}, NULL) = 0
select(0, NULL, NULL, NULL, {0, 109}) = 0 (Timeout)
gettimeofday({1014132741, 650730}, NULL) = 0
bind(3, {sin_family=AF_INET, sin_port=htons(7007),
sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EADDRINUSE (Address already in
use)
gettimeofday({1014132741, 650975}, NULL) = 0
----- Original Message -----
From: <Craig_Everhart@transarc.com>
To: "openafs" <openafs-info@openafs.org>
Sent: Tuesday, February 19, 2002 10:22 AM
Subject: Re: [OpenAFS] Moving AFS server processes
> Excerpts from mail: 19-Feb-02 Re: [OpenAFS] Moving AFS se.. Derek
> Atkins@ihtfp.com (1486*)
>
> > > symlink("/usr/afs/etc/ThisCell", "/usr/vice/etc/ThisCell") = -1 EEXIST
(File
> > > exists)
> > > symlink("/usr/afs/etc/CellServDB", "/usr/vice/etc/CellServDB") = -1
EEXIST
> > > (File exists)
>
> > This is your (immediate) problem -- you don't have ThisCell and
> > CellServDB configured for the _SERVER_.
>
> I thought that this strace information indicated that the "symlink" call
> fails because both files in fact do exist.
>
> The unhelpful thing about this strace output is that the bosserver
> daemon does this stuff in the base process, then forks and the parent
> exits. The interesting stuff happens in the child, and this strace
> output doesn't include that. There's a Solaris "truss" option to report
> syscalls in the children too, and I don't know if there's an analogous
> option for Linux strace.
>
> Craig
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info
>