Skip to content

provide ability to intercept sigquit (kill -3) to generate current execution stack snapshots for all active tasks #1403

@maciek01

Description

@maciek01

Is your feature request related to a problem? Please describe.

I would like to see stack traces for all threads/tasks in a go process in order to troubleshoot 'hang' or timingout execution of go functions within secretless.

Describe the solution you would like

provide ability to intercept sigquit (kill -3) to generate current execution stack snapshots for all active tasks

example:

https://stackoverflow.com/questions/19094099/how-to-dump-goroutine-stacktraces

import ("runtime"
"os"
"os/signal"
"syscall"
)

go func() {
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGQUIT)
buf := make([]byte, 1<<20)
for {
<-sigs
stacklen := runtime.Stack(buf, true)
log.Printf("=== received SIGQUIT ===\n*** goroutine dump...\n%s\n*** end\n", buf[:stacklen])
}
}()

Describe alternatives you have considered

this is a request for specific handling of kill -3 in a golang process

Additional context

https://cyberark.lightning.force.com/lightning/r/Case/5002J00001QniPpQAJ/view

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions