Join the community today
Register Now

Nginx NGINX 1.31.3 causes SIGSEGV in ngx_http_set_misc_module.so with Redis page cache

Discussion in 'Install & Upgrades or Pre-Install Questions' started by redsy, Aug 2, 2026 at 9:58 PM.

  1. redsy

    redsy New Member

    4
    0
    1
    Mar 16, 2025
    Ratings:
    +1
    Local Time:
    10:09 AM
    NGINX 1.31.3 causes SIGSEGV in ngx_http_set_misc_module.so with Centmin Mod Redis page cache

    Hi eva2000,

    I've found what appears to be a reproducible compatibility issue between NGINX 1.31.3 and Centmin Mod's NGINX Redis full-page caching configuration.

    Environment

    • AlmaLinux 9
    • Centmin Mod 140.00beta01
    • Centmin Mod fully updated with cmupdate
    • NGINX 1.31.3
    • WordPress vhosts created/configured with Centmin Mod
    • NGINX Redis full-page caching using php-rediscache.conf, rediscache_DOMAIN.conf, srcache, redis2 and set-misc

    I originally encountered this after upgrading from NGINX 1.31.2 to 1.31.3.

    With NGINX 1.31.2 everything works normally.

    Immediately after upgrading to 1.31.3, sites using the NGINX Redis page cache return Cloudflare 520 errors.

    Testing directly against localhost shows this is not a Cloudflare problem. NGINX itself is crashing and returning no response.

    For example:

    curl -skI --resolve example.com:443:127.0.0.1 Example Domain

    returns no response.

    The NGINX error log repeatedly reports:

    worker process XXXXX exited on signal 11 (core dumped)

    And dmesg repeatedly identifies:

    nginx[XXXXX]: segfault ... in ngx_http_set_misc_module.so

    This occurs across different workers and CPU cores.

    Redis cache configuration involved


    The standard Centmin Mod Redis page-cache configuration uses:

    set $key "nginx-cache:$scheme$request_method$host$request_uri$normalized_encoding";

    set_escape_uri $escaped_key $key;

    srcache_fetch GET /redis-fetch $key;

    srcache_store PUT /redis-store key=$escaped_key;

    And inside the Redis store locations:

    set_unescape_uri $key $arg_key;

    These directives come from ngx_http_set_misc_module.so.

    Disabling the NGINX Redis page cache fixes NGINX 1.31.3

    I reverted to NGINX 1.31.2 and changed the affected vhosts from:

    include /usr/local/nginx/conf/php-rediscache.conf;

    to:

    include /usr/local/nginx/conf/php.conf;

    and disabled:

    include /usr/local/nginx/conf/wpincludes/DOMAIN/rediscache_DOMAIN.conf;

    I then upgraded again to NGINX 1.31.3.

    With the NGINX Redis page-cache layer disabled:

    • NGINX 1.31.3 works normally
    • Localhost requests return HTTP/2 200
    • Cloudflare works normally
    • No new NGINX worker segfaults occur

    I have reproduced this behaviour on multiple Centmin Mod servers.

    Redis itself remains running; only the NGINX full-page caching configuration needs to be disabled.

    Tested newer ngx_devel_kit

    After running cmupdate, current Centmin Mod 140.00beta01 still contains:

    ORESTY_DEVELKITVER='0.3.2'

    ORESTY_SETMISCVER='0.33'

    I rebuilt NGINX 1.31.3 with:

    ngx_devel_kit 0.3.4

    set-misc 0.33

    The resulting nginx -V confirmed:

    --add-dynamic-module=../ngx_devel_kit-0.3.4

    --add-dynamic-module=../set-misc-nginx-module-0.33

    I then re-enabled the Redis page cache on one test vhost only.

    Result:

    NGINX worker SIGSEGV in ngx_http_set_misc_module.so

    again immediately.

    So upgrading NDK from 0.3.2 to 0.3.4 does not resolve the issue.

    Tested set-misc 0.34

    I then rebuilt NGINX 1.31.3 with:

    ngx_devel_kit 0.3.4

    set-misc 0.34

    and again re-enabled the Redis page cache on the test vhost.

    The first localhost request produced no HTTP response and dmesg immediately logged a new crash:

    nginx[XXXXX]: segfault ... in ngx_http_set_misc_module.so

    So set-misc 0.34 does not resolve the issue either.

    Test matrix

    NGINX 1.31.2 + NDK 0.3.2 + set-misc 0.33 + Redis page cache
    → Works

    NGINX 1.31.3 + NDK 0.3.2 + set-misc 0.33 + Redis page cache
    → SIGSEGV

    NGINX 1.31.3 + Redis page cache disabled
    → Works

    NGINX 1.31.3 + NDK 0.3.4 + set-misc 0.33 + Redis page cache
    → SIGSEGV

    NGINX 1.31.3 + NDK 0.3.4 + set-misc 0.34 + Redis page cache
    → SIGSEGV

    The behaviour therefore appears very reproducible:

    NGINX 1.31.3 + Centmin Mod NGINX Redis page-cache configuration = ngx_http_set_misc_module.so SIGSEGV

    Whereas:

    NGINX 1.31.3 + normal php.conf + Redis page cache disabled = works normally

    Question

    Could there be an incompatibility between changes in NGINX 1.31.3 and the set-misc / NDK variable handling used by Centmin Mod's Redis page-cache configuration?

    Is there a patch or recommended change to the Redis cache configuration for NGINX 1.31.3?

    I'd ideally like to keep the NGINX Redis full-page cache enabled, but at present I have left it disabled on all affected servers because enabling it immediately starts the worker SIGSEGV loop.

    Happy to provide the full nginx -V output, Redis cache configs, core dump information, or run additional tests if useful.