Opened 4 months ago

Last modified 3 weeks ago

#23847 new enhancement

Make sure Tor can shut down via control port, and start again in same process

Reported by: hellais Owned by:
Priority: Medium Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-mobile, s8-api
Cc: darkk, brade, mcs, ahf, nickm, mike@…, arthuredelstein, cretz Actual Points:
Parent ID: #23684 Points:
Reviewer: Sponsor: Sponsor8

Description

In order to stop tor and restart it cleanly, we would need a tor control port command to tell it to stop and cleanup all it's state so we can call the tor main again.

This involves ensuring that all static variables are properly reset and cleanup is done correctly.

Having good integration tests can go a long ways in ensuring that nothing breaks here.

Child Tickets

TicketTypeStatusOwnerSummary
#24581defectclosednickmDon't crash when restarting Tor in the same process
#24583enhancementclosednickmMake it easy to debug restart-in-process
#24584defectclosednickmFix memory-leaked event_base_once() users.
#24586defectnewAudit all state for stuff we need to reset on exit to make tor restartable.
#24587defectmerge_readynickmReset bootstrapping state on shutdown

Change History (7)

comment:1 Changed 4 months ago by mtigas

Cc: mike@… added

comment:2 Changed 4 months ago by arthuredelstein

Cc: arthuredelstein added

comment:3 Changed 4 months ago by nickm

This doesn't necessarily need to be a new command; it could also be new behavior for (say) "SIGNAL SHUTDOWN" or "SIGNAL HALT".

comment:4 Changed 4 months ago by nickm

Sponsor: Sponsor8

comment:5 Changed 4 months ago by nickm

Summary: Add shutdown command to Tor control portMake sure Tor can shut down via control port, and start again in same process

comment:6 Changed 4 months ago by ahf

Keywords: s8-api added

comment:7 Changed 3 weeks ago by cretz

Cc: cretz added
Note: See TracTickets for help on using tickets.