Skip to content

guards.json not updated with new guards

Summary

arti suddenly stopped working today. Both socks port and hidden services were not working. From the logs, it looks like none of the guards are functional.

Attempt 8: Unable to select a guard relay: No usable guards. Rejected 60/60 as down, then 0/0 as pending, then 0/0 as unsuitable to purpose, then 0/0 with filter. 
Attempt 9: Spent too long trying to construct circuits for this request                                                                                            
2025-04-11T14:32:53Z  WARN tor_circmgr::hspool: Too many preemptive onion service circuits failed; waiting a while.                                                

After backing up and removing the state directory, new guards.json was created and it started working again. None of the ip ports in old json file was present in the new file. Last entry in the old file was at 2025-03-04T03:44:50Z. The first one was from Aug 2024 (since I started using arti).

I think there is a limit of maximum 60 entries in the file and after which new guards are not added and also old guards are not cleaned up.

Steps to reproduce:

  1. Use arti long enough > 6 months without cleaning up state directory

What is the current bug behavior?

guards.json is not updated and arti stops working.

What is the expected behavior?

Periodically prune old guards and replace with active ones.

Environment

arti --version

Arti 1.4.2
using runtime: TokioNativeTlsRuntime { .. }
optional features: journald

OS: Archlinux

Relevant logs and/or screenshots:

see above

Possible fixes: