Skip to content

c-icap coredumps on Fedora 42 #74

Description

@frankcrawford

c-icap coredumps on startup on Fedora 42, by the looks of it, due to issue with GCC 15 and debug printing. Dump from systemctl gives:

Jul 20 19:11:33 bits.crawford.emu.id.au systemd[1]: Started c-icap.service - c-icap is an implementation of an ICAP server.
Jul 20 19:11:33 bits.crawford.emu.id.au systemd-coredump[637329]: [🡕] Process 637327 (c-icap) of user 387 dumped core.
                                                                  
                                                                  Module /usr/bin/c-icap from rpm c-icap-0.6.3-2.fc42.x86_64
                                                                  Module srv_echo.so from rpm c-icap-0.6.3-2.fc42.x86_64
                                                                  Module libcrypto.so.3 from rpm openssl-3.2.4-4.fc42.x86_64
                                                                  Module libssl.so.3 from rpm openssl-3.2.4-4.fc42.x86_64
                                                                  Module libpcre2-8.so.0 from rpm pcre2-10.45-1.fc42.x86_64
                                                                  Module libbrotlienc.so.1 from rpm brotli-1.1.0-6.fc42.x86_64
                                                                  Module libbrotlidec.so.1 from rpm brotli-1.1.0-6.fc42.x86_64
                                                                  Module libbrotlicommon.so.1 from rpm brotli-1.1.0-6.fc42.x86_64
                                                                  Module libbz2.so.1 from rpm bzip2-1.0.8-20.fc42.x86_64
                                                                  Module libz.so.1 from rpm zlib-ng-2.2.4-3.fc42.x86_64
                                                                  Module libicapapi.so.6 from rpm c-icap-0.6.3-2.fc42.x86_64
                                                                  Stack trace of thread 637327:
                                                                  #0  0x0000556d00000000 n/a (n/a + 0x0)
                                                                  #1  0x0000556d6f7274b1 cfg_load_service (/usr/bin/c-icap + 0xd4b1)
                                                                  #2  0x0000556d6f727f01 parse_file (/usr/bin/c-icap + 0xdf01)
                                                                  #3  0x0000556d6f71d095 main (/usr/bin/c-icap + 0x3095)
                                                                  #4  0x00007ffb6c0bd5f5 __libc_start_call_main (libc.so.6 + 0x35f5)
                                                                  #5  0x00007ffb6c0bd6a8 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x36a8)
                                                                  #6  0x0000556d6f71f2a5 _start (/usr/bin/c-icap + 0x52a5)
                                                                  ELF object binary architecture: AMD x86-64
Jul 20 19:11:33 bits.crawford.emu.id.au systemd[1]: c-icap.service: Main process exited, code=dumped, status=11/SEGV
Jul 20 19:11:33 bits.crawford.emu.id.au systemd[1]: c-icap.service: Failed with result 'core-dump'.

Far further debugging indicates that the issue come from calls to ci_debug_print, but not in all cases, see debug output:

Enabling parameter -D                                                           
Searching 0x555555586bd0 for default value
Setting parameter: PidFile=/run/c-icap/c-icap.pid
Searching 0x555555586bd8 for default value
Setting parameter: CommandsSocket=/run/c-icap/c-icap.ctl
Searching 0x55555558602c for default value
Setting parameter: Timeout=300
Searching 0x55555558600c for default value
Setting parameter: MaxKeepAliveRequests=100
Searching 0x555555586008 for default value
Setting parameter: KeepAliveTimeout=600
Searching 0x555555586c28 for default value
Setting parameter: StartServers=3
Searching 0x555555586c2c for default value
Setting parameter: MaxServers=10
Searching 0x555555586c34 for default value
Setting parameter: MinSpareThreads=10
Searching 0x555555586c38 for default value
Setting parameter: MaxSpareThreads=20
Searching 0x555555586c30 for default value
Setting parameter: ThreadsPerChild=10
Searching 0x555555587928 for default value
Setting parameter: MaxRequestsPerChild=0
Requested size 2048, getting buffer 0x555555595ae0 from pool 31:2048
Searching 0x555555586c18 for default value
Setting parameter: ServerAdmin=webmaster@crawford.emu.id.au
Searching 0x555555586c20 for default value
Setting parameter: ServerName=www.crawford.emu.id.au
Searching 0x555555586bc8 for default value
Setting parameter: TmpDir=/var/tmp
Searching 0x5555555871dc for default value

Program received signal SIGSEGV, Segmentation fault.
0x0000555500000000 in ?? ()

In addition, running as /usr/sbin/c-icap -N -f /etc/c-icap/c-icap.conf -d -1 which suppresses any debugging, allows it to startup.

I believe it is related to https://gcc.gnu.org/gcc-15/porting_to.html and in particular Function declarations without parameters although not exactly this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions