[
https://issues.apache.org/activemq/browse/AMQ-2860?page=com.atlassian.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 chunk
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 there
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 checks
of that byte stream whether it is empty or not.
So, it appears that the message gets corrupted somewhere, either at the sender,
or the broker, or the receiver.
Wouldn't it make sense to catch this problem earlier, when message object is
constructed, not at the point when the user code asks for properties?
Unfortunately I cannot produce any simple example that will demonstrate this
problem. I can only say that I have pretty high volume of messages, and my
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 not
critical. But it may become critical for the application where each single
message is important, even if there are millions of them.
===========================================================================================
[2010-09-22 14:49:28.350] ERROR Thread-32
com.moon.data.rtfeed.client.ClientSubscription Problem
processing message ActiveMQMapMessage {commandId = 8197064, responseRequired =
false, messageId =
ID:mcny9.mooncapital.corp-51561-1285170325287-4:1:1:1:8197060,
originalDestination = null, originalTransactionId = null, producerId =
ID:mcny9.mooncapital.corp-51561-1285170325287-4:1:1:1, destination =
topic://MKTDATA, transactionId = null, expiration = 0, timestamp =
1285181368347, arrival = 0, brokerInTime = 1285181368348, brokerOutTime =
1285181368348, correlationId = null, replyTo = null, persistent = false, type =
null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null,
compressed = false, userID = null, content =
org.apache.activemq.util.byteseque...@5ff7f9f, marshalledProperties =
org.apache.activemq.util.byteseque...@4913a2cc, dataStructure = null,
redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true,
readOnlyBody = true, droppable = false} ActiveMQMapMessage{ theTable = {} }
javax.jms.JMSException: java.io.EOFException
at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
at
org.apache.activemq.command.ActiveMQMessage.propertyExists(ActiveMQMessage.java:278)
at
com.moon.data.rtfeed.client.ClientSubscription$JmsMapMessageWrapper.<init>(ClientSubscription.java:497)
at
com.moon.data.rtfeed.client.ClientSubscription$DataTransformer.onMessage(ClientSubscription.java:473)
at
com.moon.data.rtfeed.jms.JmsReceiver$MessageDispatcher.run(JmsReceiver.java:71)
Caused by: java.io.EOFException: null
at java.io.DataInputStream.readInt(DataInputStream.java:375)
at
org.apache.activemq.util.MarshallingSupport.unmarshalPrimitiveMap(MarshallingSupport.java:83)
at
org.apache.activemq.util.MarshallingSupport.unmarshalPrimitiveMap(MarshallingSupport.java:73)
at
org.apache.activemq.command.Message.unmarsallProperties(Message.java:193)
at org.apache.activemq.command.Message.getProperties(Message.java:161)
at
org.apache.activemq.command.ActiveMQMessage.propertyExists(ActiveMQMessage.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 = null". This looks like corrupt message. My sender
> sends messages of the ActiveMQMapMessage type and they all have some
> properties.
> 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.data.rtfeed.client.ClientSubscription Problem
> reading message ActiveMQMapMessage {commandId = 2797499, responseRequired =
> true, messageId =
> ID:mcny9.mooncapital.corp-55291-1280869129156-2:1:1:1:2797495,
> originalDestination = null, originalTransactionId = null, producerId =
> ID:mcny9.mooncapital.corp-55291-1280869129156-2:1:1:1, destination =
> topic://MKTDATA, transactionId = null, expiration = 0, timestamp =
> 1280894513809, arrival = 0, brokerInTime = 1280894513809, brokerOutTime =
> 1280894513809, correlationId = null, replyTo = null, persistent = true, type
> = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId =
> null, compressed = false, userID = null, content =
> org.apache.activemq.util.byteseque...@6f539d49, marshalledProperties =
> org.apache.activemq.util.byteseque...@5a7b5cb8, dataStructure = null,
> redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties =
> true, readOnlyBody = true, droppable = false} ActiveMQMapMessage{ theTable =
> {} } javax.jms.JMSException: java.io.EOFException
> at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
> at
> org.apache.activemq.command.ActiveMQMessage.propertyExists(ActiveMQMessage.java:274)
> at
> com.moon.data.rtfeed.client.ClientSubscription$DataTransformer.onMessage(ClientSubscription.java:463)
> at
> com.moon.data.rtfeed.jms.JmsReceiver$MessageDispatcher.run(JmsReceiver.java:71)
> Caused by: java.io.EOFException: null
> at java.io.DataInputStream.readInt(DataInputStream.java:375)
> at
> org.apache.activemq.util.MarshallingSupport.unmarshalPrimitiveMap(MarshallingSupport.java:83)
> at
> org.apache.activemq.util.MarshallingSupport.unmarshalPrimitiveMap(MarshallingSupport.java:73)
> at
> org.apache.activemq.command.Message.unmarsallProperties(Message.java:189)
> at org.apache.activemq.command.Message.getProperties(Message.java:162)
> at
> org.apache.activemq.command.ActiveMQMessage.propertyExists(ActiveMQMessage.java:272)
> ... 2 common frames omitted
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.