0

I've inherited a system for moving ("promoting") content from one django instance (staging) to another (production). I'm testing a bit of new functionality in another part of the app, and want to make sure that it's compatible with the existing promotion code.

The issue I'm having is in rsync, which seems to just hang the second time its called. That is, the program tries to sync two folders, assets/files and assets/images, and hangs on the second one. It completes the first rsync correctly.

I'm using rsync version 3.0.9 protocol version 30 on Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64). The command that python calling is rsync -rhva --files-from=- /home/staging/assets/files/ /home/production/assets/images

I've set up a test scenario where the "production" server is just running as another user on the same vagrant ubuntu box.

There are a large number of relatively large files, so I understand it may take a while, but so far it's been running for ~45 minutes with no further output. [update: left it all night, no change] It took around 30 min to download the resources using rsync over a network, so I'm skeptical that this is proceeding apace.

Furthermore, the following makes me concerned, though I'm not terribly familiar with these utilities:

$ sudo ps -o wchan 28143
WCHAN
poll_schedule_timeout
$ sudo ps -o wchan 28142
WCHAN
pipe_wait
$ sudo ps -o wchan 28132
WCHAN
poll_schedule_timeout

where those are the three rsync processes, children of the python script that calls rsync.

and then:

$ sudo strace -p 28132
Process 28132 attached - interrupt to quit
select(0, NULL, NULL, NULL, {0, 12209}) = 0 (Timeout)
wait4(28142, 0x7fff7859feb0, WNOHANG, NULL) = 0
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)
wait4(28142, 0x7fff7859feb0, WNOHANG, NULL) = 0
...
$ sudo strace -p 28142
Process 28142 attached - interrupt to quit
write(2, "rsync: mkstemp \"/home/production/"..., 141
...
$ sudo strace -p 28143
Process 28143 attached - interrupt to quit
select(4, [3], [1], [1], {42, 444562}

After leaving it running overnight, there was no change in status, so I interrupted (ctrl-c). The (remote) directory which it hung on syncing has all the expected files and directories now, but has no content in the sub-directories. That is, rsync seems to have copied over all the files and created the directories, but not copied the contents of those directories. There were no error messages or output (that I could locate) at this point.

This is new territory for me, so any suggestions of leads to follow or tests to run will be much appreciated.

  • What does the rsync debugging output look like? – ewwhite Sep 23 '14 at 2:19
  • what output are we talking about? rsync itself isn't producing any output at this point, but if there's a good way to probe it... – Ben Sep 23 '14 at 14:45

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.