-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
runtime: AIX build broken with SIGSEGV #70483
Comments
CC @golang/aix. |
It is failing when trying to do an atomic operation. The address looks strange, probably it isn't mapped. If an aix and/or ppc64 person can confirm, I can think about how we might fix it. It may be tricky. @golang/ppc64 |
My memory is of #58857 |
We might need to move all the types from SRODATA to SNOPTRDATA on aix. |
Hi @randall77, let me have a look and confirm. Thanks |
Hello @randall77, Here, during gc marking, r6 register holds 0x20114ac60, which is the faulting address. r3 and r7 both pointing to 0x100a0eb60 goroutine 481 gp=0xa000100046c76c0 m=nil [GC worker (idle)]: r0 0x0 r1 0x11151b510 |
I poked at this and didn't make much progress. Without ssh access to a builder I can't really tell what is going on, or what fix might be productive. An AIX person needs to take the lead on this one. Possible ideas:
|
Hello @randall77, thanks for the lead. We will work on it. |
I am playing with second idea of getting rid of rodata on AIX, and I am relatively new to golang linking. In symtab.go, I played with changing where the garbage collection symbols are collected, from rodata to noptr and data. Getting phase errors. Have changed the rodata sections to noptr in data.go file. |
Change https://go.dev/cl/638016 mentions this issue: |
It is perhaps possible to type descriptors in NOPTRDATA, or move all RODATA to NOPTRDATA. But that is tricky. The linker has assumptions about where these symbols go in multiple places. We can look into that in the next release. For now, CL 638016 applies a more targeted fix, by applying the offset at run time. It also has the advantage of keeping things read-only. |
On AIX, an R_ADDR relocation from an RODATA symbol to a DATA symbol does not work, as the dynamic loader can change the address of the data section, and it is not possible to apply a dynamic relocation to RODATA. In order to get the correct address, we apply the delta between unrelocated and relocated data section addresses at run time. The linker saves both the unrelocated and the relocated addresses, so we can compute the delta. This is possible because RODATA symbols are generated by the compiler and so we have full control of. On AIX, the only case is the on-demand GC pointer masks from the type descriptors, for very large types. Perhaps there is a better way. Fixes golang#70483. Change-Id: I2664c0a813b38f7b146794cb1e73ccf5e238ca65 Reviewed-on: https://go-review.googlesource.com/c/go/+/638016 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Go version
go version devel go1.24-a2a4f00783
Output of
go env
in your module/workspace:What did you do?
Trigger go build using make.bash
What did you see happen?
https://build.golang.org/log/3ddc19274de093367f9925b03a9135a64c5412e3
What did you expect to see?
The build break started after this change --> https://go-review.googlesource.com/c/go/+/616255
The text was updated successfully, but these errors were encountered: