View Issue Details

IDProjectCategoryView StatusLast Update
0006684CentOS-6net-snmppublic2013-09-30 17:27
Reporterdradenvandewind 
PriorityurgentSeveritycrashReproducibilityalways
Status newResolutionopen 
PlatformintelOSCentOSOS Version6.4
Product Version 
Target VersionFixed in Version 
Summary0006684: core dump snmptrapd 5.5
DescriptionBug report

i have this coredump after to launch snmptrapd

valgrind -v --leak-check=full /usr/sbin/snmptrapd -c /etc/snmp/snmptrapd.conf

==23924== Memcheck, a memory error detector

==23924== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.

==23924== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info

==23924== Command: /usr/sbin/snmptrapd -c /etc/snmp/snmptrapd.conf

==23924==

--23924-- Valgrind options:

--23924-- -v

--23924-- --leak-check=full

--23924-- Contents of /proc/version:

--23924-- Linux version 2.6.32-358.11.1.el6.x86_64 (mockbuild@c6b7.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Wed Jun 12 03:34:52 UTC 2013

--23924-- Arch and hwcaps: AMD64, amd64-sse3

--23924-- Page sizes: currently 4096, max supported 4096

--23924-- Valgrind library directory: /usr/lib64/valgrind

--23924-- Reading syms from /usr/sbin/snmptrapd

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/valgrind/memcheck-amd64-linux

--23924-- object doesn't have a dynamic symbol table

--23924-- Reading syms from /lib64/ld-2.12.so

--23924-- Scheduler: using generic scheduler lock implementation.

--23924-- Reading suppressions file: /usr/lib64/valgrind/default.supp

==23924== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-23924-by-root-on-localhost.localdomain

==23924== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-23924-by-root-on-localhost.localdomain

==23924== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-23924-by-root-on-localhost.localdomain

==23924==

==23924== TO CONTROL THIS PROCESS USING vgdb (which you probably

==23924== don't want to do, unless you know exactly what you're doing,

==23924== or are doing some strange experiment):

==23924== /usr/lib64/valgrind/../../bin/vgdb --pid=23924 ...command...

==23924==

==23924== TO DEBUG THIS PROCESS USING GDB: start GDB like this

==23924== /path/to/gdb /usr/sbin/snmptrapd

==23924== and then give GDB the following command

==23924== target remote | /usr/lib64/valgrind/../../bin/vgdb --pid=23924

==23924== --pid is optional if only one valgrind process is running

==23924==

--23924-- REDIR: 0x3b57c174a0 (strlen) redirected to 0x38049551 (vgPlain_amd64_linux_REDIR_FOR_strlen)

--23924-- Reading syms from /usr/lib64/valgrind/vgpreload_core-amd64-linux.so

--23924-- Reading syms from /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so

--23924-- REDIR: 0x3b57c17310 (index) redirected to 0x4a07bf0 (index)

--23924-- REDIR: 0x3b57c17390 (strcmp) redirected to 0x4a08530 (strcmp)

--23924-- Reading syms from /usr/lib64/libnetsnmptrapd.so.20.0.0

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/libnetsnmpmibs.so.20.0.0

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/libnetsnmphelpers.so.20.0.0

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/librpm.so.1.0.0

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/librpmio.so.1.0.0

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libpopt.so.0.0.0

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libz.so.1.2.3

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/libsensors.so.4.2.0

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/libnetsnmpagent.so.20.0.0

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libwrap.so.0.7.6

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/libnetsnmp.so.20.0.0

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/perl5/CORE/libperl.so

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libresolv-2.12.so

--23924-- Reading syms from /lib64/libnsl-2.12.so

--23924-- Reading syms from /lib64/libdl-2.12.so

--23924-- Reading syms from /lib64/libm-2.12.so

--23924-- Reading syms from /lib64/libcrypt-2.12.so

--23924-- Reading syms from /lib64/libutil-2.12.so

--23924-- Reading syms from /lib64/libpthread-2.12.so

--23924-- Reading syms from /lib64/libc-2.12.so

--23924-- Reading syms from /usr/lib64/libcrypto.so.1.0.0

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/libnss3.so

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libbz2.so.1.0.4

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/libelf-0.152.so

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/liblzma.so.0.0.0

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/liblua-5.1.so

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libselinux.so.1

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libcap.so.2.16

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libacl.so.1.1.0

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libdb-4.7.so

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/librt-2.12.so

--23924-- Reading syms from /lib64/libgcc_s-4.4.7-20120601.so.1

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libfreebl3.so

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /usr/lib64/libnssutil3.so

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libplc4.so

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libplds4.so

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libnspr4.so

--23924-- object doesn't have a symbol table

--23924-- Reading syms from /lib64/libattr.so.1.1.0

--23924-- object doesn't have a symbol table

--23924-- REDIR: 0x799b890 (strcmp) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x79a0e80 (strcasecmp) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x79a3140 (strncasecmp) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x799fb50 (memset) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x799d500 (strncmp) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x799d2d0 (strlen) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x799edc0 (rindex) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x79aa670 (strstr) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x799b7e0 (index) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x799cd20 (strcpy) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x799f580 (bcmp) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x799ed90 (strncpy) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x799ce30 (strcspn) redirected to 0x480155c (_vgnU_ifunc_wrapper)

--23924-- REDIR: 0x799edf0 (__GI_strrchr) redirected to 0x4a07a70 (__GI_strrchr)

--23924-- REDIR: 0x79968a0 (malloc) redirected to 0x4a0696c (malloc)

--23924-- REDIR: 0x799d310 (__GI_strlen) redirected to 0x4a07f70 (__GI_strlen)

--23924-- REDIR: 0x799b810 (__GI_strchr) redirected to 0x4a07b30 (__GI_strchr)

--23924-- REDIR: 0x79964e0 (calloc) redirected to 0x4a056d7 (calloc)

--23924-- REDIR: 0x79a5820 (memcpy) redirected to 0x4a08b20 (memcpy)

--23924-- REDIR: 0x799b8d0 (__GI_strcmp) redirected to 0x4a084e0 (__GI_strcmp)

--23924-- REDIR: 0x79a9f90 (__GI_strncpy) redirected to 0x4a08280 (__GI_strncpy)

==23924== Source and destination overlap in strncpy(0x6665469, 0x6665469, 64)

==23924== at 0x4A0833F: __GI_strncpy (mc_replace_strmem.c:477)

==23924== by 0x641AEFC: snmp_log_syslogname (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x641AF27: snmp_enable_syslog_ident (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x10C842: main (in /usr/sbin/snmptrapd)

==23924==

--23924-- REDIR: 0xffffffffff600000 (???) redirected to 0x38049533 (vgPlain_amd64_linux_REDIR_FOR_vgettimeofday)

--23924-- REDIR: 0x79976d0 (free) redirected to 0x4a06369 (free)

--23924-- REDIR: 0x79aa120 (__memset_x86_64) redirected to 0x4a09a10 (memset)

--23924-- REDIR: 0x799f9b0 (memmove) redirected to 0x4a09ab0 (memmove)

--23924-- REDIR: 0x79a6ca0 (strchrnul) redirected to 0x4a09f10 (strchrnul)

--23924-- REDIR: 0x799d540 (__GI_strncmp) redirected to 0x4a08430 (__GI_strncmp)

--23924-- REDIR: 0x79a06b0 (mempcpy) redirected to 0x4a09f80 (mempcpy)

--23924-- REDIR: 0x79a0d30 (__GI_stpcpy) redirected to 0x4a097a0 (__GI_stpcpy)

--23924-- REDIR: 0x79aab30 (__GI_strstr) redirected to 0x4a0a160 (strstr)

--23924-- REDIR: 0x799f500 (memchr) redirected to 0x4a085d0 (memchr)

--23924-- REDIR: 0x79a0ec0 (__strcasecmp_sse2) redirected to 0x4a0aa40 (strcasecmp)

--23924-- REDIR: 0xffffffffff600400 (???) redirected to 0x3804953d (vgPlain_amd64_linux_REDIR_FOR_vtime)

--23924-- REDIR: 0x799cd50 (__GI_strcpy) redirected to 0x4a08060 (__GI_strcpy)

--23924-- REDIR: 0x7997bc0 (realloc) redirected to 0x4a06b17 (realloc)

--23924-- REDIR: 0x7a1b2b0 (__strcpy_chk) redirected to 0x4a0ad30 (__strcpy_chk)

--23924-- REDIR: 0x79a6c50 (__GI___rawmemchr) redirected to 0x4a09f60 (__GI___rawmemchr)

--23924-- REDIR: 0x79a5810 (__memcpy_chk) redirected to 0x4a0abd0 (__memcpy_chk)

==23924== Invalid read of size 1

==23924== at 0x4A07F72: __GI_strlen (mc_replace_strmem.c:404)

==23924== by 0x799D035: strdup (in /lib64/libc-2.12.so)

==23924== by 0x4C2F18A: snmptrapd_parse_traphandle (in /usr/lib64/libnetsnmptrapd.so.20.0.0)

==23924== by 0x6416360: run_config_handler (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x641657D: read_config (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x6416D32: ??? (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x6417052: read_config_files (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x641797F: read_configs (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x10C3D9: main (in /usr/sbin/snmptrapd)

==23924== Address 0x0 is not stack'd, malloc'd or (recently) free'd

==23924==

==23924==

==23924== Process terminating with default action of signal 11 (SIGSEGV)

==23924== Access not within mapped region at address 0x0

==23924== at 0x4A07F72: __GI_strlen (mc_replace_strmem.c:404)

==23924== by 0x799D035: strdup (in /lib64/libc-2.12.so)

==23924== by 0x4C2F18A: snmptrapd_parse_traphandle (in /usr/lib64/libnetsnmptrapd.so.20.0.0)

==23924== by 0x6416360: run_config_handler (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x641657D: read_config (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x6416D32: ??? (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x6417052: read_config_files (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x641797F: read_configs (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x10C3D9: main (in /usr/sbin/snmptrapd)

==23924== If you believe this happened as a result of a stack

==23924== overflow in your program's main thread (unlikely but

==23924== possible), you can try to increase the size of the

==23924== main thread stack using the --main-stacksize= flag.

==23924== The main thread stack size used in this run was 10485760.

==23924==

==23924== HEAP SUMMARY:

==23924== in use at exit: 755,574 bytes in 13,936 blocks

==23924== total heap usage: 36,095 allocs, 22,159 frees, 4,996,327 bytes allocated

==23924==

==23924== Searching for pointers to 13,936 not-freed blocks

==23924== Checked 2,403,120 bytes

==23924==

==23924== LEAK SUMMARY:

==23924== definitely lost: 0 bytes in 0 blocks

==23924== indirectly lost: 0 bytes in 0 blocks

==23924== possibly lost: 0 bytes in 0 blocks

==23924== still reachable: 755,574 bytes in 13,936 blocks

==23924== suppressed: 0 bytes in 0 blocks

==23924== Reachable blocks (those to which a pointer was found) are not shown.

==23924== To see them, rerun with: --leak-check=full --show-reachable=yes

==23924==

==23924== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 18 from 6)

==23924==

==23924== 1 errors in context 1 of 2:

==23924== Invalid read of size 1

==23924== at 0x4A07F72: __GI_strlen (mc_replace_strmem.c:404)

==23924== by 0x799D035: strdup (in /lib64/libc-2.12.so)

==23924== by 0x4C2F18A: snmptrapd_parse_traphandle (in /usr/lib64/libnetsnmptrapd.so.20.0.0)

==23924== by 0x6416360: run_config_handler (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x641657D: read_config (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x6416D32: ??? (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x6417052: read_config_files (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x641797F: read_configs (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x10C3D9: main (in /usr/sbin/snmptrapd)

==23924== Address 0x0 is not stack'd, malloc'd or (recently) free'd

==23924==

==23924==

==23924== 1 errors in context 2 of 2:

==23924== Source and destination overlap in strncpy(0x6665469, 0x6665469, 64)

==23924== at 0x4A0833F: __GI_strncpy (mc_replace_strmem.c:477)

==23924== by 0x641AEFC: snmp_log_syslogname (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x641AF27: snmp_enable_syslog_ident (in /usr/lib64/libnetsnmp.so.20.0.0)

==23924== by 0x10C842: main (in /usr/sbin/snmptrapd)

==23924==

--23924--

--23924-- used_suppression: 16 U1004-ARM-_dl_relocate_object

--23924-- used_suppression: 2 glibc-2.5.x-on-SUSE-10.2-(PPC)-2a

==23924==

==23924== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 18 from 6)

Erreur de segmentation (core dumped)

 

 

 

$ /usr/bin/gdb /usr/sbin/snmptrapd -c /etc/snmp/snmptrapd.conf

GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)

Copyright (C) 2010 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 "x86_64-redhat-linux-gnu".

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>...

Reading symbols from /usr/sbin/snmptrapd...(no debugging symbols found)...done.

"/etc/snmp/snmptrapd.conf" is not a core dump: Format de fichier non reconnu

Missing separate debuginfos, use: debuginfo-install net-snmp-5.5-44.el6_4.4.x86_64

(gdb) run

Starting program: /usr/sbin/snmptrapd

[Thread debugging using libthread_db enabled]

 

Program received signal SIGSEGV, Segmentation fault.

0x00007ffff4dd8321 in __strlen_sse2 () from /lib64/libc.so.6

Steps To Reproduce/usr/sbin/snmptrapd -c /etc/snmp/snmptrapd.conf
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2013-09-30 17:27 dradenvandewind New Issue