question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unhandled exception when closing ssl connection with SIGINT

See original GitHub issue

I use typical setup with

from autobahn.asyncio.component import Component, run

comp = Component(...)

run([comp])

where connection is over “wss://” protocol.

When hitting Ctrl+C (sending SIGINT) this is what happens:

^C2018-03-29T11:12:48 Shutting down due to SIGINT
2018-03-29T11:12:48 Fatal write error on socket transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f14e1c62978>
transport: <_SelectorSocketTransport fd=6>
Traceback (most recent call last):
  File "/usr/lib64/python3.6/asyncio/selector_events.py", line 761, in write
    n = self._sock.send(data)
OSError: [Errno 9] Bad file descriptor

2018-03-29T11:12:48 Fatal error on SSL transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f14e1c62978>
transport: <_SelectorSocketTransport closing fd=6>
Traceback (most recent call last):
  File "/usr/lib64/python3.6/asyncio/selector_events.py", line 761, in write
    n = self._sock.send(data)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/asyncio/sslproto.py", line 646, in _process_write_backlog
    self._transport.write(chunk)
  File "/usr/lib64/python3.6/asyncio/selector_events.py", line 765, in write
    self._fatal_error(exc, 'Fatal write error on socket transport')
  File "/usr/lib64/python3.6/asyncio/selector_events.py", line 645, in _fatal_error
    self._force_close(exc)
  File "/usr/lib64/python3.6/asyncio/selector_events.py", line 657, in _force_close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 574, in call_soon
    self._check_closed()
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 357, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
scravycommented, Oct 23, 2021
0reactions
oberstetcommented, Oct 24, 2021

Thanks for the info! so yeah, it’s an upstream issue (filed 2 days after my comment, so we couldn’t know)

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSL TCP SslStream Server throws unhandled exception ...
I'm trying to create a C# TCP server to receive TCP data with SslStream on a Windows 2008 server from a client (objective...
Read more >
After upgrading the SQL Server JDBC driver, connection ... - IBM
Cause. The exception is caused by the secured SSL connection the SQL Server which is requiring TLSv1. 2, but CPE server is issuing...
Read more >
HttpClient exception handling guide
This exception signals that HttpClient is unable to establish a connection with the target server or proxy server within the given period of...
Read more >
Process | Node.js v19.3.0 Documentation
Can either be 'uncaughtException' or 'unhandledRejection' . The latter is used when an exception happens in a Promise based async context (or if...
Read more >
Changelog — aiohttp 3.8.3 documentation
Fix keepalive connections not being closed in time #3296 ... Close session created inside aiohttp.request when unhandled exception occurs #3628.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found