The installation/upgrade of some packages reloads the systemd daemons,
which occasionally has the effect to execute the apt-daily service,
which runs "/usr/lib/apt/apt.systemd.daily update".
This is silly, because precisely at this time, either there already
is a /var/lib/dpkg/lock-frontend lock (due to the installation) and
the command fails, or if the frontend, like aptitude, releases the
lock temporarily, this may make installation by the frontend fail.
In any case, this is not satisfactory.
If the "apt.systemd.daily update" must be run at this time (reload
of systemd daemons), there is a major problem. Otherwise, it should
be run at a later time, so that there is a high probability that
the installation has finished, avoiding a lock failure. Or why not
completely relying on a randomized timer?