From eed03653f93e69ff97eb80e18b65ec35d197cc39 Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Mon, 25 Nov 2024 17:36:01 +0800 Subject: [PATCH] optimized(host): SetDumpStackSignal handler at startup --- pkg/hostman/host_services.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/hostman/host_services.go b/pkg/hostman/host_services.go index 643caa83d1e..1f416e0f22a 100644 --- a/pkg/hostman/host_services.go +++ b/pkg/hostman/host_services.go @@ -17,6 +17,7 @@ package hostman import ( execlient "yunion.io/x/executor/client" "yunion.io/x/log" + "yunion.io/x/pkg/util/signalutils" "yunion.io/x/onecloud/pkg/appsrv" app_common "yunion.io/x/onecloud/pkg/cloudcommon/app" @@ -158,6 +159,10 @@ func (host *SHostService) initHandlers(app *appsrv.Application) { } func StartService() { + // register dump stack signal handler at first + signalutils.SetDumpStackSignal() + signalutils.StartTrap() + var srv = &SHostService{} srv.SServiceBase = &service.SServiceBase{ Service: srv,