This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author show-me-code
Recipients show-me-code
Date 2021-02-19.08:55:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1613724942.01.0.259421151252.issue43264@roundup.psfhosted.org>
In-reply-to
Content
I append EventProxy into ListProxy like this:

```
l = manager.list([mp.Event() for _ in range(2)])
```

It works fine on a single node when I'm trying to get this listproxy. but when I trying to use multiple nodes across ethernet. it cause problem like this:

```
Traceback (most recent call last):
  File "client2.py", line 30, in <module>
    logic(manager)
  File "client2.py", line 18, in logic
    if l[i].is_set():
  File "<string>", line 2, in __getitem__
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/managers.py", line 819, in _callmethod
    kind, result = conn.recv()
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/connection.py", line 251, in recv
    return _ForkingPickler.loads(buf.getbuffer())
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/managers.py", line 943, in RebuildProxy
    return func(token, serializer, incref=incref, **kwds)
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/managers.py", line 793, in __init__
    self._incref()
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/managers.py", line 847, in _incref
    conn = self._Client(self._token.address, authkey=self._authkey)
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/connection.py", line 492, in Client
    c = SocketClient(address)
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/connection.py", line 620, in SocketClient
    s.connect(address)
```

Nest ListProxy will cause same problem. like 

```
l = manager.list([manager.list([1 for _ in range(2)])for _ in range(2)])
```

Client act like this (manager in torch is SyncManager):

```
import torch.multiprocessing as mp

mp.current_process().authkey = b'abc'

def start_client(manager, host, port, key):
    manager.register('get_list')
    manager.__init__(address=(host, port), authkey=key)
    manager.connect()
    return manager

def logic(manager):
    l = manager.get_list()
    for i in range(len(l)):
        if not l[i].is_set():
            l[i].set()
            print('set')

if __name__=='__main__':
    manager = mp.Manager()
    manager = start_client(manager, '127.0.0.1', 5000, b'abc')
    logic(manager)
```
History
Date User Action Args
2021-02-19 08:55:42show-me-codesetrecipients: + show-me-code
2021-02-19 08:55:42show-me-codesetmessageid: <1613724942.01.0.259421151252.issue43264@roundup.psfhosted.org>
2021-02-19 08:55:41show-me-codelinkissue43264 messages
2021-02-19 08:55:41show-me-codecreate