Fw: Table Iterator Crashes in free_data_context

Ian C via Net-snmp-coders <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <[email protected]>
 I've added some cout's for debug (// free() commented out in favor of a cout). 

If _get_next_ has a non-NULL entry it will cout entry's two strings ('A1' is the idx)

Here's the output (thanks for the help):

NET-SNMP version 5.9.rc2 AgentX subagent connected
_get_first_()
populate()
populate just malloc'ed 908f360
_get_next_() A1 {"data":[{"hostname":"B1","remote":"10.128.102.11","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"81.570","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.102.12","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"80.283","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.103.11","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"81.192","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.103.12","refid":".GPS.","st":"1","t":"u","when":"21d","poll":"64","reach":"0","delay":"0.977","offset":"0.077","jitter":"0.000","updated":"2020-Aug-20 16
 :45:47"}]}
_get_next_() entry is NULL
freeTableEntry() free'ing 908f360
freeTableEntry() free'ing 908f360
_get_first_()
populate()
populate just malloc'ed 908ea80
_get_next_() A1 {"data":[{"hostname":"B1","remote":"10.128.102.11","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"81.570","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.102.12","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"80.283","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.103.11","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"81.192","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.103.12","refid":".GPS.","st":"1","t":"u","when":"21d","poll":"64","reach":"0","delay":"0.977","offset":"0.077","jitter":"0.000","updated":"2020-Aug-20 16
 :45:47"}]}
freeTableEntry() free'ing 908ea80
freeTableEntry() free'ing 908ea80
_get_next_() entry is NULL
_get_first_()
populate()
populate just malloc'ed 908e630
_get_next_() A1 {"data":[{"hostname":"B1","remote":"10.128.102.11","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"81.570","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.102.12","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"80.283","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.103.11","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"81.192","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.103.12","refid":".GPS.","st":"1","t":"u","when":"21d","poll":"64","reach":"0","delay":"0.977","offset":"0.077","jitter":"0.000","updated":"2020-Aug-20 16
 :45:47"}]}
_get_next_() entry is NULL
freeTableEntry() free'ing 908e630


   ----- Forwarded Message ----- From: Wes Hardaker <[email protected]>To: Ian C via Net-snmp-coders <[email protected]>Cc: Ian C <[email protected]>Sent: Wednesday, August 26, 2020, 10:13:09 a.m. EDTSubject: Re: Table Iterator Crashes in free_data_context
 Ian C via Net-snmp-coders <[email protected]>
writes:

> I'm still having a crash issue with my table agent, I can't figure out a
> solution, hoping the list members could help. In a nutshell I want to read a
> QNX pps object (file) each time (no caching) it is queried (snmpwalk). The data
> gets read and returned but a crash happens on the free (datactx).

I assume if you comment out that free it will gain in memory usage?
-- 
Wes Hardaker
Please mail all replies to [email protected]

_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.