7

I run a rsync command with nohup in ssh session, but after a while it returns this error:

rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(549) [generator=3.0.9]
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(549) [receiver=3.0.9]

I didn't kill the process by my own, I think there isn't any other process that kills this process. Also I run it foreground with nohup. I use nohup because for any reason ssh session terminated, the rsync process doesn't terminate.

What does cause terminating?

Operating system is Debian Wheezy.

Barmar
  • 398

1 Answers1

3

This is an old question, with limited information, but I think what is happening is not an rsync issue (since rsync won't sigkill itself).

I ran into a similar problem which turned out to be a memory issue. The out of memory management in the kernel determines which process to kill by looking at the amount of virtual memory used divided by total time running.

Rsync can consume lots of memory depending on the size and number of files being transferred, and it will have a low run time value. This increases it's score when the kernel calls select_bad_process().

Check memory usage with a simple script after starting rsync that logs rsync memory usage:

while [ 1 ]; do
  pidstat -r -G rsync >> stat.log
  free >> stat.log
done

Also check dmesg around the time rsync dies, if there are OOM errors you'll see them.

Ed King
  • 961
  • 5
  • 9