Skip to content

Segfault after module setup and nginx reload #140

@eliteaz

Description

@eliteaz

Bug Overview

systemd-coredump[2348953]: [🡕] Process 2192085 (nginx) of user 0 dumped core.
                           
                           Stack trace of thread 2192085:
                           #0  0x00007feba2d6b39e __memcmp_evex_movbe (libc.so.6 + 0x16b39e)
                           #1  0x00007feb9f986c95 _ZN9nginx_sys6string81_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$nginx_sys..bindings..ngx_str_t$GT$2eq17hb0fae718d2ca9>
                           #2  0x00007feb9f9490d9 _ZN10nginx_acme4conf14cmd_add_issuer17h2e46cd5a8b82c47aE (ngx_http_acme_module.so + 0x6d0d9)
                           #3  0x0000560ab4d1833c ngx_conf_parse (nginx + 0x4933c)
                           #4  0x0000560ab4d59006 ngx_http_block.lto_priv.0 (nginx + 0x8a006)
                           #5  0x0000560ab4d1833c ngx_conf_parse (nginx + 0x4933c)
                           #6  0x0000560ab4d191a8 ngx_init_cycle (nginx + 0x4a1a8)
                           #7  0x0000560ab4d2fb73 ngx_master_process_cycle (nginx + 0x60b73)
                           #8  0x0000560ab4d03839 main (nginx + 0x34839)
                           #9  0x00007feba2c2a610 __libc_start_call_main (libc.so.6 + 0x2a610)
                           #10 0x00007feba2c2a6c0 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2a6c0)
                           #11 0x0000560ab4d03885 _start (nginx + 0x34885)
                           ELF object binary architecture: AMD x86-64
systemd[1]: nginx.service: Main process exited, code=dumped, status=11/SEGV
systemd[1]: nginx.service: Failed with result 'core-dump'.
systemd[1]: nginx.service: Consumed 7min 3.248s CPU time, 351.2M memory peak.

Expected Behavior

Do not segfault when I do systemctl reload nginx after initially module setup

Steps to Reproduce the Bug

yum install nginx-module-acme

load_module modules/ngx_http_acme_module.so;

directive acme_issuer under http{}

    acme_issuer zerossl {
        uri https://acme.zerossl.com/v2/DV90;
        state_path /var/cache/nginx/acme-zerossl;
        accept_terms_of_service;
        external_account_key 'KEY' /etc/nginx/zerossl-eab.key;
}

Define acme_certificate under server{}

    acme_certificate zerossl;

    ssl_certificate $acme_certificate;
    ssl_certificate_key $acme_certificate_key;

#systemctl reload nginx

Environment Details

[root@ops conf.d]# yum list installed | grep -e nginx -e glibc
glibc.x86_64                         2.34-256.el9               @baseos         
glibc-common.x86_64                  2.34-256.el9               @baseos         
glibc-gconv-extra.x86_64             2.34-256.el9               @baseos         
glibc-langpack-en.x86_64             2.34-256.el9               @baseos         
nginx.x86_64                         2:1.29.5-1.el9.ngx         @nginx          
nginx-module-acme.x86_64             1:1.29.5+0.3.1-1.el9.ngx   @nginx          

and OS ver.

[root@ops conf.d]# cat /proc/version 
Linux version 5.14.0-615.el9.x86_64 ([email protected]) (gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11), GNU ld version 2.35.2-67.el9) #1 SMP PREEMPT_DYNAMIC Fri Sep 12 23:10:41 UTC 2025

Additional Context

after same setup and nginx restart it works properly, but reload fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions