{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-go/issues/468","labels_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/468/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/468/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/468/events","html_url":"https://github.com/aws/aws-sdk-go/issues/468","id":122604896,"number":468,"title":"ValidateResponseHandler panic during network connectivity problem","user":{"login":"phinze","id":37534,"avatar_url":"https://avatars.githubusercontent.com/u/37534?v=3","gravatar_id":"","url":"https://api.github.com/users/phinze","html_url":"https://github.com/phinze","followers_url":"https://api.github.com/users/phinze/followers","following_url":"https://api.github.com/users/phinze/following{/other_user}","gists_url":"https://api.github.com/users/phinze/gists{/gist_id}","starred_url":"https://api.github.com/users/phinze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phinze/subscriptions","organizations_url":"https://api.github.com/users/phinze/orgs","repos_url":"https://api.github.com/users/phinze/repos","events_url":"https://api.github.com/users/phinze/events{/privacy}","received_events_url":"https://api.github.com/users/phinze/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-16T21:22:00Z","updated_at":"2015-12-17T00:17:51Z","closed_at":"2015-12-16T23:40:56Z","body":"Hey folks!\r\n\r\nWe have a user who reported a panic that came from aws-go-sdk during network connectivity problems:\r\n\r\n```\r\npanic: runtime error: invalid memory address or nil pointer dereference\r\n2015/12/09 17:48:47 terraform-provider-aws: [signal 0xb code=0x1 addr=0x10 pc=0x1330f6]\r\n2015/12/09 17:48:47 terraform-provider-aws: \r\n2015/12/09 17:48:47 terraform-provider-aws: goroutine 58 [running]:\r\n2015/12/09 17:48:47 terraform-provider-aws: github.com/awslabs/aws-sdk-go/aws.ValidateResponseHandler(0xc20815e000)\r\n2015/12/09 17:48:47 terraform-provider-aws: \t/opt/gopath/src/github.com/awslabs/aws-sdk-go/aws/handler_functions.go:91 +0x26\r\n2015/12/09 17:48:47 terraform-provider-aws: github.com/awslabs/aws-sdk-go/aws.(*HandlerList).Run(0xc20815e068, 0xc20815e000)\r\n2015/12/09 17:48:47 terraform-provider-aws: \t/opt/gopath/src/github.com/awslabs/aws-sdk-go/aws/handlers.go:83 +0x6e\r\n2015/12/09 17:48:47 terraform-provider-aws: github.com/awslabs/aws-sdk-go/aws.(*Request).Send(0xc20815e000, 0x0, 0x0)\r\n2015/12/09 17:48:47 terraform-provider-aws: \t/opt/gopath/src/github.com/awslabs/aws-sdk-go/aws/request.go:209 +0x1e6\r\n2015/12/09 17:48:47 terraform-provider-aws: github.com/awslabs/aws-sdk-go/service/ec2.(*EC2).DescribeVPCs(0xc2080414a8, 0xc208117bc0, 0x1, 0x0, 0x0)\r\n2015/12/09 17:48:47 terraform-provider-aws: \t/opt/gopath/src/github.com/awslabs/aws-sdk-go/service/ec2/api.go:4373 +0x5c\r\n2015/12/09 17:48:47 terraform-provider-aws: github.com/hashicorp/terraform/builtin/providers/aws.func·055(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n2015/12/09 17:48:47 terraform-provider-aws: \t/opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_vpc.go:269 +0x19d\r\n2015/12/09 17:48:47 terraform-provider-aws: github.com/hashicorp/terraform/builtin/providers/aws.resourceAwsVpcRead(0xc208061bc0, 0x54d080, 0xc208010cb0, 0x0, 0x0)\r\n2015/12/09 17:48:47 terraform-provider-aws: \t/opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_vpc.go:122 +0x102\r\n2015/12/09 17:48:47 terraform-provider-aws: github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc2080f3540, 0xc208145bf0, 0x54d080, 0xc208010cb0, 0xc208120a60, 0x0, 0x0)\r\n```\r\n\r\nThe backtrace is from old code, but it looks like the function back then:\r\n\r\nhttps://github.com/aws/aws-sdk-go/blob/edd888623de404d62881a1372541403b5b00d4a5/aws/handler_functions.go#L98-L103\r\n\r\nIs the same as it is now:\r\n\r\nhttps://github.com/aws/aws-sdk-go/blob/9e7816464bb6044ae17fff44ce59387d2658e2cb/aws/corehandlers/handlers.go#L98-L103\r\n\r\nShould we add an extra `nil` check to that body to guard against this panic? Or perhaps there are more recent changes that guarantee that `r.HTTPResponse` will never be nil in the modern code?\r\n\r\nThanks for your time!"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-go/issues/comments/165297348","html_url":"https://github.com/aws/aws-sdk-go/issues/468#issuecomment-165297348","issue_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/468","id":165297348,"user":{"login":"jasdel","id":961963,"avatar_url":"https://avatars.githubusercontent.com/u/961963?v=3","gravatar_id":"","url":"https://api.github.com/users/jasdel","html_url":"https://github.com/jasdel","followers_url":"https://api.github.com/users/jasdel/followers","following_url":"https://api.github.com/users/jasdel/following{/other_user}","gists_url":"https://api.github.com/users/jasdel/gists{/gist_id}","starred_url":"https://api.github.com/users/jasdel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasdel/subscriptions","organizations_url":"https://api.github.com/users/jasdel/orgs","repos_url":"https://api.github.com/users/jasdel/repos","events_url":"https://api.github.com/users/jasdel/events{/privacy}","received_events_url":"https://api.github.com/users/jasdel/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T00:17:51Z","updated_at":"2015-12-17T00:17:51Z","body":"Glad to help, let us know if you run into any other issues, feedback, or questions."}}