[求助] golang 報錯堆棧資訊

來源:互聯網
上載者:User
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。請教一個關於golang debug的問題。我在使用Shopify/sarama這個庫去串連kafka時,運行程式報錯,一般這種報錯如何查看?可以看到,我這個報錯堆棧資訊只能回溯10層,到sarama的Open.func1這裡。`created by github.com/Shopify/sarama.(*Broker).Open.func1``/paic/dev/oracle/11g/odsz11g/mygo/src/github.com/Shopify/sarama/broker.go:148`但是我沒辦法找到My Code中哪個部分觸發了這個函數,請問有方法再增加報錯堆棧的層數嗎?```unexpected fault address 0xa31800fatal error: fault[signal SIGSEGV: segmentation violation code=0x2 addr=0xa31800 pc=0xa31800]goroutine 34 [running]:runtime.throw(0x6ea68e, 0x5)/paic/dev/oracle/11g/odsz11g/go/src/runtime/panic.go:566 +0x95 fp=0xc4200a2cd8 sp=0xc4200a2cb8runtime.sigpanic()/paic/dev/oracle/11g/odsz11g/go/src/runtime/sigpanic_unix.go:27 +0x288 fp=0xc4200a2d30 sp=0xc4200a2cd8github.com/rcrowley/go-metrics.(*StandardHistogram).Update(0xc4201d6060, 0x1)/paic/dev/oracle/11g/odsz11g/mygo/src/github.com/rcrowley/go-metrics/histogram.go:199 +0x3d fp=0xc4200a2d50 sp=0xc4200a2d30github.com/Shopify/sarama.(*Broker).updateRequestLatencyMetrics(0xc4201582c0, 0x166b87)/paic/dev/oracle/11g/odsz11g/mygo/src/github.com/Shopify/sarama/broker.go:656 +0x9b fp=0xc4200a2d78 sp=0xc4200a2d50github.com/Shopify/sarama.(*Broker).updateIncomingCommunicationMetrics(0xc4201582c0, 0x24, 0x166b87)/paic/dev/oracle/11g/odsz11g/mygo/src/github.com/Shopify/sarama/broker.go:636 +0x39 fp=0xc4200a2d98 sp=0xc4200a2d78github.com/Shopify/sarama.(*Broker).responseReceiver(0xc4201582c0)/paic/dev/oracle/11g/odsz11g/mygo/src/github.com/Shopify/sarama/broker.go:514 +0x77a fp=0xc4200a2f70 sp=0xc4200a2d98github.com/Shopify/sarama.(*Broker).(github.com/Shopify/sarama.responseReceiver)-fm()/paic/dev/oracle/11g/odsz11g/mygo/src/github.com/Shopify/sarama/broker.go:148 +0x2a fp=0xc4200a2f88 sp=0xc4200a2f70github.com/Shopify/sarama.withRecover(0xc4201d60d0)/paic/dev/oracle/11g/odsz11g/mygo/src/github.com/Shopify/sarama/utils.go:46 +0x43 fp=0xc4200a2fa8 sp=0xc4200a2f88runtime.goexit()/paic/dev/oracle/11g/odsz11g/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200a2fb0 sp=0xc4200a2fa8created by github.com/Shopify/sarama.(*Broker).Open.func1/paic/dev/oracle/11g/odsz11g/mygo/src/github.com/Shopify/sarama/broker.go:148 +0x8ae```284 次點擊  
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.