From owner-freebsd-stable@FreeBSD.ORG Thu Dec 28 23:36:57 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5FA3816A407 for ; Thu, 28 Dec 2006 23:36:57 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0FDFF13C463 for ; Thu, 28 Dec 2006 23:36:56 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kBSNaCk9020283; Thu, 28 Dec 2006 16:36:12 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 28 Dec 2006 16:36:17 -0700 (MST) Message-Id: <20061228.163617.1573372353.imp@bsdimp.com> To: ilya@edpausa.com From: "M. Warner Losh" In-Reply-To: <4593E92D.7040001@edpausa.com> References: <4593E92D.7040001@edpausa.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 28 Dec 2006 16:36:12 -0700 (MST) Cc: freebsd-stable@freebsd.org Subject: Re: rsync write fails on descriptor 3 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 23:36:57 -0000 In message: <4593E92D.7040001@edpausa.com> Ilya Vishnyakov writes: : -----BEGIN PGP SIGNED MESSAGE----- : Hash: SHA1 : : Hello, I'm in trouble with rsync. Some people think that this problem : is freebsd related: : : I use rsync to synchronize 2 servers (rsync versions are same on both : machines). : Most of the directories are copied fine, however, some huge ones fail : and produce : some strange output. : : Rsync guys detected this problem as: " : So the write fails on descriptor 3, which I think is the socket to the : > daemon. I Googled "FreeBSD write EPERM" and turned up the : > following FreeBSD bug, which you might be seeing: : > : > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern%2F95559 : : I use FreeBSD m.mycompany.com 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #2: : : here is the detailed output of the error (I tried to run rsync in : different modesm however, with no luck): : : truss rsync -atlrpogHvv me at myip::public : - - - --password-file=/root/rsync_pass /home/public : : ARRIVALS/ARRV112806.xls",0x7fffffffc620) ERR#2 'No such file or directory' : lstat("Company/General/2006 OLD : ARRIVALS/ARRV112906.xls",0x7fffffffc620) ERR#2 'No such file or directory' : select(5,{4},{3},0x0,{60 0}) = 1 (0x1) : write(3,0xc20000,4092) ERR#1 'Operation not permitted' : rsync: writefd_unbuffered failed to write 4092 bytes [generator]: : Operation not permitted (1)write(2,0x7fffffffa4f0,93) = 93 (0x5d) : : write(2,0x80083ce67,1) = 1 (0x1) : sigaction(SIGUSR1,{ SIG_IGN : 0x0|ONSTACK|RESTART|RESETHAND|NOCLDSTOP|NODEFER|NOCLDWAIT|SIGINFO ss_t : },0x0) = 0 (0x0) : sigaction(SIGUSR2,{ SIG_IGN : 0x0|ONSTACK|RESTART|RESETHAND|NOCLDSTOP|NODEFER|NOCLDWAIT|SIGINFO ss_t : },0x0) = 0 (0x0) : getpid() = 42660 (0xa6a4) : kill(0xa6a5,0x1e) = 0 (0x0) : rsync error: received SIGUSR1 (code 19) at main.c(1095) [receiver=2.6.8] : rsync error: error in rsync protocol data stream (code 12) at : io.c(1124) [generator=2.6.8]write(2,0x7fffffffa480,90) = 90 (0x5a) : : write(2,0x80083ce67,1) = 1 (0x1) : SIGNAL 20 (SIGCHLD) : SIGNAL 20 (SIGCHLD) : wait4(0xffffffff,0x7fffffffb394,0x1,0x0) = 42661 (0xa6a5) : wait4(0xffffffff,0x7fffffffb394,0x1,0x0) ERR#10 'No child : processes' : sigreturn(0x7fffffffb3b0) = 524288 (0x80000) : exit(0xc) : : : process exit, rval = 3072 : : here is my share from the rsync.conf: : - ----------------------------------------------------- : uid = 0 : gid = 0 : hosts allow = myhostsips : secrets file =/usr/local/myfile : auth users = ilya : [public] : path = /home/public/ : comment = home filesystem : auth users = ilya : uid = root : read only = yes : secrets file =/usr/local/myfile : - ------------------------------------------------------- : : : Please advice me what to do next. Thank you in advance. Please make sure that the rsync daemon is actually running as root, that there are no syslog messgaes complaining about permission problems, etc. Also make sure that the area you are trying to write to isn't NFS mounted (which denies writes to root by default), or has immutable file attribute set (see ls -o for a list of flags). Warner