Package: tor
Severity: normal

Dear maintainer,

Tor fails to start a few times before succeeding to start. This is likely because the tor@default.service systemd unit does not wait for 'network.target.'

symptom:
[FAILED] to start Anonymizing overlay network for TCP

This only started happening recently.

Likely caused by this:

https://gitlab.torproject.org/tpo/core/debian/tor/-/commit/46e6de4646204a8b81d15a30d2f7045dfa38b8a8

related changelog entry:

> tor (0.4.7.12-1) unstable; urgency=medium
>
>   * New upstream version.
>   * Put tor services after network-online.target instead of after
>     network.target (re: tpo/core/tor#40679).

related upstream ticket:

https://gitlab.torproject.org/tpo/core/tor/-/issues/40679

Using (only) 'After=network-online.target' might not work. Previous version using 'After=network.target' worked better.

Also as per https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ using 'network-online.target' seems wrong. Relevant quotes:

> network-online.target

> network-online.target is a target that actively waits until the nework is "up", where the definition of "up" is defined by the network management software.

And the network management software ifupdown in my case might not define this.

> It is an active target, meaning that is may be pulled in by the services requiring the network to be up, but is not pulled in by the network management service itself.

> Note that normally, if no service requires it, and if no remote mount point is configured this target is not pulled into the boot,

And I guess no service is using 'Requires=network-online.target'.

But the most convincing quote is

> It is strongly recommended not to pull in this target too liberally: for example network server software should generally not pull this in (since server software generally is happy to accept local connections even before any routable network interface is up), its primary purpose is network client software that cannot operate without network.

In summary, could you please preferably revert this change if intending to keep it change from:

> After=network-online.target nss-lookup.target

to

> After=network-online.target network.target nss-lookup.target

?

Kind regards,
Patrick

Reply via email to