Opened 8 years ago

Closed 8 years ago

#1448 closed defect (fixed)

Grid engine scripts are run with user defined shell

Reported by: wish Owned by: Dave Love <…>
Priority: normal Milestone:
Component: sge Version: 6.2u3
Severity: minor Keywords:


Various scripts (eg checkpoint_method) are run with the shell specified by the user at least when running in posix_compliant mode. This can cause them to fail if the 'shell' doesn't implement a shell like -c option(eg perl).
In addition the checkpoint script at least does not get killed when the job dies so a user could specify their program as the shell to bypass time(and possibly other) limits.

Change History (4)

comment:1 Changed 8 years ago by wish

And unix_behavior queues run checkpoint scripts with the shell specified with -S as well

comment:2 Changed 8 years ago by wish

OK terminate_method also uses the user defined shell to run.
If you have a queue with unix_behavior and a custom terminate_method you can add
#$ -S /bin/false
to your job submit script to have an unkillable job.

You should be able to do similar tricks with posix_compliant queues but you need a smarter 'shell' to distinguish between your job and the methods you don't want to run.

starter_method is exec'd directly.

comment:3 Changed 8 years ago by dlove

That definitely doesn't seem right. Fancy making a patch, as you've
looked at that area before?

comment:4 Changed 8 years ago by Dave Love <…>

  • Owner set to Dave Love <…>
  • Resolution set to fixed
  • Status changed from new to closed

In 4494/sge:

Fix #1448: Use /bin/sh to run async shepherd commands

Note: See TracTickets for help on using tickets.