Bart, thanks for your analysis. I have found the root cause: I add init function, init_snmp, init_agent, and mib init function all in one thread start function. this function is called more than one when device startup. so may cause some strange issues.
when I make it just called once, it is ok till now. B.R Derrick 在 2018-09-20 21:48:25,"Bart Van Assche" <bvanass...@acm.org> 写道: >On 9/18/18 11:53 PM, 宋金鑫 wrote: >> I am running our stack on new platform: arm aarch64, I get some strange >> crashes. >> like: >> #0 0xf6f91fd0 in strcmp () from >> /repo/HD_R/rootfs/brcm/fs.install/lib/libc.so.6 >> #1 0xf7373bac in internal_register_config_handler () >> from /repo/HD_R/rootfs/brcm/fs.install/usr/lib/libnetsnmp.so.30 >> #2 0xf7373d74 in register_const_config_handler.localalias () >> from /repo/HD_R/rootfs/brcm/fs.install/usr/lib/libnetsnmp.so.30 >> #3 0xf738145c in netsnmp_ds_register_config () from >> /repoHD_R/rootfs/brcm/fs.install/usr/lib/libnetsnmp.so.30 >> #4 0xf7402904 in init_agent_read_config () >> from /repo/HD_R/rootfs/brcm/fs.install/usr/lib/libnetsnmpagent.so.30 >> #5 0xf740f118 in init_agent () from >> /repo/HD_R/rootfs/brcm/fs.install/usr/lib/libnetsnmpagent.so.30 >> >> the same code is ok on mips 32 bits platform. >> >> do we support 64 bit system? > >64-bit Linux is definitely supported. Does Valgrind support aarch64? If >so, can you repeat the test that produced the above call stack under >Valgrind and see whether that produces more detailed information about >the root cause? Analyzing snmpd with Valgrind is possible e.g. as follows: > >valgrind --trace-children=yes >--trace-children-skip=/usr/bin/env,/bin/sed,/bin/ls,/bin/sh,/bin/bash,/usr/bin/sed,/usr/bin/ls,/usr/bin/perl > >--track-origins=no --gen-suppressions=all snmpd ${snmpd_options} > >Bart.
_______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders