OpenAtomFoundation / xupercore

The kernel of xuperchain.
Apache License 2.0
61 stars 47 forks source link

节点运行一段时间,可能 panic。 #373

Closed godeamon closed 9 months ago

godeamon commented 2 years ago

多个节点,一直发送交易,运行几天可能某个节点panic,多个节点都在同一个机器上,panic 日志:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9fef0a]

goroutine 648955341 [running]:
github.com/xuperchain/xupercore/lib/timer.(*XTimer).Print(0xc0582c43c0, 0xffffffffffffffff, 0xc072cba898)
        github.com/xupercore/lib/timer/timer.go:49 +0x10a
github.com/xuperchain/xupercore/bcs/network/p2pv2.(*P2PServerV2).sendMessageWithResponse.func1.1(0xc03ae209a0, 0xc0582c43f0, 0xc0582c4270, 0xc0003fe1e0, 0x22)
        github.com/xupercore/bcs/network/p2pv2/client.go:173 +0x10c
github.com/xuperchain/xupercore/bcs/network/p2pv2.(*P2PServerV2).sendMessageWithResponse.func1(0x2043888, 0xc0582c42d0, 0xc03ae209a0, 0xc0582c4270, 0xc00123c630, 0xc072cba840, 0xc0003fe1e0, 0x22)
        github.com/xupercore/bcs/network/p2pv2/client.go:192 +0x815
created by github.com/xuperchain/xupercore/bcs/network/p2pv2.(*P2PServerV2).sendMessageWithResponse
        github.com/xupercore/bcs/network/p2pv2/client.go:167 +0x265