That isn’t the backtrace or error message for the initial error but one that would appear to be the one on the other end after the initial error happened or so.
At any rate, the original message seems to be a bug of Python < 3.8 handling large objects badly when it communicates between the processing:

  
      github.com
  
  
    python/cpython/blob/master/Lib/multiprocessing/connection.py#L392 15

            if remaining == size:
                raise EOFError
            else:
                raise OSError("got end of file during message")
        buf.write(chunk)
        remaining -= n
    return buf


def _send_bytes(self, buf):
    n = len(buf)
    if n > 0x7fffffff:
        pre_header = struct.pack("!i", -1)
        header = struct.pack("!Q", n)
        self._send(pre_header)
        self._send(header)
        self._send(buf)
    else:
        # For wire compatibility with 3.7 and lower
        header = struct.pack("!i", n)
        if n > 16384:
            # The payload is large so Nagle's algorithm won't be triggered



  
  
    
    
  
  


Of course, that you do things send that large, chances are that something is amiss with what your program does for multiprocessing. Is something (i.e. another library) keeping you from using PyTorch’s multiprocessing wrapper 21?
Best regards
Thomas