[torqueusers] Bug? in torque 2.0.0p2

Garrick Staples garrick at usc.edu
Tue Dec 20 17:49:21 MST 2005


On Tue, Dec 20, 2005 at 03:21:05PM -0800, Garrick Staples alleged:
> On Mon, Dec 19, 2005 at 11:17:12AM +0100, ?ke Sandgren alleged:
> > On Sat, 2005-12-17 at 11:29 +0100, ?ke Sandgren wrote:
> > > > This means the child process that will eventually become the job has
> > > > died.  Unfortunately, this is really really hard to debug.
> > > > 
> > > > Have you tried 2.0.0p4?  We're always fixing bugs and have improved
> > > > logging in this area.  Be sure you configure with --enable-syslog.
> > > > 
> > > > One unfixed bug that can cause this is with the job's environmental
> > > > variables.  Vars with newlines and commas can break things.
> > > 
> > > It's still there in 2.0.0p4 although the error message this time says
> > > Bad file descriptor (9) in TMomFinalizeJob3, read of pipe for sid failed
> > > for job 200045.ingrid-h.hpc2n.umu.se (0 of 8 bytes)
> > > 
> > > I'll try to find this next week...
> > 
> > The problem was a newline in one of the env variables.
> > 
> > I have written a patch for qsub to handle this and a few other things
> > regarding the set_job_env function. Take a look at it and use the parts
> > you feel is worth using.
> 
> I tried your patch, and it stops the segfaulting, but things are still
> not quite right.
> 
> Given...
> BREAKME=$'\n\n,foo=me,blah\n"\n'
> 
> In a job, I get...
> BREAKME=
> ,foo=me,blah

I don't know yet if this is breaking something else, but it Looks like
src/lib/Libattr/attr_fn_arst.c:encode_arst() isn't escaping newlines:

@@ -361,7 +361,7 @@ int encode_arst(
 
   for (pc = attr->at_val.at_arst->as_buf;pc <
attr->at_val.at_arst->as_next;++pc) 
     {
-    if ((*pc == '"') || (*pc == '\'') || (*pc == ',') || (*pc == '\\'))
+    if ((*pc == '"') || (*pc == '\'') || (*pc == ',') || (*pc == '\\') || (*pc == '\n'))
       ++j;
     }
 
@@ -384,7 +384,7 @@ int encode_arst(
 
   while (pfrom < end) 
     {
-    if ((*pfrom == '"') || (*pfrom == '\'') || (*pfrom == ',') || (*pfrom == '\\')) 
+    if ((*pfrom == '"') || (*pfrom == '\'') || (*pfrom == ',') || (*pfrom == '\\') || (*pfrom == '\n')) 
       {
       *pc++ = '\\';
       *pc   = *pfrom;


-- 
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/20051220/ee4fa2c0/attachment.bin


More information about the torqueusers mailing list