On Freitag, 8. April 2022 23:56:15 CEST Milian Wolff wrote: > Which in turn points at the code that does cache cleanup in > `debuginfod_query_server`. I now used `rr` to record such a bogus run and I > clearly see that `(time(NULL) - st.st_mtime <= cache_miss)` is false and it > goes into the unlink case. > > I'll try to debug this further now - I definitely do not wait 600s inbetween > these runs here... I compiled elfutils with debug output, and here's what I can see when I run `debuginfod-find`: time(NULL) = 1649455510 st.st_mtime = 1649448650 delta = 6860 cache_miss = 600 The longer I wait, the bigger the delta becomes - i.e. for every second I wait, the `delta` increases by one. And I think I know where this comes from: ``` # first we stat the target cache path if (stat(target_cache_path, &st) == 0 { # then we pass _the same st_ to debuginfod_config_cache(cache_miss_path, cache_miss_default_s, &st) # which internally will do stat(config_path, st) # then we check the time delta time(NULL) - st.st_mtime <= cache_miss ``` I.e. when we check the time delta, we only take the time stamp of the `config_path` into account - the time stamp of the `target_cache_path` is ignored. I mount my filesystems with relatime (old advise for ssd's, probably not relevant anymore?). I guess that's the issue then? Can we change the above code to store the `st.st_mtime` for `target_cache_path` and use that for comparison purposes? That fixes the issue for my case. If this is acceptable, I'll provide a patch. Thanks -- Milian Wolff mail@milianw.de http://milianw.de