Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#3942 closed defect (fixed)

Tor client "Decided to publish new relay descriptor"

Reported by: fk Owned by:
Priority: Low Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version: Tor: 0.2.3.3-alpha
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When logging at info level, my Tor client informs be about once per minute that it decided to publish a relay descriptor:

fk@r500 ~ $grep 'Decided to publish new relay' /usr/jails/tor-jail/usr/local/var/log/tor/info.log | tail
Sep 06 22:42:16.255 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor
Sep 06 22:43:17.256 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor
Sep 06 22:44:18.256 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor
Sep 06 22:45:19.255 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor
Sep 06 22:46:20.256 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor
Sep 06 22:47:21.256 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor
Sep 06 22:48:22.256 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor
Sep 06 22:49:23.254 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor
Sep 06 22:50:24.256 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor
Sep 06 22:51:25.256 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor

Given that it isn't actually a relay, that seems odd.

It's my impression that nothing actually gets published, though,
at least (when idle), the log looks like this:

Sep 06 22:56:30.255 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor
Sep 06 22:56:30.255 [info] {DIR} routerlist_remove_old_routers(): We have 2804 live routers and 0 old router descriptors.
Sep 06 22:57:31.255 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor
Sep 06 22:57:31.256 [info] {DIR} routerlist_remove_old_routers(): We have 2804 live routers and 0 old router descriptors.
Sep 06 22:58:32.256 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor
Sep 06 22:58:32.256 [info] {DIR} routerlist_remove_old_routers(): We have 2804 live routers and 0 old router descriptors.
Sep 06 22:59:33.256 [info] {OR} mark_my_descriptor_dirty(): Decided to publish new relay descriptor: time for new descriptor

No messages from router_pick_published_address(), which I see on actual relays.

Another reason is 'config change', but it appears a lot less frequently.

It looks like the messages started to appear with Tor 0.2.3.2-alpha,
but I only noticed them after the upgrade to 0.2.3.3-alpha.

I didn't get any such messages with Tor 0.2.3.1-alpha.

Child Tickets

Change History (9)

comment:1 Changed 7 years ago by arma

See also #3442, which was the same issue (I closed it as a duplicate).

This is just a cosmetic bug.

The fix is that non-relays shouldn't call mark_my_descriptor_dirty()

comment:2 in reply to:  1 Changed 7 years ago by nickm

Replying to arma:

The fix is that non-relays shouldn't call mark_my_descriptor_dirty()

Actually, there are 14 places where we call mark_my_descriptor_dirty: maybe instead we should have mark_my_descriptor_dirty just not take action when we're not a relay.

comment:3 in reply to:  description Changed 6 years ago by rransom

Replying to fk:

It looks like the messages started to appear with Tor 0.2.3.2-alpha,
but I only noticed them after the upgrade to 0.2.3.3-alpha.

I didn't get any such messages with Tor 0.2.3.1-alpha.

The log message emitted by mark_my_descriptor_dirty was added in commit b8ffb00cf1ddf4ff1b64335f8677d600a948fffc, first released in tor-0.2.2.28-beta and tor-0.2.3.2-alpha .

comment:4 Changed 6 years ago by nickm

Status: newneeds_review

See branch bug3942 in my public repo. Seems straightforward.

comment:5 in reply to:  4 Changed 6 years ago by rransom

Replying to nickm:

See branch bug3942 in my public repo. Seems straightforward.

Looks good!

comment:6 Changed 6 years ago by arma

It still marks the descriptor unclean, and sets desc_dirty_reason? Which means if we later mark our descriptor dirty for real, desc_dirty_reason will already be set to this reason?

I guess that's more a question about commit 3e3480d70: do we want the X-Desc-Gen-Reason header during upload to say the first reason we realized we wanted to rebuild the descriptor, or the most recent one?

comment:7 in reply to:  6 Changed 6 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Replying to arma:

It still marks the descriptor unclean, and sets desc_dirty_reason? Which means if we later mark our descriptor dirty for real, desc_dirty_reason will already be set to this reason?

Looks like it.

I guess that's more a question about commit 3e3480d70: do we want the X-Desc-Gen-Reason header during upload to say the first reason we realized we wanted to rebuild the descriptor, or the most recent one?

I don't feel too strongly there. I'm going to merge the bug3942 branch and close this ticket; please feel free to open a new one if you think this bears more investigation.

comment:8 Changed 6 years ago by nickm

Keywords: tor-client added

comment:9 Changed 6 years ago by nickm

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