Thanks Amos.

Did you have a release date of the 7.3 version ?

Le 21/10/2025 à 01:42, David Touzeau a écrit :
Hi, on debian 13, have a segmentation fault


squid -v
Squid Cache: Version 7.2-VCS
Service Name: squid

This binary uses OpenSSL 3.5.1 1 Jul 2025. configure options: '--prefix=/usr' '--build=x86_64-linux-gnu' '--includedir=/include' '--mandir=/share/man' '--infodir=/share/info' '--localstatedir=/var' '--libexecdir=/lib/squid3' '--disable-maintainer-mode' '--disable-dependency-tracking' '--datadir=/usr/share/squid3' '--sysconfdir=/etc/squid3' '--enable-gnuregex' '--enable-removal-policy=heap' '--enable-follow-x-forwarded-for' '--enable-removal-policies=lru,heap' '--enable-arp-acl' '--enable-truncate' '--with-large-files' '--with-pthreads' '--enable-esi' '--enable-storeio=aufs,diskd,ufs,rock' '--enable-x-accelerator-vary' '--with-dl--enable-linux-netfilter' '--with-netfilter-conntrack' '--enable-wccpv2' '--enable-eui' '--enable-auth' '--enable-auth-basic' '--enable-snmp' '--enable-icmp' '--enable-auth-digest' '--enable-log-daemon-helpers' '--enable-url-rewrite-helpers' '--enable-auth-ntlm' '--with-default-user=squid' '--enable-icap-client' '--disable-cache-digests' '--enable-poll' '--enable-epoll' '--enable-async-io=128' '--enable-zph-qos' '--enable-delay-pools' '--enable-http-violations' '--enable-url-maps' '--enable-ecap' '--enable-ssl' '--with-openssl' '--enable-ssl-crtd' '--enable-xmalloc-statistics' '--enable-ident-lookups' '--with-filedescriptors=163840' '--with-aufs-threads=128' '--disable-arch-native' '--without-gnutls' '--with-logdir=/var/log/squid' '--with-pidfile=/var/run/squid/squid.pid' '--with-swapdir=/var/cache/squid' 'CXXFLAGS=-O1 -g -fsanitize=address -fno-omit-frame-pointer -Wno-error=maybe-uninitialized' 'build_alias=x86_64-linux-gnu' 'PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:'



2025/10/20 22:40:14| Initializing IP Cache...
=================================================================
==284891==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x503000147bb0 in thread T0:
  object passed to delete has wrong type:
  size of the allocated type:   28 bytes;
  size of the deallocated type: 16 bytes.
    #0 0x7f55bd2f6678 in operator delete(void*, unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:164     #1 0x55bd86e79254 in Ip::Address::FreeAddr(addrinfo*&) /root/squid-7.2.patched/src/ip/Address.cc:710     #2 0x55bd86d6c923 in comm_local_port(int) /root/squid-7.2.patched/src/comm.cc:194     #3 0x55bd86667a94 in Dns::Init() /root/squid-7.2.patched/src/dns_internal.cc:1594     #4 0x55bd869fe2ec in mainInitialize /root/squid-7.2.patched/src/main.cc:1149     #5 0x55bd869fe2ec in SquidMain(int, char**) /root/squid-7.2.patched/src/main.cc:1665     #6 0x55bd869ff6fe in SquidMainSafe /root/squid-7.2.patched/src/main.cc:1351
    #7 0x55bd869ff6fe in main /root/squid-7.2.patched/src/main.cc:1339
    #8 0x7f55bc233ca7 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29ca7) (BuildId: def5460e3cee00bfee25b429c97bcc4853e5b3a8)     #9 0x7f55bc233d64 in __libc_start_main (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29d64) (BuildId: def5460e3cee00bfee25b429c97bcc4853e5b3a8)     #10 0x55bd86605960 in _start (/usr/sbin/squid+0x36f960) (BuildId: 610a22a0102aabfd95125cac39325f2ee96de29b)

0x503000147bb0 is located 0 bytes inside of 28-byte region [0x503000147bb0,0x503000147bcc)
allocated by thread T0 here:
    #0 0x7f55bd2f5778 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95     #1 0x55bd86e79106 in Ip::Address::InitAddr(addrinfo*&) /root/squid-7.2.patched/src/ip/Address.cc:698     #2 0x55bd86d6c6ab in comm_local_port(int) /root/squid-7.2.patched/src/comm.cc:184     #3 0x55bd86667a94 in Dns::Init() /root/squid-7.2.patched/src/dns_internal.cc:1594     #4 0x55bd869fe2ec in mainInitialize /root/squid-7.2.patched/src/main.cc:1149     #5 0x55bd869fe2ec in SquidMain(int, char**) /root/squid-7.2.patched/src/main.cc:1665     #6 0x55bd869ff6fe in SquidMainSafe /root/squid-7.2.patched/src/main.cc:1351
    #7 0x55bd869ff6fe in main /root/squid-7.2.patched/src/main.cc:1339
    #8 0x7f55bc233ca7 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29ca7) (BuildId: def5460e3cee00bfee25b429c97bcc4853e5b3a8)

SUMMARY: AddressSanitizer: new-delete-type-mismatch ../../../../src/libsanitizer/asan/asan_new_delete.cpp:164 in operator delete(void*, unsigned long) ==284891==HINT: if you don't care about these errors you may set ASAN_OPTIONS=new_delete_type_mismatch=0
==284891==ABORTING
root@artica-appliance:~# ================================================================= ==284891==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x503000147bb0 in thread T0:
  object passed to delete has wrong type:
  size of the allocated type:   28 bytes;
  size of the deallocated type: 16 bytes.
    #0 0x7f55bd2f6678 in operator delete(void*, unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:164     #1 0x55bd86e79254 in Ip::Address::FreeAddr(addrinfo*&) /root/squid-7.2.patched/src/ip/Address.cc:710     #2 0x55bd86d6c923 in comm_local_port(int) /root/squid-7.2.patched/src/comm.cc:194     #3 0x55bd86667a94 in Dns::Init() /root/squid-7.2.patched/src/dns_internal.cc:1594     #4 0x55bd869fe2ec in mainInitialize /root/squid-7.2.patched/src/main.cc:1149     #5 0x55bd869fe2ec in SquidMain(int, char**) /root/squid-7.2.patched/src/main.cc:1665     #6 0x55bd869ff6fe in SquidMainSafe /root/squid-7.2.patched/src/main.cc:1351
    #7 0x55bd869ff6fe in main /root/squid-7.2.patched/src/main.cc:1339
    #8 0x7f55bc233ca7 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29ca7) (BuildId: def5460e3cee00bfee25b429c97bcc4853e5b3a8)     #9 0x7f55bc233d64 in __libc_start_main (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29d64) (BuildId: def5460e3cee00bfee25b429c97bcc4853e5b3a8)     #10 0x55bd86605960 in _start (/usr/sbin/squid+0x36f960) (BuildId: 610a22a0102aabfd95125cac39325f2ee96de29b)

0x503000147bb0 is located 0 bytes inside of 28-byte region [0x503000147bb0,0x503000147bcc)
allocated by thread T0 here:
    #0 0x7f55bd2f5778 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95     #1 0x55bd86e79106 in Ip::Address::InitAddr(addrinfo*&) /root/squid-7.2.patched/src/ip/Address.cc:698     #2 0x55bd86d6c6ab in comm_local_port(int) /root/squid-7.2.patched/src/comm.cc:184     #3 0x55bd86667a94 in Dns::Init() /root/squid-7.2.patched/src/dns_internal.cc:1594     #4 0x55bd869fe2ec in mainInitialize /root/squid-7.2.patched/src/main.cc:1149     #5 0x55bd869fe2ec in SquidMain(int, char**) /root/squid-7.2.patched/src/main.cc:1665     #6 0x55bd869ff6fe in SquidMainSafe /root/squid-7.2.patched/src/main.cc:1351
    #7 0x55bd869ff6fe in main /root/squid-7.2.patched/src/main.cc:1339
    #8 0x7f55bc233ca7 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29ca7) (BuildId: def5460e3cee00bfee25b429c97bcc4853e5b3a8)

SUMMARY: AddressSanitizer: new-delete-type-mismatch ../../../../src/libsanitizer/asan/asan_new_delete.cpp:164 in operator delete(void*, unsigned long) ==284891==HINT: if you don't care about these errors you may set ASAN_OPTIONS=new_delete_type_mismatch=0
==284891==ABORTING

I’m not exactly sure why I’m hitting this bug, but it comes from a 6.14 → 7.2 configuration upgrade. I patched the functions |Ip::Address::getAddrInfo|, |Ip::Address::FreeAddr|, and |Ip::Address::InitAddr| to get Squid working. I’m attaching the modified |Address.cc| that makes it run, but there may be something upstream that forced me to change the code (most likely a |malloc|-related issue).
--
David Touzeau - Artica Tech France
Development team, level 3 support
----------------------------------
P: +33 6 58 44 69 46
www:https://wiki.articatech.com
www:http://articatech.net
_______________________________________________
squid-users mailing list
[email protected]
https://lists.squid-cache.org/listinfo/squid-users

--
David Touzeau - Artica Tech France
Development team, level 3 support
----------------------------------
P: +33 6 58 44 69 46
www:https://wiki.articatech.com
www:http://articatech.net
_______________________________________________
squid-users mailing list
[email protected]
https://lists.squid-cache.org/listinfo/squid-users

Reply via email to