contractStateTypeMappings etc in the NodeVaultService is not thread safe

Description

As experienced by a partner:

Caused by: java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719) ~[?:1.8.0_222]
at java.util.LinkedHashMap$LinkedEntryIterator.next(LinkedHashMap.java:752) ~[?:1.8.0_222]
at java.util.LinkedHashMap$LinkedEntryIterator.next(LinkedHashMap.java:750) ~[?:1.8.0_222]
at net.corda.node.services.vault.NodeVaultService$start$1.call(NodeVaultService.kt:808) ~[corda-node-4.0.20190
603_openj9.jar:?]
at net.corda.node.services.vault.NodeVaultService$start$1.call(NodeVaultService.kt:54) ~[corda-node-4.0.201906
03_openj9.jar:?]
at rx.internal.util.ActionSubscriber.onNext(ActionSubscriber.java:39) ~[rxjava-1.3.8.jar:1.3.8]
at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134) ~[rxjava-1.3.8.jar:1.3.8]
... 44 more

It's a bit hard to line up the line numbers potentially as getting precisely the correct version might be difficult ( might know the precise source version), but the `contractStateTypeMappings` use non-concurrent friendly types, so I bet it's that.

Assignee

Jose Coll

Reporter

Rick Parker

Labels

None

Priority

Highest

Ported to...

Corda 4.1
Corda Enterprise 4.1
Corda Enterprise 4.2

Feature Team

Performance and Platform Sustainability

CVSS Vector

None

Engineering Teams

None

Severity

High

Affects versions

Configure