Opened 6 years ago

Closed 6 years ago

#1448 closed defect (fixed)

Grid engine scripts are run with user defined shell

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

Description

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 6 years ago by wish

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

comment:2 Changed 6 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 6 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 6 years ago by Dave Love <d.love@…>

  • Owner set to Dave Love <d.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.