[OpenAFS-devel] write access fails with openafs 1.2.11 on amd64_linux24 (x86_64)

Christoph Scheurer christoph.scheurer@ch.tum.de
Thu, 22 Apr 2004 11:04:07 +0200


Hello,

I am currently trying to get OpenAFS 1.2.11 working as a client on Dual
AMD Opteron machines (amd64_linux24). I am using Gentoo linux with a
vanilla 2.4.26 kernel instead of the 2.6 kernel that is standard in
Gentoo. Below I will attach information about the build environment in
the form usually requested for kernel bug reports.

I was able to build openafs with
    ./configure  --with-afs-sysname=amd64_linux24 --sysconfdir=/etc --prefix=/usr
after patching the files
    src/afs/LINUX/osi_groups.c
    src/afs/LINUX/osi_module.c
to use gid_t instead of old_gid_t in several places (see patch below).
Otherwise the compilation fails with a syntax error. I also tried
changing CFLAGS and XCFLAGS in src/config/Makefile.amd64_linux24.in to
    CFLAGS=-m64 -O2 -mno-red-zone
or
    CFLAGS=-m64 -O2 -fPIC -mno-red-zone
since I read on the SUSE x86_64 mailing list a comment by Andy Kleen
that adding -mno-red-zone seems to be necessary with gcc 3.3.x
compilers.

With the above configuration the client loads/unloads the kernel module
without problem and logs on module load:
    amd64 kernel: Found ia32_sys_call_table at 80304280

I can also mount/umount the AFS space. It seems to be stable as long as I
only read files or do directory lookups or create empty files (cp
/dev/null foo). As soon as I try to write a regular file the write access is
denied and openafs logs

Apr 21 15:49:36 amd64 kernel: afs: failed to store file (partition full)
Apr 21 15:49:50 amd64 last message repeated 2 times
Apr 21 15:49:50 amd64 kernel: afs: Lost contact with file server 192.168.0.3 in cell theo.chemie.tu-muenchen.de (all multi-homed ip addresses down for the server)
Apr 21 15:49:50 amd64 kernel: afs: Lost contact with file server 192.168.0.3 in cell theo.chemie.tu-muenchen.de (all multi-homed ip addresses down for the server)
Apr 21 15:50:42 amd64 kernel: afs: file server 192.168.0.3 in cell theo.chemie.tu-muenchen.de is back up (multi-homed address; other same-host interfaces may still be down)
Apr 21 15:50:42 amd64 kernel: afs: file server 192.168.0.3 in cell theo.chemie.tu-muenchen.de is back up (multi-homed address; other same-host interfaces may still be down)

This is while 32bit clients have no problem accessing the same volumes/files
at the same time. The partition is only 10% full and the quota on the
volume I tried writing to is only about 50% used. The servers (database
and fileserver) are not experiencing any network problems at the time
the above errors are logged.


Kind regards,

Ch. Scheurer


########################## amd64 patch #################################

diff --exclude='*.o' -w -u -r openafs-1.2.11.orig/src/afs/LINUX/osi_groups.c openafs-1.2.11/src/afs/LINUX/osi_groups.c
--- openafs-1.2.11.orig/src/afs/LINUX/osi_groups.c	2003-05-22 06:08:03.000000000 +0200
+++ openafs-1.2.11/src/afs/LINUX/osi_groups.c	2004-04-20 13:04:21.000000000 +0200
@@ -178,8 +178,8 @@
 
 #if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_AMD64_LINUX20_ENV)
 /* Intercept the uid16 system call as used by 32bit programs. */
-extern long (*sys32_setgroupsp)(int gidsetsize, old_gid_t *grouplist);
-asmlinkage long afs32_xsetgroups(int gidsetsize, old_gid_t *grouplist)
+extern long (*sys32_setgroupsp)(int gidsetsize, gid_t *grouplist);
+asmlinkage long afs32_xsetgroups(int gidsetsize, gid_t *grouplist)
 {
     long code;
     cred_t *cr = crref();
diff --exclude='*.o' -w -u -r openafs-1.2.11.orig/src/afs/LINUX/osi_module.c openafs-1.2.11/src/afs/LINUX/osi_module.c
--- openafs-1.2.11.orig/src/afs/LINUX/osi_module.c	2003-07-29 04:01:02.000000000 +0200
+++ openafs-1.2.11/src/afs/LINUX/osi_module.c	2004-04-20 13:05:40.000000000 +0200
@@ -88,7 +88,7 @@
 #endif
 
 static void *ia32_ni_syscall = 0;
-asmlinkage long (*sys32_setgroupsp)(int gidsetsize, old_gid_t *grouplist);
+asmlinkage long (*sys32_setgroupsp)(int gidsetsize, gid_t *grouplist);
 #if defined(__NR_ia32_setgroups32)
 asmlinkage long (*sys32_setgroups32p)(int gidsetsize, gid_t *grouplist);
 #endif /* __NR_ia32_setgroups32 */



########################## build environment ###########################


Linux version 2.4.26 (root@amd64) (gcc version 3.3.3 20040217 (Gentoo Linux 3.3.3, propolice-3.3-7)) #1 SMP Mon Apr 19 15:46:26 CEST 2004




processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 5
model name	: AMD Opteron(tm) Processor 240
stepping	: 1
cpu MHz		: 1395.683
cache size	: 1024 KB
physical id	: 0
siblings	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow
bogomips	: 2785.28
TLB size	: 1088 4K pages
clflush size	: 64
address sizes	: 40 bits physical, 48 bits virtual
power management: ts ttp

processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 5
model name	: AMD Opteron(tm) Processor 240
stepping	: 1
cpu MHz		: 1395.683
cache size	: 1024 KB
physical id	: 0
siblings	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow
bogomips	: 2785.28
TLB size	: 1088 4K pages
clflush size	: 64
address sizes	: 40 bits physical, 48 bits virtual
power management: ts ttp





0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
01f0-01f7 : ide0
02f8-02ff : serial(auto)
0376-0376 : ide1
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial(auto)
0cf8-0cff : PCI conf1
b000-bfff : PCI Bus #03
  b800-b8ff : ATI Technologies Inc Rage XL
  bf00-bf3f : Intel Corp. 82557/8/9 [Ethernet Pro 100]
    bf00-bf3f : e100
cf80-cf9f : Advanced Micro Devices [AMD] AMD-8111 SMBus 2.0
ffa0-ffaf : Advanced Micro Devices [AMD] AMD-8111 IDE



00000000-0009fbff : System RAM
0009fc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000c8000-000c97ff : Extension ROM
000c9800-000cafff : Extension ROM
000cb000-000cbfff : Extension ROM
000cc000-000ccfff : Extension ROM
000f0000-000fffff : System ROM
00100000-bffeffff : System RAM
  00100000-002a4737 : Kernel code
  002a4738-0031549f : Kernel data
bfff0000-bfffefff : ACPI Tables
bffff000-bfffffff : ACPI Non-volatile Storage
fc400000-fc4fffff : PCI Bus #01
  fc4c0000-fc4cffff : Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet
  fc4d0000-fc4dffff : Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet
  fc4e0000-fc4effff : Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (#2)
  fc4f0000-fc4fffff : Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (#2)
fc500000-fc5fffff : PCI Bus #02
fc600000-feafffff : PCI Bus #03
  fd000000-fdffffff : ATI Technologies Inc Rage XL
  fe900000-fe9fffff : Intel Corp. 82557/8/9 [Ethernet Pro 100]
    fe900000-fe9fffff : e100
  feafc000-feafcfff : Advanced Micro Devices [AMD] AMD-8111 USB
  feafd000-feafdfff : Advanced Micro Devices [AMD] AMD-8111 USB (#2)
  feafe000-feafefff : Intel Corp. 82557/8/9 [Ethernet Pro 100]
    feafe000-feafefff : e100
  feaff000-feafffff : ATI Technologies Inc Rage XL
febfe000-febfefff : Advanced Micro Devices [AMD] AMD-8131 PCI-X APIC
febff000-febfffff : Advanced Micro Devices [AMD] AMD-8131 PCI-X APIC (#2)
ff300000-ff3fffff : PCI Bus #01
ff400000-ff4fffff : PCI Bus #02
ff500000-ff5fffff : PCI Bus #03
ff7c0000-ffffffff : reserved



If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
 
Linux amd64 2.4.26 #1 SMP Mon Apr 19 15:46:26 CEST 2004 x86_64 5  GNU/Linux
 
Gnu C                  3.3.3
Gnu make               3.80
util-linux             2.12
mount                  2.12
modutils               2.4.26
e2fsprogs              1.34
Linux C Library        2.3.2
Dynamic linker (ldd)   2.3.2
Procps                 3.1.15
Net-tools              1.60
Kbd                    1.08
Sh-utils               5.2.0
Modules Loaded         openafs.mp



-- 
Christoph Scheurer

contact:   http://www.theo.chemie.tu-muenchen.de/homepages/scheurer/