-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
os: panic: runtime error: slice bounds out of range #22102
Comments
Tracking issue on the Ethereum repo: ethereum/go-ethereum#15216 |
I assume this is repeatable. I don't see any problem in the code, unless Can you do some debugging to find out what the slice indexes are when the panic occurs? Thanks. |
Is that really go1.9, not a git revision? Line 235 is
and line 227 is
|
@ianlancetaylor Will do! |
@ianlancetaylor I've added a print statement inside |
So, you've found your problem; it must be in your FUSE driver. I think it's reasonable for Go to assume that |
Well, "my" fuse driver works perfectly well with Go 1.7.x and Go 1.8.x, so
it might very well be that the driver is buggy, but Go 1.9.0 breaks
something that previous versions could handle. So I wouldn't be so quick to
close.
…On Oct 4, 2017 00:40, "Ian Lance Taylor" ***@***.***> wrote:
Closed #22102 <#22102>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#22102 (comment)>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAH6GfxPtm6ecVOAjfKuEuJ7SLeZLUs8ks5soqnWgaJpZM4PqeGw>
.
|
Also as far as I know Go is supposed to be a safe language, not one that
goes belly up on an underlying software or hardware error. Seems to be a
very hand wavey approach to allow the stdlib to crash on IO.
…On Oct 4, 2017 09:34, "Péter Szilágyi" ***@***.***> wrote:
Well, "my" fuse driver works perfectly well with Go 1.7.x and Go 1.8.x, so
it might very well be that the driver is buggy, but Go 1.9.0 breaks
something that previous versions could handle. So I wouldn't be so quick to
close.
On Oct 4, 2017 00:40, "Ian Lance Taylor" ***@***.***> wrote:
> Closed #22102 <#22102>.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#22102 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AAH6GfxPtm6ecVOAjfKuEuJ7SLeZLUs8ks5soqnWgaJpZM4PqeGw>
> .
>
|
Note: Issue #22024 also deals with the poller introduced in |
@karalabe Yes, the Go code has changed, and that may well affect the behavior when using a broken FUSE driver (assuming the FUSE driver is indeed broken). But we can't promise to retain precisely the same behavior in all cases for each new Go release. If we did, we may as well not make Go releases. Go is intended to be a safe language. That does not mean that it should never crash. Quite the opposite. It means that it should not behave unexpectedly. For example, it should not continue running after an erroneous pointer reference. If my earlier analysis is correct then the behavior here is consistent with that goal. Looking at Go 1.8, it appears that if To be honest, if I were in your position, I would be pleased: a new Go release may have found a bug in the FUSE driver. That is a good thing. So I'm a little bit befuddled by your suggestion that this change in behavior is a bug in Go. |
If the file already existed, the WriteResponse.Size was being set as the length of the entire file, not just the amount that was written to the existing file. Fixes #15216
Hello, I just encountered the same issue after recompiled an existing internal software that use Minio with GoLang 1.10.
|
@protheusfr This issue is closed. It is very unlikely that you are seeing the same problem: the stack trace you show is completely different. Please open a new issue, or ask on a forum; see https://golang.org/wiki/Questions. Thanks. |
Ok no pb. |
What version of Go are you using (
go version
)?go version go1.9 linux/amd64
Does this issue reproduce with the latest release?
Yes (both stable as well as master).
What operating system and processor architecture are you using (
go env
)?What did you do?
A FUSE test from our test suite started panicking when upgrading to Go 1.9. I'm not really sure whether we're doing some bad API call, but the panic seems to originate from within the
os
file handling.What did you expect to see?
A successfully passing test, as with Go 1.8.x and Go 1.7.x.
What did you see instead?
Boom.
The text was updated successfully, but these errors were encountered: