Opened 8 months ago

Last modified 8 months ago

#28449 new defect

Do we really need to run retry_listeners_callback so often?

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: mainloop
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

We run this function once a minute -- but, why? Do listeners really go away and need to be relaunched?

Child Tickets

Change History (2)

comment:1 Changed 8 months ago by dgoulet

Function comment says:

 * Periodic callback: Every 60 seconds, we relaunch listeners if any died. */

I'm not sure how a listener can die?... but let say the ORPort 443 does die for some obscure reasons (which I would assume something close() it), then even retrying to listen on 443 will fail because tor will in most cases have changed UID (setuid()).

Listeners can change within our torrc options (or control port) but we do retry them all explicitly.

Thus, I have _no_ clue why tor would retry to listen regularly... Is it something that Windows could do as in kill listener fd for weird reasons...?

I think that if such a thing would be possible, we should catch it in the poll() and then recover from there, not a callback that arbitrarily retries.

comment:2 Changed 8 months ago by dgoulet

Cc: dgoulet removed
Keywords: mainloop added
Note: See TracTickets for help on using tickets.