Opened 6 weeks ago

Last modified 9 hours ago

#30235 assigned defect

Tor hangs when asked to change DisableAllSwap over the control port

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor Version: Tor: 0.2.4.8-alpha
Severity: Normal Keywords: tor-ci-fail-sometimes
Cc: nickm, catalyst Actual Points: 0.2
Parent ID: #29437 Points: 1
Reviewer: Sponsor:

Description (last modified by teor)

    self.assertRaisesWith(stem.InvalidArguments, "DisableAllSwap, User cannot be changed while tor's running", controller.set_options, {'User': 'atagar', 'DisableAllSwap': '1'})

or

  File "/home/travis/build/tlyu/tor/stem/test/integ/control/controller.py", line 793, in test_set_conf_when_immutable
    self.assertRaisesWith(stem.InvalidArguments, "DisableAllSwap cannot be changed while tor's running", controller.set_conf, 'DisableAllSwap', '1')

We don't know why, because we don't have the tor logs or backtrace (#30234).

Child Tickets

Change History (9)

comment:1 Changed 6 weeks ago by atagar

Status: newneeds_information

Hi teor. Does this assertion failure consistently repro? If so then please tell me the tor commit id I should test against and I'll give this a whirl.

comment:2 in reply to:  1 Changed 5 weeks ago by teor

Component: Core Tor/StemCore Tor/Tor
Owner: atagar deleted
Status: needs_informationassigned

Replying to atagar:

Hi teor. Does this assertion failure consistently repro? If so then please tell me the tor commit id I should test against and I'll give this a whirl.

No, it doesn't, unfortunately.

So far, we've only been able to reproduce it in Travis, in about 1/10 builds:
https://travis-ci.org/torproject/tor/jobs/521109187#L3568

But I think it's probably a Tor bug, so I'll move it to that component.

comment:3 Changed 5 weeks ago by teor

The failure doesn't happen all the time, but when it does, it's in the same place:

    self.assertRaisesWith(stem.InvalidArguments, "DisableAllSwap, User cannot be changed while tor's running", controller.set_options, {'User': 'atagar', 'DisableAllSwap': '1'})

https://travis-ci.org/torproject/tor/jobs/521109187#L3568https://travis-ci.org/torproject/tor/jobs/521109187#L3568

I wonder if:

  • Tor successfully does DisableAllSwap?
  • Switching to User atagar succeeds? (It shouldn't: that user doesn't exist in Travis)

I also wonder if there's some race condition between Tor and stem.

comment:4 Changed 5 weeks ago by teor

Actual Points: 0.2
Description: modified (diff)
Summary: Tor hangs when asked to change User and DisableAllSwap over the control portTor hangs when asked to change DisableAllSwap over the control port

DisableAllSwap causes this error by itself:

  File "/home/travis/build/tlyu/tor/stem/test/integ/control/controller.py", line 793, in test_set_conf_when_immutable
    self.assertRaisesWith(stem.InvalidArguments, "DisableAllSwap cannot be changed while tor's running", controller.set_conf, 'DisableAllSwap', '1')

https://travis-ci.org/tlyu/tor/jobs/521994718#L3565

comment:5 Changed 5 weeks ago by teor

Cc: nickm added

Nick might have some idea of what is going wrong here?

comment:6 Changed 4 weeks ago by catalyst

Cc: catalyst added

comment:7 Changed 3 days ago by teor

Do you think we should change tor so it rejects DisableAllSwap over the control port?

comment:8 in reply to:  7 Changed 9 hours ago by teor

Replying to teor:

Do you think we should change tor so it rejects DisableAllSwap over the control port?

Tor already rejects DisableAllSwap over the control port.

comment:9 Changed 9 hours ago by nickm

To be specific, Tor rejects all changes to DisableAllSwap while it is running.

Note: See TracTickets for help on using tickets.