Skip to content

UltraDict.apply_update() - Freezes w/ high CPU usage or AssertionError #36

@supermorphDotTech

Description

@supermorphDotTech

Issue Description

Hi there,

I have been troubleshooting my framework for quite some time now. As a backbone, it uses UltraDict. To make sure my software works reliably I created a stress-test with many reads, writes and of course context managers. I can not find any context manager based deadlock in my code and at this point I am suspecting UltraDict.apply_update() to be the culprit.

Although not required to discuss the issue, If you are interested you can find my repository with the rolling-update branch here: morPy

Symptom 1

Freezes with high CPU usage. The CPU utilization shows a high usage plateau when it occurs, visually understating that a context manager deadlock may be the issue.

Image

Symptom 2

Sometimes the opportunistic reads of apply_update() seem to fail with an AssertionError.

/morPy/.venv-linux/lib/python3.10/site-packages/UltraDict/UltraDict.py", line 772, in apply_update
    assert bytes(self.buffer.buf[pos:pos+1]) == b'\xFF'
AssertionError

My Questions

A) Are there known culprits (an oversight of mine) which lead to this issue?
B) Was lock stealing (partly) meant to mitigate the freezes?
C) What can I do about the AssertionError?

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