Bugzilla – Bug 4706
Fork jobs without arguments may receive uninitialized data as arguments
Last modified: 2006-10-10 12:10:44
You need to log in before you can comment on or make changes to this bug.
WS GRAM server gives empty one argument ("") on globusrun-ws command on AIX 5.2, GT 4.0.2. (I passed zero arguments though.) I setup WS GRAM server (GT 4.0.2) on AIX machine. WS GRAM is on port 5447 and I have no root privilege. (globusrun-ws was both GT 4.0.3 and GT 4.0.2.) (I didn't setup GT 4.0.3 WS GRAM server yet,,,) (This problem was not occurred on i386 Linux, IA-64 Linux, x86-64 Linux, Solaris, Tru64 and MacOS X machine.) AIX globusrun-ws -> AIX WS GRAM : empty argument was passed. i386 Linux globusrun-ws -> AIX WS GRAM : empty argument was passed. AIX globusrun-ws -> i386 Linux WS GRAM : no empty argument was passed. (hostname is replaced with "myhostname") tashiro@myhostname tashiro$ globus-version 4.0.3 tashiro@myhostname tashiro$ uname -a AIX myhostname 2 5 0033278B4C00 tashiro@myhostname tashiro$ tashiro@myhostname tashiro$ /bin/hostname myhostname tashiro@myhostname tashiro$ /bin/hostname "" sethostname: Not owner tashiro@myhostname tashiro$ tashiro@myhostname tashiro$ globusrun-ws -submit -F localhost:5447 -s -subject "`grid-cert-info -subject`" -c /bin/hostname Delegating user credentials...Done. Submitting job...Done. Job ID: uuid:04552980-446d-11db-a58c-010000002438 Termination time: 09/16/2006 03:48 GMT Current job state: Active Current job state: CleanUp-Hold sethostname: Not owner Current job state: CleanUp Current job state: Done Destroying job...Done. Cleaning up any delegated credentials...Done. tashiro@myhostname tashiro$ tashiro@myhostname tashiro$ cat argecho.c #include <stdio.h> int main(int argc, char **argv) { int i; for (i = 0; i < argc; i++) { printf("%d: <%s>\n", i, argv[i]); } } tashiro@myhostname tashiro$ /usr/vacpp/bin/cc_r -o argecho argecho.c tashiro@myhostname tashiro$ ./argecho "" 0: <./argecho> 1: <> tashiro@myhostname tashiro$ globusrun-ws -submit -F localhost:5447 -s -subject "`grid-cert-info -subject`" -c $PWD/argecho Delegating user credentials...Done. Submitting job...Done. Job ID: uuid:288daef8-446d-11db-a695-010000006cc6 Termination time: 09/16/2006 03:49 GMT Current job state: Active Current job state: CleanUp-Hold 0: </home/tashiro/argecho> 1: <> Current job state: CleanUp Current job state: Done Destroying job...Done. Cleaning up any delegated credentials...Done. tashiro@myhostname tashiro$ # umm I didn't expected this. tashiro@myhostname tashiro$ globusrun-ws -submit -F localhost:5447 -s -subject "`grid-cert-info -subject`" -c $PWD/argecho hello Delegating user credentials...Done. Submitting job...Done. Job ID: uuid:336bf292-446f-11db-ae17-010000005eea Termination time: 09/16/2006 04:03 GMT Current job state: Active Current job state: CleanUp-Hold 0: </home/wp2/tashiro/argecho> 1: <hello> Current job state: CleanUp Current job state: Done Destroying job...Done. Cleaning up any delegated credentials...Done. tashiro@myhostname tashiro$ # It's ok.
PreWS GRAM (setup by system daemon) worked fine. tashiro@myhostname tashiro$ globusrun -o -r localhost '&(executable=/bin/hostname)' myhostname tashiro@myhostname tashiro$ tashiro@myhostname tashiro$ globusrun -o -r localhost '&(executable=/home/tashiro/argecho)' 0: </home/tashiro/argecho> tashiro@myhostname tashiro$
Ok, it looks like globusrun-ws is always adding an empty argument to the -c option on AIX. Reassigning to Joe.
Which local resource manager are you using? I've been unable to duplicate this with AIX 5.2 + fork. joe
I use Fork. I attach the 2 container logfile, one is execute argecho only, and rest is execute "argecho hello". This logfiles include my information, thus, I gzipped. The result was the same if I specify Fork explicitly. Is there any way to find who adds the unnecessary arugment? tashiro@myhost tashiro$ globusrun-ws -submit -F localhost:5447 -subject "`grid-cert-info -subject`" -Ft Fork -s -c $PWD/argecho Delegating user credentials...Done. Submitting job...Done. Job ID: uuid:c1a08756-5353-11db-a8aa-010000002c85 Termination time: 10/05/2006 02:55 GMT Current job state: Active Current job state: CleanUp-Hold 0: </home/tashiro/argecho> 1: <> Current job state: CleanUp Current job state: Done Destroying job...Done. Cleaning up any delegated credentials...Done. tashiro@myhost tashiro$ My environments are: tashiro@myhost tashiro$ uname -a AIX myhost 2 5 0033278B4C00 tashiro@myhost tashiro$ ant -version Apache Ant version 1.6.5 compiled on October 19 2005 tashiro@myhost tashiro$ java -version java version "1.4.2" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2) Classic VM (build 1.4.2, J2RE 1.4.2 IBM AIX build ca142-20050929a (SR3) (JIT enabled: jitc)) tashiro@myhost tashiro$ perl --version This is perl, v5.8.0 built for aix-thread-multi Copyright 1987-2002, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. tashiro@myhost tashiro$ globus-version 4.0.2 tashiro@myhost tashiro$
Created an attachment (id=1066) [details] container-log.tgz gzipped logfiles.
Looking at the logs, I don't see any extra empty arguments, so it is likely a bug in the fork script or fork starter program. To debug this: From either log file, copy out the $description = { }; block into a file and then run $GLOBUS_LOCATION/libexec/globus-job-manager-script.pl -m fork -f <file you created above> -c submit Maybe adding some print statements in fork.pm will help further locate the problem? joe
OK. I tried it. "globus-job-manager-script.pl -m fork" looks to call libexec/globus-fork-starter which is executable file written in C, and it accepts the protocol like "100;perl-fork-start-10...;directory=...;executable=...;..." from stdin. I executed it by hand and the same problem occur. $ cat jm-stdout cat: cannot open jm-stdout $ cat starter-in 100;perl-fork-start-1052680;directory=<suppress>... ...;stdout=...jm-stdout... $ $GLOBUS_LOCATION/libexec/globus-fork-starter stlog < starter-in 101;perl-fork-start-1052680;23bf5ad0-5506-11db-b848-0100000016e2:602324 $ cat jm-stdout 0: </home/tashiro/.../argecho> 1: <> $ In file source-trees/ws-gram/job_management/fork/c/source/fork_starter.c It looks 889 task->arguments = globus_libc_calloc(1, sizeof(char *)); 906 task->pids[i] = globus_libc_fork(); 1005 task->arguments[0] = task->executable; 1007 rc = execve(task->executable, task->arguments, task->enviro has been executed if the arguments were not given from stdin. I think task->arguments[1] should be readable and NULL for execve(), but there are no memory allocated for task->arguments[1] now. Isn't it?
You are correct. I've committed this fix to 4.0 branch and trunk. There is an advisory with the updated source package at http://www.globus.org/toolkit/advisories.html?version=4.0#globus_fork_starter-0.3 joe
I applied the advisory to my GT 4.0.2. The /bin/hostname with globusrun-ws command was successful. tashiro@myhost advisories$ globusrun-ws -submit -F localhost:5447 -s -subject "`grid-cert-info -subject`" -c /bin/hostname Delegating user credentials...Done. Submitting job...Done. Job ID: uuid:8241c060-5809-11db-9acc-0100000021c3 Termination time: 10/11/2006 02:46 GMT Current job state: Active Current job state: CleanUp-Hold myhost Current job state: CleanUp Current job state: Done Destroying job...Done. Cleaning up any delegated credentials...Done. tashiro@myhost advisories$ globusrun-ws -submit -F localhost:5447 -s -subject "`grid-cert-info -subject`" -c $PWD/argecho Delegating user credentials...Done. Submitting job...Done. Job ID: uuid:9ad056f0-5809-11db-a563-010000005efa Termination time: 10/11/2006 02:47 GMT Current job state: Active Current job state: CleanUp-Hold 0: </home/.../advisories/argecho> Current job state: CleanUp Current job state: Done Destroying job...Done. Cleaning up any delegated credentials...Done. tashiro@myhost advisories$
Since 4.0.4 will be released before 4.2, I'm setting this to 4.0.4 milestone. By the comment of fixed in trunk, we will know that it will be included in 4.2 too. -Stu