Jim Troutman wrote:
>
> > Which version of iBCS are you using?
> > IIRC ibcs-2.1-981105 crashes under heavy load (4-way
> > PPro, load avg ~40) after a few hours.
>
> I am using that version, on a dual P3-500. Load average on this system
> barely cracks .5, but they haven't really hit it full force yet; migrating
> services/users from SCO. System was up for 40+ days without any problems
> at all before planned downtime recently.
>
> Is there anything in particular aside from a heavy load that tickles the
> problem? Is this a race condition or something else?
>
It's a race condition, and it's triggered by heavy load [and many
cpu's], perhaps only certain syscalls. IIRC the quad-PPro was running
PROGRESS.
I wrote a simple patch, and with this patch the Quad-PPro was stable.
I've attached the patch.
--
Manfred
Only in current: INFO.SMP
diff -u -r 2.1-981105/iBCSemul/emulate.c current/iBCSemul/emulate.c
--- 2.1-981105/iBCSemul/emulate.c Mon Jun 29 23:52:38 1998
+++ current/iBCSemul/emulate.c Sun May 2 17:18:57 1999
@@ -24,6 +24,13 @@
* the Linux TCP/IP stack.
* -- Mike Jagdis ([EMAIL PROTECTED])
*
+ * May 01 1999
+ * Bugfix for Linux 2.2.x:
+ * You must own the kernel lock if you use fget(), fput() etc.
+ * I added lock_kernel() and unlock_kernel() to the main entry
+ * point.
+ * -- Manfred Spraul ([EMAIL PROTECTED])
+ *
* $Id: emulate.c,v 1.41 1998/06/29 21:52:38 jaggy Exp $
* $Source: /u/CVS/ibcs/iBCSemul/emulate.c,v $
*/
@@ -54,6 +61,7 @@
#include <ibcs/ibcs.h>
#include <ibcs/abi4.h>
#include <ibcs/xnx.h>
+#include <asm/smplock.h>
#ifdef EMU_SVR4
#include <ibcs/svr4.h>
@@ -139,6 +147,7 @@
#ifdef IBCS_TRACE
int id = ++ibcs_id;
#endif
+ lock_kernel();
/* First decide which personality map we should be looking
* at by looking at the personality of this process.
@@ -155,6 +164,7 @@
#endif
regs->eflags |= 1; /* Set carry flag */
regs->eax = iABI_errors(EINVAL);
+ unlock_kernel();
return;
}
@@ -180,6 +190,7 @@
#endif
regs->eflags |= 1; /* Set carry flag */
regs->eax = iABI_errors(EINVAL);
+ unlock_kernel();
return;
}
@@ -256,6 +267,7 @@
signr+1, sig_names[signr]);
}
#endif
+ unlock_kernel();
return;
case Spl:
rvalue = ((sysfun_p)kfunc)(regs);
@@ -344,6 +356,7 @@
current->signal.sig[0]);
}
#endif
+ unlock_kernel();
}
diff -u -r 2.1-981105/iBCSemul/solaris.c current/iBCSemul/solaris.c
--- 2.1-981105/iBCSemul/solaris.c Tue Jun 9 23:57:27 1998
+++ current/iBCSemul/solaris.c Sun May 2 17:19:46 1999
@@ -28,6 +28,13 @@
* Linux/SPARC Solaris emulation
* Separated from main program to avoid ifdef mania.
*
+ * May 01 1999
+ * Bugfix for Linux 2.2.x:
+ * You must own the kernel lock if you use fget(), fput() etc.
+ * I added lock_kernel() and unlock_kernel() to the main entry
+ * point. THIS CODE IS UNTESTED.
+ * -- Manfred Spraul ([EMAIL PROTECTED])
+ *
* $Id: solaris.c,v 1.7 1998/06/09 21:57:27 jaggy Exp $
* $Source: /u/CVS/ibcs/iBCSemul/solaris.c,v $
*/
@@ -60,6 +67,7 @@
#include <ibcs/xnx.h>
#include <ibcs/svr4.h>
+#include <asm/smplock.h>
#ifdef IBCS_TRACE
#include <ibcs/trace.h>
@@ -134,6 +142,7 @@
#ifdef IBCS_TRACE
int id = ++ibcs_id;
#endif
+ lock_kernel();
syscall = regs->u_regs [UREG_G1];
#if 0
@@ -141,6 +150,7 @@
#endif
if (syscall > ELEMENTS(Solaris_funcs)){
send_sig(SIGSEGV, current, 1);
+ unlock_kernel();
return;
}
#if 0
@@ -204,6 +214,7 @@
signr+1, sig_names[signr]);
}
#endif
+ unlock_kernel();
return;
case Spl:
rvalue = ((sysfun_p)kfunc)(regs);
@@ -256,6 +267,7 @@
rvalue, rvalue);
#endif
set_result (regs, rvalue);
+ unlock_kernel();
}