Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 70295 invoked from network); 30 Mar 2010 06:03:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Mar 2010 06:03:32 -0000 Received: (qmail 53601 invoked by uid 500); 30 Mar 2010 06:03:31 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 53402 invoked by uid 500); 30 Mar 2010 06:03:30 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 53391 invoked by uid 99); 30 Mar 2010 06:03:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Mar 2010 06:03:29 +0000 X-ASF-Spam-Status: No, hits=-1170.8 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Mar 2010 06:03:28 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 60BD6234C4AD for ; Tue, 30 Mar 2010 06:03:08 +0000 (UTC) Message-ID: <1419426417.6761269928988394.JavaMail.jira@brutus.apache.org> Date: Tue, 30 Mar 2010 06:03:08 +0000 (UTC) From: "Rob Davies (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQ-2679) "VMTransport" NullPointerException from ActiveMQSessionExecutor.wakeup In-Reply-To: <1044142632.6471269873188106.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/AMQ-2679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58555#action_58555 ] Rob Davies commented on AMQ-2679: --------------------------------- Does look like it could be a timing issue - can fix in trunk. We don't go back to previous major versions and do releases generally. > "VMTransport" NullPointerException from ActiveMQSessionExecutor.wakeup > ---------------------------------------------------------------------- > > Key: AMQ-2679 > URL: https://issues.apache.org/activemq/browse/AMQ-2679 > Project: ActiveMQ > Issue Type: Bug > Components: Broker, Geronimo Integration > Affects Versions: 4.1.2 > Environment: AMQ 4.1.2 embedded in Geronimo 2.1.3, SuSE Linux 11 > Reporter: TH L. > > setup in Geronimo deployment plan with > {quote} > vm://localhost?async=true&jms.asyncDispatch=false&jms.copyMessageOnSend=false&jms.watchTopicAdvisories=false > {quote} > I use only JMS send/reply pattern: > {quote} > connection = factory.createQueueConnection(); > connection.start(); > session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); > sender = session.createSender(requestQueue); > replyQueue = session.createTemporaryQueue(); > jmsRequestMessage = session.createTextMessage(); > sender.send(jmsRequestMessage, DeliveryMode.NON_PERSISTENT, Message.DEFAULT_PRIORITY, timeToLive); > receiver = session.createReceiver(replyQueue); > jmsReplyMessage = receiver.receive(); > connection.close(); > {quote} > When the message traffic get huge (or the server is under intensive computing), I would got such NPE > {quote} > Exception in thread "VMTransport" java.lang.NullPointerException > at org.apache.activemq.ActiveMQSessionExecutor.wakeup(ActiveMQSessionExecutor.java:76) > at org.apache.activemq.ActiveMQSessionExecutor.execute(ActiveMQSessionExecutor.java:61) > at org.apache.activemq.ActiveMQSession.dispatch(ActiveMQSession.java:1344) > at org.apache.activemq.ActiveMQConnection.onCommand(ActiveMQConnection.java:1485) > at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:95) > at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:65) > at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:201) > at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:120) > at org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26) > at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:47) > at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) > at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) > at java.lang.Thread.run(Thread.java:619) > {quote} > setting _jms.asyncDispatch=false_ may ease the problem, but the NPE still happens.. > as comment from kevan http://n3.nabble.com/sudden-NullPointerException-from-ActiveMQSessionExecutor-wakeup-tt676485.html#a676966 > It could be a timing hole in ActiveMQSessionExecutor. > possible fix from kevan > {quote} > Index: activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java > =================================================================== > --- activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java (revision 663068) > +++ activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java (working copy) > @@ -118,10 +118,14 @@ > try { > if (messageQueue.isRunning()) { > messageQueue.stop(); > - if (taskRunner != null) { > - taskRunner.shutdown(); > - taskRunner = null; > + TaskRunner tempTaskRunner; > + synchronized (this) { > + tempTaskRunner = this.taskRunner; > + this.taskRunner = null; > } > + if (tempTaskRunner != null) { > + tempTaskRunner.shutdown(); > + } > } > } catch (InterruptedException e) { > Thread.currentThread().interrupt(); > {quote} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.