address deadlock introduced in cd2469d3

(cherry picked from commit fd52417f)
66 jobs for !2746 with 1441-threadsanitizer-lock-order-inversion-potential-deadlock-usr-lib-x86_64-linux-gnu-libtsan-so-0-v9_11 in 23 minutes and 51 seconds (queued for 6 seconds)
detached
Status Job ID Name Coverage
  Precheck
passed #466763
amd64 linux
🐞:sid:amd64

00:01:23

passed #466761
amd64 linux
autoreconf:sid:amd64

00:00:34

passed #466762
amd64 linux
misc:sid:amd64

00:00:20

 
  Build
passed #466776
amd64 linux
asan:sid:amd64

00:02:13

passed #466781
amd64 freebsd
clang:freebsd11.3:amd64

00:02:05

passed #466782
amd64 freebsd
clang:freebsd12.0:amd64

00:01:50

passed #466783
amd64 openbsd
clang:openbsd6.5:amd64

00:15:22

passed #466777
amd64 linux
clang:stretch:amd64

00:03:36

passed #466778
i386 linux
clang:stretch:i386

00:03:40

passed #466764
amd64 linux
gcc:alpine3.10:amd64

00:03:10

passed #466775
amd64 linux
gcc:bionic:amd64

00:03:24

passed #466770
amd64 linux
gcc:buster:amd64

00:01:44

passed #466765
amd64 linux
gcc:centos6:amd64

00:02:24

passed #466766
amd64 linux
gcc:centos7:amd64

00:02:44

passed #466767
amd64 linux
gcc:centos8:amd64

00:02:49

passed #466773
amd64 linux
gcc:fedora30:amd64

00:03:11

passed #466768
amd64 linux
gcc:jessie:amd64

00:01:32

passed #466771
amd64 linux
gcc:sid:amd64

00:02:29

passed #466772
i386 linux
gcc:sid:i386

00:01:47

passed #466769
amd64 linux
gcc:stretch:amd64

00:03:23

passed #466774
amd64 linux
gcc:xenial:amd64

00:01:53

passed #466785
amd64 windows
msvc:windows:amd64

00:02:46

passed #466779
amd64 linux
nocrypto:sid:amd64

00:01:36

passed #466784
amd64 linux
nolibtool:sid:amd64

00:01:59

passed #466780
amd64 linux
pkcs11:sid:amd64

00:03:00

 
  Unit
passed #466798
amd64 linux
unit:asan:sid:amd64

00:01:49

passed #466802
amd64 freebsd
unit:clang:freebsd11.3:amd64

00:00:34

passed #466803
amd64 freebsd
unit:clang:freebsd12.0:amd64

00:00:23

passed #466799
amd64 linux
unit:clang:stretch:amd64

00:00:32

passed #466786
amd64 linux
unit:gcc:alpine3.10:amd64

00:00:49

passed #466797
amd64 linux
unit:gcc:bionic:amd64

00:00:58

passed #466792
amd64 linux
unit:gcc:buster:amd64

00:00:56

passed #466787
amd64 linux
unit:gcc:centos6:amd64

00:01:03

passed #466788
amd64 linux
unit:gcc:centos7:amd64

00:00:47

passed #466789
amd64 linux
unit:gcc:centos8:amd64

00:00:49

passed #466795
amd64 linux
unit:gcc:fedora30:amd64

00:01:01

passed #466790
amd64 linux
unit:gcc:jessie:amd64

00:00:30

passed #466793
amd64 linux
unit:gcc:sid:amd64

00:00:52

passed #466794
i386 linux
unit:gcc:sid:i386

00:00:46

passed #466791
amd64 linux
unit:gcc:stretch:amd64

00:01:01

passed #466796
amd64 linux
unit:gcc:xenial:amd64

00:00:48

passed #466800
amd64 linux
unit:nocrypto:sid:amd64

00:00:51

passed #466804
amd64 linux
unit:nolibtool:sid:amd64

00:01:20

passed #466801
amd64 linux
unit:pkcs11:sid:amd64

00:00:59

 
  System
passed #466817
amd64 linux
system:asan:sid:amd64

00:07:28

passed #466827
freebsd amd64
system:clang:freebsd11.3:amd64

00:04:44

passed #466821
amd64 freebsd
system:clang:freebsd12.0:amd64

00:05:09

passed #466805
amd64 linux
system:gcc:alpine3.10:amd64

00:05:36

passed #466816
amd64 linux
system:gcc:bionic:amd64

00:05:17

passed #466811
amd64 linux
system:gcc:buster:amd64

00:05:40

passed #466806
amd64 linux
system:gcc:centos6:amd64

00:05:42

passed #466807
amd64 linux
system:gcc:centos7:amd64

00:05:31

passed #466808
amd64 linux
system:gcc:centos8:amd64

00:07:50

passed #466814
amd64 linux
system:gcc:fedora30:amd64

00:05:38

passed #466809
amd64 linux
system:gcc:jessie:amd64

00:07:32

passed #466812
amd64 linux
system:gcc:sid:amd64

00:05:20

passed #466813
i386 linux
system:gcc:sid:i386

00:05:47

passed #466810
amd64 linux
system:gcc:stretch:amd64

00:05:46

passed #466815
amd64 linux
system:gcc:xenial:amd64

00:05:33

passed #466818
amd64 linux
system:nocrypto:sid:amd64

00:03:15

passed #466822
amd64 linux
system:nolibtool:sid:amd64

00:05:29

passed #466819
amd64 linux
system:pkcs11:sid:amd64

00:05:17

failed #466820
amd64 freebsd
system:clang:freebsd11.3:amd64

00:05:23

 
  Docs
passed #466823
amd64 linux
docs:sid:amd64

00:00:38

 
  Postcheck
passed #466825
amd64 linux
cppcheck:gcc:sid:amd64

00:01:08

passed #466824
amd64 linux
scan-build:buster:amd64

00:12:47