Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#10405 closed defect (fixed)

Bug: Tried to open a socket with DisableNetwork set.

Reported by: arma Owned by:
Priority: Medium Milestone: Tor: 0.2.5.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-client
Cc: Sherief Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by Sherief)

$ src/or/tor bridge 128.31.0.34:9009 disablenetwork 1 usebridges 1
Dec 15 04:50:47.533 [notice] Tor v0.2.4.19 (git-e719d05fd296a9dd) running on Linux with Libevent 2.0.19-stable and OpenSSL 1.0.1e.
[...]
Dec 15 04:50:47.539 [notice] DisableNetwork is set. Tor will not make or accept
 non-control network connections. Shutting down all existing connections.
[...]
Dec 15 04:50:48.697 [notice] Bootstrapped 5%: Connecting to directory server. 
Dec 15 04:50:48.698 [warn] connection_connect(): Bug: Tried to open a socket with DisableNetwork set.
Dec 15 04:50:48.698 [warn] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (Network is unreachable; NOROUTE; count 1; recommendation warn)

Noticed because I had a bridge configured in my tbb3.0rc1 but TBB had failed to work on the last run, so it popped up the "connect or configure" dialog box but then it popped up the "Tor failed to establish a Tor network connection.\n\nNetwork is unreachable" error box right after.

Child Tickets

Change History (11)

comment:1 Changed 6 years ago by Sherief

Cc: Sherief added
Description: modified (diff)

Here is another log from TBB 3.5:

12/22/2013 17:34:09 PM.491 [NOTICE] Bootstrapped 5%: Connecting to directory server. 
12/22/2013 17:34:09 PM.494 [WARN] connection_connect(): Bug: Tried to open a socket with !DisableNetwork set. 
12/22/2013 17:34:09 PM.494 [WARN] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (Network is unreachable [WSAENETUNREACH ]; NOROUTE; count 1; recommendation warn) 
12/22/2013 17:37:42 PM.286 [WARN] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (Network is unreachable [WSAENETUNREACH ]; NOROUTE; count 2; recommendation warn) 
12/22/2013 17:37:42 PM.288 [WARN] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (Network is unreachable [WSAENETUNREACH ]; NOROUTE; count 3; recommendation warn) 
12/22/2013 17:49:08 PM.699 [WARN] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (Network is unreachable [WSAENETUNREACH ]; NOROUTE; count 4; recommendation warn) 
12/22/2013 17:49:08 PM.702 [WARN] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (Network is unreachable [WSAENETUNREACH ]; NOROUTE; count 5; recommendation warn) 
12/22/2013 17:49:08 PM.707 [WARN] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (Network is unreachable [WSAENETUNREACH ]; NOROUTE; count 6; recommendation warn) 
12/22/2013 17:49:42 PM.911 [NOTICE] !DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections. 
12/22/2013 17:49:42 PM.912 [WARN] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (Network is unreachable [WSAENETUNREACH ]; NOROUTE; count 7; recommendation warn) 
12/22/2013 17:49:50 PM.134 [WARN] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (Network is unreachable [WSAENETUNREACH ]; NOROUTE; count 8; recommendation warn) 
12/22/2013 17:49:50 PM.137 [WARN] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (Network is unreachable [WSAENETUNREACH ]; NOROUTE; count 9; recommendation warn) 
12/22/2013 17:49:50 PM.139 [NOTICE] !DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections. 
12/22/2013 17:49:50 PM.139 [NOTICE] !DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections. 
12/22/2013 17:49:50 PM.139 [NOTICE] Opening Socks listener on 127.0.0.1:9150 
12/22/2013 17:49:50 PM.141 [NOTICE] Bootstrapped 10%: Finishing handshake with directory server. 
12/22/2013 17:49:50 PM.143 [WARN] Problem bootstrapping. Stuck at 10%: Finishing handshake with directory server. (DONE; DONE; count 10; recommendation warn) 
12/22/2013 17:49:50 PM.144 [WARN] 1 connections have failed: 
12/22/2013 17:49:50 PM.145 [WARN]  1 connections died in state handshaking (TLS) with SSL state SSLv3 read finished A in HANDSHAKE 
12/22/2013 17:50:04 PM.705 [WARN] Problem bootstrapping. Stuck at 10%: Finishing handshake with directory server. (Connection timed out [WSAETIMEDOUT ]; TIMEOUT; count 11; recommendation warn) 
12/22/2013 17:50:04 PM.705 [WARN] 1 connections have failed: 
12/22/2013 17:50:04 PM.706 [WARN]  1 connections died in state handshaking (TLS) with SSL state SSLv3 read finished A in HANDSHAKE 
12/22/2013 17:50:08 PM.600 [WARN] Problem bootstrapping. Stuck at 10%: Finishing handshake with directory server. (Connection timed out [WSAETIMEDOUT ]; TIMEOUT; count 12; recommendation warn) 
12/22/2013 17:50:08 PM.600 [WARN] 2 connections have failed: 
12/22/2013 17:50:08 PM.610 [WARN]  1 connections died in state connect()ing with SSL state (No SSL object) 
12/22/2013 17:50:08 PM.620 [WARN]  1 connections died in state handshaking (TLS) with SSL state SSLv3 read finished A in HANDSHAKE 
12/22/2013 17:50:08 PM.640 [WARN] Problem bootstrapping. Stuck at 10%: Finishing handshake with directory server. (Connection timed out [WSAETIMEDOUT ]; TIMEOUT; count 13; recommendation warn) 
12/22/2013 17:50:08 PM.640 [WARN] 3 connections have failed: 
12/22/2013 17:50:08 PM.650 [WARN]  2 connections died in state connect()ing with SSL state (No SSL object) 
12/22/2013 17:50:08 PM.650 [WARN]  1 connections died in state handshaking (TLS) with SSL state SSLv3 read finished A in HANDSHAKE 
12/22/2013 17:50:08 PM.670 [NOTICE] Ignoring directory request, since no bridge nodes are available yet. 
12/22/2013 17:50:18 PM.877 [WARN] Problem bootstrapping. Stuck at 10%: Finishing handshake with directory server. (DONE; DONE; count 14; recommendation warn) 
12/22/2013 17:50:18 PM.878 [WARN] 5 connections have failed: 
12/22/2013 17:50:18 PM.879 [WARN]  3 connections died in state connect()ing with SSL state (No SSL object) 
12/22/2013 17:50:18 PM.880 [WARN]  2 connections died in state handshaking (TLS) with SSL state SSLv3 read finished A in HANDSHAKE 

Also, the user said he disabled his antivirus and firewall.

comment:2 Changed 5 years ago by nickm

Resolution: duplicate
Status: newclosed

Closing this as dup of #11200; that one has better repro instructions

comment:3 Changed 5 years ago by arma

Resolution: duplicate
Status: closedreopened

I think my bug remains, even after #11200 has been closed.

Reproduction instructions are at the top of the bug description:

$ tor usebridge 1 bridge 128.31.0.34:9009 disablenetwork 1

comment:4 Changed 5 years ago by arma

Milestone: Tor: 0.2.3.x-finalTor: 0.2.5.x-final

(moving to a milestone where it will get noticed and triaged)

comment:5 Changed 5 years ago by arma

Could it be because

  if (options->UseBridges)
    fetch_bridge_descriptors(options, now);

doesn't check for !options->DisableNetwork like the nearby checks do?

comment:6 Changed 5 years ago by arma

To be clear,

--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1246,7 +1246,7 @@ run_scheduled_events(time_t now)
       now + DESCRIPTOR_FAILURE_RESET_INTERVAL;
   }
 
-  if (options->UseBridges)
+  if (!options->DisableNetwork && options->UseBridges)
     fetch_bridge_descriptors(options, now);
 
   /* 1b. Every MAX_SSL_KEY_LIFETIME_INTERNAL seconds, we change our

fixes it for me.

comment:7 Changed 5 years ago by nickm

Status: reopenedneeds_review

That looks like a fine patch to me, if it fixes the bug for you. I'm thinking "no backport", since it's merely annoying.

comment:8 Changed 5 years ago by nickm

This still looks okay, but do you think that part of the the fix in #11965 might also be needed here? IOW, do we need to delay here if pt_proxies_configuration_pending is true?

comment:9 Changed 5 years ago by arma

We do not need to also check pt_proxies_configuration_pending() here, because it's checked at the top of fetch_bridge_descriptors() already.

That said, I wouldn't object to some refactoring here. :)

comment:10 Changed 5 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Applied this as dd0745d0663ed1988d159f1ef105df424f10c54a. Please send a patch if I said the wrong thing in the changes file.

comment:11 Changed 5 years ago by arma

I modified the changes file in-place. Thanks!

Note: See TracTickets for help on using tickets.