darktable-org / darktable-org/darktable

File operations (delete / import) should be a single thread

Open
#19,877 2 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

Importing multiple directories and deleting files from Darktable seems to be happening in parallel.
The chance of darktable crashing is about 50%.

Steps to reproduce

Import a large directory
Import another one while the first is still importing
Notice that both are importing
Delete another directory or film roll

Alternat this a bit and DT crashes or stops responding

Expected behavior

import and delete as a kind of command queue which it processes one by one.

Logfile | Screenshot | Screencast

No response

Commit

No response

Where did you obtain darktable from?

darktable.org / GitHub release

darktable version

5.1

What OS are you using?

Linux

What is the version of your OS?

Linux Mint latest version

Describe your system

import and delete as a kind of command queue which it processes one by one.
Since import and delete are limited by disk-speed, doing these operations in parallel does not give huge speed benefits. Darktable crashes so often when doing this that the theoretical improvement is not worth it.
In fact I just don't import multiple directories but I import them one by one, waiting for each to complete - negating any speed improvement the parallel processing might yield.

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 crash with two concurrent imports followed by a delete on Linux Mint, as described in the issue. Trace where import and delete operations are scheduled, then verify that they are processed one at a time and that the reproduction no longer crashes or becomes unresponsive.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.