[torqueusers] pbs_mom eating memory like a maniac

Garrick Staples garrick at usc.edu
Tue Nov 15 00:34:19 MST 2005


On Mon, Nov 14, 2005 at 06:23:04PM +0100, Martin Schaff??ner alleged:
> On Thursday 10 November 2005 23:11, Garrick Staples wrote:
> 
> > diff -pruN torque-2.0.0p1_orig/src/resmom/start_exec.c
> > torque-2.0.0p1/src/resmom/start_exec.c ---
> > torque-2.0.0p1_orig/src/resmom/start_exec.c 2005-11-05 07:39:55.000000000
> > -0800 +++ torque-2.0.0p1/src/resmom/start_exec.c      2005-11-10
> > 14:04:31.000000000 -0800 @@ -259,6 +259,9 @@ struct passwd *check_pwd(
> >      return(NULL);
> >      }
> >
> > +  if (pjob->ji_grpcache != NULL)
> > +    return (pwdp);  /* been there, done that */
> > +
> >    pjob->ji_qs.ji_un.ji_momt.ji_exuid = pwdp->pw_uid;
> >
> >    pjob->ji_grpcache = malloc(sizeof(struct grpcache) +
> > strlen(pwdp->pw_dir) + 1);
> 
> The patch looks nice, but just for the curious: Where is ji_grpcache 
> initialized to NULL so that this will definitely work? Can't find any such 
> initialization...

job_alloc() in server/job_func.c, starts off with calloc():

job *job_alloc()

  {
  job *pj;

  pj = (job *)calloc(1,sizeof(job));

  if (pj == NULL)
    {
    log_err(errno,"job_alloc","no memory");
...
-- 
Garrick Staples, Linux/HPCC Administrator
University of Southern California
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20051114/cb9eebf7/attachment.bin


More information about the torqueusers mailing list