kaspad icon indicating copy to clipboard operation
kaspad copied to clipboard

kaspaminer crashes when closing kaspad while it's running

Open elichai opened this issue 4 years ago • 2 comments

stack trace:

2021-02-08 12:22:58.074 [INF] KSMN: Found block 49a65ddfba592c5d3fd1cd482a27c4cff768ef362242f88e456639b3dad72d87 with parents [b8d0f608f830fdc0139e41478fe2f839a58d5d17ffe667256c057dfd2263b8b9]. Submitting to localhost:16210
2021-02-08 12:22:58.088 [INF] KSMN: Finished to mine 10 blocks 4.362099847s earlier than expected. Sleeping 4.362099847s to compensate
2021-02-08 12:23:00.054 [CRT] RPCC: Exiting: Fatal error in goroutine `GRPCClient.AttachRouter-receiveLoop 2`: rpc error: code = Unavailable desc = transport is closing
2021-02-08 12:23:00.054 [CRT] RPCC: Goroutine stack trace: goroutine 1 [running]:
runtime/debug.Stack(0xc000000038, 0xae3998, 0xc00012e320)
        /usr/lib/go/src/runtime/debug/stack.go:24 +0x9f
github.com/kaspanet/kaspad/util/panics.GoroutineWrapperFunc.func1(0xaccb36, 0x23, 0xc000712780)
        /home/elichai2/GolandProjects/kaspad/util/panics/panics.go:30 +0x2f
github.com/kaspanet/kaspad/infrastructure/network/rpcclient/grpcclient.(*GRPCClient).AttachRouter(0xc0002c41a0, 0xc0002ce1b0)
        /home/elichai2/GolandProjects/kaspad/infrastructure/network/rpcclient/grpcclient/grpcclient.go:72 +0xe3
github.com/kaspanet/kaspad/infrastructure/network/rpcclient.NewRPCClient(0xc000135830, 0xf, 0xab8007, 0x5, 0xc000135830)
        /home/elichai2/GolandProjects/kaspad/infrastructure/network/rpcclient/rpcclient.go:35 +0xa5
main.newMinerClient(0xc0003a2000, 0x2, 0xabc9ca, 0xa)
        /home/elichai2/GolandProjects/kaspad/cmd/kaspaminer/client.go:24 +0x7d
main.main()
        /home/elichai2/GolandProjects/kaspad/cmd/kaspaminer/main.go:38 +0x272

2021-02-08 12:23:00.054 [CRT] RPCC: Stack trace: goroutine 83 [running]:
runtime/debug.Stack(0xacbfc0, 0x22, 0xc000333bb8)
        /usr/lib/go/src/runtime/debug/stack.go:24 +0x9f
github.com/kaspanet/kaspad/util/panics.HandlePanic(0xc00012e320, 0xc00074c030, 0x25, 0xc00073c400, 0x3b5, 0x400)
        /home/elichai2/GolandProjects/kaspad/util/panics/panics.go:22 +0x108
panic(0xa0da80, 0xc000010038)
        /usr/lib/go/src/runtime/panic.go:969 +0x1b9
github.com/kaspanet/kaspad/infrastructure/network/rpcclient/grpcclient.(*GRPCClient).handleError(0xc0002c41a0, 0xb69760, 0xc000010038)
        /home/elichai2/GolandProjects/kaspad/infrastructure/network/rpcclient/grpcclient/grpcclient.go:119 +0x126
github.com/kaspanet/kaspad/infrastructure/network/rpcclient/grpcclient.(*GRPCClient).AttachRouter.func2()
        /home/elichai2/GolandProjects/kaspad/infrastructure/network/rpcclient/grpcclient/grpcclient.go:76 +0xae
github.com/kaspanet/kaspad/util/panics.handleSpawnedFunction(0xc00012e320, 0xc00073c400, 0x3b5, 0x400, 0xaccb36, 0x23, 0xc000712780)
        /home/elichai2/GolandProjects/kaspad/util/panics/panics.go:84 +0x2c7
github.com/kaspanet/kaspad/util/panics.GoroutineWrapperFunc.func1.1(0xc00012e320, 0xc00073c400, 0x3b5, 0x400, 0xaccb36, 0x23, 0xc000712780)
        /home/elichai2/GolandProjects/kaspad/util/panics/panics.go:32 +0x67
created by github.com/kaspanet/kaspad/util/panics.GoroutineWrapperFunc.func1
        /home/elichai2/GolandProjects/kaspad/util/panics/panics.go:31 +0x8c

elichai avatar Feb 08 '21 10:02 elichai

Probably requires shutdown handler

elichai avatar Mar 03 '21 14:03 elichai

I think this is irrelevant since we implemented reconnection mechanism

someone235 avatar Jun 17 '21 07:06 someone235