[OpenAFS] Re: Install OpenAFS on ppc64?

Ting-jen Yen yentj@infowrap.com.tw
Thu, 01 Sep 2011 18:28:23 +0800

On Web=A1A24 Aug 2011 09:55:00 -0400
Andrew Deason <adeason@sinenomine.net> wrote:
> On Wed, 24 Aug 2011 15:23:00 +0800
> Ting-jen Yen <yentj@infowrap.com.tw> wrote:
> > Hello,
> >=20
> >    Yes, I can see the file /proc/fs/openafs/afs_ioctl.
> >    For some reason, the system became unstable after I browsed
> > this directory.  (Could be coincident.  I don't know.)
> Can you 'strace -f' afsd, and show what happens when it tries to call
> ioctl() on that path? (you should see an open for that path immediately
> followed by an ioctl)
> Can you give the compiler errors that occurred before you modified the
> source? (Give the full command run followed by the errors.) There might
> be some kind of discrepancy with 64/32-bitness involved, but even if
> that's not the problem, obviously we shouldn't fail to compile.


  Sorry, I somehow replied to the wrong thread in my previous message.
(Well, my original reply got blocked because I attached some log file,
and got oversized, so I edited it and tried again, but got careless and
replied into the "64-bit mod_waklog / filedrawers on afs" thread.)  I
apoligize for any confusing I made in that thread.

  The output after calling ioctl() of "strace -f afsd" is in the
following, (compiler errors are after this output message.)

--------- strace -f afsd line 155-----------------------
open("/proc/fs/openafs/afs_ioctl", O_RDWR) =3D 3
ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD, 0xffa4c320) =3D -1 EINVAL
(Invalid argument)
close(3)                                =3D 0
clone(Process 19813 attached (waiting for parent)
Process 19813 resumed (parent 19812 ready)
child_tidptr=3D0xfff1e48) =3D 19813
[pid 19812] clone(Process 19814 attached (waiting for parent)
Process 19814 resumed (parent 19812 ready)
child_tidptr=3D0xfff1e48) =3D 19814
[pid 19812] clone(Process 19815 attached (waiting for parent)
Process 19815 resumed (parent 19812 ready)
child_tidptr=3D0xfff1e48) =3D 19815
[pid 19812] open("/proc/fs/openafs/afs_ioctl", O_RDWR) =3D 3
[pid 19813] setpriority(PRIO_PROCESS, 0, -10 <unfinished ...>
[pid 19815] setpriority(PRIO_PROCESS, 0, -10 <unfinished ...>
[pid 19814] open("/proc/fs/openafs/afs_ioctl", O_RDWR <unfinished ...>
[pid 19815] <... setpriority resumed> ) =3D 0
[pid 19813] <... setpriority resumed> ) =3D 0
[pid 19815] open("/proc/fs/openafs/afs_ioctl", O_RDWR <unfinished ...>
[pid 19814] <... open resumed> )        =3D 3
[pid 19815] <... open resumed> )        =3D 3
[pid 19813] open("/proc/fs/openafs/afs_ioctl", O_RDWR <unfinished ...>
[pid 19815] ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD <unfinished ...>
[pid 19814] ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD <unfinished ...>
[pid 19812] ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD <unfinished ...>
[pid 19815] <... ioctl resumed> , 0xffa4c290) =3D -1 EINVAL (Invalid
[pid 19813] <... open resumed> )        =3D 3
[pid 19815] close(3 <unfinished ...>
[pid 19813] ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD <unfinished ...>
[pid 19815] <... close resumed> )       =3D 0
[pid 19813] <... ioctl resumed> , 0xffa4c290) =3D -1 EINVAL (Invalid
[pid 19813] close(3 <unfinished ...>
[pid 19815] exit_group(1)               =3D ?
Process 19815 detached
[pid 19813] <... close resumed> )       =3D 0
[pid 19813] exit_group(1)               =3D ?
Process 19813 detached
[pid 19812] <... ioctl resumed> , 0xffa4c320) =3D -1 EINVAL (Invalid
[pid 19812] --- SIGCHLD (Child exited) @ 0 (0) ---
[pid 19812] close(3)                    =3D 0
[pid 19812] fstat64(1, {st_mode=3DS_IFCHR|0620, st_rdev=3Dmakedev(136,
0), ...}) =3D 0
[pid 19814] <... ioctl resumed> , 0xffa4c290) =3D -1 EINVAL (Invalid
[pid 19812] mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|
MAP_ANONYMOUS, -1, 0) =3D 0xf7fe0000
[pid 19812] write(1, "afsd: Error -1 in basic initiali"..., 40afsd:
Error -1 in basic initialization.
) =3D 40
[pid 19812] exit_group(1)               =3D ?
[pid 19814] close(3)                    =3D 0

  For compiler errors, if I simple run rpmbuild -bb openafs.spec, it=20
shows: (using SRPM of openafs-
[root@r602 SPECS]# rpmbuild -bb openafs.spec
error: parse error in expression
error: /usr/src/redhat/SPECS/openafs.spec:337: parseExpressionBoolean
returns -1
Checking for unpackaged
file(s): /usr/lib/rpm/check-files /var/tmp/openafs-

  If I specified build_userspace, build_modules, and build_authlibs
in rpmbuild, the compiling will go ahead, and stop at:
cc -o aklog  -DALLOW_REGISTER
-I/usr/src/redhat/BUILD/openafs- -I. -I.
.... (line to long, so I deleted the rest of it)
/usr/bin/ld: cannot find -lcom_err
collect2: ld returned 1 exit status

  I did notice I have /usr/lib64/libcom_err.so which is symlink
to /lib64/libcom_err.so.2, though there is no /usr/lib/libcom_err.so.
I supposed this is part of 64/32-bitness.  I did manually add a link
/usr/lib/libcom_err.so to /lib/libcom_err.so.2.  The compiling would
now go past the previous part, and no error until it began to compile
kernel module.  It would dump a lot of warning/error messages,
vnop_flock.c:617: warning: 'struct flock64' declared inside parameter
vnop_flock.c:620: error: storage size of 'flock' isn't known
vnop_flock.c:632: error: dereferencing pointer to incomplete type

  I try to get a preprocessed code output (using -E) of the=20
afs_vnop_flock.c, and noticed that struct flock64 is never
defined.  So I went to edit src/afs/afs.h, and changed the
only occurance of 'flock64' to 'flock', and the whole compiling
would then succeed.  Though the service cannot be started.

  Because whole compiler output is too large even after compressed,
I only included the most significant parts, (in my opinion anyway),
if it is really necessary to show more information, please let me
know, I will see what I can do then.

-- Ting-jen