Goland Debug模式下,报错fatal error: fault, Debug下很常见,Run下目前还没有出现过,是什么原因?

xdayannanfei · · 1462 次点击 · 开始浏览    置顶
这是一个创建于 的主题,其中的信息可能已经有所发展或是发生改变。

Goland 2018.3.3 在Debug程序下,经常出现报错,大家有碰到过吗? go1.15.3 windows/amd64 unexpected fault address 0x1433d6b fatal error: fault [signal 0xc0000005 code=0x1 addr=0x1433d6b pc=0x131175f] goroutine 49 [running]: runtime.throw(0x142f6b1, 0x5) D:/Go/src/runtime/panic.go:1116 +0x79 fp=0xc000537030 sp=0xc000537000 pc=0xb60459 runtime.sigpanic() D:/Go/src/runtime/signal_windows.go:249 +0x145 fp=0xc000537060 sp=0xc000537030 pc=0xb742a5 runtime: unexpected return pc for xjcyun.com/educloud/controller.CtrlUserBatchDelete called from 0xc000537368 stack: frame={sp:0xc000537060, fp:0xc000537348} stack=[0xc000534000,0xc000538000) 000000c000536f60: 000000c000536f90 0000000000b89649 <runtime.writeErr+73> 000000c000536f70: 0000000000000002 000000000142df43 000000c000536f80: 0000000000000001 0000000000000001 000000c000536f90: 000000c000536fc8 0000000000b61e35 <runtime.gwrite+181> 000000c000536fa0: 000000000142df43 0000000000000001 000000c000536fb0: 0000000000000001 000000c000536fd8 000000c000536fc0: 0000000000b6063e <runtime.fatalthrow+94> 000000c000536fd0 000000c000536fd0: 0000000000b8cd20 <runtime.fatalthrow.func1+0> 000000c0002b2a80 000000c000536fe0: 0000000000b60459 <runtime.throw+121> 000000c000537000 000000c000536ff0: 000000c000537020 0000000000b60459 <runtime.throw+121> 000000c000537000: 000000c000537008 0000000000b8cc80 <runtime.throw.func1+0> 000000c000537010: 000000000142f6b1 0000000000000005 000000c000537020: 000000c000537050 0000000000b742a5 <runtime.sigpanic+325> 000000c000537030: 000000000142f6b1 0000000000000005 000000c000537040: 0000000001433d6b 000000c0002b2a80 000000c000537050: 000000c000537340 000000000131175f <xjcyun.com/educloud/controller.CtrlUserBatchDelete+255> 000000c000537060: <0000000001433d6b 000000c0000e2200 000000c000537070: 0000000001433d6b 000000000000000a 000000c000537080: 00000000013dc840 000000c0002b1300 000000c000537090: 000000c000537101 000000c0005370c8 000000c0005370a0: 0000000000b23628 <runtime.strhashFallback+72> 0100010001431378 000000c0005370b0: 0000000000000001 0000000000000000 000000c0005370c0: 0000000000000001 000000c000537148 000000c0005370d0: 0000000000b37f65 <runtime.mapassign_faststr+709> 000000c000115c20 000000c0005370e0: 00000000000000a8 000000c000115cc8 000000c0005370f0: 0000027cfc0170a0 00000000000e2200 000000c000537100: 000000c000537148 0000000000bbfc57 <sync.(*RWMutex).Unlock+215> 000000c000537110: 000000c0000e2290 0000000000000020 000000c000537120: 0000000000000000 0000000000537168 000000c000537130: 0000000000000000 000000c0000e2290 000000c000537140: 000000c000115c20 000000c0005371a8 000000c000537150: 000000000124e9e5 <github.com/gin-gonic/gin.(*Context).Set+229> 000000c0000e2290 000000c000537160: 00000000013dc840 000000c0002b1300 000000c000537170: 0000000000000007 000000c000115cc8 000000c000537180: 000000c0000e2290 000000c000115cc8 000000c000537190: 000000c000303560 000000c0000e2290 000000c0005371a0: 0000000000000000 000000c000537340 000000c0005371b0: 00000000012fe15b <xjcyun.com/educloud/middleware.CheckSessionData+2875> 000000c0000e2200 000000c0005371c0: 00000000013dc840 000000c0002b1300 000000c0005371d0: 0000000001362dc0 0000000001814788 000000c0005371e0: 00000000000000f0 000000000142df26 000000c0005371f0: 0000000000000001 0000000000000000 000000c000537200: 0000000000000000 000000c0002b0000 000000c000537210: 000000c0005372f0 0000000000000001 000000c000537220: 0000000000000001 0000000000000001 000000c000537230: 000000c0000986e0 0000000001814788 000000c000537240: 0000000001814788 0000000000000000 000000c000537250: 000000c0005372f0 000000c0001f40f0 000000c000537260: 000000c0001f40e0 000000c0001f40d0 000000c000537270: 00000000013dc840 000000c0002b1300 000000c000537280: 0000000000000000 0000000000000000 000000c000537290: 000000c00030a39a 0000000000000020 000000c0005372a0: 000000c000290f00 000000000000000b 000000c0005372b0: 000000c000290ef0 000000000000000d 000000c0005372c0: 0000000000000000 0000000000000000 000000c0005372d0: 000000c00030a39a 0000000000000020 000000c0005372e0: 0000003394935429 000000c0005372c0 000000c0005372f0: 0000000000000001 0000000000000001 000000c000537300: 000000c000290ef0 000000000000000d 000000c000537310: 000000c000290f00 000000000000000b 000000c000537320: 000000c000290f10 000000000000000a 000000c000537330: 000000c0000986c0 0000000000000020 000000c000537340: !000000c000537368 >000000000124e47c <github.com/gin-gonic/gin.(*Context).Next+156> 000000c000537350: 000000c0000e2200 0000000000000000 000000c000537360: 0000000000000006 000000c0005373e8 000000c000537370: 000000000126b9e5 <github.com/gin-gonic/gin.RecoveryWithWriter.func1+133> 000000c0000e2200 000000c000537380: 0000000000000000 0000000000000010 000000c000537390: 000000c000537378 000000000126b9ca <github.com/gin-gonic/gin.RecoveryWithWriter.func1+106> 000000c0005373a0: 000000000145b8a8 0000000000000000 000000c0005373b0: 000000c0005379f8 0000000000000000 000000c0005373c0: 0000000000000000 0000000000000000 000000c0005373d0: 000000c00004c140 000000c0000e2200 000000c0005373e0: 000000c00004c140 000000c000537410 000000c0005373f0: 000000000124e47c <github.com/gin-gonic/gin.(*Context).Next+156> 000000c0000e2200 000000c000537400: 0000000000bbe328 <sync.(*Pool).pin+136> 0000000000000006 000000c000537410: 000000c000537640 000000000126a2d8 <github.com/gin-gonic/gin.LoggerWithConfig.func1+280> 000000c000537420: 000000c0000e2200 0000003394935429 000000c000537430: 0000000001851720 0000000000000000 000000c000537440: 000000c000296800 xjcyun.com/educloud/controller.CtrlUserBatchDelete(0x124e47c) D:/work/dev2/src/xjcyun.com/educloud/controller/ctrluser.go:267 +0xff fp=0xc000537348 sp=0xc000537060 pc=0x131175f created by net/http.(*Server).Serve D:/Go/src/net/http/server.go:2969 +0x98f goroutine 1 [IO wait]: internal/poll.runtime_pollWait(0x27cfbfef6d8, 0x72, 0xc00027e7c8) D:/Go/src/runtime/netpoll.go:220 +0x65 internal/poll.(*pollDesc).wait(0xc00027e938, 0x72, 0x17fd600, 0x0, 0x0) D:/Go/src/internal/poll/fd_poll_runtime.go:87 +0xa5 internal/poll.execIO(0xc00027e798, 0xc00053b330, 0x0, 0x0, 0x0) D:/Go/src/internal/poll/fd_windows.go:175 +0x2a7 internal/poll.(*FD).acceptOne(0xc00027e780, 0x180, 0xc0005661e0, 0x2, 0x2, 0xc00027e798, 0x0, 0x0, 0x0, 0x0) D:/Go/src/internal/poll/fd_windows.go:810 +0xed internal/poll.(*FD).Accept(0xc00027e780, 0xc00053b638, 0x0, 0x0, 0x0, 0x0, 0xc000000000, 0x0, 0x0, 0x0, ...) D:/Go/src/internal/poll/fd_windows.go:844 +0x349 net.(*netFD).accept(0xc00027e780, 0x0, 0x0, 0x0) D:/Go/src/net/fd_windows.go:139 +0xeb net.(*TCPListener).accept(0xc000304460, 0x0, 0x0, 0x0) D:/Go/src/net/tcpsock_posix.go:139 +0x68 net.(*TCPListener).Accept(0xc000304460, 0x0, 0x0, 0x0, 0x0) D:/Go/src/net/tcpsock.go:261 +0x85 net/http.(*Server).Serve(0xc0000f62a0, 0x149dd20, 0xc000304460, 0x0, 0x0) D:/Go/src/net/http/server.go:2937 +0x436 net/http.(*Server).ListenAndServe(0xc0000f62a0, 0x0, 0x0) D:/Go/src/net/http/server.go:2866 +0x1c9 net/http.ListenAndServe(0xc00030e2d4, 0x5, 0x1495cc0, 0xc0001e2140, 0x0, 0x0) D:/Go/src/net/http/server.go:3120 +0xf7 github.com/gin-gonic/gin.(*Engine).Run(0xc0001e2140, 0xc000319e48, 0x1, 0x1, 0x0, 0x0) D:/work/dev2/src/github.com/gin-gonic/gin/gin.go:310 +0x1d4 main.main() D:/work/dev2/src/xjcyun.com/educloud/educloud.go:63 +0xc09 goroutine 9 [select, 3 minutes]: database/sql.(*DB).connectionOpener(0xc00009a4e0, 0x149f020, 0xc000094040) D:/Go/src/database/sql/sql.go:1126 +0xf9 created by database/sql.OpenDB D:/Go/src/database/sql/sql.go:740 +0x265 goroutine 114 [IO wait]: internal/poll.runtime_pollWait(0x27cfbfef438, 0x72, 0xc0000a3198) D:/Go/src/runtime/netpoll.go:220 +0x65 internal/poll.(*pollDesc).wait(0xc0000a3338, 0x72, 0x17fd600, 0x0, 0x0) D:/Go/src/internal/poll/fd_poll_runtime.go:87 +0xa5 internal/poll.execIO(0xc0000a3198, 0x145d1d0, 0x0, 0x0, 0x0) D:/Go/src/internal/poll/fd_windows.go:175 +0x2a7 internal/poll.(*FD).Read(0xc0000a3180, 0xc0003034b1, 0x1, 0x1, 0x0, 0x0, 0x0) D:/Go/src/internal/poll/fd_windows.go:441 +0x54d net.(*netFD).Read(0xc0000a3180, 0xc0003034b1, 0x1, 0x1, 0x0, 0x0, 0x0) D:/Go/src/net/fd_posix.go:55 +0x85 net.(*conn).Read(0xc0000900b8, 0xc0003034b1, 0x1, 0x1, 0x0, 0x0, 0x0) D:/Go/src/net/net.go:182 +0xbc net/http.(*connReader).backgroundRead(0xc0003034a0) D:/Go/src/net/http/server.go:690 +0xbd created by net/http.(*connReader).startBackgroundRead D:/Go/src/net/http/server.go:686 +0x13f Debugger finished with exit code 0

有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

1462 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传