Re: notary arm64-specific failure: runtime: marked free object in span 0xffff5ec83ac0, elemsize=208 freeindex=3 (bad use of unsafe.Pointer or having race conditions? try -d=checkptr or -race)
On Fri, 21 Feb 2025 at 10:55, Tianon Gravi <tianon@debian.org> wrote:
> On Tue, 18 Feb 2025 at 01:41, Jérémy Lal <kapouer@melix.org> wrote:
> > Le mar. 18 févr. 2025 à 10:37, Jérémy Lal <kapouer@melix.org> a écrit :
> >> Probably golang-1.24 has changed something that no longer applies to debian's arm64 supported features:
> >> https://github.com/golang/go/commits/master/src/runtime/asm_arm64.s
> > Especially the last three commits apply/revert/apply seems that something was broken, and has been fixed 7 hours ago.
>
> Hmm, but those are related to illegal instructions, where the panic in
> our notary package is somehow related to use-after-free. 😭
I managed to reproduce in a qemu-system-aarch64 VM so that I could
mess with this and try to figure out more information (it's not super
fast, but it *does* reproduce the problem, so that's a bonus - someone
with real hardware could probably iterate on this a lot faster 🙈).
Applying the following patch builds successfully, so it's definitely
*something* in Go 1.24 causing this:
diff --git a/debian/control b/debian/control
index 1f88a53e..afa85215 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Uploaders: Arnaud Rebillout <arnaudr@kali.org>,
Rules-Requires-Root: no
Build-Depends: debhelper-compat (= 13),
dh-golang,
- golang-any,
+ golang-1.23-go,
golang-github-bugsnag-bugsnag-go-dev,
golang-github-cloudflare-cfssl-dev (>= 1.6.5),
golang-github-docker-distribution-dev (>= 2.7.1~),
diff --git a/debian/rules b/debian/rules
index f05ac822..a74bcabf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,9 @@
#!/usr/bin/make -f
+# make sure we prefer Go 1.23 appropriately
+# (1.24+ panics in the tests)
+export PATH := /usr/lib/go-1.23/bin:$(PATH)
+
export DH_GOLANG_GO_GENERATE := 1
export DH_GOLANG_INSTALL_EXTRA := fixtures
GOPKG := github.com/theupdateframework/notary
♥,
- Tianon
4096R / B42F 6819 007F 00F8 8E36 4FD4 036A 9C25 BF35 7DD4
Reply to: