Skip to content

[BUG] TimeOutError: Could not acquire the lock since version 0.5.2 #728

Closed as not planned

Description

@MrEbbinghaus

Tag/version of Container Images: 0.5.2

After updating the image to 0.5.2 the mailman-core container crashes with the following log and error on startup

Found configuration file at /opt/mailman/mailman-extra.cfg
HYPERKITTY_API_KEY found, setting up HyperKitty archiver...
Directory /opt/mailman/var already exists.
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/mailman/bin/master.py", line 150, in acquire_lock_1
    lock.lock(timedelta(seconds=0.1))
File "/usr/lib/python3.12/site-packages/flufl/lock/_lockfile.py", line 380, in lock
    raise TimeOutError('Could not acquire the lock')
flufl.lock._lockfile.TimeOutError: Could not acquire the lock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/flufl/lock/_lockfile.py", line 231, in details
    lockfile, hostname, pid, random_ignored = filename.split(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 4, got 1)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/bin/master", line 8, in <module>
    sys.exit(main())
             ^^^^^^
File "/usr/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/mailman/bin/master.py", line 653, in main
    lock = acquire_lock(force)
           ^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/mailman/bin/master.py", line 176, in acquire_lock
    lock = acquire_lock_1(force)
           ^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/mailman/bin/master.py", line 156, in acquire_lock_1
    hostname, pid, tempfile = lock.details
                              ^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/flufl/lock/_lockfile.py", line 235, in details
    raise NotLockedError('Details are unavailable') from error
flufl.lock._lockfile.NotLockedError: Details are unavailable

Haven't quite figures out what is happening, but maybe this is related to #718 and #86.

Activity

  1. MrEbbinghaus commented on Oct 20, 2024

    @MrEbbinghaus
    Author

    And I can't easily roll back to 0.5.1 because of a migration that gets applied between the two versions.

  2. MrEbbinghaus commented on Oct 20, 2024

    @MrEbbinghaus
    Author

    The /opt/mailman/var directory is owned by _apt after start up. 🤔

  3. maxking commented on Oct 20, 2024

    @maxking
    Owner

    I think I agree that it is caused by #718 but I am not sure I fully understand why is that. 🤔

    Can you get an older copy of the entrypoint script from 0.5.1 tag in the repo and mount it over the existing one as a workaround?

  4. MrEbbinghaus commented on Oct 20, 2024

    @MrEbbinghaus
    Author

    @maxking I tried, with no success.

    But just deleting the lock from var/locks did the trick.
    This should maybe be part of the entrypoint script.

  5. github-actions commented on Oct 20, 2025

    @github-actions

    This issue has not been updated for more than 1year

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions