Skip to content

postgres:17-alpine crashes with SIGSEGV on ARM64 (Apple Silicon) - Alpine 3.23 regression #1389

@yungweng

Description

@yungweng

Description

postgres:17-alpine (which uses Alpine 3.23) crashes immediately with SIGSEGV (exit code 139) on ARM64 (Apple Silicon Mac). The PostgreSQL binary fails to execute any command, including postgres --version.

Environment

  • Host: macOS (Apple Silicon M-series)
  • Docker: Docker Desktop 29.1.3
  • Architecture: linux/arm64

Reproduction

# This crashes immediately with exit code 139
docker run --rm postgres:17-alpine postgres --version

# This works fine
docker run --rm postgres:17-alpine3.22 postgres --version

Verified Test Matrix

Image Tag Alpine Version PostgreSQL ARM64 Status
postgres:17-alpine3.21 3.21.x 17.7 ✅ Works
postgres:17-alpine3.22 3.22.x 17.7 ✅ Works
postgres:17-alpine 3.23.2 17.7 ❌ Crashes (SIGSEGV)
postgres:17 (Debian) N/A 17.7 ✅ Works

Analysis

The crash was introduced when the 17-alpine tag was updated to use Alpine 3.23 (released December 17, 2025). Both working and broken images use LLVM 19.x, so this is NOT an LLVM issue.

The Alpine container itself runs fine - only the PostgreSQL binary crashes:

# Alpine shell works
docker run --rm postgres:17-alpine cat /etc/alpine-release
# Output: 3.23.2

# PostgreSQL binary crashes
docker run --rm postgres:17-alpine postgres --version
# Exit code: 139 (SIGSEGV)

Suspected Cause

Something changed in Alpine 3.23 that affects PostgreSQL on ARM64. Possible causes:

  • musl libc changes
  • GCC 14 → 15 compiler changes
  • Other toolchain/runtime library changes

Workaround

Use an explicit Alpine 3.22 tag:

# docker-compose.yml
services:
  postgres:
    image: postgres:17-alpine3.22  # Works on ARM64

Or use the Debian-based image:

services:
  postgres:
    image: postgres:17  # Also works

Additional Context

  • This affects Apple Silicon Macs (M1/M2/M3/M4)
  • The postgres:17-alpine image was last pushed December 18, 2025
  • Alpine 3.23 was released December 17, 2025

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions