Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: large message transfer fails #69

Open
jgehrcke opened this issue Oct 4, 2018 · 0 comments
Open

Windows: large message transfer fails #69

jgehrcke opened this issue Oct 4, 2018 · 0 comments
Labels
bug Win32 Affects Windows

Comments

@jgehrcke
Copy link
Owner

jgehrcke commented Oct 4, 2018

python examples/raw_largemsg_bench.py
181003-15:59:30.050 INFO: Creating data ...
181003-15:59:32.034 INFO: Data size: 762.939453125 MBytes
181003-15:59:33.800 INFO: Test with raw pipe...
181003-15:59:34.582 INFO: Sending data
Traceback (most recent call last):
  File "C:\Python36-x64\lib\site-packages\gevent\threadpool.py", line 281, in _worker
    value = func(*args, **kwargs)
OSError: [Errno 22] Invalid argument
2018-10-03T15:59:35Z (<ThreadPool at 0xca080a6828 0/1/10 hub=<Hub at 0xca08029240 thread_ident=0x2252>>, <built-in function write>) failed with OSError
Process _GProcess-1:
Traceback (most recent call last):
  File "C:\Python36-x64\lib\multiprocessing\process.py", line 258, in _bootstrap
    self.run()
  File "C:\Python36-x64\lib\multiprocessing\process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Python36-x64\lib\site-packages\gipc\gipc.py", line 375, in _child
    target(*args, **kwargs)
  File "C:\projects\gipc\examples\raw_largemsg_bench.py", line 96, in child
    data = childhandler.get()
  File "C:\Python36-x64\lib\site-packages\gipc\gipc.py", line 915, in get
    bindata = self._recv_in_buffer(msize).getvalue()
  File "C:\Python36-x64\lib\site-packages\gipc\gipc.py", line 869, in _recv_in_buffer
    "Most likely, the other pipe end is closed.")
EOFError: Most likely, the other pipe end is closed.
Traceback (most recent call last):
  File "examples/raw_largemsg_bench.py", line 103, in <module>
    main()
  File "examples/raw_largemsg_bench.py", line 66, in main
    spawn_child_transfer(c, p, data, checksum)
  File "examples/raw_largemsg_bench.py", line 80, in spawn_child_transfer
    parenthandler.put(data)
  File "C:\Python36-x64\lib\site-packages\gipc\gipc.py", line 990, in put
    self._write(struct.pack("!i", len(bindata)) + bindata)
  File "C:\Python36-x64\lib\site-packages\gipc\gipc.py", line 958, in _write
    bytes_written = _write_nonblocking(self._fd, bindata)
  File "C:\Python36-x64\lib\site-packages\gevent\os.py", line 165, in tp_write
    return get_hub().threadpool.apply(_write, (fd, buf))
  File "C:\Python36-x64\lib\site-packages\gevent\pool.py", line 159, in apply
    return self.spawn(func, *args, **kwds).get()
  File "src\gevent\event.py", line 381, in gevent._event.AsyncResult.get
  File "src\gevent\event.py", line 409, in gevent._event.AsyncResult.get
  File "src\gevent\event.py", line 399, in gevent._event.AsyncResult.get
  File "src\gevent\event.py", line 379, in gevent._event.AsyncResult._raise_exception
  File "C:\Python36-x64\lib\site-packages\gevent\_compat.py", line 47, in reraise
    raise value.with_traceback(tb)
  File "C:\Python36-x64\lib\site-packages\gevent\threadpool.py", line 281, in _worker
    value = func(*args, **kwargs)
OSError: [Errno 22] Invalid argument

This is fixed by transmitting much less than 700 MB. This is surprising. gipc can however surely work around that by sending chunks on Windows.

@jgehrcke jgehrcke added bug Win32 Affects Windows labels Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Win32 Affects Windows
Projects
None yet
Development

No branches or pull requests

1 participant