Skip to content

Improper lock usage leads to inode overflow in LockLocalStorage implementation #1975

Description

@somnoynadno

Summary

Behaviour of fasteners.InterProcessLock is pretty weird: class creates a lockfile by provided path, if it doesn't exist, but not manage to remove it after lock is released.

It may lead to uncontrolled lockfiles spam in /tmp folder just because libcloud local driver is not removing this lockfile either.

Detailed Information

This issue encountered in cassandra-medusa v0.15 and lower, which was using apache-libcloud<3.4.0,>=3.3.0 as a dependency.

Please see thelastpickle/cassandra-medusa#528 for more details.


Seems like the lightweight fix is to run

                with contextlib.suppress(FileNotFoundError):
                    os.remove(filename)

just right in the exit method.

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