Parallel execution leads to data corruption on the output
Siril version: 1.2.0
Note: please report against latest git master branch or latest stable version
Operating System: Linux
Package: AppImage
Description of the bug
To speed up processing many files the same way (say K files), I've written a Python script that spreads a set of commands to N threads, each running Siril over K/N files.
Unfortunately, when N > 1, I notice artifacts on the output side. Some images are black, while some are half-baked. This phenomenon occurs more often as N approaches the CPU thread count (ex. 12).
Reproduction
Reproduction steps:
Given a folder containing many images (extension must be FIT/PNG/TIF, case insensitive):
- Run the script with
python sirilightspeed.py
- Enter the required information (ex: directory, no, yes, 0, 65535, yes, no, 0 15 1 1 1 1)
- Observe the results in the
siril
directory
Expected result:
No artifacts (half-baked or all-black images)
Actual result:
Some images are corrupted
Additional information
Tested on a 6c/12t CPU with a single NUMA node
Half-baked image:
All-black image:
Good image (processing OK despite being visually garbage):