Bug: medusa db:migrate deadlocks (hangs forever) on aarch64/ARM64 Linux; works on x86_64
Summary
npx medusa db:migrate hangs indefinitely at Running migrations... on ARM64 Linux hosts, but the identical project + database completes migrations normally on x86_64 (both x86_64 Linux and x86_64 macOS). The hang is an unresolved promise — the Node event loop goes fully idle with no pending I/O — inside the per-module migration transaction. It reproduces with a fresh create-medusa-app project (no custom modules), across Medusa 2.16.0 and 2.17.2, Node 20 and 22, and multiple base images.
Environment where it hangs
- Arch: aarch64 (ARM64) — Oracle Cloud Ampere A1, Ubuntu 24.04, kernel
6.8.0-1027-oracle - Node: tested 20.18 / 20.20 / 22 (all hang)
- Medusa: 2.17.2 and 2.16.0 (all hang)
- Postgres 16, Redis 7 (also reproduces with
REDIS_URLunset → "fake redis") - Reproduces both in Docker and on the bare host (so not a container/sandbox issue)
Environment where it works
- x86_64 macOS (local) and x86_64 GitHub Actions
ubuntu-latest— same repo, same DB, migrations complete in seconds.