Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syscall/IPC panics on 1.6 when running drone+gogs+postgresql #16688

Closed
sokoow opened this issue Aug 14, 2016 · 7 comments
Closed

Syscall/IPC panics on 1.6 when running drone+gogs+postgresql #16688

sokoow opened this issue Aug 14, 2016 · 7 comments

Comments

@sokoow
Copy link

sokoow commented Aug 14, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
go version go1.6.2 linux/arm64
  1. What operating system and processor architecture are you using (go env)?
GOARCH="arm64"
GOBIN=""
GOEXE=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/go-1.6"
GOTOOLDIR="/usr/lib/go-1.6/pkg/tool/linux_arm64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
  1. What did you do?
    Compiled drone (github.com/drone/drone), and running it together with postgresql and gogs. It throws panics. Every time I try to log in, so when it tries to do network related syscalls.
  2. What did you expect to see?

At least a retry, not panic

  1. What did you see instead?
    I see this:
runtime stack:
runtime.throw(0xe943a0, 0x2a)
    /usr/lib/go-1.6/src/runtime/panic.go:547 +0x80
runtime.sigpanic()
    /usr/lib/go-1.6/src/runtime/sigpanic_unix.go:12 +0x50

goroutine 26 [syscall, locked to thread]:
runtime.cgocall(0xa03728, 0x4820127778, 0x0)
    /usr/lib/go-1.6/src/runtime/cgocall.go:123 +0x150 fp=0x4820127710 sp=0x48201276e0
net._C2func_getaddrinfo(0x7f880008c0, 0x0, 0x48203b8f30, 0x482008e6e8, 0x0, 0x0, 0x0)
    ??:0 +0x50 fp=0x4820127770 sp=0x4820127710
net.cgoLookupIPCNAME(0x48203be560, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf0ac00)
    /usr/lib/go-1.6/src/net/cgo_unix.go:111 +0x390 fp=0x48201278f0 sp=0x4820127770
net.cgoLookupIP(0x48203be560, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/cgo_unix.go:163 +0x4c fp=0x4820127950 sp=0x48201278f0
net.lookupIP(0x48203be560, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/lookup_unix.go:67 +0x68 fp=0x48201279c0 sp=0x4820127950
net.glob.func16(0xf0ac90, 0x48203be560, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/hook.go:10 +0x44 fp=0x4820127a00 sp=0x48201279c0
net.lookupIPMerge.func1(0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/lookup.go:68 +0x60 fp=0x4820127a80 sp=0x4820127a00
internal/singleflight.(*Group).doCall(0x1275c70, 0x48202a4730, 0x48203be560, 0x16, 0x4820127c68)
    /usr/lib/go-1.6/src/internal/singleflight/singleflight.go:93 +0x20 fp=0x4820127b30 sp=0x4820127a80
internal/singleflight.(*Group).Do(0x1275c70, 0x48203be560, 0x16, 0x4820127c68, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/internal/singleflight/singleflight.go:63 +0x23c fp=0x4820127ba0 sp=0x4820127b30
net.lookupIPMerge(0x48203be560, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/lookup.go:69 +0x74 fp=0x4820127cb0 sp=0x4820127ba0
net.lookupIPDeadline(0x48203be560, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/lookup.go:91 +0xa8 fp=0x4820127ef0 sp=0x4820127cb0
net.internetAddrList(0xd970e0, 0x3, 0x48203be560, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /usr/lib/go-1.6/src/net/ipsock.go:252 +0x510 fp=0x4820128040 sp=0x4820127ef0
net.resolveAddrList(0xd92a28, 0x4, 0xd970e0, 0x3, 0x48203be560, 0x1b, 0x0, 0x4800000000, 0x0, 0x0, ...)
    /usr/lib/go-1.6/src/net/dial.go:158 +0x338 fp=0x4820128120 sp=0x4820128040
net.(*Dialer).Dial(0x4820128350, 0xd970e0, 0x3, 0x48203be560, 0x1b, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/dial.go:216 +0xec fp=0x4820128300 sp=0x4820128120
net.Dial(0xd970e0, 0x3, 0x48203be560, 0x1b, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/dial.go:193 +0x5c fp=0x48201283a0 sp=0x4820128300
github.com/drone/drone/vendor/github.com/lib/pq.defaultDialer.Dial(0xd970e0, 0x3, 0x48203be560, 0x1b, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:88 +0x48 fp=0x48201283f0 sp=0x48201283a0
github.com/drone/drone/vendor/github.com/lib/pq.(*defaultDialer).Dial(0x1299c48, 0xd970e0, 0x3, 0x48203be560, 0x1b, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:2 +0xd0 fp=0x4820128440 sp=0x48201283f0
github.com/drone/drone/vendor/github.com/lib/pq.dial(0x7f91de3370, 0x1299c48, 0x48203b8e70, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:279 +0x1b8 fp=0x48201285c0 sp=0x4820128440
github.com/drone/drone/vendor/github.com/lib/pq.DialOpen(0x7f91de3370, 0x1299c48, 0x48203bb500, 0x5c, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:238 +0x9d8 fp=0x4820128b40 sp=0x48201285c0
github.com/drone/drone/vendor/github.com/lib/pq.Open(0x4820093b30, 0x48, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:155 +0x98 fp=0x4820128b90 sp=0x4820128b40
github.com/drone/drone/vendor/github.com/lib/pq.(*drv).Open(0x1299c48, 0x4820093b30, 0x48, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:40 +0x38 fp=0x4820128bd0 sp=0x4820128b90
database/sql.(*DB).conn(0x48200cafd0, 0x1, 0x4820048d68, 0x0, 0x0)
    /usr/lib/go-1.6/src/database/sql/sql.go:821 +0x544 fp=0x4820128d70 sp=0x4820128bd0
database/sql.(*DB).query(0x48200cafd0, 0x48202c97c0, 0x31, 0x482037ba40, 0x1, 0x1, 0x1, 0x42bf00, 0x0, 0x0)
    /usr/lib/go-1.6/src/database/sql/sql.go:1073 +0x34 fp=0x4820128df0 sp=0x4820128d70
database/sql.(*DB).Query(0x48200cafd0, 0x48202c97c0, 0x31, 0x482037ba40, 0x1, 0x1, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/database/sql/sql.go:1061 +0x84 fp=0x4820128e70 sp=0x4820128df0
github.com/drone/drone/vendor/github.com/russross/meddler.(*Database).QueryRow(0x11be000, 0x7f9094d040, 0x482008e210, 0xb23b20, 0x48203bc400, 0x48202c97c0, 0x31, 0x482037ba40, 0x1, 0x1, ...)
    /opt/go/src/github.com/drone/drone/vendor/github.com/russross/meddler/loadsave.go:198 +0x58 fp=0x4820128ed0 sp=0x4820128e70
github.com/drone/drone/vendor/github.com/russross/meddler.QueryRow(0x7f9094d040, 0x482008e210, 0xb23b20, 0x48203bc400, 0x48202c97c0, 0x31, 0x482037ba40, 0x1, 0x1, 0x0, ...)
    /opt/go/src/github.com/drone/drone/vendor/github.com/russross/meddler/loadsave.go:209 +0x78 fp=0x4820128f40 sp=0x4820128ed0
github.com/drone/drone/store/datastore.(*datastore).GetUserLogin(0x482008e210, 0x482037b9c0, 0x4, 0x482008e210, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/store/datastore/users.go:18 +0x1a8 fp=0x4820129020 sp=0x4820128f40
github.com/drone/drone/store.GetUserLogin(0x7f9094d000, 0x48200cbc30, 0x482037b9c0, 0x4, 0x4820049190, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/store/store.go:156 +0x60 fp=0x4820129070 sp=0x4820129020
github.com/drone/drone/router/middleware/session.SetUser.func1.1(0x48203be120, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/router/middleware/session/user.go:43 +0xcc fp=0x48201290e0 sp=0x4820129070
github.com/drone/drone/shared/token.keyFunc.func1(0x48202a46e0, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/shared/token/token.go:128 +0x2fc fp=0x48201291d0 sp=0x48201290e0
github.com/drone/drone/vendor/github.com/dgrijalva/jwt-go.Parse(0x48203bc380, 0x79, 0x48203be140, 0x1, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/dgrijalva/jwt-go/jwt.go:127 +0x8d4 fp=0x4820129340 sp=0x48201291d0
github.com/drone/drone/shared/token.Parse(0x48203bc380, 0x79, 0x48203be0e0, 0x9, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/shared/token/token.go:30 +0x74 fp=0x48201293b0 sp=0x4820129340
github.com/drone/drone/shared/token.ParseRequest(0x482008d180, 0x48203be0e0, 0x482020a907, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/shared/token/token.go:47 +0x1d0 fp=0x4820129470 sp=0x48201293b0
github.com/drone/drone/router/middleware/session.SetUser.func1(0x48200cbc30)
    /opt/go/src/github.com/drone/drone/router/middleware/session/user.go:45 +0xa4 fp=0x4820129550 sp=0x4820129470
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48200cbc30)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4820129580 sp=0x4820129550
github.com/drone/drone/router/middleware.Store.func1(0x48200cbc30)
    /opt/go/src/github.com/drone/drone/router/middleware/store.go:17 +0xa8 fp=0x48201295d0 sp=0x4820129580
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48200cbc30)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4820129600 sp=0x48201295d0
github.com/drone/drone/vendor/github.com/gin-gonic/contrib/ginrus.Ginrus.func1(0x48200cbc30)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/contrib/ginrus/ginrus.go:26 +0x84 fp=0x48201297a0 sp=0x4820129600
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48200cbc30)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x48201297d0 sp=0x48201297a0
github.com/drone/drone/router/middleware/header.Options(0x48200cbc30)
    /opt/go/src/github.com/drone/drone/router/middleware/header/header.go:25 +0x190 fp=0x4820129810 sp=0x48201297d0
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48200cbc30)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4820129840 sp=0x4820129810
github.com/drone/drone/router/middleware/header.NoCache(0x48200cbc30)
    /opt/go/src/github.com/drone/drone/router/middleware/header/header.go:17 +0x128 fp=0x48201298c0 sp=0x4820129840
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48200cbc30)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x48201298f0 sp=0x48201298c0
github.com/drone/drone/vendor/github.com/gin-gonic/gin.RecoveryWithWriter.func1(0x48200cbc30)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/recovery.go:45 +0x64 fp=0x4820129920 sp=0x48201298f0
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48200cbc30)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4820129950 sp=0x4820129920
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0x482008cd20, 0x48200cbc30)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/gin.go:284 +0x220 fp=0x4820129ad0 sp=0x4820129950
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Engine).ServeHTTP(0x482008cd20, 0x7f91de94c8, 0x482020e820, 0x482008d180)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/gin.go:265 +0x1b8 fp=0x4820129b50 sp=0x4820129ad0
net/http.serverHandler.ServeHTTP(0x48203bc080, 0x7f91de94c8, 0x482020e820, 0x482008d180)
    /usr/lib/go-1.6/src/net/http/server.go:2081 +0x1a8 fp=0x4820129bb0 sp=0x4820129b50
net/http.(*conn).serve(0x48203bc180)
    /usr/lib/go-1.6/src/net/http/server.go:1472 +0xee8 fp=0x4820129f80 sp=0x4820129bb0
runtime.goexit()
    /usr/lib/go-1.6/src/runtime/asm_arm64.s:975 +0x4 fp=0x4820129f80 sp=0x4820129f80
created by net/http.(*Server).Serve
    /usr/lib/go-1.6/src/net/http/server.go:2137 +0x3a4

goroutine 1 [IO wait]:
net.runtime_pollWait(0x7f91de42e0, 0x72, 0x8)
    /usr/lib/go-1.6/src/runtime/netpoll.go:160 +0x78
net.(*pollDesc).Wait(0x48203b7170, 0x72, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/fd_poll_runtime.go:73 +0x34
net.(*pollDesc).WaitRead(0x48203b7170, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/fd_poll_runtime.go:78 +0x30
net.(*netFD).accept(0x48203b7110, 0x0, 0x7f91de93f8, 0x48203be020)
    /usr/lib/go-1.6/src/net/fd_unix.go:426 +0x244
net.(*TCPListener).AcceptTCP(0x482008e6c8, 0x482012cf18, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/tcpsock_posix.go:254 +0x4c
net/http.tcpKeepAliveListener.Accept(0x482008e6c8, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/http/server.go:2427 +0x30
net/http.(*Server).Serve(0x48203bc080, 0x7f91de93c0, 0x482008e6c8, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/http/server.go:2117 +0x100
net/http.(*Server).ListenAndServe(0x48203bc080, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/http/server.go:2098 +0x134
net/http.ListenAndServe(0x482037b7e0, 0x5, 0x7f91de9360, 0x482008cd20, 0x0, 0x0)
    /usr/lib/go-1.6/src/net/http/server.go:2195 +0x94
main.server(0x48201bde60, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/drone/server.go:314 +0x438
main.glob.func24(0x48201bde60)
    /opt/go/src/github.com/drone/drone/drone/server.go:19 +0x20
github.com/drone/drone/vendor/github.com/codegangsta/cli.Command.Run(0xd967d0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe4eb80, 0x1e, 0x0, ...)
    /opt/go/src/github.com/drone/drone/vendor/github.com/codegangsta/cli/command.go:131 +0xd7c
github.com/drone/drone/vendor/github.com/codegangsta/cli.(*App).Run(0x48201bdc20, 0x4820090060, 0x2, 0x2, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/codegangsta/cli/app.go:175 +0xe24
main.main()
    /opt/go/src/github.com/drone/drone/drone/main.go:48 +0x4e4

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/lib/go-1.6/src/runtime/asm_arm64.s:975 +0x4

goroutine 20 [syscall]:
os/signal.signal_recv(0x0)
    /usr/lib/go-1.6/src/runtime/sigqueue.go:116 +0x24c
os/signal.loop()
    /usr/lib/go-1.6/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
    /usr/lib/go-1.6/src/os/signal/signal_unix.go:28 +0x3c

goroutine 21 [chan receive]:
database/sql.(*DB).connectionOpener(0x48200cafd0)
    /usr/lib/go-1.6/src/database/sql/sql.go:727 +0x40
created by database/sql.Open
    /usr/lib/go-1.6/src/database/sql/sql.go:493 +0x2c8

goroutine 25 [runnable]:
fmt.(*buffer).WriteRune(0x48203d8070, 0x66, 0x0, 0x0)
    /usr/lib/go-1.6/src/fmt/print.go:93
fmt.(*ss).token(0x48203d8060, 0x1, 0xf09c58, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/fmt/scan.go:475 +0xf8
fmt.(*ss).convertString(0x48203d8060, 0x4800000073, 0x0, 0x0)
    /usr/lib/go-1.6/src/fmt/scan.go:827 +0x130
fmt.(*ss).scanOne(0x48203d8060, 0x73, 0xb37bc0, 0x48203d2440)
    /usr/lib/go-1.6/src/fmt/scan.go:989 +0xe8c
fmt.(*ss).doScanf(0x48203d8060, 0xd9d300, 0x9, 0x48203fd1a8, 0x1, 0x1, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/fmt/scan.go:1191 +0x394
fmt.Fscanf(0x7f91de44f8, 0x48203d2450, 0xd9d300, 0x9, 0x48203fd1a8, 0x1, 0x1, 0xd9d160, 0x0, 0x0)
    /usr/lib/go-1.6/src/fmt/scan.go:151 +0xb8
fmt.Sscanf(0x48203e0080, 0x80, 0xd9d300, 0x9, 0x48203fd1a8, 0x1, 0x1, 0xb60c01, 0x0, 0x0)
    /usr/lib/go-1.6/src/fmt/scan.go:122 +0xe4
github.com/drone/drone/shared/token.ParseRequest(0x48203de000, 0x48203d6320, 0x48203d20e0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/shared/token/token.go:46 +0x19c
github.com/drone/drone/router/middleware/session.AuthorizeAgent(0x48203ec000)
    /opt/go/src/github.com/drone/drone/router/middleware/session/agent.go:18 +0x11c
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48203ec000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4
github.com/drone/drone/router/middleware/token.Refresh(0x48203ec000)
    /opt/go/src/github.com/drone/drone/router/middleware/token/token.go:17 +0x118
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48203ec000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4
github.com/drone/drone/router/middleware/session.SetUser.func1(0x48203ec000)
    /opt/go/src/github.com/drone/drone/router/middleware/session/user.go:68 +0x368
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48203ec000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4
github.com/drone/drone/router/middleware.Store.func1(0x48203ec000)
    /opt/go/src/github.com/drone/drone/router/middleware/store.go:17 +0xa8
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48203ec000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4
github.com/drone/drone/vendor/github.com/gin-gonic/contrib/ginrus.Ginrus.func1(0x48203ec000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/contrib/ginrus/ginrus.go:26 +0x84
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48203ec000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4
github.com/drone/drone/router/middleware/header.Options(0x48203ec000)
    /opt/go/src/github.com/drone/drone/router/middleware/header/header.go:25 +0x190
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48203ec000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4
github.com/drone/drone/router/middleware/header.NoCache(0x48203ec000)
    /opt/go/src/github.com/drone/drone/router/middleware/header/header.go:17 +0x128
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48203ec000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4
github.com/drone/drone/vendor/github.com/gin-gonic/gin.RecoveryWithWriter.func1(0x48203ec000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/recovery.go:45 +0x64
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x48203ec000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0x482008cd20, 0x48203ec000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/gin.go:284 +0x220
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Engine).ServeHTTP(0x482008cd20, 0x7f91de94c8, 0x48203e8000, 0x48203de000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/gin.go:265 +0x1b8
net/http.serverHandler.ServeHTTP(0x48203bc080, 0x7f91de94c8, 0x48203e8000, 0x48203de000)
    /usr/lib/go-1.6/src/net/http/server.go:2081 +0x1a8
net/http.(*conn).serve(0x48203bc100)
    /usr/lib/go-1.6/src/net/http/server.go:1472 +0xee8
created by net/http.(*Server).Serve
    /usr/lib/go-1.6/src/net/http/server.go:2137 +0x3a4
@minux
Copy link
Member

minux commented Aug 14, 2016 via email

@sokoow
Copy link
Author

sokoow commented Aug 14, 2016

I can't run -race as I'm under arm64... Migrating to 1.7rc6 didn't help, here's stacks on this version:

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

runtime stack:
runtime.throw(0xc2551b, 0x2a)
    /home/go/src/runtime/panic.go:566 +0x80 fp=0x7f7a236e20 sp=0x7f7a236e00
runtime.sigpanic()
    /home/go/src/runtime/sigpanic_unix.go:12 +0x50 fp=0x7f7a236e70 sp=0x7f7a236e20

goroutine 38 [syscall, locked to thread]:
runtime.cgocall(0x9b1bb8, 0x44203eca88, 0x4400000000)
    /home/go/src/runtime/cgocall.go:131 +0x164 fp=0x44203eca30 sp=0x44203ec9f0
net._C2func_getaddrinfo(0x7f700008c0, 0x0, 0x44203b9ad0, 0x442039e470, 0x0, 0x0, 0x0)
    ??:0 +0x54 fp=0x44203eca80 sp=0x44203eca30
net.cgoLookupIPCNAME(0x44203c9760, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/go/src/net/cgo_unix.go:146 +0x390 fp=0x44203ecc10 sp=0x44203eca80
net.cgoLookupIP(0xf14c60, 0x4420072370, 0x44203c9760, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/go/src/net/cgo_unix.go:204 +0x74 fp=0x44203ecd60 sp=0x44203ecc10
net.lookupIP(0xf14c60, 0x4420072370, 0x44203c9760, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/go/src/net/lookup_unix.go:70 +0x78 fp=0x44203ecde0 sp=0x44203ecd60
net.glob..func11(0xf14c60, 0x4420072370, 0xc78710, 0x44203c9760, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/go/src/net/hook.go:19 +0x54 fp=0x44203ece30 sp=0x44203ecde0
net.lookupIPContext.func1(0x0, 0x0, 0x0, 0x0)
    /home/go/src/net/lookup.go:119 +0x78 fp=0x44203eced0 sp=0x44203ece30
internal/singleflight.(*Group).doCall(0xfbdd20, 0x4420216280, 0x44203c9760, 0x16, 0x44203b9a40)
    /home/go/src/internal/singleflight/singleflight.go:93 +0x20 fp=0x44203ecf80 sp=0x44203eced0
runtime.goexit()
    /home/go/src/runtime/asm_arm64.s:983 +0x4 fp=0x44203ecf80 sp=0x44203ecf80
created by internal/singleflight.(*Group).DoChan
    /home/go/src/internal/singleflight/singleflight.go:86 +0x390

goroutine 1 [IO wait]:
runtime.gopark(0xc78cf0, 0x7f79206150, 0xc0907f, 0x7, 0x1b, 0x5)
    /home/go/src/runtime/proc.go:259 +0x178 fp=0x442012cc40 sp=0x442012cc10
runtime.netpollblock(0x7f79206128, 0x72, 0x0)
    /home/go/src/runtime/netpoll.go:341 +0x1a0 fp=0x442012cc90 sp=0x442012cc40
net.runtime_pollWait(0x7f79206128, 0x72, 0x8)
    /home/go/src/runtime/netpoll.go:160 +0x78 fp=0x442012ccb0 sp=0x442012cc90
net.(*pollDesc).wait(0x44203a3720, 0x72, 0x0, 0x0)
    /home/go/src/net/fd_poll_runtime.go:73 +0x34 fp=0x442012ccd0 sp=0x442012ccb0
net.(*pollDesc).waitRead(0x44203a3720, 0x0, 0x0)
    /home/go/src/net/fd_poll_runtime.go:78 +0x30 fp=0x442012cd00 sp=0x442012ccd0
net.(*netFD).accept(0x44203a36c0, 0x0, 0xf0f360, 0x44203c9100)
    /home/go/src/net/fd_unix.go:419 +0x244 fp=0x442012ce00 sp=0x442012cd00
net.(*TCPListener).accept(0x442039e440, 0x55df70, 0x0, 0x0)
    /home/go/src/net/tcpsock_posix.go:132 +0x30 fp=0x442012ce40 sp=0x442012ce00
net.(*TCPListener).AcceptTCP(0x442039e440, 0x442012ced0, 0x0, 0x0)
    /home/go/src/net/tcpsock.go:209 +0xb4 fp=0x442012ce90 sp=0x442012ce40
net/http.tcpKeepAliveListener.Accept(0x442039e440, 0x0, 0x0, 0x0, 0x0)
    /home/go/src/net/http/server.go:2608 +0x30 fp=0x442012cec0 sp=0x442012ce90
net/http.(*Server).Serve(0x44203c6e80, 0xf146e0, 0x442039e440, 0x0, 0x0)
    /home/go/src/net/http/server.go:2273 +0x22c fp=0x442012d010 sp=0x442012cec0
net/http.(*Server).ListenAndServe(0x44203c6e80, 0x0, 0x0)
    /home/go/src/net/http/server.go:2219 +0xf4 fp=0x442012d0a0 sp=0x442012d010
net/http.ListenAndServe(0x44203a1520, 0x5, 0xf0dfa0, 0x4420136b60, 0x0, 0x0)
    /home/go/src/net/http/server.go:2351 +0x94 fp=0x442012d0d0 sp=0x442012d0a0
main.server(0x44202038c0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/drone/server.go:314 +0x334 fp=0x442012d220 sp=0x442012d0d0
main.glob..func24(0x44202038c0)
    /opt/go/src/github.com/drone/drone/drone/server.go:19 +0x20 fp=0x442012d290 sp=0x442012d220
github.com/drone/drone/vendor/github.com/codegangsta/cli.Command.Run(0xc08ac3, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc1d430, 0x1e, 0x0, ...)
    /opt/go/src/github.com/drone/drone/vendor/github.com/codegangsta/cli/command.go:131 +0xcc0 fp=0x442012d790 sp=0x442012d290
github.com/drone/drone/vendor/github.com/codegangsta/cli.(*App).Run(0x4420203680, 0x442008e080, 0x2, 0x2, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/codegangsta/cli/app.go:175 +0xd08 fp=0x442012de20 sp=0x442012d790
main.main()
    /opt/go/src/github.com/drone/drone/drone/main.go:48 +0x528 fp=0x442012df30 sp=0x442012de20
runtime.main()
    /home/go/src/runtime/proc.go:183 +0x2d0 fp=0x442012df80 sp=0x442012df30
runtime.goexit()
    /home/go/src/runtime/asm_arm64.s:983 +0x4 fp=0x442012df80 sp=0x442012df80

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /home/go/src/runtime/asm_arm64.s:983 +0x4 fp=0x4420038fb0 sp=0x4420038fb0

goroutine 2 [force gc (idle)]:
runtime.gopark(0xc78d38, 0xfbe840, 0xc10225, 0xf, 0xc78c14, 0x1)
    /home/go/src/runtime/proc.go:259 +0x178 fp=0x4420024740 sp=0x4420024710
runtime.goparkunlock(0xfbe840, 0xc10225, 0xf, 0x4420000314, 0x1)
    /home/go/src/runtime/proc.go:265 +0x4c fp=0x4420024780 sp=0x4420024740
runtime.forcegchelper()
    /home/go/src/runtime/proc.go:224 +0xd0 fp=0x44200247b0 sp=0x4420024780
runtime.goexit()
    /home/go/src/runtime/asm_arm64.s:983 +0x4 fp=0x44200247b0 sp=0x44200247b0
created by runtime.init.3
    /home/go/src/runtime/proc.go:213 +0x2c

goroutine 18 [GC sweep wait]:
runtime.gopark(0xc78d38, 0xfbeb80, 0xc0e496, 0xd, 0x439114, 0x1)
    /home/go/src/runtime/proc.go:259 +0x178 fp=0x4420020730 sp=0x4420020700
runtime.goparkunlock(0xfbeb80, 0xc0e496, 0xd, 0x14, 0x1)
    /home/go/src/runtime/proc.go:265 +0x4c fp=0x4420020770 sp=0x4420020730
runtime.bgsweep(0x442006c000)
    /home/go/src/runtime/mgcsweep.go:63 +0xb8 fp=0x44200207b0 sp=0x4420020770
runtime.goexit()
    /home/go/src/runtime/asm_arm64.s:983 +0x4 fp=0x44200207b0 sp=0x44200207b0
created by runtime.gcenable
    /home/go/src/runtime/mgc.go:195 +0x50

goroutine 19 [finalizer wait]:
runtime.gopark(0xc78d38, 0xfe0fa0, 0xc0f558, 0xe, 0x14, 0x1)
    /home/go/src/runtime/proc.go:259 +0x178 fp=0x4420020f00 sp=0x4420020ed0
runtime.goparkunlock(0xfe0fa0, 0xc0f558, 0xe, 0x14, 0x1)
    /home/go/src/runtime/proc.go:265 +0x4c fp=0x4420020f40 sp=0x4420020f00
runtime.runfinq()
    /home/go/src/runtime/mfinal.go:158 +0xd0 fp=0x4420020fb0 sp=0x4420020f40
runtime.goexit()
    /home/go/src/runtime/asm_arm64.s:983 +0x4 fp=0x4420020fb0 sp=0x4420020fb0
created by runtime.createfing
    /home/go/src/runtime/mfinal.go:139 +0x7c

goroutine 20 [syscall]:
runtime.notetsleepg(0xfe13c0, 0xffffffffffffffff, 0x1)
    /home/go/src/runtime/lock_futex.go:205 +0x54 fp=0x4420021730 sp=0x4420021700
os/signal.signal_recv(0x0)
    /home/go/src/runtime/sigqueue.go:116 +0x204 fp=0x4420021770 sp=0x4420021730
os/signal.loop()
    /home/go/src/os/signal/signal_unix.go:22 +0x18 fp=0x44200217b0 sp=0x4420021770
runtime.goexit()
    /home/go/src/runtime/asm_arm64.s:983 +0x4 fp=0x44200217b0 sp=0x44200217b0
created by os/signal.init.1
    /home/go/src/os/signal/signal_unix.go:28 +0x3c

goroutine 21 [chan receive]:
runtime.gopark(0xc78d38, 0x4420071978, 0xc0dcf9, 0xc, 0x442001b717, 0x3)
    /home/go/src/runtime/proc.go:259 +0x178 fp=0x4420021e80 sp=0x4420021e50
runtime.goparkunlock(0x4420071978, 0xc0dcf9, 0xc, 0x17, 0x3)
    /home/go/src/runtime/proc.go:265 +0x4c fp=0x4420021ec0 sp=0x4420021e80
runtime.chanrecv(0xb22580, 0x4420071920, 0x4420021fa8, 0x1, 0x0)
    /home/go/src/runtime/chan.go:496 +0x51c fp=0x4420021f50 sp=0x4420021ec0
runtime.chanrecv2(0xb22580, 0x4420071920, 0x4420021fa8, 0x0)
    /home/go/src/runtime/chan.go:383 +0x3c fp=0x4420021f80 sp=0x4420021f50
database/sql.(*DB).connectionOpener(0x44200c98c0)
    /home/go/src/database/sql/sql.go:730 +0x40 fp=0x4420021fb0 sp=0x4420021f80
runtime.goexit()
    /home/go/src/runtime/asm_arm64.s:983 +0x4 fp=0x4420021fb0 sp=0x4420021fb0
created by database/sql.Open
    /home/go/src/database/sql/sql.go:493 +0x280

goroutine 36 [IO wait]:
runtime.gopark(0xc78cf0, 0x7f79206210, 0xc0907f, 0x7, 0x1b, 0x5)
    /home/go/src/runtime/proc.go:259 +0x178 fp=0x44201282d0 sp=0x44201282a0
runtime.netpollblock(0x7f792061e8, 0x72, 0x4420128360)
    /home/go/src/runtime/netpoll.go:341 +0x1a0 fp=0x4420128320 sp=0x44201282d0
net.runtime_pollWait(0x7f792061e8, 0x72, 0x8)
    /home/go/src/runtime/netpoll.go:160 +0x78 fp=0x4420128340 sp=0x4420128320
net.(*pollDesc).wait(0x4420200b50, 0x72, 0x0, 0x0)
    /home/go/src/net/fd_poll_runtime.go:73 +0x34 fp=0x4420128360 sp=0x4420128340
net.(*pollDesc).waitRead(0x4420200b50, 0x0, 0x0)
    /home/go/src/net/fd_poll_runtime.go:78 +0x30 fp=0x4420128390 sp=0x4420128360
net.(*netFD).Read(0x4420200af0, 0x4420228000, 0x1000, 0x1000, 0x0, 0xf10ee0, 0x44200720b0)
    /home/go/src/net/fd_unix.go:243 +0x1fc fp=0x4420128460 sp=0x4420128390
net.(*conn).Read(0x4420090320, 0x4420228000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /home/go/src/net/net.go:173 +0xd0 fp=0x44201284d0 sp=0x4420128460
bufio.(*Reader).fill(0x4420071aa0)
    /home/go/src/bufio/bufio.go:97 +0x1c0 fp=0x4420128590 sp=0x44201284d0
bufio.(*Reader).Read(0x4420071aa0, 0x44201d5ba0, 0x5, 0x200, 0x2, 0x0, 0x0)
    /home/go/src/bufio/bufio.go:209 +0x214 fp=0x4420128640 sp=0x4420128590
io.ReadAtLeast(0xf0d4e0, 0x4420071aa0, 0x44201d5ba0, 0x5, 0x200, 0x5, 0x0, 0x0, 0x0)
    /home/go/src/io/io.go:307 +0xdc fp=0x44201286a0 sp=0x4420128640
io.ReadFull(0xf0d4e0, 0x4420071aa0, 0x44201d5ba0, 0x5, 0x200, 0xc05500, 0x0, 0x0)
    /home/go/src/io/io.go:325 +0x54 fp=0x44201286f0 sp=0x44201286a0
github.com/drone/drone/vendor/github.com/lib/pq.(*conn).recvMessage(0x44201d5b80, 0x44203c90e0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:820 +0xe8 fp=0x44201287b0 sp=0x44201286f0
github.com/drone/drone/vendor/github.com/lib/pq.(*conn).recv1Buf(0x44201d5b80, 0x44203c90e0, 0x46)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:870 +0x30 fp=0x44201287f0 sp=0x44201287b0
github.com/drone/drone/vendor/github.com/lib/pq.(*conn).recv1(0x44201d5b80, 0x2, 0x44203c90e0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:891 +0xb8 fp=0x4420128830 sp=0x44201287f0
github.com/drone/drone/vendor/github.com/lib/pq.(*conn).readParseResponse(0x44201d5b80)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:1522 +0x20 fp=0x44201288a0 sp=0x4420128830
github.com/drone/drone/vendor/github.com/lib/pq.(*conn).prepareTo(0x44201d5b80, 0x44203be880, 0x31, 0x0, 0x0, 0x44203a17b0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:660 +0xabc fp=0x4420128b70 sp=0x44201288a0
github.com/drone/drone/vendor/github.com/lib/pq.(*conn).Query(0x44201d5b80, 0x44203be880, 0x31, 0x44203a17d0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:718 +0x340 fp=0x4420128c50 sp=0x4420128b70
database/sql.(*DB).queryConn(0x44200c98c0, 0x4420200b60, 0x44203a17c0, 0x44203be880, 0x31, 0x44203a17a0, 0x1, 0x1, 0x44203be880, 0x0, ...)
    /home/go/src/database/sql/sql.go:1092 +0x188 fp=0x4420128d80 sp=0x4420128c50
database/sql.(*DB).query(0x44200c98c0, 0x44203be880, 0x31, 0x44203a17a0, 0x1, 0x1, 0x1, 0xb27180, 0x0, 0x0)
    /home/go/src/database/sql/sql.go:1079 +0xec fp=0x4420128e00 sp=0x4420128d80
database/sql.(*DB).Query(0x44200c98c0, 0x44203be880, 0x31, 0x44203a17a0, 0x1, 0x1, 0x0, 0x0, 0x0)
    /home/go/src/database/sql/sql.go:1062 +0x84 fp=0x4420128e80 sp=0x4420128e00
github.com/drone/drone/vendor/github.com/russross/meddler.(*Database).QueryRow(0xefbe80, 0xf13a20, 0x4420090360, 0xb04ee0, 0x44203c7180, 0x44203be880, 0x31, 0x44203a17a0, 0x1, 0x1, ...)
    /opt/go/src/github.com/drone/drone/vendor/github.com/russross/meddler/loadsave.go:198 +0x58 fp=0x4420128ee0 sp=0x4420128e80
github.com/drone/drone/vendor/github.com/russross/meddler.QueryRow(0xf13a20, 0x4420090360, 0xb04ee0, 0x44203c7180, 0x44203be880, 0x31, 0x44203a17a0, 0x1, 0x1, 0x0, ...)
    /opt/go/src/github.com/drone/drone/vendor/github.com/russross/meddler/loadsave.go:209 +0x78 fp=0x4420128f50 sp=0x4420128ee0
github.com/drone/drone/store/datastore.(*datastore).GetUserLogin(0x4420090360, 0x44203a1718, 0x4, 0x4420090360, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/store/datastore/users.go:18 +0x164 fp=0x4420129030 sp=0x4420128f50
github.com/drone/drone/store.GetUserLogin(0xf14ea0, 0x44203e2630, 0x44203a1718, 0x4, 0x4420129190, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/store/store.go:156 +0x60 fp=0x4420129080 sp=0x4420129030
github.com/drone/drone/router/middleware/session.SetUser.func1.1(0x44203c8fe0, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/router/middleware/session/user.go:43 +0x88 fp=0x44201290f0 sp=0x4420129080
github.com/drone/drone/shared/token.keyFunc.func1(0x4420216190, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/shared/token/token.go:128 +0x2bc fp=0x44201291e0 sp=0x44201290f0
github.com/drone/drone/vendor/github.com/dgrijalva/jwt-go.Parse(0x44203c7100, 0x79, 0x44203c9000, 0x9, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/dgrijalva/jwt-go/jwt.go:127 +0x6f0 fp=0x4420129350 sp=0x44201291e0
github.com/drone/drone/shared/token.Parse(0x44203c7100, 0x79, 0x44203c8fa0, 0x9, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/shared/token/token.go:30 +0x74 fp=0x44201293c0 sp=0x4420129350
github.com/drone/drone/shared/token.ParseRequest(0x44203f2000, 0x44203c8fa0, 0xb27180, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/shared/token/token.go:47 +0x1d0 fp=0x4420129480 sp=0x44201293c0
github.com/drone/drone/router/middleware/session.SetUser.func1(0x44203e2630)
    /opt/go/src/github.com/drone/drone/router/middleware/session/user.go:45 +0xb4 fp=0x4420129560 sp=0x4420129480
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x44203e2630)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4420129590 sp=0x4420129560
github.com/drone/drone/router/middleware.Store.func1(0x44203e2630)
    /opt/go/src/github.com/drone/drone/router/middleware/store.go:17 +0x5c fp=0x44201295e0 sp=0x4420129590
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x44203e2630)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4420129610 sp=0x44201295e0
github.com/drone/drone/vendor/github.com/gin-gonic/contrib/ginrus.Ginrus.func1(0x44203e2630)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/contrib/ginrus/ginrus.go:26 +0x84 fp=0x44201297b0 sp=0x4420129610
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x44203e2630)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x44201297e0 sp=0x44201297b0
github.com/drone/drone/router/middleware/header.Options(0x44203e2630)
    /opt/go/src/github.com/drone/drone/router/middleware/header/header.go:25 +0x190 fp=0x4420129820 sp=0x44201297e0
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x44203e2630)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4420129850 sp=0x4420129820
github.com/drone/drone/router/middleware/header.NoCache(0x44203e2630)
    /opt/go/src/github.com/drone/drone/router/middleware/header/header.go:17 +0x128 fp=0x44201298d0 sp=0x4420129850
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x44203e2630)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4420129900 sp=0x44201298d0
github.com/drone/drone/vendor/github.com/gin-gonic/gin.RecoveryWithWriter.func1(0x44203e2630)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/recovery.go:45 +0x64 fp=0x4420129930 sp=0x4420129900
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x44203e2630)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4420129960 sp=0x4420129930
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0x4420136b60, 0x44203e2630)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/gin.go:284 +0x220 fp=0x4420129ae0 sp=0x4420129960
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Engine).ServeHTTP(0x4420136b60, 0xf14020, 0x442039c410, 0x44203f2000)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/gin.go:265 +0x160 fp=0x4420129b50 sp=0x4420129ae0
net/http.serverHandler.ServeHTTP(0x44203c6e80, 0xf14020, 0x442039c410, 0x44203f2000)
    /home/go/src/net/http/server.go:2202 +0x154 fp=0x4420129ba0 sp=0x4420129b50
net/http.(*conn).serve(0x44203c6f00, 0xf14c20, 0x44203be680)
    /home/go/src/net/http/server.go:1579 +0xda8 fp=0x4420129f70 sp=0x4420129ba0
runtime.goexit()
    /home/go/src/runtime/asm_arm64.s:983 +0x4 fp=0x4420129f70 sp=0x4420129f70
created by net/http.(*Server).Serve
    /home/go/src/net/http/server.go:2293 +0x470

goroutine 37 [select]:
runtime.gopark(0xc78d70, 0x0, 0xc08ab1, 0x6, 0x18, 0x2)
    /home/go/src/runtime/proc.go:259 +0x178 fp=0x44203ff8e0 sp=0x44203ff8b0
runtime.selectgoImpl(0x44203ffce0, 0x18, 0x1)
    /home/go/src/runtime/select.go:423 +0x1128 fp=0x44203ffaf0 sp=0x44203ff8e0
runtime.selectgo(0x44203ffce0)
    /home/go/src/runtime/select.go:238 +0x10 fp=0x44203ffb10 sp=0x44203ffaf0
net.lookupIPContext(0xf14c60, 0x4420072370, 0x44203c9760, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/go/src/net/lookup.go:122 +0x74c fp=0x44203ffd60 sp=0x44203ffb10
net.internetAddrList(0xf14c60, 0x4420072370, 0xc05c17, 0x3, 0x44203c9760, 0x1b, 0x0, 0x0, 0x0, 0x0, ...)
    /home/go/src/net/ipsock.go:241 +0x4e8 fp=0x44203ffea0 sp=0x44203ffd60
net.resolveAddrList(0xf14c60, 0x4420072370, 0xc062de, 0x4, 0xc05c17, 0x3, 0x44203c9760, 0x1b, 0x0, 0x0, ...)
    /home/go/src/net/dial.go:179 +0x634 fp=0x44204000a0 sp=0x44203ffea0
net.(*Dialer).DialContext(0x4420400380, 0xf14c60, 0x4420072370, 0xc05c17, 0x3, 0x44203c9760, 0x1b, 0x0, 0x0, 0x0, ...)
    /home/go/src/net/dial.go:329 +0x4c8 fp=0x44204002b0 sp=0x44204000a0
net.(*Dialer).Dial(0x4420400380, 0xc05c17, 0x3, 0x44203c9760, 0x1b, 0x0, 0x0, 0x0, 0x0)
    /home/go/src/net/dial.go:282 +0x7c fp=0x4420400330 sp=0x44204002b0
net.Dial(0xc05c17, 0x3, 0x44203c9760, 0x1b, 0x0, 0x0, 0x0, 0x0)
    /home/go/src/net/dial.go:261 +0x5c fp=0x44204003d0 sp=0x4420400330
github.com/drone/drone/vendor/github.com/lib/pq.defaultDialer.Dial(0xc05c17, 0x3, 0x44203c9760, 0x1b, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:88 +0x48 fp=0x4420400420 sp=0x44204003d0
github.com/drone/drone/vendor/github.com/lib/pq.(*defaultDialer).Dial(0xfe1078, 0xc05c17, 0x3, 0x44203c9760, 0x1b, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:2 +0xd0 fp=0x4420400470 sp=0x4420400420
github.com/drone/drone/vendor/github.com/lib/pq.dial(0xf12f60, 0xfe1078, 0x44203b9980, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:279 +0x1b0 fp=0x44204005f0 sp=0x4420400470
github.com/drone/drone/vendor/github.com/lib/pq.DialOpen(0xf12f60, 0xfe1078, 0x44203e55c0, 0x5c, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:238 +0x974 fp=0x4420400b50 sp=0x44204005f0
github.com/drone/drone/vendor/github.com/lib/pq.Open(0x442006f950, 0x48, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:155 +0x80 fp=0x4420400ba0 sp=0x4420400b50
github.com/drone/drone/vendor/github.com/lib/pq.(*drv).Open(0xfe1078, 0x442006f950, 0x48, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/lib/pq/conn.go:40 +0x38 fp=0x4420400be0 sp=0x4420400ba0
database/sql.(*DB).conn(0x44200c98c0, 0x1, 0x4420400d68, 0x0, 0x0)
    /home/go/src/database/sql/sql.go:824 +0x544 fp=0x4420400d80 sp=0x4420400be0
database/sql.(*DB).query(0x44200c98c0, 0x44203bec00, 0x31, 0x44203a1a10, 0x1, 0x1, 0x1, 0xb27180, 0x0, 0x0)
    /home/go/src/database/sql/sql.go:1074 +0x34 fp=0x4420400e00 sp=0x4420400d80
database/sql.(*DB).Query(0x44200c98c0, 0x44203bec00, 0x31, 0x44203a1a10, 0x1, 0x1, 0x0, 0x0, 0x0)
    /home/go/src/database/sql/sql.go:1062 +0x84 fp=0x4420400e80 sp=0x4420400e00
github.com/drone/drone/vendor/github.com/russross/meddler.(*Database).QueryRow(0xefbe80, 0xf13a20, 0x4420090360, 0xb04ee0, 0x44203c7400, 0x44203bec00, 0x31, 0x44203a1a10, 0x1, 0x1, ...)
    /opt/go/src/github.com/drone/drone/vendor/github.com/russross/meddler/loadsave.go:198 +0x58 fp=0x4420400ee0 sp=0x4420400e80
github.com/drone/drone/vendor/github.com/russross/meddler.QueryRow(0xf13a20, 0x4420090360, 0xb04ee0, 0x44203c7400, 0x44203bec00, 0x31, 0x44203a1a10, 0x1, 0x1, 0x0, ...)
    /opt/go/src/github.com/drone/drone/vendor/github.com/russross/meddler/loadsave.go:209 +0x78 fp=0x4420400f50 sp=0x4420400ee0
github.com/drone/drone/store/datastore.(*datastore).GetUserLogin(0x4420090360, 0x44203a1988, 0x4, 0x4420090360, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/store/datastore/users.go:18 +0x164 fp=0x4420401030 sp=0x4420400f50
github.com/drone/drone/store.GetUserLogin(0xf14ea0, 0x44203e26e0, 0x44203a1988, 0x4, 0x4420401190, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/store/store.go:156 +0x60 fp=0x4420401080 sp=0x4420401030
github.com/drone/drone/router/middleware/session.SetUser.func1.1(0x44203c91a0, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/router/middleware/session/user.go:43 +0x88 fp=0x44204010f0 sp=0x4420401080
github.com/drone/drone/shared/token.keyFunc.func1(0x4420216230, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/shared/token/token.go:128 +0x2bc fp=0x44204011e0 sp=0x44204010f0
github.com/drone/drone/vendor/github.com/dgrijalva/jwt-go.Parse(0x44203c7380, 0x79, 0x44203c91c0, 0x9, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/dgrijalva/jwt-go/jwt.go:127 +0x6f0 fp=0x4420401350 sp=0x44204011e0
github.com/drone/drone/shared/token.Parse(0x44203c7380, 0x79, 0x44203c9180, 0x9, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/shared/token/token.go:30 +0x74 fp=0x44204013c0 sp=0x4420401350
github.com/drone/drone/shared/token.ParseRequest(0x44203f22d0, 0x44203c9180, 0xb27180, 0x0, 0x0)
    /opt/go/src/github.com/drone/drone/shared/token/token.go:47 +0x1d0 fp=0x4420401480 sp=0x44204013c0
github.com/drone/drone/router/middleware/session.SetUser.func1(0x44203e26e0)
    /opt/go/src/github.com/drone/drone/router/middleware/session/user.go:45 +0xb4 fp=0x4420401560 sp=0x4420401480
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x44203e26e0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4420401590 sp=0x4420401560
github.com/drone/drone/router/middleware.Store.func1(0x44203e26e0)
    /opt/go/src/github.com/drone/drone/router/middleware/store.go:17 +0x5c fp=0x44204015e0 sp=0x4420401590
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x44203e26e0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4420401610 sp=0x44204015e0
github.com/drone/drone/vendor/github.com/gin-gonic/contrib/ginrus.Ginrus.func1(0x44203e26e0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/contrib/ginrus/ginrus.go:26 +0x84 fp=0x44204017b0 sp=0x4420401610
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x44203e26e0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x44204017e0 sp=0x44204017b0
github.com/drone/drone/router/middleware/header.Options(0x44203e26e0)
    /opt/go/src/github.com/drone/drone/router/middleware/header/header.go:25 +0x190 fp=0x4420401820 sp=0x44204017e0
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x44203e26e0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4420401850 sp=0x4420401820
github.com/drone/drone/router/middleware/header.NoCache(0x44203e26e0)
    /opt/go/src/github.com/drone/drone/router/middleware/header/header.go:17 +0x128 fp=0x44204018d0 sp=0x4420401850
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x44203e26e0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4420401900 sp=0x44204018d0
github.com/drone/drone/vendor/github.com/gin-gonic/gin.RecoveryWithWriter.func1(0x44203e26e0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/recovery.go:45 +0x64 fp=0x4420401930 sp=0x4420401900
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Context).Next(0x44203e26e0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 +0xa4 fp=0x4420401960 sp=0x4420401930
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0x4420136b60, 0x44203e26e0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/gin.go:284 +0x220 fp=0x4420401ae0 sp=0x4420401960
github.com/drone/drone/vendor/github.com/gin-gonic/gin.(*Engine).ServeHTTP(0x4420136b60, 0xf14020, 0x442039c4e0, 0x44203f22d0)
    /opt/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/gin.go:265 +0x160 fp=0x4420401b50 sp=0x4420401ae0
net/http.serverHandler.ServeHTTP(0x44203c6e80, 0xf14020, 0x442039c4e0, 0x44203f22d0)
    /home/go/src/net/http/server.go:2202 +0x154 fp=0x4420401ba0 sp=0x4420401b50
net/http.(*conn).serve(0x44203c7200, 0xf14c20, 0x44203bea40)
    /home/go/src/net/http/server.go:1579 +0xda8 fp=0x4420401f70 sp=0x4420401ba0
runtime.goexit()
    /home/go/src/runtime/asm_arm64.s:983 +0x4 fp=0x4420401f70 sp=0x4420401f70
created by net/http.(*Server).Serve
    /home/go/src/net/http/server.go:2293 +0x470

@sokoow
Copy link
Author

sokoow commented Aug 14, 2016

another one:

Thread 3 "drone" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f9a7b2090 (LWP 21950)]
0x0000007f98ddd334 in internal_getent (stream=0x7f840008c0, result=0x6a83ec <net.glob..func11+84>, result@entry=0x2e302e302e373231, 
    buffer=0xca8e08 "gethostbyname4_r", buffer@entry=0x7f9a7b1010 "", buflen=buflen@entry=1064, errnop=0x7f9a7b14c0, errnop@entry=0x7f9a7b15c0, herrnop=0x0, 
    herrnop@entry=0x686c61636f6c0931, af=127, af@entry=0, flags=-1703211040, flags@entry=0) at nss_files/files-XXX.c:251
251 nss_files/files-XXX.c: No such file or directory.
(gdb) bt
#0  0x0000007f98ddd334 in internal_getent (stream=0x7f840008c0, result=0x6a83ec <net.glob..func11+84>, result@entry=0x2e302e302e373231, 
    buffer=0xca8e08 "gethostbyname4_r", buffer@entry=0x7f9a7b1010 "", buflen=buflen@entry=1064, errnop=0x7f9a7b14c0, errnop@entry=0x7f9a7b15c0, herrnop=0x0, 
    herrnop@entry=0x686c61636f6c0931, af=127, af@entry=0, flags=-1703211040, flags@entry=0) at nss_files/files-XXX.c:251
#1  0x0000007f98dde2c0 in _nss_files_gethostbyname4_r (name=0x7f940008c0 "postgres.pharaoh.local", pat=0x7f9a7b15d0, buffer=0x7f9a7b1010 "", buflen=1064, 
    errnop=0x7f9a7b15c0, herrnop=0x686c61636f6c0931, ttlp=<optimized out>) at nss_files/files-hosts.c:392
#2  0x0000000000a71438 in gaih_inet ()
#3  0x0000000000a72ef0 in getaddrinfo ()
#4  0x00000000009b1bec in _cgo_7a2d42f1a351_C2func_getaddrinfo (v=0x442003ba88) at /home/go/src/net/cgo_unix.go:66
#5  0x000000000047cf28 in runtime.asmcgocall () at /home/go/src/runtime/asm_arm64.s:542
#6  0x00000044201716c0 in ?? ()
#7  0x0000000000000001 in ?? ()

libc related crash?

@sokoow
Copy link
Author

sokoow commented Aug 14, 2016

another one:

Thread 4 "drone" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f964a1090 (LWP 28090)]
0x0000007f952cc334 in internal_getent (stream=0x7f800008c0, result=0x0, result@entry=0x2e302e302e373231, buffer=0xca8e08 "gethostbyname4_r", 
    buffer@entry=0x7f964a0010 "\200\017F", buflen=buflen@entry=1064, errnop=0x7f964a04c0, errnop@entry=0x7f964a05c0, herrnop=0x0, 
    herrnop@entry=0x686c61636f6c0931, af=127, af@entry=0, flags=-1773535264, flags@entry=0) at nss_files/files-XXX.c:251
251 nss_files/files-XXX.c: No such file or directory.
(gdb) bt
#0  0x0000007f952cc334 in internal_getent (stream=0x7f800008c0, result=0x0, result@entry=0x2e302e302e373231, buffer=0xca8e08 "gethostbyname4_r", 
    buffer@entry=0x7f964a0010 "\200\017F", buflen=buflen@entry=1064, errnop=0x7f964a04c0, errnop@entry=0x7f964a05c0, herrnop=0x0, 
    herrnop@entry=0x686c61636f6c0931, af=127, af@entry=0, flags=-1773535264, flags@entry=0) at nss_files/files-XXX.c:251
#1  0x0000007f952cd2c0 in _nss_files_gethostbyname4_r (name=0x7f880008c0 "repo.pharaoh.local", pat=0x7f964a05d0, buffer=0x7f964a0010 "\200\017F", 
    buflen=1064, errnop=0x7f964a05c0, herrnop=0x686c61636f6c0931, ttlp=<optimized out>) at nss_files/files-hosts.c:392
#2  0x0000000000a71438 in gaih_inet ()
#3  0x0000000000a72ef0 in getaddrinfo ()
#4  0x00000000009b1bec in _cgo_7a2d42f1a351_C2func_getaddrinfo (v=0x4420025d58) at /home/go/src/net/cgo_unix.go:66
#5  0x000000000047cf28 in runtime.asmcgocall () at /home/go/src/runtime/asm_arm64.s:542
#6  0x0000004420421040 in ?? ()
#7  0x0000000000000001 in ?? ()

@sokoow
Copy link
Author

sokoow commented Aug 14, 2016

yup, libc 2.23 has something dodgy in it, I can also reproduce exactly same crash on amd64 ubuntu xenial now, opened: https://sourceware.org/bugzilla/show_bug.cgi?id=20468

@bradfitz
Copy link
Contributor

Seems like it's not a Go problem then. Closing.

You can disable Go's libc-based DNS resolution. See https://golang.org/pkg/net/#hdr-Name_Resolution

@sokoow
Copy link
Author

sokoow commented Aug 15, 2016

this is #13470

@golang golang locked and limited conversation to collaborators Aug 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants