Hi Dave ,

the two patches that you cut seem to have stabilised net-snmp for my
zones.

thanks
 

-----Original Message-----
From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On
Behalf Of Dave Shield
Sent: 27 January 2009 11:15
To: Hindley Nick
Cc: Net-snmp-users@lists.sourceforge.net
Subject: Re: net-snmp and solaris dynamic reconfiguration

2009/1/26 Hindley Nick <nick.hind...@hfbp.co.uk>:
> A few weeks ago I noticed that I had a problem with snmpd core
dumping.
> .... which is caused by an attempt to dereference cpu2 which is NULL
>
> (gdb) print cpu2
> $1 = (netsnmp_cpu_info *) 0x0

> Now what I think has happened, is that the cpu... structures have been

> instantiated with a view of what CPUs have been allocated to the zone 
> which has subsequently been changed by the solaris dynamic 
> reconfiguration.  This then means that when the new processor ID is 
> introduced to the zone, its not found and a null pointer is returned.
>
> Does this make sense?

Yes.
The code does assume that the number of CPUs is constant.


> Any ideas how to fix?

One option would simply be to skip any "new" CPUs.
The attached patch is untested, but should handle that.
(Though I'm not sure whether it would work better with 'break'
 or continue - you should experiment).

If you change the 'break' statement to call 'init_cpu_kstat()'
instead, then this should cope with updating the list of CPUs.
Obviously, that's even more untested than the basic patch, but give it a
go and let us know how you get on.

Dave


=======================================================================
              Scanned for virus infection by Messagelabs
=======================================================================

=======================================================================
    This email has been scanned for Virus infection by MessageLabs
     For more information please contact messagel...@atomwide.com 
=======================================================================

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
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