Ray, thanks for the answer. I headed for the bookstore today and got myself a copy of Doug Leas' book. The BoundedBufferWithSemaphores class is exactly what I implemented, just way better done. The problem, however, is still here, so at least I don't have the bad feeling that my simpler implementation is the source of failure. Anyway, the book is very useful, thanks for pointing that out.
I'll switch to the IBM JVM now and see what happens. -----Ursprüngliche Nachricht----- Von: Ray Grimmond [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 07. August 2003 00:33 An: [EMAIL PROTECTED] Betreff: Re: Problem with Xerces and threads - any ideas? Johann, I do not think this a xerces problem, I think that you have a problem with how you are synchronizing access to your queue. I have had similar problems in the past with threads and synchronized objects when I was writing some roll-your-own synchronized queues. I think it is an out of resource stack/memory problem caused by recursionand locking, hence the randomness. A must read for this sort of programming is Doug Leas' Concurrent Programming in Java (2nd Edition) ISBN 020131009 I suggest you replace the queue logic get(), put(), etc with something similar from Doug Leas's book to see if the problems go away, Look at pp 130-131 , try his 2 lock queue called LinkedQueue. Hope this helps Ray Grimmond "Swing XMLEditorKit for Java" http://www.qwan.com/XML/XMLEditor.html "Schweigl, Johann" wrote: > Hi all, > > I got stuck in a problem I simply can't handle anymore - maybe someone has > experienced a similar situation. > > I have a java program (tried with VMs from 1.4.2 to 1.3.1 on WinXP) that > uses several threads. One reader thread parses documents and puts the DOM > documents on a queue from where they are fetched from several writer > threads, are serialized and sent to somewhere via http. Queue size is > limited, filling and draining the queue is controlled via Thread.wait() and > Thread.notify(). Parser used is Xerces-J 2.4.0 and, later, 2.5.0. > > What happens is that the JVM crashes at some random point in time. Sometimes > only the JVM, sometimes Win XP as a whole. The only case where I got some > useful data was when I ran the whole thing in the Eclipse debugger, which > gave me the dump at the end of the message. I don't know if Xerces really is > the problem here, but I have no clue, so I'm trying to collect input from > everywhere. > > The documents in the queue are not accessed concurrently, the put and get > methods of the queue are synchronized and defered node expansion is turned > off. No runtime exception occurs. Thats all what I've got, does it ring > anyone's bell? > > Best regards, > Johann --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]