[go: nahoru, domu]

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

storage: panic on broken pipe #250

Closed
kurin opened this issue Apr 27, 2016 · 3 comments
Closed

storage: panic on broken pipe #250

kurin opened this issue Apr 27, 2016 · 3 comments
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@kurin
Copy link
Contributor
kurin commented Apr 27, 2016

I have a fairly simple program that gets a storage.Writer and then tries to shove 200GB into GCS Nearline over my poor 5Mb connection. Currently the connection always gets reset, which is probably TWC's fault, but when it happens I get the following panic:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x10 pc=0x6eef27]

goroutine 9 [running]:
panic(0x8e6360, 0xc820010140)
        /home/kurin/go/src/runtime/panic.go:464 +0x3e6
google.golang.org/api/gensupport.(*ResumableUpload).transferChunks(0xc8209b6660, 0x800c665a8, 0xc820010390, 0xc82010e401, 0x0, 0x0)
        /home/kurin/gopath/src/google.golang.org/api/gensupport/resumable.go:89 +0x617
google.golang.org/api/gensupport.(*ResumableUpload).Upload(0xc8209b6660, 0x800c665a8, 0xc820010390, 0xc82010e480, 0x0, 0x0)
        /home/kurin/gopath/src/google.golang.org/api/gensupport/resumable.go:114 +0x5e
google.golang.org/api/storage/v1.(*ObjectsInsertCall).Do(0xc820014bd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/kurin/gopath/src/google.golang.org/api/storage/v1/storage-gen.go:6111 +0x54c
google.golang.org/cloud/storage.(*Writer).open.func1(0xc82000da00, 0xc820094780, 0xc82002e480, 0x0, 0x0, 0x0)
        /home/kurin/gopath/src/google.golang.org/cloud/storage/writer.go:75 +0x4c3
created by google.golang.org/cloud/storage.(*Writer).open
        /home/kurin/gopath/src/google.golang.org/cloud/storage/writer.go:83 +0x555

The line that corresponds to is:

success := err == nil && res.StatusCode == statusResumeIncomplete || res.StatusCode == http.StatusOK

I suspect what's happening is that this is interpreted as

(err == nil && res.StatusCode == statusResumeIncomplete) || res.StatusCode == http.StatusOK

but that the author intended

err == nil && (res.StatusCode == statusResumeIncomplete || res.StatusCode == http.StatusOK)

I'll submit a CL that de-clevers this line; but if you really like it let me know and I'll just throw in the parens.

@broady
Copy link
Contributor
broady commented Apr 27, 2016

de-clevering would be much appreciated.

@kurin
Copy link
Contributor Author
kurin commented Apr 27, 2016

Actually, nevermind, I was using an ancient fetch of this package. Good work everyone, I feel like we discovered some important learnings today.

@kurin kurin closed this as completed Apr 27, 2016
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
@kurin kurin removed their assignment Feb 1, 2021
@kurin kurin removed their assignment Feb 1, 2021
@kurin
Copy link
Contributor Author
kurin commented Feb 1, 2021

image

@kurin kurin removed their assignment Feb 1, 2021
@kurin kurin removed their assignment Feb 1, 2021
@kurin kurin removed their assignment Feb 1, 2021
@kurin kurin removed their assignment Feb 1, 2021
@kurin kurin removed their assignment Feb 1, 2021
@kurin kurin removed their assignment Feb 1, 2021
@kurin kurin removed their assignment Feb 1, 2021
@kurin kurin removed their assignment Feb 1, 2021
@kurin kurin removed their assignment Feb 1, 2021
@kurin kurin removed their assignment Feb 2, 2021
@kurin kurin removed their assignment Feb 2, 2021
@kurin kurin removed their assignment Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants