Based on https://lists.debian.org/debian-glibc/2011/09/msg00004.html, it appears that adding -funwind-tables to CFLAGS solves the problem on 32-bit arm systems. AFAICT, this is not documented in the gcc manual or the docs for backtrace(3).
Adding -rdynamic to LDFLAGS makes the stack traces actually useful by resolving addresses to symbol names. I've tested this on armel and amd64 so far. Work so far is on the backtrace-fixes branch in my salsa dovecot fork: https://salsa.debian.org/noahm/dovecot/-/tree/backtrace-fixes Unfortunately mips64 and mips64el seem to have other issues that make me wonder if either (a) some other compilation options need to be enabled, or (b) backtrace(3) doesn't work there at all. It doesn't help that our porter boxes are unbearably slow for exploring the situation...