On 21/12/2012 4:50 a.m., Guy Helmer wrote:
> I've encountered something strange when running squid 3.3.0.2 built using these options:
>
> $ ./configure --with-default-user=squid --bindir=/usr/local/sbin --sbindir=/usr/local/sbin --datadir=/usr/local/etc/squid --libexecdir=/usr/local/libexec/squid --localstatedir=/var/squid --sysconfdir=/usr/local/etc/squid --with-logdir=/var/log/squid --with-pidfile=/var/run/squid/squid.pid --enable-auth --enable-build-info --enable-loadable-modules --enable-removal-policies=lru heap --disable-epoll --disable-linux-netfilter --disable-linux-tproxy --disable-translation --enable-auth-basic=DB MSNT MSNT-multi-domain NCSA PAM POP3 RADIUS fake getpwnam NIS --enable-auth-digest=file --enable-external-acl-helpers=file_userip unix_group --enable-auth-negotiate=kerberos wrapper --enable-auth-ntlm=fake smb_lm --enable-storeio=diskd rock ufs aufs --enable-disk-io=AIO Blocking DiskDaemon IpcIo Mmapped DiskThreads --enable-log-daemon-helpers=file --enable-url-rewrite-helpers=fake --disable-snmp --enable-ssl --with-openssl=/usr --enable-ssl-crtd --enable-htcp --disable-forw-via-db --disable-cache-digests --enable-wccp --enable-wccpv2 --disable-eui --enable-ipfw-transparent --disable-pf-transparent --disable-ipf-transparent --disable-follow-x-forwarded-for --disable-ecap --enable-icap-client --disable-esi --disable-kqueue --enable-stacktraces --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/ --build=i386-portbld-freebsd8.3
>
> It's aborting in Ip::Address::GetAddrInfo() with a strange value for the force parameter:
>
> #0 0x489b86e7 in kill () from /lib/libc.so.7
> #1 0x488c02d7 in raise () from /lib/libthr.so.3
> #2 0x489b721a in abort () from /lib/libc.so.7
> #3 0x4899f556 in __assert () from /lib/libc.so.7
> #4 0x0830e34f in Ip::Address::GetAddrInfo (this=0x48aa2dc4, dst=@0xbfbfe6d4,
> force=6) at Address.cc:689
> #5 0x08305df5 in comm_openex (sock_type=1, proto=0, addr=@0x48aa2dc4,
> flags=2, tos=0 '\0', nfmark=0, note=0x48b52a90 "ssl_crtd") at comm.cc:535
> #6 0x08306db9 in comm_open (sock_type=1, proto=0, addr=@0x48aa2dc4, flags=2,
> note=0x48b52a90 "ssl_crtd") at comm.cc:443
> #7 0x081fa773 in ipcCreate (type=1,
> prog=0x48aa4490 "/usr/local/libexec/squid/ssl_crtd", args=0xbfbfe854,
> name=0x48b52a90 "ssl_crtd", local_addr=@0x48aa2dc4, rfd=0xbfbfe9f8,
> wfd=0xbfbfe9f4, hIpc=0xbfbfe9f0) at ipc.cc:120
> #8 0x081b6a10 in helperOpenServers (hlp=0x48aa2d90) at helper.cc:216
> #9 0x083eb796 in Ssl::Helper::Init (this=0x85d2780) at helper.cc:76
> #10 0x08203ec2 in mainInitialize () at main.cc:1052
> #11 0x0820481f in SquidMain (argc=3, argv=0xbfbfebe0) at main.cc:1488
> #12 0x08204c81 in SquidMainSafe (argc=3, argv=0xbfbfebe0) at main.cc:1251
> #13 0x08204f42 in main (argc=Cannot access memory at address 0x3
> ) at main.cc:1243
> (gdb) frame 4
> #4 0x0830e34f in Ip::Address::GetAddrInfo (this=0x48aa2dc4, dst=@0xbfbfe6d4,
> force=6) at Address.cc:689
> 689 IASSERT("false",false);
> (gdb) print *this
> $1 = {m_SocketAddr = {sin6_len = 0 '\0', sin6_family = 0 '\0', sin6_port = 0,
> sin6_flowinfo = 0, sin6_addr = {__u6_addr = {
> __u6_addr8 = '\0' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0,
> 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0},
> static STRLEN_IP4A = <optimized out>, static STRLEN_IP4R = 28,
> static STRLEN_IP4S = <optimized out>,
> static MAX_IP4_STRLEN = <optimized out>,
> static STRLEN_IP6A = <optimized out>, static STRLEN_IP6R = 75,
> static STRLEN_IP6S = <optimized out>,
> static MAX_IP6_STRLEN = <optimized out>, static v4_localhost = {__u6_addr = {
> __u6_addr8 = "\000\000\000\000\000\000\000\000\000\000??\177\000\000\001", __u6_addr16 = {0, 0, 0, 0, 0, 65535, 127, 256}, __u6_addr32 = {0, 0,
> 4294901760, 16777343}}}, static v4_anyaddr = {__u6_addr = {
> __u6_addr8 = "\000\000\000\000\000\000\000\000\000\000??\000\000\000",
> __u6_addr16 = {0, 0, 0, 0, 0, 65535, 0, 0}, __u6_addr32 = {0, 0,
> 4294901760, 0}}}, static v4_noaddr = {__u6_addr = {
> __u6_addr8 = "\000\000\000\000\000\000\000\000\000\000??????",
> __u6_addr16 = {0, 0, 0, 0, 0, 65535, 65535, 65535}, __u6_addr32 = {0, 0,
> 4294901760, 4294967295}}}, static v6_noaddr = {__u6_addr = {
> __u6_addr8 = '?' <repeats 16 times>, __u6_addr16 = {65535, 65535, 65535,
> 65535, 65535, 65535, 65535, 65535}, __u6_addr32 = {4294967295,
> 4294967295, 4294967295, 4294967295}}}}
> (gdb) print force
> $2 = 6
>
> It has me puzzled, since the force parameter should default to 0, shouldn't it?
It should default to that, but it may be set to AF_INET or AF_INET6 by
the caller.
Please check your AF_INET/AF_INET6 definitions to see if 6 is one of the
kernel values for that.
Amos
Received on Fri Dec 21 2012 - 06:37:16 MST
This archive was generated by hypermail 2.2.0 : Fri Dec 21 2012 - 12:00:20 MST