FULL PRODUCT VERSION :
java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux samantm 2.6.16.21-0.15-smp #1 SMP Tue Jul 25 15:28:49 UTC 2006 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Received an assertion failure when attempting to read from a FileChannel.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
This is a difficult bug to reproduce due to the multithreaded nature of the problem. Looking at the source of sun.nio.ch.NativeThreadSet reveals an off-by-one error on line 32. This issue can be resolved by changing
if (used > elts.length) {
to
if (used >= elts.length) {
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No assertion failure.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.AssertionError
at sun.nio.ch.NativeThreadSet.add(NativeThreadSet.java:46)
at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:649)
at com.orchestral.rhapsody.blobstore.file.FileWritableBlob.write(FileWritableBlob.java:115)
at com.orchestral.rhapsody.blobstore.file.rolling.RollingFileWritableBlob.write(RollingFileWritableBlob.java:51)
at com.orchestral.rhapsody.message.internal.MessageImpl.persist(MessageImpl.java:380)
at com.orchestral.rhapsody.execution.communicationpoint.spi.ConnectionExecutorStrategy$2.execute(ConnectionExecutorStrategy.java:52)
at com.orchestral.rhapsody.execution.communicationpoint.spi.ConnectionExecutor.run(ConnectionExecutor.java:110)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
REPRODUCIBILITY :
This bug can be reproduced occasionally.