-
Notifications
You must be signed in to change notification settings - Fork 18k
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
cmd/compile: panic while compiling empty package in a loop #16726
Comments
Is it possible to build the compiler with |
@dr2chase : This smells like we're passing a bad ordering function to sort. Something wrong with the dominator ordering somehow? Didn't we fix something like this for types a while back? |
That second stack trace looks completely unrelated, though. |
If it's not a data race, is there non-determinism coming from map key ordering? |
Or are we seeing a modern version of http://www.bitwizard.nl/sig11/ ? |
4 hours later, still no crash. I'll try on my mac tonight. |
FWIW I tried this for about 3 hours on my mac pro on 10.11.5 and no crash. |
I played around with it a bit, and found that I can make the problem appear more frequently by making the compiler compile more pkgs of the stdlib. That being said, even with the instructions below, it sometimes wouldn't crash, and I had to
Example:
Not sure, I tried passing the |
Can you reproduce this on any other machine? Can you run a memory tester on the machine that is failing? |
@dgryski I'm currently traveling, I'll try on another machine and run a memory test early next week. |
Removing this from Milestone Go1.7.1 since nobody can reproduce. We're going to assume this is faulty hardware for now until we hear otherwise. |
I haven't been able to reproduce this on another machine yet. I'll get a new machine in a couple weeks, if the problem is gone on it, I'll close this issue and assume the current machine has some other HW issue. |
Ping |
@odeke-em are you having the same problem? I finally have a new machine, and will try to run some comparison tests between the old and the new machine this week. |
@felixge nope, I was just pinging to see if there was an progress in reproducing the issue. Happy New Year! |
Ok, done some more tests. The new 15" 2016 MBP I tested with does not have the problem. My Mid 2012 15" still does. I'm now on Mac OS 10.12.2 and go version 1.7.4 with both machines. So I think the issue is somehow specific to my machine. I'd love to understand why there haven't been issues with older Go versions, and what the actual issue is, but I'll close this issue for now. I also plan to to wipe the disk on this machine and do a fresh reinstall next week. I'll provide another update if that ends up changing anything. |
I just had the battery and SSD in my MBP replaced by an official Apple Partner, setup Mac OS (10.12.3) and Go (1.7.5) from scratch. The repair shop also executed additional Apple-internal HW tests (including memory) and found no issue. However, the problem still exists, see output below. I guess there is still a chance that this is a HW issue, but I've never had issues with older versions of Go. So I think there is still a chance that this a regression in the Go compiler. If anybody is interested, I could probably also make this machine available via ssh for debugging. Otherwise I might try to dig a bit deeper myself as time allows.
|
I'm not seeing how this second failure could happen (the one at regalloc.go:1405). At least, I'm not seeing how it could happen nondeterministically. The compiler is essentially a deterministic program, either it is going to hit this bug every time, or it isn't. Background GC is the only nondeterministic thing happening, and I guess it is possible that it has a bug somewhere. But I would expect such a generic bug to be hitting other programs, and we're not seeing that. Thanks for all the help and bug reports. But unfortunately, I'm kinda stumped. |
@randall77 I think I'll try to dig in deeper. I decided to return the 2016 MBP because the touch bar is nightmare and it has other issues as well, so I'd very much like to believe my 2012 MBP HW isn't defect :). Anyway, I'm okay with this ticket being closed again as well. My motivation to debug will probably be somewhat correlated with the frequency I run into this problem during normal development. |
The only solution I have come up with is bisecting the crash to a single commit. If there were no issues with older versions of Go, there must be some CL responsible for this. I realize it's a ton of work to bisect this non-deterministic failure though. |
@mibk I'm afraid bisecting won't be an option. The problem appeared since Go moved its compiler from C to Go, and IIRC Go <= 1.4 won't run on the latest version of macOS anymore due to some syscall/signal SNAFU. |
@felixge - Just wanted to check in on this. Have you run into this again ? Could you try with 1.11 and see if there are any improvements ? |
@agnivade I no longer have the HW (2012 MBP) that had this issue and can't reproduce it with my current HW (2017 MBP), so I'll close this issue now. |
go version
)?go version go1.7 darwin/amd64
go env
)?A race condition causing some builds to fail with internal compiler errors. Two examples below:
and
I originally saw this error in the test suite of the project I'm working on. This is the minimal way I was able to reproduce it.
The text was updated successfully, but these errors were encountered: