Comments (2)
Thanks for the detailed logs and ways to reproduce the issue.
fixing this one now.
from copernicus.
- reproduced before fix
| => coperctl --notls -s 127.0.0.1:18334 gettxoutsetinfo
==================
WARNING: DATA RACE
Read at 0x00c0001e98c0 by goroutine 81:
github.com/copernet/copernicus/persist/disk.FlushStateToDisk()
/Users/bj1809120051/.go/src/github.com/copernet/copernicus/persist/disk/disk.go:397 +0xd1b
github.com/copernet/copernicus/rpc.handleGetTxoutSetInfo()
/Users/bj1809120051/.go/src/github.com/copernet/copernicus/rpc/rpcblockchain.go:755 +0x86
github.com/copernet/copernicus/rpc.(*Server).standardCmdResult()
/Users/bj1809120051/.go/src/github.com/copernet/copernicus/rpc/rpcserver.go:217 +0x1f6
github.com/copernet/copernicus/rpc.(*Server).jsonRPCRead()
/Users/bj1809120051/.go/src/github.com/copernet/copernicus/rpc/rpcserver.go:378 +0x1d4a
github.com/copernet/copernicus/rpc.(*Server).Start.func1()
/Users/bj1809120051/.go/src/github.com/copernet/copernicus/rpc/rpcserver.go:448 +0x43e
net/http.HandlerFunc.ServeHTTP()
/usr/local/opt/go/libexec/src/net/http/server.go:1964 +0x6f
net/http.(*ServeMux).ServeHTTP()
/usr/local/opt/go/libexec/src/net/http/server.go:2361 +0x2cb
net/http.serverHandler.ServeHTTP()
/usr/local/opt/go/libexec/src/net/http/server.go:2741 +0x34e
net/http.(*conn).serve()
/usr/local/opt/go/libexec/src/net/http/server.go:1847 +0x1f7b
Previous write at 0x00c0001e98c0 by goroutine 76:
runtime.mapassign()
/usr/local/opt/go/libexec/src/runtime/map.go:549 +0x0
github.com/copernet/copernicus/persist.(*PersistGlobal).AddDirtyBlockIndex()
/Users/bj1809120051/.go/src/github.com/copernet/copernicus/persist/global.go:56 +0xb2
github.com/copernet/copernicus/model/chain.(*Chain).AddToIndexMap()
/Users/bj1809120051/.go/src/github.com/copernet/copernicus/model/chain/chain.go:594 +0x969
github.com/copernet/copernicus/logic/lblock.AcceptBlockHeader()
/Users/bj1809120051/.go/src/github.com/copernet/copernicus/logic/lblock/lblock.go:311 +0x3d3
github.com/copernet/copernicus/service.ProcessBlockHeader()
/Users/bj1809120051/.go/src/github.com/copernet/copernicus/service/blockservice.go:19 +0x29e
github.com/copernet/copernicus/net/syncmanager.(*SyncManager).handleHeadersMsg()
-
tests after fix
Tested from clean testnet env, the IBD will 1) get all headers and 2)get historical blocks.- test command:
watch -d -n 5 'coperctl --notls -s 127.0.0.1:18334 gettxoutsetinfo'
test logs:
Every 5.0s: coperctl --notls -s 127.0.0.1:18334 gettxoutsetinfo Tue Dec 18 13:27:01 2018 { "height": 40323, "bestblock": "0000000025e580fdacf8b6f98f59d68333dcbae9e2a918a70eeb544aeac6351f", "transactions": 35537, "txouts": 35558, "bogosize": 4189250, "hash_serialized": "18784f0a4c52fc033864d6f2d72c26708df251799fb3af4d76fb07479882bce6", "disk_size": 2557176, "total_amount": 2016150 }
from copernicus.
Related Issues (20)
- panic: open /root/.bitcoincash/bitcoincash.yml, get GOPATH failed
- data race during unittest /copernicus/net/server.TestOnFilterAdd HOT 1
- Bug of startSync() in syncmanager, when the node has only one peer HOT 2
- [cmpctblock]In order to achieve quicker block relay, we need to send newValidPoWBlock through cmpctblock msg after block accepted
- services flag is not displayed correctly
- Try to read not exists block data during activateBestChain HOT 1
- send inv msg to fetch missing tx HOT 3
- BanDuration has no default value and is not configured
- Self address broadcast function
- Detailed RevertToInv check function HOT 1
- unittest in ./check.sh failed, when there is a Copernicus running on localhost HOT 1
- too much log output related to fetchHeaderBlocks HOT 1
- hang on download headers during IBD HOT 2
- QuickStart issue HOT 1
- Rpc respond 503 Too busy HOT 5
- Send GetHeaders msg once to every peer when pindexBestHeader is 24h near to now HOT 1
- Unit test 'TestAcceptBlockHeader' failed
- misbehave re-checking during p2p msg sending & recving
- Data race in SetMockTime during functional test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from copernicus.