darktable-org / darktable-org/darktable

Darktable CLI leaves database lock file in place when operation fails

Open
#19,584 1 comment 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 darktable-cli fails, it leaves the database lock file in place. This causes a specific issue that I think is separate from this one, so I will open two separate tickets.

I checked distro packaging below but I can reproduce the issue with both the Arch package on Manjaro and the Flatpak on SteamOS.

Steps to reproduce

darktable-cli FOLDER FOLDER --width 1200 --height 1200 --style STYLE --out-ext jpg

creates database lock
fails because of #18892
returns exit code 1
does not remove database lock

Expected behavior

Database lock file should be removed

Logfile | Screenshot | Screencast
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?

distro packaging

darktable version

5.2.1

What OS are you using?

Linux

What is the version of your OS?

SteamOS / Manjaro (see above)

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 documented darktable-cli command and tracing the failure path that follows the database-lock error. Done means a failed operation removes the database lock file while still returning the failure status.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.