Comment 27 for bug 2003835

Revision history for this message
Corey Bryant (corey.bryant) wrote :

@Jan, thanks for reaching out. Here is the strace output with the test1 package:

ubuntu@juju-c93656-zaza-8e11ec22ace2-0:~$ strace -e sendto,recvfrom python3 -c "import pymysql; cnx = pymysql.connect(host='127.0.0.1', port=3306, user='<masked>', password='<masked>'); cnx.query('DO 1')"
recvfrom(3, "`\0\0\0\n8.0.32-0buntu0.22.04.2~test"..., 8192, 0, NULL, NULL) = 100
sendto(3, "\227\0\0\1\5\242:\0\377\377\377\0-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 155, 0, NULL, 0) = 155
recvfrom(3, "\2\0\0\2\1\4", 8192, 0, NULL, NULL) = 6
sendto(3, "\1\0\0\3\2", 5, 0, NULL, 0) = 5
recvfrom(3, "\304\1\0\4\1-----BEGIN PUBLIC KEY-----\n"..., 8192, 0, NULL, NULL) = 456
sendto(3, "\0\1\0\5\0262;\2049p?\342\0046\302\255\251\"\341mE\36\251\272\365\370\250\306\340\236\242O"..., 260, 0, NULL, 0) = 260
recvfrom(3, "", 8192, 0, NULL, NULL) = 0
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 353, in __init__
    self.connect()
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 633, in connect
    self._request_authentication()
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 932, in _request_authentication
    auth_packet = _auth.caching_sha2_password_auth(self, auth_packet)
  File "/usr/lib/python3/dist-packages/pymysql/_auth.py", line 266, in caching_sha2_password_auth
    pkt = _roundtrip(conn, data)
  File "/usr/lib/python3/dist-packages/pymysql/_auth.py", line 120, in _roundtrip
    pkt = conn._read_packet()
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 692, in _read_packet
    packet_header = self._read_bytes(4)
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 748, in _read_bytes
    raise err.OperationalError(
pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query')
+++ exited with 1 +++