Hi all:

        I have some problem using net-snmp in multi-threads application.

        my version of net_snmp is 5.5.

        the application is simple, which is much like snmpdemoapp.c in the 
wiki, and use the Single Session API, with several threads, each has its 
session and read some information from remote host, I followed the advice in  
README.thread--, invoke the snmp_sess_init() before adding task to each thread, 
and insure that "_init_snmp_init_done == 1" when each thread perform its 
task,but still get wrong result.

the stack:

#0  0xb6aa7a67 in raise () from /lib/libc.so.6

#1  0xb6aa9272 in abort () from /lib/libc.so.6

#2  0xb6ae605d in __libc_message () from /lib/libc.so.6

#3  0xb6aec5aa in malloc_printerr () from /lib/libc.so.6

#4  0xb6aef503 in _int_free () from /lib/libc.so.6

#5  0xb6af26b0 in free () from /lib/libc.so.6

#6  0xb6d6a07b in print_module_not_found (cp=0x2 <Address 0x2 out of bounds>) 
at parse.c:807

#7  0xb6d71a62 in netsnmp_read_module (name=0xaea3f958 "IF-MIB") at parse.c:3952

#8  0xb6d5afd9 in get_module_node (fname=0xaec01b4b "ifOperStatus", 
module=0xaea3f958 "IF-MIB", objid=0xb66fab88, objidlen=0xb66fae8c) at mib.c:5099

#9  0xb6d5b174 in get_node (name=0xaec01b47 "IB::ifOperStatus", 
objid=0xb66fab88, objidlen=0xb66fae8c) at mib.c:5676

#10 0xb6d5ec9f in read_objid (input=0xaec01b43 "IF-MIB::ifOperStatus", 
output=0xb66fab88, out_len=0xb66fae8c) at mib.c:3024

#11 0xaebff894 in sw_if_status (pdev_node=0xb66faeec) at type.c:743

#12 0x08098f88 in pt_get_dev_if_info_fun (pMutex=0x9a8fed8, sem=0x9a8fef4, 
jobs=0x9a8ff10) at Server.cpp:189

#13 0xb7819a50 in pt_pool_run (arg=0x9a8fe00) at nac_pt_pool.c:194

#14 0xb6e01830 in start_thread () from /lib/libpthread.so.0

#15 0xb6b5c15e in clone () from /lib/libc.so.6

(gdb) #6  0xb6d6a07b in print_module_not_found (cp=0x2 <Address 0x2 out of 
bounds>) at parse.c:807

could you give me some help,thanks!
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to