From owner-freebsd-current@FreeBSD.ORG Fri Feb 18 23:22:23 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 027C91065673 for ; Fri, 18 Feb 2011 23:22:23 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 8B4C68FC08 for ; Fri, 18 Feb 2011 23:22:22 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p1INMIt5083243 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 19 Feb 2011 01:22:18 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p1INMIKr012648; Sat, 19 Feb 2011 01:22:18 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p1INMI5J012647; Sat, 19 Feb 2011 01:22:18 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 19 Feb 2011 01:22:18 +0200 From: Kostik Belousov To: michael butler Message-ID: <20110218232218.GC78089@deviant.kiev.zoral.com.ua> References: <20110218215330.GA9549@mail.auburn.protected-networks.net> <20110218221108.GB78089@deviant.kiev.zoral.com.ua> <20110218223358.GB9549@mail.auburn.protected-networks.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cAt6D5DpHioS/YAu" Content-Disposition: inline In-Reply-To: <20110218223358.GB9549@mail.auburn.protected-networks.net> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org Subject: Re: rename on socket fails :-( X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2011 23:22:23 -0000 --cAt6D5DpHioS/YAu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 18, 2011 at 05:33:58PM -0500, michael butler wrote: > On Sat, Feb 19, 2011 at 12:11:09AM +0200, Kostik Belousov wrote: > > On Fri, Feb 18, 2011 at 04:53:30PM -0500, michael butler wrote: > > > Just upgraded my mail-server to -current only to be greated by: > > >=20 > > > Feb 18 16:26:00 mail authdaemond: modules=3D"authpam", daemons=3D5 > > > Feb 18 16:26:00 mail authdaemond: Installing libauthpam > > > Feb 18 16:26:00 mail authdaemond: Installation complete: authpam > > > Feb 18 16:26:00 mail authdaemond: /var/run/authdaemond/socket: Cross-= device > > > link > > >=20 > > > Essentially, authdaemond creates /var/run/authdaemond/socket.tmp and = then > > > tries to rename it to the above. In releng7_4, this worked, on -curre= nt, it > > > doesn't. What broke it? This is on a normal UFS2 + soft-updates file-= system > > > :-( > >=20 > > Are you sure that /var/run/authdaemond/socket.tmp is > > renamed to /var/run/authdaemond/socket ? Can you show the > > ktrace/kdump output ? >=20 > The relevant section of ktrace.out is: >=20 > 10905 authdaemond.bin CALL unlink(0xbfbfeadc) > 10905 authdaemond.bin NAMI "/var/run/authdaemond/socket.tmp" > 10905 authdaemond.bin RET unlink 0 > 10905 authdaemond.bin CALL bind(0x5,0xbfbfeada,0x6a) > 10905 authdaemond.bin STRU struct sockaddr { AF_LOCAL, > /var/run/authdaemond/socket.tmp } > 10905 authdaemond.bin NAMI "/var/run/authdaemond/socket.tmp" > 10905 authdaemond.bin RET bind 0 > 10905 authdaemond.bin CALL listen(0x5,0x80) > 10905 authdaemond.bin RET listen 0 > 10905 authdaemond.bin CALL > chmod(0xbfbfeadc,0x1ff) > 10905 authdaemond.bin NAMI "/var/run/authdaemond/socket.tmp" > 10905 authdaemond.bin RET chmod 0 > 10905 authdaemond.bin CALL rename(0xbfbfeadc,0x804b1c1) > 10905 authdaemond.bin NAMI "/var/run/authdaemond/socket.tmp" > 10905 authdaemond.bin NAMI "/var/run/authdaemond/socket" > 10905 authdaemond.bin RET rename -1 errno 18 Cross-device link Thanks, this immediately pointed to the problem. > =20 > I also made sure that the relevant components were properly linked against > the -current shared libs .. This is not needed. The patch below fixed the bug for the test extracted from your kdump. diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 084971e..34b1758 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1295,7 +1295,9 @@ relock: newparent =3D tdp->i_number; doingdirectory =3D 1; } - if (fvp->v_mountedhere !=3D NULL || (tvp && tvp->v_mountedhere !=3D NULL)= ) { + if ((fvp->v_type =3D=3D VDIR && fvp->v_mountedhere !=3D NULL) || + (tvp !=3D NULL && tvp->v_type =3D=3D VDIR && + tvp->v_mountedhere !=3D NULL)) { error =3D EXDEV; goto unlockout; } --cAt6D5DpHioS/YAu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk1e/ykACgkQC3+MBN1Mb4jGVwCeMYVAHoC+DaHYem6WVg7qSHZT powAnRV2Nqau5HgrYqDjxSHp3rYAsaTg =HgUN -----END PGP SIGNATURE----- --cAt6D5DpHioS/YAu--