Issue2900

classification
Title: poll + POLLHUP causes AttributeError: 'SSLSocket' object has no attribute 'channel'
Type: Severity: normal
Components: Versions: Jython 2.7.1, Jython 2.7.2, Jython 2.7
Milestone:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: shane
Priority: Keywords:

Created on 2020-07-15.01:36:30 by shane, last changed 2020-07-15.01:40:16 by shane.

Messages
msg13106 (view) Author: Shane Harvey (shane) Date: 2020-07-15.01:36:30
Calling poll() on a SSLSocket registered with POLLHUP causes the following AttributeError: 'SSLSocket' object has no attribute 'channel'

  File "pymongo/socket_checker.py", line 57, in select
    res = self._poller.poll(timeout * 1000)
  File "/usr/local/Cellar/jython/2.7.2/libexec/Lib/_socket.py", line 592, in poll
    result = self._handle_poll(partial(self.queue.poll, timeout_in_ns, TimeUnit.NANOSECONDS))
  File "/usr/local/Cellar/jython/2.7.2/libexec/Lib/_socket.py", line 541, in _event_test
    fd, event = self._event_test(notification)
  File "/usr/local/Cellar/jython/2.7.2/libexec/Lib/_socket.py", line 541, in _event_test
    if mask & POLLHUP and (notification.hangup or not notification.sock.channel):
AttributeError: 'SSLSocket' object has no attribute 'channel'

I can reproduce this bug with Jython 2.7.0+2.7.1+2.7.2.
msg13108 (view) Author: Shane Harvey (shane) Date: 2020-07-15.01:40:16
See also https://jira.mongodb.org/browse/PYTHON-2320, where I discovered the impact of this bug in PyMongo.
History
Date User Action Args
2020-07-15 01:40:16shanesetmessages: + msg13108
2020-07-15 01:36:30shanecreate