exception.c:250: dispatchException: Assertion...

Kevin Gamiel kgamiel at islandedge.com
Wed Jun 14 12:56:14 PDT 2000


Patrick Tullmann wrote:
> 
> > Kaffe: jthread.c:1633: handleIO: Assertion `(__extension__ ({register
> > char __result; __asm__ __volatile__ ("btl %1,%2 ; setcb %b0" : "=q"
> > (__result) : "r" (((int) ((i))) % (8 * sizeof (__fd_mask))), "m" ((( (
> > &readsPending))->__fds_bits)[(((i)) / (8 * sizeof (__fd_mask)))]) :
> > "cc"); __result; }))' failed.
> >
> > Ideas?
> 
> Godmar and I think it might be a problem with mulitple readers blocked
> on the same file descriptor.  Does that sound plausible for your app?
> I'll look into it some more...

Absolutely.  I just found one problem where I am using a Debug object
that writes debugging messages to a single file from a few hundred
different threads.  I was using a PrintWriter but not explicitly closing
the stream after each message was written.  Kaffe is the only vm that
has complained about "too many open files".  I'm now explicitly closing
it each time, and using a static semaphore to wrap the whole log
method.  After fixing that, I'm seeing this now:

Kaffe: locks.c:509: _SemPut: Assertion `lk->count == 0' failed.

Debugging this is a bit tough, as you can imagine, so sorry if I'm not
pinpointing the source of the problem.  It generally works with
blackdown's vm, but there are occasional random oddities, which is why I
started trying other vms.  Here is the general pseudo-structure of the
types of threads in use, should that be helpful:

client
	msgHandlerThread0
		AsyncSocketThread
			SocketReaderThread
	<...>
	msgHandlerThread200
		AsyncSocketThread
			SocketReaderThread

So the client spawns about 200 msgHandlerThreads with, in turn, each
spawn an AsyncSocketThread, which itself manages 3 threads (a timer
during connect, one to connect, one to read data).  All these threads
implement the IEventListener interface, which is a mechanism for passing
events up the thread tree.

Kevin

-- 
Kevin Gamiel                     Email: kgamiel at islandedge.com
Island Edge Research, Inc.       http://www.islandedge.com
Kill Devil Hills, North Carolina Phone: +1-252-449-8969


More information about the kaffe mailing list