snmpdemo core dump when sending traps
Hi,
I am investigating the SEA SNMP toolkit on Solaris x86 7 & 8. I applied the recommended patches on both of my systems. Everything worked fine except the traps.
I modified the mib_demo.txt by adding a test trap definition:
myTestTrap TRAP-TYPE
ENTERPRISE demo
VARIABLES {
demoEntryInteger
}
DESCRIPTION "This is a test trap."
::= 2
Then I used mibcodgen to generate the code, and modified agent_loop() in snmpdemo_appl.c to let it send the trap in every agent_loop. It compiled okay, but it core dumped when it ran into _SSASendTrap3(...) in snmpdemo_trap.c. The _SSASendTrap3 looks like a SDK function that I have no clue how it processes inside.
I noticed if I change "demoEntryInteger" into "demoInteger" - to change the variable(s) from table attribute(s) to non-table attribute(s), and followed the same build process, the snmpdemod worked fine - I was able to get the traps on the destination host without core dump.
I discovered this problem several weeks ago on Solaris 7, and now I found the same on Solaris 8.
I think it is quite common for a subagent to bind some variables to the enterprise-specific traps. And the variables can be attributes of a talbe entry. And this is exactly the case of the subagent which I am going to work on.
Any clue? Could it be a SDK defect? Or is there any newer patch which has already fixed this problem?
Or any way to hack _SSASendTrap3 so that I can get around it?
Thanks a lot!
Wen

