Closed rayn316 closed 2 months ago
有些时候kill任务会让categraf崩溃退出
Jun 11 18:07:55 categraf[1960524]: 2024/06/11 18:07:55 heartbeat.go:64: I! assigned tasks: [14095]
Jun 11 18:07:56 categraf[1960524]: 2024/06/11 18:07:56 heartbeat.go:64: I! assigned tasks: [14095]
Jun 11 18:07:57 categraf[1960524]: 2024/06/11 18:07:57 heartbeat.go:64: I! assigned tasks: [14095]
Jun 11 18:07:58 categraf[1960524]: 2024/06/11 18:07:58 heartbeat.go:64: I! assigned tasks: [14095]
Jun 11 18:07:59 categraf[1960524]: 2024/06/11 18:07:59 heartbeat.go:64: I! assigned tasks: [14095]
Jun 11 18:08:00 categraf[1960524]: 2024/06/11 18:08:00 heartbeat.go:64: I! assigned tasks: [14095]
Jun 11 18:08:00 categraf[1960524]: 2024/06/11 18:08:00 task.go:343: D! begin kill process of task[14095]
Jun 11 18:08:00 categraf[1960524]: panic: runtime error: invalid memory address or nil pointer dereference
Jun 11 18:08:00 categraf[1960524]: [signal SIGSEGV: segmentation violation code=0x1 addr=0xa0 pc=0xbedb3d]
Jun 11 18:08:00 categraf[1960524]: goroutine 6733953 [running]:
Jun 11 18:08:00 categraf[1960524]: flashcat.cloud/categraf/ibex.CmdKill(...)
Jun 11 18:08:00 categraf[1960524]: /home/runner/work/categraf/categraf/ibex/cmd_nix.go:16
Jun 11 18:08:00 categraf[1960524]: flashcat.cloud/categraf/ibex.killProcess(0xc00250c0d0)
Jun 11 18:08:00 categraf[1960524]: /home/runner/work/categraf/categraf/ibex/task.go:345 +0x11d
Jun 11 18:08:00 categraf[1960524]: created by flashcat.cloud/categraf/ibex.(*Task).kill in goroutine 401
Jun 11 18:08:00 categraf[1960524]: /home/runner/work/categraf/categraf/ibex/task.go:299 +0x4f
Jun 11 18:08:00 systemd[1]: categraf.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
感谢问题反馈,不过请把问题拆成不同的 issue 哈,后面提 PR 的时候也会关联对应的 issue,混杂在一起较难管理
我将问题分为多个issues了
What would you like to be added:
Why is this needed: