Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Conversation

@Random-Liu
Copy link
Member

Using the same code with containerd/containerd#292.

Signed-off-by: Lantao Liu [email protected]

}()
}

func dumpStacks() {
Copy link
Member

@mikebrow mikebrow Oct 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from: https://golang.org/src/runtime/debug/stack.go, just a little cleaner with a modification to dump all (true)

func stack() []byte {
	buf := make([]byte, 1024)
  	for {
  		n := runtime.Stack(buf, true)
  		if n < len(buf) {
  			return buf[:n]
  		}
  		buf = make([]byte, 2*len(buf))
  	}
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM either way with or without the stack() api..

Copy link
Member

@abhi abhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Lantao Liu <[email protected]>
Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM

@Random-Liu Random-Liu merged commit c3b03f8 into containerd:master Oct 28, 2017
@Random-Liu Random-Liu deleted the add-dump-stack branch October 28, 2017 00:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants