Bug#1126304: apt upgrade and 'Failed to take /etc/passwd lock: Invalid argument'

Petter Reinholdtsen pere at hungry.com
Sat Jan 24 05:09:04 GMT 2026


A workaround could be to implementing a shared library to load using
LD_PRELOAD, which could provide a fcntl() wrapper masking the lack of
F_OFD_SETLKW in WSL 1 by implementing the same broken locking mechanism
as F_SETLK?  Then one could use `LD_PRELOAD=brokenwsllocking apt
upgrade` or similar to upgrade systemd when using WSL 1.

-- 
Happy hacking
Petter Reinholdtsen



More information about the Pkg-systemd-maintainers mailing list