Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] bug with /bin/sh and /bin/ksh
From: Ralph Castain (rhc_at_[hidden])
Date: 2010-04-30 19:14:19


Thanks Jon.

I fear this falls into the "won't fix until I have some spare time" category - probably won't get to it myself until Aug/Sept due to priorities.

In the interim, perhaps someone who has more priority in this area will step in to fix it.

On Apr 30, 2010, at 3:15 PM, Jonathan Vincent wrote:

> Hi,
>
> The code path is used when the user has /bin/sh as their login shell.
> There seemed to be seperate code paths depending on the login shell. I
> guess it is not suprising noone has looked at this part for a long
> time, /bin/sh is not a popular choice :D. It *should* be easily
> reproduceable if you made an account with a /bin/sh login shell.
>
> The opening parens is generated at line 472 of
> openmpi-1.4.1/orte/mca/plm/rsh/plm_rsh_module.c
>
> tmp = opal_arg_split(" ( test ! -r ./.profile || . ./.profile;", ' '):
>
> as can be seen from the comments above it and the lines 468 and 469
> this logic only gets called if teh remote shell is SH or KSH, which I
> guess is pretty rare. Where the closing one comes from we are not
> sure.
>
> Not sure how important this is, as you said it has been around for a
> long time (we checked the 1.3 code), and there is a simple workaround
> (tell users to swap to bash). We thought it would be good to at least
> make a bug report
>
> Jon
>
> Ralph Castain wrote :
>
> Can you pinpoint where you think the logic is incorrect? I can't
> easily see where the parens are being added, and don't know anyone who
> checks/uses that code path.
>
> This hasn't been touched in a very long time, which makes me a tad
> cautious in how this gets changed. Would need someone to either
> provide a patch, or at least provide a means to test the result.
>
>
>
> On Apr 29, 2010, at 9:24 AM, Jonathan Vincent wrote:
>
>> Hi,
>>
>> We had some trouble with a user using /bin/sh together with
>> openmpi/1.4.1 (Centos 5 on amd64 processors, intel compiler 11.1)
>>
>> When spawning MPI processes on a different machine it gave errors such as
>>
>> /bin/sh: -c: line 0: syntax error near unexpected token `('
>> /bin/sh: -c: line 0: `/usr/bin/env
>> LD_LIBRARY_PATH=/pdc/vol/openmpi/1.4.1/intel/lib:/pdc/vol/i-compilers/11.1/icc/lib/intel64:/pdc/vol/i-compilers/11.1/ifort/lib/intel64
>> ( test ! -r ./.profile || . ./.profile;
>> /pdc/vol/openmpi/1.4.1/intel/bin/orted -mca ess env -mca
>> orte_ess_jobid 284360704 -mca orte_ess_vpid 3 -mca orte_ess_num_procs
>> 5 --hnp-uri "284360704.0;tcp://193.11.170.208:49530" )'
>>
>> openMPI is making a malformed statement
>>
>> i.e. a simpler version such as
>>
>> sh -c '/usr/bin/env FOO=bar (echo hello)'
>> ksh -c '/usr/bin/env FOO=bar (echo hello)'
>>
>> is not valid
>> sh -c '/usr/bin/env FOO=bar echo hello'
>> works.
>>
>> This problem seems to be confined to the sh and ksh logic in
>>
>> openmpi-1.4.1/orte/mca/plm/rsh/plm_rsh_module.c
>>
>> Jon
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel