-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: builds using compiler 1.4+ fail randomly while using 1.2 works averytime #12608
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
Hi Juan, Can you please provide some more information. The panic line alone is not that useful by itself, can you please include the entire output, and if possible a code sample that demonstrates the problem. |
Does the program use the unsafe package or cgo?
|
Hi all, I am currently trying to reduce the example to the smallest size possible Cheers, Juan Montenegro 2015-09-14 19:09 GMT+10:00 Minux Ma notifications@github.com:
|
@jdmontenegro don't forget the initial request to include the full output that you see. That should be something to get us started. |
Hi, This is the final error that appears 3/10 times when running on the same panic: runtime error: invalid memory address or nil pointer dereference goroutine 17998 [running]: goroutine 1 [semacquire]: The program uses a library "ContigMapper"that I wrote and then uses Cheers, Juan Montenegro 2015-09-15 10:37 GMT+10:00 Dave Cheney notifications@github.com:
|
@jdmontenegro thank you for your reply. These crashes are commonly caused by races in your program. Have you run your tests or built a race enable version of your program ? To run your tests with the race detector
To build a race enable version of your program
|
Thanks for your replies. Cheers, Juan Montenegro 2015-09-15 11:01 GMT+10:00 Brad Fitzpatrick notifications@github.com:
|
If your code has a race condition then it's behaviour is considered to be undefined. The fact that it worked without fault previously does not change this fact. Your programs must be free of race conditions or their results are not defined. I will close this issue now as there is nothing to be done here. |
Hi, What does it mean when running: go run -race myprogram.go -f file1 -g file2 -out outfile shows the expected output and no complain. Does that mean there is no data I run this test to check if the race detector was working correctly: func main() { from here: https://golang.org/doc/articles/race_detector.html and the race detector shows the expected error WARNING: DATA RACE Previous write by main goroutine: Goroutine 5 (running) created at: /home/juanda/Documents/GO/src/race.go:13 +0x1ac1 a But with my script there is no output. Does that mean there is no race Best regards, Juan Montenegro 2015-09-15 12:47 GMT+10:00 Dave Cheney notifications@github.com:
|
Hi,
I have compiled a program with versions go1.2, 1.4, 1.5 and 1.5.1.
The 1.2 binary runs OK with no issues everytime.
The other versions break 3/10 times with the following error:
panic: runtime error: invalid memory address or nil pointer dereference
but the other 7/10 using the same data runs OK
I think it may be a problem with the compiler. Should I send you the code and the test files?
Best regards,
Juan Montenegro
The text was updated successfully, but these errors were encountered: