Adrian,

I finally had some time to test your fix for a couple days. I have some good news and some bad. The good news is that the lost message problem seems to be solved. Thanks again.

The bad news is that the JMS container invoker seems to have a memory leak. After 2-3 hours of switching the MDB on and off using your ant task "startstopdlq", I get an OutOfMemoryError. There does not need to be any messages in the DLQ for this exception to get raised. Logs are below.

Bruce


The output of your ant task is.



[EMAIL PROTECTED]:~/Desktop/restartmdb] $ ant startstopdlq Buildfile: build.xml

startstopdlq:
[java] Exception in thread "main" java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
[java] java.io.EOFException
[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:203)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
[java] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
[java] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
[java] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
[java] at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:58)
[java] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
[java] at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:55)
[java] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
[java] at $Proxy0.invoke(Unknown Source)
[java] at test.client.StartStop.main(StartStop.java:20)
[java] Caused by: java.io.EOFException
[java] at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2165)
[java] at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2634)
[java] at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:734)
[java] at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
[java] at sun.rmi.server.MarshalInputStream.<init>(MarshalInputStream.java:110)
[java] at sun.rmi.transport.ConnectionInputStream.<init>(ConnectionInputStream.java:38)
[java] at sun.rmi.transport.StreamRemoteCall.getInputStream(StreamRemoteCall.java:111)
[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:197)
[java] ... 10 more
[java] Java Result: 1


BUILD SUCCESSFUL
Total time: 144 minutes 40 seconds



The sever log with TRACE logging on org.jboss.jms turned on is.



2003-10-12 00:42:10,360 INFO [org.jboss.ejb.plugins.jms.DLQHandler] Stopping null
2003-10-12 00:42:11,375 DEBUG [org.jboss.jms.jndi.JBossMQProvider] no provider url; connecting to local JNDI
2003-10-12 00:42:11,377 DEBUG [org.jboss.jms.jndi.JBossMQProvider] created context: [EMAIL PROTECTED]
2003-10-12 00:42:11,379 DEBUG [org.jboss.jms.jndi.JBossMQProvider] no provider url; connecting to local JNDI
2003-10-12 00:42:11,379 DEBUG [org.jboss.jms.jndi.JBossMQProvider] created context: [EMAIL PROTECTED]
2003-10-12 00:42:11,380 DEBUG [org.jboss.jms.ConnectionFactoryHelper] using connection factory: [EMAIL PROTECTED]
2003-10-12 00:42:11,380 DEBUG [org.jboss.jms.ConnectionFactoryHelper] using username/password: null/null
2003-10-12 00:42:11,381 DEBUG [org.jboss.jms.ConnectionFactoryHelper] created XAQueueConnection: [EMAIL PROTECTED]
2003-10-12 00:42:11,382 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,382 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,383 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,383 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,383 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,383 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,384 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,384 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,384 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,384 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,385 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,385 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,385 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,385 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,386 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,386 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,386 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,387 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,387 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,387 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,388 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,388 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,388 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,388 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,389 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,389 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,389 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,389 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,389 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,390 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,390 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,390 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,391 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,391 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,391 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,391 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,392 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,392 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,392 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,392 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,393 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,393 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,393 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: [EMAIL PROTECTED]
2003-10-12 00:42:11,393 DEBUG [org.jboss.jms.asf.StdServerSession] initializing (pool, session, xaSession, useLocalTX): [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], false
2003-10-12 00:42:11,394 DEBUG [org.jboss.jms.asf.StdServerSessionPool] added server session to the pool: [EMAIL PROTECTED]
2003-10-12 00:42:11,394 DEBUG [org.jboss.jms.asf.StdServerSessionPool] Server Session pool set up
2003-10-12 00:42:11,395 INFO [org.jboss.ejb.plugins.jms.DLQHandler] Started null
2003-10-12 00:42:12,406 INFO [org.jboss.ejb.plugins.jms.DLQHandler] Stopping null
2003-10-12 00:42:35,526 ERROR [STDERR] java.lang.OutOfMemoryError




















Bruce Slawson wrote:

Thanks Adrian. I'll be testing it out as soon as I can.

Bruce



Adrian Brock wrote:

Hi Bruce,

I found the problem, it is fixed in CVS.
It should be availble from pserver in 24 hours time
or the nightly snapshot if I haven't missed the snapshot time.

The fix is in org.jboss.mq.server.BasicQueue.
It was a race condition. Nothing to do with transactions.

Thanks for testing this, I'm going to leave my machine running the test overnight to confirm the fix.

Regards,
Adrian

On Thu, 2003-10-02 at 18:40, Adrian Brock wrote:


On Thu, 2003-10-02 at 05:35, Bruce Slawson wrote:


Adrian,

Looks like I'm not crazy after all. I was able to recreate the problem running your code. It looks like it has nothing to do with stopping/starting the JMS container invoker. This is what I did to recreate it.

I built your test case and created a single message using "ant send". This causes a single message to thrash back and forth between the main queue and the DLQ. All is good at this point and it will run indefinitely.

The problem occurs after additional load is put on JBoss. What happens is that the message just "disappears" and the logging messages stops. If another app is running a mildly intensive operation or something significant is hot deployed while the thrashing is occurring, it just stops. This is all the indication I get when a finder method was called that returned a dozen or so entity beans. No other messages appear after this.

2003-10-01 16:39:46,669 INFO [test.mdb.MainMDBBean] ID:23-10650515866582586 null
2003-10-01 16:39:46,674 INFO [test.mdb.MainMDBBean] ID:23-10650515866582586 1
2003-10-01 16:39:46,695 INFO [test.mdb.MainMDBBean] ID:23-10650515866582586 2
2003-10-01 16:39:46,700 WARN [org.jboss.ejb.plugins.jms.DLQHandler] Message resent too many times; sending it to DLQ; message id=ID:23-10650515866582586
2003-10-01 16:39:46,703 INFO [test.mdb.DLQMDBBean] ID:2-10650515867013092
2003-10-01 16:39:46,703 DEBUG [org.jboss.resource.adapter.jms.JmsSessionFactoryImpl] [EMAIL PROTECTED], [EMAIL PROTECTED], isTopic=false
2003-10-01 16:39:46,704 DEBUG [org.jboss.resource.adapter.jms.JmsSession] Closing session
2003-10-01 16:39:46,704 DEBUG [org.jboss.resource.adapter.jms.JmsManagedConnection] Sending connection event: 1
2003-10-01 16:39:46,713 DEBUG [org.jboss.mq.SpySession] Session closing.
2003-10-01 16:39:46,716 INFO [test.mdb.MainMDBBean] ID:23-10650515867042587 null
2003-10-01 16:39:46,722 INFO [test.mdb.MainMDBBean] ID:23-10650515867042587 1
2003-10-01 16:39:46,729 INFO [test.mdb.MainMDBBean] ID:23-10650515867042587 2
2003-10-01 16:39:46,734 WARN [org.jboss.ejb.plugins.jms.DLQHandler] Message resent too many times; sending it to DLQ; message id=ID:23-10650515867042587
2003-10-01 16:39:46,743 DEBUG [org.jboss.mq.SpySession] Session closing.
2003-10-01 16:39:46,744 INFO [test.mdb.DLQMDBBean] ID:2-10650515867353093
2003-10-01 16:39:46,744 DEBUG [org.jboss.resource.adapter.jms.JmsSessionFactoryImpl] [EMAIL PROTECTED], [EMAIL PROTECTED], isTopic=false
2003-10-01 16:39:46,744 DEBUG [org.jboss.resource.adapter.jms.JmsSession] Closing session
2003-10-01 16:39:46,744 DEBUG [org.jboss.resource.adapter.jms.JmsManagedConnection] Sending connection event: 1
2003-10-01 16:42:48,201 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
2003-10-01 16:42:48,203 DEBUG [org.jboss.mq.SpySession] Session closing.
2003-10-01 16:42:48,204 DEBUG [org.jboss.mq.SpySession] Session closing.
2003-10-01 16:42:48,204 DEBUG [org.jboss.mq.SpySession] Session closing.
2003-10-01 16:42:48,204 DEBUG [org.jboss.mq.SpySession] Session closing.



Restarting JBoss usually causes the message to reappear and the thrashing to continue. I am running JBoss 3.2.2RC4, Java 1.4.1_01, Mac OS X 10.2.6, PowerBook G4 1Ghz, 1 GB RAM. Hardware resources shouldn't be an issue.



I managed to reproduce this after the message bounced backwards and forwards for an hour. (I've set the deployment scanner to ScanPeriod=0 which means it is continually looping down the deploy/ folder looking for new deployments - at "idle" jboss uses 95% cpu).

It is not a deadlock.

I've enabled TRACE logging for org.jboss.mq but it hasn't reoccured
after 3 hours. Can you try the same thing?
I'm trying two messages to see if this makes it more likely.

It sounds like the tranaction failed to commit, rebooting jboss
causes jdbc2 to recover (rollback) the incomplete transaction.

Regards,
Adrian



Bruce






-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to