Immich Server crash when generating missing thumbnails with error Failed to decode DCT block #6965

Closed
opened 2026-02-05 12:40:38 +03:00 by OVERLORD · 48 comments
Owner

Originally created by @StefanRu1 on GitHub (Aug 25, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

Description:
When I attempt to generate missing thumbnails, the Immich server crashes and enters a restart loop. The loop continues until I manually stop the entire Immich stack and restart it.
I suspect the issue is related to some images in my library that contain malformed DCT blocks. I'm currently trying to locate and fix these problematic files. However, I believe Immich should handle such errors more gracefully and not crash entirely.

Observations:

  • The verbose logs do not clearly indicate the cause of the crash or restart.
  • The problematic files are not mentioned in verbose log.
  • It appears that after a certain number of errors, the server triggers a restart.
  • The issue only resolves after a full stack restart.

Expected Behavior:
Immich should log the error, skip the problematic image, and continue processing without crashing or restarting.

The OS that Immich Server is running on

Debian GNU/Linux 11 (bullseye)

Version of Immich Server

v1.139.3

Version of Immich Mobile App

v1.139.3

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

Raspberry Pi 400 4GB RAM

Your docker-compose.yml content

#
# WARNING: To install Immich, follow our guide: https://immich.app/docs/install/docker-compose
#
# Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /mnt/hdd4TB/LG G20 Ultra/Sicherung/DCIM/Camera:/mnt/hdd4TB/LG G20 Ultra/Sicherung/DCIM/Camera #:ro
      - /mnt/hdd4TB/bilder/:/mnt/hdd4TB/bilder/ #:ro
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - stack.env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:8-bookworm@sha256:fec42f399876eb6faf9e008570597741c87ff7662a54185593e74b09ce83d177
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  power-tools:
    container_name: immich_power_tools
    image: ghcr.io/varun-raj/immich-power-tools:latest
    ports:
      - "8001:3000"
    env_file:
      - stack.env
    restart: unless-stopped

  immich-kiosk:
    container_name: immich_kiosk
    image: ghcr.io/damongolding/immich-kiosk:latest
    ports:
      - "8080:8080"

    env_file:
      - stack.env
    volumes:
      - /srv/immich/kiosk/config.yaml:/config.yaml
    restart: unless-stopped

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.2-pgvectors0.2.0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      # DB_STORAGE_TYPE: 'HDD'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    restart: always

volumes:
  model-cache:

Your .env content

UPLOAD_LOCATION=/mnt/hdd4TB/immich/upload_location
DB_DATA_LOCATION=./postgres
IMMICH_VERSION=release
DB_PASSWORD=XXXXXX!
DB_USERNAME=admin
DB_DATABASE_NAME=immich_new
IMMICH_API_KEY=XXXXX # your_immich_api_key power tools
IMMICH_URL="http://192.168.69.94:2283" # Your immich instace ip address and port power tools
EXTERNAL_IMMICH_URL="https://immich.xxxx.de" # External address of immich power tools
GOOGLE_MAPS_API_KEY=XXXX # Google Maps API Key power tools
GEMINI_API_KEY=XXXX # Gemini API Key power tools
DB_HOST=database # power tools
DB_PORT=5432 # power tools
KIOSK_PORT=8080
LANG=de_DE.UTF-8
TZ=Europe/Berlin
IMMICH_LOG_LEVEL=verbose

Reproduction steps

  1. Having Images with malformed DCT blocks
  2. Generate missing thumbnails2.

Relevant log output

[Nest] 18  - 25.08.2025, 12:49:04   DEBUG [Api:LoggingInterceptor~187bh6fk] GET /api/jobs 200 35.59ms ::ffff:192.168.69.86

[Nest] 18  - 25.08.2025, 12:49:09   DEBUG [Api:JobService~ew9yfdcv] Handling command: queue=thumbnailGeneration,command=start,force=false

[Nest] 18  - 25.08.2025, 12:49:09   DEBUG [Api:LoggingInterceptor~ew9yfdcv] PUT /api/jobs/thumbnailGeneration 200 33.82ms ::ffff:192.168.69.86

command=start force=false

[Nest] 18  - 25.08.2025, 12:49:09 VERBOSE [Api:LoggingInterceptor~ew9yfdcv] 

[Nest] 18  - 25.08.2025, 12:49:09   DEBUG [Api:LoggingInterceptor~060j9yoa] GET /api/jobs 200 41.94ms ::ffff:192.168.69.86

[Nest] 7  - 25.08.2025, 12:49:10   ERROR [Microservices:{"id":"ecfff769-172c-4f6e-9627-165f6424a760"}] Unable to run job handler (AssetGenerateThumbnails): Error: VipsJpeg: ./lib/jpegli/decode_scan.cc:539: Failed to decode DCT block

Error: VipsJpeg: ./lib/jpegli/decode_scan.cc:539: Failed to decode DCT block

    at Sharp.toBuffer (/usr/src/app/server/node_modules/.pnpm/sharp@0.34.2/node_modules/sharp/lib/output.js:163:17)

    at MediaRepository.decodeImage (/usr/src/app/server/dist/repositories/media.repository.js:105:68)

    at MediaService.decodeImage (/usr/src/app/server/dist/services/media.service.js:177:59)

    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

    at async MediaService.generateImageThumbnails (/usr/src/app/server/dist/services/media.service.js:189:44)

    at async MediaService.handleGenerateThumbnails (/usr/src/app/server/dist/services/media.service.js:116:25)

    at async JobService.onJobStart (/usr/src/app/server/dist/services/job.service.js:198:28)

    at async EventRepository.onEvent (/usr/src/app/server/dist/repositories/event.repository.js:126:13)

    at async /usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:496:32

    at async Worker.retryIfFailed (/usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:774:24)

... about 50 times the same error ...

[Nest] 7  - 25.08.2025, 12:49:13   ERROR [Microservices:{"id":"b40feb53-39a3-4be2-9c97-63446ee0f3b8"}] Unable to run job handler (AssetGenerateThumbnails): Error: VipsJpeg: ./lib/jpegli/decode_scan.cc:539: Failed to decode DCT block

Error: VipsJpeg: ./lib/jpegli/decode_scan.cc:539: Failed to decode DCT block

    at Sharp.toBuffer (/usr/src/app/server/node_modules/.pnpm/sharp@0.34.2/node_modules/sharp/lib/output.js:163:17)

    at MediaRepository.decodeImage (/usr/src/app/server/dist/repositories/media.repository.js:105:68)

    at MediaService.decodeImage (/usr/src/app/server/dist/services/media.service.js:177:59)

    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

    at async MediaService.generateImageThumbnails (/usr/src/app/server/dist/services/media.service.js:189:44)

    at async MediaService.handleGenerateThumbnails (/usr/src/app/server/dist/services/media.service.js:116:25)

    at async JobService.onJobStart (/usr/src/app/server/dist/services/job.service.js:198:28)

    at async EventRepository.onEvent (/usr/src/app/server/dist/repositories/event.repository.js:126:13)

    at async /usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:496:32

    at async Worker.retryIfFailed (/usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:774:24)

[Nest] 18  - 25.08.2025, 12:49:14   DEBUG [Api:LoggingInterceptor~o72xxgs4] GET /api/jobs 200 65.68ms ::ffff:192.168.69.86

Initializing Immich v1.139.3

Detected CPU Cores: 4

Additional information

I’m aware of some images with corrupted DCT blocks and am working to isolate them. If needed, I can provide sample files or logs.
I did not have the error before, i first recognized it after updating to v1.139.3

Originally created by @StefanRu1 on GitHub (Aug 25, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug **Description:** When I attempt to generate missing thumbnails, the Immich server crashes and enters a restart loop. The loop continues until I manually stop the entire Immich stack and restart it. I suspect the issue is related to some images in my library that contain malformed DCT blocks. I'm currently trying to locate and fix these problematic files. However, I believe Immich should handle such errors more gracefully and not crash entirely. **Observations:** - The verbose logs do not clearly indicate the cause of the crash or restart. - The problematic files are not mentioned in verbose log. - It appears that after a certain number of errors, the server triggers a restart. - The issue only resolves after a full stack restart. **Expected Behavior:** Immich should log the error, skip the problematic image, and continue processing without crashing or restarting. ### The OS that Immich Server is running on Debian GNU/Linux 11 (bullseye) ### Version of Immich Server v1.139.3 ### Version of Immich Mobile App v1.139.3 ### Platform with the issue - [x] Server - [ ] Web - [ ] Mobile ### Device make and model Raspberry Pi 400 4GB RAM ### Your docker-compose.yml content ```YAML # # WARNING: To install Immich, follow our guide: https://immich.app/docs/install/docker-compose # # Make sure to use the docker-compose.yml of the current release: # # https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml # # The compose file on main may not be compatible with the latest release. name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding volumes: # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file - ${UPLOAD_LOCATION}:/usr/src/app/upload - /mnt/hdd4TB/LG G20 Ultra/Sicherung/DCIM/Camera:/mnt/hdd4TB/LG G20 Ultra/Sicherung/DCIM/Camera #:ro - /mnt/hdd4TB/bilder/:/mnt/hdd4TB/bilder/ #:ro - /etc/localtime:/etc/localtime:ro env_file: - stack.env ports: - '2283:2283' depends_on: - redis - database restart: always healthcheck: disable: false immich-machine-learning: container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration # file: hwaccel.ml.yml # service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable volumes: - model-cache:/cache env_file: - stack.env restart: always healthcheck: disable: false redis: container_name: immich_redis image: docker.io/valkey/valkey:8-bookworm@sha256:fec42f399876eb6faf9e008570597741c87ff7662a54185593e74b09ce83d177 healthcheck: test: redis-cli ping || exit 1 restart: always power-tools: container_name: immich_power_tools image: ghcr.io/varun-raj/immich-power-tools:latest ports: - "8001:3000" env_file: - stack.env restart: unless-stopped immich-kiosk: container_name: immich_kiosk image: ghcr.io/damongolding/immich-kiosk:latest ports: - "8080:8080" env_file: - stack.env volumes: - /srv/immich/kiosk/config.yaml:/config.yaml restart: unless-stopped database: container_name: immich_postgres image: ghcr.io/immich-app/postgres:14-vectorchord0.4.2-pgvectors0.2.0 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs # DB_STORAGE_TYPE: 'HDD' volumes: # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file - ${DB_DATA_LOCATION}:/var/lib/postgresql/data restart: always volumes: model-cache: ``` ### Your .env content ```Shell UPLOAD_LOCATION=/mnt/hdd4TB/immich/upload_location DB_DATA_LOCATION=./postgres IMMICH_VERSION=release DB_PASSWORD=XXXXXX! DB_USERNAME=admin DB_DATABASE_NAME=immich_new IMMICH_API_KEY=XXXXX # your_immich_api_key power tools IMMICH_URL="http://192.168.69.94:2283" # Your immich instace ip address and port power tools EXTERNAL_IMMICH_URL="https://immich.xxxx.de" # External address of immich power tools GOOGLE_MAPS_API_KEY=XXXX # Google Maps API Key power tools GEMINI_API_KEY=XXXX # Gemini API Key power tools DB_HOST=database # power tools DB_PORT=5432 # power tools KIOSK_PORT=8080 LANG=de_DE.UTF-8 TZ=Europe/Berlin IMMICH_LOG_LEVEL=verbose ``` ### Reproduction steps 1. Having Images with malformed DCT blocks 2. Generate missing thumbnails2. ### Relevant log output ```shell [Nest] 18 - 25.08.2025, 12:49:04 DEBUG [Api:LoggingInterceptor~187bh6fk] GET /api/jobs 200 35.59ms ::ffff:192.168.69.86 [Nest] 18 - 25.08.2025, 12:49:09 DEBUG [Api:JobService~ew9yfdcv] Handling command: queue=thumbnailGeneration,command=start,force=false [Nest] 18 - 25.08.2025, 12:49:09 DEBUG [Api:LoggingInterceptor~ew9yfdcv] PUT /api/jobs/thumbnailGeneration 200 33.82ms ::ffff:192.168.69.86 command=start force=false [Nest] 18 - 25.08.2025, 12:49:09 VERBOSE [Api:LoggingInterceptor~ew9yfdcv] [Nest] 18 - 25.08.2025, 12:49:09 DEBUG [Api:LoggingInterceptor~060j9yoa] GET /api/jobs 200 41.94ms ::ffff:192.168.69.86 [Nest] 7 - 25.08.2025, 12:49:10 ERROR [Microservices:{"id":"ecfff769-172c-4f6e-9627-165f6424a760"}] Unable to run job handler (AssetGenerateThumbnails): Error: VipsJpeg: ./lib/jpegli/decode_scan.cc:539: Failed to decode DCT block Error: VipsJpeg: ./lib/jpegli/decode_scan.cc:539: Failed to decode DCT block at Sharp.toBuffer (/usr/src/app/server/node_modules/.pnpm/sharp@0.34.2/node_modules/sharp/lib/output.js:163:17) at MediaRepository.decodeImage (/usr/src/app/server/dist/repositories/media.repository.js:105:68) at MediaService.decodeImage (/usr/src/app/server/dist/services/media.service.js:177:59) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async MediaService.generateImageThumbnails (/usr/src/app/server/dist/services/media.service.js:189:44) at async MediaService.handleGenerateThumbnails (/usr/src/app/server/dist/services/media.service.js:116:25) at async JobService.onJobStart (/usr/src/app/server/dist/services/job.service.js:198:28) at async EventRepository.onEvent (/usr/src/app/server/dist/repositories/event.repository.js:126:13) at async /usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:496:32 at async Worker.retryIfFailed (/usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:774:24) ... about 50 times the same error ... [Nest] 7 - 25.08.2025, 12:49:13 ERROR [Microservices:{"id":"b40feb53-39a3-4be2-9c97-63446ee0f3b8"}] Unable to run job handler (AssetGenerateThumbnails): Error: VipsJpeg: ./lib/jpegli/decode_scan.cc:539: Failed to decode DCT block Error: VipsJpeg: ./lib/jpegli/decode_scan.cc:539: Failed to decode DCT block at Sharp.toBuffer (/usr/src/app/server/node_modules/.pnpm/sharp@0.34.2/node_modules/sharp/lib/output.js:163:17) at MediaRepository.decodeImage (/usr/src/app/server/dist/repositories/media.repository.js:105:68) at MediaService.decodeImage (/usr/src/app/server/dist/services/media.service.js:177:59) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async MediaService.generateImageThumbnails (/usr/src/app/server/dist/services/media.service.js:189:44) at async MediaService.handleGenerateThumbnails (/usr/src/app/server/dist/services/media.service.js:116:25) at async JobService.onJobStart (/usr/src/app/server/dist/services/job.service.js:198:28) at async EventRepository.onEvent (/usr/src/app/server/dist/repositories/event.repository.js:126:13) at async /usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:496:32 at async Worker.retryIfFailed (/usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:774:24) [Nest] 18 - 25.08.2025, 12:49:14 DEBUG [Api:LoggingInterceptor~o72xxgs4] GET /api/jobs 200 65.68ms ::ffff:192.168.69.86 Initializing Immich v1.139.3 Detected CPU Cores: 4 ``` ### Additional information I’m aware of some images with corrupted DCT blocks and am working to isolate them. If needed, I can provide sample files or logs. I did not have the error before, i first recognized it after updating to v1.139.3
OVERLORD added the 🗄️server label 2026-02-05 12:40:38 +03:00
Author
Owner

@bo0tzz commented on GitHub (Aug 25, 2025):

Can you give more detail about the restarting behaviour, eg what exit code Docker is reporting? The DCT block errors are 'harmless' (just corrupted files) and should not have any bearing on whether the process is aborted.

@bo0tzz commented on GitHub (Aug 25, 2025): Can you give more detail about the restarting behaviour, eg what exit code Docker is reporting? The DCT block errors are 'harmless' (just corrupted files) and should not have any bearing on whether the process is aborted.
Author
Owner

@alextran1502 commented on GitHub (Aug 25, 2025):

@StefanRu1 I wonder if you can grab that trouble file, zip it up and share it with us for troubleshooting?

@alextran1502 commented on GitHub (Aug 25, 2025): @StefanRu1 I wonder if you can grab that trouble file, zip it up and share it with us for troubleshooting?
Author
Owner

@oscar-juarez commented on GitHub (Aug 25, 2025):

I started having also multiple restart errors on microservices worker, related to NVENC on Raspberry, which is not supported, seems like the service is not falling back to software transcoding and just fails and causes the service to restart without any error message, with 1.139.2 was not getting any thumbnail on new uploads. I had to downgrade to 1.138.1

Today I wanted to try again with 139.2 but forcing hardware encoding off from the UI.

@oscar-juarez commented on GitHub (Aug 25, 2025): I started having also multiple restart errors on microservices worker, related to NVENC on Raspberry, which is not supported, seems like the service is not falling back to software transcoding and just fails and causes the service to restart without any error message, with 1.139.2 was not getting any thumbnail on new uploads. I had to downgrade to 1.138.1 Today I wanted to try again with 139.2 but forcing hardware encoding off from the UI.
Author
Owner

@oscar-juarez commented on GitHub (Aug 25, 2025):

I tried now with 1.139.3 uploading one picture:

LOG [Microservices:MetadataService] Wrote motion photo video to /data/encoded-video/8c7b786f-d43d-4b06-b4cf-8b27d800be6a/b4/c5/b4c55d13-c826-45d0-b75f-32899cd6dec2-MP.mp4

[Nest] 6  - 08/25/2025, 4:46:22 PM     LOG [Microservices:MediaService] Transcoding video b4c55d13-c826-45d0-b75f-32899cd6dec2 with NVENC-accelerated encoding and software decoding

[Nest] 6  - 08/25/2025, 4:46:23 PM   ERROR [Microservices:MediaRepository] ffmpeg version 7.1.1-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers

  built with gcc 12 (Debian 12.2.0-14)

  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=arm64 --cross-prefix=/usr/bin/aarch64-linux-gnu- --toolchain=hardened --enable-cross-compile --enable-rkmpp --enable-rkrga --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc

  libavutil      59. 39.100 / 59. 39.100

  libavcodec     61. 19.101 / 61. 19.101

  libavformat    61.  7.100 / 61.  7.100

  libavdevice    61.  3.100 / 61.  3.100

  libavfilter    10.  4.100 / 10.  4.100

  libswscale      8.  3.100 /  8.  3.100

  libswresample   5.  3.100 /  5.  3.100

  libpostproc    58.  3.100 / 58.  3.100

[AVHWDeviceContext @ 0x7fae10c780] Cannot load libcuda.so.1

[AVHWDeviceContext @ 0x7fae10c780] Could not dynamically load CUDA

Device creation failed: -1.

Failed to set value 'cuda=cuda:0' for option 'init_hw_device': Operation not permitted

Error parsing global options: Operation not permitted

[Nest] 6  - 08/25/2025, 4:46:23 PM   ERROR [Microservices:MediaService] Error occurred during transcoding: ffmpeg exited with code 255: Device creation failed: -1.

Failed to set value 'cuda=cuda:0' for option 'init_hw_device': Operation not permitted

Error parsing global options: Operation not permitted

[Nest] 6  - 08/25/2025, 4:46:23 PM   ERROR [Microservices:MediaService] Retrying with NVENC acceleration disabled

[Nest] 6  - 08/25/2025, 4:46:24 PM     LOG [Microservices:MediaService] Successfully encoded b4c55d13-c826-45d0-b75f-32899cd6dec2

Initializing Immich v1.139.3

Detected CPU Cores: 4

Starting microservices worker

An then after that every time that tries to generate thumbnails will always fail on those assets and keep restarting the service. Even if I turn off from the UI hardware I dont get the error anymore, says transcoding went well, but again restarts the worker and the thumbnails are broken and even if I click the image on the web it can't be loaded:

[Nest] 7  - 08/25/2025, 5:07:13 PM     LOG [Microservices:MetadataService] Wrote motion photo video to /data/encoded-video/8c7b786f-d43d-4b06-b4cf-8b27d800be6a/0f/cc/0fcccb23-8364-43b6-9bf7-fe697c979a8f-MP.mp4

[Nest] 7  - 08/25/2025, 5:07:13 PM     LOG [Microservices:MediaService] Transcoding video 0fcccb23-8364-43b6-9bf7-fe697c979a8f without hardware acceleration

[Nest] 7  - 08/25/2025, 5:07:14 PM     LOG [Microservices:MetadataService] Wrote motion photo video to /data/encoded-video/8c7b786f-d43d-4b06-b4cf-8b27d800be6a/bb/4c/bb4cbd95-1b8b-4671-800b-392156292dca-MP.mp4

[Nest] 7  - 08/25/2025, 5:07:16 PM     LOG [Microservices:MediaService] Successfully encoded 0fcccb23-8364-43b6-9bf7-fe697c979a8f

[Nest] 7  - 08/25/2025, 5:07:16 PM     LOG [Microservices:MediaService] Transcoding video bb4cbd95-1b8b-4671-800b-392156292dca without hardware acceleration

[Nest] 7  - 08/25/2025, 5:07:17 PM     LOG [Microservices:MediaService] Successfully encoded bb4cbd95-1b8b-4671-800b-392156292dca

Initializing Immich v1.139.3

Detected CPU Cores: 4

Starting microservices worker

In the UI the job status appears like this:

Image

Will have to downgrade to v1.138.1

@oscar-juarez commented on GitHub (Aug 25, 2025): I tried now with 1.139.3 uploading one picture: ``` LOG [Microservices:MetadataService] Wrote motion photo video to /data/encoded-video/8c7b786f-d43d-4b06-b4cf-8b27d800be6a/b4/c5/b4c55d13-c826-45d0-b75f-32899cd6dec2-MP.mp4 [Nest] 6 - 08/25/2025, 4:46:22 PM LOG [Microservices:MediaService] Transcoding video b4c55d13-c826-45d0-b75f-32899cd6dec2 with NVENC-accelerated encoding and software decoding [Nest] 6 - 08/25/2025, 4:46:23 PM ERROR [Microservices:MediaRepository] ffmpeg version 7.1.1-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14) configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=arm64 --cross-prefix=/usr/bin/aarch64-linux-gnu- --toolchain=hardened --enable-cross-compile --enable-rkmpp --enable-rkrga --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 [AVHWDeviceContext @ 0x7fae10c780] Cannot load libcuda.so.1 [AVHWDeviceContext @ 0x7fae10c780] Could not dynamically load CUDA Device creation failed: -1. Failed to set value 'cuda=cuda:0' for option 'init_hw_device': Operation not permitted Error parsing global options: Operation not permitted [Nest] 6 - 08/25/2025, 4:46:23 PM ERROR [Microservices:MediaService] Error occurred during transcoding: ffmpeg exited with code 255: Device creation failed: -1. Failed to set value 'cuda=cuda:0' for option 'init_hw_device': Operation not permitted Error parsing global options: Operation not permitted [Nest] 6 - 08/25/2025, 4:46:23 PM ERROR [Microservices:MediaService] Retrying with NVENC acceleration disabled [Nest] 6 - 08/25/2025, 4:46:24 PM LOG [Microservices:MediaService] Successfully encoded b4c55d13-c826-45d0-b75f-32899cd6dec2 Initializing Immich v1.139.3 Detected CPU Cores: 4 Starting microservices worker ``` An then after that every time that tries to generate thumbnails will always fail on those assets and keep restarting the service. Even if I turn off from the UI hardware I dont get the error anymore, says transcoding went well, but again restarts the worker and the thumbnails are broken and even if I click the image on the web it can't be loaded: ``` [Nest] 7 - 08/25/2025, 5:07:13 PM LOG [Microservices:MetadataService] Wrote motion photo video to /data/encoded-video/8c7b786f-d43d-4b06-b4cf-8b27d800be6a/0f/cc/0fcccb23-8364-43b6-9bf7-fe697c979a8f-MP.mp4 [Nest] 7 - 08/25/2025, 5:07:13 PM LOG [Microservices:MediaService] Transcoding video 0fcccb23-8364-43b6-9bf7-fe697c979a8f without hardware acceleration [Nest] 7 - 08/25/2025, 5:07:14 PM LOG [Microservices:MetadataService] Wrote motion photo video to /data/encoded-video/8c7b786f-d43d-4b06-b4cf-8b27d800be6a/bb/4c/bb4cbd95-1b8b-4671-800b-392156292dca-MP.mp4 [Nest] 7 - 08/25/2025, 5:07:16 PM LOG [Microservices:MediaService] Successfully encoded 0fcccb23-8364-43b6-9bf7-fe697c979a8f [Nest] 7 - 08/25/2025, 5:07:16 PM LOG [Microservices:MediaService] Transcoding video bb4cbd95-1b8b-4671-800b-392156292dca without hardware acceleration [Nest] 7 - 08/25/2025, 5:07:17 PM LOG [Microservices:MediaService] Successfully encoded bb4cbd95-1b8b-4671-800b-392156292dca Initializing Immich v1.139.3 Detected CPU Cores: 4 Starting microservices worker ``` In the UI the job status appears like this: <img width="497" height="169" alt="Image" src="https://github.com/user-attachments/assets/1c7b1a6f-daaa-4d17-a450-f9250bf2f50f" /> Will have to downgrade to v1.138.1
Author
Owner

@StefanRu1 commented on GitHub (Aug 25, 2025):

The issue happened without returning an exit code.
I’ve already enabled verbose logging, but it didn’t reveal the problematic file or an exit code..
After moving some older files (JPG/BMP) out of the external library, everything started working again.

I’d be happy to provide the files for debugging, but unfortunately, it’s not just a single file. I’d need to do more testing to isolate the exact one causing the problem.
This are perhaps 30 files in question.

Would it be possible to enhance the logging so that the specific file triggering the error is clearly identified? That would make it much easier for me to pinpoint and share the problematic file with you.

Thanks for your great work on Immich!

@StefanRu1 commented on GitHub (Aug 25, 2025): The issue happened without returning an exit code. I’ve already enabled verbose logging, but it didn’t reveal the problematic file or an exit code.. After moving some older files (JPG/BMP) out of the external library, everything started working again. I’d be happy to provide the files for debugging, but unfortunately, it’s not just a single file. I’d need to do more testing to isolate the exact one causing the problem. This are perhaps 30 files in question. Would it be possible to enhance the logging so that the specific file triggering the error is clearly identified? That would make it much easier for me to pinpoint and share the problematic file with you. Thanks for your great work on Immich!
Author
Owner

@bo0tzz commented on GitHub (Aug 25, 2025):

The UUID in {"id":"ecfff769-172c-4f6e-9627-165f6424a760"} is the ID of the asset, you can sub that into the photo viewer URL on the web.

@bo0tzz commented on GitHub (Aug 25, 2025): The UUID in `{"id":"ecfff769-172c-4f6e-9627-165f6424a760"}` is the ID of the asset, you can sub that into the photo viewer URL on the web.
Author
Owner

@StefanRu1 commented on GitHub (Aug 25, 2025):

Hi bo0tzz,

Thanks for your support. I’ve done some further digging and noticed something interesting:

When I query the ID of the last DCT error before the server restart, I get an image with a missing thumbnail. However, this image alone doesn’t seem to trigger the restart — it only happens when certain other files are present alongside it.

I suspect two BMP images might be contributing to the issue. I’ll continue testing them one by one to narrow it down.

@StefanRu1 commented on GitHub (Aug 25, 2025): Hi bo0tzz, Thanks for your support. I’ve done some further digging and noticed something interesting: When I query the ID of the last DCT error before the server restart, I get an image with a missing thumbnail. However, this image alone doesn’t seem to trigger the restart — it only happens when certain other files are present alongside it. I suspect two BMP images might be contributing to the issue. I’ll continue testing them one by one to narrow it down.
Author
Owner

@macross5 commented on GitHub (Aug 25, 2025):

I had the same issue, that all microservice jobs failed and the container are restarting. Sometimes he managed to generate thumbnails in between. I was despared, cause of no error logs. But after the rollback to 1.182.1 its working now.

@macross5 commented on GitHub (Aug 25, 2025): I had the same issue, that all microservice jobs failed and the container are restarting. Sometimes he managed to generate thumbnails in between. I was despared, cause of no error logs. But after the rollback to 1.182.1 its working now.
Author
Owner

@StefanRu1 commented on GitHub (Aug 25, 2025):

I’ve now identified two old bmp files which trigger the restart.

Vorstand1986.zip

@StefanRu1 commented on GitHub (Aug 25, 2025): I’ve now identified two old bmp files which trigger the restart. [Vorstand1986.zip](https://github.com/user-attachments/files/21975419/Vorstand1986.zip)
Author
Owner

@alextran1502 commented on GitHub (Aug 25, 2025):

@StefanRu1 Pretty strange, those files work ok on my instance 🤔

Image
@alextran1502 commented on GitHub (Aug 25, 2025): @StefanRu1 Pretty strange, those files work ok on my instance 🤔 <img width="348" height="310" alt="Image" src="https://github.com/user-attachments/assets/a26f4ad5-511b-45b7-9637-847b725e39e8" />
Author
Owner

@skatsubo commented on GitHub (Aug 25, 2025):

Similar crash in https://github.com/immich-app/immich/issues/21189 "v1.139.2 Docker Container Restart Loop"

@skatsubo commented on GitHub (Aug 25, 2025): Similar crash in https://github.com/immich-app/immich/issues/21189 "v1.139.2 Docker Container Restart Loop"
Author
Owner

@StefanRu1 commented on GitHub (Aug 26, 2025):

@alextran1502
I add the files in an external library.
Perhaps this makes a difference?

@StefanRu1 commented on GitHub (Aug 26, 2025): @alextran1502 I add the files in an external library. Perhaps this makes a difference?
Author
Owner

@alextran1502 commented on GitHub (Aug 26, 2025):

No, we think there is a build issue with for RaspberryPi image. Investigating

@alextran1502 commented on GitHub (Aug 26, 2025): No, we think there is a build issue with for RaspberryPi image. Investigating
Author
Owner

@StefanRu1 commented on GitHub (Aug 26, 2025):

Thanks for the quick response! Let me know if there's anything I can help analyze or test on my system to narrow this down further.

@StefanRu1 commented on GitHub (Aug 26, 2025): Thanks for the quick response! Let me know if there's anything I can help analyze or test on my system to narrow this down further.
Author
Owner

@skatsubo commented on GitHub (Aug 26, 2025):

@StefanRu1

If you have time, could you check if the issue is reproducible when using sharp directly from inside the immich container?

  1. Unpack the attached zip. It will create img directory.
    img.zip (in includes your BMPs)

  2. Mount "img" inside a temp immich container and try resizing those files using sharp. One long command:

docker run --rm -v ./img:/img --entrypoint node -e NODE_PATH=/usr/src/app/server/node_modules ghcr.io/immich-app/immich-server:v1.139.4 -e "
const sharp = require('sharp'); const fs = require('fs').promises; const path = require('path');
(async () => {
  const files = await fs.readdir('/img');
  console.log('Using sharp to resize images in /img:');
  for (const file of files) {
    const inputPath = path.join('/img', file);
    const outputPath = path.join('/img', 'test_resized_' + file);
    console.log('...', file, '- resizing');
    try {
      await sharp(inputPath)
      .resize(200, 200, { fit: 'inside' })
      .jpeg({ quality: 80 })
      .toFile(outputPath);
      console.log('[+]', file, '- ok');
      await fs.unlink(outputPath);        
    } catch (err) {
      console.log('[-]', file, '- error:', err.message);
    }
  }
})();
"
On my setup (not RPI) it prints [+]
Using sharp to resize images in /img:
... Img3-Vereinsmeister1986.BMP - resizing
[+] Img3-Vereinsmeister1986.BMP - ok
... Img3-Vorstand1986.BMP - resizing
[+] Img3-Vorstand1986.BMP - ok
... img1-IMG_7600.png - resizing
[+] img1-IMG_7600.png - ok
... img2-481725925-4a8c2ab0-760d-4ed4-809e-d30e3a65b102.jpg - resizing
[+] img2-481725925-4a8c2ab0-760d-4ed4-809e-d30e3a65b102.jpg - ok
... img4-PXL_20250812_131602005_1.jpg - resizing
[+] img4-PXL_20250812_131602005_1.jpg - ok
... img4-PXL_20250820_152948883.jpg - resizing
[+] img4-PXL_20250820_152948883.jpg - ok

Wondering if it crashes on RPI.

@skatsubo commented on GitHub (Aug 26, 2025): @StefanRu1 If you have time, could you check if the issue is reproducible when using sharp directly from inside the immich container? 1. Unpack the attached zip. It will create `img` directory. [img.zip](https://github.com/user-attachments/files/21987236/img.zip) (in includes your BMPs) 2. Mount "img" inside a temp immich container and try resizing those files using sharp. One long command: ```sh docker run --rm -v ./img:/img --entrypoint node -e NODE_PATH=/usr/src/app/server/node_modules ghcr.io/immich-app/immich-server:v1.139.4 -e " const sharp = require('sharp'); const fs = require('fs').promises; const path = require('path'); (async () => { const files = await fs.readdir('/img'); console.log('Using sharp to resize images in /img:'); for (const file of files) { const inputPath = path.join('/img', file); const outputPath = path.join('/img', 'test_resized_' + file); console.log('...', file, '- resizing'); try { await sharp(inputPath) .resize(200, 200, { fit: 'inside' }) .jpeg({ quality: 80 }) .toFile(outputPath); console.log('[+]', file, '- ok'); await fs.unlink(outputPath); } catch (err) { console.log('[-]', file, '- error:', err.message); } } })(); " ``` <details> <summary>On my setup (not RPI) it prints [+]</summary> ``` Using sharp to resize images in /img: ... Img3-Vereinsmeister1986.BMP - resizing [+] Img3-Vereinsmeister1986.BMP - ok ... Img3-Vorstand1986.BMP - resizing [+] Img3-Vorstand1986.BMP - ok ... img1-IMG_7600.png - resizing [+] img1-IMG_7600.png - ok ... img2-481725925-4a8c2ab0-760d-4ed4-809e-d30e3a65b102.jpg - resizing [+] img2-481725925-4a8c2ab0-760d-4ed4-809e-d30e3a65b102.jpg - ok ... img4-PXL_20250812_131602005_1.jpg - resizing [+] img4-PXL_20250812_131602005_1.jpg - ok ... img4-PXL_20250820_152948883.jpg - resizing [+] img4-PXL_20250820_152948883.jpg - ok ``` </details> Wondering if it crashes on RPI.
Author
Owner

@oscar-juarez commented on GitHub (Aug 26, 2025):

Hey @skatsubo I'm not @StefanRu1 but I ran it in my Pi 4B with 4GB of ram and bookworm

this is the output:

Using sharp to resize images in /img:
... Img3-Vereinsmeister1986.BMP - resizing
[+] Img3-Vereinsmeister1986.BMP - ok
... Img3-Vorstand1986.BMP - resizing
[+] Img3-Vorstand1986.BMP - ok
... img1-IMG_7600.png - resizing

Seems it stops there.

@oscar-juarez commented on GitHub (Aug 26, 2025): Hey @skatsubo I'm not @StefanRu1 but I ran it in my Pi 4B with 4GB of ram and bookworm this is the output: ``` Using sharp to resize images in /img: ... Img3-Vereinsmeister1986.BMP - resizing [+] Img3-Vereinsmeister1986.BMP - ok ... Img3-Vorstand1986.BMP - resizing [+] Img3-Vorstand1986.BMP - ok ... img1-IMG_7600.png - resizing ``` Seems it stops there.
Author
Owner

@jderuiter commented on GitHub (Aug 26, 2025):

I have a similar issue with the restart loop when uploading photos from my phone. I get the same output as @oscar-juarez:

Using sharp to resize images in /img:
... Img3-Vereinsmeister1986.BMP - resizing
[+] Img3-Vereinsmeister1986.BMP - ok
... Img3-Vorstand1986.BMP - resizing
[+] Img3-Vorstand1986.BMP - ok
... img1-IMG_7600.png - resizing

On a Raspberry Pi 4 with 8GB RAM and Bookworm (6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 GNU/Linux)

@jderuiter commented on GitHub (Aug 26, 2025): I have a similar issue with the restart loop when uploading photos from my phone. I get the same output as @oscar-juarez: ``` Using sharp to resize images in /img: ... Img3-Vereinsmeister1986.BMP - resizing [+] Img3-Vereinsmeister1986.BMP - ok ... Img3-Vorstand1986.BMP - resizing [+] Img3-Vorstand1986.BMP - ok ... img1-IMG_7600.png - resizing ``` On a Raspberry Pi 4 with 8GB RAM and Bookworm (`6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 GNU/Linux`)
Author
Owner

@oscar-juarez commented on GitHub (Aug 26, 2025):

@skatsubo btw Exit code was 132

@oscar-juarez commented on GitHub (Aug 26, 2025): @skatsubo btw Exit code was 132
Author
Owner

@skatsubo commented on GitHub (Aug 27, 2025):

@oscar-juarez @jderuiter thank you!

Next we can compare handling of the problematic image by older libvips (Debian) and newer libvips (Immich).
6-step guide.

  1. Run an ephemeral Immich container for tests
docker run -it --rm -v "$(pwd)/img:/img" --entrypoint bash ghcr.io/immich-app/immich-server:v1.139.4

Copy-paste the commands below into container's shell.

  1. Install tools.
IMG=img1-IMG_7600.png 
# allow installing packages from testing/sid
rm -f /etc/apt/preferences.d/preferences
apt-get update && apt-get install -y --no-install-recommends libvips-tools strace
  1. Create a test function.
test_vips() {
   vips --version
   ldd $(which vips) | grep vips
   echo -n "vipsheader... " ;    vipsheader /img/$IMG                                ; echo "Exit: $?"
   echo -n "vipsthumbnail... " ; vipsthumbnail /img/$IMG --size 200 -o /tmp/$IMG.jpg ; echo "Exit: $?"
   echo -n "vips copy... " ;     vips copy /img/$IMG /tmp/$IMG.jpg                   ; echo "Exit: $?"
}
  1. Test distro vips v8.16.
# distro vips v8.16 should work fine and return exit code 0
test_vips
  1. Test immich vips v8.17.
# immich vips v8.17 from /usr/local/lib
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
test_vips
  1. If any of the vips 8.17 commands crashes (exit code 132) then strace it and post/attach its output. For example:
strace -f -o /img/strace-thumb-$IMG.log vipsthumbnail /img/$IMG --size 200 -o /tmp/$IMG.jpg
@skatsubo commented on GitHub (Aug 27, 2025): @oscar-juarez @jderuiter thank you! Next we can compare handling of the problematic image by older libvips (Debian) and newer libvips (Immich). 6-step guide. 1. Run an ephemeral Immich container for tests ```sh docker run -it --rm -v "$(pwd)/img:/img" --entrypoint bash ghcr.io/immich-app/immich-server:v1.139.4 ``` Copy-paste the commands below into container's shell. 2. Install tools. ```sh IMG=img1-IMG_7600.png # allow installing packages from testing/sid rm -f /etc/apt/preferences.d/preferences apt-get update && apt-get install -y --no-install-recommends libvips-tools strace ``` 3. Create a test function. ```sh test_vips() { vips --version ldd $(which vips) | grep vips echo -n "vipsheader... " ; vipsheader /img/$IMG ; echo "Exit: $?" echo -n "vipsthumbnail... " ; vipsthumbnail /img/$IMG --size 200 -o /tmp/$IMG.jpg ; echo "Exit: $?" echo -n "vips copy... " ; vips copy /img/$IMG /tmp/$IMG.jpg ; echo "Exit: $?" } ``` 4. Test distro vips v8.16. ```sh # distro vips v8.16 should work fine and return exit code 0 test_vips ``` 5. Test immich vips v8.17. ```sh # immich vips v8.17 from /usr/local/lib export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" test_vips ``` 6. If any of the vips 8.17 commands crashes (exit code 132) then strace it and post/attach its output. For example: ```sh strace -f -o /img/strace-thumb-$IMG.log vipsthumbnail /img/$IMG --size 200 -o /tmp/$IMG.jpg ```
Author
Owner

@jderuiter commented on GitHub (Aug 27, 2025):

I get the following output for vips v8.16:

vips-8.16.1
	libvips.so.42 => /lib/aarch64-linux-gnu/libvips.so.42 (0x0000007f9da90000)
vipsheader... /img/img1-IMG_7600.png: 1179x2556 uchar, 3 bands, srgb, pngload
Exit: 0
vipsthumbnail... Exit: 0
vips copy... Exit: 0

vips v8.17 crashes with Illegal instruction:

vips-8.17.1
	libvips.so.42 => /usr/local/lib/libvips.so.42 (0x0000007fa7a90000)
vipsheader... /img/img1-IMG_7600.png: 1179x2556 uchar, 3 bands, srgb, pngload
Exit: 0
vipsthumbnail... Illegal instruction (core dumped)
Exit: 132
vips copy... Exit: 0

The output from strace is not very helpful:

Illegal instruction

Inspecting the coredump with gdb:

# gdb vipsthumbnail ./core 
GNU gdb (Debian 16.3-4) 16.3
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from vipsthumbnail...
(No debugging symbols found in vipsthumbnail)

warning: Can't open file /usr/lib/aarch64-linux-gnu/libexpat.so.1.8.10 during file-backed mapping note processing
[New LWP 1502]
[New LWP 1498]
[New LWP 1499]
[New LWP 1501]
[New LWP 1500]

warning: Build-id of /lib/aarch64-linux-gnu/libexpat.so.1 does not match core file.

warning: Could not load shared library symbols for /lib/aarch64-linux-gnu/libexpat.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
Core was generated by `vipsthumbnail /img/img1-IMG_7600.png --size 200 -o /tmp/img1-IMG_7600.png.jpg'.
Program terminated with signal SIGILL, Illegal instruction.
#0  0x0000007f8adaabcc in N_NEON_WITHOUT_AES::vips_shrinkv_add_line_uchar_hwy(unsigned char*, int, unsigned int*) () from /usr/local/lib/libvips.so.42
[Current thread is 1 (Thread 0x7f8355ebe0 (LWP 1502))]
(gdb) bt
#0  0x0000007f8adaabcc in N_NEON_WITHOUT_AES::vips_shrinkv_add_line_uchar_hwy(unsigned char*, int, unsigned int*) () from /usr/local/lib/libvips.so.42
#1  0x0000007f8adaa750 in vips_shrinkv_uchar_vector_gen () from /usr/local/lib/libvips.so.42
#2  0x0000007f8ae756dc in vips_region_prepare_to_generate () from /usr/local/lib/libvips.so.42
#3  0x0000007f8ae7e464 in vips_region_prepare_to () from /usr/local/lib/libvips.so.42
#4  0x0000007f8adea2bc in vips_tile_cache_gen () from /usr/local/lib/libvips.so.42
#5  0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#6  0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#7  0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#8  0x0000007f8adeb16c in vips_sequential_generate () from /usr/local/lib/libvips.so.42
#9  0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#10 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#11 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#12 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42
#13 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#14 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#15 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#16 0x0000007f8adf4a78 in vips_copy_gen () from /usr/local/lib/libvips.so.42
#17 0x0000007f8ae756dc in vips_region_prepare_to_generate () from /usr/local/lib/libvips.so.42
#18 0x0000007f8ae7e464 in vips_region_prepare_to () from /usr/local/lib/libvips.so.42
#19 0x0000007f8adf5a14 in vips_embed_base_gen () from /usr/local/lib/libvips.so.42
#20 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#21 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#22 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#23 0x0000007f8adaff68 in vips_reducev_uchar_vector_gen(_VipsRegion*, void*, void*, void*, int*) () from /usr/local/lib/libvips.so.42
#24 0x0000007f8ae756dc in vips_region_prepare_to_generate () from /usr/local/lib/libvips.so.42
#25 0x0000007f8ae7e464 in vips_region_prepare_to () from /usr/local/lib/libvips.so.42
#26 0x0000007f8adea2bc in vips_tile_cache_gen () from /usr/local/lib/libvips.so.42
#27 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#28 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#29 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#30 0x0000007f8adeb124 in vips_sequential_generate () from /usr/local/lib/libvips.so.42
#31 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#32 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#33 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#34 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42
#35 0x0000007f8ae756dc in vips_region_prepare_to_generate () from /usr/local/lib/libvips.so.42
#36 0x0000007f8ae7e464 in vips_region_prepare_to () from /usr/local/lib/libvips.so.42
#37 0x0000007f8adf5a14 in vips_embed_base_gen () from /usr/local/lib/libvips.so.42
#38 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#39 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#40 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#41 0x0000007f8ada7f98 in vips_shrinkh_uchar_vector_gen () from /usr/local/lib/libvips.so.42
#42 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#43 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#44 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#45 0x0000007f8adf4a78 in vips_copy_gen () from /usr/local/lib/libvips.so.42
#46 0x0000007f8ae756dc in vips_region_prepare_to_generate () from /usr/local/lib/libvips.so.42
#47 0x0000007f8ae7e464 in vips_region_prepare_to () from /usr/local/lib/libvips.so.42
#48 0x0000007f8adf5a14 in vips_embed_base_gen () from /usr/local/lib/libvips.so.42
#49 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#50 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#51 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#52 0x0000007f8adac250 in vips_reduceh_uchar_vector_gen(_VipsRegion*, void*, void*, void*, int*) () from /usr/local/lib/libvips.so.42
#53 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#54 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#55 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#56 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42
#57 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#58 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#59 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#60 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42
#61 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#62 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#63 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#64 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42
#65 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#66 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#67 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#68 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42
#69 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#70 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#71 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#72 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42
--Type <RET> for more, q to quit, c to continue without paging--
#73 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42
#74 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42
#75 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42
#76 0x0000007f8adf4a78 in vips_copy_gen () from /usr/local/lib/libvips.so.42
#77 0x0000007f8ae756dc in vips_region_prepare_to_generate () from /usr/local/lib/libvips.so.42
#78 0x0000007f8ae7e464 in vips_region_prepare_to () from /usr/local/lib/libvips.so.42
#79 0x0000007f8ae6d40c in wbuffer_work_fn () from /usr/local/lib/libvips.so.42
#80 0x0000007f8ae56bcc in vips_thread_main_loop () from /usr/local/lib/libvips.so.42
#81 0x0000007f8ae562d0 in vips_threadset_work () from /usr/local/lib/libvips.so.42
#82 0x0000007f8ae55e28 in vips_thread_run () from /usr/local/lib/libvips.so.42
#83 0x0000007f8ab755c0 in ?? () from /lib/aarch64-linux-gnu/libglib-2.0.so.0
#84 0x0000007f8a915f78 in ?? () from /lib/aarch64-linux-gnu/libc.so.6
#85 0x0000007f8a97dc1c in ?? () from /lib/aarch64-linux-gnu/libc.so.6
@jderuiter commented on GitHub (Aug 27, 2025): I get the following output for vips v8.16: ``` vips-8.16.1 libvips.so.42 => /lib/aarch64-linux-gnu/libvips.so.42 (0x0000007f9da90000) vipsheader... /img/img1-IMG_7600.png: 1179x2556 uchar, 3 bands, srgb, pngload Exit: 0 vipsthumbnail... Exit: 0 vips copy... Exit: 0 ``` vips v8.17 crashes with `Illegal instruction`: ``` vips-8.17.1 libvips.so.42 => /usr/local/lib/libvips.so.42 (0x0000007fa7a90000) vipsheader... /img/img1-IMG_7600.png: 1179x2556 uchar, 3 bands, srgb, pngload Exit: 0 vipsthumbnail... Illegal instruction (core dumped) Exit: 132 vips copy... Exit: 0 ``` The output from strace is not very helpful: ``` Illegal instruction ``` Inspecting the coredump with gdb: ``` # gdb vipsthumbnail ./core GNU gdb (Debian 16.3-4) 16.3 Copyright (C) 2024 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "aarch64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from vipsthumbnail... (No debugging symbols found in vipsthumbnail) warning: Can't open file /usr/lib/aarch64-linux-gnu/libexpat.so.1.8.10 during file-backed mapping note processing [New LWP 1502] [New LWP 1498] [New LWP 1499] [New LWP 1501] [New LWP 1500] warning: Build-id of /lib/aarch64-linux-gnu/libexpat.so.1 does not match core file. warning: Could not load shared library symbols for /lib/aarch64-linux-gnu/libexpat.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1". Core was generated by `vipsthumbnail /img/img1-IMG_7600.png --size 200 -o /tmp/img1-IMG_7600.png.jpg'. Program terminated with signal SIGILL, Illegal instruction. #0 0x0000007f8adaabcc in N_NEON_WITHOUT_AES::vips_shrinkv_add_line_uchar_hwy(unsigned char*, int, unsigned int*) () from /usr/local/lib/libvips.so.42 [Current thread is 1 (Thread 0x7f8355ebe0 (LWP 1502))] (gdb) bt #0 0x0000007f8adaabcc in N_NEON_WITHOUT_AES::vips_shrinkv_add_line_uchar_hwy(unsigned char*, int, unsigned int*) () from /usr/local/lib/libvips.so.42 #1 0x0000007f8adaa750 in vips_shrinkv_uchar_vector_gen () from /usr/local/lib/libvips.so.42 #2 0x0000007f8ae756dc in vips_region_prepare_to_generate () from /usr/local/lib/libvips.so.42 #3 0x0000007f8ae7e464 in vips_region_prepare_to () from /usr/local/lib/libvips.so.42 #4 0x0000007f8adea2bc in vips_tile_cache_gen () from /usr/local/lib/libvips.so.42 #5 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #6 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #7 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #8 0x0000007f8adeb16c in vips_sequential_generate () from /usr/local/lib/libvips.so.42 #9 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #10 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #11 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #12 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42 #13 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #14 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #15 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #16 0x0000007f8adf4a78 in vips_copy_gen () from /usr/local/lib/libvips.so.42 #17 0x0000007f8ae756dc in vips_region_prepare_to_generate () from /usr/local/lib/libvips.so.42 #18 0x0000007f8ae7e464 in vips_region_prepare_to () from /usr/local/lib/libvips.so.42 #19 0x0000007f8adf5a14 in vips_embed_base_gen () from /usr/local/lib/libvips.so.42 #20 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #21 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #22 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #23 0x0000007f8adaff68 in vips_reducev_uchar_vector_gen(_VipsRegion*, void*, void*, void*, int*) () from /usr/local/lib/libvips.so.42 #24 0x0000007f8ae756dc in vips_region_prepare_to_generate () from /usr/local/lib/libvips.so.42 #25 0x0000007f8ae7e464 in vips_region_prepare_to () from /usr/local/lib/libvips.so.42 #26 0x0000007f8adea2bc in vips_tile_cache_gen () from /usr/local/lib/libvips.so.42 #27 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #28 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #29 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #30 0x0000007f8adeb124 in vips_sequential_generate () from /usr/local/lib/libvips.so.42 #31 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #32 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #33 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #34 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42 #35 0x0000007f8ae756dc in vips_region_prepare_to_generate () from /usr/local/lib/libvips.so.42 #36 0x0000007f8ae7e464 in vips_region_prepare_to () from /usr/local/lib/libvips.so.42 #37 0x0000007f8adf5a14 in vips_embed_base_gen () from /usr/local/lib/libvips.so.42 #38 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #39 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #40 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #41 0x0000007f8ada7f98 in vips_shrinkh_uchar_vector_gen () from /usr/local/lib/libvips.so.42 #42 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #43 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #44 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #45 0x0000007f8adf4a78 in vips_copy_gen () from /usr/local/lib/libvips.so.42 #46 0x0000007f8ae756dc in vips_region_prepare_to_generate () from /usr/local/lib/libvips.so.42 #47 0x0000007f8ae7e464 in vips_region_prepare_to () from /usr/local/lib/libvips.so.42 #48 0x0000007f8adf5a14 in vips_embed_base_gen () from /usr/local/lib/libvips.so.42 #49 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #50 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #51 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #52 0x0000007f8adac250 in vips_reduceh_uchar_vector_gen(_VipsRegion*, void*, void*, void*, int*) () from /usr/local/lib/libvips.so.42 #53 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #54 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #55 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #56 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42 #57 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #58 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #59 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #60 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42 #61 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #62 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #63 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #64 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42 #65 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #66 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #67 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #68 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42 #69 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #70 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #71 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #72 0x0000007f8ae65bf8 in vips_image_write_gen () from /usr/local/lib/libvips.so.42 --Type <RET> for more, q to quit, c to continue without paging-- #73 0x0000007f8ae74404 in vips_region_generate () from /usr/local/lib/libvips.so.42 #74 0x0000007f8ae74fd0 in vips_region_fill () from /usr/local/lib/libvips.so.42 #75 0x0000007f8ae7e23c in vips_region_prepare () from /usr/local/lib/libvips.so.42 #76 0x0000007f8adf4a78 in vips_copy_gen () from /usr/local/lib/libvips.so.42 #77 0x0000007f8ae756dc in vips_region_prepare_to_generate () from /usr/local/lib/libvips.so.42 #78 0x0000007f8ae7e464 in vips_region_prepare_to () from /usr/local/lib/libvips.so.42 #79 0x0000007f8ae6d40c in wbuffer_work_fn () from /usr/local/lib/libvips.so.42 #80 0x0000007f8ae56bcc in vips_thread_main_loop () from /usr/local/lib/libvips.so.42 #81 0x0000007f8ae562d0 in vips_threadset_work () from /usr/local/lib/libvips.so.42 #82 0x0000007f8ae55e28 in vips_thread_run () from /usr/local/lib/libvips.so.42 #83 0x0000007f8ab755c0 in ?? () from /lib/aarch64-linux-gnu/libglib-2.0.so.0 #84 0x0000007f8a915f78 in ?? () from /lib/aarch64-linux-gnu/libc.so.6 #85 0x0000007f8a97dc1c in ?? () from /lib/aarch64-linux-gnu/libc.so.6 ```
Author
Owner

@skatsubo commented on GitHub (Aug 27, 2025):

@jderuiter Thanks a lot! Gdb output is definitely helpful.

What's in vips --targets?

Could you also try running vipsthumbnail with

export VIPS_NOVECTOR=1

Supposedly it disables the missing CPU feature.
If that works, you can add VIPS_NOVECTOR=1 to Immich env variables and see if it helps with thumbnail generation in Immich.

Related: 8.17: Illegal instruction with Highway when shrinking on ARM platforms without SVE #4647

@skatsubo commented on GitHub (Aug 27, 2025): @jderuiter Thanks a lot! Gdb output is definitely helpful. What's in `vips --targets`? Could you also try running `vipsthumbnail` with ```sh export VIPS_NOVECTOR=1 ``` Supposedly it disables the missing CPU feature. If that works, you can add `VIPS_NOVECTOR=1` to Immich env variables and see if it helps with thumbnail generation in Immich. Related: [8.17: Illegal instruction with Highway when shrinking on ARM platforms without SVE #4647](https://github.com/libvips/libvips/issues/4647)
Author
Owner

@aydarik commented on GitHub (Aug 27, 2025):

If that works, you can add VIPS_NOVECTOR=1 to Immich env variables and see if it helps with thumbnail generation in Immich.

I can confirm that adding the VIPS_NOVECTOR=1 flag resolves the issue - thumbnail generation now works fine without any crashes 👍

@aydarik commented on GitHub (Aug 27, 2025): > If that works, you can add `VIPS_NOVECTOR=1` to Immich env variables and see if it helps with thumbnail generation in Immich. I can confirm that adding the `VIPS_NOVECTOR=1` flag resolves the issue - thumbnail generation now works fine without any crashes 👍
Author
Owner

@ManuelBauer commented on GitHub (Aug 27, 2025):

Can also confirm that adding VIPS_NOVECTOR=1 to the .env file fixes the thumbnail generation issue on my Raspberry Pi 4 8GB (running Debian 13 "Trixie" aarch64) 👍

@ManuelBauer commented on GitHub (Aug 27, 2025): Can also confirm that adding `VIPS_NOVECTOR=1` to the `.env` file fixes the thumbnail generation issue on my Raspberry Pi 4 8GB (running Debian 13 "Trixie" aarch64) 👍
Author
Owner

@jderuiter commented on GitHub (Aug 27, 2025):

Just for completeness:

# vips --targets
builtin targets:   SVE2_128 SVE_256 SVE2 SVE NEON NEON_WITHOUT_AES
supported targets: NEON_WITHOUT_AES
# export VIPS_NOVECTOR=1
# test_vips
vips-8.17.1
	libvips.so.42 => /usr/local/lib/libvips.so.42 (0x0000007f962f0000)
vipsheader... /img/img1-IMG_7600.png: 1179x2556 uchar, 3 bands, srgb, pngload
Exit: 0
vipsthumbnail... Exit: 0
vips copy... Exit: 0
@jderuiter commented on GitHub (Aug 27, 2025): Just for completeness: ``` # vips --targets builtin targets: SVE2_128 SVE_256 SVE2 SVE NEON NEON_WITHOUT_AES supported targets: NEON_WITHOUT_AES # export VIPS_NOVECTOR=1 # test_vips vips-8.17.1 libvips.so.42 => /usr/local/lib/libvips.so.42 (0x0000007f962f0000) vipsheader... /img/img1-IMG_7600.png: 1179x2556 uchar, 3 bands, srgb, pngload Exit: 0 vipsthumbnail... Exit: 0 vips copy... Exit: 0 ```
Author
Owner

@ShlomiD83 commented on GitHub (Aug 27, 2025):

Can also confirm that adding VIPS_NOVECTOR=1 to the .env file fixes the thumbnail generation issue on my Raspberry Pi 4 8GB (running Debian 13 "Trixie" aarch64) 👍

Same here, adding VIPS_NOVECTOR=1 to my stack seems to fix the issue.

@ShlomiD83 commented on GitHub (Aug 27, 2025): > Can also confirm that adding `VIPS_NOVECTOR=1` to the `.env` file fixes the thumbnail generation issue on my Raspberry Pi 4 8GB (running Debian 13 "Trixie" aarch64) 👍 Same here, adding `VIPS_NOVECTOR=1` to my stack seems to fix the issue.
Author
Owner

@StefanRu1 commented on GitHub (Aug 27, 2025):

Confirmed: Setting the parameter VIPS_NOVECTOR=1 resolved the issue.

@StefanRu1 commented on GitHub (Aug 27, 2025): Confirmed: Setting the parameter VIPS_NOVECTOR=1 resolved the issue.
Author
Owner

@oscar-juarez commented on GitHub (Aug 27, 2025):

Another confirmation here, VIPS_NOVECTOR=1 fixes the crash in my raspberry pi

@oscar-juarez commented on GitHub (Aug 27, 2025): Another confirmation here, VIPS_NOVECTOR=1 fixes the crash in my raspberry pi
Author
Owner

@jmjanerfteam commented on GitHub (Aug 27, 2025):

Can also confirm that adding VIPS_NOVECTOR=1 to the .env file fixes the thumbnail generation issue on my Raspberry Pi 4 (4GB) running Debian 12 Bookworm (aarch64) with Immich v1.139.4 👍

@jmjanerfteam commented on GitHub (Aug 27, 2025): >Can also confirm that adding VIPS_NOVECTOR=1 to the .env file fixes the thumbnail generation issue on my Raspberry Pi 4 (4GB) running Debian 12 Bookworm (aarch64) with Immich v1.139.4 👍
Author
Owner

@fennek111 commented on GitHub (Aug 28, 2025):

Same here adding VIPS_NOVECTOR=1 to the .env file resolved the reboot loop 🫡on v1.139.4 build.3009

@fennek111 commented on GitHub (Aug 28, 2025): Same here adding VIPS_NOVECTOR=1 to the .env file resolved the reboot loop 🫡on v1.139.4 build.3009
Author
Owner

@naich58 commented on GitHub (Aug 28, 2025):

I can confirm that VIPS_NOVECTOR=1 fixes the same problem I was having on a Raspberry Pi 4. Thanks.

@naich58 commented on GitHub (Aug 28, 2025): I can confirm that VIPS_NOVECTOR=1 fixes the same problem I was having on a Raspberry Pi 4. Thanks.
Author
Owner

@bobiko commented on GitHub (Aug 29, 2025):

I confirm that adding VIPS_NOVECTOR=1 to the .env file solved the problem with Docker containers restarting while generating thumbnails on the RPi 4b 8GB.

@bobiko commented on GitHub (Aug 29, 2025): I confirm that adding `VIPS_NOVECTOR=1` to the .env file solved the problem with Docker containers restarting while generating thumbnails on the RPi 4b 8GB.
Author
Owner

@PC9DB commented on GitHub (Aug 29, 2025):

Got the issue after updating to v1.140.0 and I can also confirm that adding VIPS_NOVECTOR=1 to the .env file does the trick on my Raspberry Pi 4.

@PC9DB commented on GitHub (Aug 29, 2025): Got the issue after updating to v1.140.0 and I can also confirm that adding VIPS_NOVECTOR=1 to the .env file does the trick on my Raspberry Pi 4.
Author
Owner

@OrbitingOcelot commented on GitHub (Aug 30, 2025):

Ah, the new location update feature is god-sent, looking forward to improve my library location data.

Quick question regarding this though, what happens if I update locations for an image in an external library? I would assume no metadata gets written to the image, it is only updated in the database? And in the sidecar file, if thats enabled, right?

@OrbitingOcelot commented on GitHub (Aug 30, 2025): Ah, the new location update feature is god-sent, looking forward to improve my library location data. Quick question regarding this though, what happens if I update locations for an image in an external library? I would assume no metadata gets written to the image, it is only updated in the database? And in the sidecar file, if thats enabled, right?
Author
Owner

@IHtDzenda commented on GitHub (Aug 31, 2025):

Same here VIPS_NOVECTOR=1 fixes the crash in my raspberry pi 400. Thanks 🎊

@IHtDzenda commented on GitHub (Aug 31, 2025): Same here `VIPS_NOVECTOR=1` fixes the crash in my raspberry pi 400. Thanks 🎊
Author
Owner

@schuettecarsten commented on GitHub (Aug 31, 2025):

Confirmed, VIPS_NOVECTOR=1 fixes this on my Rpi 4, too

@schuettecarsten commented on GitHub (Aug 31, 2025): Confirmed, VIPS_NOVECTOR=1 fixes this on my Rpi 4, too
Author
Owner

@bedhededdy commented on GitHub (Aug 31, 2025):

Also able to confirm on my Raspberry Pi 4b. Should we remove that from our env variables after a fix is pushed?

@bedhededdy commented on GitHub (Aug 31, 2025): Also able to confirm on my Raspberry Pi 4b. Should we remove that from our env variables after a fix is pushed?
Author
Owner

@harrismat85 commented on GitHub (Sep 1, 2025):

Getting same issue. VIPS doesn't change the problem

@harrismat85 commented on GitHub (Sep 1, 2025): Getting same issue. VIPS doesn't change the problem
Author
Owner

@bertikus-maximus commented on GitHub (Sep 1, 2025):

+1 that adding VIPS_NOVECTOR=1 to the .env resolves problems with images not displaying when using a Raspberry Pi 4b 4GB.

@bertikus-maximus commented on GitHub (Sep 1, 2025): +1 that adding VIPS_NOVECTOR=1 to the .env resolves problems with images not displaying when using a Raspberry Pi 4b 4GB.
Author
Owner

@Vojtik69 commented on GitHub (Sep 2, 2025):

Raspberry Pi 4 Model B Rev 1.4 8GB, Immich v1.140.1, same issue (also when uploading photos app to server and it immediately started to create thumbnails) and also helped to add VIPS_NOVECTOR=1 to the .env

@Vojtik69 commented on GitHub (Sep 2, 2025): Raspberry Pi 4 Model B Rev 1.4 8GB, Immich v1.140.1, same issue (also when uploading photos app to server and it immediately started to create thumbnails) and also helped to add VIPS_NOVECTOR=1 to the .env
Author
Owner

@rodrigoGA commented on GitHub (Sep 2, 2025):

In my case #21511 , after setting VIPS_NOVECTOR=1, the server doesn’t show the version. Also, to clarify, in my situation it simply restarts (without showing any logs). It’s not that images don’t display, the web app doesn’t even load

Image
@rodrigoGA commented on GitHub (Sep 2, 2025): In my case #21511 , after setting VIPS_NOVECTOR=1, the server doesn’t show the version. Also, to clarify, in my situation it simply restarts (without showing any logs). It’s not that images don’t display, the web app doesn’t even load <img width="509" height="873" alt="Image" src="https://github.com/user-attachments/assets/6e89b57a-a9c8-48f0-abaf-c43a5ceca458" />
Author
Owner

@ikke-t commented on GitHub (Sep 2, 2025):

I have raspi 4 with 4GB of ram. It's been working fine until the upgrade from 146-137 to 140. But now I hit the thumbnail error. I added VIPS_NOVECTOR=1 env for container, but it still fails the same:

[Nest] 2  - 09/02/2025, 12:46:12 PM   ERROR [Microservices:{"id":"5d6bc4c9-2564-4d34-99e7-b5aaaf6e5601"}] Unable to run job handler (AssetGenerateThumbnails): Error: VipsJpeg: premature end of JPEG image
Error: VipsJpeg: premature end of JPEG image
    at Sharp.toBuffer (/usr/src/app/server/node_modules/.pnpm/sharp@0.34.2/node_modules/sharp/lib/output.js:163:17)
    at MediaRepository.decodeImage (/usr/src/app/server/dist/repositories/media.repository.js:105:68)
    at MediaService.decodeImage (/usr/src/app/server/dist/services/media.service.js:177:59)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async MediaService.generateImageThumbnails (/usr/src/app/server/dist/services/media.service.js:189:44)
    at async MediaService.handleGenerateThumbnails (/usr/src/app/server/dist/services/media.service.js:116:25)
    at async JobService.onJobStart (/usr/src/app/server/dist/services/job.service.js:198:28)
    at async EventRepository.onEvent (/usr/src/app/server/dist/repositories/event.repository.js:126:13)
    at async /usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:496:32
    at async Worker.retryIfFailed (/usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:774:24)

image: ghcr.io/immich-app/immich-server:v1.140.1

$ echo $VIPS_NOVECTOR
1

ah, ok, the container won't crash anymore and I can see the thumbnails. So kinda works. Thanks.

@ikke-t commented on GitHub (Sep 2, 2025): I have raspi 4 with 4GB of ram. It's been working fine until the upgrade from 146-137 to 140. But now I hit the thumbnail error. I added `VIPS_NOVECTOR=1` env for container, but it still fails the same: ``` [Nest] 2 - 09/02/2025, 12:46:12 PM ERROR [Microservices:{"id":"5d6bc4c9-2564-4d34-99e7-b5aaaf6e5601"}] Unable to run job handler (AssetGenerateThumbnails): Error: VipsJpeg: premature end of JPEG image Error: VipsJpeg: premature end of JPEG image at Sharp.toBuffer (/usr/src/app/server/node_modules/.pnpm/sharp@0.34.2/node_modules/sharp/lib/output.js:163:17) at MediaRepository.decodeImage (/usr/src/app/server/dist/repositories/media.repository.js:105:68) at MediaService.decodeImage (/usr/src/app/server/dist/services/media.service.js:177:59) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async MediaService.generateImageThumbnails (/usr/src/app/server/dist/services/media.service.js:189:44) at async MediaService.handleGenerateThumbnails (/usr/src/app/server/dist/services/media.service.js:116:25) at async JobService.onJobStart (/usr/src/app/server/dist/services/job.service.js:198:28) at async EventRepository.onEvent (/usr/src/app/server/dist/repositories/event.repository.js:126:13) at async /usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:496:32 at async Worker.retryIfFailed (/usr/src/app/server/node_modules/.pnpm/bullmq@5.57.0/node_modules/bullmq/dist/cjs/classes/worker.js:774:24) ``` image: ghcr.io/immich-app/immich-server:v1.140.1 ``` $ echo $VIPS_NOVECTOR 1 ``` ah, ok, the container won't crash anymore and I can see the thumbnails. So kinda works. Thanks.
Author
Owner

@DinikS commented on GitHub (Sep 3, 2025):

I'm experiencing the exact same issue on Raspberry Pi 4 (ARM64) with Immich v1.140.1.

Environment:

  • Raspberry Pi 4 8GB
  • OpenMediaVault 6
  • Docker 24.0.7
  • Exit Code 132 (SIGILL) on photo upload

Same behavior: videos work fine, photos cause immediate SIGILL.

I can confirm this is not specific to Pi 5 - affects Pi 4 as well.

Has there been any progress on identifying the root cause in the sharp library or Node.js compatibility?

UPD

Confirming that VIPS_NOVECTOR=1 environment variable solves the SIGILL (Exit Code 132) issue on Raspberry Pi 4 with Immich v1.140.1.

Adding environment: - VIPS_NOVECTOR=1 to the immich-server service in docker-compose.yml completely resolved the photo upload crashes.

Thank you for the solution!

@DinikS commented on GitHub (Sep 3, 2025): I'm experiencing the exact same issue on **Raspberry Pi 4** (ARM64) with Immich v1.140.1. **Environment:** - Raspberry Pi 4 8GB - OpenMediaVault 6 - Docker 24.0.7 - Exit Code 132 (SIGILL) on photo upload Same behavior: videos work fine, photos cause immediate SIGILL. I can confirm this is not specific to Pi 5 - affects Pi 4 as well. Has there been any progress on identifying the root cause in the sharp library or Node.js compatibility? **UPD** Confirming that `VIPS_NOVECTOR=1` environment variable solves the SIGILL (Exit Code 132) issue on **Raspberry Pi 4** with Immich v1.140.1. Adding `environment: - VIPS_NOVECTOR=1` to the immich-server service in docker-compose.yml completely resolved the photo upload crashes. Thank you for the solution!
Author
Owner

@skatsubo commented on GitHub (Sep 3, 2025):

@DinikS

Has there been any progress on identifying the root cause in the sharp library or Node.js compatibility?

https://github.com/libvips/libvips/issues/4647 "8.17: Illegal instruction with Highway when shrinking on ARM platforms without SVE"
https://github.com/google/highway/issues/2689 "SIGILL on NEON_WITHOUT_AES with GCC < 14"

@skatsubo commented on GitHub (Sep 3, 2025): @DinikS > Has there been any progress on identifying the root cause in the sharp library or Node.js compatibility? https://github.com/libvips/libvips/issues/4647 "8.17: Illegal instruction with Highway when shrinking on ARM platforms without SVE" https://github.com/google/highway/issues/2689 "SIGILL on NEON_WITHOUT_AES with GCC < 14"
Author
Owner

@polomani commented on GitHub (Sep 3, 2025):

I started experiencing crashes of the container (microservice only, API disabled) when trying to generate thumbnails for version v1.138.1 and higher.😢

Until and including v1.137.3, everything was working fine for me (in fact, if I downgrade to 1.137.3 & rollback the DB, I have no issues), but once I upgrade to v138/139/140 I cannot generate any thumbnails.

There is no error message, but I can pinpoint it's the thumbnail generation because the service doesn't crash if I disable the job.

I also run on Raspberry Pi 4, btw. Beta timeline disabled.

Just tried VIPS_NOVECTOR=1, it stops the crashes 👍

@polomani commented on GitHub (Sep 3, 2025): I started experiencing crashes of the container (microservice only, API disabled) when trying to generate thumbnails for version `v1.138.1` and higher.😢 Until and including `v1.137.3`, everything was working fine for me (in fact, if I downgrade to 1.137.3 & rollback the DB, I have no issues), but once I upgrade to v138/139/140 I cannot generate any thumbnails. There is no error message, but I can pinpoint it's the thumbnail generation because the service doesn't crash if I disable the job. I also run on Raspberry Pi 4, btw. Beta timeline disabled. Just tried `VIPS_NOVECTOR=1`, it stops the crashes 👍
Author
Owner

@BeppeMarnell commented on GitHub (Sep 4, 2025):

I can confirm that adding the following to the server solves the issue on 1.140.1 ! Thank you all!

environment:
    - VIPS_NOVECTOR=1

I have a 8gb pi4.

@BeppeMarnell commented on GitHub (Sep 4, 2025): I can confirm that adding the following to the server solves the issue on 1.140.1 ! Thank you all! ``` environment: - VIPS_NOVECTOR=1 ``` I have a 8gb pi4.
Author
Owner

@mmBesar commented on GitHub (Sep 10, 2025):

This was killing me!
This line was the real fix

environment:
    VIPS_NOVECTOR: 1 # fix "immich exited with code 132" error on v1.141.1

Thank you.

I'll keep an eye on this issue for an upstream fix!

Edit01:
My server is Pi4 8GB

@mmBesar commented on GitHub (Sep 10, 2025): This was killing me! This line was the real fix ``` environment: VIPS_NOVECTOR: 1 # fix "immich exited with code 132" error on v1.141.1 ``` Thank you. I'll keep an eye on this issue for an upstream fix! Edit01: My server is Pi4 8GB
Author
Owner

@skatsubo commented on GitHub (Sep 12, 2025):

v1.142.0 arrived with the fix for RPi 4 🎉
After upgrading you can/should undo the workaround (remove the env var) for better performance.

Notable fix: Raspberry Pi 4 crashes when generating thumbnails
If you were affected by this bug and set the environmental variable VIPS_NOVECTOR=1, you should remove this variable when upgrading to this Immich release or above.

@skatsubo commented on GitHub (Sep 12, 2025): [v1.142.0](https://github.com/immich-app/immich/releases/tag/v1.142.0) arrived with the fix for RPi 4 🎉 After upgrading you can/should undo the workaround (remove the env var) for better performance. > Notable fix: Raspberry Pi 4 crashes when generating thumbnails > If you were affected by this bug and set the environmental variable `VIPS_NOVECTOR=1`, you should remove this variable when upgrading to this Immich release or above.
Author
Owner

@StefanRu1 commented on GitHub (Sep 13, 2025):

Thank you so much!

@StefanRu1 commented on GitHub (Sep 13, 2025): Thank you so much!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#6965