Open spsingh559 opened 10 months ago
@denyeart @bestbeforetoday can you please let me know if this is a definite bug in the go-shim package and what is the tentative timeline for the fix?
I'll leave it to Dave and the other maintainers of this repo to give an authoritative answer.
It looks like fabric-chaincode-go called Invoke on your custom chaincode successfully, and then your chaincode caused a panic. Here's the call into your chaincode and the line that failed:
main.(*Customs).Invoke(0xc0004ac758?, {0xb52448?, 0xc0002ac630}) /chaincode/input/src/main.go:90 +0x59d fp=0xc0004c5e38 sp=0xc0004c59a8 pc=0x8a2add
You'll need to troubleshoot what your chaincode is doing at line 90.
I am doing performance testing for node js-based Fabric Gateway and HLF Network which consist of 2 org and one anchor peer each, sending 2500 tx with the speed of 20-30 tx per second.
We are facing the issue of the chain code container getting terminated when the load is very high.
The current VM infra where HLF Peers and Fabric Gateway adapter is hosted
16 GB RAM, 4 Core CPU
Log of smart contract container getting exit
`goroutine 180834 [running]: runtime.throw({0xa28fb2?, 0xc0004c5568?}) /usr/local/go/src/runtime/panic.go:992 +0x71 fp=0xc0004c5510 sp=0xc0004c54e0 pc=0x435231 runtime.mapassign_faststr(0x974740, 0xc000214030, {0xc0004fe0a8, 0x3}) /usr/local/go/src/runtime/map_faststr.go:295 +0x38b fp=0xc0004c5578 sp=0xc0004c5510 pc=0x4144ab reflect.mapassign_faststr(0x974740, 0xc0004b6270?, {0xc0004fe0a8?, 0xa2c260?}, 0x19?) /usr/local/go/src/runtime/map.go:1357 +0x28 fp=0xc0004c55b0 sp=0xc0004c5578 pc=0x45e688 reflect.Value.SetMapIndex({0x974740?, 0xeb34a0?, 0xffe?}, {0x9504c0, 0xc000344340, 0x98}, {0x9446c0, 0xc0004b6270, 0x197}) /usr/local/go/src/reflect/value.go:2232 +0x225 fp=0xc0004c5638 sp=0xc0004c55b0 pc=0x494445 encoding/json.(decodeState).object(0xc000508000, {0x93b800?, 0xeb34a0?, 0x0?}) /usr/local/go/src/encoding/json/decode.go:816 +0x13d7 fp=0xc0004c5888 sp=0xc0004c5638 pc=0x4ee457 encoding/json.(decodeState).value(0xc000508000, {0x93b800?, 0xeb34a0?, 0x90?}) /usr/local/go/src/encoding/json/decode.go:373 +0x45 fp=0xc0004c58f8 sp=0xc0004c5888 pc=0x4ec0c5 encoding/json.(decodeState).unmarshal(0xc000508000, {0x93b800?, 0xeb34a0?}) /usr/local/go/src/encoding/json/decode.go:180 +0x1de fp=0xc0004c5970 sp=0xc0004c58f8 pc=0x4eb9de encoding/json.Unmarshal({0xc0002d7000, 0xe7c, 0x1000}, {0x93b800, 0xeb34a0}) /usr/local/go/src/encoding/json/decode.go:107 +0x125 fp=0xc0004c59a8 sp=0xc0004c5970 pc=0x4eb4e5 main.(Customs).Invoke(0xc0004ac758?, {0xb52448?, 0xc0002ac630}) /chaincode/input/src/main.go:90 +0x59d fp=0xc0004c5e38 sp=0xc0004c59a8 pc=0x8a2add github.com/hyperledger/fabric-chaincode-go/shim.(Handler).handleTransaction(0xc00007a1e0, 0xc000302d00) /chaincode/input/src/vendor/github.com/hyperledger/fabric-chaincode-go/shim/handler.go:209 +0x1a2 fp=0xc0004c5f40 sp=0xc0004c5e38 pc=0x857722 github.com/hyperledger/fabric-chaincode-go/shim.(Handler).handleTransaction-fm(0x84300c?)