Title: ListProxy with EventProxy in caused FileNotFoundError: [Errno 2] No such file or directory problem
Type: crash Stage:
Components: Versions: Python 3.6
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: show-me-code
Priority: normal Keywords:

Created on 2021-02-19 08:55 by show-me-code, last changed 2021-02-19 09:02 by show-me-code.

File name Uploaded Description Edit show-me-code, 2021-02-19 08:55 this is the server file which initize list show-me-code, 2021-02-19 08:56 client file which use list created in server
Messages (1)
msg387295 - (view) Author: Tobiichi (show-me-code) Date: 2021-02-19 08:55
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 "", line 30, in <module>
  File "", 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/", line 819, in _callmethod
    kind, result = conn.recv()
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/", line 251, in recv
    return _ForkingPickler.loads(buf.getbuffer())
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/", line 943, in RebuildProxy
    return func(token, serializer, incref=incref, **kwds)
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/", line 793, in __init__
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/", line 847, in _incref
    conn = self._Client(self._token.address, authkey=self._authkey)
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/", line 492, in Client
    c = SocketClient(address)
  File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/", line 620, in SocketClient

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.__init__(address=(host, port), authkey=key)
    return manager

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

if __name__=='__main__':
    manager = mp.Manager()
    manager = start_client(manager, '', 5000, b'abc')
Date User Action Args
2021-02-19 09:02:16show-me-codesettitle: Nested EventProxy in ListProxy cause FileNotFoundError: [Errno 2] No such file or directory problem -> ListProxy with EventProxy in caused FileNotFoundError: [Errno 2] No such file or directory problem
2021-02-19 08:56:44show-me-codesetfiles: +
2021-02-19 08:55:42show-me-codecreate