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
crypto/x509: loadSystemRoots segfault when running under launchd #17972
Comments
Seems related to #16508 |
What version of OS X are you using? |
macOS Sierra 10.12.1 |
The stack backtrace is showing that something in I assume this is easy to replicate. If so, could you run the program under gdb or lldb and try to get a backtrace of the program from the point of failure? That may help us see where the problem is in the C code. Thanks. |
|
Thanks. From this we can see that it is not |
I can't reproduce on my macOS 10.12.1 system. If we can figure out which library function is dying, that might provide some clues. Can you toss some printfs into FetchPEMRoots to find out? And then find out what the arguments are to the problematic call? Even if that doesn't point to the problem directly, it might provide enough clues to help lldb resolve the mystery pcs in the backtrace. |
@nhooyr can you reproduce with the latest code at master? Also, is this a regression from Go 1.7? (Does Go 1.7 work for you under launchd?) |
Running under Go 1.7.3 also segfaults.
I'll try @josharian's suggstion next. |
Welp, seems to be working fine on master now. No idea what was wrong. Thanks! |
Actually, while it works under launchd, Go itself has stopped compiling under nix because of what I think is the same segfault. I'll update with details tomorrow. |
I'm bumping this to Go 1.9 until we even know what we're talking about in this bug. We have nothing reproducible and it's not clear whether x509 has a problem or the compiler has a problem or this is a nix issue or this is your machine only. Most importantly, this isn't a regression from 1.7 (you said 1.7 also crashed), so this seems like 1.9 material. |
Timed out. |
What version of Go are you using (
go version
)?go version devel +b21743c Thu Nov 17 20:53:01 2016 +0000 darwin/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOOS="darwin"
With the following program https://play.golang.org/p/HzaMgW_1p4 and the following Launch Agent definition
I get
in
/tmp/playgroundLogs
.If I do not run the program as a Launch Agent under launchd, all works fine.
The text was updated successfully, but these errors were encountered: