Skip to content

3.9.4 has a threading issue #415

@lejmr

Description

@lejmr

After upgrading to 3.9.4 from 3.9.2, I started to experience freezing of my application. With the downgrade, I can confirm the same issue happens with 3.9.3 but not with 3.9.2!

My application utilizes threads for receiving messages from multiple topics. When I receive two messages almost simultaneously (below 8ms time difference), the application freezes on orjson.loads call. Freezes = thread that stucks on json.loads consumes 100% of CPU, and all other threads stop. Nothing happens at all - even prometheus_client is not providing any metrics, i.e., HTTP interface timeouts.

For troubleshooting, I used strace which shows only repeating lines:

futex(0x7f98d4338d74, FUTEX_WAIT_BITSET_PRIVATE, 0, {tv_sec=79294, tv_nsec=4595386}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out)
futex(0x7f98d4338d78, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7f98d4338d74, FUTEX_WAIT_BITSET_PRIVATE, 0, {tv_sec=79294, tv_nsec=9691159}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out)
futex(0x7f98d4338d78, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7f98d4338d74, FUTEX_WAIT_BITSET_PRIVATE, 0, {tv_sec=79294, tv_nsec=14785932}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out)

full strace: strace.txt

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