2.0.30 crash in lock_remove_locks (cont'd)

Carlo Wood (carlo@runaway.xs4all.nl)
Thu, 15 May 1997 18:26:49 +0200 (MET DST)


Hi again,

I forgot to include the applied patch in the previous mail - I'll add
it below.

Secondly, I found out that the stock 2.0.30 (and 2.0.29) compile and run
fine with my new binutils/libc etc. So, the problem is related to the
patches.

I think I also know which part of the patches is the problem *shrug* :
the new ones :). That is, I need to run several irc daemons with
each more then 2048 clients (for testing ircu2.10), so I tried to increase
the number of fd's per process to 4096.

I think that the kernel crash is still a bug. I also saw once a patch
for 2.0.29 that made it possible to do this (this huge amount of fd's), but
this patch didn't apply to 2.0.30 : all hunks but one failed. I hoped it
was solved in another way.

Please let me know what to do if I need 4096 fd's per process (and a LOT
more for the total system, for which I thought I can use /proc/kernel).

Carlo

-- 
 carlo@runaway.xs4all.nl, Run @ IRC.

ircd development: http://www.xs4all.nl/~carlo17/ircd-dev

------------ START OF APPLIED PATCHES TO STOCK 2.0.30 -------------------------

diff -rc linux/drivers/isdn/isdn_common.c linux.fail/drivers/isdn/isdn_common.c *** linux/drivers/isdn/isdn_common.c Wed Nov 13 07:36:19 1996 --- linux.fail/drivers/isdn/isdn_common.c Thu May 15 12:15:17 1997 *************** *** 1694,1699 **** --- 1694,1700 ---- q->next = p->next; else dev->infochain = (infostruct *) (p->next); + kfree(p); return; } q = p; diff -rc linux/fs/binfmt_java.c linux.fail/fs/binfmt_java.c *** linux/fs/binfmt_java.c Fri Sep 20 16:00:35 1996 --- linux.fail/fs/binfmt_java.c Thu Jan 30 21:02:27 1997 *************** *** 11,18 **** #include <linux/malloc.h> #include <linux/binfmts.h> ! #define _PATH_JAVA "/usr/bin/java" ! #define _PATH_APPLET "/usr/bin/appletviewer" #define _PATH_SH "/bin/bash" char binfmt_java_interpreter[65] = _PATH_JAVA; --- 11,18 ---- #include <linux/malloc.h> #include <linux/binfmts.h> ! #define _PATH_JAVA "/usr/local/java/bin/java" ! #define _PATH_APPLET "/usr/local/java/bin/appletviewer" #define _PATH_SH "/bin/bash" char binfmt_java_interpreter[65] = _PATH_JAVA; diff -rc linux/include/linux/fs.h linux.fail/include/linux/fs.h *** linux/include/linux/fs.h Thu May 15 17:50:25 1997 --- linux.fail/include/linux/fs.h Thu May 15 13:00:12 1997 *************** *** 27,33 **** /* Fixed constants first: */ #undef NR_OPEN ! #define NR_OPEN 256 #define NR_SUPER 64 #define BLOCK_SIZE 1024 --- 27,33 ---- /* Fixed constants first: */ #undef NR_OPEN ! #define NR_OPEN 4096 #define NR_SUPER 64 #define BLOCK_SIZE 1024 *************** *** 36,43 **** /* And dynamically-tunable limits and defaults: */ extern int max_inodes, nr_inodes; extern int max_files, nr_files; ! #define NR_INODE 3072 /* this should be bigger than NR_FILE */ ! #define NR_FILE 1024 /* this can well be larger on a larger system */ #define MAY_EXEC 1 #define MAY_WRITE 2 --- 36,43 ---- /* And dynamically-tunable limits and defaults: */ extern int max_inodes, nr_inodes; extern int max_files, nr_files; ! #define NR_INODE 6144 /* this should be bigger than NR_FILE */ ! #define NR_FILE 4096 /* this can well be larger on a larger system */ #define MAY_EXEC 1 #define MAY_WRITE 2 diff -rc linux/include/linux/limits.h linux.fail/include/linux/limits.h *** linux/include/linux/limits.h Wed Jul 17 14:10:03 1996 --- linux.fail/include/linux/limits.h Thu May 15 12:26:50 1997 *************** *** 1,7 **** #ifndef _LINUX_LIMITS_H #define _LINUX_LIMITS_H ! #define NR_OPEN 256 #define NGROUPS_MAX 32 /* supplemental group IDs are available */ #define ARG_MAX 131072 /* # bytes of args + environ for exec() */ --- 1,7 ---- #ifndef _LINUX_LIMITS_H #define _LINUX_LIMITS_H ! #define NR_OPEN 4096 #define NGROUPS_MAX 32 /* supplemental group IDs are available */ #define ARG_MAX 131072 /* # bytes of args + environ for exec() */ diff -rc linux/include/linux/un.h linux.fail/include/linux/un.h *** linux/include/linux/un.h Mon Mar 4 08:16:40 1996 --- linux.fail/include/linux/un.h Sun Dec 29 11:15:11 1996 *************** *** 12,18 **** unsigned int cmsg_len; int cmsg_level; int cmsg_type; ! unsigned char cmsg_data[0]; }; #endif /* _LINUX_UN_H */ --- 12,18 ---- unsigned int cmsg_len; int cmsg_level; int cmsg_type; ! unsigned char cmsg_data[1]; }; #endif /* _LINUX_UN_H */ diff -rc linux/net/ipv4/route.c linux.fail/net/ipv4/route.c *** linux/net/ipv4/route.c Thu May 15 17:05:57 1997 --- linux.fail/net/ipv4/route.c Thu May 15 12:14:02 1997 *************** *** 203,208 **** --- 203,209 ---- fi->fib_prev->fib_next = fi->fib_next; if (fi == fib_info_list) fib_info_list = fi->fib_next; + kfree_s(fi,sizeof(struct fib_info)); } kfree_s(f, sizeof(struct fib_node)); }