seahorse 3.20.0 consumes all RAM and CPU
When starting seahorse forks gpg and waits in a loop for a reply, each loop consume more memory until it gets killed by the OOM killer.
Meanwhile, gpg seems to loop over something TOFU related, strace gives:
stat("/home/alex/.gnupg/tofu.db-wal", 0x7ffcd6bc4050) = -1 ENOENT (No such file or directory)
fstat(7, {st_mode=S_IFREG|0644, st_size=131072, ...}) = 0
fcntl(7, F_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=1073741825, l_len=1}) = -1 EAGAIN (Resource temporarily unavailable)
fcntl(7, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
openat(AT_FDCWD, "/home/alex/.gnupg/tofu.db-want-lock", O_WRONLY|O_CREAT|O_TRUNC, 0664) = 8
close(8) = 0
fcntl(7, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0
fcntl(7, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741826, l_len=510}) = 0
fcntl(7, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0
stat("/home/alex/.gnupg/tofu.db-journal", 0x7ffcd6bc4050) = -1 ENOENT (No such file or directory)
pread64(7, "\0\0\0\4\0\0\0 \0\0\0\0\0\0\0\0", 16, 24) = 16
stat("/home/alex/.gnupg/tofu.db-wal", 0x7ffcd6bc4050) = -1 ENOENT (No such file or directory)
fstat(7, {st_mode=S_IFREG|0644, st_size=131072, ...}) = 0
fcntl(7, F_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=1073741825, l_len=1}) = -1 EAGAIN (Resource temporarily unavailable)
fcntl(7, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
openat(AT_FDCWD, "/home/alex/.gnupg/tofu.db-want-lock", O_WRONLY|O_CREAT|O_TRUNC, 0664) = 8
close(8) = 0
fcntl(7, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0
fcntl(7, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741826, l_len=510}) = 0
fcntl(7, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0
stat("/home/alex/.gnupg/tofu.db-journal", 0x7ffcd6bc4050) = -1 ENOENT (No such file or directory)
pread64(7, "\0\0\0\4\0\0\0 \0\0\0\0\0\0\0\0", 16, 24) = 16
stat("/home/alex/.gnupg/tofu.db-wal", 0x7ffcd6bc4050) = -1 ENOENT (No such file or directory)
fstat(7, {st_mode=S_IFREG|0644, st_size=131072, ...}) = 0
fcntl(7, F_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=1073741825, l_len=1}) = -1 EAGAIN (Resource temporarily unavailable)
fcntl(7, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
openat(AT_FDCWD, "/home/alex/.gnupg/tofu.db-want-lock", O_WRONLY|O_CREAT|O_TRUNC, 0664) = 8
close(8) = 0