[gridengine users] Problems sendig mail from jobs

Txema Heredia Genestar txema.llistes at gmail.com
Mon Mar 11 14:52:42 UTC 2013


Hi all,

This morning I have realized that I do not always receive mails sent 
from my jobs. I have been toying around with this script:

#!/bin/bash
echo "sleep 1" | /bin/mail -s "sleep ${1}" ${LOGNAME} ;
sleep 60;
echo "awake 2" | /bin/mail -s "awake ${1}" ${LOGNAME} ;
sleep 10;
echo "test 3" | /bin/mail -s "test ${1}" ${LOGNAME} ;
###sleep 1;

If I submit this script, I only receive the 2 first mails, but never the 
third one. But if I uncomment the last sleep line, I do receive the 
third email.

I have been playing further around this and it seems that, If a mail is 
the last command issued by a job, or if it is followed by some "fast" 
command I still don't receive the 3rd mail. But if the last mail command 
is followed by some "longer" command , I do receive them. A few examples:

No mail:
- ls
- ls > /dev/null
- exit 0
- sleep 0
- hostname
- hostname (2x) & (3x)

Receive mail:
- sleep 1
- top -b -n 1
- hostname (4+x)

A few additional twists:
- If I log into the node and run the script, I receive everything.
- "ssh node script" I also receive all mails
- If there is a epilog script, the epilog is able to send mails even if 
the job failed to send the 3rd one.

Any ideas of what is causing this? Is this a bug of SGE or a 
missconfiguration of my system?

Thanks,

Txema



More information about the users mailing list