hyperledger-firefly / hyperledger-firefly/ethconnect
Panic in processBroadcasts
- Dominant language
- Go
- Stars
- 76
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
FireFly e2e has been failing in the Github actions, and I just tried it locally… I found that ethconnect was failing with:
```
ethconnect_0_1 | [2021-09-01T21:18:51.134Z] DEBUG WS/d6949896-7c43-4e51-6483-dc37de68f424: Received: {Type:listenreplies Topic: Message:}
ethconnect_0_1 | panic: runtime error: index out of range [1] with length 1
ethconnect_0_1 |
ethconnect_0_1 | goroutine 26 [running]:
ethconnect_0_1 | github.com/kaleido-io/ethconnect/internal/ws.(*webSocketServer).processBroadcasts.func1(0xc000308000, 0x1, 0x1)
ethconnect_0_1 | /ethconnect/internal/ws/wsserver.go:170 +0x569
ethconnect_0_1 | github.com/kaleido-io/ethconnect/internal/ws.(*webSocketServer).processBroadcasts(0xc000146ff0)
ethconnect_0_1 | /ethconnect/internal/ws/wsserver.go:186 +0x1fd
ethconnect_0_1 | created by github.com/kaleido-io/ethconnect/internal/ws.NewWebSocketServer
ethconnect_0_1 | /ethconnect/internal/ws/wsserver.go:77 +0x165
```
Quick look at the code suggests it's a lack of synchronization on the `s.topics` between these lines, will investigate more:
https://github.com/hyperledger-labs/firefly-ethconnect/blob/2e28ec415a4c3098624d7898cc58ec43af7b5f4a/internal/ws/wsserver.go#L165-L166
Contributor guide
Assessment
This issue has not been assessed yet.