Bugs item #745644, was opened at 2003-05-29 13:31 Message generated for change (Comment added) made by jamoville You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=745644&group_id=22866
Category: JBossMQ Group: None Status: Open Resolution: None Priority: 5 Submitted By: john hutchinson (jamoville) Assigned to: Nobody/Anonymous (nobody) Summary: bug 745527 race condition with BasicQueue not fixed Initial Comment: This bug is not fixed - I looked at the latest code in cvs and the code has not been changed. While you did fix a deadlock situation in the BasicQueue class you missed fixing the one I was mentioning. Specifically the methods: hasUnackedMessages and checkRemovedSubscribers when these methods are called by two different threads a deadlock happens. You should be synchronizing on the methods. You are causing too much context switching and it's killing performance. You also wouldn't have to be doing all those nested synchronizations. here is the stack trace: FOUND A JAVA LEVEL DEADLOCK: ---------------------------- "Thread-186": waiting to lock monitor 0x8ed8f4 (object 0x3395af8, a java.util.HashSet), which is locked by "Thread-184" "Thread-184": waiting to lock monitor 0x8eda14 (object 0x3395a68, a java.util.HashMap), which is locked by "Thread-186" JAVA STACK INFORMATION FOR THREADS LISTED ABOVE: ------------------------------------------------ Java Stack for "Thread-186": ========== at org.jboss.mq.server.BasicQueue.checkRemovedSubscri bers(BasicQueue.java:508) at org.jboss.mq.server.BasicQueue.acknowledge (BasicQueue.java:404) at org.jboss.mq.server.JMSQueue.acknowledge (JMSQueue.java:114) at org.jboss.mq.server.ClientConsumer.acknowledge (ClientConsumer.java:328) at org.jboss.mq.server.JMSDestinationManager.acknowledg e(JMSDestinationManager.java:529) at org.jboss.mq.server.JMSDestinationManager.acknowledg e(JMSDestinationManager.java:513) at org.jboss.mq.server.JMSServerInterceptorSupport.ackno wledge(JMSServerInterceptorSupport.java:197) at org.jboss.mq.server.TracingInterceptor.acknowledge (TracingInterceptor.java:405) at org.jboss.mq.server.JMSServerInvoker.acknowledge (JMSServerInvoker.java:199) at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handle Msg(ServerSocketManagerHandler.java:81) at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMs g(SocketManager.java:355) at org.jboss.mq.il.uil2.msgs.BaseMsg.run (BaseMsg.java:377) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Work er.run(PooledExecutor.java:732) at java.lang.Thread.run(Thread.java:479) Java Stack for "Thread-184": ========== at org.jboss.mq.server.BasicQueue.hasUnackedMessages (BasicQueue.java:500) at org.jboss.mq.server.BasicQueue.removeSubscriber (BasicQueue.java:178) at org.jboss.mq.server.JMSQueue.removeSubscriber (JMSQueue.java:60) at org.jboss.mq.server.ClientConsumer.removeSubscription (ClientConsumer.java:253) at org.jboss.mq.server.JMSDestinationManager.unsubscrib e(JMSDestinationManager.java:624) at org.jboss.mq.server.JMSServerInterceptorSupport.unsub scribe(JMSServerInterceptorSupport.java:249) at org.jboss.mq.server.TracingInterceptor.unsubscribe (TracingInterceptor.java:548) at org.jboss.mq.server.JMSServerInvoker.unsubscribe (JMSServerInvoker.java:251) at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handle Msg(ServerSocketManagerHandler.java:171) at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMs g(SocketManager.java:355) at org.jboss.mq.il.uil2.msgs.BaseMsg.run (BaseMsg.java:377) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Work er.run(PooledExecutor.java:732) at java.lang.Thread.run(Thread.java:479) Found 1 deadlock. ---------------------------------------------------------------------- >Comment By: john hutchinson (jamoville) Date: 2003-05-29 13:37 Message: Logged In: YES user_id=733441 Just an FYI - each synch causes four byte code instruction and you have synch code that has four syncs. this will generate 16 byte code instruction. Sychronizing on the method will reduce this by 75% ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=745644&group_id=22866 ------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
