pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/42837 (www/squid31 abort()s)



The following reply was made to PR pkg/42837; it has been noted by GNATS.

From: Hauke Fath <hf%spg.tu-darmstadt.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: tron%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost
Subject: Re: pkg/42837 (www/squid31 abort()s)
Date: Fri, 19 Feb 2010 12:24:29 +0100

 At 9:45 Uhr +0000 19.02.2010, Matthias Scheler wrote:
 > >
 > > Hum... running squid (built with COPTS="-g -O" CFLAGS="-g -O" CXXFLAGS="-g
 > > -O") as user squid, and looking at the core:
 
 [...]
 
 > > Core was generated by `squid'.
 > > Program terminated with signal 6, Aborted.
 > > #0  0x40510ee8 in abort () from /usr/lib/libc.so.12
 > > (gdb) bt
 > > #0  0x40510ee8 in abort () from /usr/lib/libc.so.12
 > > #1  0x00135c80 in death ()
 > > #2  <signal handler called>
 > > #3  0x00000000 in ?? ()
 > > (gdb)
 >
 > Well, it looks like it calls abort(). It could either do that directly
 > or throw a C++ exception. Can you please try to add debugging
 > statements to figure out where it crashes?
 
 I did (see above).
 
 pkg_install(8) stripped the binaries (how to disable that?), which I
 eventually noticed, and repeated the gdb runs with an unstripped binary.
 Same result, though.
 
 
 [hauke@pizza] /<6>squid-3.1.0.16/src > file squid
 squid: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), for NetBSD 4.0,
 dynamically linked (uses shared libs), not stripped
 [hauke@pizza] /<6>squid-3.1.0.16/src > gdb squid
 GNU gdb 6.5
 Copyright (C) 2006 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 "sparc--netbsdelf"...
 (gdb) set args -N -d20
 (gdb) run
 Starting program: /var/obj/pkgsrc/www/squid31/work/squid-3.1.0.16/src/squid
 -N -d20
 Couldn't get registers: Operation not permitted.
 (gdb) quit
 The program is running.  Exit anyway? (y or n) y
 [hauke@pizza] /<6>squid-3.1.0.16/src >
 
 
 The only NetBSD related post about the "Couldn't get registers: Operation
 not permitted." gdb message is
 <http://mail-index.netbsd.org/tech-userlevel/2003/10/03/0000.html>.
 
 
 But, telling squid not to trap signals got me further:
 
 
 [hauke@pizza] /tmp >
 /var/obj/pkgsrc/www/squid31/work/squid-3.1.0.16/src/squid -N -C -d20
 2010/02/19 12:12:44| Starting Squid Cache version 3.1.0.16 for
 sparc--netbsdelf...
 2010/02/19 12:12:44| Process ID 19168
 2010/02/19 12:12:44| With 3392 file descriptors available
 2010/02/19 12:12:44| Initializing IP Cache...
 2010/02/19 12:12:44| DNS Socket created at 0.0.0.0, FD 4
 2010/02/19 12:12:44| Adding domain causeuse.org from /etc/resolv.conf
 2010/02/19 12:12:44| Adding nameserver 172.16.7.10 from /etc/resolv.conf
 2010/02/19 12:12:44| Adding domain causeuse.org from /etc/resolv.conf
 Segmentation fault(core dumped)
 [hauke@pizza] /tmp > gdb
 /var/obj/pkgsrc/www/squid31/work/squid-3.1.0.16/src/squid s
 squid.core      ssh-00007209aa/ ssh-00013148aa/ ssh-00023717aa/ ssh-00025039aa/
 [hauke@pizza] /tmp > gdb
 /var/obj/pkgsrc/www/squid31/work/squid-3.1.0.16/src/squid squid.core
 GNU gdb 6.5
 Copyright (C) 2006 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 "sparc--netbsdelf"...
 Reading symbols from /usr/lib/libpthread.so.0...done.
 Loaded symbols for /usr/lib/libpthread.so.0
 Symbols already loaded for /usr/lib/libpthread.so.0
 Reading symbols from /usr/lib/libcrypt.so.0...done.
 Loaded symbols for /usr/lib/libcrypt.so.0
 Reading symbols from /usr/lib/libgnumalloc.so.0...done.
 Loaded symbols for /usr/lib/libgnumalloc.so.0
 Reading symbols from /usr/lib/libstdc++.so.6...done.
 Loaded symbols for /usr/lib/libstdc++.so.6
 Reading symbols from /usr/lib/libm.so.0...done.
 Loaded symbols for /usr/lib/libm.so.0
 Reading symbols from /usr/lib/libgcc_s.so.1...done.
 Loaded symbols for /usr/lib/libgcc_s.so.1
 Reading symbols from /usr/lib/libsparc_v8.so.0...done.
 Loaded symbols for /usr/lib/libsparc_v8.so.0
 Reading symbols from /usr/lib/libc.so.12...done.
 Loaded symbols for /usr/lib/libc.so.12
 Reading symbols from /usr/libexec/ld.elf_so...done.
 Loaded symbols for /usr/libexec/ld.elf_so
 Core was generated by `squid'.
 Program terminated with signal 11, Segmentation fault.
 #0  0x00110180 in snmpLookupNodeStr (root=0x1, str=0xefffd98c "") at
 snmp_core.cc:940
 940             for (i = 0; i < e->children && e->leaves[i]->name[r] !=
 name[r]; i++) ; // seek-loop
 (gdb) bt
 #0  0x00110180 in snmpLookupNodeStr (root=0x1, str=0xefffd98c "") at
 snmp_core.cc:940
 #1  0x0011086c in snmpAddNodeStr (base_str=0x31c120 "", o=1883608,
 parsefunction=0xb02d0 <snmp_netIdnsFn>,
     instancefunction=0x11053c <static_Inst>) at snmp_core.cc:990
 #2  0x001111d4 in snmpInit () at snmp_core.cc:233
 #3  0x000fda7c in mainInitialize () at main.cc:976
 #4  0x000ff01c in SquidMain (argc=<value optimized out>, argv=0x1) at
 main.cc:1346
 #5  0x000ff17c in main (argc=0, argv=0xefffe4ac) at main.cc:1141
 (gdb)
 
 
 which is funny because I built squid explicitely *without* snmp support:
 
 <snip="/etc/mk.conf">
 PKG_OPTIONS.squid =     squid-backend-diskd squid-pf squid-ipf \
                         -squid-carp -squid-pam-helper -snmp -ssl
 </snip>
 
 and main.cc:976 has
 
 #ifdef SQUID_SNMP
 
     snmpInit();
 
 #endif
 
 so it should never get there...
 
        hauke
 
 -- 
      The ASCII Ribbon Campaign                    Hauke Fath
 ()     No HTML/RTF in email            Institut für Nachrichtentechnik
 /\     No Word docs in email                     TU Darmstadt
      Respect for open standards              Ruf +49-6151-16-3281
 


Home | Main Index | Thread Index | Old Index