diodechain / diode_client

Diode client written in GO that runs the Blockquick™ algorithm and a socks server to transmit data through diodechain.
https://diode.io/download
Other
65 stars 23 forks source link

Segfault on single cpu relatively high traffic #135

Closed hansr closed 5 months ago

hansr commented 5 months ago

caught a bug panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x955615]

goroutine 329266 [running]: github.com/diodechain/diode_client/rpc.(ConnectedPort).upgradeTLS(0xc0008eb2c0, 0xd96f08) /home/ubuntu/diode_client/rpc/connectedport.go:281 +0x55 github.com/diodechain/diode_client/rpc.(ConnectedPort).UpgradeTLSClient.func1() /home/ubuntu/diode_client/rpc/connectedport.go:267 +0x27 github.com/dominicletz/genserver.(GenServer).CallTimeout.func1(0x8237a5?) /home/ubuntu/go/pkg/mod/github.com/dominicletz/genserver@v1.3.1/genserver.go:165 +0x13 github.com/dominicletz/genserver.(Reply).ReRun(0xc0003b35d8) /home/ubuntu/go/pkg/mod/github.com/dominicletz/genserver@v1.3.1/genserver.go:115 +0x25 github.com/dominicletz/genserver.(GenServer).Call2Timeout.func1() /home/ubuntu/go/pkg/mod/github.com/dominicletz/genserver@v1.3.1/genserver.go:134 +0x17 github.com/dominicletz/genserver.(GenServer).loop(0xc00047a9c0) /home/ubuntu/go/pkg/mod/github.com/dominicletz/genserver@v1.3.1/genserver.go:78 +0x2a created by github.com/dominicletz/genserver.New in goroutine 328593 /home/ubuntu/go/pkg/mod/github.com/dominicletz/genserver@v1.3.1/genserver.go:49 +0x15c

jimthedj65 commented 5 months ago

I was running a gateway on an aws single vcpu and 8G of ram will run iostat traces and post here

dominicletz commented 5 months ago

Fixed in master in 8d855fe

jimthedj65 commented 5 months ago

Hi Dominic do we need to pull for an update

today I noticed errors when going direct to diode

ERROR Failed to write to node: write tcp 192.168.1.27:36356->45.79.115.246:41046: write: broken pipe server=us1.prenet.diode.io:41046 ERROR Failed to write to node: connection closed server=us1.prenet.diode.io:41046 INFO Client connection closed: EOF server=us1.prenet.diode.io:41046 ERROR Cannot fetch blocks 6723742-6723841 error: failed fetching all blocks server=us1.prenet.diode.io:41046 INFO Client connection closed: EOF server=us2.prenet.diode.io:41046