You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Semen Boikov (JIRA)" <ji...@apache.org> on 2016/02/25 08:40:18 UTC
[jira] [Assigned] (IGNITE-2720) TcpDiscoveryMulticastIpFinder is
not thread safe.
[ https://issues.apache.org/jira/browse/IGNITE-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Semen Boikov reassigned IGNITE-2720:
------------------------------------
Assignee: Semen Boikov
> TcpDiscoveryMulticastIpFinder is not thread safe.
> -------------------------------------------------
>
> Key: IGNITE-2720
> URL: https://issues.apache.org/jira/browse/IGNITE-2720
> Project: Ignite
> Issue Type: Bug
> Components: general
> Affects Versions: 1.5.0.final
> Reporter: Vladimir Ozerov
> Assignee: Semen Boikov
> Priority: Critical
> Fix For: 1.6
>
>
> *Problem*
> TcpDiscoveryMulticastIpFinder contains several non-thread-safe collections. E.g. {{reqItfs}} which is a {{HashSet}}.
> And these collections could be accessed from different thread concurrently. E.g., mentioned collection can be accessed from the following methods:
> 1) {{initializeLocalAddresses}} (invoked from {{spiStart}}) - this is already a problem for shared IP finder in case two nodes start in the same JVM.
> 2) {{getRegisteredAddresses}} - accessed from billion places including client reconnect routine.
> As a result we could receive things like that:
> {code}
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
> at java.util.HashMap$KeyIterator.next(HashMap.java:1453)
> at org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.requestAddresses(TcpDiscoveryMulticastIpFinder.java:475)
> at org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.getRegisteredAddresses(TcpDiscoveryMulticastIpFinder.java:431)
> at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.registeredAddresses(TcpDiscoverySpi.java:1603)
> at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.resolvedAddresses(TcpDiscoverySpi.java:1552)
> at org.apache.ignite.spi.discovery.tcp.ClientImpl.joinTopology(ClientImpl.java:475)
> at org.apache.ignite.spi.discovery.tcp.ClientImpl.access$900(ClientImpl.java:118)
> at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.tryJoin(ClientImpl.java:1509)
> at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1328)
> at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
> {code}
> *Solution*
> Investigate access patterns and make multicast IP finder thread-safe. Porbably we have similar problems in other IP finders - need to check that.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)