| Try just using '--with-dmalloc'.

Painfully enough, this worked:
    env CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib \
    ./configure --with-dmalloc '--with-mib-modules= ucd-snmp/diskio'
and I have no idea why the /usr/local stuff isn't defaulting.

| Unless, that is, a particular os schedules a timer to calculate averages. So,
| the problem is somewhere in devla_getstats() or a function it calls. I glanced
| at the code and didn't see any obvious problems.

Bingo!

At line 462 in ucd-snmp/diskio.c in devla_getstats(),
lastat->dinfo gets cleared with memset() on every call.
It should only be called once at initialization time;
the man page is explicit that dinfo is used for state
and should not be modified.

I ran it with dmalloc for a day, and looked at the
dmalloc log file for "not freed", and a quick
    sort | uniq -c | sort -n
made the culprit pretty obvious.

(Though I did have to refresh my limited gdb skills.)

Submitted bug 1103644.

Thanks for your help!

John


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to