Hi Eric,Thanks for the detailed bug report. As this is something which can theoretically affect _any_ apt-based distributed (i.e., derivatives of Debian), I feel that it should ideally be reported upstream.
I personally run this textfile collector on a Debian bookworm system, as well as apticron - so this is (I think) a similar scenario where two independent processes are periodically updating the apt cache, and I wondered whether that was wise or not. I have seen the textfile collector block only once so far.
The apt.sh script which apt_info.py replaces only executed "apt-get --just-print" - so even if executed as root, it never tried to update the apt cache. In fact, unless you had something else like apticron to periodically update the apt cache, apt.sh would return stale information.
I guess that a simple workaround would be to tweak the systemd service so that apt_info.py is executed as an unprivileged user, which would be unable to update the cache, and theoretically avoid any potential for a deadlock. Perhaps a recommendation to the upstream developer could be made, e.g. to add a command-line argument to the script so that it wouldn't try to update the cache even when executed as root.
Best, Daniel
OpenPGP_signature
Description: OpenPGP digital signature

