Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.95.1 : ERROR: internal error: entered unreachable code #7307

Closed
2 of 3 tasks
Xav-Pe opened this issue Feb 21, 2024 · 1 comment
Closed
2 of 3 tasks

1.95.1 : ERROR: internal error: entered unreachable code #7307

Xav-Pe opened this issue Feb 21, 2024 · 1 comment

Comments

@Xav-Pe
Copy link

Xav-Pe commented Feb 21, 2024

The bug

After the update to 1.95.1, the postgres container tells this, and the app remains unreacheable :

immich_postgres          | 2024-02-21 13:47:03.609 UTC [41] ERROR:  pgvecto.rs: The index is not existing in the background worker.
immich_postgres          |      ADVICE: Drop or rebuild the index.
immich_postgres          | 2024-02-21 13:47:03.609 UTC [41] STATEMENT:
immich_postgres          |                SELECT idx_status
immich_postgres          |                FROM pg_vector_index_stat
immich_postgres          |                WHERE indexname = $1
immich_postgres          | 2024-02-21 13:47:03.798 UTC [41] ERROR:  internal error: entered unreachable code
immich_postgres          | 2024-02-21 13:47:03.798 UTC [41] STATEMENT:  REINDEX INDEX face_index

Here is the complete log :

❯ dc up
[+] Running 6/6
 ✔ Network immich_internal            Created                                                                                                                                                                                            0.1s
 ✔ Container immich_postgres          Created                                                                                                                                                                                            0.1s
 ✔ Container immich_machine_learning  Created                                                                                                                                                                                            0.1s
 ✔ Container immich_redis             Created                                                                                                                                                                                            0.1s
 ✔ Container immich_microservices     Created                                                                                                                                                                                            0.0s
 ✔ Container immich_server            Created                                                                                                                                                                                            0.1s
Attaching to immich_machine_learning, immich_microservices, immich_postgres, immich_redis, immich_server
immich_redis             | 1:C 21 Feb 2024 13:42:31.872 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
immich_redis             | 1:C 21 Feb 2024 13:42:31.872 # Redis version=6.2.14, bits=64, commit=00000000, modified=0, pid=1, just started
immich_redis             | 1:C 21 Feb 2024 13:42:31.872 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
immich_redis             | 1:M 21 Feb 2024 13:42:31.873 * monotonic clock: POSIX clock_gettime
immich_redis             | 1:M 21 Feb 2024 13:42:31.874 * Running mode=standalone, port=6379.
immich_redis             | 1:M 21 Feb 2024 13:42:31.874 # Server initialized
immich_redis             | 1:M 21 Feb 2024 13:42:31.874 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
immich_redis             | 1:M 21 Feb 2024 13:42:31.874 * Ready to accept connections
immich_postgres          |
immich_postgres          | PostgreSQL Database directory appears to contain a database; Skipping initialization
immich_postgres          |
immich_postgres          | 2024-02-21 13:42:32.045 UTC [1] LOG:  starting PostgreSQL 14.10 (Debian 14.10-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
immich_postgres          | 2024-02-21 13:42:32.045 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
immich_postgres          | 2024-02-21 13:42:32.045 UTC [1] LOG:  listening on IPv6 address "::", port 5432
immich_postgres          | 2024-02-21 13:42:32.051 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
immich_postgres          | 2024-02-21 13:42:32.056 UTC [27] LOG:  database system was shut down at 2024-02-21 13:42:24 UTC
immich_postgres          | [2024-02-21T13:42:32Z INFO  service::utils::clean] Delete outdated directory "pg_vectors/indexes/1125820".
immich_postgres          | 2024-02-21 13:42:32.099 UTC [1] LOG:  database system is ready to accept connections
immich_machine_learning  | [02/21/24 13:42:33] INFO     Starting gunicorn 21.2.0
immich_machine_learning  | [02/21/24 13:42:33] INFO     Listening at: http://0.0.0.0:3003 (9)
immich_machine_learning  | [02/21/24 13:42:33] INFO     Using worker: app.config.CustomUvicornWorker
immich_machine_learning  | [02/21/24 13:42:33] INFO     Booting worker with pid: 17
immich_microservices     | [Nest] 7  - 02/21/2024, 1:42:34 PM     LOG [CommunicationRepository] Initialized websocket server
immich_postgres          | 2024-02-21 13:42:34.289 UTC [41] ERROR:  pgvecto.rs: The index is not existing in the background worker.
immich_postgres          |      ADVICE: Drop or rebuild the index.
immich_postgres          | 2024-02-21 13:42:34.289 UTC [41] STATEMENT:
immich_postgres          |                SELECT idx_status
immich_postgres          |                FROM pg_vector_index_stat
immich_postgres          |                WHERE indexname = $1
immich_postgres          | 2024-02-21 13:42:34.302 UTC [41] ERROR:  internal error: entered unreachable code
immich_postgres          | 2024-02-21 13:42:34.302 UTC [41] STATEMENT:  REINDEX INDEX clip_index
immich_microservices     | [Nest] 7  - 02/21/2024, 1:42:34 PM    WARN [DatabaseRepository] Could not reindex index clip_index. Attempting to auto-fix.
immich_server            | [Nest] 7  - 02/21/2024, 1:42:34 PM     LOG [CommunicationRepository] Initialized websocket server
immich_machine_learning  | [02/21/24 13:42:36] INFO     Started server process [17]
immich_machine_learning  | [02/21/24 13:42:36] INFO     Waiting for application startup.
immich_machine_learning  | [02/21/24 13:42:36] INFO     Created in-memory cache with unloading after 300s
immich_machine_learning  |                              of inactivity.
immich_machine_learning  | [02/21/24 13:42:36] INFO     Initialized request thread pool with 8 threads.
immich_machine_learning  | [02/21/24 13:42:36] INFO     Application startup complete.
immich_postgres          | 2024-02-21 13:47:03.609 UTC [41] ERROR:  pgvecto.rs: The index is not existing in the background worker.
immich_postgres          |      ADVICE: Drop or rebuild the index.
immich_postgres          | 2024-02-21 13:47:03.609 UTC [41] STATEMENT:
immich_postgres          |                SELECT idx_status
immich_postgres          |                FROM pg_vector_index_stat
immich_postgres          |                WHERE indexname = $1
immich_postgres          | 2024-02-21 13:47:03.798 UTC [41] ERROR:  internal error: entered unreachable code
immich_postgres          | 2024-02-21 13:47:03.798 UTC [41] STATEMENT:  REINDEX INDEX face_index
immich_microservices     | [Nest] 7  - 02/21/2024, 1:47:03 PM    WARN [DatabaseRepository] Could not reindex index face_index. Attempting to auto-fix.

The OS that Immich Server is running on

Debia n12

Version of Immich Server

v1.95.1

Version of Immich Mobile App

no used

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

networks:
  internal:

volumes:
  pgdata:
    external: true
    name: immich_pgdata
  model-cache:
    external: true
    name: immich_model-cache
  uploads:
    external: true
    name: immich_uploads

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${IMMICH_UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ${IMMICH_EXTERNAL_PATH}:/ext
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always
    environment:
      DB_HOSTNAME: ${IMMICH_DB_HOSTNAME}
      DB_PASSWORD: ${IMMICH_DB_PASSWORD}
      DB_USERNAME: ${IMMICH_DB_USERNAME}
      DB_DATABASE_NAME: ${IMMICH_DB_DATABASE_NAME}
      IMMICH_VERSION: ${IMMICH_VERSION}
      UPLOAD_LOCATION: ${IMMICH_UPLOAD_LOCATION}
      REDIS_HOSTNAME: ${IMMICH_REDIS_HOSTNAME}
    networks:
      - internal

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # From hwaccess.yaml
    devices:
      - /dev/dri:/dev/dri
    # End of hwaccess
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${IMMICH_UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ${IMMICH_EXTERNAL_PATH}:/ext
    depends_on:
      - redis
      - database
    restart: always
    environment:
      DB_HOSTNAME: ${IMMICH_DB_HOSTNAME}
      DB_PASSWORD: ${IMMICH_DB_PASSWORD}
      DB_USERNAME: ${IMMICH_DB_USERNAME}
      DB_DATABASE_NAME: ${IMMICH_DB_DATABASE_NAME}
      IMMICH_VERSION: ${IMMICH_VERSION}
      UPLOAD_LOCATION: ${IMMICH_UPLOAD_LOCATION}
      REDIS_HOSTNAME: ${IMMICH_REDIS_HOSTNAME}
    networks:
      - internal

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    restart: always
    environment:
      DB_HOSTNAME: ${IMMICH_DB_HOSTNAME}
      DB_PASSWORD: ${IMMICH_DB_PASSWORD}
      DB_USERNAME: ${IMMICH_DB_USERNAME}
      DB_DATABASE_NAME: ${IMMICH_DB_DATABASE_NAME}
      IMMICH_VERSION: ${IMMICH_VERSION}
      UPLOAD_LOCATION: ${IMMICH_UPLOAD_LOCATION}
      REDIS_HOSTNAME: ${IMMICH_REDIS_HOSTNAME}
    networks:
      - internal

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:c5a607fb6e1bb15d32bbcf14db22787d19e428d59e31a5da67511b49bb0f1ccc
    restart: always
    environment:
      DB_HOSTNAME: ${IMMICH_DB_HOSTNAME}
      DB_PASSWORD: ${IMMICH_DB_PASSWORD}
      DB_USERNAME: ${IMMICH_DB_USERNAME}
      DB_DATABASE_NAME: ${IMMICH_DB_DATABASE_NAME}
      IMMICH_VERSION: ${IMMICH_VERSION}
      UPLOAD_LOCATION: ${IMMICH_UPLOAD_LOCATION}
      REDIS_HOSTNAME: ${IMMICH_REDIS_HOSTNAME}
    networks:
      - internal
    deploy:
      resources:
        limits:
          cpus: "0.5"
          memory: 256M

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${IMMICH_DB_PASSWORD}
      POSTGRES_USER: ${IMMICH_DB_USERNAME}
      POSTGRES_DB: ${IMMICH_DB_DATABASE_NAME}
      IMMICH_VERSION: ${IMMICH_VERSION}
      UPLOAD_LOCATION: ${IMMICH_UPLOAD_LOCATION}
      REDIS_HOSTNAME: ${IMMICH_REDIS_HOSTNAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always
    networks:
      - internal
    deploy:
      resources:
        limits:
          cpus: "0.5"
          memory: 1G

Your .env content

export IMMICH_UPLOAD_LOCATION=uploads
export IMMICH_VERSION=release
export IMMICH_DB_PASSWORD=secret
export IMMICH_DB_HOSTNAME=immich_postgres
export IMMICH_DB_USERNAME=postgres
export IMMICH_DB_DATABASE_NAME=immich
export IMMICH_REDIS_HOSTNAME=immich_redis
export IMMICH_EXTERNAL_PATH=/nas

Reproduction steps

dc pull
dc up
dc down
dc up

Additional information

No response

@Xav-Pe Xav-Pe closed this as completed Feb 21, 2024
@Xav-Pe
Copy link
Author

Xav-Pe commented Feb 21, 2024

it juste took around 30min to complete.

@Xav-Pe Xav-Pe changed the title 1.95.1 : STATEMENT: REINDEX INDEX face_index 1.95.1 : ERROR: internal error: entered unreachable code Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant