StorjOld / pyp2p

http://storj.io
MIT License
168 stars 45 forks source link

Assertion error when running multiple farmers. #39

Open F483 opened 8 years ago

F483 commented 8 years ago
(env)bootstrap@bootstrap-eu01:~/storjnode$ python scripts/start_farmers.py
Starting farmer
2016-03-04 14:05:25,618 ERROR storjnode.api 83: AssertionError()
Traceback (most recent call last):
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/storjnode-0.1.2-py2.7.egg/storjnode/api.py", line 80, in _init_node
    config=self._cfg
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/storjnode-0.1.2-py2.7.egg/storjnode/network/node.py", line 122, in __init__
    network_id=self.network_id
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/pyp2p/dht_msg.py", line 83, in __init__
    assert(self.is_mutex_ready.is_set())
AssertionError
Traceback (most recent call last):
  File "scripts/start_farmers.py", line 70, in <module>
    main()
  File "scripts/start_farmers.py", line 53, in main
    node = storjnode.api.StorjNode(wallet=wallet, config=config)
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/storjnode-0.1.2-py2.7.egg/storjnode/api.py", line 43, in __init__
    self._init_node()
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/storjnode-0.1.2-py2.7.egg/storjnode/api.py", line 80, in _init_node
    config=self._cfg
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/storjnode-0.1.2-py2.7.egg/storjnode/network/node.py", line 122, in __init__
    network_id=self.network_id
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/pyp2p/dht_msg.py", line 83, in __init__
    assert(self.is_mutex_ready.is_set())
AssertionError
F483 commented 8 years ago

This may not matter to much as there are many farmers running in the same process, if there are in individual processes this may not be an issue.

However it should be fixed to make sure there are no bugs in other places caused by this.

F483 commented 8 years ago

Apperently I also get this when I start a single farmer.

(env)bootstrap@farmer-alice:~/storjnode$ storjnode --wallet=L2uQ3PbpeghVJBjRybEXGok6QVVv2MtP5coWZUC9H5kJ2bzRbTWH farm
2016-03-05 15:41:13,054 ERROR storjnode.api 83: AssertionError()
Traceback (most recent call last):
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/storjnode-0.1.2-py2.7.egg/storjnode/api.py", line 80, in _init_node
    config=self._cfg
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/storjnode-0.1.2-py2.7.egg/storjnode/network/node.py", line 122, in __init__
    network_id=self.network_id
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/pyp2p/dht_msg.py", line 83, in __init__
    assert(self.is_mutex_ready.is_set())
AssertionError
Traceback (most recent call last):
  File "/home/bootstrap/storjnode/env/bin/storjnode", line 4, in <module>
    __import__('pkg_resources').run_script('storjnode==0.1.2', 'storjnode')
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 726, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1484, in run_script
    exec(code, namespace, namespace)
  File "/home/bootstrap/storjnode/env/lib/python2.7/site-packages/storjnode-0.1.2-py2.7.egg/EGG-INFO/scripts/storjnode", line 22, in <module>
    apigen.run(storjnode.api.StorjNode)
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/apigen/apigen.py", line 252, in run
    instance = definition(**_pop_init_args(definition, kwargs))
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/storjnode-0.1.2-py2.7.egg/storjnode/api.py", line 43, in __init__
    self._init_node()
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/storjnode-0.1.2-py2.7.egg/storjnode/api.py", line 80, in _init_node
    config=self._cfg
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/storjnode-0.1.2-py2.7.egg/storjnode/network/node.py", line 122, in __init__
    network_id=self.network_id
  File "/home/bootstrap/storjnode/env/local/lib/python2.7/site-packages/pyp2p/dht_msg.py", line 83, in __init__
    assert(self.is_mutex_ready.is_set())
AssertionError
F483 commented 8 years ago

Could it have to do with one of the servers of yours that are required? When I look at the history of storjnode, I see the builds failing after I changed the default monitor interval but reverting it did not fix it. The latest pyp2p change also seems to be older which leads me to believe its no an issue with the code but something it depends on.