You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2017/05/01 22:05:26 UTC

incubator-mynewt-newtmgr git commit: nmxact - Log stack traces on bhd timeout.

Repository: incubator-mynewt-newtmgr
Updated Branches:
  refs/heads/master 78d069c70 -> 739d29c45


nmxact - Log stack traces on bhd timeout.

This is a temporary measure to help debug a bhd timeout.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/739d29c4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/739d29c4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/739d29c4

Branch: refs/heads/master
Commit: 739d29c4599d0aa4f617202a4f42431a64a6bb0c
Parents: 78d069c
Author: Christopher Collins <cc...@apache.org>
Authored: Mon May 1 15:04:53 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon May 1 15:04:53 2017 -0700

----------------------------------------------------------------------
 nmxact/nmble/ble_util.go | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/739d29c4/nmxact/nmble/ble_util.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_util.go b/nmxact/nmble/ble_util.go
index 9807da0..cc9409b 100644
--- a/nmxact/nmble/ble_util.go
+++ b/nmxact/nmble/ble_util.go
@@ -2,6 +2,7 @@ package nmble
 
 import (
 	"fmt"
+	"runtime"
 	"sync"
 
 	log "github.com/Sirupsen/logrus"
@@ -41,6 +42,12 @@ func BhdTimeoutError(rspType MsgType, seq BleSeq) error {
 		MsgTypeToString(rspType), seq)
 
 	log.Debug(str)
+
+	// XXX: Print stack trace; temporary change to debug timeout.
+	buf := make([]byte, 1024*1024)
+	stacklen := runtime.Stack(buf, true)
+	log.Debug(buf[:stacklen])
+
 	return nmxutil.NewXportError(str)
 }