[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: image crash



> On Monday 15 October 2001 21:21, you wrote:
> >
> > Comment out the assert.  Even without the printf, that would tell you
> > whether the code got recompiled or not.  If we determine that the code
> > really is getting correctly rebuilt, then we can go to Plan B, which is
> > to have you build and try your kernel in our testbed environment (see
> > www.emulab.net).  That way we can get direct access to your kernel and
> > try things out.
> 
> I commented out the assert, and the error has changed:
> 
> Janosvm-0.5.1/kaffe/janosvm/jteam.c:1071:unregisterTeamThread(): precondition 
> failed: jt->liveThreads > 0

try this:

Index: janosvm/kaffe/kaffevm/systems/nodeos-threads/anjthread_create.c
diff -u
janosvm/kaffe/kaffevm/systems/nodeos-threads/anjthread_create.c:1.8
janosvm/kaffe/kaffevm/systems/nodeos-threads/anjthread_create.c:1.9
--- janosvm/kaffe/kaffevm/systems/nodeos-threads/anjthread_create.c:1.8
Fri Apr  6 16:23:46 2001
+++ janosvm/kaffe/kaffevm/systems/nodeos-threads/anjthread_create.c
Tue Oct  9 13:55:22 2001
@@ -320,6 +320,7 @@
 	/* XXX check that team isn't dying? */
 
 	/* XXX function defined in ../../thread.c: */
+	allowTeamThread(currentTeam());
 	va_start(argptr, runmethod);
 	threadEnterVM_valist(jthread_getcookie(jthread_current()),
 			     startArg, runmethod, argptr);
@@ -332,7 +333,8 @@
 anjthread_enterkaffe_c(void)
 {
 	jthread_t tid = jthread_current();
-
+	int allowed;
+	
 	assert(tid->stackptr);
         tid->daemon = 0;
 
@@ -363,10 +365,9 @@
 	if ((tid->flags & JTHREAD_FLAG_INTR_MASK) != 0)
 		jthread_handleInterrupt(tid);
 	jthread_spinoff(tid);
-	
-	registerTeamThread(currentTeam(),
-			   jthread_current(),
-			   unhand(tid)->daemon);
+
+	allowed = allowTeamThread(currentTeam());
+	assert(allowed);
 	pushTeamReservation(currentTeam());
 }
 
Index: janosvm/kaffe/kaffevm/systems/nodeos-threads/anjthread_end.c
diff -u janosvm/kaffe/kaffevm/systems/nodeos-threads/anjthread_end.c:1.10
janosvm/kaffe/kaffevm/systems/nodeos-threads/anjthread_end.c:1.11
--- janosvm/kaffe/kaffevm/systems/nodeos-threads/anjthread_end.c:1.10
Thu Mar 22 17:06:07 2001
+++ janosvm/kaffe/kaffevm/systems/nodeos-threads/anjthread_end.c
Tue Oct  9 13:55:22 2001
@@ -126,7 +126,9 @@
 
 	/* Wake up the team terminator */
 	if( tid->threadData.flags & TDF_ZOMBIE )
+	{
 		signalTeam(tid->threadData.ownerTeam,
SIGNAL_THREAD_DEATH);
+	}
 	
 	if ((jthread_talive == jthread_tdaemon)
 	    && (!tid->daemon)) {


> cheers...
> 
> Andreas
> 

tim stack




[ Janos ] [ OSKit ] [ Network Testbed ] [ Flick ] [ Fluke ]
Flux Research Group / Department of Computer Science / University of Utah