Skip to content

Conversation

@fantix
Copy link
Member

@fantix fantix commented Jul 3, 2018

UV_EOF is given to read_cb() on EOF, which causes an error like this:

Unexpected calls to loop.call_exception_handler():
[{'exception': RuntimeError('no python buffer is allocated in on_read; nread=-4095',),
  'message': 'Fatal error on transport UnixTransport',
  'protocol': <uvloop.loop.SSLProtocol object at 0x7f1749684630>,
  'transport': <UnixTransport closed=True reading=False 0x7f17496eb6c8>},
 {'exception': RuntimeError('no python buffer is allocated in on_read; nread=-4095',),
  'message': 'Fatal error on transport UnixTransport',
  'protocol': <uvloop.loop.SSLProtocol object at 0x7f1749650470>,
  'transport': <UnixTransport closed=True reading=False 0x7f1749643a08>}]
FAIL

======================================================================
FAIL: test_create_unix_connection_ssl_1 (tests.test_unix.Test_UV_UnixSSL)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/decentfox/uvloop/uvloop/_testbase.py", line 102, in tearDown
    self.fail('unexpected calls to loop.call_exception_handler()')
AssertionError: unexpected calls to loop.call_exception_handler()

This failing test was found in #176, but it was unstable. Let me try to make a stable test for this fix.

Related upstream issue: joyent/libuv#803

@fantix
Copy link
Member Author

fantix commented Jul 4, 2018

Added test - took some time to figure out how to reproduce the "EPOLLHUP with data" scenario. Now the test is stably failing without the fix.

@1st1 1st1 merged commit f9c4393 into MagicStack:master Jul 4, 2018
@1st1
Copy link
Member

1st1 commented Jul 4, 2018

Awesome, thanks!

@fantix fantix deleted the buffered_eof branch July 5, 2018 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants