> ----- Original Message -----
> From: "Harmeet Bedi" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, March 21, 2001 1:58 AM
> Subject: possible problem with scheduler.
> 
> 
> > Test Done.
> > ========
> > 1.
> > Hit refresh repeatedly in Outlook express Email Client. This exercised
> the
> > POP3 Server. The mail client indicated error in a random mannner
> but
> > frequently.
> > 2. Wrote automated test to stess and relibly reproduce POP Server
> problem.
> > Here is the test.
> > --------------------------------------
> > from poplib import POP3
> > import thread
> > from java.lang import Thread
> > def multipop(thread_count=1,seq=3):
> >     if thread_count == 1:
> >         for i in range(seq):
> >             print Thread.currentThread().getName(),i
> >             pop()
> >     else:
> >         for i in range(thread_count):
> >             thread.start_new_thread(mpop,(1,seq))
> >
> > def pop(server='localhost',userid='harmeet',password='harmeet'):
> >     a = POP3(server)
> >     print a.getwelcome()
> >     a.user(userid)
> >     a.pass_(password)
> >     a.list()
> >     (numMsgs, totalSize) = a.stat()
> >     for i in range(1, numMsgs + 1):
> >         (header, msg, octets) = a.retr(i)
> >         print "Message ", `i`, ':'
> >         for line in msg:
> >             print '   ' + line
> >         print '-----------------------'
> >         a.quit()
> > --------------------------------------------------------
> >
> > ran this test as
> > // hit pop server with 1 thread, each thread making 3 requests
> > pop()
> > // hit pop server with 5 threads, each thread making 5 requests
> > pop(5,5)
> > // hit pop server with 10 threads, each thread making 10 requests
> > pop(10,10)
> >
> > Test Result
> > ========
> > Got error response back. Modified code to dump stack trace.
> > Here are the interesting stack traces.
> > -----------------------------------------
> > java.lang.ArrayIndexOutOfBoundsException
> > at
> org.apache.avalon.util.BinaryHeap.percolateUpMinHeap(BinaryHeap.java:209)
> > at org.apache.avalon.util.BinaryHeap.insert(BinaryHeap.java:88)
> > at
> >
> org.apache.cornerstone.blocks.scheduler.DefaultTimeScheduler.rescheduleEntry
> > (DefaultTimeScheduler.java:130)
> > at
> >
> org.apache.cornerstone.blocks.scheduler.DefaultTimeScheduler.resetTrigger(De
> > faultTimeScheduler.java:101)
> > at
> >
> org.apache.james.pop3server.POP3Handler.handleConnection(POP3Handler.java:15
> > 0)
> > at
> >
> org.apache.cornerstone.blocks.connection.ConnectionRunner.run(Connection.jav
> > a:128)
> > at org.apache.avalon.util.thread.WorkerThread.run(WorkerThread.java:76)
> >
> > not as frequently, but this was another stack trace
> > java.lang.NullPointerException
> > at
> >
> org.apache.cornerstone.blocks.scheduler.TimeScheduledEntry.compareTo(TimeSch
> > eduledEntry.java:106)
> > at
> org.apache.avalon.util.BinaryHeap.percolateUpMinHeap(BinaryHeap.java:212)
> > at org.apache.avalon.util.BinaryHeap.insert(BinaryHeap.java:88)
> > at
> >
> org.apache.cornerstone.blocks.scheduler.DefaultTimeScheduler.rescheduleEntry
> > (DefaultTimeScheduler.java:130)
> > at
> >
> org.apache.cornerstone.blocks.scheduler.DefaultTimeScheduler.addTrigger(Defa
> > ultTimeScheduler.java:69)
> > at
> >
> org.apache.james.pop3server.POP3Handler.handleConnection(POP3Handler.java:14
> > 5)
> > at
> >
> org.apache.cornerstone.blocks.connection.ConnectionRunner.run(Connection.jav
> > a:128)
> > at org.apache.avalon.util.thread.WorkerThread.run(WorkerThread.java:76)
> > ----------------------------
> >
> > These stack traces don't occur if there is a gap in client requests
> or in
> a
> > single client request. To me this indicates potential problems with
> > DefaultTimeScheduler. Has anyone seen such traces.
> >
> > My code is a few days old, but I did get the latest code and compare
> the
> > changes. Did not upgrade. There seem to be inconsistency between
> Avalon
> and
> > James codebase.
----------------------------------------------------------------------

I thought i fixed this. It looks like a un-'synchronized' binary heap
problem. Did you get the latest version of 'avalonapi.jar' and 'cornerstone.bar'
?

I updated the jakarta-avalon-phoenix and jakarta-avalon-cornerstone with
the latest version of the 'avalonapi.jar'. For the latest version of
the 'cornerstone.bar' , please get the current jakarta-avalon-cornerstone
and regenerate 'cornerstone.bar'. ( I think Charles just updated these
in james...but not sure where he got those from...).

Let me know if its still a problem.

Thanks,
Ram.

___________________________________________________________
FREE voicemail, email and fax, all in one place.  Sign Up Now! http://www.mybc.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to