Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 616347 - snmptrapd dies when starting external script
snmptrapd dies when starting external script
Product: Fedora
Classification: Fedora
Component: net-snmp (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Jan Safranek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-07-20 04:34 EDT by Jan Safranek
Modified: 2010-08-02 20:34 EDT (History)
1 user (show)

See Also:
Fixed In Version: net-snmp-5.5-14.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-08-02 20:34:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Safranek 2010-07-20 04:34:50 EDT
Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. /etc/snmp/snmptrapd.conf:
authCommunity   log,execute,net public
traphandle SNMPv2-MIB::coldStart /bin/tail -a /var/run/test.out

2. service snmptrapd restart
3. let snmptrapd process a coldStart trap, e.g. using this /etc/snmp/snmpd.conf and service snmpd restart:
rwcommunity public
trap2sink localhost

Actual results:
snmptrapd crashes

Expected results:
snmptrapd survives, /var/run/test.out contains the trap

Additional info:
stack trace:
Program received signal SIGABRT, Aborted.
(gdb) bt full
#0  0x00007ffff50d29a5 in raise () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007ffff50d4185 in abort () from /lib64/libc.so.6
No symbol table info available.
#2  0x00007ffff510fd5b in __libc_message () from /lib64/libc.so.6
No symbol table info available.
#3  0x00007ffff519b277 in __fortify_fail () from /lib64/libc.so.6
No symbol table info available.
#4  0x00007ffff5199170 in __chk_fail () from /lib64/libc.so.6
No symbol table info available.
#5  0x00007ffff4e162ed in strcpy () at /usr/include/bits/string3.h:107
No locals.
#6  netsnmp_mktemp () at system.c:1236
        name = "/var/run/net-snmp/snmp-tmp-XXXXX"
        fd = -1
        __func__ = "netsnmp_mktemp"
#7  0x00007ffff68da725 in run_shell_command (command=0x7ffff82a1180 "/bin/tail
-a /var/run/test.out", 
    input=0x7ffff82e3720 "dhcp-2-160.brq.redhat.com\nUDP:
SNMPv2-MIB::coldStart\nSNMPv2-MIB::snmpTrapEnterprise.0 NET-SNMP"...,
output=0x0, out_len=0x0) at mibgroup/utilities/execute.c:64
        file = <value optimized out>
        ifname = <value optimized out>
        ofname = <value optimized out>
        shellline =
'\000' <repeats 40 times>"\340, \003\000\000\004", '\000' <repeats 27
'\000' <repeats 15 times>, "t\002\336\367\377\177", '\000' <repeats 11
        result = <value optimized out>
        __func__ = "run_shell_command"
#8  0x00007ffff7bd01b0 in command_handler (pdu=0x7ffff82e3180,
transport=0x7ffff82b7a30, handler=0x7ffff82c4790) at snmptrapd_handlers.c:835
        v2_pdu = 0x7ffff82e3180
        rbuf = 0x7ffff82e3720 "dhcp-2-160.brq.redhat.com\nUDP:
SNMPv2-MIB::coldStart\nSNMPv2-MIB::snmpTrapEnterprise.0 NET-SNMP"...
        r_len = 320
        o_len = 226
        oldquick = 0
        __func__ = "command_handler"
Comment 1 Fedora Update System 2010-07-20 07:38:32 EDT
net-snmp-5.5-14.fc13 has been submitted as an update for Fedora 13.
Comment 2 Fedora Update System 2010-08-02 20:34:23 EDT
net-snmp-5.5-14.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.