Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#3216 closed defect (fixed)

OrPort auto Errors on Start

Reported by: BarkerJr Owned by: nickm
Priority: High Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version: Tor: 0.2.2.27-beta
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When starting up, tor fails to create a valid descriptor, because at that point OrPort is zero.

Child Tickets

Attachments (5)

error.txt (3.8 KB) - added by BarkerJr 8 years ago.
torrc.txt (8.1 KB) - added by BarkerJr 8 years ago.
notices.log (5.6 KB) - added by BarkerJr 8 years ago.
0002-Don-t-try-to-build-descriptors-when-router_get_adver.patch (4.0 KB) - added by nickm 8 years ago.
0001-Don-t-build-descriptors-if-ORPort-auto-is-set-and-we.patch (1.7 KB) - added by nickm 8 years ago.

Download all attachments as: .zip

Change History (23)

comment:1 Changed 8 years ago by BarkerJr

Component: - Select a componentTor Relay

comment:2 Changed 8 years ago by nickm

Milestone: Tor: 0.2.2.x-final
Priority: normalmajor

comment:3 Changed 8 years ago by nickm

Owner: set to nickm
Status: newaccepted

Changed 8 years ago by BarkerJr

Attachment: error.txt added

Changed 8 years ago by BarkerJr

Attachment: torrc.txt added

comment:4 Changed 8 years ago by nickm

03:02 < nickm> Going offline for dinner here... I think the answer is to check 
               router_get_advertised_or_port() in some function .. maybe 
               check_whether_orport_reachable() or decide_if_publishable_server 
               or something.

Also, is this really crashing? I don't see anything in the code that would actually make the process exit because of this.

comment:5 Changed 8 years ago by BarkerJr

You're right. It's just endless looping spewing errors in the logs.

comment:6 Changed 8 years ago by nickm

What do the "opening OR listener" messages say? Mine say

May 17 20:40:28.440 [notice] Opening OR listener on 0.0.0.0:0
May 17 20:40:28.440 [notice] OR listener listening on port 55293.
May 17 20:40:28.440 [notice] Opening Socks listener on 127.0.0.1:9050

Do you have those? And do they appear before or after the complaints about the descriptor?

comment:7 Changed 8 years ago by BarkerJr

I don't have any of those. Accounting.

comment:8 Changed 8 years ago by nickm

Status: acceptedneeds_review

Aha. You haven't opened an OR port because of accounting, so it can't build a descriptor because it doesn't know which ORPort to say.

Possible fix in branch bug3216 in my public repository. Needs testing and review. Arma, if you believe in it, and BarkerJr confirms that it works, feel free to merge.

comment:9 in reply to:  8 Changed 8 years ago by BarkerJr

Summary: OrPort auto Abends on StartOrPort auto Errors on Start
Version: Tor: 0.2.2.27-beta

That fix isn't working for me. It's still the same.

comment:10 Changed 8 years ago by nickm

That's surprising! Can you post the error part of the log from the code running with the patch?

Changed 8 years ago by BarkerJr

Attachment: notices.log added

comment:11 Changed 8 years ago by nickm

Okay; uploading another patch to apply on top of the first one. I think *this* one should do it.

comment:12 Changed 8 years ago by nickm

(Patch 0001 is the one you already have; 0002 is the new one. This is also in git in branch "bug3216" in my public repository.)

comment:13 Changed 8 years ago by Sebastian

There are two issues here, first you might want to rebase your branch onto the current maint-0.2.2, because that one fixes a compile issue in 0.2.2.27, but then you need a parameter for mark_my_descriptor_dirty(). I've pushed a bug3216 branch with a fixup commit to my repository that takes care of both the rebase and the argument change for mark_my_descriptor_dirty().

comment:14 Changed 8 years ago by nickm

comment:15 Changed 8 years ago by arma

These two patches look fine.

(I never reviewed the initial 'orport auto' stuff, and just now looked over it briefly; so I'm probably not the best person to review this one either.)

comment:16 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Hm. Not a hugely ringing endorsement, but I'll take it. Merging this. Please reopen if the bug isn't fixed in 0.2.2.28-beta.

comment:17 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:18 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.