RE: How to generate v3 traps?

"Yong Chen (yongche)" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <52E903A38F544F46A2A6632AC66103EE01519A50@xmb-sjc-221.amer.cisco.com>
Hi,

I'm using net-snmp 5.1, recently I see it crashes (stack trace attached,
it's on linux). I did some debug but no result. Is it a known issue?

Thanks,
Yong Chen


static int
netsnmp_tcp_send(netsnmp_transport *t, void *buf, int size,
                 void **opaque, int *olength)
{
    int rc = -1;
 

    if (t != NULL && t->sock >= 0) {
        while (rc < 0) {
            rc = send(t->sock, buf, size, 0);    <------
snmpTCPDomain.c:159, crashes here
            if (rc < 0 && errno != EINTR) {
                break;
            }
        }
    }
    return rc;
}


Stack trace:

#0  0x2acf95c8 in __pthread_alt_timedlock () from /lib/libpthread.so.0
#1  0xffffffff in ?? ()
#2  0x2ab22789 in netsnmp_tcp_send (t=0x85a77ec, buf=0x819741d,
size=431, opaque=0x84f31b0, olength=0x84f31b4)
    at .../src/snmp/net-snmp-5.1/snmplib/snmpTCPDomain.c:159
#3  0x2ab110f2 in _sess_async_send (sessp=0x2ab50cbc, pdu=0x84f317c,
callback=0xfffffe00, cb_data=0xfffffe00)
    at .../src/snmp/net-snmp-5.1/snmplib/snmp_api.c:6401
#4  0x2ab11f7a in snmp_sess_async_send (sessp=0x85a0684, pdu=0x84f317c,
callback=0, cb_data=0x0)
    at .../src/snmp/net-snmp-5.1/snmplib/snmp_api.c:6748
#5  0x2ab10f2e in snmp_async_send (session=0x84a5cc4, pdu=0x84f317c,
callback=0, cb_data=0x0)
    at .../src/snmp/net-snmp-5.1/snmplib/snmp_api.c:6219
#6  0x2ab10ec2 in snmp_send (session=0x84a5cc4, pdu=0x84f317c)
    at .../src/snmp/net-snmp-5.1/snmplib/snmp_api.c:6205
#7  0x2b0da65a in netsnmp_wrap_up_request (asp=0x84d588c,
status=135856628)
    at .../src/snmp/net-snmp-5.1/agent/snmp_agent.c:1941
#8  0x2b0dd280 in netsnmp_handle_request (asp=0x84d588c, status=0)
    at .../src/snmp/net-snmp-5.1/agent/snmp_agent.c:3632
#9  0x2b0dae11 in handle_snmp_packet (op=1, session=0x84a5cc4,
reqid=-512, pdu=0x85d2544, magic=0x0)
    at .../src/snmp/net-snmp-5.1/agent/snmp_agent.c:2180
#10 0x2ab12746 in _sess_process_packet (sessp=0x85a0684, sp=0x84a5cc4,
isp=0x8314724, transport=0x85a77ec,
    opaque=0x856925c, olength=16, packetptr=0x8652154
"0\202\001\205\002\001\0030\202", length=393)
    at .../src/snmp/net-snmp-5.1/snmplib/snmp_api.c:7135
#11 0x2ab147b3 in _sess_read (sessp=0x85a0684, fdset=0x8652154)
    at .../src/snmp/net-snmp-5.1/snmplib/snmp_api.c:8147
#12 0x2ab15490 in snmp_sess_read (sessp=0x85a0684, fdset=0x7fffe7f0)
    at .../src/snmp/net-snmp-5.1/snmplib/snmp_api.c:8244
#13 0x2ab133ad in snmp_read (fdset=0x7fffe7f0)
    at .../src/snmp/net-snmp-5.1/snmplib/snmp_api.c:7477
#14 0x0808d931 in receive () at
.../src/snmp/net-snmp-5.1/agent/snmpd.c:1378
#15 0x0808cba9 in main (argc=5, argv=0x7ffffbb4)
    at .../src/snmp/net-snmp-5.1/agent/snmpd.c:1177
(gdb) p *t
$22 = {domain = 0x80ccf70, domain_length = 9, local = 0x81a19a4 "",
local_length = 6, remote = 0x0,
  remote_length = 0, sock = 49, flags = 1, data = 0x817710c, data_length
= 16, msgMaxSize = 2147483647,
  f_recv = 0x2ab22520 <netsnmp_tcp_recv>, f_send = 0x2ab22750
<netsnmp_tcp_send>,
  f_close = 0x2ab227b0 <netsnmp_tcp_close>, f_accept = 0x2ab22890
<netsnmp_tcp_accept>,
  f_fmtaddr = 0x8052264 <netsnmp_tcp_fmtaddr>}
(gdb) info args
t = (netsnmp_transport *) 0x85a77ec
buf = (void *) 0x819741d
size = 431
opaque = (void **) 0x84f31b0
olength = (int *) 0x84f31b4


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.