Menu

#2557 application using libnetsnmpagent.so is crashing at start

64-bit
open
5
2015-01-15
2014-07-03
drookie
No

Application (asterisk in this case) using the libnetsnmpagent library is crashing at the start. Backtrace shows that crash happens inside the libnetsnmpagent library, so I'm reporting it here, not in asterisk (this is actually similar to the bug #2073, that also was causing asterisk to crash, and it was fixed here).

OS: FreeBSD 10.0-STABLE

Compiler:
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.0
Thread model: posix
Selected GCC installation:

Net-SNMP version: 5.7.2

Backtrace:

#0  0x000000082313cb7f in agentx_register (ss=0xc1, start=0x8041301f0, startlen=10, priority=127, range_subid=0, 
    range_ubound=0, timeout=-1, flags=0 '\0', contextName=0x8040626b8 "") at mibgroup/agentx/client.c:184
184     mibgroup/agentx/client.c: No such file or directory.
        in mibgroup/agentx/client.c
[New Thread 8072bbc00 (LWP 100743/asterisk)]
[New Thread 8072bb400 (LWP 100739/asterisk)]
[New Thread 8072bb000 (LWP 100708/asterisk)]
[New Thread 8072ba800 (LWP 100706/asterisk)]
[New Thread 8072ba400 (LWP 100705/asterisk)]
[New Thread 8072ba000 (LWP 100704/asterisk)]
[New Thread 8072b9c00 (LWP 100703/asterisk)]
[New Thread 8072b9800 (LWP 100701/asterisk)]
[New Thread 802c14c00 (LWP 100700/asterisk)]
[New Thread 802c14000 (LWP 100697/asterisk)]
[New Thread 802c13000 (LWP 100696/asterisk)]
[New Thread 802c12c00 (LWP 100695/asterisk)]
[New Thread 802c12800 (LWP 100694/asterisk)]
[New Thread 802c12000 (LWP 100693/asterisk)]
[New Thread 802c11800 (LWP 100692/asterisk)]
[New Thread 802c11400 (LWP 100691/asterisk)]
[New Thread 802c10c00 (LWP 100690/asterisk)]
[New Thread 802c0f000 (LWP 100689/asterisk)]
[New Thread 802c0e800 (LWP 100688/asterisk)]
[New Thread 802c0dc00 (LWP 100687/asterisk)]
[New Thread 802c0d800 (LWP 100686/asterisk)]
[New Thread 802c0d400 (LWP 100685/asterisk)]
[New Thread 802c0d000 (LWP 100684/asterisk)]
[New Thread 802c0cc00 (LWP 100683/asterisk)]
[New Thread 802c0c800 (LWP 100682/asterisk)]
[New Thread 802c0c400 (LWP 100681/asterisk)]
[New Thread 802c0c000 (LWP 100680/asterisk)]
[New Thread 802c0bc00 (LWP 100679/asterisk)]
[New Thread 802c0b800 (LWP 100678/asterisk)]
[New Thread 802c0b400 (LWP 100677/asterisk)]
[New Thread 802c0b000 (LWP 100676/asterisk)]
[New Thread 802c0ac00 (LWP 100675/asterisk)]
[New Thread 802c0a000 (LWP 100674/asterisk)]
[New Thread 802c09c00 (LWP 100673/asterisk)]
[New Thread 802c07000 (LWP 100672/asterisk)]
[New Thread 802c06c00 (LWP 100671/asterisk)]
[New Thread 802c06800 (LWP 100571/asterisk)]
[New Thread 802c06400 (LWP 100572/asterisk)]
(gdb) bt
#0  0x000000082313cb7f in agentx_register (ss=0xc1, start=0x8041301f0, startlen=10, priority=127, range_subid=0, 
    range_ubound=0, timeout=-1, flags=0 '\0', contextName=0x8040626b8 "") at mibgroup/agentx/client.c:184
#1  0x0000000823128b7f in agentx_registration_callback (majorID=1, minorID=1, serverarg=0x7ffffeae6d98, 
    clientarg=0x804141540) at mibgroup/agentx/subagent.c:700
#2  0x00000008235e0d40 in snmp_call_callbacks (major=1, minor=1, caller_arg=0x7ffffeae6d98) at callback.c:363
#3  0x000000082310d288 in register_mib_reattach_node (s=0x8041312a0) at agent_registry.c:1313
#4  0x000000082310d0e7 in register_mib_reattach () at agent_registry.c:1329
#5  0x0000000823125d60 in agentx_reopen_session (clientreg=0, clientarg=0x0) at mibgroup/agentx/subagent.c:962
#6  0x0000000823125c75 in subagent_startup (majorID=0, minorID=0, serverarg=0x0, clientarg=0x0)
    at mibgroup/agentx/subagent.c:107
#7  0x00000008235e0d40 in snmp_call_callbacks (major=0, minor=0, caller_arg=0x0) at callback.c:363
#8  0x00000008235cfa18 in read_configs () at read_config.c:1070
#9  0x00000008235a0c2a in init_snmp (type=0x82237a898 "asterisk") at snmp_api.c:860
#10 0x00000008223784d4 in agent_thread (arg=0x0) at strings.h:65
#11 0x0000000000589d1e in dummy_start (data=0x80730fd00) at _ctype.h:125
#12 0x0000000801fae455 in pthread_create () from /lib/libthr.so.3
#13 0x0000000000000000 in ?? ()
Current language:  auto; currently minimal
(gdb)

Discussion

  • drookie

    drookie - 2014-07-03

    Cheesus. Any chance I could fix the mess above ?

    here's a backtrace anyway in human-readable form:

    #0  0x000000082313cb7f in agentx_register (ss=0xc1, start=0x8041301f0, startlen=10, priority=127, range_subid=0, 
        range_ubound=0, timeout=-1, flags=0 '\0', contextName=0x8040626b8 "") at mibgroup/agentx/client.c:184
    184     mibgroup/agentx/client.c: No such file or directory.
            in mibgroup/agentx/client.c
    [New Thread 8072bbc00 (LWP 100743/asterisk)]
    [New Thread 8072bb400 (LWP 100739/asterisk)]
    [New Thread 8072bb000 (LWP 100708/asterisk)]
    [New Thread 8072ba800 (LWP 100706/asterisk)]
    [New Thread 8072ba400 (LWP 100705/asterisk)]
    [New Thread 8072ba000 (LWP 100704/asterisk)]
    [New Thread 8072b9c00 (LWP 100703/asterisk)]
    [New Thread 8072b9800 (LWP 100701/asterisk)]
    [New Thread 802c14c00 (LWP 100700/asterisk)]
    [New Thread 802c14000 (LWP 100697/asterisk)]
    [New Thread 802c13000 (LWP 100696/asterisk)]
    [New Thread 802c12c00 (LWP 100695/asterisk)]
    [New Thread 802c12800 (LWP 100694/asterisk)]
    [New Thread 802c12000 (LWP 100693/asterisk)]
    [New Thread 802c11800 (LWP 100692/asterisk)]
    [New Thread 802c11400 (LWP 100691/asterisk)]
    [New Thread 802c10c00 (LWP 100690/asterisk)]
    [New Thread 802c0f000 (LWP 100689/asterisk)]
    [New Thread 802c0e800 (LWP 100688/asterisk)]
    [New Thread 802c0dc00 (LWP 100687/asterisk)]
    [New Thread 802c0d800 (LWP 100686/asterisk)]
    [New Thread 802c0d400 (LWP 100685/asterisk)]
    [New Thread 802c0d000 (LWP 100684/asterisk)]
    [New Thread 802c0cc00 (LWP 100683/asterisk)]
    [New Thread 802c0c800 (LWP 100682/asterisk)]
    [New Thread 802c0c400 (LWP 100681/asterisk)]
    [New Thread 802c0c000 (LWP 100680/asterisk)]
    [New Thread 802c0bc00 (LWP 100679/asterisk)]
    [New Thread 802c0b800 (LWP 100678/asterisk)]
    [New Thread 802c0b400 (LWP 100677/asterisk)]
    [New Thread 802c0b000 (LWP 100676/asterisk)]
    [New Thread 802c0ac00 (LWP 100675/asterisk)]
    [New Thread 802c0a000 (LWP 100674/asterisk)]
    [New Thread 802c09c00 (LWP 100673/asterisk)]
    [New Thread 802c07000 (LWP 100672/asterisk)]
    [New Thread 802c06c00 (LWP 100671/asterisk)]
    [New Thread 802c06800 (LWP 100571/asterisk)]
    [New Thread 802c06400 (LWP 100572/asterisk)]
    (gdb) bt
    #0  0x000000082313cb7f in agentx_register (ss=0xc1, start=0x8041301f0, startlen=10, priority=127, range_subid=0, 
        range_ubound=0, timeout=-1, flags=0 '\0', contextName=0x8040626b8 "") at mibgroup/agentx/client.c:184
    #1  0x0000000823128b7f in agentx_registration_callback (majorID=1, minorID=1, serverarg=0x7ffffeae6d98, 
        clientarg=0x804141540) at mibgroup/agentx/subagent.c:700
    #2  0x00000008235e0d40 in snmp_call_callbacks (major=1, minor=1, caller_arg=0x7ffffeae6d98) at callback.c:363
    #3  0x000000082310d288 in register_mib_reattach_node (s=0x8041312a0) at agent_registry.c:1313
    #4  0x000000082310d0e7 in register_mib_reattach () at agent_registry.c:1329
    #5  0x0000000823125d60 in agentx_reopen_session (clientreg=0, clientarg=0x0) at mibgroup/agentx/subagent.c:962
    #6  0x0000000823125c75 in subagent_startup (majorID=0, minorID=0, serverarg=0x0, clientarg=0x0)
        at mibgroup/agentx/subagent.c:107
    #7  0x00000008235e0d40 in snmp_call_callbacks (major=0, minor=0, caller_arg=0x0) at callback.c:363
    #8  0x00000008235cfa18 in read_configs () at read_config.c:1070
    #9  0x00000008235a0c2a in init_snmp (type=0x82237a898 "asterisk") at snmp_api.c:860
    #10 0x00000008223784d4 in agent_thread (arg=0x0) at strings.h:65
    #11 0x0000000000589d1e in dummy_start (data=0x80730fd00) at _ctype.h:125
    #12 0x0000000801fae455 in pthread_create () from /lib/libthr.so.3
    #13 0x0000000000000000 in ?? ()
    Current language:  auto; currently minimal
    (gdb)
    
     
  • Niels Baggesen

    Niels Baggesen - 2014-07-03
    • assigned_to: Niels Baggesen
     
  • Niels Baggesen

    Niels Baggesen - 2014-07-03

    A can't see how it is possible to crash at that line.

    How did asterisk and net-snmp get into your system? ports collection? pkg? Did you compile them yourself?

    My immediate suspicion would be a 32/64 bit mismatch

     
  • Bill Fenner

    Bill Fenner - 2014-07-07
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -12,6 +12,7 @@
    
     Backtrace:
    
    +~~~~
     #0  0x000000082313cb7f in agentx_register (ss=0xc1, start=0x8041301f0, startlen=10, priority=127, range_subid=0, 
         range_ubound=0, timeout=-1, flags=0 '\0', contextName=0x8040626b8 "") at mibgroup/agentx/client.c:184
     184     mibgroup/agentx/client.c: No such file or directory.
    @@ -74,3 +75,4 @@
     #13 0x0000000000000000 in ?? ()
     Current language:  auto; currently minimal
     (gdb)
    +~~~~
    
     

Log in to post a comment.