zeromq / malamute

The ZeroMQ Enterprise Messaging Broker
Mozilla Public License 2.0
324 stars 77 forks source link

Properly handle pending stream traffic after client disconnect #303

Closed michal42 closed 6 years ago

michal42 commented 6 years ago

The current code inserts a one second delay in the hope that any pending stream traffic will be flushed before the client context is destroyed. Under heavy load, this may not work and we end up with a use-after-free in s_forward_stream_traffic(). Instead of relying on luck, do proper reference counting on the client contexts.

michal42 commented 6 years ago

check_zproject failed with

(zproject_python_cffi.gsl 404) Undefined expression: file.slurp (...)

I too observed this when trying to update zproject locally, attributed it to incorrect setup on my side and only called the zproto_server_c codec. Could somebody have a look into the above failure? I haven't changed anything in project.xml let alone something python related.

bluca commented 6 years ago

@vyskocilm I think it might be caused by https://github.com/zeromq/zproject/pull/1036 could you please have a quick look?