Opened 5 years ago

Last modified 3 months ago

#13800 new defect

circuit does not close after hidden service is shutdown via control port

Reported by: dawuud Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs hs-shutdown
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Using the tor control port i create my tor hidden service like this:

SETCONF hiddenservicedir=/var/lib/tor-alpha-hidden-services/hiddenService01 hiddenserviceport="80"

I then create a connection to that hidden service... and afterwards remove it like this:

SETCONF hiddenservicedir=/var/lib/tor-alpha-hidden-services/hiddenService01

Even after this hidden service is removed from the tor process additional connection attempts to that same onion result in these log messages:

Nov 21 04:11:47.000 [info] connection_exit_begin_conn(): begin is for rendezvous. configuring stream.
Nov 21 04:11:47.000 [warn] Couldn't find any service associated with pk e5p437qubbddgwa6 on rendezvous circuit 4216977301; closing.
Nov 21 04:11:47.000 [info] connection_exit_begin_conn(): Didn't find rendezvous service (port 80)

I also noticed that sending the tor process a sig HUP stopped this behavior fairly soon... but I was still able to produce these log messages for a little while.

Child Tickets

Change History (6)

comment:1 Changed 5 years ago by dawuud

This behavior seems non-optimal but I'm not sure if this is a bug...
the large circuit id seems strange...
and is it really a rendezvous circuit?

I'm relatively new to looking at tor's source code... Can someone point me to the relevant areas of code to track this down?

I was testing with upstream master tor commit 126f220071b2313147240b585df6893d21943021

comment:2 Changed 5 years ago by nickm

Milestone: Tor: 0.2.6.x-final

Hm. The list of hidden services and introduction points is maintained in rendservice.c; the code that handles transitions in options is in options_act() in config.c. I don't know whether we're got a function that handles closed hidden services or not.

comment:3 Changed 5 years ago by nickm

I'm told this could be a duplicate of #4857

comment:4 Changed 4 years ago by nickm

Milestone: Tor: 0.2.6.x-finalTor: unspecified

comment:5 Changed 2 years ago by nickm

Keywords: tor-hs hs-shutdown added
Severity: Normal

comment:6 Changed 3 months ago by arma

Agreed, this looks like the same issue as #4857.

We should leave existing streams open when we change our config to no longer offer an onion service. This is the same choice as when we change our exit policy, we don't cut existing streams that go to destinations we just changed our mind about.

The only thing we might do here is change the log message. But I think it's actually fine as it is.

I suggest closing this ticket as wontfix, and closing #4857 as a duplicate of this one.

Note: See TracTickets for help on using tickets.