Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

pecl / PEAR network commands segfault on php:8.3-alpine for linux/riscv64

Open
#1,680 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, php

Research direction

Start by reproducing the failure with the provided linux/riscv64 Docker command for pear list-channels and pecl install igbinary, then compare PHP 8.2, 8.3, and 8.4 Alpine images. Trace the PEAR/PECL network operation that crashes rather than extension compilation; done means remote-channel commands and pecl install complete successfully on PHP 8.3 riscv64 without breaking the other tested platforms.

Written by the indexing model from the issue text.

Description

Description

On linux/riscv64, the official php:8.3-alpine image crashes with exit code 139 (SIGSEGV) when running PECL/PEAR commands that contact remote channels (e.g. pecl install, pear list-channels, pecl list-channels).

Local-only PEAR commands such as pear version and pear list work fine.

This blocks the documented workflow of installing PHP extensions via pecl install on riscv64, including multi-arch image builds that use docker buildx with QEMU emulation for linux/riscv64.

Environment
Image php:8.3-alpine3.24
PHP 8.3.33 (cli) NTS
PEAR 1.10.18
Platform linux/riscv64 (also reproduced under QEMU via Docker Desktop on macOS)
OpenSSL 3.5.7
Steps to reproduce
docker run --rm --platform linux/riscv64 php:8.3-alpine3.24 sh -euxc '
  apk add --no-cache $PHPIZE_DEPS
  pecl install igbinary
'

Also fails without any build deps:

docker run --rm --platform linux/riscv64 php:8.3-alpine3.24 pear list-channels
Actual result
Segmentation fault

Exit code: 139

Expected result

pecl install should download and build the extension, as it does on other PHP versions and architectures.

Scope (tested)
PHP version linux/riscv64 pecl install igbinary
8.2-alpine3.24 works
8.3-alpine3.24 segfault
8.4-alpine3.24 works
8.5-alpine3.24 works
Platform php:8.3-alpine3.24 pecl install igbinary
linux/amd64 works
linux/arm64 works
linux/ppc64le works
linux/s390x works
linux/riscv64 segfault

Commands that work on php:8.3-alpine / riscv64:

  • pear version
  • pear list
  • php /usr/local/lib/php/pearcmd.php (help output)

Commands that segfault:

  • pecl install <package>
  • pear list-channels
  • pecl list-channels
  • pecl search <package>

The crash appears tied to PEAR network/channel operations, not extension compilation.

Real-world impact

Any Dockerfile using pecl install fails when building for linux/riscv64 with PHP 8.3:

FROM php:8.3-alpine
RUN apk add --no-cache $PHPIZE_DEPS \
    && pecl install igbinary redis swoole \
    && docker-php-ext-enable igbinary redis swoole

Example from a multi-arch base image build:

+ LDFLAGS=-lucontext pecl install igbinary redis swoole ssh2
Segmentation fault
ERROR: exit code: 139
Additional context
  • register_argc_argv=On and other flags from the pecl wrapper script do not change the outcome.
  • Adding libucontext / LDFLAGS="-lucontext" does not fix the segfault (that is a separate build concern on some architectures for extensions like swoole).
  • PHP 8.3 on riscv64 is otherwise functional (php -v, php -m, docker-php-ext-install from local source work).
Dominant language
Dockerfile
Stars
4k
Forks
2k
Avg merge
5d 21h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from docker-library/php

All issues in docker-library/php

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.