[
https://issues.apache.org/jira/browse/STORM-497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rick Kellogg updated STORM-497:
-------------------------------
Component/s: storm-core
> b.s.m.netty.Server.getMessageQueueId is not thread safe, and can return null
> ----------------------------------------------------------------------------
>
> Key: STORM-497
> URL: https://issues.apache.org/jira/browse/STORM-497
> Project: Apache Storm
> Issue Type: Bug
> Components: storm-core
> Affects Versions: 0.9.3
> Reporter: Robert Joseph Evans
> Priority: Critical
> Fix For: 0.9.3-rc2
>
>
> b.s.m.netty.Server.getMessageQueueId
> https://github.com/apache/incubator-storm/blob/c5c3571ca15ee2dd675fb3cac44bd0f926ccfc67/storm-core/src/jvm/backtype/storm/messaging/netty/Server.java#L132-150
> If there is contention when updating taskToQueueId subsequent threads through
> the synchronized block do not set queueId and the function returns null.
> Also reading from a HashMap while someone else is updating it, even with a
> lock held, can result in a deadlock. I have seen this happen before on
> Hadoop. It is likely to be very rare, but I would rather use transactional
> memory, aka an AtomicReference, to avoid this entirely.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)