Agent++-4.6.1 “Segmentation fault, aborting.” Examples Troubleshooting

Hi,

I tried to active SNMPV3 and compile SNMP+±3.5.2. Then, I used libsnmp++.so, libsnmp++.so.35, and libsnmp++.so.35.0.2 to compile Agent +±4.6.1. There is no Agent+±4.6.1 compiled errors. However, when I tried to run ./agent for all examples, I got “Segmentation fault, aborting.” Do you have any ideas to help me to troubleshoot this error?

./agent
20240715.18:20:07: 140491861727040: (1)DEBUG : TaskManager: thread started
20240715.18:20:07: 140491861727040: (1)DEBUG : TaskManager: thread started
20240715.18:20:07: 140491861727040: (1)DEBUG : TaskManager: task manager found
20240715.18:20:07: 140491861727040: (1)DEBUG : TaskManager: task manager found
20240715.18:20:07: 140491861653248: (1)EVENT : main: SNMP listen address: (0.0.0.0/4701)
20240715.18:20:07: 140491861722880: (1)EVENT : main: SNMP listen address: (0.0.0.0/4700)
20240715.18:20:07: 140491861653248: (5)INFO : saveBootCounter: Saved counter (file) (engine id) (boot): (.config_bc_0.0.0.0_4701), ( 80 00 13 70 05 6F 6B 63 2D 6F 38 36 67 69 74 2D 30 31 12 5D), (5)
20240715.18:20:07: 140491861653248: (3)INFO : AuthPriv: Added default Auth and Priv protocols.
20240715.18:20:07: 140491861653248: (1)DEBUG : UsmUserTable: add row with index: (20.128.0.19.112.5.111.107.99.45.111.56.54.103.105.116.45.48.49.18.93.12.117.110.115.101.99.117.114.101.85.115.101.114)

Segmentation fault, aborting.

Notes: SNMP+±3.5.2 seems like OK
./snmpGet 127.0.0.1 -v3 -P4700
20240715.18:34:15: 140212977796928: (3)DEBUG : getBootCounter: found entry (file) (engine id) (boot counter): (snmpv3_boot_counter), (snmpGet), (8)
20240715.18:34:15: 140212977796928: (5)INFO : saveBootCounter: Saved counter (file) (engine id) (boot): (snmpv3_boot_counter), (snmpGet), (9)
20240715.18:34:15: 140212977796928: (6)INFO : AuthPriv: Added auth protocol (id): (3)
20240715.18:34:15: 140212977796928: (6)INFO : AuthPriv: Added auth protocol (id): (4)
20240715.18:34:15: 140212977796928: (6)INFO : AuthPriv: Added auth protocol (id): (5)
20240715.18:34:15: 140212977796928: (6)INFO : AuthPriv: Added auth protocol (id): (6)
20240715.18:34:15: 140212977796928: (6)INFO : AuthPriv: Added auth protocol (id): (7)
20240715.18:34:15: 140212977796928: (6)INFO : AuthPriv: Added auth protocol (id): (2)
20240715.18:34:15: 140212977796928: (6)INFO : AuthPriv: Added priv protocol (id): (2)
20240715.18:34:15: 140212977796928: (6)INFO : AuthPriv: Added priv protocol (id): (4)
20240715.18:34:15: 140212977796928: (6)INFO : AuthPriv: Added priv protocol (id): (20)
20240715.18:34:15: 140212977796928: (6)INFO : AuthPriv: Added priv protocol (id): (21)
20240715.18:34:15: 140212977796928: (3)INFO : AuthPriv: Added default Auth and Priv protocols.
SNMP++ Get to 127.0.0.1 SNMPV3 Retries=1 Timeout=1000ms
securityName= , securityLevel= 3, securityModel= 3
contextName= , contextEngineID=
20240715.18:34:15: 140212977796928: (4)INFO : v3MP::EngineIdTable: Dont know engine id for (host) (port): (127.0.0.1), (4700)
20240715.18:34:15: 140212977796928: (5)DEBUG : v3MP: Building message with (SecurityEngineID) (securityName) (securityLevel) (contextEngineID) (contextName): (), (), (1), (), ()
20240715.18:34:15: 140212977796928: (3)INFO : v3MP: Message built OK
20240715.18:34:15: 140212977796928: (4)DEBUG : SNMPMessage: return value for build message: (-1401)
20240715.18:34:16: 140212977796928: (4)INFO : v3MP::EngineIdTable: Dont know engine id for (host) (port): (127.0.0.1), (4700)
20240715.18:34:16: 140212977796928: (5)DEBUG : v3MP: Building message with (SecurityEngineID) (securityName) (securityLevel) (contextEngineID) (contextName): (), (), (1), (), ()
20240715.18:34:16: 140212977796928: (3)INFO : v3MP: Message built OK
20240715.18:34:16: 140212977796928: (4)DEBUG : SNMPMessage: return value for build message: (-1401)
20240715.18:34:17: 140212977796928: (6)INFO : MsgQueue: Message timed out, removed id from v3MP cache (rid): (26824)
SNMP++ Get Error, SNMP++: SNMP request timed out (-5)

Please advise.
Thanks,
Phuoc.

Hi,

please run the example agent inside a debugger and post the stack trace of the crash.

Best regards,
Jochen