[OpenAFS-devel] pr_Initialize falis when called within a
simple application
Douglas E. Engert
deengert@anl.gov
Thu, 19 Aug 2004 07:56:46 -0500
If it finds the .AFSSERVER it means the machine is using the
AFS/NFS translator.
John Hayes wrote:
> One striking difference between the two programs can be seen in the
> following output from strace. Remember that some debugger code was put in
> tyhe libraries and that will show up as well -
>
>
> strace output from klog:
> getitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={2147483, 646000}}) = 0
> write(1, "in rx1\n", 7) = 7
> write(1, "got mem!\n", 9) = 9
> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
> ioctl(4, 0x8912, 0xbfffc188) = 0
> ioctl(4, 0x8915, 0xbfffc190) = 0
> ioctl(4, 0x8915, 0xbfffc1b0) = 0
> ioctl(4, 0x8913, 0xbfffc1b0) = 0
> ioctl(4, 0x8921, 0xbfffc1b0) = 0
> ioctl(4, 0x891b, 0xbfffc1b0) = 0
> close(4) = 0
> brk(0) = 0x80b5000
> brk(0x80dc000) = 0x80dc000
>
>
> strace output from my test program:
> etitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={2147483, 646000}}) = 0
> open("/home/jhh/.AFSSERVER", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/.AFSSERVER", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> afs_syscall(0x14, 0, 0x400c5608, 0xbfffc770, 0) = 0
> fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0x4001a000
> write(1, "in rx1\n", 7) = 7
> write(1, "got mem!\n", 9) = 9
> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
> ioctl(4, 0x8912, 0xbfffc4f8) = 0
> ioctl(4, 0x8915, 0xbfffc500) = 0
> ioctl(4, 0x8915, 0xbfffc520) = 0
> ioctl(4, 0x8913, 0xbfffc520) = 0
> ioctl(4, 0x8921, 0xbfffc520) = 0
> ioctl(4, 0x891b, 0xbfffc520) = 0
> close(4) = 0
> brk(0) = 0x8086000
> brk(0x80ad000) = 0x80ad000
>
>
> Why is my test program looking for this .AFSSERVER file?
>
>
>
>
>>>Unlikely... Byteswapping of 42166 yields 46756 (7004 swaps to 23579).
>>>So I don't think it's pure byteswapping. It's not bit-swapped,
>>>either.. So I have no clue where this port number came from. Perhaps
>>>an uninitialized variable?
>>
>>Well, I think one thing to ask, again, is what stracing and grepping for
>>calls to open returned different in each case; but that's probably not it
>>either.
>
>
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
>
>
>
--
Douglas E. Engert <DEEngert@anl.gov>
Argonne National Laboratory
9700 South Cass Avenue
Argonne, Illinois 60439
(630) 252-5444