On Wed, 2010-10-06 at 13:37 -0400, Victor Duchovni wrote:
> On Wed, Oct 06, 2010 at 12:28:45PM -0500, Vernon A. Fort wrote:
> 
> > > We don't yet need the whole core file, just run:
> > > 
> > >   gdb /usr/sbin/postscreen /path/to/core
> > >   ... copious output ...
> > >   gdb) bt
> > > 
> > > The "bt" command generates a back-trace (stack trace), that should show
> > > where the segfault occurred. Ideally, your postscreen is compiled with
> > > "-g" or "-g -O", i.e. with symbols and line numbers, ...
> > > 
> > 
> > attached.  This is a gentoo install so added the "ggdb" flag to the
> > make.conf file and re-compiled postfix.  I also removed the
> > -fomit-frame-pointer per the backtrace doc's.
> 
> Sadly, the binary still has no symbols. It should be compiled with
> "-g" or "-g -O" and installed without being stripped, although that
> is not too hard to fix, by running gdb on the unstripped binary
> in the build-tree instead.
> 
> > This is my first time working with core and backtrace files - bear with
> > me.
> 
> Thanks. This is closer, but the "postscreen" binary does not yet have
> the necessary symbol table.
> 

I recompiled postfix:  unstripped and with -ggdb.  I ran gdb postscreen
core file - new binary but old core file.  May be still useful but will
have to wait on another segfault.

attached is the backtrace using new binary with old core file.

Vernon 
ns coredumps # gdb /usr/lib/postfix/postscreen core-11-207-207-6530-1286380780 
GNU gdb (Gentoo 7.0.1 p1) 7.0.1
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/lib/postfix/postscreen...done.

warning: exec file is newer than core file.

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/libpcre.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpcre.so.0
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /usr/lib/libmysqlclient.so.16...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libmysqlclient.so.16
Reading symbols from /usr/lib/libdb-4.8.so...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libdb-4.8.so
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/libssl.so.0.9.8...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libssl.so.0.9.8
Reading symbols from /usr/lib/libcrypto.so.0.9.8...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.8
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnss_compat.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libnss_nis.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib/libnss_files.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /lib/libnss_files.so.2
Core was generated by `postscreen -l -n smtp -t inet -u -s 2 -v'.
Program terminated with signal 11, Segmentation fault.
#0  0x08067213 in vbuf_print (bp=0x88d1318, format=0x88d1cb0 "%s: notify 
%s:%s", ap=0xbf8ee9f8 
"\377\377\377\377\377\377\377\377`\036\216\b`\036\216\bh\352\216\277I\300\004\b")
 at vbuf_print.c:218
218     vbuf_print.c: No such file or directory.
        in vbuf_print.c
(gdb) bt
#0  0x08067213 in vbuf_print (bp=0x88d1318, format=0x88d1cb0 "%s: notify 
%s:%s", ap=0xbf8ee9f8 
"\377\377\377\377\377\377\377\377`\036\216\b`\036\216\bh\352\216\277I\300\004\b")
 at vbuf_print.c:218
#1  0x0806362a in vstring_vsprintf (vp=0x88d1318, format=0x88d1cb0 "%s: notify 
%s:%s", ap=0xbf8ee9f4 
"\246\203\006\b\377\377\377\377\377\377\377\377`\036\216\b`\036\216\bh\352\216\277I\300\004\b")
    at vstring.c:586
#2  0x0805fa65 in msg_vprintf (level=0, format=0x80683bb "%s: notify %s:%s", 
ap=0xbf8ee9f4 
"\246\203\006\b\377\377\377\377\377\377\377\377`\036\216\b`\036\216\bh\352\216\277I\300\004\b")
 at msg_output.c:157
#3  0x0805f827 in msg_info (fmt=0x80683bb "%s: notify %s:%s") at msg.c:179
#4  0x0804c39a in ps_early_dnsbl_event (unused_event=0, 
    context=0x88d1348 
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377p")
    at postscreen_early.c:228
#5  0x0804c049 in ps_dnsbl_receive (event=1, context=0x88e1e60 "") at 
postscreen_dnsbl.c:371
#6  0x0805c31f in event_loop (delay=-1) at events.c:1180
#7  0x0804f345 in event_server_main (argc=10, argv=0xbf8ef114, 
service=0x804b191 <ps_service>) at event_server.c:882
#8  0x0804ab26 in main (argc=10, argv=0xbf8ef114) at postscreen.c:888
(gdb) 
#0  0x08067213 in vbuf_print (bp=0x88d1318, format=0x88d1cb0 "%s: notify 
%s:%s", ap=0xbf8ee9f8 
"\377\377\377\377\377\377\377\377`\036\216\b`\036\216\bh\352\216\277I\300\004\b")
 at vbuf_print.c:218
#1  0x0806362a in vstring_vsprintf (vp=0x88d1318, format=0x88d1cb0 "%s: notify 
%s:%s", ap=0xbf8ee9f4 
"\246\203\006\b\377\377\377\377\377\377\377\377`\036\216\b`\036\216\bh\352\216\277I\300\004\b")
    at vstring.c:586
#2  0x0805fa65 in msg_vprintf (level=0, format=0x80683bb "%s: notify %s:%s", 
ap=0xbf8ee9f4 
"\246\203\006\b\377\377\377\377\377\377\377\377`\036\216\b`\036\216\bh\352\216\277I\300\004\b")
 at msg_output.c:157
#3  0x0805f827 in msg_info (fmt=0x80683bb "%s: notify %s:%s") at msg.c:179
#4  0x0804c39a in ps_early_dnsbl_event (unused_event=0, 
    context=0x88d1348 
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377p")
    at postscreen_early.c:228
#5  0x0804c049 in ps_dnsbl_receive (event=1, context=0x88e1e60 "") at 
postscreen_dnsbl.c:371
#6  0x0805c31f in event_loop (delay=-1) at events.c:1180
#7  0x0804f345 in event_server_main (argc=10, argv=0xbf8ef114, 
service=0x804b191 <ps_service>) at event_server.c:882
#8  0x0804ab26 in main (argc=10, argv=0xbf8ef114) at postscreen.c:888
(gdb) quit

Reply via email to