darktable-org / darktable-org/darktable

Flatpak Darktable CLI can not handle database lock file. OR: Arch Darktable CLI does not respect database lock file

Open
#19,585 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

no-issue-activity
Dominant language
C
Stars
13.1k
Forks
1.4k
Avg merge
22h 14m
Merged PRs (30d)
198

Description

Is there an existing issue for this?
  • I checked and did not find my issue in the already reported ones
Describe the bug

When the database lock file exists even though Darktable is closed, darktable-cli cannot run.

Due to #19584 I could not run repeated darktable-cli commands. It was on SteamOS using the Flatpak, so I tried to test if it was a Flatpak issue, so I tested on Manjaro, using the Arch package. The issue did not occur there. I am unsure which one is wrong.

Steps to reproduce

flatpak run --command=darktable-cli org.darktable.Darktable FOLDER FOLDER --width 1200 --height 1200 --style STYLE --out-ext jpg

Fails first time, see #19584

run again:
flatpak run --command=darktable-cli org.darktable.Darktable FOLDER FOLDER --width 1200 --height 1200 --style STYLE --out-ext jpg

Fails again, but now complaining about the lock file being in place. Only in Flatpak version. On Manjaro with the Arch package, both commands (run directly without flatpak) yield the same result, even though the lock file exists after the first command.

Expected behavior

I am not sure, see above.

Logfile | Screenshot | Screencast
$ flatpak run --command=darktable-cli org.darktable.Darktable FOLDER FOLDER --width 1200 --height 1200 --style STYLE --out-ext jpg
Gtk-Message: 01:53:25.047: Failed to load module "canberra-gtk-module"
notice: output location is a directory. assuming 'REDACTED/test/out/$(FILE_NAME).jpg' output pattern
     0,0229 [init] the database lock file contains a pid that seems to be alive in your system: 2
     0,0229 [init] database is locked, probably another process is already using it
     0,0229 ERROR: can't acquire database lock, aborting.
Commit

No response

Where did you obtain darktable from?

Flatpak

darktable version

5.2.1

What OS are you using?

Linux

What is the version of your OS?

SteamOS

Describe your system

No response

Are you using OpenCL GPU in darktable?

None

If yes, what is the GPU card and driver?

No response

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two flatpak run --command=darktable-cli commands on SteamOS and comparing them with the direct Arch package commands described in the issue. Trace how darktable-cli checks and writes the database lock file, then define the expected behavior for a stale lock before validating both package environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
cli, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.