-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: fatal error: found bad pointer in Go heap (1.19.1) #56552
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
/cc @golang/runtime FWIW, I spot checked the mentioned use of unsafe.Pointer in mmap-go/blob/main/mmap.go and it seems okay. As far as I can tell, it's only used on Windows anyway. |
Have you tried running it under the race detector? |
@randall77 I've tried with the race detector and had no failures, even against files that were parsed immediately before the pointer failure. That also required me to rebuild the executable with CGO enabled, which changed things. |
Awesome, thanks for confirming. Without a way to reproduce this it's hard to make progress on our end. It could be a real bug in the GC based on the information you shared. Do you have any additional information, or can you point us to some code we could run that at least might reproduce the issue? |
@mknyszek I'd love to be able to point you to some code but I need permission to upload, so I'll have to wait for that. What I do have is a saved callstack from this error that I managed to capture via GoLand while remotely debugging this morning. However, running the program against the files to replicate...failed. It's still humming along, hours later, without issue. Which is the major problem in that I can't just reproduce the error at will. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
I have a parsing program that's been in development for the past few months to pull a variety of information from a large sample set. The current issue is that, at random, I will get a fatal error that will kill the program when running against any given directory:
The full error can be seen here: https://go.dev/play/p/5m48pLjUsEK
Additionally, this is not intentionally reproducible. Running my program against the same directory again will not yield the error, and it may go through several thousand or several hundred thousand files before it occurs again. I have multiple logs of this activity.
Some things to note:
CGO_ENABLED=0
due to compatibility issues with the box it's being run onmount -o ro /remote/drive/path /local/drive/path
unsafe
orcgo
in my code; however, there is a dependency for the parser that has a single use. This is located in https://github.com/edsrzf/mmap-go/blob/main/mmap.go (lines 80-82):What could be causing this to occur, and is there a way to correct for it?
The text was updated successfully, but these errors were encountered: