UnboundLocalError after receiving ZMQ corrupted message
See original GitHub issuePR 2120 introduced problem with wrong handling of ZMQ corrupted message what leads to: UnboundLocalError: local variable ‘client_id’ referenced before assignment.
locust-master: 2022-11-11T07:03:39.637+0000 |CRITICAL|locust.runners | Unhandled exception in greenlet: <Greenlet at 0x7fab1317dae0: <bound method MasterRunner.client_listener of <locust.runners.MasterRunner object at 0x7fab0767d580>>>
locust-master: Traceback (most recent call last):
locust-master: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/rpc/zmqrpc.py", line 44, in recv_from_client
locust-master: addr = data[0].decode()
locust-master: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x86 in position 9: invalid start byte
locust-master: The above exception was the direct cause of the following exception:
locust-master: Traceback (most recent call last):
locust-master: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/runners.py", line 960, in client_listener
locust-master: client_id, msg = self.server.recv_from_client()
locust-master: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/rpc/zmqrpc.py", line 46, in recv_from_client
locust-master: raise RPCReceiveError("ZMQ interrupted or corrupted message") from e
locust-master: locust.exception.RPCReceiveError: ZMQ interrupted or corrupted message
locust-master: During handling of the above exception, another exception occurred:
locust-master: Traceback (most recent call last):
locust-master: File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
locust-master: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/runners.py", line 962, in client_listener
locust-master: logger.error(f"RPCError when receiving from client: {e}. Will reset client {client_id}.")
locust-master: UnboundLocalError: local variable 'client_id' referenced before assignment
locust-master: <gevent._socket3.socket at 0x7fab12f7ac40 object, fd=19, family=2, type=1, proto=0>: Expected GET method: '\x16\x03\x01\x010\x01\x00\x01,\x03\x03\x9a.2ã*:ª\x86\x94\x91}Mbv1\x18¶\xa0HC\x80÷väRòM\x08&û!¯\x00\x00¬À0À,À(À$À\x14À\n
Locust: 2.10.1 Python: 3.9 OS: CentOS
Issue Analytics
- State:
- Created 10 months ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
Heap corruption receiving multi-part messages (ZMQ 4.2.3 ...
When I receive the messages from the same PUSH client (A) in a python program (D) on the same machine, the heap corruption...
Read more >ZeroMQ Message Corrupts Data - c++ - Stack Overflow
I'm sending a struct over a ZeroMQ connection. Two fields are correct, but one is corrupted. To illustrate the problem, my code tries...
Read more >CHANGES — oslo.messaging documentation
[zmq] Fix message sending when using proxy and not using PUB/SUB ... amqp: log time elapsed between receiving a message and replying; [zmq] ......
Read more >Bug #64836 for ZeroMQ: Message Corruption/Loss - CPAN.org
I have found I get a lot of corrupted messages and it looks like a race condition ... The subscriber should receive these...
Read more >Private apport-crashes - Testing tracker | Ubuntu QA
971370, gnome-shell crashed with SIGSEGV in magazine_chain_pop_head() after receiving the message, gnome-shell, Medium, New, 253.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for quick release!
That part of the code is the same