public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] SNMP memory leak
@ 2012-03-25  9:57 Laurie Gellatly
  0 siblings, 0 replies; only message in thread
From: Laurie Gellatly @ 2012-03-25  9:57 UTC (permalink / raw)
  To: ecos-discuss

Hi All,
If your device is running the SNMP agent I suggest you read this:

I've been made aware of a memory leak in the SNMP agent for eCos.
This thread http://sourceware.org/ml/ecos-discuss/2007-06/msg00241.html
talks about a leak as well but does not clearly show the resolution.

To find out if you have the issue do this:
1) If you have not already then devise a method to show mall.fordblks from
mall=mallinfo() and note the amount of free memory shown in the running
device.
2) run this command against your device with a community string unknown to
your device: snmpget -c badpublic 192.168.1.1 .1.3.6.1.2.1.1.5.0 ; replace
192.168.1.1 with your device's IP
3) do mall=mallinfo() again and note the mall.fordblks afterwards and you
will see your free memory has reduced. Repeat these steps and it will
continue to reduce till it exhausts memory.
If you use the correct SNMP community string then memory is not leaked.

So I updated and modified snmp_agent.c & .h and snmp_api.c & .h from
ucd_snmp 4.2.7 (as implied in the thread above).
Although it fixed the leak, SNMP traps sent from the device are now broken.
(I'm still tracking it down but I'm guessing it's a memory issue as well).

Have you checked your own devices to see if you have this problem?
Has anyone made changes to the SNMP files and fixed both issues and are you
willing to share?

I'll happily post the new version I've tried if that will help - you just
can't drop the 4.2.7 files in to replace the old (that would be too easy).

Thanks              ...Laurie:{)



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-03-25  9:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-25  9:57 [ECOS] SNMP memory leak Laurie Gellatly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).