mar 13 13:02:52 ciri systemd[1]: Looking for unit files in (higher priority first):
mar 13 13:02:52 ciri systemd[1]: /etc/systemd/system.control
mar 13 13:02:52 ciri systemd[1]: /run/systemd/system.control
mar 13 13:02:52 ciri systemd[1]: /run/systemd/transient
mar 13 13:02:52 ciri systemd[1]: /run/systemd/generator.early
mar 13 13:02:52 ciri systemd[1]: /etc/systemd/system
mar 13 13:02:52 ciri systemd[1]: /etc/systemd/system.attached
mar 13 13:02:52 ciri systemd[1]: /run/systemd/system
mar 13 13:02:52 ciri systemd[1]: /run/systemd/system.attached
mar 13 13:02:52 ciri systemd[1]: /run/systemd/generator
mar 13 13:02:52 ciri systemd[1]: /usr/local/lib/systemd/system
mar 13 13:02:52 ciri systemd[1]: /usr/lib/systemd/system
mar 13 13:02:52 ciri systemd[1]: /run/systemd/generator.late
mar 13 13:02:52 ciri systemd[1]: Modification times have changed, need to update cache.
The message at the bottom of the log comes from systemd's src/basic/unit-file.c
uint64_t updated = siphash24_finalize(&state);
if (ret_new) *ret_new = updated;
if (updated != timestamp_hash) log_debug("Modification times have changed, need to update cache.");
return updated == timestamp_hash;
}
Modification of mtime of any of the directories above is sufficient to cause this to differ.
I've patched systemd to tell us why systemd thinks it needs to be reloaded (additional printfs) to get an idea what might be the trigger that is left stale.
With a closer look I ended up running this loop while looking at systemd debug logs:
sudo snap remove --purge snapd && sudo systemctl daemon-reload && sudo systemctl restart snapd && snap version && sudo apt update && echo "ALOHA: installing snapd" | systemd-cat && sudo snap install snapd && echo "ALOHA: done installing snapd" | systemd-cat
This causes the following log file to show up:
mar 13 13:02:52 ciri systemd[1]: Looking for unit files in (higher priority first): system. control system. control transient generator. early system. attached system. attached generator lib/systemd/ system systemd/ system generator. late
mar 13 13:02:52 ciri systemd[1]: /etc/systemd/
mar 13 13:02:52 ciri systemd[1]: /run/systemd/
mar 13 13:02:52 ciri systemd[1]: /run/systemd/
mar 13 13:02:52 ciri systemd[1]: /run/systemd/
mar 13 13:02:52 ciri systemd[1]: /etc/systemd/system
mar 13 13:02:52 ciri systemd[1]: /etc/systemd/
mar 13 13:02:52 ciri systemd[1]: /run/systemd/system
mar 13 13:02:52 ciri systemd[1]: /run/systemd/
mar 13 13:02:52 ciri systemd[1]: /run/systemd/
mar 13 13:02:52 ciri systemd[1]: /usr/local/
mar 13 13:02:52 ciri systemd[1]: /usr/lib/
mar 13 13:02:52 ciri systemd[1]: /run/systemd/
mar 13 13:02:52 ciri systemd[1]: Modification times have changed, need to update cache.
The message at the bottom of the log comes from systemd's src/basic/ unit-file. c
bool lookup_ paths_timestamp _hash_same( const LookupPaths *lp, uint64_t timestamp_hash, uint64_t *ret_new) {
struct siphash state;
if (lookup_ paths_mtime_ exclude( lp, *dir))
continue;
/* Determine the latest lookup path modification time */
if (errno == ENOENT)
continue;
if (stat(*dir, &st) < 0) {
}
}
uint64_t updated = siphash24_ finalize( &state) ;
*ret_ new = updated;
log_debug( "Modification times have changed, need to update cache.");
if (ret_new)
if (updated != timestamp_hash)
return updated == timestamp_hash;
}
Modification of mtime of any of the directories above is sufficient to cause this to differ.
I've patched systemd to tell us why systemd thinks it needs to be reloaded (additional printfs) to get an idea what might be the trigger that is left stale.