{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/16136","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/16136/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/16136/comments","events_url":"https://api.github.com/repos/golang/go/issues/16136/events","html_url":"https://github.com/golang/go/issues/16136","id":161404187,"number":16136,"title":"cmd/go: go install randomly crash on freeBSD","user":{"login":"sapiens-sapide","id":1287627,"avatar_url":"https://avatars.githubusercontent.com/u/1287627?v=3","gravatar_id":"","url":"https://api.github.com/users/sapiens-sapide","html_url":"https://github.com/sapiens-sapide","followers_url":"https://api.github.com/users/sapiens-sapide/followers","following_url":"https://api.github.com/users/sapiens-sapide/following{/other_user}","gists_url":"https://api.github.com/users/sapiens-sapide/gists{/gist_id}","starred_url":"https://api.github.com/users/sapiens-sapide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapiens-sapide/subscriptions","organizations_url":"https://api.github.com/users/sapiens-sapide/orgs","repos_url":"https://api.github.com/users/sapiens-sapide/repos","events_url":"https://api.github.com/users/sapiens-sapide/events{/privacy}","received_events_url":"https://api.github.com/users/sapiens-sapide/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/OS-FreeBSD","name":"OS-FreeBSD","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/40","html_url":"https://github.com/golang/go/milestones/Go1.7Maybe","labels_url":"https://api.github.com/repos/golang/go/milestones/40/labels","id":1714149,"number":40,"title":"Go1.7Maybe","description":"Things that might be okay for Go 1.7 if they get done in time.\r\n","creator":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"open_issues":37,"closed_issues":61,"state":"open","created_at":"2016-04-18T15:44:35Z","updated_at":"2016-06-21T14:09:42Z","due_on":"2016-07-31T07:00:00Z","closed_at":null},"comments":5,"created_at":"2016-06-21T10:44:10Z","updated_at":"2016-06-21T14:19:53Z","closed_at":null,"body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n1. What version of Go are you using (`go version`)?\r\ngo1.6.2 freebsd/amd64\r\n\r\n2. What operating system and processor architecture are you using (`go env`)?\r\nfreebsd 10.0-RELEASE-p9\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"freebsd\"\r\nGOOS=\"freebsd\"\r\nGOPATH=\"/usr/local/goland/\"\r\nGORACE=\"\"\r\nGOROOT=\"/usr/local/go\"\r\nGOTOOLDIR=\"/usr/local/go/pkg/tool/freebsd_amd64\"\r\nGO15VENDOREXPERIMENT=\"1\"\r\nCC=\"cc\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fmessage-length=0\"\r\nCXX=\"clang++\"\r\nCGO_ENABLED=\"1\"\r\n\r\n3. What did you do?\r\nwhen I run `go install` for local projects or cloned projects, the installation (randomly !) fails with the following output:\r\n\r\n```\r\nunexpected fault address 0xc82048d500\r\nfatal error: fault\r\n[signal 0xa code=0xc addr=0xc82048d500 pc=0xc82048d500]\r\n\r\ngoroutine 7 [running]:\r\nruntime.throw(0x9e4730, 0x5)\r\n\t/usr/local/go/src/runtime/panic.go:547 +0x90 fp=0xc820022580 sp=0xc820022568\r\nruntime.sigpanic()\r\n\t/usr/local/go/src/runtime/sigpanic_unix.go:21 +0x1e4 fp=0xc8200225d0 sp=0xc820022580\r\ncreated by main.(*builder).do\r\n\t/usr/local/go/src/cmd/go/build.go:1320 +0x39e\r\n\r\ngoroutine 1 [semacquire]:\r\nsync.runtime_Semacquire(0xc8201f3a7c)\r\n\t/usr/local/go/src/runtime/sema.go:47 +0x26\r\nsync.(*WaitGroup).Wait(0xc8201f3a70)\r\n\t/usr/local/go/src/sync/waitgroup.go:127 +0xb4\r\nmain.(*builder).do(0xc82031d0a0, 0xc8203e3110)\r\n\t/usr/local/go/src/cmd/go/build.go:1323 +0x3c6\r\nmain.runInstall(0xc87c60, 0xc8200701d0, 0x1, 0x1)\r\n\t/usr/local/go/src/cmd/go/build.go:634 +0x4e5\r\nmain.main()\r\n\t/usr/local/go/src/cmd/go/main.go:181 +0x783\r\n\r\ngoroutine 17 [syscall, locked to thread]:\r\nruntime.goexit()\r\n\t/usr/local/go/src/runtime/asm_amd64.s:1998 +0x1\r\n\r\ngoroutine 20 [syscall]:\r\nos/signal.signal_recv(0x0)\r\n\t/usr/local/go/src/runtime/sigqueue.go:116 +0x132\r\nos/signal.loop()\r\n\t/usr/local/go/src/os/signal/signal_unix.go:22 +0x18\r\ncreated by os/signal.init.1\r\n\t/usr/local/go/src/os/signal/signal_unix.go:28 +0x37\r\n\r\ngoroutine 3 [semacquire]:\r\nsync.runtime_Semacquire(0xcac1ec)\r\n\t/usr/local/go/src/runtime/sema.go:47 +0x26\r\nsync.(*RWMutex).RLock(0xcac1e0)\r\n\t/usr/local/go/src/sync/rwmutex.go:37 +0x58\r\nos.Pipe(0x9, 0x0, 0x0, 0x0)\r\n\t/usr/local/go/src/os/pipe_bsd.go:17 +0x4f\r\nos/exec.(*Cmd).writerDescriptor(0xc820163680, 0x800dbc800, 0xc820198fc0, 0x0, 0x0, 0x0)\r\n\t/usr/local/go/src/os/exec/exec.go:228 +0x27a\r\nos/exec.(*Cmd).stdout(0xc820163680, 0x0, 0x0, 0x0)\r\n\t/usr/local/go/src/os/exec/exec.go:204 +0x4c\r\nos/exec.(*Cmd).Start(0xc820163680, 0x0, 0x0)\r\n\t/usr/local/go/src/os/exec/exec.go:316 +0x2f4\r\nos/exec.(*Cmd).Run(0xc820163680, 0x0, 0x0)\r\n\t/usr/local/go/src/os/exec/exec.go:259 +0x2d\r\nmain.(*builder).runOut(0xc82031d0a0, 0xc8201c94a0, 0x54, 0xc8202b44c0, 0x3e, 0x0, 0x0, 0x0, 0xc8204211e0, 0x14, ...)\r\n\t/usr/local/go/src/cmd/go/build.go:2049 +0x364\r\nmain.gcToolchain.gc(0xc82031d0a0, 0xc82039bc00, 0xc82006dc80, 0x57, 0xc82006dbc0, 0x5b, 0x0, 0xc82045a6e0, 0x2, 0x2, ...)\r\n\t/usr/local/go/src/cmd/go/build.go:2310 +0x1261\r\nmain.(*gcToolchain).gc(0xcac038, 0xc82031d0a0, 0xc82039bc00, 0xc82006dc80, 0x57, 0xc82006dbc0, 0x5b, 0x0, 0xc82045a6e0, 0x2, ...)\r\n\t<autogenerated>:3 +0x18e\r\nmain.(*builder).build(0xc82031d0a0, 0xc82015bee0, 0x0, 0x0)\r\n\t/usr/local/go/src/cmd/go/build.go:1484 +0x224c\r\nmain.(*builder).do.func1(0xc82015bee0)\r\n\t/usr/local/go/src/cmd/go/build.go:1257 +0x3b2\r\nmain.(*builder).do.func2(0xc8201f3a70, 0xc82031d0a0, 0xc82045a560)\r\n\t/usr/local/go/src/cmd/go/build.go:1314 +0x156\r\ncreated by main.(*builder).do\r\n\t/usr/local/go/src/cmd/go/build.go:1320 +0x39e\r\n\r\ngoroutine 4 [semacquire]:\r\nsync.runtime_Semacquire(0xc82031d0e4)\r\n\t/usr/local/go/src/runtime/sema.go:47 +0x26\r\nsync.(*Mutex).Lock(0xc82031d0e0)\r\n\t/usr/local/go/src/sync/mutex.go:83 +0x1c4\r\nmain.(*builder).do.func2(0xc8201f3a70, 0xc82031d0a0, 0xc82045a560)\r\n\t/usr/local/go/src/cmd/go/build.go:1311 +0xfc\r\ncreated by main.(*builder).do\r\n\t/usr/local/go/src/cmd/go/build.go:1320 +0x39e\r\n\r\ngoroutine 5 [semacquire]:\r\nsync.runtime_Semacquire(0xc82031d0e4)\r\n\t/usr/local/go/src/runtime/sema.go:47 +0x26\r\nsync.(*Mutex).Lock(0xc82031d0e0)\r\n\t/usr/local/go/src/sync/mutex.go:83 +0x1c4\r\nmain.(*builder).do.func2(0xc8201f3a70, 0xc82031d0a0, 0xc82045a560)\r\n\t/usr/local/go/src/cmd/go/build.go:1311 +0xfc\r\ncreated by main.(*builder).do\r\n\t/usr/local/go/src/cmd/go/build.go:1320 +0x39e\r\n\r\ngoroutine 6 [select]:\r\nmain.(*builder).do.func2(0xc8201f3a70, 0xc82031d0a0, 0xc82045a560)\r\n\t/usr/local/go/src/cmd/go/build.go:1304 +0x1cf\r\ncreated by main.(*builder).do\r\n\t/usr/local/go/src/cmd/go/build.go:1320 +0x39e\r\n\r\ngoroutine 8 [semacquire]:\r\nruntime.gopark(0x0, 0xc820022f58, 0xc82006c660, 0xc82006c660, 0xc82006c660, 0x4dcfa0)\r\n\t/usr/local/go/src/runtime/proc.go:262 +0x163\r\ncreated by main.(*builder).do\r\n\t/usr/local/go/src/cmd/go/build.go:1320 +0x39e\r\n\r\ngoroutine 9 [semacquire]:\r\nsync.runtime_Semacquire(0xc82031d0e4)\r\n\t/usr/local/go/src/runtime/sema.go:47 +0x26\r\nsync.(*Mutex).Lock(0xc82031d0e0)\r\n\t/usr/local/go/src/sync/mutex.go:83 +0x1c4\r\nmain.(*builder).do.func2(0xc8201f3a70, 0xc82031d0a0, 0xc82045a560)\r\n\t/usr/local/go/src/cmd/go/build.go:1311 +0xfc\r\ncreated by main.(*builder).do\r\n\t/usr/local/go/src/cmd/go/build.go:1320 +0x39e\r\n\r\ngoroutine 10 [running]:\r\n\tgoroutine running on other thread; stack unavailable\r\ncreated by main.(*builder).do\r\n\t/usr/local/go/src/cmd/go/build.go:1320 +0x39e\r\n```\r\n\r\n\r\nIf I run the `go build` command on the same package, build is OK.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/227454523","html_url":"https://github.com/golang/go/issues/16136#issuecomment-227454523","issue_url":"https://api.github.com/repos/golang/go/issues/16136","id":227454523,"user":{"login":"ianlancetaylor","id":3194333,"avatar_url":"https://avatars.githubusercontent.com/u/3194333?v=3","gravatar_id":"","url":"https://api.github.com/users/ianlancetaylor","html_url":"https://github.com/ianlancetaylor","followers_url":"https://api.github.com/users/ianlancetaylor/followers","following_url":"https://api.github.com/users/ianlancetaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianlancetaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlancetaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlancetaylor/subscriptions","organizations_url":"https://api.github.com/users/ianlancetaylor/orgs","repos_url":"https://api.github.com/users/ianlancetaylor/repos","events_url":"https://api.github.com/users/ianlancetaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianlancetaylor/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T14:19:53Z","updated_at":"2016-06-21T14:19:53Z","body":"This is failing with signal 10, which is `SIGBUS`.  The address and the PC value are the same, suggesting that the program has branched to non-executable code.  The address is in the heap, so it is naturally non-executable.  The question is why and how the program branched to that location.  This can only be memory corruption of some sort.\r\n\r\nThe stack trace seems to show that `syscall.ForkLock` is held at the point of the crash, but I don't see any goroutine actually doing a fork/exec.  I see a goroutine starting a fork/exec.\r\n\r\nHolding the fork lock suggests this may be related to #15658, another FreeBSD issue that somehow involves the fork/exec code."}}
{"actor":{"display_login":"ianlancetaylor"}}