Rsync, Perl and samba filesystem (smbfs)
Leakin at dfw.Nostrum.com
Thu Dec 5 21:15:01 EST 2002
Yes the problem was in the perl code. Chris was using my File::Rsync
perl module. He and 2 others reported a case where the module would
hang, but calling same rsync command from a shell would work properly.
I could not reproduce the symptom, but added some additional EOF checks
on the pipe and a trap for SIGCHLD. Chris and one other person have both
reported that it fixed the hangs. I'm still waiting for report from the
third person. I'll be posting the updated version (0.23) to CPAN soon
(after a little more testing to make sure I didn't break anything).
In the mean time, if anyone else is having similar problems and would
also like to test it out, you can find it here:
Any issues (good or bad) are welcome.
---begin quoted text---
> Delivered-To: rsync at lists.samba.org
> From: Dave Dykstra <dwd at drdykstra.us>
> To: "Dr. Poo" <drpoo at houston.rr.com>, rsync at lists.samba.org
> Subject: Re: Rsync, Perl and samba filesystem (smbfs)
> Mail-Followup-To: Dave Dykstra <dwd at drdykstra.us>,
> "Dr. Poo" <drpoo at houston.rr.com>, rsync at lists.samba.org
> User-Agent: Mutt/1.3.27i
> X-BeenThere: rsync at lists.samba.org
> X-Mailman-Version: 2.0.13
> X-Original-Date: Thu, 5 Dec 2002 14:36:10 -0600
> Date: Thu, 5 Dec 2002 14:36:10 -0600
> Also, you'll probably want to use the --whole-file option of rsync to
> minimize the amount of samba network traffic (although J.W. is probably
> right about the main problem being in perl). That's the default in later
> versions of rsync when copying between two local file paths.
> - Dave Dykstra
> On Tue, Dec 03, 2002 at 03:49:41PM -0800, jw schultz wrote:
> > On Tue, Dec 03, 2002 at 04:33:38PM -0600, Dr. Poo wrote:
> > > My name is Chris, Hi!
> > >
> > > I've got rsync being called from a perl script that is called by cron (or for
> > > that matter, by hand) and when I 'rsync' a locally mounted samba filesystem
> > > (eg. to /mnt/smbfs), it successfully syncs the smbfs to the destination
> > > directory, but without reason hangs... and take all my cpu power...
> > >
> > > When i look at all the processes running, the rsync pid is defuct... and it's
> > > actually saying that the parent perl script that made the call is gobbling up
> > > all my cpu resources....
> > >
> > > This ONLY happens (so far anyways) with the samba mounts... Any suggestions??
> > >
> > > Thanks a bundle!
> > > -Chris
> > The fact that the rsync process is defunct tells me that it
> > isn't rsync. Defunct (also known as the zombie state) means
> > that the process has exited but the parent (your perl
> > script) has not reaped the status with wait().
> > It sounds like your perl script is reading from the rsync
> > output and failing to check for EOF. If you described or
> > better sent your perl script someone might be able to help.
> > --
> > ________________________________________________________________
> > J.W. Schultz Pegasystems Technologies
> > email address: jw at pegasys.ws
> To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
---end quoted text---
Lee Eakin - leakin at dfw.nostrum.com
For every action, there is an equal and opposite criticism.
More information about the rsync