Multiple issues detected by the thread sanitizer build

Host environment

  • Operating system: Ubuntu Linux

Description of problem

Switching the tsan build in the CI from benchmark to check-unit revealed a bunch of issues even in our most basic tests.

Steps to reproduce

  1. configure --enable-tsan --cc=clang --cxx=clang++ --enable-trace-backends=ust --enable-fdt=system --disable-slirp
  2. make check-unit
  3. recoil in horror at the failures

Additional information

From: https://gitlab.com/stsquad/qemu/-/jobs/3779216892

Summary of Failures:
27/95 qemu:unit / rcutorture                  ERROR           3.83s   exit status 66
28/95 qemu:unit / test-rcu-list               ERROR           5.28s   exit status 66
29/95 qemu:unit / test-rcu-simpleq            ERROR           5.07s   exit status 66
30/95 qemu:unit / test-rcu-tailq              ERROR           5.12s   exit status 66
32/95 qemu:unit / test-rcu-slist              ERROR           5.07s   exit status 66
40/95 qemu:unit / test-logging                ERROR           2.50s   exit status 66
52/95 qemu:unit / test-aio-multithread        ERROR           9.53s   exit status 66
54/95 qemu:unit / test-thread-pool            ERROR           7.22s   exit status 66
55/95 qemu:unit / test-bdrv-drain             ERROR           2.37s   exit status 66
58/95 qemu:unit / test-blockjob               ERROR           2.04s   exit status 66
60/95 qemu:unit / test-block-iothread         ERROR           2.08s   exit status 66
74/95 qemu:unit / test-io-channel-command     ERROR           0.10s   killed by signal 13 SIGPIPE
90/95 qemu:unit / test-replication            ERROR          25.03s   exit status 66
93/95 qemu:unit / test-util-filemonitor       ERROR           2.61s   exit status 66
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information