#1138529 libpam-lastlog2 complains about locked database on busy machine

Package:
libpam-lastlog2
Source:
libpam-lastlog2
Description:
lastlog2 database PAM module
Submitter:
Patrik Schindler
Date:
2026-06-28 08:01:02 UTC
Severity:
normal
Tags:
#1138529#5
Date:
2026-05-31 11:58:35 UTC
From:
To:
Dear Maintainer,

I'm using SysVrc and updated an NFS server from Deb12 to Deb13. This is a
machine with heavy load due to Veeam Backup & Replication repositories.

Veeam does some "magic" by logging in via ssh and running some local perl code.
After the upgrade, I'm getting the following errors in syslog:

May 31 01:29:01 myhostname sshd-session[29567]: pam_lastlog2(sshd:session): Failed to execute statement: database is locked
May 31 01:29:01 myhostname sshd-session[29567]: pam_lastlog2(sshd:session): SQL error: database is locked

I'm aware that SQlite isn't a full-fledged RDBMS, and that my case might be an
edge case rarely happening to anyone else. I also don't know if this condition
has been addressed in the code. Maybe adding a small and random delay and
trying again for a small number of times might alleviate the described
condition?

#1138529#10
Date:
2026-06-03 20:26:07 UTC
From:
To:
Hi Patrick,

Do you have a reproduction scenario that we can forward to upstream?

Best,
Chris

#1138529#15
Date:
2026-06-04 12:00:48 UTC
From:
To:
Hello Chris,

Am 03.06.2026 um 22:26 schrieb Chris Hofstaedtler <zeha@debian.org>:

Unfortunately, no. From the error messages and known behavior of Veeam B&R, I assume that massively parallel (successful!) logins trigger the described error, and I cannot even prove it.

:wq! PoC

#1138529#26
Date:
2026-06-28 07:59:26 UTC
From:
To:
Upstream fixed this in commit https://github.com/util-linux/util-linux/commit/97cbb98bd86b759101d57cd425411ffdca8dc9d2
for 2.42.2.

Commit https://github.com/util-linux/util-linux/commit/1e4b0ec69d4a017436278a204b27224a8e07fd9e
will fix it in 2.41.5.

Chris