Skip to content

handle_close / ReceiveQueue race condition #1237

Open

Description

@PeterSurda

Came in bitmessage chan:

There is a race condition between the Asyncore thread and a ReceiveQueue thread where the Asyncore thread calls AdvancedDispatcher.handle_close (setting read_buf to an empty bytearray) between a ReceiveQueue thread ensuring the appropriate number of bytes in read_buf and calling the appropriate state_* method.


Hmm, I thought this was fixed. Let me check.

Peter

Hi all,

Off the top of your head, any suggestions about the error below? Is
it normal?

Bitmessage v.0.6 branch, Tor proxy, log level DEBUG.

May 03 09:56:31 Asyncore tcp.py@57 Outbound proxy connection to
85.114.135.102:8444
May 03 09:56:31 ReceiveQueue_0 receivequeuethread.py@60 Error
processing
Traceback (most recent call last):
File "/opt/PyBitmessage/src/network/receivequeuethread.py", line
50, in run
connection.process()
File "/opt/PyBitmessage/src/network/advanceddispatcher.py", line
72, in process
if not cmd():
File "/opt/PyBitmessage/src/network/socks5.py", line 42, in
state_auth_1
ret = struct.unpack('BB', self.read_buf[:2])
error: unpack requires a string argument of length 2

Activity

  1. added
    bugSomething isn't working as it's supposed to
    on May 4, 2018
  2. self-assigned this
    on May 4, 2018
  3. added this to the v0.6.4 milestone on Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working as it's supposed to

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions