Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashed while adding subscription - concurrent map writes #201

Open
awrichar opened this issue Feb 24, 2022 · 0 comments
Open

Crashed while adding subscription - concurrent map writes #201

awrichar opened this issue Feb 24, 2022 · 0 comments

Comments

@awrichar
Copy link
Contributor

Log snippet:

[2022-02-23T23:34:59.080Z]  INFO Created subscription ID:sb-0c2ea6bc-0561-42d1-6bb8-4ecbfa758b66 name:token:N3:TokenCreate topic:0xe082356ebb2bed4d4d4ee46f31f91ab6b3fd1dcbcda3c0e9d1f388d8da9d1738
[2022-02-23T23:34:59.080Z]  INFO Created subscription ID:sb-fb5f6eae-a043-4eb3-751f-67d36355bc6d name:token:N3:TransferBatch topic:0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb
[2022-02-23T23:34:59.080Z]  INFO Created subscription ID:sb-0b28772f-190c-4c7a-6dca-275c7ebae912 name:token:N3:TransferSingle topic:0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62
fatal error: concurrent map writes
[2022-02-23T23:34:59.082Z]  INFO <-- POST /contracts/erc1155/TransferSingle [200]
[2022-02-23T23:34:59.082Z] DEBUG <-- {"created":"2022-02-23T23:34:59Z","id":"sb-0b28772f-190c-4c7a-6dca-275c7ebae912","path":"/subscriptions/sb-0b28772f-190c-4c7a-6dca-275c7ebae912","name":"token:N3:TransferSingle","stream":"es-5a697a10-a9cc-4fe8-4b0e-19dd709e20f6","filter":{"address":["0xc15c34be83a5f048a72882a6ce307a3e80c7e13c"],"topics":[["0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62"]]},"event":{"type":"event","name":"TransferSingle","inputs":[{"name":"operator","type":"address","internalType":"address","indexed":true},{"name":"from","type":"address","internalType":"address","indexed":true},{"name":"to","type":"address","internalType":"address","indexed":true},{"name":"id","type":"uint256","internalType":"uint256"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":null},"fromBlock":"14","abi":{"type":2,"name":"3b5bec1c-2fb6-46d9-42b2-2caf41044ec1"}}

goroutine 363 [running]:
runtime.throw(0x11cbc48, 0x15)
	/usr/local/go/src/runtime/panic.go:1117 +0x72 fp=0xc0003ff2a8 sp=0xc0003ff278 pc=0x757692
runtime.mapassign_faststr(0x10a1940, 0xc000420480, 0xc0001f4ba0, 0x27, 0x4038ebe268)
	/usr/local/go/src/runtime/map_faststr.go:211 +0x3f1 fp=0xc0003ff310 sp=0xc0003ff2a8 pc=0x733e71
github.com/hyperledger/firefly-ethconnect/internal/events.(*subscriptionMGR).addSubscriptionCommon(0xc00010eba0, 0x12fe638, 0xc000c088c0, 0xc0009e9320, 0xc0003ff400, 0x30, 0xc0000b9c28, 0xa68228a748f0a583)
	/ethconnect/internal/events/submanager.go:214 +0x365 fp=0xc0003ff3c0 sp=0xc0003ff310 pc=0xec0385
github.com/hyperledger/firefly-ethconnect/internal/events.(*subscriptionMGR).AddSubscription(0xc00010eba0, 0x12fe638, 0xc000c088c0, 0xc00043e3f0, 0xc000464738, 0xc000293e30, 0xc0001f4b10, 0x27, 0xc0009429d6, 0x2, ...)
	/ethconnect/internal/events/submanager.go:172 +0x11e fp=0xc0003ff468 sp=0xc0003ff3c0 pc=0xebfe7e
github.com/hyperledger/firefly-ethconnect/internal/contractgateway.(*rest2eth).subscribeEvent(0xc000292070, 0x12fad00, 0xc0008c61c0, 0xc000ad0900, 0xc0001f4ae0, 0x2a, 0xc000464738, 0xc000293e30, 0xc0009e92f0)
	/ethconnect/internal/contractgateway/rest2eth.go:507 +0x4cf fp=0xc0003ff5d8 sp=0xc0003ff468 pc=0xf7850f
github.com/hyperledger/firefly-ethconnect/internal/contractgateway.(*rest2eth).restHandler(0xc000292070, 0x12fad00, 0xc0008c61c0, 0xc000ad0900, 0xc000a653e0, 0x2, 0x3)
	/ethconnect/internal/contractgateway/rest2eth.go:454 +0x8e9 fp=0xc0003ff938 sp=0xc0003ff5d8 pc=0xf77e69
github.com/hyperledger/firefly-ethconnect/internal/contractgateway.(*rest2eth).restHandler-fm(0x12fad00, 0xc0008c61c0, 0xc000ad0900, 0xc000a653e0, 0x2, 0x3)
	/ethconnect/internal/contractgateway/rest2eth.go:445 +0x6f fp=0xc0003ff980 sp=0xc0003ff938 pc=0xf8ceef
github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc00010e720, 0x12fad00, 0xc0008c61c0, 0xc000ad0900)
	/go/pkg/mod/github.com/julienschmidt/httprouter@v1.3.0/router.go:387 +0xc7e fp=0xc0003ffa90 sp=0xc0003ff980 pc=0xeb02de
github.com/hyperledger/firefly-ethconnect/internal/rest.(*RESTGateway).newAccessTokenContextHandler.func1(0x12fad00, 0xc0008c61c0, 0xc000ad0800)
	/ethconnect/internal/rest/restgateway.go:236 +0x2f4 fp=0xc0003ffb48 sp=0xc0003ffa90 pc=0xf9f354
net/http.HandlerFunc.ServeHTTP(0xc00028e0e0, 0x12fad00, 0xc0008c61c0, 0xc000ad0800)
	/usr/local/go/src/net/http/server.go:2050 +0x44 fp=0xc0003ffb70 sp=0xc0003ffb48 pc=0xa432e4
net/http.serverHandler.ServeHTTP(0xc0004580e0, 0x12fad00, 0xc0008c61c0, 0xc000ad0800)
	/usr/local/go/src/net/http/server.go:2868 +0xa3 fp=0xc0003ffba0 sp=0xc0003ffb70 pc=0xa468a3
net/http.(*conn).serve(0xc000caf2c0, 0x12fe6e0, 0xc000c08800)
	/usr/local/go/src/net/http/server.go:1933 +0x8cd fp=0xc0003fffc8 sp=0xc0003ffba0 pc=0xa41dcd
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc0003fffd0 sp=0xc0003fffc8 pc=0x792461
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2994 +0x39b
@awrichar awrichar changed the title Crashed while adding subscription Crashed while adding subscription - concurrent map writes Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant