Skip to contentSkip to conversation

Symlinks broken on 2.4.10-ac[3-4] nfs

BUG Nicolas Mailhot 3 participants 5 messages Oct 4, 2001 – Oct 5, 2001 NFS server

lore
Share & tools
lore
#0 lore raw

Hi,

I've found out much to my sorrow that the latest
ac's do not handle symlinks over nfs well.
For example, I get that kind of results :

lrwxrwxrwx 1 nim cvs 92 oct 4 11:47
release.xml -> ../antbui ld/init/release.xml?Q¿*U!±M~?Wè¢?0>Â%Ó?ª¯ô?ºªú]¡Úvä??®?§JO#b±?µøGé\?î1Ä?ü«B?´;?? ÐHT
lrwxrwxrwx 1 nim cvs 387 oct 4 11:47 xml
-> ../antbuild/init/ xml£ú¢?ÛÕw?zê$ªEµ¶%Jº4­<?BÃÊY`L?è>=1Íî>Å?¹???§ÇÐ?ñú¸¬»??ÈÚ?¬q]?4ìG??Ã?´??è:»J]»ò Ä?7¯ºËxxÍZ&?z³¬{??^¡9Lõ?|m?ש]?4?³iúÜ?NL·[#?|²ÕìcHh;û?r¤?$¤EÜI$íF?y???yíâ­?·??W9 m?1<FA?v*@KGü?ܰ¹dßl8?ì?íF°,óá&´l¾Ý¬ÈãS?ZÌ?¥M?iUi«b??c«âx.?Ðêýj?Êg?êf.f!ê?®pÊGêÆ ´??¾QÒAbwV1Û2áä1ÄL?QKè??ª?@¢Òaæà?Õ?±È??µ??,Å?u)ÉuRæ¶&T×Ï

after a
[nim@ulysse ant]$ln -s ../antbuild/init/*xml .
[nim@ulysse ant]$ls -l

This is over an nfs mounted directory, server and client 2.4.40-ac4 nfs3, server-side fs : ext2

That's pretty ugly isn't it ?

Signature · 1 line
Nicolas Mailhot
#1 lore raw

2.4.11-pre2-xfs

Hello.

1. hardware Intel ISP1100 (BX/1GB RAM/IDE DISK)
2. kernel 2.4.11-pre2-xfs, with highmem support

3. create ramdisk 512Mb and run "tiotest -c -f 110" 4.

__alloc_pages: 0-order allocation failed (gfp=0x3d0/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x2f0/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x70/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x2f0/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x70/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x2f0/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x70/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x3f0/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x3f0/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x3f0/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x70/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x2f0/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x2f0/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x70/0) from c0127fe9

5. kernel compiled with gdb & have serial console.

Signature · 2 lines
bye.
Andrey Nekrasov, SpyLOG.
#2 lore raw

Re: 2.4.11-pre2-xfs

Hello Steve Lord,

Quoted 4 lines
Quoted 2 lines

2. kernel 2.4.11-pre2-xfs, with highmem support
3. create ramdisk 512Mb and run "tiotest -c -f 110"

And what type of filesystems were used? I am presuming XFS.

ext2 & xfs , but whis test with ext2

Quoted 8 lines
Quoted 6 lines

4.
__alloc_pages: 0-order allocation failed (gfp=0x3d0/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x2f0/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x70/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x2f0/0) from c0127fe9 __alloc_pages: 0-order allocation failed (gfp=0x70/0) from c0127fe9

Can you map that address onto a symbol by any chance?

#/ksymoops-2.4.3/ksymoops -A c0127fe9 -m /boot/System.map
...

Adhoc c0127fe8 <_alloc_pages+18/20>

6.

...
swap_dup: Bad swap file entry 3f41e02c
VM: killing process forwarderng
swap_free: Bad swap offset entry 3ce50000
swap_free: Bad swap file entry 3f41e02c
swap_free: Bad swap offset entry 38bb5000
...

What is it? Kernel or may be my hardware problem?

7. Interesting result (xfs speed):

buran:~ # cat ram_disk_ext2
buran:/ramdisk0/tiobench-0.3.1 # while (true) do ./tiotest -c -f 110 ; sleep
60; done
Tiotest results for 4 concurrent io threads:

,----------------------------------------------------------------------.

| Item                  | Time     | Rate         | Usr CPU | Sys CPU  |
+-----------------------+----------+--------------+----------+---------+
| Write         440 MBs |   17.9 s |  24.646 MB/s |   0.7 %  |  60.8 % |
| Random Write   16 MBs |    0.5 s |  28.593 MB/s |   1.8 %  |  60.4 % |
| Read          440 MBs |   14.1 s |  31.167 MB/s |  28.3 %  |  43.6 % |
| Random Read    16 MBs |    0.5 s |  33.751 MB/s |  30.2 %  |  51.8 % |

----------------------------------------------------------------------'

buran:~ # cat ram_disk_xfs
buran:/ramdisk0/tiobench-0.3.1 # while (true) do ./tiotest -c -f 110 ; sleep
60; done
Tiotest results for 4 concurrent io threads:

,----------------------------------------------------------------------.

| Item                  | Time     | Rate         | Usr CPU | Sys CPU  |
+-----------------------+----------+--------------+----------+---------+
| Write         440 MBs |    7.9 s |  55.974 MB/s |   1.8 %  |  71.4 % |
| Random Write   16 MBs |    0.3 s |  45.764 MB/s |   0.0 %  |  55.6 % |
| Read          440 MBs |   11.1 s |  39.529 MB/s |  38.0 %  |  34.3 % |
| Random Read    16 MBs |    0.5 s |  32.868 MB/s |  27.3 %  |  42.1 % |

----------------------------------------------------------------------'

Signature · 2 lines
bye.
Andrey Nekrasov, SpyLOG.
#3 lore raw

Re: 2.4.11-pre2-xfs

Hello Steve Lord,

Quoted 2 lines

Oh well, thats really useful, maybe __alloc_pages should report on its caller's caller.

I am use gcc gcc version 2.95.2 19991024 (release). May be with egcs will be better result?

Quoted 8 lines
Quoted 8 lines

...
swap_dup: Bad swap file entry 3f41e02c
VM: killing process forwarderng
swap_free: Bad swap offset entry 3ce50000
swap_free: Bad swap file entry 3f41e02c
swap_free: Bad swap offset entry 38bb5000
...

Quoted 5 lines
Quoted 1 line

What is it? Kernel or may be my hardware problem?

Probably kernel, but I am not really an expert on this part of the system, is your swap a device or a file on a filesystem?

/dev/hdg1 1 4145 2089048+ 82 Linux swap

Signature · 2 lines
bye.
Andrey Nekrasov, SpyLOG.
#4 lore raw
In reply to Nicolas Mailhot

It's a known bug in the 2.4.10 NFS server code. The following patch fixes it...

Cheers,
Trond

fs/nfsd/nfs3xdr.c +1 -1
diff -u --recursive --new-file linux-2.4.10/fs/nfsd/nfs3xdr.c linux-2.4.10-symlinks/fs/nfsd/nfs3xdr.c
@@ -99,7 +99,7 @@
 	char		*name;
 	int		i;
 
-	if ((p = xdr_decode_string_inplace(p, namp, lenp, NFS3_MAXPATHLEN)) != NULL) {
+	if ((p = xdr_decode_string(p, namp, lenp, NFS3_MAXPATHLEN)) != NULL) {
 		for (i = 0, name = *namp; i < *lenp; i++, name++) {
 			if (*name == '\0')
 				return NULL;