5
Any way to run lemmy => 0.19.2 in docker on arm64? It crashes with error 139
(lemmy.cyberveins.eu)
@dessalines@lemmy.ml (I mention you since you are the image maintainer...)
Summary
Using docker images > 0.19.1 leads to crash of the lemmy-1 process (exit code 0 and then 139) on ARM64 (not tested on X86_64)
Steps to Reproduce Take a WORKING docker-compose file such as:
version: "3.7"
x-logging: &default-logging
driver: "json-file"
options:
max-size: "50m"
max-file: "4"
services:
lemmy:
image: dessalines/lemmy:0.19.1
hostname: lemmy
restart: unless-stopped
environment:
- RUST_LOG="warn,lemmy_server=debug,lemmy_api=debug,lemmy_api_common=debug,lemmy_api_crud=debug,lemmy_apub=debug,lemmy_db_schema=debug,lemmy_db_views=debug,lemmy_db_views_actor=debug,lemmy_db_views_moderator=debug,lemmy_routes=debug,lemmy_utils=debug,lemmy_websocket=debug"
- RUST_BACKTRACE=full
ports:
- "8536:8536"
- "6669:6669"
volumes:
- ./lemmy.hjson:/config/config.hjson:Z
depends_on:
- postgres
- pictrs
logging: *default-logging
lemmy-ui:
# use "image" to pull down an already compiled lemmy-ui. make sure to comment out "build".
image: dessalines/lemmy-ui:0.19.1
ports:
- "1235:1234"
environment:
- LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536
- LEMMY_UI_LEMMY_EXTERNAL_HOST=192.168.153.3:8536
- LEMMY_UI_HTTPS=false
- LEMMY_UI_DEBUG=true
depends_on:
- lemmy
restart: unless-stopped
logging: *default-logging
init: true
pictrs:
image: asonix/pictrs:0.5.0-rc.2
hostname: pictrs
environment:
- PICTRS_OPENTELEMETRY_URL=http://otel:4137
- PICTRS__API_KEY=API_KEY
- RUST_LOG=debug
- RUST_BACKTRACE=full
- PICTRS__MEDIA__VIDEO_CODEC=vp9
- PICTRS__MEDIA__GIF__MAX_WIDTH=256
- PICTRS__MEDIA__GIF__MAX_HEIGHT=256
- PICTRS__MEDIA__GIF__MAX_AREA=65536
- PICTRS__MEDIA__GIF__MAX_FRAME_COUNT=400
user: 991:991
ports:
- "127.0.0.1:8537:8080"
- "127.0.0.1:6670:6669"
volumes:
- ./volumes/pictrs:/mnt:Z
restart: unless-stopped
logging: *default-logging
postgres:
image: postgres:16-alpine
hostname: postgres
command:
[
"postgres",
"-c",
"session_preload_libraries=auto_explain",
"-c",
"auto_explain.log_min_duration=5ms",
"-c",
"auto_explain.log_analyze=true",
"-c",
"track_activity_query_size=1048576",
]
ports:
- "5433:5432"
environment:
- POSTGRES_USER=lemmy
- POSTGRES_PASSWORD=__REDACTED__
- POSTGRES_DB=lemmy
volumes:
- ./volumes/postgres:/var/lib/postgresql/data:Z
restart: unless-stopped
logging: *default-logging
Change the image of lemmy (lemmy-ui can be whatever, it's not a problem) to a > 0.19.1
version: "3.7"
x-logging: &default-logging
driver: "json-file"
options:
max-size: "50m"
max-file: "4"
services:
lemmy:
image: dessalines/lemmy:0.19.3
hostname: lemmy
restart: unless-stopped
environment:
- RUST_LOG="warn,lemmy_server=debug,lemmy_api=debug,lemmy_api_common=debug,lemmy_api_crud=debug,lemmy_apub=debug,lemmy_db_schema=debug,lemmy_db_views=debug,lemmy_db_views_actor=debug,lemmy_db_views_moderator=debug,lemmy_routes=debug,lemmy_utils=debug,lemmy_websocket=debug"
- RUST_BACKTRACE=full
ports:
- "8536:8536"
- "6669:6669"
volumes:
- ./lemmy.hjson:/config/config.hjson:Z
depends_on:
- postgres
- pictrs
logging: *default-logging
lemmy-ui:
# use "image" to pull down an already compiled lemmy-ui. make sure to comment out "build".
image: dessalines/lemmy-ui:0.19.3
ports:
- "1235:1234"
environment:
- LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536
- LEMMY_UI_LEMMY_EXTERNAL_HOST=192.168.153.3:8536
- LEMMY_UI_HTTPS=false
- LEMMY_UI_DEBUG=true
depends_on:
- lemmy
restart: unless-stopped
logging: *default-logging
init: true
pictrs:
image: asonix/pictrs:0.5.0-rc.2
hostname: pictrs
environment:
- PICTRS_OPENTELEMETRY_URL=http://otel:4137
- PICTRS__API_KEY=API_KEY
- RUST_LOG=debug
- RUST_BACKTRACE=full
- PICTRS__MEDIA__VIDEO_CODEC=vp9
- PICTRS__MEDIA__GIF__MAX_WIDTH=256
- PICTRS__MEDIA__GIF__MAX_HEIGHT=256
- PICTRS__MEDIA__GIF__MAX_AREA=65536
- PICTRS__MEDIA__GIF__MAX_FRAME_COUNT=400
user: 991:991
ports:
- "127.0.0.1:8537:8080"
- "127.0.0.1:6670:6669"
volumes:
- ./volumes/pictrs:/mnt:Z
restart: unless-stopped
logging: *default-logging
postgres:
image: postgres:16-alpine
hostname: postgres
command:
[
"postgres",
"-c",
"session_preload_libraries=auto_explain",
"-c",
"auto_explain.log_min_duration=5ms",
"-c",
"auto_explain.log_analyze=true",
"-c",
"track_activity_query_size=1048576",
]
ports:
- "5433:5432"
environment:
- POSTGRES_USER=lemmy
- POSTGRES_PASSWORD=__REDACTED__
- POSTGRES_DB=lemmy
volumes:
- ./volumes/postgres:/var/lib/postgresql/data:Z
restart: unless-stopped
logging: *default-logging
docker-compose up
<-- this leads to an exit code 0 and then 139 of contain lemmy-1
Technical Details
File lemmy_log.out
postgres-1 |
postgres-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres-1 |
postgres-1 | 2024-03-19 23:30:55.483 UTC [1] LOG: starting PostgreSQL 16.2 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014, 64-bit
postgres-1 | 2024-03-19 23:30:55.483 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
postgres-1 | 2024-03-19 23:30:55.483 UTC [1] LOG: listening on IPv6 address "::", port 5432
postgres-1 | 2024-03-19 23:30:55.494 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres-1 | 2024-03-19 23:30:55.508 UTC [24] LOG: database system was shut down at 2024-03-19 23:30:51 UTC
postgres-1 | 2024-03-19 23:30:55.519 UTC [1] LOG: database system is ready to accept connections
lemmy-ui-1 | (node:7) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
lemmy-ui-1 | (Use node --trace-deprecation ... to show where the warning was created)
lemmy-ui-1 | Lemmy-ui v0.19.3 started listening on http://0.0.0.0:1234
pictrs-1 | 2024-03-19T23:30:55.258805Z INFO actix_server::builder: starting 4 workers
pictrs-1 | 2024-03-19T23:30:55.258850Z INFO actix_server::server: Tokio runtime found; starting in existing Tokio runtime
As you see lemmy-1 doesn't even start nor get logged
On the STDOUT (for example with tag:dev)
root@vega:/opt/lemmy/docker# docker compose up
[+] Running 4/4
✔ Container docker-pictrs-1 Created 0.0s
✔ Container docker-postgres-1 Created 0.0s
✔ Container docker-lemmy-1 Recreated 0.8s
✔ Container docker-lemmy-ui-1 Recreated 0.1s
Attaching to lemmy-1, lemmy-ui-1, pictrs-1, postgres-1
postgres-1 |
postgres-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres-1 |
pictrs-1 | 2024-03-19T23:41:47.038498Z INFO actix_server::builder: starting 4 workers
pictrs-1 | 2024-03-19T23:41:47.038776Z INFO actix_server::server: Tokio runtime found; starting in existing Tokio runtime
postgres-1 | 2024-03-19 23:41:47.129 UTC [1] LOG: starting PostgreSQL 16.2 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014, 64-bit
postgres-1 | 2024-03-19 23:41:47.130 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
postgres-1 | 2024-03-19 23:41:47.130 UTC [1] LOG: listening on IPv6 address "::", port 5432
postgres-1 | 2024-03-19 23:41:47.140 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres-1 | 2024-03-19 23:41:47.152 UTC [24] LOG: database system was shut down at 2024-03-19 23:33:52 UTC
postgres-1 | 2024-03-19 23:41:47.166 UTC [1] LOG: database system is ready to accept connections
lemmy-1 exited with code 0
lemmy-1 exited with code 139
lemmy-ui-1 | (node:7) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
lemmy-ui-1 | (Use `node --trace-deprecation ...` to show where the warning was created)
lemmy-ui-1 | Lemmy-ui v0.19.3 started listening on http://0.0.0.0:1234
Version BE >= 0.19.2
Someone on in the Matrix chat tried this and didnt have any problems.
i'm not using ansibile, I'md directly using docker compose... the same file on an amd64 platform works, while on rpi it fails :-\