#26150 closed defect (fixed)

legacy bridge filtering code in bridgedb is suddenly hitting errors

Reported by: isis Owned by: isis
Priority: Immediate Milestone:
Component: Circumvention/BridgeDB Version:
Severity: Normal Keywords: bridgedb-db
Cc: Actual Points:
Parent ID: Points: 1
Reviewer: Sponsor:

Description (last modified by isis)

18:11:46 DEBUG     L44:filters.bySubring()      Creating a filter for assigning bridges to subhashring 2-of-3...
18:11:46 DEBUG    L325:distributor.getBridges() Client request within time interval: 1526925600                                                                                             
18:11:46 DEBUG    L326:distributor.getBridges() Assigned client to subhashring 2/3
18:11:46 DEBUG    L327:distributor.getBridges() Assigned client to subhashring position: 726333b07ff8c62f7e44178f1b2153f28d953199                                    
18:11:46 DEBUG    L328:distributor.getBridges() Total bridges: 1540
18:11:46 DEBUG    L329:distributor.getBridges() Bridge filters: bySubring2of3 byIPv4()                                                                                          
18:11:46 DEBUG    L333:distributor.getBridges() Cache hit frozenset([<function bySubring2of3 at 0x7f267423dde8>, <function byIPv4() at 0x7f267727ce60>])
18:11:46 DEBUG    L269:distribute.bridgesPerR() Returning 3 bridges from ring of len: 508                    
18:11:46 DEBUG    L330:Bridges.getBridges()     Got duplicate bridge '72eaf88f51eaa96e2f4cab6fc360333b598ae19b' in main hashring for position '726333b07ff8c62f7e44178f1b2153f28d953199'.
18:11:46 DEBUG    L275:Bridges.filterDistinct() Got 7 possible bridges to filter
18:11:46 ERROR    L862:server.render()          'NoneType' object has no attribute 'version'      
Traceback (most recent call last):                                                                            
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/distributors/https/server.py", line 860, in render
    response = self.getBridgeRequestAnswer(request)                                            
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/distributors/https/server.py", line 904, in getBridgeRequestAnswer
    bridges = self.distributor.getBridges(bridgeRequest, interval)
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/distributors/https/distributor.py", line 345, in getBridges
    answer = ring.getBridges(position, returnNum, filterBySubnet=True)                                  
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/Bridges.py", line 334, in getBridges
    bridges = self.filterDistinctSubnets(keys)                                                                                                                                                                                      File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/Bridges.py", line 295, in filterDistinctSubnets                                                      if bridge.address.version == 4:
AttributeError: 'NoneType' object has no attribute 'version'                                      

Child Tickets

Change History (3)

comment:1 Changed 19 months ago by isis

Another similar error:

18:12:57 DEBUG    L325:distributor.getBridges() Client request within time interval: 1526925600                                                                            
18:12:57 DEBUG    L326:distributor.getBridges() Assigned client to subhashring 1/3                                         
18:12:57 DEBUG    L327:distributor.getBridges() Assigned client to subhashring position: 69107a415542eb9381ae06bd4f6defdcf75a03ce                                                        
18:12:57 DEBUG    L328:distributor.getBridges() Total bridges: 1540                                                          
18:12:57 DEBUG    L329:distributor.getBridges() Bridge filters: byTransportNotBlockedIn(None,de,4) bySubring1of3                                         
18:12:57 DEBUG    L333:distributor.getBridges() Cache hit frozenset([<function byTransportNotBlockedIn(None,de,4) at 0x7f267375aed8>, <function bySubring1of3 at 0x7f2678ee9668>])
18:12:57 DEBUG    L269:distribute.bridgesPerR() Returning 3 bridges from ring of len: 508                                                                                                         
18:12:57 DEBUG    L330:Bridges.getBridges()     Got duplicate bridge '69d52c45d370ad3ee685206c06c5683aff962d78' in main hashring for position '69107a415542eb9381ae06bd4f6defdcf75a03ce'.
18:12:57 DEBUG    L275:Bridges.filterDistinct() Got 7 possible bridges to filter                                              
18:12:57 ERROR    L862:server.render()          'NoneType' object has no attribute '_version'                                                                                                                                     Traceback (most recent call last):                                                                                                                                                                                                  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/distributors/https/server.py", line 860, in render
    response = self.getBridgeRequestAnswer(request)                                                                            
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/distributors/https/server.py", line 904, in getBridgeRequestAnswer                                   bridges = self.distributor.getBridges(bridgeRequest, interval)                                                                                                                                                                  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/distributors/https/distributor.py", line 345, in getBridges
    answer = ring.getBridges(position, returnNum, filterBySubnet=True)                                                      
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/Bridges.py", line 334, in getBridges
    bridges = self.filterDistinctSubnets(keys)                                                                                    
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/Bridges.py", line 284, in filterDistinctSubnets
    if bridge.address in subnet:                                                                                               
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/ipaddr.py", line 637, in __contains__                                         
    if self._version != other._version:                                                                                        
AttributeError: 'NoneType' object has no attribute '_version'                     

comment:2 Changed 19 months ago by isis

Description: modified (diff)

comment:3 Changed 19 months ago by isis

Resolution: fixed
Status: assignedclosed

Fixed in my bug25150 branch.

Oh also thanks to Tommy for pointing out the issue.

Note: See TracTickets for help on using tickets.