Re: VM : killing process ...

Keith Owens (kaos@ocs.com.au)
Sat, 18 Dec 1999 10:35:43 +1100


On Fri, 17 Dec 1999 22:31:00 +0100 (CET),
Frank Bernard <fb@fbit.de> wrote:
>Same effect as before : "VM: killing process modprobe" (50 times),
>then my bash script is executed, goes away and
>"modprobe: modprobe: Can't locate module net-pf-1" (never ending messages)
>appears. (I know, net-pf-1 is "Unix domain sockets")

Sounds like modprobe is calling syslog which needs net-pf-1 which calls
modprobe which calls syslog ... Maciej W. Rozycki found this problem
earlier today and sent me a patch (below). I am looking for a general
solution to the "modutils needs a service which is in a module"
problem, in the meantime try this patch. Current modutils can be found
in ftp://ftp.ocs.com.au/pub/modutils/v2.3.

diff -u --recursive --new-file modutils-2.3.7.macro/util/logger.c modutils-2.3.7/util/logger.c
--- modutils-2.3.7.macro/util/logger.c Wed Aug 25 06:26:49 1999
+++ modutils-2.3.7/util/logger.c Fri Dec 10 01:37:11 1999
@@ -130,6 +130,8 @@
void setsyslog(const char *program)
{
openlog(program, LOG_CONS, LOG_DAEMON);
+#ifdef STOREMSG
atexit(dumpmsg);
+#endif
log = 1;
}

diff -u --recursive --new-file modutils-2.3.7.macro/insmod/modprobe.c modutils-2.3.7/insmod/modprobe.c
--- modutils-2.3.7.macro/insmod/modprobe.c Sun Oct 17 08:47:36 1999
+++ modutils-2.3.7/insmod/modprobe.c Fri Dec 10 03:39:21 1999
@@ -1466,7 +1466,16 @@
break;

case 's':
- setsyslog("modprobe");
+ /*
+ * If we are asked for net-pf-1 (aka unix) then syslogd
+ * is definitely not running, but calling syslog()
+ * would make Linux call request_module("net-pf-1")
+ * again, resulting in something like a forkbomb. So
+ * we do not enable logging.
+ * Not a very clean solution but it works.
+ */
+ if (strcmp(argv[argc - 1], "net-pf-1"))
+ setsyslog("modprobe");
break;

case 'C':

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/