ChainSafe / ChainBridge

🌉 Modular Multi-Directional Blockchain Bridge to interact with Multiple Networks; Ethereum, Ethereum Classic, Substrate, based chains. Stay tuned for ChainBridge Hub!
GNU Lesser General Public License v3.0
475 stars 300 forks source link

"concurrent map writes" error #780

Closed DmitriyMolch closed 2 years ago

DmitriyMolch commented 2 years ago

Current Behavior

getting "fatal error: concurrent map writes" after application restart

Expected Behavior

no such error

Possible Solution

https://medium.com/@luanrubensf/concurrent-map-access-in-go-a6a733c5ffd1

Steps to Reproduce (for bugs)

  1. Disable internet connection.
  2. Wait "Failed to get events for block" error.
  3. Wait "Polling failed, retries exceeded" error.
  4. Wait "FATAL ERROR. Shutting down".
  5. Wait until the application restarts.
  6. Wait "fatal error: concurrent map writes".

Versions

chainbridge-solidity version: CONTRACTS_REPO="https://github.com/ChainSafe/chainbridge-solidity" CONTRACTS_TAG="v1.0.0"

chainbridge-substrate version: github.com/Cerebellum-Network/chainbridge-substrate-events v0.0.0-20210506100715-541be1ab4476 h1:PLoHoTLiRmwXqCGmjnOY8ZSaMNgrOvqv4qTdAnr+Ns4= github.com/Cerebellum-Network/chainbridge-substrate-events v0.0.0-20210506100715-541be1ab4476/go.mod h1:h67Ya88vt7Czx5Frkp/7AtuJkvG2GA/ra/IBoBfJHAA=

Go version: 1.15.x

P1sar commented 2 years ago

Hello, this version of ChainBridge is stale, I recommend you to check our newer version here https://github.com/ChainSafe/chainbridge-core. It also support V2 of our smart contracts, that are much more efficient

DmitriyMolch commented 2 years ago

Will it fix the bug?