Photostructure stops unexpectedly during import

Expected Behavior

Photostructure should import pictures/videos, and keep running.

Current Behavior

Docker container stops, Photostructure stops running.

Steps to Reproduce

  1. Install 1.0.0 alpha 2
  2. Import content into library.
  3. Photostructure stops during import.

{“ts”:1616294027251,“l”:“debug”,“ctx”:“Service(sync-file)”,“msg”:“Received SIGCHLD”,“meta”:[“SIGCHLD”,17]}
{“ts”:1616294028283,“l”:“warn”,“ctx”:“SharpReadable”,“msg”:“strategy failed for /var/photos-backup/(snip)/DSD05639.ARW: Error: readableToFile() failed: applyWip(): empty after apply for /ps/tmp/imgcache/df/4b/jxxz0v5s42hf0pdu7hxt/dcraw.tiff⁶⁷”}
{“ts”:1616294028284,“l”:“info”,“ctx”:“Deferred(AssetFileImporter(/var/photos-backup/(snip)/DSD05639.ARW).apply)”,“msg”:".reject()",“meta”:{“cause”:{“cause”:{},“retriable”:true,“fatal”:false},“retriable”:false,“fatal”:false,“stack”:[“Error: applyWip(): empty after apply for /ps/tmp/imgcache/df/4b/jxxz0v5s42hf0pdu7hxt/dcraw.tiff”," at V.applyWip (/ps/app/bin/sync-file.js:9:198802)"," at async V.applyIfEmpty_ (/ps/app/bin/sync-file.js:9:199083)"," at async Object.t.readableToFile (/ps/app/bin/sync-file.js:9:289473)"," at async Object.t.firstResolvedDefinedPromise (/ps/app/bin/sync-file.js:9:113684)"," at async /ps/app/bin/sync-file.js:9:298215"]}}
{“ts”:1616294028284,“l”:“debug”,“ctx”:“AssetFileFinder((snip)/DSD05639.ARW)”,“msg”:“apply(): validFile rejected: Error: invalid file /var/photos-backup/(snip)/DSD05639.ARW: readableToFile() failed: applyWip(): empty after apply for /ps/tmp/imgcache/df/4b/jxxz0v5s42hf0pdu7hxt/dcraw.tiff⁶³⁷”}

Sending log to support@ separately.


Operating system and version: 5.4.0-67-generic #75-Ubuntu SMP Fri Feb 19 18:03:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

PhotoStructure edition: Docker

I’ll take a look at your logfile in a bit, thanks for the report!

After seeing that LibRaw behaved as expected for this example image, I have to assume that the system spawn call for dcraw_emu failed in your container (which is bound to happen some percentage of the time!)

I’ll make sure the timeouts and retries are set up correctly for LibRaw, so when it’s flaky in the future, it doesn’t take anything down with it, and retries, too.

For now, if you restart PhotoStructure, it should just recover gracefully (another sync will pick up this file). If it doesn’t, that’s a bug!

Thanks again for reporting this :beers: