bds: Received OS signal 'hangup'
juancresc opened this issue · 10 comments
Sometimes I get this message and the execution stop. I do not know if this is a server issue or some message I'm not interpreting well.
You might be killing the process by disconnecting from the terminal.
Try using 'nohup' when running long processes.
E.g.
$ nohup my_script.bds &
I hope this helps.
Yes, actually I was running it via
nohup script &
I'm not sure what's going on then. I always run them
like that and never had an issue.
Do you know how I can reproduce the problem?
Are you using the latest bds version) I.e. compiled form github's master branch
I've noticed that when I have connectivity issues and ssh hangs I got this message
This is what happend afted ctrl+d while running nohup ./bds/bds pipeline.bds &
zsh: you have running jobs.
➜ miRNA-4-4dfull
zsh: warning: 1 jobs SIGHUPed
And then
2017/03/16 13:50:06 bds: Received OS signal 'hangup'
This seems to be a shell-specific configuration option on your zsh (bash behaves differently)
References:
http://unix.stackexchange.com/questions/33900/is-it-safe-to-close-shell-just-by-clicking-x-or-using-ctrld
http://serverfault.com/questions/117152/do-background-processes-get-a-sighup-when-logging-off
When you exit the terminal with CTRL+D or logout or exit, the shell exits without sending a SIGHUP to all the jobs. This is the default behavior, but can be changed by setting the bash shopt setting huponexit.
NOTE:
This behavior is completely dependent upon the shell. It is entirely possible that different shells have different default behaviors.
This is weird.
The 'nohup' command is specifically designed to avoid receiving the SIGHUP. Yet
you say that the process receives the signal anyway. I'm confused on what's going
on here....
Test example seems to work perfectly well (as far as I know, many people use nohup script.bds &
without any issues):
$ cat z.bds
for( int i=0; i < 100 ; i++ ) {
sleep(1)
println "$i"
}
$ ssh localhost
$ nohup bds z.bds &
Ctrl-D
$ logout
Connection to localhost closed.
$ ssh localhost
$ tail nohup.out
0
1
2
3
4
5
6
7
Ctrl-D
$ logout
Connection to localhost closed.
# Wait a few seconds
$ ssh localhost
$ tail nohup.out
8
9
10
11
12
13
14
15
16
17
I see. Now I was able to logout without any issues. This behaviour is not always present. I'm using ubuntu server and now I've tried with
set -o ignoreeof
seems to do the trick for now.