fix: [2.5] Disable block and mutex profiling on arm to prevent SIGSEGV (#41823)

issue: https://github.com/milvus-io/milvus/issues/41821

pr: https://github.com/milvus-io/milvus/pull/41822

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
yihao.dai 2025-05-14 10:56:50 +08:00 committed by GitHub
parent 96f7ab592b
commit 841f02cf0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -242,9 +242,12 @@ func ServeHTTP() {
bindAddr := getHTTPAddr()
log.Info("management listen", zap.String("addr", bindAddr))
server = &http.Server{Handler: metricsServer, Addr: bindAddr, ReadTimeout: 10 * time.Second}
// enable mutex && block profile, sampling rate 10%
runtime.SetMutexProfileFraction(10)
runtime.SetBlockProfileRate(10)
if runtime.GOARCH != "arm64" {
// enable mutex && block profile, sampling rate 10%
runtime.SetMutexProfileFraction(10)
runtime.SetBlockProfileRate(10)
}
if err := server.ListenAndServe(); err != nil {
log.Error("handle metrics failed", zap.Error(err))