{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/24137","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/24137/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/24137/comments","events_url":"https://api.github.com/repos/golang/go/issues/24137/events","html_url":"https://github.com/golang/go/issues/24137","id":300363498,"node_id":"MDU6SXNzdWUzMDAzNjM0OTg=","number":24137,"title":"x/net/trace: init registers an endpoint on the http.DefaultServeMux, causing a panic if vendored in some cases","user":{"login":"jadekler","id":3584893,"node_id":"MDQ6VXNlcjM1ODQ4OTM=","avatar_url":"https://avatars3.githubusercontent.com/u/3584893?v=4","gravatar_id":"","url":"https://api.github.com/users/jadekler","html_url":"https://github.com/jadekler","followers_url":"https://api.github.com/users/jadekler/followers","following_url":"https://api.github.com/users/jadekler/following{/other_user}","gists_url":"https://api.github.com/users/jadekler/gists{/gist_id}","starred_url":"https://api.github.com/users/jadekler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jadekler/subscriptions","organizations_url":"https://api.github.com/users/jadekler/orgs","repos_url":"https://api.github.com/users/jadekler/repos","events_url":"https://api.github.com/users/jadekler/events{/privacy}","received_events_url":"https://api.github.com/users/jadekler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/22","html_url":"https://github.com/golang/go/milestone/22","labels_url":"https://api.github.com/repos/golang/go/milestones/22/labels","id":1067491,"node_id":"MDk6TWlsZXN0b25lMTA2NzQ5MQ==","number":22,"title":"Unreleased","description":"Issues that do not affect released Go code and binaries.\r\n","creator":{"login":"rsc","id":104030,"node_id":"MDQ6VXNlcjEwNDAzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/104030?v=4","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":903,"closed_issues":1518,"state":"open","created_at":"2015-04-14T18:48:22Z","updated_at":"2018-07-31T22:14:49Z","due_on":"2099-12-31T08:00:00Z","closed_at":null},"comments":15,"created_at":"2018-02-26T19:23:04Z","updated_at":"2018-08-01T09:12:42Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"[x/net registers an endpoint in the http global](https://github.com/golang/net/blob/cbe0f9307d0156177f9dd5dc85da1a31abc5f2fb/trace/trace.go#L112-L117). When this package is imported multiple times (because other packages I use import it) causes:\r\n\r\n```\r\npanic: http: multiple registrations for /debug/requests\r\n```"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/409508155","html_url":"https://github.com/golang/go/issues/24137#issuecomment-409508155","issue_url":"https://api.github.com/repos/golang/go/issues/24137","id":409508155,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTUwODE1NQ==","user":{"login":"e-nikolov","id":1100051,"node_id":"MDQ6VXNlcjExMDAwNTE=","avatar_url":"https://avatars2.githubusercontent.com/u/1100051?v=4","gravatar_id":"","url":"https://api.github.com/users/e-nikolov","html_url":"https://github.com/e-nikolov","followers_url":"https://api.github.com/users/e-nikolov/followers","following_url":"https://api.github.com/users/e-nikolov/following{/other_user}","gists_url":"https://api.github.com/users/e-nikolov/gists{/gist_id}","starred_url":"https://api.github.com/users/e-nikolov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e-nikolov/subscriptions","organizations_url":"https://api.github.com/users/e-nikolov/orgs","repos_url":"https://api.github.com/users/e-nikolov/repos","events_url":"https://api.github.com/users/e-nikolov/events{/privacy}","received_events_url":"https://api.github.com/users/e-nikolov/received_events","type":"User","site_admin":false},"created_at":"2018-08-01T09:12:42Z","updated_at":"2018-08-01T09:12:42Z","author_association":"NONE","body":"In the case of Go plugins, it makes sense for each plugin to use its own vendored version of the x/net/trace package. If they are not vendored, Go will realize that they are the same package, and will require that they be the same exact version. Otherwise you get an error saying that the plugin was built with a different version of x/net/trace and loading it will fail. If they are both vendored Go will think that the two packages are different because one is loaded from .../plugin1/vendor/x/net/trace and the other one from .../plugin2/vendor/x/net/trace. In this case, the init() will be executed twice and the panic will occur. The only workaround I have seen is to reinitialize the http.DefaultServeMux before loading each plugin."}}
{"actor":{"display_login":"e-nikolov"}}