-
Notifications
You must be signed in to change notification settings - Fork 18k
ioutil: deadlock when WriteFile called with a 5<<30 byte buffer on Windows #31211
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
Comments
Here's a short reproducer:
|
Seems to be working on tip and commit 40d8c3d probably fixed this. |
I was able to reproduce on |
@ianlancetaylor @alexbrainman this looks to be a regression from 1.11 (introduced in golang.org/cl//129137). Should the fix above be backported? |
@andybons Sure. We can backport CL 165598 to 1.12. |
I guess this bug is already fixed on tip so retargeting for 1.12. |
Change https://golang.org/cl/170680 mentions this issue: |
Closed by merging 499088f to release-branch.go1.12. |
…uf) > maxRW fd.l.Lock shouldn't be called in a loop. Manual backport of CL 165598. It could not be cherry-picked due to conflicts. Fixes #31211 Change-Id: Ib76e679f6a276b32fe9c1594b7e9a506017a7967 Reviewed-on: https://go-review.googlesource.com/c/go/+/170680 Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
I agree with what Ian said. Alex |
Hey everyone, thanks for the fast reply. Keep up with the good work, Go is awesome ! |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes but only on Windows, not on Linux.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The program has a function that parses a text file, creates a data structure and serializes to disk using msgpack. The stack trace seems to indicate the error on the
ioutil.WriteFile
call to create the file (see*
below). What seems to have caused the issue is the size of the text file, ~ 5GB. No errors with files smaller than 1 GB.The program was developed on Linux and compiled to different platforms, the error is not reproducible when running on Linux.
What did you expect to see?
no errors
What did you see instead?
The text was updated successfully, but these errors were encountered: