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

SIGSEGV when sending mails #1408

Closed
2 of 7 tasks
mrdrogdrog opened this issue Mar 29, 2017 · 14 comments · Fixed by #1690
Closed
2 of 7 tasks

SIGSEGV when sending mails #1408

mrdrogdrog opened this issue Mar 29, 2017 · 14 comments · Fixed by #1690
Labels
topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile type/bug
Milestone

Comments

@mrdrogdrog
Copy link

  • Gitea version (or commit ref): 1.1.0
  • Git version: 2.12.1
  • Operating system: Arch Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
2017/03/29 22:28:44 Serving [::]:23012 with pid 27637
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x7efe880394e3]

runtime stack:
runtime.throw(0x1363e43, 0x2a)
	/usr/local/go/src/runtime/panic.go:596 +0x95
runtime.sigpanic()
	/usr/local/go/src/runtime/signal_unix.go:274 +0x2db

goroutine 269 [syscall, locked to thread]:
runtime.cgocall(0xfc1840, 0xc421516ab0, 0x1362194)
	/usr/local/go/src/runtime/cgocall.go:131 +0xe2 fp=0xc421516a70 sp=0xc421516a30
net._C2func_getaddrinfo(0x7efe800008c0, 0x0, 0xc4215098f0, 0xc420952bc8, 0x0, 0x0, 0x0)
	net/_obj/_cgo_gotypes.go:86 +0x68 fp=0xc421516ab0 sp=0xc421516a70
net.cgoLookupIPCNAME.func2(0x7efe800008c0, 0x0, 0xc4215098f0, 0xc420952bc8, 0xc421516b90, 0x48e1f9, 0x11fe480)
	/usr/local/go/src/net/cgo_unix.go:151 +0x171 fp=0xc421516b10 sp=0xc421516ab0
net.cgoLookupIPCNAME(0xc421541200, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/cgo_unix.go:151 +0x1bd fp=0xc421516c10 sp=0xc421516b10
net.cgoLookupIP(0x1c74340, 0xc420014238, 0xc421541200, 0x12, 0x42fe1a, 0x42fe1a, 0x13826c8, 0x2, 0xc42002d400, 0xc42063a680)
	/usr/local/go/src/net/cgo_unix.go:209 +0x3a1 fp=0xc421516d78 sp=0xc421516c10
net.(*Resolver).lookupIP(0x238c1a8, 0x1c74340, 0xc420014238, 0xc421541200, 0x12, 0x40715d, 0xc42075a820, 0x132ba39, 0x9, 0xc420027616)
	/usr/local/go/src/net/lookup_unix.go:69 +0x125 fp=0xc421516de8 sp=0xc421516d78
net.(*Resolver).(net.lookupIP)-fm(0x1c74340, 0xc420014238, 0xc421541200, 0x12, 0xc42063a730, 0xc42063a7e0, 0xc42075a868, 0xc420566118, 0xc42063a730)
	/usr/local/go/src/net/lookup.go:156 +0x56 fp=0xc421516e48 sp=0xc421516de8
net.glob..func11(0x1c74340, 0xc420014238, 0xc42150bb90, 0xc421541200, 0x12, 0x11b1e60, 0xc4205660c0, 0xc420027738, 0xffffffffffffff01, 0x4f7d03)
	/usr/local/go/src/net/hook.go:19 +0x52 fp=0xc421516ea0 sp=0xc421516e48
net.(*Resolver).LookupIPAddr.func1(0xc420566118, 0x0, 0x6, 0x105)
	/usr/local/go/src/net/lookup.go:162 +0x5c fp=0xc421516f28 sp=0xc421516ea0
internal/singleflight.(*Group).doCall(0x2366a30, 0xc4214c6be0, 0xc421541200, 0x12, 0xc421509560)
	/usr/local/go/src/internal/singleflight/singleflight.go:93 +0x3c fp=0xc421516fb8 sp=0xc421516f28
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc421516fc0 sp=0xc421516fb8
created by internal/singleflight.(*Group).DoChan
	/usr/local/go/src/internal/singleflight/singleflight.go:86 +0x323

goroutine 1 [select]:
code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp.Serve(0xc42083e040, 0x1, 0x1, 0xa854a1, 0x1239480)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp/http.go:162 +0x5e6
code.gitea.io/gitea/cmd.runHTTP(0xc42150a110, 0xd, 0x1c6bec0, 0xc421498220, 0x0, 0xc42150a110)
	/srv/app/src/code.gitea.io/gitea/cmd/web_graceful.go:21 +0xc7
code.gitea.io/gitea/cmd.runWeb(0xc42018f900, 0x0, 0xc42018f900)
	/srv/app/src/code.gitea.io/gitea/cmd/web.go:676 +0x1cf1
code.gitea.io/gitea/vendor/github.com/urfave/cli.HandleAction(0x11d46e0, 0x137beb8, 0xc42018f900, 0xc420010c00, 0x0)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:471 +0xb9
code.gitea.io/gitea/vendor/github.com/urfave/cli.Command.Run(0x1321a4f, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1345e9a, 0x16, 0x0, ...)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/command.go:191 +0xb4b
code.gitea.io/gitea/vendor/github.com/urfave/cli.(*App).Run(0xc420138b60, 0xc4200100c0, 0x6, 0x6, 0x0, 0x0)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:241 +0x65f
main.main()
	/srv/app/src/code.gitea.io/gitea/main.go:44 +0x3cd

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:2197 +0x1

goroutine 19 [select]:
code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index.AnalysisWorker(0xc4201870e0, 0xc420187140)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index/analysis.go:75 +0x13a
created by code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index.NewAnalysisQueue
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index/analysis.go:67 +0xdf

goroutine 18 [select]:
code.gitea.io/gitea/modules/log.(*Logger).StartLogger(0xc4201805c0)
	/srv/app/src/code.gitea.io/gitea/modules/log/log.go:265 +0x2a7
created by code.gitea.io/gitea/modules/log.newLogger
	/srv/app/src/code.gitea.io/gitea/modules/log/log.go:191 +0x11f

goroutine 20 [select]:
code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index.AnalysisWorker(0xc4201870e0, 0xc420187140)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index/analysis.go:75 +0x13a
created by code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index.NewAnalysisQueue
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index/analysis.go:67 +0xdf

goroutine 21 [select]:
code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index.AnalysisWorker(0xc4201870e0, 0xc420187140)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index/analysis.go:75 +0x13a
created by code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index.NewAnalysisQueue
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index/analysis.go:67 +0xdf

goroutine 22 [select]:
code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index.AnalysisWorker(0xc4201870e0, 0xc420187140)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index/analysis.go:75 +0x13a
created by code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index.NewAnalysisQueue
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index/analysis.go:67 +0xdf

goroutine 50 [chan receive]:
code.gitea.io/gitea/modules/mailer.processMailQueue()
	/srv/app/src/code.gitea.io/gitea/modules/mailer/mailer.go:241 +0x71
created by code.gitea.io/gitea/modules/mailer.NewContext
	/srv/app/src/code.gitea.io/gitea/modules/mailer/mailer.go:273 +0xd3

goroutine 25 [chan receive]:
code.gitea.io/gitea/modules/notification.(*notificationService).Run(0x23644a0)
	/srv/app/src/code.gitea.io/gitea/modules/notification/notification.go:37 +0x63
created by code.gitea.io/gitea/modules/notification.init.1
	/srv/app/src/code.gitea.io/gitea/modules/notification/notification.go:31 +0x41

goroutine 26 [syscall]:
os/signal.signal_recv(0x0)
	/usr/local/go/src/runtime/sigqueue.go:116 +0x104
os/signal.loop()
	/usr/local/go/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.1
	/usr/local/go/src/os/signal/signal_unix.go:28 +0x41

goroutine 27 [select]:
code.gitea.io/gitea/modules/log.(*Logger).StartLogger(0xc42049f800)
	/srv/app/src/code.gitea.io/gitea/modules/log/log.go:265 +0x2a7
created by code.gitea.io/gitea/modules/log.newLogger
	/srv/app/src/code.gitea.io/gitea/modules/log/log.go:191 +0x11f

goroutine 28 [select]:
code.gitea.io/gitea/modules/log.(*Logger).StartLogger(0xc42049f840)
	/srv/app/src/code.gitea.io/gitea/modules/log/log.go:265 +0x2a7
created by code.gitea.io/gitea/modules/log.newLogger
	/srv/app/src/code.gitea.io/gitea/modules/log/log.go:191 +0x11f

goroutine 51 [chan receive]:
database/sql.(*DB).connectionOpener(0xc420130aa0)
	/usr/local/go/src/database/sql/sql.go:837 +0x4a
created by database/sql.Open
	/usr/local/go/src/database/sql/sql.go:582 +0x212

goroutine 255 [select]:
net.(*Resolver).LookupIPAddr(0x238c1a8, 0x1c74340, 0xc420014238, 0xc421541200, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/lookup.go:165 +0x9b1
net.(*Resolver).internetAddrList(0x238c1a8, 0x1c74340, 0xc420014238, 0x1321a1c, 0x3, 0xc421541200, 0x16, 0x0, 0x0, 0xc42025202b, ...)
	/usr/local/go/src/net/ipsock.go:245 +0x4cc
net.(*Resolver).resolveAddrList(0x238c1a8, 0x1c74340, 0xc420014238, 0x13225ac, 0x4, 0x1321a1c, 0x3, 0xc421541200, 0x16, 0x0, ...)
	/usr/local/go/src/net/dial.go:188 +0x6b3
net.(*Dialer).DialContext(0xc420e3fb78, 0x1c74340, 0xc420014238, 0x1321a1c, 0x3, 0xc421541200, 0x16, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/net/dial.go:349 +0x247
net.(*Dialer).Dial(0xc420e3fb78, 0x1321a1c, 0x3, 0xc421541200, 0x16, 0xc421541200, 0x16, 0xc420e3fbd0, 0x61630b)
	/usr/local/go/src/net/dial.go:294 +0x75
net.Dial(0x1321a1c, 0x3, 0xc421541200, 0x16, 0xc421541200, 0x16, 0x0, 0x0)
	/usr/local/go/src/net/dial.go:273 +0x99
code.gitea.io/gitea/modules/mailer.(*smtpSender).Send(0x238c6b8, 0xc421541120, 0x15, 0xc42150bb20, 0x1, 0x1, 0x1c68300, 0xc42129b180, 0x0, 0x0)
	/srv/app/src/code.gitea.io/gitea/modules/mailer/mailer.go:117 +0x17a
code.gitea.io/gitea/vendor/gopkg.in/gomail%2ev2.send(0x1c67100, 0x238c6b8, 0xc42129b180, 0xc42150b8a0, 0xc420e3ffd0)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/gomail.v2/send.go:57 +0xdc
code.gitea.io/gitea/vendor/gopkg.in/gomail%2ev2.Send(0x1c67100, 0x238c6b8, 0xc420e40028, 0x1, 0x1, 0x133abe2, 0x11)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/gomail.v2/send.go:38 +0x7a
code.gitea.io/gitea/models.SendTestMail(0xc421522240, 0x15, 0x5, 0xc421522240)
	/srv/app/src/code.gitea.io/gitea/models/mail.go:43 +0xf0
code.gitea.io/gitea/routers/admin.SendTestMail(0xc421520420)
	/srv/app/src/code.gitea.io/gitea/routers/admin/admin.go:182 +0x7a
reflect.Value.call(0x11b7320, 0x137f8b0, 0x13, 0x1321e9c, 0x4, 0xc421540d80, 0x1, 0x1, 0x0, 0x11b7320, ...)
	/usr/local/go/src/reflect/value.go:434 +0x91f
reflect.Value.Call(0x11b7320, 0x137f8b0, 0x13, 0xc421540d80, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/reflect/value.go:302 +0xa4
code.gitea.io/gitea/vendor/github.com/go-macaron/inject.(*injector).callInvoke(0xc4215220e0, 0x11b7320, 0x137f8b0, 0x1c87e20, 0x11b7320, 0x1, 0x0, 0x0, 0x0, 0x0, ...)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 +0x1df
code.gitea.io/gitea/vendor/github.com/go-macaron/inject.(*injector).Invoke(0xc4215220e0, 0x11b7320, 0x137f8b0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 +0xca
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*Context).run(0xc42152e090)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 +0x72
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*Context).Next(0xc42152e090)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:104 +0x36
code.gitea.io/gitea/vendor/github.com/go-macaron/session.Sessioner.func1(0xc42152e090)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/session.go:186 +0x360
reflect.Value.call(0x11b78e0, 0xc421472d20, 0x13, 0x1321e9c, 0x4, 0xc421522340, 0x1, 0x1, 0x0, 0x11b78e0, ...)
	/usr/local/go/src/reflect/value.go:434 +0x91f
reflect.Value.Call(0x11b78e0, 0xc421472d20, 0x13, 0xc421522340, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/reflect/value.go:302 +0xa4
code.gitea.io/gitea/vendor/github.com/go-macaron/inject.(*injector).callInvoke(0xc4215220e0, 0x11b78e0, 0xc421472d20, 0x1c87e20, 0x11b78e0, 0x1, 0x0, 0x0, 0x0, 0x0, ...)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 +0x1df
code.gitea.io/gitea/vendor/github.com/go-macaron/inject.(*injector).Invoke(0xc4215220e0, 0x11b78e0, 0xc421472d20, 0x0, 0x0, 0x0, 0x0, 0x0)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 +0xca
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*Context).run(0xc42152e090)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 +0x72
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*Context).Next(0xc42152e090)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:104 +0x36
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.Recovery.func1(0xc42152e090, 0xc4206620f0)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/recovery.go:161 +0x5b
reflect.Value.call(0x11d49e0, 0x13812f0, 0x13, 0x1321e9c, 0x4, 0xc42151e3c0, 0x2, 0x2, 0x6f, 0x11d49e0, ...)
	/usr/local/go/src/reflect/value.go:434 +0x91f
reflect.Value.Call(0x11d49e0, 0x13812f0, 0x13, 0xc42151e3c0, 0x2, 0x2, 0x6f, 0x3, 0xc420019350)
	/usr/local/go/src/reflect/value.go:302 +0xa4
code.gitea.io/gitea/vendor/github.com/go-macaron/inject.(*injector).callInvoke(0xc4215220e0, 0x11d49e0, 0x13812f0, 0x1c87e20, 0x11d49e0, 0x2, 0xc4215352f8, 0x68d410, 0xc4206620f0, 0xc421524230, ...)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 +0x1df
code.gitea.io/gitea/vendor/github.com/go-macaron/inject.(*injector).Invoke(0xc4215220e0, 0x11d49e0, 0x13812f0, 0x23681c0, 0x64, 0xc421524230, 0xc420662120, 0xc421535340)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 +0xca
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*Context).run(0xc42152e090)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 +0x72
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*Context).Next(0xc42152e090)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:104 +0x36
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.Logger.func1(0xc42152e090, 0xc4206620f0)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/logger.go:43 +0x274
reflect.Value.call(0x11d49e0, 0x13812d0, 0x13, 0x1321e9c, 0x4, 0xc42151e2d0, 0x2, 0x2, 0xc42151baa0, 0x11d49e0, ...)
	/usr/local/go/src/reflect/value.go:434 +0x91f
reflect.Value.Call(0x11d49e0, 0x13812d0, 0x13, 0xc42151e2d0, 0x2, 0x2, 0x12e3ca0, 0xc42008af48, 0xc42151ba98)
	/usr/local/go/src/reflect/value.go:302 +0xa4
code.gitea.io/gitea/vendor/github.com/go-macaron/inject.(*injector).callInvoke(0xc4215220e0, 0x11d49e0, 0x13812d0, 0x1c87e20, 0x11d49e0, 0x2, 0x100, 0x120f440, 0x16, 0x16, ...)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 +0x1df
code.gitea.io/gitea/vendor/github.com/go-macaron/inject.(*injector).Invoke(0xc4215220e0, 0x11d49e0, 0x13812d0, 0xc42151bb20, 0x44422b, 0x2, 0xc4214a0dc0, 0xc420143be0)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 +0xca
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*Context).run(0xc42152e090)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 +0x72
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*Router).Handle.func1(0x1c72b00, 0xc4213502a0, 0xc420142600, 0xc42151e240)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/router.go:184 +0x2c9
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*Router).ServeHTTP(0xc4206620a0, 0x1c72b00, 0xc4213502a0, 0xc420142600)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/router.go:288 +0x16d
code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*Macaron).ServeHTTP(0xc420600000, 0x1c72b00, 0xc4213502a0, 0xc420142600)
	/srv/app/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/macaron.go:177 +0x14c
code.gitea.io/gitea/vendor/github.com/gorilla/context.ClearHandler.func1(0x1c72b00, 0xc4213502a0, 0xc420142600)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/gorilla/context/context.go:141 +0x8b
net/http.HandlerFunc.ServeHTTP(0xc421498220, 0x1c72b00, 0xc4213502a0, 0xc420142600)
	/usr/local/go/src/net/http/server.go:1942 +0x44
net/http.serverHandler.ServeHTTP(0xc42150c000, 0x1c72b00, 0xc4213502a0, 0xc420142600)
	/usr/local/go/src/net/http/server.go:2568 +0x92
net/http.(*conn).serve(0xc421526000, 0x1c74300, 0xc421484140)
	/usr/local/go/src/net/http/server.go:1825 +0x612
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2668 +0x2ce

goroutine 287 [IO wait]:
net.runtime_pollWait(0x7efe8b73ae00, 0x72, 0x1c6c880)
	/usr/local/go/src/runtime/netpoll.go:164 +0x59
net.(*pollDesc).wait(0xc421512068, 0x72, 0x1c64628, 0xc421522020)
	/usr/local/go/src/net/fd_poll_runtime.go:75 +0x38
net.(*pollDesc).waitRead(0xc421512068, 0xffffffffffffffff, 0x0)
	/usr/local/go/src/net/fd_poll_runtime.go:80 +0x34
net.(*netFD).accept(0xc421512000, 0x0, 0x1c69b80, 0xc421522020)
	/usr/local/go/src/net/fd_unix.go:430 +0x1e5
net.(*TCPListener).accept(0xc42083e048, 0xc42047beb0, 0x71b0ce, 0x459a40)
	/usr/local/go/src/net/tcpsock_posix.go:136 +0x2e
net.(*TCPListener).Accept(0xc42083e048, 0x1382068, 0xc421526000, 0x1c743c0, 0xc4215085d0)
	/usr/local/go/src/net/tcpsock.go:228 +0x49
net/http.(*Server).Serve(0xc42150c000, 0x1c72900, 0xc42083e048, 0x0, 0x0)
	/usr/local/go/src/net/http/server.go:2643 +0x228
code.gitea.io/gitea/vendor/github.com/facebookgo/httpdown.(*server).serve(0xc42150c0b0)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/httpdown/httpdown.go:277 +0x83
created by code.gitea.io/gitea/vendor/github.com/facebookgo/httpdown.HTTP.Serve
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/httpdown/httpdown.go:97 +0x401

goroutine 79 [select]:
code.gitea.io/gitea/vendor/github.com/gogits/cron.(*Cron).run(0xc420181700)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/gogits/cron/cron.go:178 +0x92e
created by code.gitea.io/gitea/vendor/github.com/gogits/cron.(*Cron).Start
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/gogits/cron/cron.go:140 +0x55

goroutine 80 [chan receive]:
code.gitea.io/gitea/models.processIssueIndexerUpdateQueue()
	/srv/app/src/code.gitea.io/gitea/models/issue_indexer.go:156 +0x60
created by code.gitea.io/gitea/models.InitIssueIndexer
	/srv/app/src/code.gitea.io/gitea/models/issue_indexer.go:92 +0x13a

goroutine 81 [chan receive]:
code.gitea.io/gitea/models.SyncMirrors()
	/srv/app/src/code.gitea.io/gitea/models/repo_mirror.go:228 +0x73
created by code.gitea.io/gitea/models.InitSyncMirrors
	/srv/app/src/code.gitea.io/gitea/models/repo_mirror.go:252 +0x35

goroutine 162 [chan receive]:
code.gitea.io/gitea/models.DeliverHooks()
	/srv/app/src/code.gitea.io/gitea/models/webhook.go:633 +0x2d4
created by code.gitea.io/gitea/models.InitDeliverHooks
	/srv/app/src/code.gitea.io/gitea/models/webhook.go:654 +0x35

goroutine 163 [chan receive]:
code.gitea.io/gitea/models.TestPullRequests()
	/srv/app/src/code.gitea.io/gitea/models/pull.go:1084 +0x1c8
created by code.gitea.io/gitea/models.InitTestPullRequests
	/srv/app/src/code.gitea.io/gitea/models/pull.go:1105 +0x35

goroutine 164 [select]:
code.gitea.io/gitea/modules/log.(*Logger).StartLogger(0xc42049fec0)
	/srv/app/src/code.gitea.io/gitea/modules/log/log.go:265 +0x2a7
created by code.gitea.io/gitea/modules/log.newLogger
	/srv/app/src/code.gitea.io/gitea/modules/log/log.go:191 +0x11f

goroutine 286 [select]:
code.gitea.io/gitea/vendor/github.com/facebookgo/httpdown.(*server).manage(0xc42150c0b0)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/httpdown/httpdown.go:204 +0xa2b
created by code.gitea.io/gitea/vendor/github.com/facebookgo/httpdown.HTTP.Serve
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/httpdown/httpdown.go:96 +0x3df

goroutine 288 [semacquire]:
sync.runtime_Semacquire(0xc42149414c)
	/usr/local/go/src/runtime/sema.go:47 +0x34
sync.(*WaitGroup).Wait(0xc421494140)
	/usr/local/go/src/sync/waitgroup.go:131 +0x7a
code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp.(*app).wait(0xc42150e060)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp/http.go:85 +0x115
code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp.Serve.func1(0xc42150e3c0, 0xc42150e060)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp/http.go:159 +0x51
created by code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp.Serve
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp/http.go:160 +0x3af

goroutine 256 [IO wait]:
net.runtime_pollWait(0x7efe8b73ad40, 0x72, 0xb)
	/usr/local/go/src/runtime/netpoll.go:164 +0x59
net.(*pollDesc).wait(0xc421524068, 0x72, 0x1c6c880, 0x1c64628)
	/usr/local/go/src/net/fd_poll_runtime.go:75 +0x38
net.(*pollDesc).waitRead(0xc421524068, 0xc421484191, 0x1)
	/usr/local/go/src/net/fd_poll_runtime.go:80 +0x34
net.(*netFD).Read(0xc421524000, 0xc421484191, 0x1, 0x1, 0x0, 0x1c6c880, 0x1c64628)
	/usr/local/go/src/net/fd_unix.go:250 +0x1b7
net.(*conn).Read(0xc4206743d0, 0xc421484191, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:181 +0x70
net/http.(*connReader).backgroundRead(0xc421484180)
	/usr/local/go/src/net/http/server.go:656 +0x58
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:652 +0xdf

goroutine 289 [chan receive]:
code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp.(*app).signalHandler(0xc42150e060, 0xc421494140)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp/http.go:103 +0x121
created by code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp.(*app).wait
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp/http.go:76 +0x81

goroutine 322 [chan receive]:
code.gitea.io/gitea/vendor/github.com/facebookgo/httpdown.(*server).Wait(0xc42150c0b0, 0x1382850, 0xc421494140)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/httpdown/httpdown.go:283 +0x5b
code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp.(*app).wait.func1(0xc421494140, 0xc42150e060, 0x1c6d800, 0xc42150c0b0)
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp/http.go:80 +0x5b
created by code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp.(*app).wait
	/srv/app/src/code.gitea.io/gitea/vendor/github.com/facebookgo/grace/gracehttp/http.go:83 +0xdc

goroutine 323 [select, locked to thread]:
runtime.gopark(0x1382708, 0x0, 0x132612d, 0x6, 0x18, 0x2)
	/usr/local/go/src/runtime/proc.go:271 +0x13a
runtime.selectgoImpl(0xc42029ef50, 0x0, 0x18)
	/usr/local/go/src/runtime/select.go:423 +0x1364
runtime.selectgo(0xc42029ef50)
	/usr/local/go/src/runtime/select.go:238 +0x1c
runtime.ensureSigM.func1()
	/usr/local/go/src/runtime/signal_unix.go:434 +0x2dd
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:2197 +0x1

Description

I have no idea why, but my instance of gitea crashs with a SIGSEGV every time, I try to send a mail.

@mrdrogdrog mrdrogdrog changed the title Segfault when sending mails SIGSEGV when sending mails Mar 29, 2017
@lunny lunny added the type/bug label Mar 30, 2017
@lunny lunny added this to the 1.2.0 milestone Mar 30, 2017
@tomas-kulhanek
Copy link

tomas-kulhanek commented Apr 4, 2017

@lunny It is possible that this problem could occur during execution webhook?

@lunny
Copy link
Member

lunny commented Apr 20, 2017

Do you download the binary version or you build it yourself?

@lunny
Copy link
Member

lunny commented Apr 20, 2017

@Tirus91 have no idea.

@mrdrogdrog
Copy link
Author

This error occurs only with the precompiled binary.
If I compile it by myself (go version 1.8.1) everything is ok.

@mrdrogdrog
Copy link
Author

@Tirus91 This problem occurs every time I do something, that triggers an email (smtp test, account creation, etc.)

@lunny lunny added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label Apr 20, 2017
@lunny
Copy link
Member

lunny commented Apr 20, 2017

@mrdrogdrog so that's maybe a cross-compile issue?

@lunny
Copy link
Member

lunny commented Apr 20, 2017

@tboerger

@tboerger
Copy link
Member

Please try to launch it with this environment variable: GODEBUG=netdns=go

@mrdrogdrog
Copy link
Author

@tboerger The SMTP-Test succeeded without crash

@tboerger
Copy link
Member

Than it's related to the name resolution within cgo, maybe it's related to our statically compiled binaries. Enforcing the go resolver solves this problem.

@tboerger
Copy link
Member

tboerger commented May 5, 2017

Looks like we have to build the binary with the build tag netgo, because the default netcgo seems to fail on some systems. It have been introduced with golang/go@b615ad8

@lunny
Copy link
Member

lunny commented May 5, 2017

Which version of your Arch Linux @mrdrogdrog

@mrdrogdrog
Copy link
Author

There is no Version, only Zuul.

No, joking aside. Arch is rolling release. All my packages are always up-to-date.

@tboerger
Copy link
Member

tboerger commented May 6, 2017

I have created the pull request #1690 which should solve this issue as it enforces the Go name resolution instead of CGO for cross-compiled binaries.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants