Skip to content

Corrupted SDO readings when release_gil is enabled #181

@congyue

Description

@congyue

With 1.1.12, on MacOS if I enable release_gil, the sdo_read output would append more random characters than expected:

>>> slave.sdo_read(0x1000, 0, release_gil=False)
b'\x00\x00\x00\x00'
>>> slave.sdo_read(0x1000, 0, release_gil=True)
b'\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x8a\xec\x00\x01\x00\x00\x00\xe0\x84\xec\x00\x01\x00\x00\x00 \x8a\xec\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000\x84\xda\x00\x01\x00\x00\x00\xb0\x8f\x00\x02\x01\x00\x00\x00\x08\xa7\\o\x01\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\xe1\xaa\x17\x01\x01\x00\x00\x00@?G\x01\x01\x00\x00\x00\x98\xa6\\o\x01\x00\x00\x00\xf1\x19t\x0bE\xb1b\xfb\xa8\xa6\\o\x01\x00\x00\x00\x9f\xc0\xa5\xdd\xf2\xf9>*\x00\x00\x00\x00\x00\x00\x00\x00pI\xde\x00\x01\x00\x00\x00\x90h\x92\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xa6\\o\x01\x00\x00\x00\xac\r\xf4\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00pI\xde\x00\x01\x00\x00\x00\x08\xed\x17\x01\x01\x00\x00\x00\xa0\xf5\x17\x01\x01\x00\x00\x00\x00\xb1\x12\x01\x01\x00\x00\x00\x90\x12\xde\x00\x01\x00\x00\x00\xb0"\x18\x01\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90h\x92\x00\x01\x00\x00\x00'

Similarly, for assign object:

>>> slave.sdo_read(0x1C13, 0, ca=True, release_gil=False)
b'\x01\x00\x00\x1a'
>>> slave.sdo_read(0x1C13, 0, ca=True, release_gil=True)
b'\x01\x00\x00\x1a\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x8a\xec\x00\x01\x00\x00\x00\xe0\x84\xec\x00\x01\x00\x00\x00 \x8a\xec\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pI\xde\x00\x01\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00@\xa6\\o\x01\x00\x00\x00\xe8\x13\xf7\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x13G\x01\x01\x00\x00\x00\xb0"\x18\x01\x01\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xffp@\x92\x00\x01\x00\x00\x00p@\x92\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000\xb4\xdd\x00\x01\x00\x00\x00\x80\x13G\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xa6\\o\x01\x00\x00\x00\xac\r\xf4\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000\xb4\xdd\x00\x01\x00\x00\x00\x08\xed\x17\x01\x01\x00\x00\x00\xa0\xf5\x17\x01\x01\x00\x00\x00\x00\xb1\x12\x01\x01\x00\x00\x00\x90\x12\xde\x00\x01\x00\x00\x00\xb0"\x18\x01\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x13G\x01\x01\x00\x00\x00'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions