HTCondor Project List Archives



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-devel] Bug in condor_dagman?



I almost failed to mention - we've found it best to param("BIN") and use the full path to condor executables, instead of invoking them directly as "condor_submit" or "condor_rm". Any thoughts on this?

Peter F. Couvares wrote:
Rajesh,

Yeah, I'm actually back-porting a more general solution from the V6_7-branch's src/condor_dagman/submit.C:

        // argQuote: the characters we should use to quote
        // command-line arguments when specifying shell commands

        // innerQuote: the characters we should use to represent a
        // double-quote character *within* a quoted command-line
        // argument

#ifdef WIN32
    const char* argQuote = "\"";
    const char* innerQuote = "\\\"";
#else
    const char* argQuote = "\'";
    const char* innerQuote = "\"";
#endif

For conflict-avoidance reasons, I'm going to duplicate the code in V6_6-branch's dag.C for now, and then once the merge is done I'll stick it in a common include file.

As for the Create_Process() .exe bug, I think it might already be fixed in V6_7-branch -- Colin, is that right? I remember something about it recently...

-Peter



On Jul 11, 2005, at 6:27 PM, Rajesh Rajamani wrote:

Peter,
Good to hear from you. We've been running into this kind of issue way too often. It'd be good to move some of this functionality to condor_c++_util. Also, Create_Process() expects the name of the executable to end in a ".exe". Will be good if we can fix DaemonCore::Create_Process() to append ".exe" to windows executable names if the extension is not present.


Thanks,
Raj

Peter F. Couvares wrote:

Rajesh,
Right you are. We fixed this issue a while ago elsewhere in the code (where we call condor_submit, for example), but missed this one. I'll check it in to V6_6-branch right away -- but it probably won't be merged in time for 6.7.9, unfortunately...
Thanks!
-Peter
On Jul 11, 2005, at 5:48 PM, Rajesh Rajamani wrote:


Dear Folks,
I may have found a bug in condor_dagman. The cmd string below (file dag.C, function Dag::RemoveRunningJobs(), line 1031 in v6_6_8) does not seem to work on Windows due to the way command line quotes are handled.



snprintf( cmd, ARG_MAX, "condor_rm -const \'%s == \"%s\"\'", DAGManJobIdAttrName, DAGManJobId );

The following fix is known to work (note the extra \" in windows part of the code)

#ifndef WIN32
snprintf( cmd, ARG_MAX, "condor_rm -constraint \%c%s == \"%s\"\%c", commandLineQuoteChar,DAGManJobIdAttrName,
DAGManJobId,commandLineQuoteChar);
#else
snprintf( cmd, ARG_MAX, "condor_rm -constraint \%c%s == \"\"%s\"\"\%c", commandLineQuoteChar,DAGManJobIdAttrName,
DAGManJobId,commandLineQuoteChar);
#endif


Thanks,
--
Rajesh Rajamani
Senior Member of Technical Staff
Direct : +1.408.321.9000
Fax    : +1.408.321.9030
Mobile : +1.650.218.9131
raj@xxxxxxxxxx


Optena Corporation 2860 Zanker Road, Suite 201 San Jose, CA 95134 www.optena.com


This electronic transmission (and any attached documents) contains information from Optena Corporation and is for the sole use of the individual or entity it is addressed to. If you receive this message in error, please notify me and destroy the attached message (and all attached documents) immediately.


_______________________________________________
Condor-devel mailing list
Condor-devel@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/condor-devel


-- Rajesh Rajamani Senior Member of Technical Staff Direct : +1.408.321.9000 Fax : +1.408.321.9030 Mobile : +1.650.218.9131 raj@xxxxxxxxxx


Optena Corporation 2860 Zanker Road, Suite 201 San Jose, CA 95134 www.optena.com


This electronic transmission (and any attached documents) contains information from Optena Corporation and is for the sole use of the individual or entity it is addressed to. If you receive this message in error, please notify me and destroy the attached message (and all attached documents) immediately.



-- Rajesh Rajamani Senior Member of Technical Staff Direct : +1.408.321.9000 Fax : +1.408.321.9030 Mobile : +1.650.218.9131 raj@xxxxxxxxxx


Optena Corporation 2860 Zanker Road, Suite 201 San Jose, CA 95134 www.optena.com


This electronic transmission (and any attached documents) contains information from Optena Corporation and is for the sole use of the individual or entity it is addressed to. If you receive this message in error, please notify me and destroy the attached message (and all attached documents) immediately.