Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 16545 invoked from network); 22 Sep 2010 19:42:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Sep 2010 19:42:06 -0000 Received: (qmail 34340 invoked by uid 500); 22 Sep 2010 19:42:06 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 34295 invoked by uid 500); 22 Sep 2010 19:42:06 -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 34287 invoked by uid 99); 22 Sep 2010 19:42:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Sep 2010 19:42:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Sep 2010 19:42:02 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8MJfe1T016535 for ; Wed, 22 Sep 2010 19:41:41 GMT Message-ID: <31921786.28911285184500450.JavaMail.jira@thor> Date: Wed, 22 Sep 2010 15:41:40 -0400 (EDT) From: "Leonid Ilyevsky (JIRA)" To: dev@activemq.apache.org Subject: [jira] Updated: (AMQ-2860) EOFException and ActiveMQMapMessage with null properties In-Reply-To: <11318447.58271281058634436.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-2860?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leonid Ilyevsky updated AMQ-2860: --------------------------------- Affects Version/s: 5.4.1 (was: 5.3.2) Today I upgraded to 5.4.1, and I see that the problem is still there. Below is an example from today's log. I also looked at the source code. The problem obviously appears when the ch= unk of the byte stream that is supposed to contain marshaled properties is = actually empty, so the readInt() throws exception. Here is what I think (correct me if I am wrong). It is not normal for a message not to have properties object at all; if the= re are no properties, at least that integer you are trying to read from the= stream should be there and equal to zero. Seems like developers had the same assumption, because nowhere I see any ch= ecks of that byte stream whether it is empty or not. So, it appears that the message gets corrupted somewhere, either at the sen= der, or the broker, or the receiver. Wouldn't it make sense to catch this problem earlier, when message object i= s constructed, not at the point when the user code asks for properties? Unfortunately I cannot produce any simple example that will demonstrate thi= s problem. I can only say that I have pretty high volume of messages, and m= y consumers use selectors on topics. I have 3 consumers in separate JVMs. The rate of this error is not high, so for many applications it might be no= t critical. But it may become critical for the application where each singl= e message is important, even if there are millions of them. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [2010-09-22 14:49:28.350] ERROR Thread-32 com.moon.data= .rtfeed.client.ClientSubscription Problem processing mes= sage ActiveMQMapMessage {commandId =3D 8197064, responseRequired =3D false,= messageId =3D ID:mcny9.mooncapital.corp-51561-1285170325287-4:1:1:1:819706= 0, originalDestination =3D null, originalTransactionId =3D null, producerId= =3D ID:mcny9.mooncapital.corp-51561-1285170325287-4:1:1:1, destination =3D= topic://MKTDATA, transactionId =3D null, expiration =3D 0, timestamp =3D 1= 285181368347, arrival =3D 0, brokerInTime =3D 1285181368348, brokerOutTime = =3D 1285181368348, correlationId =3D null, replyTo =3D null, persistent =3D= false, type =3D null, priority =3D 4, groupID =3D null, groupSequence =3D = 0, targetConsumerId =3D null, compressed =3D false, userID =3D null, conten= t =3D org.apache.activemq.util.ByteSequence@5ff7f9f, marshalledProperties = =3D org.apache.activemq.util.ByteSequence@4913a2cc, dataStructure =3D null,= redeliveryCounter =3D 0, size =3D 0, properties =3D null, readOnlyProperti= es =3D true, readOnlyBody =3D true, droppable =3D false} ActiveMQMapMessage= { theTable =3D {} } javax.jms.JMSException: java.io.EOFException at org.apache.activemq.util.JMSExceptionSupport.create(JMSException= Support.java:62) at org.apache.activemq.command.ActiveMQMessage.propertyExists(Activ= eMQMessage.java:278) at com.moon.data.rtfeed.client.ClientSubscription$JmsMapMessageWrap= per.(ClientSubscription.java:497) at com.moon.data.rtfeed.client.ClientSubscription$DataTransformer.o= nMessage(ClientSubscription.java:473) at com.moon.data.rtfeed.jms.JmsReceiver$MessageDispatcher.run(JmsRe= ceiver.java:71) Caused by: java.io.EOFException: null at java.io.DataInputStream.readInt(DataInputStream.java:375) at org.apache.activemq.util.MarshallingSupport.unmarshalPrimitiveMa= p(MarshallingSupport.java:83) at org.apache.activemq.util.MarshallingSupport.unmarshalPrimitiveMa= p(MarshallingSupport.java:73) at org.apache.activemq.command.Message.unmarsallProperties(Message.= java:193) at org.apache.activemq.command.Message.getProperties(Message.java:1= 61) at org.apache.activemq.command.ActiveMQMessage.propertyExists(Activ= eMQMessage.java:276) ... 3 common frames omitted > EOFException and ActiveMQMapMessage with null properties > -------------------------------------------------------- > > Key: AMQ-2860 > URL: https://issues.apache.org/activemq/browse/AMQ-2860 > Project: ActiveMQ > Issue Type: Bug > Affects Versions: 5.4.1 > Environment: Linux > Reporter: Leonid Ilyevsky > > I am getting an error once in a while (see the log below). > I have an impression that the EOFException is caused by the fact that the= message has "properties =3D null". This looks like corrupt message. My sen= der sends messages of the ActiveMQMapMessage type and they all have some pr= operties. > This happens to a small number of messages (compare to overall traffic), = but very consistently. I handle the exception, but the information is lost. > [2010-08-04 00:01:53.810] ERROR Thread-36 com.moon.da= ta.rtfeed.client.ClientSubscription Problem reading mess= age ActiveMQMapMessage {commandId =3D 2797499, responseRequired =3D true, m= essageId =3D ID:mcny9.mooncapital.corp-55291-1280869129156-2:1:1:1:2797495,= originalDestination =3D null, originalTransactionId =3D null, producerId = =3D ID:mcny9.mooncapital.corp-55291-1280869129156-2:1:1:1, destination =3D = topic://MKTDATA, transactionId =3D null, expiration =3D 0, timestamp =3D 12= 80894513809, arrival =3D 0, brokerInTime =3D 1280894513809, brokerOutTime = =3D 1280894513809, correlationId =3D null, replyTo =3D null, persistent =3D= true, type =3D null, priority =3D 4, groupID =3D null, groupSequence =3D 0= , targetConsumerId =3D null, compressed =3D false, userID =3D null, content= =3D org.apache.activemq.util.ByteSequence@6f539d49, marshalledProperties = =3D org.apache.activemq.util.ByteSequence@5a7b5cb8, dataStructure =3D null,= redeliveryCounter =3D 0, size =3D 0, properties =3D null, readOnlyProperti= es =3D true, readOnlyBody =3D true, droppable =3D false} ActiveMQMapMessage= { theTable =3D {} } javax.jms.JMSException: java.io.EOFException > at org.apache.activemq.util.JMSExceptionSupport.create(JMSExcepti= onSupport.java:62) > at org.apache.activemq.command.ActiveMQMessage.propertyExists(Act= iveMQMessage.java:274) > at com.moon.data.rtfeed.client.ClientSubscription$DataTransformer= .onMessage(ClientSubscription.java:463) > at com.moon.data.rtfeed.jms.JmsReceiver$MessageDispatcher.run(Jms= Receiver.java:71) > Caused by: java.io.EOFException: null > at java.io.DataInputStream.readInt(DataInputStream.java:375) > at org.apache.activemq.util.MarshallingSupport.unmarshalPrimitive= Map(MarshallingSupport.java:83) > at org.apache.activemq.util.MarshallingSupport.unmarshalPrimitive= Map(MarshallingSupport.java:73) > at org.apache.activemq.command.Message.unmarsallProperties(Messag= e.java:189) > at org.apache.activemq.command.Message.getProperties(Message.java= :162) > at org.apache.activemq.command.ActiveMQMessage.propertyExists(Act= iveMQMessage.java:272) > ... 2 common frames omitted --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.