[Samba] NT_STATUS_INSUFFICIENT_RESOURCES ... why? (fwd)

John Gehring John.Gehring at lefthandnetworks.com
Fri Mar 29 06:08:03 GMT 2002


I've included a very small program that I run to cause the 
NT_STATUS_INSUFFICIENT_RESOURCES problem. If you run this against a PDC 
with a small number of groups (<100), you should get the error in well 
under one minute.

#include <stdlib.h>
#include "grp.h"
#include <time.h>
#include <sys/time.h>

int main( int argc, char *argv[] )
{
         int i;
         int iLoopCount = 0;
         group *groupStruct;
         bool keepon = true;

         while( keepon ) {
                 iLoopCount++;
                 i = 0;
                 while( ( groupStruct = getgrent() ) != NULL ) {
                         i++;
                 }
                 time_t the_time;
                 the_time = time( NULL );

                 printf( "[%d]  i is %d:  %s", iLoopCount, i, ctime( 
&the_time) );
                 if( i<51 ) { // 50 is the number of groups in 
/etc/group on the test client.
                         keepon = false;
                 }
                 endgrent();
         }


}

Tim Potter wrote:

> On Thu, Mar 28, 2002 at 12:45:43PM -0500, Ron Creamer wrote:
> 
> 
>>I'm running 2.2.3a w/ winbindd. Winbindd uses up all my sam connections
>>to my PDC until it maxes out the PDC. When it's max'd wbinfo -g etc
>>reports "Error looking up domain groups". I can not run the "User
>>manager for domains" on my PDC due to a "Insufficient system resources
>>exist to complete the requested service"
>>
> 
> Aha so this is the flip side of the problem - running out of group handles.
> I did try to test for this but couldn't reproduce it.  Hmm - maybe I
> didn't try long enough.
> 
> Try this (untested) patch
> 
> *** winbindd_group.c.~1.3.4.1.2.4.~	Sun Feb  3 08:28:07 2002
> --- winbindd_group.c	Fri Mar 29 11:02:37 2002
> ***************
> *** 632,637 ****
> --- 632,640 ----
>   
>   				SAFE_FREE(ent->sam_entries);
>   
> + 				close_samr_domain_handle(
> + 					ent->domain, &ent->dom_pol);
> + 
>   				next_ent = ent->next;
> 
> 






More information about the samba mailing list