I could not reproduce the problem with net-snmp-5.1.2, using an "snmpd.conf" containing only these two lines:
exec / .1.3.6.1.4.1.2021.100 disk1 /usr/local/bin/diskused / rwcommunity public >From the information you've provided (thank you!), it seems to me that the config reading process is referring to data that is not initialized. There may be a previous config line or following config line that may be related to the problem you see. Or, there may be intervening control characters or trailing whitespace which could conceivably confuse the config handlers. If the "snmpd.conf" file has embedded "CR" characters, these might be suspect. I recommend saving a copy of your "snmpd.conf". Then, strip out all comments and lines that contain only whitespace. Try that reduced snmpd.conf file. If your editor can show whitespace and control characters, you might find those characters appearing in not expected places on the config lines. I hope this helps. -Mike Slifcak John P. Looney wrote: > I'm not sure if this is a bug in snmpd, or dodgy hardware (I've seen > snmpd bring out the worst in marginal hardware before). > > The last few lines of snmpd -f -d -D -L ... [SNIP] > read_config: /etc/snmp/snmpd.conf:13 examining: exec .1.3.6.1.4.1.2021.100 disk1 > /usr/local/bin/diskused / > trace: run_config_handler(): read_config.c, 347 > read_config: Found a parser. Calling it: exec / .1.3.6.1.4.1.2021.100 disk1 > /usr/local/bin/diskused / [SNIP] > trace: netsnmp_subtree_find_first(): agent_registry.c, 144 > subtree: looking for subtree for context: "�8^L^H��5�T-RE^Q" > trace: netsnmp_subtree_find_first(): agent_registry.c, 153 > subtree: didn't find a subtree for context: "�8^L^H��5�T-RE^Q" > free(): invalid pointer 0x80d2748! > > (gdb) > #0 0xb729ae3e in free () from /lib/tls/libc.so.6 > #1 0xb75dee2a in netsnmp_handler_registration_free (reginfo=0x80d2288) at > agent_handler.c:444 [SNIP] > #11 0xb74df483 in read_configs () at read_config.c:661 > #12 0xb74be34e in init_snmp (type=0x804c842 "snmpd") at snmp_api.c:793 > #13 0x0804a8bf in main () > > If I take out "exec .1.3.6.1.4.1.2021.100 disk1 /usr/local/bin/diskused /" it > works fine. If I take out the trailing slash, it still crashes. Any idea why > this could crash ? > > It's running the CentOS package "net-snmp-5.0.9-2.30E.6" from RedHat Enterprise 3. > > John > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
