#6254·swoole-src

6.2.3: zts + docker + io_uring: ERROR Iouring::Iouring(): Failed to initialize io_uring instance, Error: Operation not permitted[1]

Author: thomas-0816Created Sep 26, 2026Updated Sep 26, 2026
bash
# docker build --progress=plain -f Dockerfile.swoole_zts_test .

FROM ubuntu:24.04

SHELL ["/bin/bash", "-c"]

RUN <<EOF
    set -euxo pipefail
    apt-get -y update
    apt-get -y --no-install-recommends install apt-transport-https curl ca-certificates
    curl -s https://pkg.henderkes.com/api/packages/85/debian/repository.key -o /etc/apt/keyrings/static-php85.asc
    echo "deb [signed-by=/etc/apt/keyrings/static-php85.asc] https://pkg.henderkes.com/api/packages/85/debian php-zts main" | \
        tee -a /etc/apt/sources.list.d/static-php85.list
    apt-get update
    apt-get install -y --no-install-recommends php-zts-cli php-zts-swoole
    php --ri swoole
    php <<'EOP'
        <?php
        Swoole\Coroutine\run(function() {
            $wg = new Swoole\Coroutine\WaitGroup();
            for ($i = 0; $i < 50; $i++) {
                Swoole\Coroutine::create(function () use ($wg) {
                    $wg->add();
                    sleep(rand(0,1));
                    $wg->done();
                });
            }
            $wg->wait(50);
        });
EOP
EOF

gives:

#5 16.69 + php --ri swoole
#5 16.74 
#5 16.74 swoole
#5 16.74 
#5 16.74 Swoole => enabled
#5 16.74 Author => Swoole Team <[email protected]>
#5 16.74 Version => 6.2.3
#5 16.74 Built => Sep 23 2026 15:31:51
#5 16.74 host byte order => little endian
#5 16.74 coroutine => enabled with boost asm context
#5 16.74 epoll => enabled
#5 16.74 eventfd => enabled
#5 16.74 thread => enabled
#5 16.74 signalfd => enabled
#5 16.74 cpu_affinity => enabled
#5 16.74 spinlock => enabled
#5 16.74 rwlock => enabled
#5 16.74 sockets => enabled
#5 16.74 openssl => OpenSSL 3.6.4 25 Aug 2026
#5 16.74 dtls => enabled
#5 16.74 http2 => enabled
#5 16.74 json => enabled
#5 16.74 curl-native => enabled
#5 16.74 curl-version => 8.22.0
#5 16.74 c-ares => 1.34.8
#5 16.74 zlib => 1.3.2
#5 16.74 brotli => E16785408/D16785408
#5 16.74 zstd => 1.5.7
#5 16.74 mutex_timedlock => enabled
#5 16.74 pthread_barrier => enabled
#5 16.74 futex => enabled
#5 16.74 mysqlnd => enabled
#5 16.74 postgresql(libpq) version => 18.6
#5 16.74 coroutine_pgsql => enabled
#5 16.74 coroutine_odbc => enabled
#5 16.74 coroutine_sqlite => enabled
#5 16.74 io_uring => enabled
#5 16.74 execinfo => enabled
#5 16.74 
#5 16.74 Directive => Local Value => Master Value
#5 16.74 swoole.enable_library => On => On
#5 16.74 swoole.enable_fiber_mock => Off => Off
#5 16.74 swoole.enable_preemptive_scheduler => Off => Off
#5 16.74 swoole.display_errors => On => On
#5 16.74 swoole.use_shortname => On => On
#5 16.74 swoole.socket_buffer_size => 8388608 => 8388608
#5 16.74 swoole.blocking_detection => Off => Off
#5 16.74 swoole.blocking_threshold => 100000 => 100000
#5 16.74 swoole.profile => Off => Off
#5 16.74 swoole.leak_detection => Off => Off
#5 16.75 + php
#5 16.79         [2026-09-26 02:02:03 %2734.0]  ERROR   Iouring::Iouring(): Failed to initialize io_uring instance, Error: Operation not permitted[1]

Related: https://github.com/swoole/swoole-src/pull/6114