FISCO-BCOS / go-sdk

golang SDK of FISCO BCOS
Apache License 2.0
73 stars 58 forks source link

Fix the lock problem asyncHandlers use by changing it to asyncMu #83

Closed skyhuihui closed 4 years ago

skyhuihui commented 4 years ago

fatal error: concurrent map writes

goroutine 620624 [running]: runtime.throw(0x221731b, 0x15) /usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0xc002a30d60 sp=0xc002a30d30 pc=0xd25302 runtime.mapassign_faststr(0x1f4a620, 0xc00036ebd0, 0xc000dde620, 0x20, 0xc0006a2930) /usr/local/go/src/runtime/map_faststr.go:211 +0x3f7 fp=0xc002a30dc8 sp=0xc002a30d60 pc=0xd03c97 github.com/FISCO-BCOS/go-sdk/conn.(channelSession).asyncSendTransaction(0xc000550100, 0x20ce7a0, 0xc001cc5810, 0xc0027f6060, 0x0, 0x0) ../src/github.com/FISCO-BCOS/go-sdk/conn/channel.go:527 +0x1cd fp=0xc002a30eb0 sp=0xc002a30dc8 pc=0x13a507d github.com/FISCO-BCOS/go-sdk/conn.(Connection).AsyncSendTransaction(0xc000970300, 0x2491fa0, 0xc0000440b0, 0xc0027f6060, 0x220f6fc, 0x12, 0xc002c02680, 0x2, 0x2, 0xc001b4ac60, ...)

ghost commented 4 years ago

Sider detected 1 warning on analyzing the commit 71d6eec.

We recommend fixing them as possible by updating the dependencies, configuring the analysis tool, configuring sider.yml, turning off unused tools, and so on.

If you have problems or questions still, feel free to ask us via chat. 💬


You can turn off this notification if you don't want to receive it from now on.

codecov-io commented 4 years ago

Codecov Report

Merging #83 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #83   +/-   ##
=======================================
  Coverage   48.73%   48.73%           
=======================================
  Files          27       27           
  Lines        2136     2136           
=======================================
  Hits         1041     1041           
  Misses        871      871           
  Partials      224      224           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6a4b272...71d6eec. Read the comment docs.