s3ql crashes with .SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:600)

Issue #297 duplicate
Roger Gammans
created an issue

This is happening reliably during while heavy transaction load with 2.26; 2.25 was (more) stable . I have reverted locally to 2.25 to see if it improves.

Full backtrace

mount.s3ql[9369:Thread-17] s3ql.backends.s3c._parse_xml_response: Server did not provide Content-Type, assuming XML
mount.s3ql[9369:Thread-14] s3ql.backends.s3c._parse_xml_response: Server did not provide Content-Type, assuming XML
mount.s3ql[9369:Thread-20] s3ql.backends.s3c._parse_xml_response: Server did not provide Content-Type, assuming XML
mount.s3ql[9369:Thread-9] s3ql.backends.common.wrapped: Encountered SSLError ([SSL: BAD_WRITE_RETRY] bad write retry (_ssl.c:1638)), retrying ObjectW.close (attempt 3)...
mount.s3ql[9369:Thread-9] root.excepthook: Uncaught top-level exception:
Traceback (most recent call last):
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/mount.py", line 64, in run_with_except_hook
    run_old(*args, **kw)
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/block_cache.py", line 409, in _upload_loop
    self._do_upload(*tmp)
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/block_cache.py", line 436, in _do_upload
    % obj_id).get_obj_size()
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/backends/common.py", line 108, in wrapped
    return method(*a, **kw)
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/backends/common.py", line 340, in perform_write
    return fn(fh)
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/backends/comprenc.py", line 346, in __exit__
    self.close()
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/backends/comprenc.py", line 340, in close
    self.fh.close()
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/backends/comprenc.py", line 505, in close
    self.fh.close()
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/backends/common.py", line 108, in wrapped
    return method(*a, **kw)
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/backends/s3c.py", line 925, in close
    headers=self.headers, body=self.fh)
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/backends/s3c.py", line 476, in _do_request
    query_string=query_string, body=body)
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/backends/s3c.py", line 714, in _send_request
    headers=headers, body=BodyFollowing(body_len))
  File "$ENVPATH/lib/python3.4/site-packages/dugong/__init__.py", line 570, in send_request
    self.timeout)
  File "$ENVPATH/lib/python3.4/site-packages/dugong/__init__.py", line 1499, in eval_coroutine
    if not next(crt).poll(timeout=timeout):
  File "$ENVPATH/lib/python3.4/site-packages/dugong/__init__.py", line 597, in co_send_request
    self.connect()
  File "$ENVPATH/lib/python3.4/site-packages/dugong/__init__.py", line 503, in connect
    self._sock = self.ssl_context.wrap_socket(self._sock, server_hostname=server_hostname)
  File "/usr/lib/python3.4/ssl.py", line 364, in wrap_socket
    _context=self)
  File "/usr/lib/python3.4/ssl.py", line 577, in __init__
    self.do_handshake()
  File "/usr/lib/python3.4/ssl.py", line 804, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:600)
mount.s3ql[9369:MainThread] s3ql.mount.unmount: Unmounting file system...
mount.s3ql[9369:MainThread] root.excepthook: Uncaught top-level exception:
Traceback (most recent call last):
  File "$ENVPATH/bin/mount.s3ql", line 9, in <module>
    load_entry_point('s3ql==2.26', 'console_scripts', 'mount.s3ql')()
  File "$ENVPATH/lib/python3.4/site-packages/s3ql-2.26-py3.4-linux-x86_64.egg/s3ql/mount.py", line 217, in main
    raise RuntimeError('Received signal %d, terminating' % (ret,))
RuntimeError: Received signal 15, terminating

Comments (2)

  1. Nikolaus Rath repo owner

    Thanks for the report! I believe this is another manifestation of issue #252. Figuring out which SSL errors may be encountered, and which one should be handled by retrying is unfortunately very difficult with the Python SSL module. In the long term, we can hopefully move to a different SSL implementation...

  2. Log in to comment