go: cmd/cgo/internal/testshared: GOHOSTARCH=arm fails on go1.21rc2/arm64 with abi mismatch
System:
Raspberry Pi 4 Model B Raspbian/Debian Bullseye (11) binutils 2.35.2-2+rpi1 aarch64 kernel with arm userspace.
All the misc/cgo/testshared
tests now fail with go1.21rc2 when using GOHOSTARCH=arm
on arm64:
$ GOROOT_BOOTSTRAP=/home/build/go1.20.5 GOHOSTARCH=arm time ./all.bash
[..]
##### ../misc/cgo/testshared
--- FAIL: TestTrivialExecutable (17.68s)
shared_test.go:52: executing ../../bin/trivial (trivial executable) failed exit status 2:
abi mismatch detected between the executable and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf7b6c2d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xffc54b9c sp=0xffc54b88 pc=0xf7aeae80
runtime.moduledataverify1(0x21170)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xffc54c14 sp=0xffc54b9c pc=0xf7b1bfbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xffc54c38 sp=0xffc54c14 pc=0xf7af1324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xffc54c78 sp=0xffc54c38 pc=0xf7b33ebc
[..]
Full failure log from cd777381
[..]
##### ../misc/cgo/testshared
--- FAIL: TestTrivialExecutable (17.68s)
shared_test.go:52: executing ../../bin/trivial (trivial executable) failed exit status 2:
abi mismatch detected between the executable and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf7b6c2d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xffc54b9c sp=0xffc54b88 pc=0xf7aeae80
runtime.moduledataverify1(0x21170)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xffc54c14 sp=0xffc54b9c pc=0xf7b1bfbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xffc54c38 sp=0xffc54c14 pc=0xf7af1324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xffc54c78 sp=0xffc54c38 pc=0xf7b33ebc
--- FAIL: TestDivisionExecutable (1.51s)
shared_test.go:52: executing ../../bin/division (division executable) failed exit status 2:
abi mismatch detected between the executable and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf7d542d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xffc01e3c sp=0xffc01e28 pc=0xf7cd2e80
runtime.moduledataverify1(0x21170)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xffc01eb4 sp=0xffc01e3c pc=0xf7d03fbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xffc01ed8 sp=0xffc01eb4 pc=0xf7cd9324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xffc01f18 sp=0xffc01ed8 pc=0xf7d1bebc
--- FAIL: TestCgoExecutable (4.91s)
shared_test.go:52: executing ../../bin/execgo (cgo executable) failed exit status 2:
abi mismatch detected between the executable and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf7c4e2d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xffafa17c sp=0xffafa168 pc=0xf7bcce80
runtime.moduledataverify1(0x30750)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xffafa1f4 sp=0xffafa17c pc=0xf7bfdfbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xffafa218 sp=0xffafa1f4 pc=0xf7bd3324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xffafa258 sp=0xffafa218 pc=0xf7c15ebc
--- FAIL: TestGopathShlib (10.49s)
shared_test.go:52: executing ../../bin/exe (executable linked to GOPATH library) failed exit status 2:
abi mismatch detected between libtestshared-depBase.so and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf782a2d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xff8e68ac sp=0xff8e6898 pc=0xf77a8e80
runtime.moduledataverify1(0xf7697dd0)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xff8e6924 sp=0xff8e68ac pc=0xf77d9fbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xff8e6948 sp=0xff8e6924 pc=0xf77af324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xff8e6988 sp=0xff8e6948 pc=0xf77f1ebc
--- FAIL: TestTwoGopathShlibs (7.74s)
shared_test.go:52: executing ../../bin/exe2 (executable linked to GOPATH library) failed exit status 2:
abi mismatch detected between libtestshared-depBase.so and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf75f32d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xffa732cc sp=0xffa732b8 pc=0xf7571e80
runtime.moduledataverify1(0xf79cadd0)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xffa73344 sp=0xffa732cc pc=0xf75a2fbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xffa73368 sp=0xffa73344 pc=0xf7578324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xffa733a8 sp=0xffa73368 pc=0xf75baebc
--- FAIL: TestThreeGopathShlibs (20.07s)
shared_test.go:52: executing ../../bin/exe3 (executable linked to GOPATH library) failed exit status 2:
abi mismatch detected between libtestshared-depBase.so and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf769c2d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xffa80abc sp=0xffa80aa8 pc=0xf761ae80
runtime.moduledataverify1(0xf7393dd0)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xffa80b34 sp=0xffa80abc pc=0xf764bfbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xffa80b58 sp=0xffa80b34 pc=0xf7621324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xffa80b98 sp=0xffa80b58 pc=0xf7663ebc
--- FAIL: TestABIChecking (5.99s)
shared_test.go:1012: exe failed, but without line "abi mismatch detected between the executable and lib"; got output:
abi mismatch detected between libtestshared-depBase.so and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf79422d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xffc1a58c sp=0xffc1a578 pc=0xf78c0e80
runtime.moduledataverify1(0xf77afdd0)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xffc1a604 sp=0xffc1a58c pc=0xf78f1fbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xffc1a628 sp=0xffc1a604 pc=0xf78c7324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xffc1a668 sp=0xffc1a628 pc=0xf7909ebc
--- FAIL: TestImplicitInclusion (3.36s)
shared_test.go:52: executing ../../bin/implicitcmd (running executable linked against library that contains same package as it) failed exit status 2:
abi mismatch detected between libtestshared-explicit.so and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf77562d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xff815d4c sp=0xff815d38 pc=0xf76d4e80
runtime.moduledataverify1(0xf789d090)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xff815dc4 sp=0xff815d4c pc=0xf7705fbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xff815de8 sp=0xff815dc4 pc=0xf76db324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xff815e28 sp=0xff815de8 pc=0xf771debc
--- FAIL: TestInterface (4.76s)
shared_test.go:52: executing ../../bin/iface (running type/itab uniqueness tester) failed exit status 2:
abi mismatch detected between libtestshared-iface_b.so and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf7ce22d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xff979dbc sp=0xff979da8 pc=0xf7c60e80
runtime.moduledataverify1(0xf7b5e090)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xff979e34 sp=0xff979dbc pc=0xf7c91fbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xff979e58 sp=0xff979e34 pc=0xf7c67324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xff979e98 sp=0xff979e58 pc=0xf7ca9ebc
--- FAIL: TestGlobal (3.99s)
shared_test.go:52: executing ../../bin/global (global executable) failed exit status 2:
abi mismatch detected between libtestshared-globallib.so and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf73f42d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xffda889c sp=0xffda8888 pc=0xf7372e80
runtime.moduledataverify1(0xf753b0a0)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xffda8914 sp=0xffda889c pc=0xf73a3fbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xffda8938 sp=0xffda8914 pc=0xf7379324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xffda8978 sp=0xffda8938 pc=0xf73bbebc
--- FAIL: TestTestInstalledShared (11.84s)
shared_test.go:1063: executing /home/build/go-dev/bin/go test -linkshared -test.short sync/atomic failed exit status 1:
--- FAIL: TestGeneratedHash (5.73s)
shared_test.go:1076: executing /home/build/go-dev/bin/go test -linkshared ./issue30768 failed exit status 1:
--- FAIL: TestGCData (4.66s)
shared_test.go:52: executing ./main (running gcdata/main) failed exit status 2:
abi mismatch detected between libtestshared-gcdata-p.so and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf7dff2d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xffda274c sp=0xffda2738 pc=0xf7d7de80
runtime.moduledataverify1(0xf7c7b090)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xffda27c4 sp=0xffda274c pc=0xf7daefbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xffda27e8 sp=0xffda27c4 pc=0xf7d84324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xffda2828 sp=0xffda27e8 pc=0xf7dc6ebc
--- FAIL: TestIssue44031 (5.43s)
shared_test.go:1098: executing /home/build/go-dev/bin/go run -linkshared ./issue44031/main failed exit status 1:
abi mismatch detected between libtestshared-issue44031-a.so and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf79252d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xffbaa06c sp=0xffbaa058 pc=0xf78a3e80
runtime.moduledataverify1(0xf763f090)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xffbaa0e4 sp=0xffbaa06c pc=0xf78d4fbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xffbaa108 sp=0xffbaa0e4 pc=0xf78aa324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xffbaa148 sp=0xffbaa108 pc=0xf78ecebc
exit status 2
--- FAIL: TestIssue47873 (3.84s)
shared_test.go:1106: executing /home/build/go-dev/bin/go run -linkshared ./issue47837/main failed exit status 1:
abi mismatch detected between libtestshared-issue47837-a.so and libruntime,sync-atomic.so
fatal error: abi mismatch
runtime: panic before malloc heap initialized
runtime stack:
runtime.throw({0xf7b232d6, 0xc})
/home/build/go-dev/src/runtime/panic.go:1075 +0x54 fp=0xffe4ac8c sp=0xffe4ac78 pc=0xf7aa1e80
runtime.moduledataverify1(0xf7c6b090)
/home/build/go-dev/src/runtime/symtab.go:666 +0x408 fp=0xffe4ad04 sp=0xffe4ac8c pc=0xf7ad2fbc
runtime.moduledataverify(...)
/home/build/go-dev/src/runtime/symtab.go:617
runtime.schedinit()
/home/build/go-dev/src/runtime/proc.go:710 +0x44 fp=0xffe4ad28 sp=0xffe4ad04 pc=0xf7aa8324
runtime.rt0_go()
/home/build/go-dev/src/runtime/asm_arm.s:168 +0x8c fp=0xffe4ad68 sp=0xffe4ad28 pc=0xf7aeaebc
exit status 2
FAIL
FAIL misc/cgo/testshared 176.158s
FAIL
2023/06/27 15:39:14 Failed: exit status 1
##### ../misc/cgo/testplugin
ok misc/cgo/testplugin 0.005s
go tool dist: FAILED
The same build approach has worked for at many releases until now (eg, go1.20.5 builds and tests correctly).
Git bisect shows the failure started with the following commit for #22040:
cd777381: cmd/link: don’t switch to gold on ARM Linux
Edit: Failure log is from cd777381, not go1.21rc2. The same error occurs for go1.21rc2 but in a different location. go1.21rc2 error log below.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 19 (17 by maintainers)
Wait, in go1.21rc2 tree there is no
misc/cgo/testshared
anymore (it is moved tocmd/cgo/internal
). Are you sure you’re running go1.21rc2, and could you make sure when updating the tree, residual files are deleted? Thanks.