From owner-freebsd-current@FreeBSD.ORG Thu Jul 3 19:39:01 2008 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 DC7DD106566C; Thu, 3 Jul 2008 19:39:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 7A4DB8FC0A; Thu, 3 Jul 2008 19:39:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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 m63JcuZ9045406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Jul 2008 22:38:56 +0300 (EEST) (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.2/8.14.2) with ESMTP id m63JcusC059280; Thu, 3 Jul 2008 22:38:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m63JcuP7059279; Thu, 3 Jul 2008 22:38:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 3 Jul 2008 22:38:56 +0300 From: Kostik Belousov To: Doug Barton Message-ID: <20080703193856.GS17123@deviant.kiev.zoral.com.ua> References: <486BFFE5.1010808@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="m3NGSFsSaj96nZIx" Content-Disposition: inline In-Reply-To: <486BFFE5.1010808@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org Subject: Re: Panic using rsync to msdosfs filesystem 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: Thu, 03 Jul 2008 19:39:01 -0000 --m3NGSFsSaj96nZIx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 02, 2008 at 03:23:33PM -0700, Doug Barton wrote: > I have a western digital passport USB hard drive that I use for=20 > backups. It's always worked fine in FreeBSD and Windows doing straight=20 > copies. Today I tried to get fancy and use rsync and it blew up on me. >=20 > It is a large disk (160G) and I use the following options in fstab: > /dev/da0s1 /mnt/wd msdosfs rw,noauto,-olarge,-m775 0 0 >=20 > Using the following command line for rsync I get a panic as soon as I=20 > hit return: rsync -vv --backup -u -rlt source/ destination/ >=20 > I'm using -current as of r180191. Here is the stack trace: > Unread portion of the kernel message buffer: > panic: stack overflow detected; backtrace may be corrupted > cpuid =3D 1 > Uptime: 1h52m1s > Physical memory: 2029 MB > Dumping 133 MB: 118 102 86 70 54 38 22 6 >=20 > Reading symbols from /boot/modules/nvidia.ko...Reading symbols from=20 > /boot/modules/nvidia.ko.symbols...done. > done. > Loaded symbols for /boot/modules/nvidia.ko > Reading symbols from /boot/kernel/acpi.ko...Reading symbols from=20 > /boot/kernel/acpi.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/acpi.ko > Reading symbols from /boot/kernel/if_bge.ko...Reading symbols from=20 > /boot/kernel/if_bge.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/if_bge.ko > Reading symbols from /boot/kernel/linux.ko...Reading symbols from=20 > /boot/kernel/linux.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/linux.ko > Reading symbols from /boot/kernel/msdosfs.ko...Reading symbols from=20 > /boot/kernel/msdosfs.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/msdosfs.ko > #0 doadump () at pcpu.h:196 > 196 __asm __volatile("movl %%fs:0,%0" : "=3Dr" (td)); > (kgdb) where > #0 doadump () at pcpu.h:196 > #1 0xc057a9ce in boot (howto=3D260) > at /usr/local/src/sys/kern/kern_shutdown.c:418 > #2 0xc057ac93 in panic (fmt=3DVariable "fmt" is not available. > ) at /usr/local/src/sys/kern/kern_shutdown.c:572 > #3 0xc059c5b2 in __stack_chk_fail () > at /usr/local/src/sys/kern/stack_protector.c:17 > #4 0xc652384a in msdosfs_rename (ap=3D0xc644aca4) > at=20 > /usr/local/src/sys/modules/msdosfs/../../fs/msdosfs/msdosfs_vnops.c:1286 > #5 0xc07b4df5 in VOP_RENAME_APV (vop=3D0xc6525cc0, a=3D0xe9e59c1c) > at vnode_if.c:1184 > #6 0xc0605619 in kern_renameat (td=3D0xc58f1d20, oldfd=3D-100, > old=3D0xbfbfc4a0
, newfd=3D-100, > new=3D0xbfbfcca0
,=20 > pathseg=3DUIO_USERSPACE) > at vnode_if.h:622 > #7 0xc06057a6 in kern_rename (td=3D0xc58f1d20, > from=3D0xbfbfc4a0
, > to=3D0xbfbfcca0
,=20 > pathseg=3DUIO_USERSPACE) > at /usr/local/src/sys/kern/vfs_syscalls.c:3526 > #8 0xc06057d9 in rename (td=3D0xc58f1d20, uap=3D0xe9e59cf8) > at /usr/local/src/sys/kern/vfs_syscalls.c:3503 > #9 0xc07a6283 in syscall (frame=3D0xe9e59d38) > at /usr/local/src/sys/i386/i386/trap.c:1081 > #10 0xc078bb80 in Xint0x80_syscall () > at /usr/local/src/sys/i386/i386/exception.s:261 > #11 0x00000033 in ?? () > Previous frame inner to this frame (corrupt stack?) >=20 >=20 > Let me know what I can do to help. Looks like this is the first casuality of the -fstack-protector. Try this: diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 8a1484f..fe673e0 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -982,7 +982,7 @@ msdosfs_rename(ap) struct componentname *tcnp =3D ap->a_tcnp; struct componentname *fcnp =3D ap->a_fcnp; struct denode *ip, *xp, *dp, *zp; - u_char toname[11], oldname[11]; + u_char toname[12], oldname[11]; u_long from_diroffset, to_diroffset; u_char to_count; int doingdirectory =3D 0, newparent =3D 0; --m3NGSFsSaj96nZIx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkhtKs8ACgkQC3+MBN1Mb4jiqwCg3PqZVb05N3zDt8nkCOx0BcuY j0AAoLYAFZEYyRWCZ4VVwX0zSfcLVq5x =d1D1 -----END PGP SIGNATURE----- --m3NGSFsSaj96nZIx--