Re: libnetsnmp SEGV on free_enums

Frank Fegert <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello,

thanks for your reply!

On Mon, Feb 11, 2008 at 10:29:44AM +0000, Dave Shield wrote:
> On 06/02/2008, Frank Fegert <[email protected]> wrote:
> > i'm using a multi-threaded application (spine, http://cacti.net/spine_info.php)
> > on Solaris 10 which uses libnetsnmp. Pretty often the application hangs,
> > which i traced back to a SEGV occuring in free_enums(). See below for the
> > gdb backtrace. I already updated net-snmp from 5.3.1 to 5.4.1, but the
> > problem still persists. Can someone tell my why the free(pp->label) line
> > fails? It seems like a valid call to me.
> 
> That should be OK, yes.
> All I can think of is that something is trying to release the same MIB
> modules (or the same enumeration definitions) more than once.
> It might be worth investigating exactly which MIB modules are being
> released, and (in particular), which enumeration is triggering this problem.
 
hm, i finally found some time to do some printf-debugging. Left the
failing run, right one not failing:

  ...					  ...
  label: other				  label: other			
  value: 1                                value: 1
  label: volatile                         label: volatile
  value: 2                                value: 2
  label: nonVolatile                      label: nonVolatile
  value: 3                                value: 3
  label: permanent                        label: permanent
  value: 4                                value: 4
  label: readOnly                         label: readOnly
  value: 5                                value: 5
  label: active                           label: active
  value: 1                                value: 1
  label: notInService                     label: notInService
  value: 2                                value: 2
  label: notReady                         label: notReady
  value: 3                                value: 3
  label: createAndGo                      label: createAndGo
  value: 4                                value: 4
  label: createAndWait                    label: createAndWait
  value: 5                                value: 5
  label: destroy                          label: destroy
  value: 6                                value: 6
  label: other                            label: other
  value: 1                                value: 1
  label: volatile                         label: volatile
  value: 2                                value: 2
  label: nonVolatile                      label: nonVolatile
  value: 3                                value: 3
  label: permanent                        label: permanent
  value: 4                                value: 4
  label: readOnly                         label: readOnly
  value: 5                                value: 5
  FATAL: Spine Encountered a Bus	  label: included
    Error (Spine parent)		  value: 1
					  label: excluded
					  value: 2
					  label: active
					  value: 1
					  label: notInService
					  value: 2
					  label: notReady
					  value: 3
					  label: createAndGo
					  value: 4
					  label: createAndWait
					  value: 5
					  label: destroy
					  value: 6
					  label: other
					  value: 1
					  label: volatile
					  value: 2
					  label: nonVolatile
					  value: 3
					  label: permanent
					  value: 4
					  label: readOnly
					  value: 5
					  ...

Cross-checking with the MIBs showed that those labels are used in the
MIBs:
  SNMPv2-TC.txt
  TUNNEL-MIB.txt
  SNMP-NOTIFICATION-MIB.txt
  IP-FORWARD-MIB.txt

As soon as i moved SNMP-NOTIFICATION-MIB.txt out of the mibs directory
the spine binary didn't crash anymore. Moved it back and spine started
core dumping again on every other run. This is really odd. I'm certainly
no net-snmp wizard, but could the MIB-file really be _that_ screwd up?
Is there a syntax check for MIB-files, could this still be a problem in
the libnetsnmp or is this just a coincidence?

> Is the snmp subsystem shutdown and re-initialised repeatedly,
> or does this only happen once (when you close down Cacti completely)?

As far as i can tell the shutdown_snmp in spine occurs only on shut-
down of spine.

Thanks & Regards,

	Frank

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
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.