Skip to content

Race condition with two pickers filling the same machine at the same time #5

@Luaancz

Description

@Luaancz

When there's two pickers feeding a machine with the same item, there's a small chance both will try to insert the item at the same time. This results in one of the pickers getting stuck if there's no more available space in the machine. This is best reproduced with the catalyzer, where ADP getting stuck on input can deadlock the whole machine if the stuck picker means no more glucose can get in to start another batch of processing.

The image shows the setup:

image

Note that there's another input from the left, which is why this doesn't get blocked more often - there's actually two opportunities to get glucose and NAD+ in. At least one of the pickers gets "blocked" in this way fairly often, but the third one gives an opportunity for recovery. With just two input pickers, this happens much more often - in my case, to get the full deadlock, I one picker blocked with ADP and the other with NAD+, with no way for the glucose to go in.

But the deadlock is just the worst case scenario - the core problem is that pickers do not reserve the slots they put an item into, so multiple pickers can attempt to overfill the target machine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions