Opened 8 years ago

Closed 8 years ago

#7259 closed defect (fixed)

Stem doesn't recognize the CONTROLLER purpose

Reported by: atagar Owned by: neena
Priority: Low Milestone:
Component: Archived/Stem Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Hi Ravi. I don't have a consistent repro but several dozen times now I've seen the following when running our integ tests...


test_authenticate                                            [SUCCESS]
test_enable_feature                                          [SUCCESS]
test_extendcircuit (requires online target)                  [SKIPPED]
test_from_port                                               [SUCCESS]
test_from_socket_file                                        [SUCCESS]
test_get_network_status                                      [SUCCESS]
test_get_network_statuses                                    [SUCCESS]
test_get_server_descriptor                                   [SUCCESS]
test_get_server_descriptors                                  [SUCCESS]
test_get_version                                             [SUCCESS]
test_getconf                                                 [SUCCESS]
test_getinfo                                                 [SUCCESS]
test_loadconf                                                [SUCCESS]
test_mapaddress (requires online target)                     [SKIPPED]
test_protocolinfo                                            [SUCCESS]
test_repurpose_circuit                                       [FAILURE]
test_saveconf                                                [SUCCESS]
test_set_conf                                                [SUCCESS]
test_signal                                                  [SUCCESS]

ERROR: test_repurpose_circuit
  File "/home/atagar/Desktop/stem/test/integ/control/", line 401, in test_repurpose_circuit
    controller.repurpose_circuit(circ_id, purpose)
  File "/home/atagar/Desktop/stem/stem/", line 1216, in repurpose_circuit
    raise stem.socket.InvalidRequest(response.code, response.message)
InvalidRequest: Unknown purpose "purpose=CONTROLLER"

Ran 19 tests in 9.026s

Mind checking to see if we're missing a response that the spec allows for, or if this is a miss with the spec?

Child Tickets

Change History (2)

comment:1 Changed 8 years ago by neena

I'm running Tor version (git-f1f16882e345cd4c)

comment:2 Changed 8 years ago by atagar

Resolution: fixed
Status: newclosed

This might or might not be fixed. Regardless, we're unlikely to encounter it much more until we perform automated test runs with the ONLINE target. Resolving - as discussed I'll reopen or file another ticket down the road if the is still an issue.

11:12 < neena> atagar: re: #7259, I can't reproduce it. I can't think of what could be going wrong 
               there. I'll probably take a look at tor's source to see if anything wrong is 
               happening there.
11:13 < neena> and, how are controller circuits different from general ones?
11:13 < atagar> Maybe try running that specific test in a 'for i in xrange(10000):' loop in case 
                it's transient?
11:13 < atagar> I haven't a clue. I haven't looked into it much yet.
11:14 < neena> atagar: Hmm, I'll try that.
12:28 < atagar> neena: One thought on #7259 is that maybe the test should try to call 
                repurpose_circuit() on every circuit? That might get more reliable behavior in case 
                different circuit ids behave differently.
12:28 < atagar> I can only repro this on occasion too.
12:32 < atagar> neena: Alternatively maybe the repurpose_circuit() test should get two circuit ids 
                so it can call repurpose with both 'CONTROLLER' and 'GENERAL'. As it is the 
                inconsistent repro could be because our first circuit usually has 
                'PURPOSE=CONTROLLER', causing us to usually pick GENERAL.
12:34 < neena> atagar: I wrote it a little differently and tested it. By creating a new circuit for 
               testing But that 
               didn't fail
12:52 < atagar> I like that test better. The require_online() would mean that I wouldn't encounter 
                it any longer (since I usually run with the default targets) - is that needed for 
                new_circuit() to work?
13:06 < neena> atagar: Yeah. I like this test better too. The last one checked if circuit-status 
               was blank before checking if we were online (I'm assuming we do not have any circuit 
               to repurpose if we are offline). Want to merge this?
13:22 < atagar> Merged and pushed. I'm a little worried that we still have the issue but we just 
                won't encounter it since ONLINE isn't a target by default. Mind dropping that 
                requirement and seeing if it works when offline?
13:25 < neena> creating a new circuit definitely won't work when offline. It fails with "551 
               Couldn't start circuit"
13:26 < atagar> Ahhh. Oh well.
13:43 < atagar> neena: Feel free to resolve #7259. I'll look into it more and cut another ticket if 
                we run into it more down the road.
Note: See TracTickets for help on using tickets.