crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

Crossbar may sometimes stop handling requests #956

Closed agronholm closed 7 years ago

agronholm commented 7 years ago

This morning I found Crossbar in a broken state where it would leave requests in a pending state and spewing the following exception messages in the log, even for new connections.

Running via the 16.10 Community image.

2017-01-25T06:59:00+0000 [Router         15] Unhandled error in Deferred:
2017-01-25T06:59:00+0000 [Router         15]
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/crossbar/router/router.py", line 188, in process
    self._dealer.processCall(session, msg)
  File "/usr/local/lib/python3.5/site-packages/crossbar/router/dealer.py", line 457, in processCall
    txaio.add_callbacks(d, on_authorize_success, on_authorize_error)
  File "/usr/local/lib/python3.5/site-packages/txaio-2.5.2-py3.5.egg/txaio/tx.py", line 490, in add_callbacks
    future.addCallbacks(callback, errback)
  File "/usr/local/lib/python3.5/site-packages/twisted/internet/defer.py", line 306, in addCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/local/lib/python3.5/site-packages/twisted/internet/defer.py", line 649, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/local/lib/python3.5/site-packages/crossbar/router/dealer.py", line 440, in on_authorize_success
    self._call(session, call, registration, authorization)
  File "/usr/local/lib/python3.5/site-packages/crossbar/router/dealer.py", line 612, in _call
    self._router.send(callee, invocation)
  File "/usr/local/lib/python3.5/site-packages/crossbar/router/router.py", line 159, in send
    session._transport.send(msg)
builtins.AttributeError: 'NoneType' object has no attribute 'send'

So what could cause an active session's transport to become None?

rbenjami commented 7 years ago

I have the same problem, new or a solution to this crash?

samson84 commented 7 years ago

I had the same problem with the wampy.js javascript client.

I debugged the issue. This is happened for me, when client crashed silently, but the wamp router want to use a cached answer for an RPC invoke.

The wamp router restart solved the problem temporary.

But can be some cache handling issue in the router also, perhaps should empty the cache if a TCP level connection has been torn down non clean.

agronholm commented 7 years ago

Thanks!