Messages in this thread | | | Date | Thu, 11 Jun 1998 16:47:49 +0200 (MET DST) | From | Cyrille Chepelov <> | Subject | knfsd + 2.1.105 *very* strange bug (readdir & mount points) |
| |
Hi all,
I have seen a very strange knfsd behaviour under x86/linux, with several different clients.
Server is girasol.cri.ens-cachan.fr, clients are nikopol.rip.ens-cachan.fr (sparc/linux), obelix.rip (sparc32/solaris) and saphir.cri (ultrasparc/solaris).
exportfs is the following (yes this is unsecure) : / obelix.rip.ens-cachan.fr(rw,no_root_squash) / nikopol.rip.ens-cachan.fr(rw,no_root_squash) / saphir.cri.ens-cachan.fr(rw,no_root_squash)
No problem getting the drive mounted.
When I do a ls, I see the strange result you can see in the attached ls-l_client.txt file (on all clients) [sorry, but pine sucks when it comes to pasting text with X]
I enabled in fs/nfsd/nfsfh.c the #define NFSD_DEBUG_VERBOSE 1 statement, recompiled the modules, shut down the nfs, rmmod the module, reload nfs. I then tried again to ls the mounted root.
The attached kmessages is the the debug output from the server... and it's quite weird, indeed !
It seems that for each directory which is a mount point, the filldir_one function receives two bytes of garbage appended to the name ... no wonder that subsequent comparisons fail ! This of course trashes all my automounter efforts (no way for instance to traverse /mnt/u or /mnt/usr ) The server's mount table is attached : all devices are locally mounted. I knew one couln't re-export a NFS-mounted tree, but AFAIK local mount point traversal is still permitted...
I did also a side test : exporting directly /home for instance, or /usr, give the same results (rejection).
A possible starting point for tracking that weirdness looks to be in nfsfh.c, function get_parent_ino : file.f_op->readdir(&file, &buffer, filldir_one); statement, plus of course the filldir_one function itself.
However, it might as well be a ghoul lurking in the vfs code... I'm really lost here.
I'm currently doing backward patches to see whether this behaviour is old or not, but I'll post the results later, this P-100 is a bit slow to travel in time that quick.
-- Cyrille
------------------------------ Zog Zog
\\obelix /> ls -l /mnt / ls: /mnt/home: Permission denied ls: /mnt/tmp: Permission denied ls: /mnt/usr: Permission denied ls: /mnt/var: Permission denied ls: /mnt/proc: Permission denied ls: /mnt/u: Permission denied total 48 drwxr-xr-x 2 root root 2048 Jun 11 09:25 bin drwxr-xr-x 2 root root 1024 Jun 11 10:34 boot drwxr-xr-x 2 root root 21504 Jun 11 15:36 dev drwxr-xr-x 25 root root 3072 Jun 11 15:36 etc drwxr-xr-x 4 root root 2048 Jun 11 09:25 lib drwxr-xr-x 2 root root 12288 Jun 9 14:11 lost+found drwxr-xr-x 2 root root 1024 May 7 20:21 misc drwxr-xr-x 3 root root 1024 Jun 9 14:19 mnt drwxr-xr-x 3 root root 1024 Jun 11 15:26 opt drwxr-xr-x 12 root root 1024 Jun 11 14:58 root drwxr-xr-x 3 root root 2048 Jun 11 14:02 sbin Jun 11 15:33:41 girasol kernel: tty_io.c: process 453 (gpm) used obsolete /dev/cua0 - update software to use /dev/ttyS0 Jun 11 15:33:41 girasol kernel: Kernel logging (proc) stopped. Jun 11 15:33:41 girasol kernel: Kernel log daemon terminating. Jun 11 15:36:07 girasol kernel: klogd 1.3-3, log source = /proc/kmsg started. Jun 11 15:36:08 girasol kernel: Loaded 5408 symbols from /usr/src/linux/System.map. Jun 11 15:36:08 girasol kernel: Symbols match kernel version 2.1.105. Jun 11 15:36:08 girasol kernel: Error seeking in /dev/kmem Jun 11 15:36:08 girasol kernel: Error adding kernel module table entry. Jun 11 15:36:08 girasol kernel: Linux version 2.1.105 (root@girasol.cri.ens-cachan.fr) (gcc version 2.7.2.3) #2 Thu Jun 11 09:44:45 CEST 1998 Jun 11 15:36:08 girasol kernel: Console: 16 point font, 400 scans Jun 11 15:36:08 girasol kernel: Console: colour VGA+ 80x25, 1 virtual console (max 63) Jun 11 15:36:08 girasol kernel: Calibrating delay loop... 39.73 BogoMIPS Jun 11 15:36:08 girasol kernel: Memory: 95652k/98304k available (868k kernel code, 392k reserved, 1344k data, 48k init) Jun 11 15:36:08 girasol kernel: VFS: Diskquotas version dquot_6.4.0 initialized Jun 11 15:36:08 girasol kernel: CPU: Intel Pentium 75+ stepping 05 Jun 11 15:36:08 girasol kernel: Checking 386/387 coupling... Ok, fpu using exception 16 error reporting. Jun 11 15:36:08 girasol kernel: Checking 'hlt' instruction... Ok. Jun 11 15:36:08 girasol kernel: Intel Pentium with F0 0F bug - workaround enabled. Jun 11 15:36:08 girasol kernel: POSIX conformance testing by UNIFIX Jun 11 15:36:08 girasol kernel: Swansea University Computer Society NET3.039 for Linux 2.1 Jun 11 15:36:08 girasol kernel: NET3: Unix domain sockets 0.16 for Linux NET3.038. Jun 11 15:36:08 girasol kernel: Swansea University Computer Society TCP/IP for NET3.037 Jun 11 15:36:08 girasol kernel: IP Protocols: ICMP, UDP, TCP, IGMP Jun 11 15:36:08 girasol kernel: PCI: PCI BIOS revision 2.10 entry at 0xfbcd0 Jun 11 15:36:08 girasol kernel: PCI: Using configuration type 1 Jun 11 15:36:08 girasol kernel: PCI: Probing PCI hardware Jun 11 15:36:08 girasol kernel: Starting kswapd v 1.5 Jun 11 15:36:08 girasol kernel: Serial driver version 4.26 with no serial options enabled Jun 11 15:36:08 girasol kernel: ttyS00 at 0x03f8 (irq = 4) is a 16550A Jun 11 15:36:08 girasol kernel: ttyS01 at 0x02f8 (irq = 3) is a 16550A Jun 11 15:36:08 girasol kernel: Real Time Clock Driver v1.09 Jun 11 15:36:08 girasol kernel: PIIX: IDE controller on PCI bus 00 dev 38 Jun 11 15:36:08 girasol kernel: PIIX: not 100ative mode: will probe irqs later Jun 11 15:36:08 girasol kernel: PIIX: neither IDE port enabled (BIOS) Jun 11 15:36:08 girasol kernel: PIIX: IDE controller on PCI bus 00 dev 39 Jun 11 15:36:08 girasol kernel: PIIX: not 100ative mode: will probe irqs later Jun 11 15:36:08 girasol kernel: ide0: BM-DMA at 0xe800-0xe807, BIOS settings: hda:pio, hdb:pio Jun 11 15:36:08 girasol kernel: ide1: BM-DMA at 0xe808-0xe80f, BIOS settings: hdc:pio, hdd:pio Jun 11 15:36:08 girasol kernel: Floppy drive(s): fd0 is 1.44M Jun 11 15:36:08 girasol kernel: FDC 0 is a post-1991 82077 Jun 11 15:36:08 girasol kernel: (scsi0) <Adaptec AHA-294X SCSI host adapter> found at PCI 12/0 Jun 11 15:36:08 girasol kernel: (scsi0) Narrow Channel, SCSI ID=7, 16/255 SCBs Jun 11 15:36:08 girasol kernel: (scsi0) BIOS enabled, IO Port 0xe000, IRQ 11 Jun 11 15:36:08 girasol kernel: (scsi0) IO Memory at 0xddffe000, MMAP Memory at 0xc6802000 Jun 11 15:36:08 girasol kernel: (scsi0) Resetting channel Jun 11 15:36:08 girasol kernel: (scsi0) Downloading sequencer code... 406 instructions downloaded Jun 11 15:36:08 girasol kernel: scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.0.18/3.2.4 Jun 11 15:36:08 girasol kernel: <Adaptec AHA-294X SCSI host adapter> Jun 11 15:36:08 girasol kernel: scsi : 1 host. Jun 11 15:36:08 girasol kernel: (scsi0:0:-1:-1) Scanning channel for devices. Jun 11 15:36:08 girasol kernel: Vendor: QUANTUM Model: FIREBALL ST2.1S Rev: 0F0C Jun 11 15:36:08 girasol kernel: Type: Direct-Access ANSI SCSI revision: 02 Jun 11 15:36:08 girasol kernel: Detected scsi disk sda at scsi0, channel 0, id 0, lun 0 Jun 11 15:36:08 girasol kernel: (scsi0:0:0:0) Synchronous at 10.0MHz, offset 15. Jun 11 15:36:08 girasol kernel: scsi : detected 1 SCSI disk total. Jun 11 15:36:08 girasol kernel: SCSI device sda: hdwr sector= 512 bytes. Sectors= 4235629 [2068 MB] [2.1 GB] Jun 11 15:36:08 girasol kernel: Partition check: Jun 11 15:36:08 girasol kernel: sda: sda1 sda2 < sda5 sda6 sda7 sda8 sda9 sda10 > Jun 11 15:36:08 girasol kernel: VFS: Mounted root (ext2 filesystem) readonly. Jun 11 15:36:08 girasol kernel: Freeing unused kernel memory: 48k freed Jun 11 15:36:08 girasol kernel: Adding Swap: 128484k swap-space (priority -1) Jun 11 15:36:08 girasol kernel: Swansea University Computer Society IPX 0.38 for NET3.037 Jun 11 15:36:08 girasol kernel: IPX Portions Copyright (c) 1995 Caldera, Inc. Jun 11 15:36:08 girasol kernel: Appletalk 0.18 for Linux NET3.037 Jun 11 15:36:08 girasol kernel: tulip.c:v0.83 10/19/97 becker@cesdis.gsfc.nasa.gov Jun 11 15:36:08 girasol kernel: eth0: Digital DS21041 Tulip at 0xe400, 21041 mode, 00 00 c0 c0 02 c4, IRQ 10. Jun 11 15:36:08 girasol kernel: eth0:21041 Media information at 30, default media 0000 (10baseT). Jun 11 15:36:08 girasol kernel: eth0: 21041 media 00 (10baseT), csr13 ef01 csr14 7f3f csr15 0000. Jun 11 15:36:08 girasol kernel: eth0: 21041 media 04 (10baseT-FD), csr13 ef01 csr14 7f3d csr15 0000. Jun 11 15:36:08 girasol kernel: eth0: 21041 media 01 (10base2), csr13 ef09 csr14 0705 csr15 0006. Jun 11 15:36:13 girasol kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de). Jun 11 15:36:13 girasol kernel: nfsd_init: initialized fhcache, entries=256 Jun 11 15:36:17 girasol kernel: tty_io.c: process 453 (gpm) used obsolete /dev/cua0 - update software to use /dev/ttyS0 Jun 11 15:36:20 girasol kernel: 138.231.64.1 sent an invalid ICMP error to a broadcast. Jun 11 15:36:22 girasol last message repeated 9 times Jun 11 15:37:30 girasol kernel: NET: 11 messages suppressed. Jun 11 15:37:30 girasol kernel: 138.231.64.1 sent an invalid ICMP error to a broadcast. Jun 11 15:39:32 girasol kernel: 138.231.64.1 sent an invalid ICMP error to a broadcast. Jun 11 15:41:23 girasol kernel: 138.231.64.1 sent an invalid ICMP error to a broadcast. Jun 11 15:41:43 girasol last message repeated 13 times Jun 11 15:46:06 girasol kernel: NET: 6 messages suppressed. Jun 11 15:46:06 girasol kernel: 138.231.64.1 sent an invalid ICMP error to a broadcast. Jun 11 15:46:06 girasol kernel: 138.231.64.1 sent an invalid ICMP error to a broadcast. Jun 11 15:50:09 girasol kernel: nfsd: terminating on signal 15 Jun 11 15:50:09 girasol last message repeated 9 times Jun 11 15:50:09 girasol kernel: nfsd: last server exiting Jun 11 15:50:09 girasol kernel: exp_do_unexport: 08:07 last use, flushing cache Jun 11 15:50:25 girasol kernel: nfsd_fh_free: 0 fixups freed Jun 11 15:50:25 girasol kernel: nfsd_fh_free: 0 paths freed Jun 11 15:50:25 girasol kernel: nfsd_fh_free: verified 40, put 40 Jun 11 15:50:47 girasol kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de). Jun 11 15:50:47 girasol kernel: nfsd_init: initialized fhcache, entries=256 Jun 11 15:50:56 girasol kernel: find_fh_dentry: validated ///, ino=2 Jun 11 15:50:56 girasol kernel: expire_old: expiring file older than 500 Jun 11 15:50:56 girasol kernel: expire_old: expiring dir older than 6000 Jun 11 15:50:56 girasol kernel: filldir_one: seq=1, ino=2, name=. Jun 11 15:50:56 girasol kernel: filldir_one: seq=2, ino=2, name=.. Jun 11 15:50:56 girasol kernel: filldir_one: seq=3, ino=11, name=lost+found Jun 11 15:50:56 girasol kernel: find_fh_dentry: looked up //lost+found Jun 11 15:50:56 girasol kernel: find_fh_dentry: validated //dev, ino=10041 Jun 11 15:50:56 girasol kernel: find_fh_dentry: validated //etc, ino=12049 Jun 11 15:50:56 girasol kernel: find_fh_dentry: validated //bin, ino=16065 Jun 11 15:50:56 girasol kernel: filldir_one: seq=1, ino=2, name=. Jun 11 15:50:56 girasol kernel: filldir_one: seq=2, ino=2, name=.. Jun 11 15:50:56 girasol kernel: filldir_one: seq=3, ino=11, name=lost+found Jun 11 15:50:56 girasol kernel: filldir_one: seq=4, ino=2009, name=home1^O Jun 11 15:50:56 girasol kernel: filldir_one: seq=5, ino=4017, name=tmp Jun 11 15:50:56 girasol kernel: filldir_one: seq=6, ino=6025, name=usr Jun 11 15:50:56 girasol kernel: filldir_one: seq=7, ino=8033, name=var Jun 11 15:50:56 girasol kernel: filldir_one: seq=8, ino=10041, name=dev Jun 11 15:50:56 girasol kernel: filldir_one: seq=9, ino=12049, name=etc Jun 11 15:50:56 girasol kernel: filldir_one: seq=10, ino=16065, name=bin Jun 11 15:50:56 girasol kernel: filldir_one: seq=11, ino=18073, name=bootIV Jun 11 15:50:56 girasol kernel: find_fh_dentry: looked up //boot Jun 11 15:50:56 girasol kernel: find_fh_dentry: validated //lib, ino=22089 Jun 11 15:50:56 girasol kernel: filldir_one: seq=1, ino=2, name=. Jun 11 15:50:56 girasol kernel: filldir_one: seq=2, ino=2, name=.. Jun 11 15:50:56 girasol kernel: filldir_one: seq=3, ino=11, name=lost+found Jun 11 15:50:56 girasol kernel: filldir_one: seq=4, ino=2009, name=home1^O Jun 11 15:50:56 girasol kernel: filldir_one: seq=5, ino=4017, name=tmp Jun 11 15:50:56 girasol kernel: filldir_one: seq=6, ino=6025, name=usr Jun 11 15:50:56 girasol kernel: filldir_one: seq=7, ino=8033, name=var Jun 11 15:50:56 girasol kernel: filldir_one: seq=8, ino=10041, name=dev Jun 11 15:50:56 girasol kernel: filldir_one: seq=9, ino=12049, name=etc Jun 11 15:50:56 girasol kernel: filldir_one: seq=10, ino=16065, name=bin Jun 11 15:50:56 girasol kernel: filldir_one: seq=11, ino=18073, name=bootIV Jun 11 15:50:56 girasol kernel: filldir_one: seq=12, ino=22089, name=lib Jun 11 15:50:56 girasol kernel: filldir_one: seq=13, ino=26105, name=mnt Jun 11 15:50:56 girasol kernel: find_fh_dentry: looked up //mnt Jun 11 15:50:56 girasol kernel: find_fh_dentry: validated //root, ino=32129 Jun 11 15:50:56 girasol kernel: find_fh_dentry: validated //sbin, ino=34137 Jun 11 15:50:56 girasol kernel: filldir_one: seq=1, ino=2, name=. Jun 11 15:50:56 girasol kernel: filldir_one: seq=2, ino=2, name=.. Jun 11 15:50:56 girasol kernel: filldir_one: seq=3, ino=11, name=lost+found Jun 11 15:50:56 girasol kernel: filldir_one: seq=4, ino=2009, name=home1^O Jun 11 15:50:56 girasol kernel: filldir_one: seq=5, ino=4017, name=tmp Jun 11 15:50:56 girasol kernel: filldir_one: seq=6, ino=6025, name=usr Jun 11 15:50:56 girasol kernel: filldir_one: seq=7, ino=8033, name=var Jun 11 15:50:56 girasol kernel: filldir_one: seq=8, ino=10041, name=dev Jun 11 15:50:56 girasol kernel: filldir_one: seq=9, ino=12049, name=etc Jun 11 15:50:56 girasol kernel: filldir_one: seq=10, ino=16065, name=bin Jun 11 15:50:56 girasol kernel: filldir_one: seq=11, ino=18073, name=bootIV Jun 11 15:50:56 girasol kernel: filldir_one: seq=12, ino=22089, name=lib Jun 11 15:50:56 girasol kernel: filldir_one: seq=13, ino=26105, name=mnt Jun 11 15:50:56 girasol kernel: filldir_one: seq=14, ino=30121, name=proc^A} Jun 11 15:50:56 girasol kernel: filldir_one: seq=15, ino=32129, name=rootY^E Jun 11 15:50:56 girasol kernel: filldir_one: seq=16, ino=34137, name=sbinA^M Jun 11 15:50:56 girasol kernel: filldir_one: seq=17, ino=36161, name=opt Jun 11 15:50:56 girasol kernel: find_fh_dentry: looked up //opt Jun 11 15:50:56 girasol kernel: filldir_one: seq=1, ino=2, name=. Jun 11 15:50:56 girasol kernel: filldir_one: seq=2, ino=2, name=.. Jun 11 15:50:56 girasol kernel: filldir_one: seq=3, ino=11, name=lost+found Jun 11 15:50:56 girasol kernel: filldir_one: seq=4, ino=2009, name=home1^O Jun 11 15:50:56 girasol kernel: filldir_one: seq=5, ino=4017, name=tmp Jun 11 15:50:56 girasol kernel: filldir_one: seq=6, ino=6025, name=usr Jun 11 15:50:56 girasol kernel: filldir_one: seq=7, ino=8033, name=var Jun 11 15:50:56 girasol kernel: filldir_one: seq=8, ino=10041, name=dev Jun 11 15:50:56 girasol kernel: filldir_one: seq=9, ino=12049, name=etc Jun 11 15:50:56 girasol kernel: filldir_one: seq=10, ino=16065, name=bin Jun 11 15:50:56 girasol kernel: filldir_one: seq=11, ino=18073, name=bootIV Jun 11 15:50:56 girasol kernel: filldir_one: seq=12, ino=22089, name=lib Jun 11 15:50:56 girasol kernel: filldir_one: seq=13, ino=26105, name=mnt Jun 11 15:50:56 girasol kernel: filldir_one: seq=14, ino=30121, name=proc^A} Jun 11 15:50:56 girasol kernel: filldir_one: seq=15, ino=32129, name=rootY^E Jun 11 15:50:56 girasol kernel: filldir_one: seq=16, ino=34137, name=sbinA^M Jun 11 15:50:56 girasol kernel: filldir_one: seq=17, ino=36161, name=opt Jun 11 15:50:56 girasol kernel: filldir_one: seq=18, ino=4284, name=misc5^E Jun 11 15:50:56 girasol kernel: find_fh_dentry: looked up //misc Jun 11 15:50:57 girasol kernel: 138.231.64.1 sent an invalid ICMP error to a broadcast. Jun 11 15:50:57 girasol kernel: 138.231.64.1 sent an invalid ICMP error to a broadcast. Jun 11 15:57:09 girasol kernel: 138.231.64.1 sent an invalid ICMP error to a broadcast. Jun 11 15:57:09 girasol kernel: 138.231.64.1 sent an invalid ICMP error to a broadcast. /dev/sda1 on / type ext2 (rw) none on /proc type proc (rw) /dev/sda7 on /home type ext2 (rw,usrquota) /dev/sda9 on /tmp type ext2 (rw) /dev/sda5 on /usr type ext2 (rw) /dev/sda6 on /usr/local type ext2 (rw) /dev/sda10 on /var type ext2 (rw) automount(pid424) on /u type autofs (rw,fd=5,pgrp=424,minproto=2,maxproto=3)
| |