Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MrEbbinghaus opened this issue Oct 20, 2024 · 4 comments
Open
Labels

Comments

@MrEbbinghaus
Copy link

MrEbbinghaus commented Oct 20, 2024

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.

@MrEbbinghaus
Copy link
Author

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

@MrEbbinghaus
Copy link
Author

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

@maxking
Copy link
Owner

maxking commented Oct 20, 2024

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?

@MrEbbinghaus
Copy link
Author

MrEbbinghaus commented Oct 20, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants