address deadlock introduced in cd2469d3

(cherry picked from commit fd52417f)
70 jobs for !2743 with 1441-threadsanitizer-lock-order-inversion-potential-deadlock-usr-lib-x86_64-linux-gnu-libtsan-so-0-v9_14 in 25 minutes and 8 seconds (queued for 5 seconds)
detached
Status Job ID Name Coverage
  Precheck
passed #465484
amd64 linux
🐞:sid:amd64

00:00:50

passed #465482
amd64 linux
autoreconf:sid:amd64

00:00:32

passed #465483
amd64 linux
misc:sid:amd64

00:00:16

 
  Build
passed #465497
amd64 linux
asan:sid:amd64

00:05:30

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

00:01:20

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

00:01:06

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

00:04:33

passed #465498
amd64 linux
clang:stretch:amd64

00:01:02

passed #465499
i386 linux
clang:stretch:i386

00:01:41

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

00:02:58

passed #465496
amd64 linux
gcc:bionic:amd64

00:01:47

passed #465491
amd64 linux
gcc:buster:amd64

00:02:55

passed #465486
amd64 linux
gcc:centos6:amd64

00:02:18

passed #465487
amd64 linux
gcc:centos7:amd64

00:02:35

passed #465488
amd64 linux
gcc:centos8:amd64

00:02:38

passed #465494
amd64 linux
gcc:fedora30:amd64

00:02:23

passed #465489
amd64 linux
gcc:jessie:amd64

00:01:40

passed #465492
amd64 linux
gcc:sid:amd64

00:03:21

passed #465493
i386 linux
gcc:sid:i386

00:01:28

passed #465490
amd64 linux
gcc:stretch:amd64

00:01:42

passed #465495
amd64 linux
gcc:xenial:amd64

00:01:43

passed #465505
amd64 windows
msvc:windows:amd64

00:03:01

passed #465504
amd64 linux
nolibtool:sid:amd64

00:02:47

passed #465500
amd64 linux
pkcs11:sid:amd64

00:02:55

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

00:00:37

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

00:00:22

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

00:00:21

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

00:00:51

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

00:00:46

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

00:00:31

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

00:00:44

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

00:00:45

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

00:00:45

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

00:00:45

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

00:00:46

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

00:00:34

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

00:00:44

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

00:00:49

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

00:00:44

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

00:00:33

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

00:00:59

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

00:00:45

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

00:09:40

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

00:06:23

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

00:06:45

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

00:07:36

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

00:07:08

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

00:09:31

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

00:06:54

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

00:07:12

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

00:07:34

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

00:07:06

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

00:08:58

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

00:07:27

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

00:06:31

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

00:06:59

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

00:08:01

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

00:08:05

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

00:07:51

failed #465539
amd64 freebsd
system:clang:freebsd12.0:amd64

00:06:35

failed #465525
amd64 linux
system:gcc:centos6:amd64

00:07:25

failed #465527
amd64 linux
system:gcc:centos8:amd64

00:07:34

failed #465531
amd64 linux
system:gcc:sid:amd64

00:07:38

failed #465532
i386 linux
system:gcc:sid:i386

00:07:32

failed #465613
linux i386
system:gcc:sid:i386

00:07:45

failed #465529
amd64 linux
system:gcc:stretch:amd64

00:07:17

failed #465534
amd64 linux
system:gcc:xenial:amd64

00:07:05

 
  Docs
passed #465541
amd64 linux
docs:sid:amd64

00:01:02

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

00:03:44

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

00:13:24