Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#63853 closed defect (invalid)

python27 2.7.18_4 openssl3 build failure

Reported by: blair (Blair Zajac) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port:

Description

On Monterey 12.0.1:

0:01:01 load avg: 5.92 [138/400] test_format
0:01:01 load avg: 5.92 [139/400] test_fpformat
0:01:01 load avg: 5.92 [140/400] test_fractions
0:01:01 load avg: 5.92 [141/400] test_frozen
0:01:01 load avg: 5.92 [142/400] test_ftplib
Exception in thread Thread-213:
Traceback (most recent call last):
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/test/test_ftplib.py", line 245, in run
    asyncore.loop(timeout=0.1, count=1)
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/asyncore.py", line 220, in loop
    poll_fun(timeout, map)
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/asyncore.py", line 156, in poll
    read(obj)
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/asyncore.py", line 87, in read
    obj.handle_error()
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/asyncore.py", line 83, in read
    obj.handle_read_event()
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/test/test_ftplib.py", line 331, in handle_read_event
    super(SSLConnection, self).handle_read_event()
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/asyncore.py", line 449, in handle_read_event
    self.handle_read()
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/asynchat.py", line 119, in handle_read
    self.handle_error()
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/asynchat.py", line 115, in handle_read
    data = self.recv (self.ac_in_buffer_size)
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/test/test_ftplib.py", line 353, in recv
    return super(SSLConnection, self).recv(buffer_size)
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/asyncore.py", line 387, in recv
    data = self.socket.recv(buffer_size)
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/ssl.py", line 754, in recv
    return self.read(buflen)
  File "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_python27/python27/work/Python-2.7.18/Lib/ssl.py", line 641, in read
    v = self._sslobj.read(len)
SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading (_ssl.c:1946)

The KRB5_S_TKT_NYV looks odd. Looking at https://bugs.python.org/issue43788 I think we need to update the code with a patch similar to https://github.com/python/cpython/commit/299ae9c7a2a169d54921815b9bb41a8f9277a3aa. If I do this myself, then the error becomes

    v = self._sslobj.read(len)
SSLError: [SSL: UNEXPECTED_EOF_WHILE_READING] unexpected eof while reading (_ssl.c:1952)

which looks like a much better error code.

Change History (5)

comment:2 Changed 2 years ago by blair (Blair Zajac)

I just updated to the HEAD in git and I'm getting the same error.

comment:3 Changed 2 years ago by blair (Blair Zajac)

Resolution: invalid
Status: newclosed

Turns out if I leave the command running long enough the build continues. Can you try a build and see if the testing phase takes a while for you?

comment:4 Changed 2 years ago by jmroot (Joshua Root)

Building with +optimizations always takes quite a while. The python ports have been reverted to openssl 1.1 for other reasons though.

comment:5 Changed 2 years ago by blair (Blair Zajac)

It's that one failing unit test that takes a while to finish with openssl3.

Note: See TracTickets for help on using tickets.