On Tue, 7 Jul 2015 14:27:18 +0800 (CST) 姜大辉 wrote: > 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: > [...] > #7 0xb6d71a62 in netsnmp_read_module (name=0xaea3f958 "IF-MIB") > at parse.c:3952
Looks like it's crashing while trying to read/parse a module. Try calling netsnmp_init_mib() in the main thread at startup. Robert ------------------------------------------------------------------------------ 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