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

Email validation occasionally causing whole application to crash #25

Closed
ryanskidmore opened this issue Sep 2, 2014 · 1 comment
Closed

Comments

@ryanskidmore
Copy link

The way mailgun/mailgun-go interacts with the mbanzon/simplehttp library can sometimes result in a whole application crash (SEGFAULT) when validating email, stacktrace follows.

The way I am calling the mg.ValidateEmail function is as follows: emailvalid, _ := mg.ValidateEmail(email) // (email is a sanitised string)

This issue is paired with another issue created on the mbanzon/simplehttp repository - https://github.com/mbanzon/simplehttp/issues/8

Stacktrace:

unexpected fault address 0x7f7500000011
fatal error: fault
[signal 0xb code=0x1 addr=0x7f7500000011]

 goroutine 16 [running]:
    :0
...
:0
 goroutine 1 [IO wait]:
 main.main
    /root/gocode/src/mlc/controller.go:293 // This is just a simple log.Fatal(http.ListenAndServe("127.0.0.1:2369", m))

 goroutine 4 [chan receive]:

 goroutine 10 [select]:
 github.com_mbanzon_simplehttp.MakeRequest.pN41_github.com_mbanzon_simplehttp.HTTPRequest
    /root/gocode/src/github.com/mbanzon/simplehttp/simplehttp.go:108
 github.com_mbanzon_simplehttp.MakeGetRequest.pN41_github.com_mbanzon_simplehttp.HTTPRequest
    /root/gocode/src/github.com/mbanzon/simplehttp/simplehttp.go:59
 mailgun.getResponseFromJSON
    /root/gocode/src/github.com/mailgun/mailgun-go/rest_shim.go:72
 github.com_mailgun_mailgun_go.ValidateEmail.pN41_github.com_mailgun_mailgun_go.MailgunImpl
    /root/gocode/src/github.com/mailgun/mailgun-go/email_validation.go:49
 main.$nested0
    /root/gocode/src/mlc/controller.go:138
 github.com_codegangsta_inject.Invoke.pN38_github.com_codegangsta_inject.injector
    /root/gocode/src/github.com/codegangsta/inject/inject.go:102
 github.com_go_martini_martini.Invoke.N37_github.com_go_martini_martini.context
    /root/gocode/src/github.com/go-martini/martini/martini.go:144
 github.com_go_martini_martini.Invoke.N42_github.com_go_martini_martini.routeContext
    /root/gocode/src/github.com/go-martini/martini/router.go:336
 github.com_go_martini_martini.run.pN42_github.com_go_martini_martini.routeContext
    /root/gocode/src/github.com/go-martini/martini/router.go:350
 github.com_go_martini_martini.Handle.pN35_github.com_go_martini_martini.route
    /root/gocode/src/github.com/go-martini/martini/router.go:229
 github.com_go_martini_martini.Handle.pN36_github.com_go_martini_martini.router
    /root/gocode/src/github.com/go-martini/martini/router.go:112
 github.com_codegangsta_inject.Invoke.pN38_github.com_codegangsta_inject.injector
    /root/gocode/src/github.com/codegangsta/inject/inject.go:102
 github.com_go_martini_martini.Invoke.N37_github.com_go_martini_martini.context
    /root/gocode/src/github.com/go-martini/martini/martini.go:144
 github.com_go_martini_martini.run.pN37_github.com_go_martini_martini.context
    /root/gocode/src/github.com/go-martini/martini/martini.go:173
 github.com_go_martini_martini.Next.pN37_github.com_go_martini_martini.context
    /root/gocode/src/github.com/go-martini/martini/martini.go:164
 martini.$nested2
    /root/gocode/src/github.com/go-martini/martini/recovery.go:140
 github.com_codegangsta_inject.Invoke.pN38_github.com_codegangsta_inject.injector
    /root/gocode/src/github.com/codegangsta/inject/inject.go:102
 github.com_go_martini_martini.Invoke.N37_github.com_go_martini_martini.context
    /root/gocode/src/github.com/go-martini/martini/martini.go:144
 github.com_go_martini_martini.run.pN37_github.com_go_martini_martini.context
    /root/gocode/src/github.com/go-martini/martini/martini.go:173
 github.com_go_martini_martini.Next.pN37_github.com_go_martini_martini.context
    /root/gocode/src/github.com/go-martini/martini/martini.go:164
 martini.$nested0
    /root/gocode/src/github.com/go-martini/martini/logger.go:25
 github.com_codegangsta_inject.Invoke.pN38_github.com_codegangsta_inject.injector
    /root/gocode/src/github.com/codegangsta/inject/inject.go:102
 github.com_go_martini_martini.Invoke.N37_github.com_go_martini_martini.context
    /root/gocode/src/github.com/go-martini/martini/martini.go:144
 github.com_go_martini_martini.run.pN37_github.com_go_martini_martini.context
    /root/gocode/src/github.com/go-martini/martini/martini.go:173
 github.com_go_martini_martini.ServeHTTP.pN37_github.com_go_martini_martini.Martini
    /root/gocode/src/github.com/go-martini/martini/martini.go:69
 github.com_go_martini_martini.ServeHTTP.N44_github.com_go_martini_martini.ClassicMartini
    /root/gocode/src/github.com/go-martini/martini/martini.go:105
@mbanzon
Copy link
Collaborator

mbanzon commented Sep 6, 2014

I'm closing the case as the underlying issue in simplehttp seem to have been resolved.

@mbanzon mbanzon closed this as completed Sep 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants