diff --git a/.github/workflows/build_linux_wheel/action.yml b/.github/workflows/build_linux_wheel/action.yml index 1ec5d1a70..d3b142db5 100644 --- a/.github/workflows/build_linux_wheel/action.yml +++ b/.github/workflows/build_linux_wheel/action.yml @@ -74,6 +74,17 @@ runs: unzip /tmp/protoc.zip -d /usr/local rm /tmp/protoc.zip /usr/local/bin/protoc --version + - name: Add swap for native Arm wheel builds + if: ${{ inputs.arm-build == 'true' && runner.arch == 'ARM64' }} + shell: bash + run: | + # Give the final fat-LTO rustc process room to spill beyond host RAM. + swap_file="$RUNNER_TEMP/lancedb-swap" + sudo fallocate --length 32G "$swap_file" + sudo chmod 600 "$swap_file" + sudo mkswap "$swap_file" + sudo swapon "$swap_file" + free -h - name: Build Arm Manylinux Wheel if: ${{ inputs.arm-build == 'true' }} uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 @@ -87,9 +98,17 @@ runs: args: ${{ inputs.args }} before-script-linux: | set -e + # Report peak usage and OOM counters before Docker removes the container. + trap 'grep -H . /sys/fs/cgroup/memory.{max,peak,swap.max,swap.peak,events} 2>/dev/null || true' EXIT yum install -y clang curl -fsSL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-aarch_64.zip -o /tmp/protoc.zip echo "${PROTOC_SHA256} /tmp/protoc.zip" | sha256sum -c - unzip /tmp/protoc.zip -d /usr/local rm /tmp/protoc.zip /usr/local/bin/protoc --version + - name: Report host memory failures + if: ${{ failure() && inputs.arm-build == 'true' && runner.arch == 'ARM64' }} + shell: bash + run: | + sudo journalctl -k -b --no-pager --grep='oom-kill|Out of memory|Killed process' || true + sudo journalctl -u systemd-oomd -b --no-pager --grep='Killed' || true diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 86e5374f9..b52a5c57f 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -79,16 +79,6 @@ jobs: uses: actions/setup-python@v6 with: python-version: "3.11" - - name: Add swap for Arm fat LTO - if: matrix.config.platform == 'aarch64' - shell: bash - run: | - swap_file="$RUNNER_TEMP/lancedb-swap" - sudo fallocate --length 16G "$swap_file" - sudo chmod 600 "$swap_file" - sudo mkswap "$swap_file" - sudo swapon "$swap_file" - free -h - uses: ./.github/workflows/build_linux_wheel with: python-minor-version: 10 @@ -194,16 +184,6 @@ jobs: uses: actions/setup-python@v6 with: python-version: "3.15t" - - name: Add swap for Arm fat LTO - if: matrix.config.platform == 'aarch64' - shell: bash - run: | - swap_file="$RUNNER_TEMP/lancedb-swap" - sudo fallocate --length 16G "$swap_file" - sudo chmod 600 "$swap_file" - sudo mkswap "$swap_file" - sudo swapon "$swap_file" - free -h - uses: ./.github/workflows/build_linux_wheel with: python-minor-version: 15