1

在运行我的程序大约 25 分钟后,我在 Go 中遇到了这个错误。我正在使用 gorobotn、sqlite 之类的库来保存数据和另一个截图库。

在 ubuntu 中,我使用的是 1.14.6 的 go 版本。但是在 Windows 中我没有遇到这个问题。只有在 ubuntu 中我突然遇到了上述问题,我得到了这个错误。

fatal error: unexpected signal during runtime execution
            [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x7fec775813aa]

        
        runtime stack:
        runtime.throw(0xde017b, 0x2a)`enter code here`
            /usr/local/go/src/runtime/panic.go:1116 +0x72
        runtime.sigpanic()
            /usr/local/go/src/runtime/signal_unix.go:679 +0x46a

  goroutine 192 [select, 28 minutes]:
net/http.(*persistConn).readLoop(0xc000f205a0)
    /usr/local/go/src/net/http/transport.go:2099 +0x99e
created by net/http.(*Transport).dialConn
    /usr/local/go/src/net/http/transport.go:1647 +0xc56

goroutine 147 [select, 29 minutes]:
database/sql.(*DB).connectionResetter(0xc0002ac3c0, 0xf68860, 0xc000e502c0)
    /usr/local/go/src/database/sql/sql.go:1065 +0xfb
created by database/sql.OpenDB
    /usr/local/go/src/database/sql/sql.go:723 +0x193

goroutine 148 [select, 29 minutes]:
database/sql.(*DB).connectionOpener(0xc0002ac6c0, 0xf68860, 0xc000e50500)
    /usr/local/go/src/database/sql/sql.go:1052 +0xe8
created by database/sql.OpenDB
    /usr/local/go/src/database/sql/sql.go:722 +0x15d

goroutine 149 [select, 29 minutes]:
database/sql.(*DB).connectionResetter(0xc0002ac6c0, 0xf68860, 0xc000e50500)
    /usr/local/go/src/database/sql/sql.go:1065 +0xfb
created by database/sql.OpenDB
    /usr/local/go/src/database/sql/sql.go:723 +0x193

goroutine 157 [syscall, 29 minutes]:
github.com/robotn/gohook._Cfunc_start_ev()
    _cgo_gotypes.go:124 +0x41
created by github.com/robotn/gohook.Start
    /home/karthik/go/src/github.com/robotn/gohook/hook.go:224 +0x67

goroutine 144 [select, 29 minutes]:
database/sql.(*DB).connectionOpener(0xc000fa8240, 0xf68860, 0xc000e94d00)
    /usr/local/go/src/database/sql/sql.go:1052 +0xe8
created by database/sql.OpenDB
    /usr/local/go/src/database/sql/sql.go:722 +0x15d

goroutine 187 [select, 28 minutes]:
database/sql.(*DB).connectionResetter(0xc000fa8480, 0xf68860, 0xc000d2af40)
    /usr/local/go/src/database/sql/sql.go:1065 +0xfb
created by database/sql.OpenDB
    /usr/local/go/src/database/sql/sql.go:723 +0x193

goroutine 186 [select, 28 minutes]:
database/sql.(*DB).connectionOpener(0xc000fa8480, 0xf68860, 0xc000d2af40)
    /usr/local/go/src/database/sql/sql.go:1052 +0xe8
created by database/sql.OpenDB
    /usr/local/go/src/database/sql/sql.go:722 +0x15d

goroutine 156 [select, 29 minutes]:
net/http.(*persistConn).writeLoop(0xc0000ae240)
    /usr/local/go/src/net/http/transport.go:2277 +0x11c
created by net/http.(*Transport).dialConn
    /usr/local/go/src/net/http/transport.go:1648 +0xc7b

goroutine 200 [select, 27 minutes]:
database/sql.(*DB).connectionOpener(0xc000fa8540, 0xf68860, 0xc000bb4d80)
    /usr/local/go/src/database/sql/sql.go:1052 +0xe8
created by database/sql.OpenDB
    /usr/local/go/src/database/sql/sql.go:722 +0x15d

goroutine 160 [select, 29 minutes]:
database/sql.(*DB).connectionOpener(0xc0002ac9c0, 0xf68860, 0xc000e50bc0)
    /usr/local/go/src/database/sql/sql.go:1052 +0xe8
created by database/sql.OpenDB
    /usr/local/go/src/database/sql/sql.go:722 +0x15d

goroutine 161 [select, 29 minutes]:
database/sql.(*DB).connectionResetter(0xc0002ac9c0, 0xf68860, 0xc000e50bc0)
    /usr/local/go/src/database/sql/sql.go:1065 +0xfb
created by database/sql.OpenDB
    /usr/local/go/src/database/sql/sql.go:723 +0x193

goroutine 1295 [chan send]:
github.com/BurntSushi/xgb.(*Conn).generateSeqIds(0xc0013afef0)
    /home/karthik/go/src/github.com/BurntSushi/xgb/xgb.go:278 +0x73
created by github.com/BurntSushi/xgb.postNewConn
    /home/karthik/go/src/github.com/BurntSushi/xgb/xgb.go:131 +0x1c2

goroutine 1294 [chan send]:
github.com/BurntSushi/xgb.(*Conn).generateXIds(0xc0013afef0)
    /home/karthik/go/src/github.com/BurntSushi/xgb/xgb.go:253 +0x9e
created by github.com/BurntSushi/xgb.postNewConn
    /home/karthik/go/src/github.com/BurntSushi/xgb/xgb.go:130 +0x1a0

goroutine 1308 [chan send]:
github.com/BurntSushi/xgb.(*Conn).generateSeqIds(0xc001324000)
    /home/karthik/go/src/github.com/BurntSushi/xgb/xgb.go:278 +0x73
created by github.com/BurntSushi/xgb.postNewConn
    /home/karthik/go/src/github.com/BurntSushi/xgb/xgb.go:131 +0x1c2
exit status 2
Process exiting with code: 1 signal: false
4

0 回答 0