From: Jonathan Sambrook (jonathan.sambrook_at_dsvr.co.uk)
Date: Mon 24 Nov 2003 - 22:30:21 GMT
As you may remember, DSVR use the s_context kernel patch in an extremely
non-standard manner. This means we stress the s_context patch in
different ways to the standard vserver userspace utils (of either
flavour).
I've been being driver mad for months by a system lockup which occurs on
some machines but not others. The hardware configs don't seem to matter.
Neither is there an obvious pattern in the load levels. Some machines
have been up for several months, others fail within hours. As you can
guess, we don't currently boot onto s_context kernels :)
Much (and I do mean much) head scratching later, I generated a perl
script (using our s_context perl module) which reliably reproduces the
problem on our system.
I've had lkcd and kgdb on to this, but so far no joy in locating the
cause of the lockup, other than noting that the scheduler ceases to get
called.
At this point you're probably thinking something like: "So what? He's
b*ll1xed up his moddifications to the vanilla s_context stuff. What's
this got to do with me?".
Having battered my head against this problem for long enough, I've
finally gotten around to re-writing my perl script in C so as to test a
vanilla 2.4.20 + vanilla ctx17f. It locks up like the proverbial kipper
- kgdb still functions, but the scheduler ain't called.
Any assistance gratefully received - you may just save my sanity :)
Regards,
Jonathan
//----------------------------------------------------------------------
#include <stdio.h>
#include <unistd.h>
#include "vutil.h"
void start_ctx (int ctx_in) {
int ctxs[16];
int pid = fork ();
int ctx = 0;
ctxs[0] = -1;
switch (pid) {
case 0:
case -1:
break;
default:
ctx = call_new_s_context(1,ctxs,0,0);
printf ("ctx: %d\n", ctx);
exit (0);
}
}
void loop () {
printf( "loop()\n");
while (1) {
start_ctx (0);
}
}
int main (int argc, char ** argv) {
int i = 2;
signal (SIGCHLD, SIG_IGN);
while (i--) {
if (!fork()) {
loop ();
}
}
while (1) {
printf ("%d\r", ++i);
fflush (stdout);
sleep (1);
}
}
//----------------------------------------------------------------------
-- Jonathan Sambrook Software Developer Designer Servers