[Design of JBossCache] - Re: Common marshalling infrastructure
by david.lloyd@jboss.com
"galder.zamarreno(a)jboss.com" wrote : Yeah, but the problem here is that aftewards, you're treating Primitive Object arrays as serializable and you're not taken advantage of the same performance gains that you applied to primitive arrays.
|
| IOW, in RiverMarshaller.doWriteObject, primitive arrays are treated specially and this is done based on class id coming BASIC_CLASSES. Now, if you don't give the same class IDs or paralell ones to primitive object arrays (Byte[], Integer[]...etc), you're missing out on a performance improvement gain.
|
| Currently, looks to me primitive object arrays would be treated as Serializable.
If you look in RiverMarshaller.doWriteObject() (line 382 in trunk), I check if the object is an array. If so, the descriptor is written, which consists of a one byte marker (ID_OBJECT_ARRAY_TYPE_CLASS) followed by the component type (which, in the case of the wrapper classes, is treated specially so that's one more byte).
After the descriptor, the array is written which is a sequence of the objects, which in the case of primitive wrapper objects, consists of one type byte (looked up in the type map) followed by the literal value of that wrapper object, or one byte for null.
This isn't quite as speed- and space-efficient as a pure primitive array but it should be pretty darn close. Also, it means that an Object[] which is filled with, say, Integer instances will take up no more space than an Integer[]. And one byte plus the int value is just about as dense as I can make this, since each value might be null as well.
I don't see how I can really improve on this, unless it's to do something funky like use a bit vector to mark nulls and then pass in the literal values. But I don't think that'd be worth the gain.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221591#4221591
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221591
16 years, 9 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: intermittent failures i am seeing
by clebert.suconic@jboss.com
I took a thread dump right before the exception:
| [junit] Full thread dump Java HotSpot(TM) 64-Bit Server VM (1.5.0_16-b02 mixed mode):
| [junit]
| [junit] "Thread-0 (group:JBM-async-session-delivery-threads-528574181)" daemon prio=1 tid=0x00007f07f41dda70 nid=0x57a6 waiting on condition [0x00000000424fc000..0x00000000424fce00]
| [junit] at sun.misc.Unsafe.park(Native Method)
| [junit] at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireNanos(AbstractQueuedSynchronizer.java:807)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireNanos(AbstractQueuedSynchronizer.java:1122)
| [junit] at java.util.concurrent.SynchronousQueue$Node.waitForPut(SynchronousQueue.java:291)
| [junit] at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:443)
| [junit] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:475)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
| [junit] at java.lang.Thread.run(Thread.java:595)
| [junit]
| [junit] "Thread-3 (group:jbm-pinger-threads-1155557696)" daemon prio=1 tid=0x00007f07f03772b0 nid=0x57a5 waiting on condition [0x00000000406a9000..0x00000000406a9d80]
| [junit] at sun.misc.Unsafe.park(Native Method)
| [junit] at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1879)
| [junit] at java.util.concurrent.DelayQueue.take(DelayQueue.java:135)
| [junit] at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:504)
| [junit] at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:497)
| [junit] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:470)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
| [junit] at java.lang.Thread.run(Thread.java:595)
| [junit]
| [junit] "Timer-7" daemon prio=1 tid=0x00007f07f03d77e0 nid=0x57a4 in Object.wait() [0x00000000423fb000..0x00000000423fbb00]
| [junit] at java.lang.Object.wait(Native Method)
| [junit] - waiting on <0x00007f0826208b20> (a java.util.TaskQueue)
| [junit] at java.util.TimerThread.mainLoop(Timer.java:509)
| [junit] - locked <0x00007f0826208b20> (a java.util.TaskQueue)
| [junit] at java.util.TimerThread.run(Timer.java:462)
| [junit]
| [junit] "Timer-6" daemon prio=1 tid=0x00007f07f08162c0 nid=0x57a3 in Object.wait() [0x000000004020f000..0x000000004020fa80]
| [junit] at java.lang.Object.wait(Native Method)
| [junit] - waiting on <0x00007f0826204e58> (a java.util.TaskQueue)
| [junit] at java.util.TimerThread.mainLoop(Timer.java:509)
| [junit] - locked <0x00007f0826204e58> (a java.util.TaskQueue)
| [junit] at java.util.TimerThread.run(Timer.java:462)
| [junit]
| [junit] "Thread-0 (group:JBM-scheduled-threads-1818873899)" daemon prio=1 tid=0x00007f07f0377cc0 nid=0x57a2 waiting on condition [0x00000000418c2000..0x00000000418c2c00]
| [junit] at sun.misc.Unsafe.park(Native Method)
| [junit] at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1879)
| [junit] at java.util.concurrent.DelayQueue.take(DelayQueue.java:135)
| [junit] at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:504)
| [junit] at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:497)
| [junit] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:470)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
| [junit] at java.lang.Thread.run(Thread.java:595)
| [junit]
| [junit] "Thread-1 (group:jbm-client-session-threads-1516725303)" daemon prio=1 tid=0x00007f07f0966250 nid=0x579d waiting for monitor entry [0x00000000407aa000..0x00000000407aad80]
| [junit] at org.jboss.messaging.core.client.impl.ClientConsumerImpl.setMessageHandler(ClientConsumerImpl.java:242)
| [junit] - waiting to lock <0x00007f08262bfea8> (a org.jboss.messaging.core.client.impl.ClientConsumerImpl)
| [junit] at org.jboss.messaging.tests.integration.client.ClientSessionStopStartTest$2MyHandler.onMessage(ClientSessionStopStartTest.java:301)
| [junit] at org.jboss.messaging.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:592)
| [junit] at org.jboss.messaging.core.client.impl.ClientConsumerImpl.access$300(ClientConsumerImpl.java:45)
| [junit] at org.jboss.messaging.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:776)
| [junit] at org.jboss.messaging.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:105)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
| [junit] at java.lang.Thread.run(Thread.java:595)
| [junit]
| [junit] "Thread-2 (group:JBM-InVM-Transport-Threads-257798932)" daemon prio=1 tid=0x00007f07f41dca80 nid=0x579c waiting for monitor entry [0x00000000421f9000..0x00000000421f9b00]
| [junit] at org.jboss.messaging.core.client.impl.ClientConsumerImpl.handleMessage(ClientConsumerImpl.java:333)
| [junit] - waiting to lock <0x00007f08262bfea8> (a org.jboss.messaging.core.client.impl.ClientConsumerImpl)
| [junit] at org.jboss.messaging.core.client.impl.ClientSessionImpl.handleReceiveMessage(ClientSessionImpl.java:718)
| [junit] at org.jboss.messaging.core.client.impl.ClientSessionPacketHandler.handlePacket(ClientSessionPacketHandler.java:84)
| [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl$ChannelImpl.handlePacket(RemotingConnectionImpl.java:1535)
| [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl$ChannelImpl.access$600(RemotingConnectionImpl.java:893)
| [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:522)
| [junit] - locked <0x00007f082620c510> (a java.lang.Object)
| [junit] at org.jboss.messaging.core.client.impl.ConnectionManagerImpl$DelegatingBufferHandler.bufferReceived(ConnectionManagerImpl.java:1066)
| [junit] at org.jboss.messaging.core.remoting.impl.invm.InVMConnection$1.run(InVMConnection.java:128)
| [junit] at org.jboss.messaging.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:105)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
| [junit] at java.lang.Thread.run(Thread.java:595)
| [junit]
| [junit] "Thread-2 (group:jbm-pinger-threads-1155557696)" daemon prio=1 tid=0x00007f07f037cc00 nid=0x579a waiting on condition [0x00000000408bc000..0x00000000408bcc00]
| [junit] at sun.misc.Unsafe.park(Native Method)
| [junit] at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1879)
| [junit] at java.util.concurrent.DelayQueue.take(DelayQueue.java:135)
| [junit] at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:504)
| [junit] at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:497)
| [junit] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:470)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
| [junit] at java.lang.Thread.run(Thread.java:595)
| [junit]
| [junit] "Thread-1 (group:jbm-pinger-threads-1155557696)" daemon prio=1 tid=0x00007f07f03758a0 nid=0x5791 waiting on condition [0x0000000041e23000..0x0000000041e23b80]
| [junit] at sun.misc.Unsafe.park(Native Method)
| [junit] at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1879)
| [junit] at java.util.concurrent.DelayQueue.take(DelayQueue.java:135)
| [junit] at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:504)
| [junit] at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:497)
| [junit] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:470)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
| [junit] at java.lang.Thread.run(Thread.java:595)
| [junit]
| [junit] "Thread-0 (group:jbm-client-session-threads-1516725303)" daemon prio=1 tid=0x00007f07f08b7b60 nid=0x5789 waiting on condition [0x00000000420f8000..0x00000000420f8b80]
| [junit] at sun.misc.Unsafe.park(Native Method)
| [junit] at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireNanos(AbstractQueuedSynchronizer.java:807)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireNanos(AbstractQueuedSynchronizer.java:1122)
| [junit] at java.util.concurrent.SynchronousQueue$Node.waitForPut(SynchronousQueue.java:291)
| [junit] at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:443)
| [junit] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:475)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
| [junit] at java.lang.Thread.run(Thread.java:595)
| [junit]
| [junit] "Thread-1 (group:JBM-InVM-Transport-Threads-257798932)" daemon prio=1 tid=0x0000000041a20550 nid=0x5787 waiting on condition [0x0000000040411000..0x0000000040411c80]
| [junit] at sun.misc.Unsafe.park(Native Method)
| [junit] at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireNanos(AbstractQueuedSynchronizer.java:807)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireNanos(AbstractQueuedSynchronizer.java:1122)
| [junit] at java.util.concurrent.SynchronousQueue$Node.waitForPut(SynchronousQueue.java:291)
| [junit] at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:443)
| [junit] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:475)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
| [junit] at java.lang.Thread.run(Thread.java:595)
| [junit]
| [junit] "Thread-0 (group:JBM-InVM-Transport-Threads-257798932)" daemon prio=1 tid=0x00007f07e8002a40 nid=0x5786 waiting on condition [0x0000000041ff7000..0x0000000041ff7e00]
| [junit] at sun.misc.Unsafe.park(Native Method)
| [junit] at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireNanos(AbstractQueuedSynchronizer.java:807)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireNanos(AbstractQueuedSynchronizer.java:1122)
| [junit] at java.util.concurrent.SynchronousQueue$Node.waitForPut(SynchronousQueue.java:291)
| [junit] at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:443)
| [junit] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:475)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
| [junit] at java.lang.Thread.run(Thread.java:595)
| [junit]
| [junit] "Thread-0 (group:jbm-pinger-threads-1155557696)" daemon prio=1 tid=0x00007f07e809d340 nid=0x5785 waiting on condition [0x0000000040310000..0x0000000040310d80]
| [junit] at sun.misc.Unsafe.park(Native Method)
| [junit] at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
| [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1879)
| [junit] at java.util.concurrent.DelayQueue.take(DelayQueue.java:135)
| [junit] at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:504)
| [junit] at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:497)
| [junit] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:470)
| [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
| [junit] at java.lang.Thread.run(Thread.java:595)
| [junit]
| [junit] "Low Memory Detector" daemon prio=1 tid=0x00007f07f0017d60 nid=0x5780 runnable [0x0000000000000000..0x0000000000000000]
| [junit]
| [junit] "CompilerThread1" daemon prio=1 tid=0x00007f07f0016300 nid=0x577f waiting on condition [0x0000000000000000..0x00000000415be560]
| [junit]
| [junit] "CompilerThread0" daemon prio=1 tid=0x00007f07f0014f60 nid=0x577e waiting on condition [0x0000000000000000..0x00000000414bd690]
| [junit]
| [junit] "AdapterThread" daemon prio=1 tid=0x00007f07f0013b90 nid=0x577d waiting on condition [0x0000000000000000..0x0000000000000000]
| [junit]
| [junit] "Signal Dispatcher" daemon prio=1 tid=0x00007f07f00128d0 nid=0x577c waiting on condition [0x0000000000000000..0x0000000000000000]
| [junit]
| [junit] "Finalizer" daemon prio=1 tid=0x0000000041a05d70 nid=0x577b in Object.wait() [0x0000000041d22000..0x0000000041d22a80]
| [junit] at java.lang.Object.wait(Native Method)
| [junit] - waiting on <0x00007f07fae8bb38> (a java.lang.ref.ReferenceQueue$Lock)
| [junit] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:120)
| [junit] - locked <0x00007f07fae8bb38> (a java.lang.ref.ReferenceQueue$Lock)
| [junit] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:136)
| [junit] at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
| [junit]
| [junit] "Reference Handler" daemon prio=1 tid=0x0000000041a05280 nid=0x577a in Object.wait() [0x0000000041c21000..0x0000000041c21c00]
| [junit] at java.lang.Object.wait(Native Method)
| [junit] - waiting on <0x00007f07fadfa540> (a java.lang.ref.Reference$Lock)
| [junit] at java.lang.Object.wait(Object.java:474)
| [junit] at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
| [junit] - locked <0x00007f07fadfa540> (a java.lang.ref.Reference$Lock)
| [junit]
| [junit] "main" prio=1 tid=0x00000000418cfb80 nid=0x576d in Object.wait() [0x00007fff4ae1f000..0x00007fff4ae20620]
| [junit] at java.lang.Object.wait(Native Method)
| [junit] - waiting on <0x00007f08262c5260> (a org.jboss.messaging.utils.Future)
| [junit] at org.jboss.messaging.utils.Future.await(Future.java:45)
| [junit] - locked <0x00007f08262c5260> (a org.jboss.messaging.utils.Future)
| [junit] at org.jboss.messaging.core.client.impl.ClientConsumerImpl.waitForOnMessageToComplete(ClientConsumerImpl.java:543)
| [junit] at org.jboss.messaging.core.client.impl.ClientConsumerImpl.stop(ClientConsumerImpl.java:306)
| [junit] - locked <0x00007f08262bfea8> (a org.jboss.messaging.core.client.impl.ClientConsumerImpl)
| [junit] at org.jboss.messaging.core.client.impl.ClientSessionImpl.stop(ClientSessionImpl.java:624)
| [junit] at org.jboss.messaging.tests.integration.client.ClientSessionStopStartTest.testStopStartConsumerAsyncSync(ClientSessionStopStartTest.java:319)
| [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| [junit] at java.lang.reflect.Method.invoke(Method.java:585)
| [junit] at junit.framework.TestCase.runTest(TestCase.java:164)
| [junit] at junit.framework.TestCase.runBare(TestCase.java:130)
| [junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
| [junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
| [junit] at junit.framework.TestResult.run(TestResult.java:109)
| [junit] at junit.framework.TestCase.run(TestCase.java:120)
| [junit] at junit.framework.TestSuite.runTest(TestSuite.java:230)
| [junit] at junit.framework.TestSuite.run(TestSuite.java:225)
| [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420)
| [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
| [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)
| [junit]
| [junit] "VM Thread" prio=1 tid=0x0000000041a00d90 nid=0x5779 runnable
| [junit]
| [junit] "GC task thread#0 (ParallelGC)" prio=1 tid=0x00000000418ee0f0 nid=0x5771 runnable
| [junit]
| [junit] "GC task thread#1 (ParallelGC)" prio=1 tid=0x00000000418eef70 nid=0x5772 runnable
| [junit]
| [junit] "GC task thread#2 (ParallelGC)" prio=1 tid=0x00000000418efdf0 nid=0x5773 runnable
| [junit]
| [junit] "GC task thread#3 (ParallelGC)" prio=1 tid=0x00000000418f0c70 nid=0x5774 runnable
| [junit]
| [junit] "GC task thread#4 (ParallelGC)" prio=1 tid=0x00000000418f1af0 nid=0x5775 runnable
| [junit]
| [junit] "GC task thread#5 (ParallelGC)" prio=1 tid=0x00000000418f2970 nid=0x5776 runnable
| [junit]
| [junit] "GC task thread#6 (ParallelGC)" prio=1 tid=0x00000000418f37f0 nid=0x5777 runnable
| [junit]
| [junit] "GC task thread#7 (ParallelGC)" prio=1 tid=0x00000000418f4670 nid=0x5778 runnable
| [junit]
| [junit] "VM Periodic Task Thread" prio=1 tid=0x00007f07f001a740 nid=0x5781 waiting on condition
| [junit]
| [junit] Thread-0 (group:jbm-pinger-threads-1155557696) 08:55:45,863 WARN [RemotingConnectionImpl] Connection failure has been detected Did not
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221587#4221587
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221587
16 years, 9 months