-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: invalid pc-encoded table when running Openshift tests using go1.14rc1 on ppc64le #37216
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
@laboger could you take a look at what function PC 0x11c0f9c0 belongs to? Does it belong to function |
Here is what I get on another run: runtime: invalid pc-encoded table f=github.com/openshift/origin/vendor/k8s.io/client-go/tools/clientcmd.LoadFromFile pc=0x11c0f090 targetpc=0x11c0f360 tab=[0/0]0x0 From the objdump of the test, here is the start and end of the LoadFromFile function:
targetpc is this:
|
@laboger thanks! This is very helpful. Apparently findfunc returns a wrong function for the PC in PLT. I'll look into it. |
@laboger is the binary internally linked or externally linked? Is it possible that I could get the binary? (I probably don't need to run it, just examining the content may be enough.) Thanks! |
My guess is that our func table assumes the address space of text is contiguous, and if there are functions inserted by the external linker in the middle, the logic falls apart. In particular, if we ask for the pc table for a PC that belongs to the inserted function, it will find the wrong function, because the func table doesn't contain an entry of such function. |
This program is externally linked. And only happens if the -race option is used, which means it is linking in the .syso file, which is C code built by LLVM. So perhaps that combination is somehow causing the pc table to be inconsistent with the actual functions in the final program. Maybe running some significant tests with -race turned on will reproduce it. One other note, all the failures I have seen with this message have isAsyncSafePoint on the stack that ends up calling pcvalue. |
I also found that this program has trampolines due to its text size. So the program is very large, I'm not sure how I would get it to you? You could build it if you want, I put the directions below. It also seems like it would be good to have a test that walks through the pc-encoded table to detect where the errors are. Building it is not too hard:
|
Thanks, @laboger . Yeah, I think the trampolines inserted by the external linker might be the problem. If a preemption signal lands in such trampoline, it may get this error. I'll try to make a fix. |
Change https://golang.org/cl/219717 mentions this issue: |
@laboger does CL https://go-review.googlesource.com/c/go/+/219717 help? Thanks! |
I ran the full test set 3 times and didn't see the pc-encoded error message. Appears to resolve it. |
Thanks @laboger |
What version of Go are you using (
go version
)?go version go1.14rc1 linux/ppc64le
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?linux/ppc64le
go env
OutputWhat did you do?
Build and tested Openshift using Go 1.14rc1
What did you expect to see?
No failures or legitimate error output.
What did you see instead?
Some failures provide error messages that include the following:
The good news is that this bad symbol table output appears for some test failures every time the tests are run. The bad news, it is not always the same test that fails and I can not get the test to fail if it is run by itself, only when the whole set is run.
The bad symbol table message does not happen before commit 14849f0. If I build and test with anything after f511467 the error message occurs. Between these two commits, testing results in the message about unaligned sysUnused.
I am trying to find a smaller reproducer and also see if it fails on x86. It only fails with -race and -d=checkptr=0. If I don't turn off checkptr=0 then the unsafe pointer message occurs.
The text was updated successfully, but these errors were encountered: