[Bug 224434] www/squid-devel Crash when rotating logs

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Dec 18 20:31:12 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224434

            Bug ID: 224434
           Summary: www/squid-devel Crash when rotating logs
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: olivierw1+bugzilla-freebsd at hotmail.com
                CC: timp87 at gmail.com
                CC: timp87 at gmail.com
             Flags: maintainer-feedback?(timp87 at gmail.com)

Hello,

I've just upgraded from www/squid 3.5.27_1 to www/squid-devel 4.0.22.
Everything seems to works well except when "rotating logs".

Well, in fact I don't need to really rotate logs, I just have to use "squid -k
rotate" or "kill -USR1 <squid-pid>" (from
http://www.squid-cache.org/Doc/config/logfile_rotate/ ) and Squid will crash
leaving:
"Dec 18 19:59:01 host kernel: pid 7965 (squid), uid 100: exited on signal 6
(core dumped)
Dec 18 19:59:01 host squid[2003]: Squid Parent: (squid-1) process 7965 exited
due to signal 6 with status 0
Dec 18 19:59:01 host squid[2003]: Squid Parent: (squid-1) process 52870
started"
in /var/log/messages and I am getting a coredump.

Anyway, Squid continues to work, so users don't see anything.

I've recompiled Squid with DEBUG=on and with gdb on the coredump file I am
getting:
"# gdb /tmp/debug-squid/usr/local/sbin/squid squid-debug.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `(squid-1) -f /usr/local/etc/squid/squid.conf'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/lib/librt.so.1...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /lib/libcrypt.so.5...done.
Loaded symbols for /lib/libcrypt.so.5
Reading symbols from /usr/local/lib/libcrypto.so.42...done.
Loaded symbols for /usr/local/lib/libcrypto.so.42
Reading symbols from /usr/local/lib/libssl.so.44...done.
Loaded symbols for /usr/local/lib/libssl.so.44
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libpcreposix.so.0...done.
Loaded symbols for /usr/local/lib/libpcreposix.so.0
Reading symbols from /usr/local/lib/libpcre.so.1...done.
Loaded symbols for /usr/local/lib/libpcre.so.1
Reading symbols from /usr/lib/libc++.so.1...done.
Loaded symbols for /usr/lib/libc++.so.1
Reading symbols from /lib/libcxxrt.so.1...done.
Loaded symbols for /lib/libcxxrt.so.1
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libthr.so.3...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000802bcf84a in thr_kill () from /lib/libc.so.7
(gdb) backtrace
#0  0x0000000802bcf84a in thr_kill () from /lib/libc.so.7
#1  0x0000000802bcf814 in raise () from /lib/libc.so.7
#2  0x0000000802bcf789 in abort () from /lib/libc.so.7
#3  0x000000000067864e in xassert (msg=0xbce0ef "!isOpen(conn->fd)",
file=0xbcd763 "comm.cc", line=428) at debug.cc:611
warning: (Internal error: pc 0x9294c3 in read in psymtab, but not in symtab.)

#4  0x00000000009294c4 in comm_init_opened () at comm.cc:428
warning: (Internal error: pc 0x9294c3 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x928edc in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x928edc in read in psymtab, but not in symtab.)

#5  0x0000000000928edd in comm_openex () at comm.cc:403
warning: (Internal error: pc 0x928edc in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x92842e in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x92842e in read in psymtab, but not in symtab.)

#6  0x000000000092842f in comm_open () at comm.cc:230
warning: (Internal error: pc 0x92842e in read in psymtab, but not in symtab.)

#7  0x0000000000744764 in ipcCreate (type=2, prog=0x80caca5a0
"/usr/local/libexec/squid/pinger", args=0x7fffffffe6a0, name=0xbdc67d "Pinger
Socket",
    local_addr=@0x7fffffffe678, rfd=0x7fffffffe69c, wfd=0x7fffffffe698,
hIpc=0x1052198) at ipc.cc:111
#8  0x0000000000ac1645 in IcmpSquid::Open (this=0x1050130) at IcmpSquid.cc:213
#9  0x000000000074e061 in mainRotate () at main.cc:1035
#10 0x000000000074dcd6 in SignalEngine::checkEvents (this=0x7fffffffea00) at
main.cc:245
#11 0x00000000006abcc8 in EventLoop::checkEngine (this=0x7fffffffea08,
engine=0x7fffffffea00, primary=false) at EventLoop.cc:34
#12 0x00000000006ac2d2 in EventLoop::runOnce (this=0x7fffffffea08) at
EventLoop.cc:105
#13 0x00000000006ac0a0 in EventLoop::run (this=0x7fffffffea08) at
EventLoop.cc:83
#14 0x000000000074f1cb in SquidMain (argc=3, argv=0x7fffffffebd8) at
main.cc:1704
#15 0x000000000074e6ec in SquidMainSafe (argc=3, argv=0x7fffffffebd8) at
main.cc:1415
#16 0x000000000074e6b2 in main (argc=3, argv=0x7fffffffebd8) at main.cc:1403
(gdb)"

It crashes here:
https://github.com/squid-cache/squid/blob/v4.0/src/comm.cc#L428 but now I don't
know what else to try.

I am running Squid 4 on NanoBSD 11.1-RELEASE-p6, so I don't know if this bug is
present on a "normal" FreeBSD or Linux.
My Squid is compiled with security/libressl-devel 2.6.3.

In my Squid's config file, I have "logfile_rotate 0" because I am managing the
rotation with newsyslog.

Can someone try "squid -k rotate" or "kill -USR1 <squid-pid>" to see if it can
be reproduced?


I've just tried again with www/squid 3.5.27_1 and it doesn't crash at all
(exact same configuration, only difference is the Squid version).

Best Regards,
Olivier

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list