Re: failing T810-tsan on ppc64el

Subject: Re: failing T810-tsan on ppc64el

Date: Wed, 30 Aug 2023 15:07:23 +0200

To: David Bremner


From: Kevin Boulain

On 2023-08-25 at 08:07 -03, David Bremner <> wrote:
> I can just disable tsan tests on ppc64el for Debian, but I wondered if
> there is an underlying bug that only shows up on ppc64el

I see you've skipped T810-tsan in 90c61828, I think it's fair for the
time being. I did some digging and sent a patch to silence the races
reported by TSan in

However, the races are just a red herring and the diff actually shows
the key problem (easier to see once the suppressions have been updated):
  line 12: 19
Surely, you're more familiar than me with the output so you might have
noticed already, but it means this line fails:;a=blob;f=test/;h=4071e2968f2ad62eb6642c68b39f2750327682d0;hb=HEAD#l68

The call stack is as follow (I'm linking to the latest versions for
simplicity, not the ones packaged by Debian):

The rest is available at
but doesn't matter in this case.

So, fstat failed but the syscall isn't actually performed: strace only
reports an open followed nearly immediately by a close for this fd. That
means glibc must be returning the EINVAL that we're seeing. There's a
case where ___fxstat64 can actually set errno to that:;a=blob;f=sysdeps/unix/sysv/linux/fxstat64.c;h=b8c4c0a13c7c9d5a426a9c17a96d5db8fd08455e;hb=HEAD#l52

So, something is feeding an invalid 'vers' to glibc (inspecting the
assembly in gdb reveals it's set to 0 and it's checked against a 1).
TSan actually installs interceptors for fstat:
  __interceptor_fstat64 (fd=3, buf=0x7fffee63d418) at ../../../../src/libsanitizer/tsan/tsan_rtl.h:242
  ___fxstat64 (vers=0, fd=3, buf=0x7fffee63d418) at ../sysdeps/unix/sysv/linux/fxstat64.c:50

Because it's called __interceptor_fstat64 I believe it's
(not sure how to get the sources for TSan under Debian), which does
hardcode 'vers' to 0. Commenting out
  TEST_CFLAGS="${TEST_CFLAGS:-} -fsanitize=thread"
to eliminate the interceptor in the test suffices to make fstat succeed.

I'll see if I can find something more, otherwise I'll probably just
report this problem upstream.
notmuch mailing list --
To unsubscribe send an email to