-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: fatal error: bad pointer in write barrier #11689
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 @aclements #10603 happend again. |
CC @RLH |
I'm seeing the exact same problem when running Go on android. It's easily reproducible, though the setup is quite complicated. |
This is a write barrier being called to write 3 to the slot:
Because init was called with an io.Writer interface holding a 3 instead of a pointer:
Because NewWriter was called with that same io.Writer (and level = 9):
But testSync was called with t=0xc8210481b0 and level=0x3:
It is as if the (t, level) pair was copied directly to the NewWriter argument slots instead of the result of io.MultiWriter. Obviously the compiler isn't doing this all the time, or bad things would be happening. Maybe a stack barrier at the wrong time, or a bad stack copy? |
@spetrovic77 Can you post the full failure dump you get? I want to see how much the two have in common. Thanks. |
And if you can make it happen repeatedly, posting three wouldn't hurt. Thanks. |
Sorry for the delay, here is the 1st stack: runtime: writebarrierptr *0x91f2ab60 = 0x1 runtime stack: goroutine 553 [running, locked to thread]: |
2nd stack: runtime: writebarrierptr *0x91ce4ec8 = 0x21 runtime stack: goroutine 638 [running, locked to thread]: |
3rd stack: runtime: writebarrierptr *0x91f9cb10 = 0x29 runtime stack: goroutine 453 [running, locked to thread]: |
I forgot to mention, my Go client is synced to: cc6554f. The problem persists @ head for me, let me know if you want those stacks. (I should have sent those stacks instead...) |
There's a huge amount of unsafe code in this function. It's more likely that the bad write barrier in this case is the fault of jArg, and not the same cause as the original report. |
True, this is probably our fault. We'll look into it. |
Here are the occurrences of "bad pointer in write barrier" over the past month. I haven't looked at these to see if they look at all related, and the other two were before some memory corruption fixes (8c3533c and cc8f544). 2015-06-28T21:41:38-d0ed87d/openbsd-amd64-gce56 |
2015-06-28T21:41:38-d0ed87d/openbsd-amd64-gce56 looks like map corruption. I don't see any links here. Possibly the map bug is related to the one we can reproduce on nacl, or possibly not. I suspect the nacl-arm cmd/link bug is fixed. And this one hasn't happened again, so I am going to assume it is fixed or hibernating until we have evidence otherwise. |
I've been trying to get the nacl/arm builder back online, spoiler alert, I tried updating to pepper44 yesterday without luck, I'll dump what I know On Fri, 31 Jul 2015 06:36 Russ Cox notifications@github.com wrote:
|
@quentinmit, I think it's better to ping @aclements on #15831. |
#15831 is unlikely to be related to this bug. (Lots of things can lead to "bad pointer in write barrier". Usually it means that something somewhere conjured a non-pointer into a pointer and then it got passed to the write barrier. The write barrier catches it, but it's not the write barrier's fault.) |
See http://build.golang.org/log/aafb6004d46f88ffe84788b31f51d64bcef6d9b1.
The text was updated successfully, but these errors were encountered: