I'm seeing the same problem on Ubuntu 22.04.4 LTS:
$ ps -eHo pid,ppid,etimes,command | grep -w [a]pt 3162391 1 3033258 /bin/sh /usr/lib/apt/apt.systemd.daily update 3162395 3162391 3033258 /bin/sh /usr/lib/apt/apt.systemd.daily lock_is_held update 3162423 3162395 3033257 apt-get -qq -y update 3162432 3162423 3033257 /usr/lib/apt/methods/http 3163221 3162423 3033222 /usr/lib/apt/methods/gpgv
And since /usr/lib/apt/apt.systemd.daily is from package apt, this is definitely a bug in apt. A pretty simple workaround would be to run
/usr/bin/timeout 15m /usr/lib/apt/apt.systemd.daily lock_is_held update
instead. Of course, that wouldn't fix the underlying problem but it would automatically release the lock after 15 minute delay.
I'm seeing the same problem on Ubuntu 22.04.4 LTS:
$ ps -eHo pid,ppid, etimes, command | grep -w [a]pt apt/apt. systemd. daily update apt/apt. systemd. daily lock_is_held update apt/methods/ http apt/methods/ gpgv
3162391 1 3033258 /bin/sh /usr/lib/
3162395 3162391 3033258 /bin/sh /usr/lib/
3162423 3162395 3033257 apt-get -qq -y update
3162432 3162423 3033257 /usr/lib/
3163221 3162423 3033222 /usr/lib/
And since /usr/lib/ apt/apt. systemd. daily is from package apt, this is definitely a bug in apt. A pretty simple workaround would be to run
/usr/bin/timeout 15m /usr/lib/ apt/apt. systemd. daily lock_is_held update
instead. Of course, that wouldn't fix the underlying problem but it would automatically release the lock after 15 minute delay.