From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 25 15:00:07 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7DE3106568B for ; Sun, 25 Oct 2009 15:00:07 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 7D6178FC0C for ; Sun, 25 Oct 2009 15:00:07 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 5B9376D41B; Sun, 25 Oct 2009 15:00:06 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 33AC184548; Sun, 25 Oct 2009 16:00:06 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexander Best References: Date: Sun, 25 Oct 2009 16:00:06 +0100 In-Reply-To: (Alexander Best's message of "Fri, 23 Oct 2009 14:16:50 +0200 (CEST)") Message-ID: <864opnbjt5.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Antony Mawer , freebsd-hackers@freebsd.org, pluknet Subject: Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2009 15:00:07 -0000 Alexander Best writes: > i just tried building ee under linux without using new_curse.c and linkin= g the > executable against ncurses. running the binary is showing the same proble= ms > with SIGWINCH. so if this is in fact caused by a ncurses bug the bug appe= ars > in linux ncurses too. No surprise, it's the same as ours. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 25 19:40:29 2009 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6638106566B; Sun, 25 Oct 2009 19:40:29 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6373E8FC17; Sun, 25 Oct 2009 19:40:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9PJYR3x063689; Sun, 25 Oct 2009 13:34:27 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 25 Oct 2009 13:34:37 -0600 (MDT) Message-Id: <20091025.133437.-1844000782.imp@bsdimp.com> To: usb@FreeBSD.org From: "M. Warner Losh" X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org Subject: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2009 19:40:29 -0000 I have a usb stick (8GB) on it. This stick has about 5GB of junk on it at this point. I tried to do 'cat * > /dev/null' recently, to measure how fast it goes. It got about 1GB into the drive and then I got device missing messages. Here's the dmesg messages: # Plug it in da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) # mount it, etc # run the cat command Device da0s1 went missing before all of the data could be written to it; expect data loss. # get error messages # Remove the drive ugen2.2: at usbus2 (disconnected) umass0: at uhub2, port 1, addr 2 (disconnected) (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): removing device entry So devfs thinks the device went missing: static int devfs_fsync(struct vop_fsync_args *ap) { ... if (!vn_isdisk(ap->a_vp, &error)) { bo = &ap->a_vp->v_bufobj; de = ap->a_vp->v_data; if (error == ENXIO && bo->bo_dirty.bv_cnt > 0) { printf("Device %s went missing before all of the data " "could be written to it; expect data loss.\n", de->de_dirent->d_name); ... So it thinks that it isn't a disk. vn_isdisk is return ENXIO because either vp->v_rdev == NULL or the v_rdev->si_devsw == NULL. So how the heck can that happen without other warnings? It appears the only place it is set like this is in devfs_reclaim. But I'm having trouble tracking down where *THAT* is called. This is with the following system: FreeBSD lighthouse 9.0-CURRENT FreeBSD 9.0-CURRENT #41 r185338:198411M: Fri Oct 23 10:08:48 MDT 2009 imp@lighthouse:/cache/svn/head/sys/amd64/compile/LIGHTHOUSE amd64 Warner From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 25 19:49:32 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BE1C106568D for ; Sun, 25 Oct 2009 19:49:32 +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 E65218FC0A for ; Sun, 25 Oct 2009 19:49:31 +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 n9PJnNQY050464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 25 Oct 2009 21:49:23 +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.3/8.14.3) with ESMTP id n9PJnNG8064363; Sun, 25 Oct 2009 21:49:23 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n9PJnNeM064362; Sun, 25 Oct 2009 21:49:23 +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: Sun, 25 Oct 2009 21:49:23 +0200 From: Kostik Belousov To: "M. Warner Losh" Message-ID: <20091025194923.GU2160@deviant.kiev.zoral.com.ua> References: <20091025.133437.-1844000782.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4StcSGwj0FoelDaN" Content-Disposition: inline In-Reply-To: <20091025.133437.-1844000782.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: usb@freebsd.org, hackers@freebsd.org Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2009 19:49:32 -0000 --4StcSGwj0FoelDaN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 25, 2009 at 01:34:37PM -0600, M. Warner Losh wrote: > I have a usb stick (8GB) on it. This stick has about 5GB of junk on > it at this point. >=20 > I tried to do 'cat * > /dev/null' recently, to measure how fast it > goes. It got about 1GB into the drive and then I got device missing > messages. >=20 > Here's the dmesg messages: >=20 > # Plug it in > da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 > da0: Removable Direct Access SCSI-0 device=20 > da0: 40.000MB/s transfers > da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) > # mount it, etc > # run the cat command > Device da0s1 went missing before all of the data could be written to it; = expect data loss. > # get error messages > # Remove the drive > ugen2.2: at usbus2 (disconnected) > umass0: at uhub2, port 1, addr 2 (disconnected) > (da0:umass-sim0:0:0:0): lost device > (da0:umass-sim0:0:0:0): removing device entry >=20 > So devfs thinks the device went missing: >=20 > static int > devfs_fsync(struct vop_fsync_args *ap) > { > ... > if (!vn_isdisk(ap->a_vp, &error)) { > bo =3D &ap->a_vp->v_bufobj; > de =3D ap->a_vp->v_data; > if (error =3D=3D ENXIO && bo->bo_dirty.bv_cnt > 0) { > printf("Device %s went missing before all of the data " > "could be written to it; expect data loss.\n", > de->de_dirent->d_name); > ... >=20 > So it thinks that it isn't a disk. vn_isdisk is return ENXIO because > either vp->v_rdev =3D=3D NULL or the v_rdev->si_devsw =3D=3D NULL. si_devsw is cleared in kern_conf.c:destroy_devl, line 835. I think USB subsystem called either destroy_dev() or destroy_dev_sched(). >=20 > So how the heck can that happen without other warnings? It appears > the only place it is set like this is in devfs_reclaim. But I'm > having trouble tracking down where *THAT* is called. Reclaim might be called if devfs mount point is forcibly unmounted special vnode from which you used to mount pendrive. >=20 > This is with the following system: >=20 > FreeBSD lighthouse 9.0-CURRENT FreeBSD 9.0-CURRENT #41 r185338:198411M: F= ri Oct 23 10:08:48 MDT 2009 imp@lighthouse:/cache/svn/head/sys/amd64/co= mpile/LIGHTHOUSE amd64 >=20 > Warner > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" --4StcSGwj0FoelDaN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrkq8MACgkQC3+MBN1Mb4jsGwCghNdBHrhlT1IeYWDs2aDnNQO4 G8AAoJteKOCwfqVpCtN4IPYSSa+g50OY =SqpD -----END PGP SIGNATURE----- --4StcSGwj0FoelDaN-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 00:27:50 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3023B106566C; Mon, 26 Oct 2009 00:27:50 +0000 (UTC) (envelope-from non@ever.sanda.gr.jp) Received: from smtp10.dti.ne.jp (smtp10.dti.ne.jp [202.216.231.185]) by mx1.freebsd.org (Postfix) with ESMTP id BC80A8FC16; Mon, 26 Oct 2009 00:27:49 +0000 (UTC) Received: from [127.0.0.1] (n166h120.dhcp.kanazawa-it.ac.jp [202.13.166.120]) by smtp10.dti.ne.jp (3.11s) with ESMTP AUTH id n9Q055kG009702; Mon, 26 Oct 2009 09:05:09 +0900 (JST) Message-ID: <4AE4E7AF.8060103@ever.sanda.gr.jp> Date: Mon, 26 Oct 2009 09:05:03 +0900 From: non@ever.sanda.gr.jp User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: "M. Warner Losh" References: <20091025.133437.-1844000782.imp@bsdimp.com> In-Reply-To: <20091025.133437.-1844000782.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: usb@freebsd.org, hackers@freebsd.org Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 00:27:50 -0000 M. Warner Losh wrote: > I have a usb stick (8GB) on it. This stick has about 5GB of junk on > it at this point. > > I tried to do 'cat * > /dev/null' recently, to measure how fast it > goes. It got about 1GB into the drive and then I got device missing > messages. : > So devfs thinks the device went missing: Warner-san, maybe it is caused by the hardware problem on the USB flash memory. Some chip on the memory might have too much heat when you access the memory at fast rate. Then it stops working. // Noriaki Mitsunaga From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 08:29:46 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34811106566B for ; Mon, 26 Oct 2009 08:29:46 +0000 (UTC) (envelope-from pirat@tint.or.th) Received: from mail.tint.or.th (ns2.tint.or.th [122.154.13.210]) by mx1.freebsd.org (Postfix) with SMTP id 5D5E88FC0C for ; Mon, 26 Oct 2009 08:29:45 +0000 (UTC) Received: (qmail 741 invoked from network); 26 Oct 2009 07:56:58 -0000 Received: from www.tint.or.th (HELO alpha.nst.or.th) (122.154.13.80) by mail.tint.or.th with SMTP; 26 Oct 2009 07:56:58 -0000 Received: from 10.3.1.25 (10.3.1.25 [10.3.1.25]) by webmail.tint.or.th (Horde Framework) with HTTP; Mon, 26 Oct 2009 14:36:39 +0700 Message-ID: <20091026143639.13895c34kml7gmmf@webmail.tint.or.th> X-Priority: 3 (Normal) Date: Mon, 26 Oct 2009 14:36:39 +0700 From: =?utf-8?b?4LmE4Lie4Lij4Lix4LiKIA==?= =?utf-8?b?4Lio4Lij4Li14LmC4Lii4LiY4Liy?= To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3) Subject: make release stop at Creating ISO imagess X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 08:29:46 -0000 hi sirs, apologized me for disturbing this list but ireally have problem s. i make my own release by follwoing document in releng articles. here is my command cd /usr/src/release time make CHROOTDIR=3D/kaitag/KAITAG BUILDNAME=3D7.2-RELEASE \ CVSROOT=3D/var/ftp/pub/ncvs RELEASETAG=3DRELENG_7_2_0_RELEASE \ EXTSRCDIR=3D/usr/src EXTPORTSDIR=3D/usr/ports \ DOC_LANG=3Den_US.ISO8859-1 NODOC=3DNO NOPORTS=3DNO \ MAKE_DVD=3DYES MAKE_ISOS=3DYES CDROM=3DYES RELEASEDISTFILES=3D/var/ftp/pub/d= istfiles \ release the build process goes well but then fetching for cdrtools.tbz begin and sto= p. in my machine i have installed cdrtools and there is also mkisofs file =20 so i wonder why the script /usr/src/release/i386/mkisofsimages.sh =20 still fetching for cdrtools. and here is my uname of my machine wmc# uname -a FreeBSD wmc.tint.or.th 7.2-RELEASE FreeBSD KAITAG #0: Wed Oct 21 =20 14:36:40 ICT 2009 root@wmc.tint.or.th:/usr/obj/usr/src/sys/WMC i386 wmc# i set UNAME_r=3D7.2-RELEASE in /etc/make.conf though. many thanks in advance for any helps and hints. with best regards, psr --=20 =E0=B8=A1=E0=B8=B0=E0=B9=84=E0=B8=9F =E0=B8=85=E0=B8=99=E0=B9=80=E0=B8=AB=E0= =B8=A5=E0=B8=B4=E0=B8=87=E0=B8=9F=E0=B9=89=E0=B8=B2 =E0=B8=A1=E0=B8=B0=E0=B8=82=E0=B8=B2=E0=B8=A1 =E0=B8=84=E0=B8=B4=E0=B8=99=E0= =B9=80=E0=B8=94=E0=B8=B4=E0=B8=99=E0=B8=94=E0=B8=99 http://makham.blogspot.com ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 10:00:16 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E698E106566B for ; Mon, 26 Oct 2009 10:00:16 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id 762DB8FC12 for ; Mon, 26 Oct 2009 10:00:16 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=pLBSpBzHylG4v-nYrQwA:9 a=76bN8vlV6fSBNtwMUiEA:7 a=A5mCuyYCkPnbUs5nRzpMIuxt49oA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1310164562; Mon, 26 Oct 2009 10:00:13 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Mon, 26 Oct 2009 09:59:20 +0100 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <20091025.133437.-1844000782.imp@bsdimp.com> <4AE4E7AF.8060103@ever.sanda.gr.jp> In-Reply-To: <4AE4E7AF.8060103@ever.sanda.gr.jp> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910260959.20772.hselasky@c2i.net> Cc: hackers@freebsd.org Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 10:00:17 -0000 On Monday 26 October 2009 01:05:03 non@ever.sanda.gr.jp wrote: > M. Warner Losh wrote: > > I have a usb stick (8GB) on it. This stick has about 5GB of junk on > > it at this point. > > > > I tried to do 'cat * > /dev/null' recently, to measure how fast it > > goes. It got about 1GB into the drive and then I got device missing > > messages. > > > > So devfs thinks the device went missing: > > Warner-san, maybe it is caused by the hardware problem on the USB flash > memory. Some chip on the memory might have too much heat when you access > the memory at fast rate. Then it stops working. > What happens if you read from two USB disks at the same time? If the device went missing the USB HUB signalled that. This is maybe an indication that the USB firmware on the device crashed. Maybe this is due to heat, or unhandled race conditions when the load goes high. Try using "dd" and vary the block size from 512 to 65536 bytes. Does it stop working with all block sizes over time? --HPS From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 10:06:17 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CF4D106566B for ; Mon, 26 Oct 2009 10:06:17 +0000 (UTC) (envelope-from pirat@tint.or.th) Received: from mail.tint.or.th (ns2.tint.or.th [122.154.13.210]) by mx1.freebsd.org (Postfix) with SMTP id D83A58FC0C for ; Mon, 26 Oct 2009 10:06:16 +0000 (UTC) Received: (qmail 2387 invoked from network); 26 Oct 2009 10:00:10 -0000 Received: from www.tint.or.th (HELO alpha.nst.or.th) (122.154.13.80) by mail.tint.or.th with SMTP; 26 Oct 2009 10:00:10 -0000 Received: from 10.3.1.26 (10.3.1.26 [10.3.1.26]) by webmail.tint.or.th (Horde Framework) with HTTP; Mon, 26 Oct 2009 16:39:50 +0700 Message-ID: <20091026163950.56716v4m76bon23q@webmail.tint.or.th> X-Priority: 3 (Normal) Date: Mon, 26 Oct 2009 16:39:50 +0700 From: =?utf-8?b?4LmE4Lie4Lij4Lix4LiKIA==?= =?utf-8?b?4Lio4Lij4Li14LmC4Lii4LiY4Liy?= To: Ruben de Groot References: <20091026143639.13895c34kml7gmmf@webmail.tint.or.th> <20091026095317.GA72492@ei.bzerk.org> In-Reply-To: <20091026095317.GA72492@ei.bzerk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3) Cc: freebsd-hackers@freebsd.org Subject: Re: make release stop at Creating ISO imagess X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 10:06:17 -0000 Quoting Ruben de Groot : > On Mon, Oct 26, 2009 at 02:36:39PM +0700, ??????????????? =20 > ????????????????????? typed: >> hi sirs, >> >> apologized me for disturbing this list but ireally have problem s. >> i make my own release by follwoing document in releng articles. >> >> here is my command >> >> cd /usr/src/release >> time make CHROOTDIR=3D/kaitag/KAITAG BUILDNAME=3D7.2-RELEASE \ >> CVSROOT=3D/var/ftp/pub/ncvs RELEASETAG=3DRELENG_7_2_0_RELEASE \ >> EXTSRCDIR=3D/usr/src EXTPORTSDIR=3D/usr/ports \ >> DOC_LANG=3Den_US.ISO8859-1 NODOC=3DNO NOPORTS=3DNO \ >> MAKE_DVD=3DYES MAKE_ISOS=3DYES CDROM=3DYES >> RELEASEDISTFILES=3D/var/ftp/pub/distfiles \ >> release >> >> the build process goes well but then fetching for cdrtools.tbz begin and >> stop. >> in my machine i have installed cdrtools and there is also mkisofs file >> so i wonder why the script /usr/src/release/i386/mkisofsimages.sh >> still fetching for cdrtools. > > Do you have the cdrtools.tbz package in /var/ftp/pub/distfiles ? > thanks for your time but there is only cdrtools-2.01.tar.bz2 which is =20 source files for making cdrtools. i keep all packages in a separate =20 location, /usr/ports/packages/. > > Ruben > > with best regards, --=20 psr =E0=B8=A1=E0=B8=B0=E0=B8=83=E0=B8=B2=E0=B8=A1 =E0=B8=85=E0=B8=B4=E0=B8=99=E0= =B9=80=E0=B8=94=E0=B8=B4=E0=B8=99=E0=B8=94=E0=B8=99 =E0=B8=A1=E0=B8=B0=E0=B9=84=E0=B8=9F =E0=B8=85=E0=B8=99=E0=B9=80=E0=B8=AB=E0= =B8=A5=E0=B8=B4=E0=B8=87=E0=B8=9F=E0=B9=89=E0=B8=B2 http://makham.blogspot.com ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 10:24:06 2009 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B21D106566B; Mon, 26 Oct 2009 10:24:06 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 187E58FC0C; Mon, 26 Oct 2009 10:24:06 +0000 (UTC) Received: from [10.0.0.198] (198.imp.bsdimp.com [10.0.0.198] (may be forged)) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9QAKfnt072691; Mon, 26 Oct 2009 04:20:41 -0600 (MDT) (envelope-from imp@bsdimp.com) From: Warner Losh To: Hans Petter Selasky In-Reply-To: <200910260959.20772.hselasky@c2i.net> X-Mailer: iPhone Mail (7D11) References: <20091025.133437.-1844000782.imp@bsdimp.com> <4AE4E7AF.8060103@ever.sanda.gr.jp> <200910260959.20772.hselasky@c2i.net> Message-Id: <96830A33-8392-4C05-B073-48026E24C895@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (iPhone Mail 7D11) Date: Mon, 26 Oct 2009 04:20:38 -0600 Cc: "hackers@FreeBSD.org" , "freebsd-usb@FreeBSD.org" Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 10:24:06 -0000 But there was no indication the device went missing on the console. And it wasn't until I unplugged it that da0 detached. Usually in the past when it has started throwing errors the console was chatty about why. Warner On Oct 26, 2009, at 2:59 AM, Hans Petter Selasky wrote: > On Monday 26 October 2009 01:05:03 non@ever.sanda.gr.jp wrote: >> M. Warner Losh wrote: >>> I have a usb stick (8GB) on it. This stick has about 5GB of junk on >>> it at this point. >>> >>> I tried to do 'cat * > /dev/null' recently, to measure how fast it >>> goes. It got about 1GB into the drive and then I got device missing >>> messages. >>> >>> So devfs thinks the device went missing: >> >> Warner-san, maybe it is caused by the hardware problem on the USB >> flash >> memory. Some chip on the memory might have too much heat when you >> access >> the memory at fast rate. Then it stops working. >> > > What happens if you read from two USB disks at the same time? > > If the device went missing the USB HUB signalled that. This is maybe > an > indication that the USB firmware on the device crashed. Maybe this > is due to > heat, or unhandled race conditions when the load goes high. > > Try using "dd" and vary the block size from 512 to 65536 bytes. Does > it stop > working with all block sizes over time? > > --HPS > > From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 10:44:17 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62604106568B; Mon, 26 Oct 2009 10:44:17 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay2.uni-muenster.de (ZIVM-EXRELAY2.UNI-MUENSTER.DE [128.176.192.15]) by mx1.freebsd.org (Postfix) with ESMTP id BB3A48FC18; Mon, 26 Oct 2009 10:44:16 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.44,625,1249250400"; d="scan'208";a="227243318" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay2.uni-muenster.de with ESMTP; 26 Oct 2009 11:44:14 +0100 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id BD7381B07BD; Mon, 26 Oct 2009 11:44:14 +0100 (CET) Date: Mon, 26 Oct 2009 11:44:14 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: , Ed Schouten Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, pluknet , Antony Mawer , Alexander Best , Dag-Erling Sm??rgrav , rafan@freebsd.org Subject: Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 10:44:17 -0000 Eygene Ryabinkin schrieb am 2009-10-24: > Ed, good day. > Fri, Oct 23, 2009 at 07:13:01PM +0200, Ed Schouten wrote: > > Have you sent it to Thomas Dickey as well? > Sent the patch to bug-ncurses@gnu.org. Do you think that I should > send it to Thomas directly as well? the patch got committed by thomas and is included in ncurses-5.7-20091024.patch.gz. i guess it will be included in our base version of ncurses once 5.8 gets released, but the patch should quickly make it into the port version of ncurses. alex From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 10:48:45 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2746F106566C for ; Mon, 26 Oct 2009 10:48:45 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id ABD0E8FC19 for ; Mon, 26 Oct 2009 10:48:44 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.44,625,1249250400"; d="scan'208";a="286492135" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 26 Oct 2009 11:48:43 +0100 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id 26D241B07BD; Mon, 26 Oct 2009 11:48:43 +0100 (CET) Date: Mon, 26 Oct 2009 11:48:42 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , Alexander Best Message-ID: In-Reply-To: <864opnbjt5.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Antony Mawer , freebsd-hackers@freebsd.org, pluknet Subject: Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 10:48:45 -0000 Dag-Erling Sm=F8rgrav schrieb am 2009-10-25: > Alexander Best writes: > > i just tried building ee under linux without using new_curse.c and > > linking the > > executable against ncurses. running the binary is showing the same > > problems > > with SIGWINCH. so if this is in fact caused by a ncurses bug the > > bug appears > > in linux ncurses too. > No surprise, it's the same as ours. > DES this was when we weren't sure if the problem was entirely ncurses-related= =2E could have also been that linux was including the ncurses patches which get released by thomas dickey every now and then. i'm not entirely sure but i think the version in the base dir we use is the unpatched 5.7 release of ncurses. alex From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 09:53:26 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C534B1065693 for ; Mon, 26 Oct 2009 09:53:26 +0000 (UTC) (envelope-from mail25@bzerk.org) Received: from ei.bzerk.org (tunnel490.ipv6.xs4all.nl [IPv6:2001:888:10:1ea::2]) by mx1.freebsd.org (Postfix) with ESMTP id 44EE88FC15 for ; Mon, 26 Oct 2009 09:53:25 +0000 (UTC) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.14.2/8.14.2) with ESMTP id n9Q9rIHh072849; Mon, 26 Oct 2009 10:53:18 +0100 (CET) (envelope-from mail25@bzerk.org) Received: (from bulk@localhost) by ei.bzerk.org (8.14.2/8.14.2/Submit) id n9Q9rHHv072848; Mon, 26 Oct 2009 10:53:17 +0100 (CET) (envelope-from mail25@bzerk.org) Date: Mon, 26 Oct 2009 10:53:17 +0100 From: Ruben de Groot To: ??????????????? ????????????????????? Message-ID: <20091026095317.GA72492@ei.bzerk.org> Mail-Followup-To: Ruben de Groot , ??????????????? ????????????????????? , freebsd-hackers@freebsd.org References: <20091026143639.13895c34kml7gmmf@webmail.tint.or.th> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091026143639.13895c34kml7gmmf@webmail.tint.or.th> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, J_CHICKENPOX_52, J_CHICKENPOX_53, J_CHICKENPOX_72, J_CHICKENPOX_83 autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on ei.bzerk.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (ei.bzerk.org [127.0.0.1]); Mon, 26 Oct 2009 10:53:23 +0100 (CET) X-Mailman-Approved-At: Mon, 26 Oct 2009 11:23:23 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: make release stop at Creating ISO imagess X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 09:53:26 -0000 On Mon, Oct 26, 2009 at 02:36:39PM +0700, ??????????????? ????????????????????? typed: > hi sirs, > > apologized me for disturbing this list but ireally have problem s. > i make my own release by follwoing document in releng articles. > > here is my command > > cd /usr/src/release > time make CHROOTDIR=/kaitag/KAITAG BUILDNAME=7.2-RELEASE \ > CVSROOT=/var/ftp/pub/ncvs RELEASETAG=RELENG_7_2_0_RELEASE \ > EXTSRCDIR=/usr/src EXTPORTSDIR=/usr/ports \ > DOC_LANG=en_US.ISO8859-1 NODOC=NO NOPORTS=NO \ > MAKE_DVD=YES MAKE_ISOS=YES CDROM=YES > RELEASEDISTFILES=/var/ftp/pub/distfiles \ > release > > the build process goes well but then fetching for cdrtools.tbz begin and > stop. > in my machine i have installed cdrtools and there is also mkisofs file > so i wonder why the script /usr/src/release/i386/mkisofsimages.sh > still fetching for cdrtools. Do you have the cdrtools.tbz package in /var/ftp/pub/distfiles ? Ruben From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 11:53:06 2009 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9BE6106566C; Mon, 26 Oct 2009 11:53:06 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A9DB78FC16; Mon, 26 Oct 2009 11:53:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9QBm5BM073716; Mon, 26 Oct 2009 05:48:06 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 26 Oct 2009 05:48:16 -0600 (MDT) Message-Id: <20091026.054816.1631944692.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200910260959.20772.hselasky@c2i.net> References: <20091025.133437.-1844000782.imp@bsdimp.com> <4AE4E7AF.8060103@ever.sanda.gr.jp> <200910260959.20772.hselasky@c2i.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 11:53:07 -0000 In message: <200910260959.20772.hselasky@c2i.net> Hans Petter Selasky writes: : On Monday 26 October 2009 01:05:03 non@ever.sanda.gr.jp wrote: : > M. Warner Losh wrote: : > > I have a usb stick (8GB) on it. This stick has about 5GB of junk on : > > it at this point. : > > : > > I tried to do 'cat * > /dev/null' recently, to measure how fast it : > > goes. It got about 1GB into the drive and then I got device missing : > > messages. : > > : > > So devfs thinks the device went missing: : > : > Warner-san, maybe it is caused by the hardware problem on the USB flash : > memory. Some chip on the memory might have too much heat when you access : > the memory at fast rate. Then it stops working. : > : : What happens if you read from two USB disks at the same time? I know that the august 25th version failed badly when I tried to burn DVDs from a USB drive to a USB attached DVD burner. This used to work flawlessly. : If the device went missing the USB HUB signalled that. This is maybe an : indication that the USB firmware on the device crashed. Maybe this is due to : heat, or unhandled race conditions when the load goes high. This same flash drive will do 20MB sustained on windows without a glitch using similar commands. : Try using "dd" and vary the block size from 512 to 65536 bytes. Does it stop : working with all block sizes over time? Once I get the message I posted, it is lights out for da0. No further access to the drive works at all. Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 11:55:48 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACB4C1065670; Mon, 26 Oct 2009 11:55:48 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6A6B08FC19; Mon, 26 Oct 2009 11:55:48 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 477C16D41C; Mon, 26 Oct 2009 11:55:47 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 1E8D784531; Mon, 26 Oct 2009 12:55:47 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexander Best References: Date: Mon, 26 Oct 2009 12:55:47 +0100 In-Reply-To: (Alexander Best's message of "Mon, 26 Oct 2009 11:44:14 +0100 (CET)") Message-ID: <86d44ae5do.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Ed Schouten , freebsd-hackers@freebsd.org, pluknet , Antony Mawer , rafan@freebsd.org Subject: Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 11:55:48 -0000 Alexander Best writes: > the patch got committed by thomas and is included in > ncurses-5.7-20091024.patch.gz. > > i guess it will be included in our base version of ncurses once 5.8 gets > released, but the patch should quickly make it into the port version of > ncurses. Apply the upstream patch to vendor/ncurses/dist and merge it to head. Subversion will DTRT when you import 5.8. I believe this is documented on the wiki. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 11:59:04 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BFA21065676; Mon, 26 Oct 2009 11:59:04 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swip.net [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id 5CF4E8FC14; Mon, 26 Oct 2009 11:59:03 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6I5d2MoRAAAA:8 a=PEEIPXG6Kie0Q3JipUQA:9 a=pcdJqTGO6B4e4WsLKrQA:7 a=wnGM74qd3Zx-FWR6fS1zX22_RE0A:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 574870506; Mon, 26 Oct 2009 12:59:00 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Mon, 26 Oct 2009 12:58:07 +0100 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <20091025.133437.-1844000782.imp@bsdimp.com> <200910260959.20772.hselasky@c2i.net> <20091026.054816.1631944692.imp@bsdimp.com> In-Reply-To: <20091026.054816.1631944692.imp@bsdimp.com> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpO< =?iso-8859-1?q?Q0yAl=7E=3F=60=27F=3FjDVb=5DE6TQ7=27=23h-VlLs=7Dk/=0A=09?=(yxg(p!IL.`#ng"%`BMrham7%UK,}VH\wUOm=^>wEEQ+KWt[{J#x6ow~JO:,zwp.(t; @ =?iso-8859-1?q?Aq=0A=09=3A4=3A=26nFCgDb8=5B3oIeTb=5E=27?=",; u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910261258.08135.hselasky@c2i.net> Cc: hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 11:59:04 -0000 On Monday 26 October 2009 12:48:16 M. Warner Losh wrote: > I know that the august 25th version failed badly when I tried to burn > DVDs from a USB drive to a USB attached DVD burner. This used to work > flawlessly. Hi, There has been a recent fix to the EHCI driver, which might affect Mass Storage when short transfers are used. Also someone else has pointed out that certain VIA chipsets have an IRQ "bug" requiring the need for a software callout to restart the EHCI interrupt handler. This is not yet patched, hence I don't know if this is a real issue. http://svn.freebsd.org/viewvc/base?view=revision&revision=197682 Is your code from after 1st of October? --HPS From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 12:00:18 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FBD410656D3; Mon, 26 Oct 2009 12:00:17 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id 016118FC1C; Mon, 26 Oct 2009 12:00:16 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=8kQB0OdkAAAA:8 a=q02k-IL2iHknV7lpj6wA:9 a=CTJmsshOts1pr3bfzFYA:7 a=SZhWY9R5uFYAFvjjvwsRqqgiwfIA:4 a=9aOQ2cSd83gA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 266468916; Mon, 26 Oct 2009 13:00:15 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Mon, 26 Oct 2009 12:59:23 +0100 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <20091025.133437.-1844000782.imp@bsdimp.com> <200910260959.20772.hselasky@c2i.net> <20091026.054816.1631944692.imp@bsdimp.com> In-Reply-To: <20091026.054816.1631944692.imp@bsdimp.com> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910261259.23500.hselasky@c2i.net> Cc: hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 12:00:18 -0000 On Monday 26 October 2009 12:48:16 M. Warner Losh wrote: > In message: <200910260959.20772.hselasky@c2i.net> > > Hans Petter Selasky writes: > : On Monday 26 October 2009 01:05:03 non@ever.sanda.gr.jp wrote: > : > M. Warner Losh wrote: > : > > I have a usb stick (8GB) on it. This stick has about 5GB of junk on > : > > it at this point. > : > > > : > > I tried to do 'cat * > /dev/null' recently, to measure how fast it > : > > goes. It got about 1GB into the drive and then I got device missing > : > > messages. > : > > > : > > So devfs thinks the device went missing: > : > > : > Warner-san, maybe it is caused by the hardware problem on the USB flash > : > memory. Some chip on the memory might have too much heat when you > : > access the memory at fast rate. Then it stops working. > : > : What happens if you read from two USB disks at the same time? > > I know that the august 25th version failed badly when I tried to burn > DVDs from a USB drive to a USB attached DVD burner. This used to work > flawlessly. > > : If the device went missing the USB HUB signalled that. This is maybe an > : indication that the USB firmware on the device crashed. Maybe this is due > : to heat, or unhandled race conditions when the load goes high. > > This same flash drive will do 20MB sustained on windows without a > glitch using similar commands. > > : Try using "dd" and vary the block size from 512 to 65536 bytes. Does it > : stop working with all block sizes over time? > > Once I get the message I posted, it is lights out for da0. No further > access to the drive works at all. > Make sure your driver has got sufficiently enough power, if powered over USB. --HPS From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 12:00:18 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FBD410656D3; Mon, 26 Oct 2009 12:00:17 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id 016118FC1C; Mon, 26 Oct 2009 12:00:16 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=8kQB0OdkAAAA:8 a=q02k-IL2iHknV7lpj6wA:9 a=CTJmsshOts1pr3bfzFYA:7 a=SZhWY9R5uFYAFvjjvwsRqqgiwfIA:4 a=9aOQ2cSd83gA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 266468916; Mon, 26 Oct 2009 13:00:15 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Mon, 26 Oct 2009 12:59:23 +0100 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <20091025.133437.-1844000782.imp@bsdimp.com> <200910260959.20772.hselasky@c2i.net> <20091026.054816.1631944692.imp@bsdimp.com> In-Reply-To: <20091026.054816.1631944692.imp@bsdimp.com> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910261259.23500.hselasky@c2i.net> Cc: hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 12:00:18 -0000 On Monday 26 October 2009 12:48:16 M. Warner Losh wrote: > In message: <200910260959.20772.hselasky@c2i.net> > > Hans Petter Selasky writes: > : On Monday 26 October 2009 01:05:03 non@ever.sanda.gr.jp wrote: > : > M. Warner Losh wrote: > : > > I have a usb stick (8GB) on it. This stick has about 5GB of junk on > : > > it at this point. > : > > > : > > I tried to do 'cat * > /dev/null' recently, to measure how fast it > : > > goes. It got about 1GB into the drive and then I got device missing > : > > messages. > : > > > : > > So devfs thinks the device went missing: > : > > : > Warner-san, maybe it is caused by the hardware problem on the USB flash > : > memory. Some chip on the memory might have too much heat when you > : > access the memory at fast rate. Then it stops working. > : > : What happens if you read from two USB disks at the same time? > > I know that the august 25th version failed badly when I tried to burn > DVDs from a USB drive to a USB attached DVD burner. This used to work > flawlessly. > > : If the device went missing the USB HUB signalled that. This is maybe an > : indication that the USB firmware on the device crashed. Maybe this is due > : to heat, or unhandled race conditions when the load goes high. > > This same flash drive will do 20MB sustained on windows without a > glitch using similar commands. > > : Try using "dd" and vary the block size from 512 to 65536 bytes. Does it > : stop working with all block sizes over time? > > Once I get the message I posted, it is lights out for da0. No further > access to the drive works at all. > Make sure your driver has got sufficiently enough power, if powered over USB. --HPS From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 12:10:36 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3269A106568F for ; Mon, 26 Oct 2009 12:10:36 +0000 (UTC) (envelope-from rafan@svm.csie.ntu.edu.tw) Received: from svm.csie.ntu.edu.tw (svm.csie.ntu.edu.tw [140.112.90.75]) by mx1.freebsd.org (Postfix) with ESMTP id C1F7B8FC08 for ; Mon, 26 Oct 2009 12:10:35 +0000 (UTC) Received: from svm.csie.ntu.edu.tw (localhost [127.0.0.1]) by svm.csie.ntu.edu.tw (8.14.3/8.14.3) with ESMTP id n9QBe4dm096223; Mon, 26 Oct 2009 19:40:04 +0800 (CST) (envelope-from rafan@svm.csie.ntu.edu.tw) Received: (from rafan@localhost) by svm.csie.ntu.edu.tw (8.14.3/8.14.3/Submit) id n9QBe4M3059110; Mon, 26 Oct 2009 19:40:04 +0800 (CST) (envelope-from rafan) Date: Mon, 26 Oct 2009 19:40:04 +0800 From: Rong-En Fan To: Alexander Best Message-ID: <20091026114004.GT79043@svm.csie.ntu.edu.tw> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8S8xwCNhfXjuHwS7" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Ed Schouten , freebsd-hackers@FreeBSD.ORG, pluknet , Antony Mawer , Dag-Erling Sm??rgrav , rafan@FreeBSD.ORG Subject: Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 12:10:36 -0000 --8S8xwCNhfXjuHwS7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 26, 2009 at 11:44:14AM +0100, Alexander Best wrote: > Eygene Ryabinkin schrieb am 2009-10-24: > > Ed, good day. >=20 > > Fri, Oct 23, 2009 at 07:13:01PM +0200, Ed Schouten wrote: > > > Have you sent it to Thomas Dickey as well? >=20 > > Sent the patch to bug-ncurses@gnu.org. Do you think that I should > > send it to Thomas directly as well? >=20 > the patch got committed by thomas and is included in > ncurses-5.7-20091024.patch.gz. >=20 > i guess it will be included in our base version of ncurses once 5.8 gets > released, but the patch should quickly make it into the port version of > ncurses. devel/ncurses-devel will be updated this week. For base's ncurses, I'll check with Thomas Dickey to see if there will be 5.8 soon. If not, we can also import a recent snapshot. Thanks, Rong-En Fan --8S8xwCNhfXjuHwS7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iEYEARECAAYFAkrlipMACgkQ144QkYb9jGjdswCghfM3OEX+tuIxZm+RyLnQ19/e H6kAnir92yxdzUY4NxDb3XftAYvYwE4C =/1IR -----END PGP SIGNATURE----- --8S8xwCNhfXjuHwS7-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 12:57:28 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D46DA1065693; Mon, 26 Oct 2009 12:57:28 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 928FD8FC12; Mon, 26 Oct 2009 12:57:28 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 7CE566D41C; Mon, 26 Oct 2009 12:57:27 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 53B2E844CC; Mon, 26 Oct 2009 13:57:27 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Rong-En Fan References: <20091026114004.GT79043@svm.csie.ntu.edu.tw> Date: Mon, 26 Oct 2009 13:57:27 +0100 In-Reply-To: <20091026114004.GT79043@svm.csie.ntu.edu.tw> (Rong-En Fan's message of "Mon, 26 Oct 2009 19:40:04 +0800") Message-ID: <86zl7ecnyg.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Antony Mawer , Ed Schouten , Alexander Best , pluknet , freebsd-hackers@FreeBSD.ORG Subject: Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 12:57:28 -0000 Rong-En Fan writes: > devel/ncurses-devel will be updated this week. For base's ncurses, I'll > check with Thomas Dickey to see if there will be 5.8 soon. If not, we > can also import a recent snapshot. There is no reason to wait, nor to import an entire snapshot. Se my earlier message to Alexander. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 12:59:04 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCB1D106568B for ; Mon, 26 Oct 2009 12:59:04 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swip.net [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id 4EF7D8FC15 for ; Mon, 26 Oct 2009 12:59:03 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6I5d2MoRAAAA:8 a=PEEIPXG6Kie0Q3JipUQA:9 a=pcdJqTGO6B4e4WsLKrQA:7 a=wnGM74qd3Zx-FWR6fS1zX22_RE0A:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 574870506; Mon, 26 Oct 2009 12:59:00 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Mon, 26 Oct 2009 12:58:07 +0100 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <20091025.133437.-1844000782.imp@bsdimp.com> <200910260959.20772.hselasky@c2i.net> <20091026.054816.1631944692.imp@bsdimp.com> In-Reply-To: <20091026.054816.1631944692.imp@bsdimp.com> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpO< =?iso-8859-1?q?Q0yAl=7E=3F=60=27F=3FjDVb=5DE6TQ7=27=23h-VlLs=7Dk/=0A=09?=(yxg(p!IL.`#ng"%`BMrham7%UK,}VH\wUOm=^>wEEQ+KWt[{J#x6ow~JO:,zwp.(t; @ =?iso-8859-1?q?Aq=0A=09=3A4=3A=26nFCgDb8=5B3oIeTb=5E=27?=",; u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910261258.08135.hselasky@c2i.net> Cc: hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 12:59:04 -0000 On Monday 26 October 2009 12:48:16 M. Warner Losh wrote: > I know that the august 25th version failed badly when I tried to burn > DVDs from a USB drive to a USB attached DVD burner. This used to work > flawlessly. Hi, There has been a recent fix to the EHCI driver, which might affect Mass Storage when short transfers are used. Also someone else has pointed out that certain VIA chipsets have an IRQ "bug" requiring the need for a software callout to restart the EHCI interrupt handler. This is not yet patched, hence I don't know if this is a real issue. http://svn.freebsd.org/viewvc/base?view=revision&revision=197682 Is your code from after 1st of October? --HPS From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 13:08:43 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E840106566B; Mon, 26 Oct 2009 13:08:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id F37E08FC0A; Mon, 26 Oct 2009 13:08:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9QD160I074342; Mon, 26 Oct 2009 07:01:07 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 26 Oct 2009 07:01:17 -0600 (MDT) Message-Id: <20091026.070117.439503022.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200910261258.08135.hselasky@c2i.net> References: <200910260959.20772.hselasky@c2i.net> <20091026.054816.1631944692.imp@bsdimp.com> <200910261258.08135.hselasky@c2i.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, hackers@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 13:08:43 -0000 In message: <200910261258.08135.hselasky@c2i.net> Hans Petter Selasky writes: : On Monday 26 October 2009 12:48:16 M. Warner Losh wrote: : > I know that the august 25th version failed badly when I tried to burn : > DVDs from a USB drive to a USB attached DVD burner. This used to work : > flawlessly. : : Hi, : : There has been a recent fix to the EHCI driver, which might affect Mass : Storage when short transfers are used. : : Also someone else has pointed out that certain VIA chipsets have an IRQ "bug" : requiring the need for a software callout to restart the EHCI interrupt : handler. This is not yet patched, hence I don't know if this is a real issue. : : http://svn.freebsd.org/viewvc/base?view=revision&revision=197682 : : Is your code from after 1st of October? This code is from: FreeBSD lighthouse 9.0-CURRENT FreeBSD 9.0-CURRENT #41 r185338:198411M: Fri Oct 23 10:08:48 MDT 2009 imp@lighthouse:/cache/svn/head/sys/amd64/compile/LIGHTHOUSE amd64 so it would have r197682 baked in (the first number in my rev string is a mystery to me). Re another post: This is a 8GB flash, so I'm sure that there's enough power. Looking at the dmesg, this happend the second or third time I'd plugged in this flash drive. Here's a partial dmesg for usb things: CPU: AMD Turion(tm) 64 Mobile Technology ML-37 (1994.21-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x20f42 Stepping = 2 Features=0x78bfbff Features2=0x1 AMD Features=0xe2500800 AMD Features2=0x1 real memory = 2147483648 (2048 MB) avail memory = 2059546624 (1964 MB) ACPI APIC Table: MADT: Forcing active-low polarity and level trigger for SCI ioapic0 irqs 0-23 on motherboard ... pcib2: at device 5.0 on pci0 pci2: on pcib2 ohci0: mem 0xc0000000-0xc0000fff irq 19 at device 19.0 on pci0 Activate PA 0xc0000000 at VA 0xffffff00c0000000 ohci0: [ITHREAD] usbus0: on ohci0 ohci1: mem 0xc0001000-0xc0001fff irq 19 at device 19.1 on pci0 Activate PA 0xc0001000 at VA 0xffffff00c0001000 ohci1: [ITHREAD] usbus1: on ohci1 ehci0: mem 0xc0002000-0xc0002fff irq 19 at device 19.2 on pci0 Activate PA 0xc0002000 at VA 0xffffff00c0002000 ehci0: [ITHREAD] usbus2: EHCI version 1.0 usbus2: on ehci0 ... Timecounter "TSC" frequency 1994209008 Hz quality 800 Timecounters tick every 1.000 msec usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 480Mbps High Speed USB v2.0 Status is 0x30000106 ata0-master: pio=PIO4 wdma=WDMA2 udma=UDMA100 cable=80 wire Activate i/o 0x8014 Activate i/o 0x8015 ugen0.1: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ugen2.1: at usbus2 uhub2: on usbus2 ad0: 114473MB at ata0-master UDMA100 GEOM: ad0s2: geometry does not match label (255h,63s != 16h,63s). uhub0: 4 ports with 4 removable, self powered uhub1: 4 ports with 4 removable, self powered ... Root mount waiting for: usbus2 uhub2: 8 ports with 8 removable, self powered Root mount waiting for: usbus2 Trying to mount root from ufs:/dev/ad0s2a ugen0.2: at usbus0 ubt0: on usbus0 usb_alloc_device:1635: getting device descriptor at addr 2 failed, USB_ERR_TIMEOUT! ugen2.2: at usbus2 umass0: on usbus2 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:2:0:-1: Attached to scbus2 (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0 (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed (probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data) da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) ugen2.2: at usbus2 (disconnected) umass0: at uhub2, port 6, addr 2 (disconnected) (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): Invalidating pack g_vfs_done():da0s1[READ(offset=5298202624, length=65536)]error = 6 g_vfs_done():da0s1[READ(offset=5298268160, length=65536)]error = 6 g_vfs_done():da0s1[READ(offset=5298333696, length=65536)]error = 6 g_vfs_done():da0s1[WRITE(offset=1976320, length=32768)]error = 6 g_vfs_done():da0s1[READ(offset=5298137088, length=65536)]error = 6 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0xa, scsi status == 0x0 (da0:umass-sim0:0:0:0): removing device entry ugen2.2: at usbus2 can't re-use a leaf (%desc)! can't re-use a leaf (%driver)! can't re-use a leaf (%location)! can't re-use a leaf (%pnpinfo)! can't re-use a leaf (%parent)! umass0: on usbus2 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:2:0:-1: Attached to scbus2 da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) ugen2.2: at usbus2 (disconnected) umass0: at uhub2, port 6, addr 2 (disconnected) (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): removing device entry ugen2.2: at usbus2 can't re-use a leaf (%desc)! can't re-use a leaf (%driver)! can't re-use a leaf (%location)! can't re-use a leaf (%pnpinfo)! can't re-use a leaf (%parent)! umass0: on usbus2 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:2:0:-1: Attached to scbus2 (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0 (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed (probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data) da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) ugen1.2: at usbus1 ugen2.2: at usbus2 (disconnected) umass0: at uhub2, port 1, addr 2 (disconnected) (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): Invalidating pack g_vfs_done():da0s1[READ(offset=634398720, length=65536)]error = 6 g_vfs_done():da0s1[READ(offset=634464256, length=65536)]error = 6 g_vfs_done():da0s1[READ(offset=634529792, length=65536)]error = 6 g_vfs_done():da0s1[WRITE(offset=1976320, length=32768)]error = 6 g_vfs_done():da0s1[READ(offset=634333184, length=65536)]error = 6 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0xa, scsi status == 0x0 (da0:umass-sim0:0:0:0): removing device entry ugen2.2: at usbus2 can't re-use a leaf (%desc)! can't re-use a leaf (%driver)! can't re-use a leaf (%location)! can't re-use a leaf (%pnpinfo)! can't re-use a leaf (%parent)! umass0: on usbus2 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:2:0:-1: Attached to scbus2 da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) Device da0s1 went missing before all of the data could be written to it; expect data loss. ugen2.2: at usbus2 (disconnected) umass0: at uhub2, port 1, addr 2 (disconnected) (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): removing device entry pcm0: mem 0xc0003400-0xc00034ff irq 17 at device 20.5 on pci0 Activate PA 0xc0003400 at VA 0xffffff00c0003400 pcm0: [ITHREAD] pcm0: ugen1.2: at usbus1 (disconnected) ugen1.2: at usbus1 ugen1.2: at usbus1 (disconnected) From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 13:08:43 2009 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E840106566B; Mon, 26 Oct 2009 13:08:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id F37E08FC0A; Mon, 26 Oct 2009 13:08:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9QD160I074342; Mon, 26 Oct 2009 07:01:07 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 26 Oct 2009 07:01:17 -0600 (MDT) Message-Id: <20091026.070117.439503022.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200910261258.08135.hselasky@c2i.net> References: <200910260959.20772.hselasky@c2i.net> <20091026.054816.1631944692.imp@bsdimp.com> <200910261258.08135.hselasky@c2i.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, hackers@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 13:08:43 -0000 In message: <200910261258.08135.hselasky@c2i.net> Hans Petter Selasky writes: : On Monday 26 October 2009 12:48:16 M. Warner Losh wrote: : > I know that the august 25th version failed badly when I tried to burn : > DVDs from a USB drive to a USB attached DVD burner. This used to work : > flawlessly. : : Hi, : : There has been a recent fix to the EHCI driver, which might affect Mass : Storage when short transfers are used. : : Also someone else has pointed out that certain VIA chipsets have an IRQ "bug" : requiring the need for a software callout to restart the EHCI interrupt : handler. This is not yet patched, hence I don't know if this is a real issue. : : http://svn.freebsd.org/viewvc/base?view=revision&revision=197682 : : Is your code from after 1st of October? This code is from: FreeBSD lighthouse 9.0-CURRENT FreeBSD 9.0-CURRENT #41 r185338:198411M: Fri Oct 23 10:08:48 MDT 2009 imp@lighthouse:/cache/svn/head/sys/amd64/compile/LIGHTHOUSE amd64 so it would have r197682 baked in (the first number in my rev string is a mystery to me). Re another post: This is a 8GB flash, so I'm sure that there's enough power. Looking at the dmesg, this happend the second or third time I'd plugged in this flash drive. Here's a partial dmesg for usb things: CPU: AMD Turion(tm) 64 Mobile Technology ML-37 (1994.21-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x20f42 Stepping = 2 Features=0x78bfbff Features2=0x1 AMD Features=0xe2500800 AMD Features2=0x1 real memory = 2147483648 (2048 MB) avail memory = 2059546624 (1964 MB) ACPI APIC Table: MADT: Forcing active-low polarity and level trigger for SCI ioapic0 irqs 0-23 on motherboard ... pcib2: at device 5.0 on pci0 pci2: on pcib2 ohci0: mem 0xc0000000-0xc0000fff irq 19 at device 19.0 on pci0 Activate PA 0xc0000000 at VA 0xffffff00c0000000 ohci0: [ITHREAD] usbus0: on ohci0 ohci1: mem 0xc0001000-0xc0001fff irq 19 at device 19.1 on pci0 Activate PA 0xc0001000 at VA 0xffffff00c0001000 ohci1: [ITHREAD] usbus1: on ohci1 ehci0: mem 0xc0002000-0xc0002fff irq 19 at device 19.2 on pci0 Activate PA 0xc0002000 at VA 0xffffff00c0002000 ehci0: [ITHREAD] usbus2: EHCI version 1.0 usbus2: on ehci0 ... Timecounter "TSC" frequency 1994209008 Hz quality 800 Timecounters tick every 1.000 msec usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 480Mbps High Speed USB v2.0 Status is 0x30000106 ata0-master: pio=PIO4 wdma=WDMA2 udma=UDMA100 cable=80 wire Activate i/o 0x8014 Activate i/o 0x8015 ugen0.1: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ugen2.1: at usbus2 uhub2: on usbus2 ad0: 114473MB at ata0-master UDMA100 GEOM: ad0s2: geometry does not match label (255h,63s != 16h,63s). uhub0: 4 ports with 4 removable, self powered uhub1: 4 ports with 4 removable, self powered ... Root mount waiting for: usbus2 uhub2: 8 ports with 8 removable, self powered Root mount waiting for: usbus2 Trying to mount root from ufs:/dev/ad0s2a ugen0.2: at usbus0 ubt0: on usbus0 usb_alloc_device:1635: getting device descriptor at addr 2 failed, USB_ERR_TIMEOUT! ugen2.2: at usbus2 umass0: on usbus2 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:2:0:-1: Attached to scbus2 (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0 (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed (probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data) da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) ugen2.2: at usbus2 (disconnected) umass0: at uhub2, port 6, addr 2 (disconnected) (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): Invalidating pack g_vfs_done():da0s1[READ(offset=5298202624, length=65536)]error = 6 g_vfs_done():da0s1[READ(offset=5298268160, length=65536)]error = 6 g_vfs_done():da0s1[READ(offset=5298333696, length=65536)]error = 6 g_vfs_done():da0s1[WRITE(offset=1976320, length=32768)]error = 6 g_vfs_done():da0s1[READ(offset=5298137088, length=65536)]error = 6 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0xa, scsi status == 0x0 (da0:umass-sim0:0:0:0): removing device entry ugen2.2: at usbus2 can't re-use a leaf (%desc)! can't re-use a leaf (%driver)! can't re-use a leaf (%location)! can't re-use a leaf (%pnpinfo)! can't re-use a leaf (%parent)! umass0: on usbus2 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:2:0:-1: Attached to scbus2 da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) ugen2.2: at usbus2 (disconnected) umass0: at uhub2, port 6, addr 2 (disconnected) (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): removing device entry ugen2.2: at usbus2 can't re-use a leaf (%desc)! can't re-use a leaf (%driver)! can't re-use a leaf (%location)! can't re-use a leaf (%pnpinfo)! can't re-use a leaf (%parent)! umass0: on usbus2 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:2:0:-1: Attached to scbus2 (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0 (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed (probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data) da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) ugen1.2: at usbus1 ugen2.2: at usbus2 (disconnected) umass0: at uhub2, port 1, addr 2 (disconnected) (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): Invalidating pack g_vfs_done():da0s1[READ(offset=634398720, length=65536)]error = 6 g_vfs_done():da0s1[READ(offset=634464256, length=65536)]error = 6 g_vfs_done():da0s1[READ(offset=634529792, length=65536)]error = 6 g_vfs_done():da0s1[WRITE(offset=1976320, length=32768)]error = 6 g_vfs_done():da0s1[READ(offset=634333184, length=65536)]error = 6 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0xa, scsi status == 0x0 (da0:umass-sim0:0:0:0): removing device entry ugen2.2: at usbus2 can't re-use a leaf (%desc)! can't re-use a leaf (%driver)! can't re-use a leaf (%location)! can't re-use a leaf (%pnpinfo)! can't re-use a leaf (%parent)! umass0: on usbus2 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:2:0:-1: Attached to scbus2 da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) Device da0s1 went missing before all of the data could be written to it; expect data loss. ugen2.2: at usbus2 (disconnected) umass0: at uhub2, port 1, addr 2 (disconnected) (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): removing device entry pcm0: mem 0xc0003400-0xc00034ff irq 17 at device 20.5 on pci0 Activate PA 0xc0003400 at VA 0xffffff00c0003400 pcm0: [ITHREAD] pcm0: ugen1.2: at usbus1 (disconnected) ugen1.2: at usbus1 ugen1.2: at usbus1 (disconnected) From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 13:13:33 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B968C106566B; Mon, 26 Oct 2009 13:13:33 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id D3B978FC13; Mon, 26 Oct 2009 13:13:32 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=8kQB0OdkAAAA:8 a=6I5d2MoRAAAA:8 a=6eClurgNXmmwUntNnPEA:9 a=a71AFeG_fZkDGz8ZqYAA:7 a=qYbAdOajlkFMhfmy0cX38eSLC1IA:4 a=9aOQ2cSd83gA:10 a=DQ0VqSu7VckfCXhe:21 a=frsS6xcXOKK5DfJV:21 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1317016878; Mon, 26 Oct 2009 14:13:30 +0100 From: Hans Petter Selasky To: "M. Warner Losh" Date: Mon, 26 Oct 2009 14:12:38 +0100 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <200910260959.20772.hselasky@c2i.net> <200910261258.08135.hselasky@c2i.net> <20091026.070117.439503022.imp@bsdimp.com> In-Reply-To: <20091026.070117.439503022.imp@bsdimp.com> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910261412.38685.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 13:13:33 -0000 On Monday 26 October 2009 14:01:17 M. Warner Losh wrote: > In message: <200910261258.08135.hselasky@c2i.net> > > Hans Petter Selasky writes: > : On Monday 26 October 2009 12:48:16 M. Warner Losh wrote: > : > I know that the august 25th version failed badly when I tried to burn > : > DVDs from a USB drive to a USB attached DVD burner. This used to work > : > flawlessly. > : > : Hi, > : > : There has been a recent fix to the EHCI driver, which might affect Mass > : Storage when short transfers are used. > : > : Also someone else has pointed out that certain VIA chipsets have an IRQ > : "bug" requiring the need for a software callout to restart the EHCI > : interrupt handler. This is not yet patched, hence I don't know if this is > : a real issue. > : > : http://svn.freebsd.org/viewvc/base?view=revision&revision=197682 > : > : Is your code from after 1st of October? > > This code is from: > > FreeBSD lighthouse 9.0-CURRENT FreeBSD 9.0-CURRENT #41 r185338:198411M: Fri > Oct 23 10:08:48 MDT 2009 > imp@lighthouse:/cache/svn/head/sys/amd64/compile/LIGHTHOUSE amd64 > > so it would have r197682 baked in (the first number in my rev string > is a mystery to me). > > Re another post: This is a 8GB flash, so I'm sure that there's enough > power. > > Looking at the dmesg, this happend the second or third time I'd > plugged in this flash drive. > > Here's a partial dmesg for usb things: > > CPU: AMD Turion(tm) 64 Mobile Technology ML-37 (1994.21-MHz K8-class CPU) > Origin = "AuthenticAMD" Id = 0x20f42 Stepping = 2 > > Features=0x78bfbff,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2> Features2=0x1 > AMD Features=0xe2500800 > AMD Features2=0x1 > real memory = 2147483648 (2048 MB) > avail memory = 2059546624 (1964 MB) > ACPI APIC Table: > MADT: Forcing active-low polarity and level trigger for SCI > ioapic0 irqs 0-23 on motherboard > ... > pcib2: at device 5.0 on pci0 > pci2: on pcib2 > ohci0: mem 0xc0000000-0xc0000fff irq 19 at > device 19.0 on pci0 Activate PA 0xc0000000 at VA 0xffffff00c0000000 > ohci0: [ITHREAD] > usbus0: on ohci0 > ohci1: mem 0xc0001000-0xc0001fff irq 19 at > device 19.1 on pci0 Activate PA 0xc0001000 at VA 0xffffff00c0001000 > ohci1: [ITHREAD] > usbus1: on ohci1 > ehci0: mem 0xc0002000-0xc0002fff irq 19 at > device 19.2 on pci0 Activate PA 0xc0002000 at VA 0xffffff00c0002000 > ehci0: [ITHREAD] > usbus2: EHCI version 1.0 > usbus2: on ehci0 > ... > Timecounter "TSC" frequency 1994209008 Hz quality 800 > Timecounters tick every 1.000 msec > usbus0: 12Mbps Full Speed USB v1.0 > usbus1: 12Mbps Full Speed USB v1.0 > usbus2: 480Mbps High Speed USB v2.0 > Status is 0x30000106 > ata0-master: pio=PIO4 wdma=WDMA2 udma=UDMA100 cable=80 wire > Activate i/o 0x8014 > Activate i/o 0x8015 > ugen0.1: at usbus0 > uhub0: on usbus0 > ugen1.1: at usbus1 > uhub1: on usbus1 > ugen2.1: at usbus2 > uhub2: on usbus2 > ad0: 114473MB at ata0-master UDMA100 > GEOM: ad0s2: geometry does not match label (255h,63s != 16h,63s). > uhub0: 4 ports with 4 removable, self powered > uhub1: 4 ports with 4 removable, self powered > ... > Root mount waiting for: usbus2 > uhub2: 8 ports with 8 removable, self powered > Root mount waiting for: usbus2 > Trying to mount root from ufs:/dev/ad0s2a > ugen0.2: at usbus0 > ubt0: 2> on usbus0 usb_alloc_device:1635: getting device descriptor at addr 2 > failed, USB_ERR_TIMEOUT! ugen2.2: at usbus2 > umass0: on usbus2 > umass0: SCSI over Bulk-Only; quirks = 0x0000 > umass0:2:0:-1: Attached to scbus2 > (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 > (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error > (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition > (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0 > (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have > changed (probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data) > da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 > da0: Removable Direct Access SCSI-0 device > da0: 40.000MB/s transfers > da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) > ugen2.2: at usbus2 (disconnected) > umass0: at uhub2, port 6, addr 2 (disconnected) > (da0:umass-sim0:0:0:0): lost device > (da0:umass-sim0:0:0:0): Invalidating pack > g_vfs_done():da0s1[READ(offset=5298202624, length=65536)]error = 6 > g_vfs_done():da0s1[READ(offset=5298268160, length=65536)]error = 6 > g_vfs_done():da0s1[READ(offset=5298333696, length=65536)]error = 6 > g_vfs_done():da0s1[WRITE(offset=1976320, length=32768)]error = 6 > g_vfs_done():da0s1[READ(offset=5298137088, length=65536)]error = 6 > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0xa, scsi > status == 0x0 (da0:umass-sim0:0:0:0): removing device entry > ugen2.2: at usbus2 > can't re-use a leaf (%desc)! > can't re-use a leaf (%driver)! > can't re-use a leaf (%location)! > can't re-use a leaf (%pnpinfo)! > can't re-use a leaf (%parent)! > umass0: on usbus2 > umass0: SCSI over Bulk-Only; quirks = 0x0000 > umass0:2:0:-1: Attached to scbus2 > da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 > da0: Removable Direct Access SCSI-0 device > da0: 40.000MB/s transfers > da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) > ugen2.2: at usbus2 (disconnected) > umass0: at uhub2, port 6, addr 2 (disconnected) > (da0:umass-sim0:0:0:0): lost device > (da0:umass-sim0:0:0:0): removing device entry > ugen2.2: at usbus2 > can't re-use a leaf (%desc)! > can't re-use a leaf (%driver)! > can't re-use a leaf (%location)! > can't re-use a leaf (%pnpinfo)! > can't re-use a leaf (%parent)! > umass0: on usbus2 > umass0: SCSI over Bulk-Only; quirks = 0x0000 > umass0:2:0:-1: Attached to scbus2 > (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 > (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error > (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition > (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0 > (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have > changed (probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data) > da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 > da0: Removable Direct Access SCSI-0 device > da0: 40.000MB/s transfers > da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) > ugen1.2: at usbus1 > ugen2.2: at usbus2 (disconnected) > umass0: at uhub2, port 1, addr 2 (disconnected) > (da0:umass-sim0:0:0:0): lost device > (da0:umass-sim0:0:0:0): Invalidating pack > g_vfs_done():da0s1[READ(offset=634398720, length=65536)]error = 6 > g_vfs_done():da0s1[READ(offset=634464256, length=65536)]error = 6 > g_vfs_done():da0s1[READ(offset=634529792, length=65536)]error = 6 > g_vfs_done():da0s1[WRITE(offset=1976320, length=32768)]error = 6 > g_vfs_done():da0s1[READ(offset=634333184, length=65536)]error = 6 > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0xa, scsi > status == 0x0 (da0:umass-sim0:0:0:0): removing device entry > ugen2.2: at usbus2 > can't re-use a leaf (%desc)! > can't re-use a leaf (%driver)! > can't re-use a leaf (%location)! > can't re-use a leaf (%pnpinfo)! > can't re-use a leaf (%parent)! > umass0: on usbus2 > umass0: SCSI over Bulk-Only; quirks = 0x0000 > umass0:2:0:-1: Attached to scbus2 > da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 > da0: Removable Direct Access SCSI-0 device > da0: 40.000MB/s transfers > da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C) > Device da0s1 went missing before all of the data could be written to it; > expect data loss. ugen2.2: at usbus2 (disconnected) > umass0: at uhub2, port 1, addr 2 (disconnected) > (da0:umass-sim0:0:0:0): lost device > (da0:umass-sim0:0:0:0): removing device entry > pcm0: mem 0xc0003400-0xc00034ff irq 17 at device 20.5 on pci0 > Activate PA 0xc0003400 at VA 0xffffff00c0003400 > pcm0: [ITHREAD] > pcm0: > ugen1.2: at usbus1 (disconnected) > ugen1.2: at usbus1 > ugen1.2: at usbus1 (disconnected) Hi, Just an experiment: usbconfig -u 2 -a 2 suspend Then try to access the device. Any difference? --HPS From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 13:26:25 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FBA1106566B; Mon, 26 Oct 2009 13:26:25 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id EE9838FC1B; Mon, 26 Oct 2009 13:26:24 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id F01826D41B; Mon, 26 Oct 2009 13:26:23 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id AD96984503; Mon, 26 Oct 2009 14:26:23 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "M. Warner Losh" References: <200910260959.20772.hselasky@c2i.net> <20091026.054816.1631944692.imp@bsdimp.com> <200910261258.08135.hselasky@c2i.net> <20091026.070117.439503022.imp@bsdimp.com> Date: Mon, 26 Oct 2009 14:26:23 +0100 In-Reply-To: <20091026.070117.439503022.imp@bsdimp.com> (M. Warner Losh's message of "Mon, 26 Oct 2009 07:01:17 -0600 (MDT)") Message-ID: <86skd6cmm8.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, hackers@FreeBSD.org, freebsd-usb@FreeBSD.org, hselasky@c2i.net Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 13:26:25 -0000 "M. Warner Losh" writes: > FreeBSD lighthouse 9.0-CURRENT FreeBSD 9.0-CURRENT #41 r185338:198411M: F= ri Oct 23 10:08:48 MDT 2009 imp@lighthouse:/cache/svn/head/sys/amd64/co= mpile/LIGHTHOUSE amd64 > > so it would have r197682 baked in (the first number in my rev string > is a mystery to me). It means you have an inconsistent tree. The first number is the oldest revision in your tree, the second is the newest, and the M means you have local modifications. > Re another post: This is a 8GB flash, so I'm sure that there's enough > power. Non sequitur. Bigger chips draw more power. Is it plugged directly into the computer? If not, is it plugged into a powered hub? How many other devices are connected to the computer or hub? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 13:26:25 2009 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FBA1106566B; Mon, 26 Oct 2009 13:26:25 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id EE9838FC1B; Mon, 26 Oct 2009 13:26:24 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id F01826D41B; Mon, 26 Oct 2009 13:26:23 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id AD96984503; Mon, 26 Oct 2009 14:26:23 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "M. Warner Losh" References: <200910260959.20772.hselasky@c2i.net> <20091026.054816.1631944692.imp@bsdimp.com> <200910261258.08135.hselasky@c2i.net> <20091026.070117.439503022.imp@bsdimp.com> Date: Mon, 26 Oct 2009 14:26:23 +0100 In-Reply-To: <20091026.070117.439503022.imp@bsdimp.com> (M. Warner Losh's message of "Mon, 26 Oct 2009 07:01:17 -0600 (MDT)") Message-ID: <86skd6cmm8.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, hackers@FreeBSD.org, freebsd-usb@FreeBSD.org, hselasky@c2i.net Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 13:26:25 -0000 "M. Warner Losh" writes: > FreeBSD lighthouse 9.0-CURRENT FreeBSD 9.0-CURRENT #41 r185338:198411M: F= ri Oct 23 10:08:48 MDT 2009 imp@lighthouse:/cache/svn/head/sys/amd64/co= mpile/LIGHTHOUSE amd64 > > so it would have r197682 baked in (the first number in my rev string > is a mystery to me). It means you have an inconsistent tree. The first number is the oldest revision in your tree, the second is the newest, and the M means you have local modifications. > Re another post: This is a 8GB flash, so I'm sure that there's enough > power. Non sequitur. Bigger chips draw more power. Is it plugged directly into the computer? If not, is it plugged into a powered hub? How many other devices are connected to the computer or hub? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 13:42:26 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BCFD1065676; Mon, 26 Oct 2009 13:42:26 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (unknown [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2B85E8FC24; Mon, 26 Oct 2009 13:42:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9QDbm1p074628; Mon, 26 Oct 2009 07:37:48 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 26 Oct 2009 07:37:59 -0600 (MDT) Message-Id: <20091026.073759.2130803790.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <86skd6cmm8.fsf@ds4.des.no> References: <200910261258.08135.hselasky@c2i.net> <20091026.070117.439503022.imp@bsdimp.com> <86skd6cmm8.fsf@ds4.des.no> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, hackers@FreeBSD.org, freebsd-usb@FreeBSD.org, hselasky@c2i.net Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 13:42:26 -0000 In message: <86skd6cmm8.fsf@ds4.des.no> Dag-Erling_Sm=F8rgrav writes: : "M. Warner Losh" writes: : > FreeBSD lighthouse 9.0-CURRENT FreeBSD 9.0-CURRENT #41 r185338:1984= 11M: Fri Oct 23 10:08:48 MDT 2009 imp@lighthouse:/cache/svn/head/sy= s/amd64/compile/LIGHTHOUSE amd64 : > : > so it would have r197682 baked in (the first number in my rev strin= g : > is a mystery to me). : = : It means you have an inconsistent tree. The first number is the olde= st : revision in your tree, the second is the newest, and the M means you : have local modifications. Yes. Of course I have local modifications, but none in the usb stack. But I've also done a svn update from the top of the tree multiple times and this version number persists. : > Re another post: This is a 8GB flash, so I'm sure that there's enou= gh : > power. : = : Non sequitur. Bigger chips draw more power. Is it plugged directly : into the computer? If not, is it plugged into a powered hub? How ma= ny : other devices are connected to the computer or hub? Not entirely. This flash has worked in this computer in the past without issues (like a year ago when we were first integrating hpsusb into the tree). This flash is plugged directly into the computer. This behavior is consistent across multiple ports on the computer (so it isn't a bad port). While this doesn't prove it isn't a power issue, the odds are stacked against it being one. If there were a way to get the internal hub to tell me how much power it can deliver, and for me to query the flash to see maximum current draws, we could see if we're close to the edge or not... Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 13:42:26 2009 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BCFD1065676; Mon, 26 Oct 2009 13:42:26 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (unknown [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2B85E8FC24; Mon, 26 Oct 2009 13:42:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9QDbm1p074628; Mon, 26 Oct 2009 07:37:48 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 26 Oct 2009 07:37:59 -0600 (MDT) Message-Id: <20091026.073759.2130803790.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <86skd6cmm8.fsf@ds4.des.no> References: <200910261258.08135.hselasky@c2i.net> <20091026.070117.439503022.imp@bsdimp.com> <86skd6cmm8.fsf@ds4.des.no> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, hackers@FreeBSD.org, freebsd-usb@FreeBSD.org, hselasky@c2i.net Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 13:42:26 -0000 In message: <86skd6cmm8.fsf@ds4.des.no> Dag-Erling_Sm=F8rgrav writes: : "M. Warner Losh" writes: : > FreeBSD lighthouse 9.0-CURRENT FreeBSD 9.0-CURRENT #41 r185338:1984= 11M: Fri Oct 23 10:08:48 MDT 2009 imp@lighthouse:/cache/svn/head/sy= s/amd64/compile/LIGHTHOUSE amd64 : > : > so it would have r197682 baked in (the first number in my rev strin= g : > is a mystery to me). : = : It means you have an inconsistent tree. The first number is the olde= st : revision in your tree, the second is the newest, and the M means you : have local modifications. Yes. Of course I have local modifications, but none in the usb stack. But I've also done a svn update from the top of the tree multiple times and this version number persists. : > Re another post: This is a 8GB flash, so I'm sure that there's enou= gh : > power. : = : Non sequitur. Bigger chips draw more power. Is it plugged directly : into the computer? If not, is it plugged into a powered hub? How ma= ny : other devices are connected to the computer or hub? Not entirely. This flash has worked in this computer in the past without issues (like a year ago when we were first integrating hpsusb into the tree). This flash is plugged directly into the computer. This behavior is consistent across multiple ports on the computer (so it isn't a bad port). While this doesn't prove it isn't a power issue, the odds are stacked against it being one. If there were a way to get the internal hub to tell me how much power it can deliver, and for me to query the flash to see maximum current draws, we could see if we're close to the edge or not... Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 14:01:20 2009 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABC511065693; Mon, 26 Oct 2009 14:01:20 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6AB208FC21; Mon, 26 Oct 2009 14:01:20 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 520E46D41C; Mon, 26 Oct 2009 14:01:19 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 236B784503; Mon, 26 Oct 2009 15:01:19 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "M. Warner Losh" References: <200910261258.08135.hselasky@c2i.net> <20091026.070117.439503022.imp@bsdimp.com> <86skd6cmm8.fsf@ds4.des.no> <20091026.073759.2130803790.imp@bsdimp.com> Date: Mon, 26 Oct 2009 15:01:19 +0100 In-Reply-To: <20091026.073759.2130803790.imp@bsdimp.com> (M. Warner Losh's message of "Mon, 26 Oct 2009 07:37:59 -0600 (MDT)") Message-ID: <86aazecl00.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, hackers@FreeBSD.org, freebsd-usb@FreeBSD.org, hselasky@c2i.net Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 14:01:20 -0000 "M. Warner Losh" writes: > Yes. Of course I have local modifications, but none in the usb stack. > But I've also done a svn update from the top of the tree multiple > times and this version number persists. Weird. r185338 was a commit to the old USB stack. Try to run svnversion in sys/dev/usb, and in an unrelated directory such as sys/conf. If there's a difference, run svn stat in sys/dev/usb and see if anything unexpected shows up. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 14:01:20 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABC511065693; Mon, 26 Oct 2009 14:01:20 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6AB208FC21; Mon, 26 Oct 2009 14:01:20 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 520E46D41C; Mon, 26 Oct 2009 14:01:19 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 236B784503; Mon, 26 Oct 2009 15:01:19 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "M. Warner Losh" References: <200910261258.08135.hselasky@c2i.net> <20091026.070117.439503022.imp@bsdimp.com> <86skd6cmm8.fsf@ds4.des.no> <20091026.073759.2130803790.imp@bsdimp.com> Date: Mon, 26 Oct 2009 15:01:19 +0100 In-Reply-To: <20091026.073759.2130803790.imp@bsdimp.com> (M. Warner Losh's message of "Mon, 26 Oct 2009 07:37:59 -0600 (MDT)") Message-ID: <86aazecl00.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, hackers@FreeBSD.org, freebsd-usb@FreeBSD.org, hselasky@c2i.net Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 14:01:20 -0000 "M. Warner Losh" writes: > Yes. Of course I have local modifications, but none in the usb stack. > But I've also done a svn update from the top of the tree multiple > times and this version number persists. Weird. r185338 was a commit to the old USB stack. Try to run svnversion in sys/dev/usb, and in an unrelated directory such as sys/conf. If there's a difference, run svn stat in sys/dev/usb and see if anything unexpected shows up. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 14:04:28 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8765106566C; Mon, 26 Oct 2009 14:04:28 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 15A2A8FC29; Mon, 26 Oct 2009 14:04:27 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=7Qk2ozbKAAAA:8 a=3DEoRG9pZ8O1rmRWK4MA:9 a=amle3YBhDP2cSjTdLwkA:7 a=xZ_KKcwNocfnZFU_dISHYZDrLaEA:4 a=cvZW9r6VXHAA:10 a=HB4-cm7let6mbyM0:21 a=ifyaD4XHMZ9D0NMm:21 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1225145395; Mon, 26 Oct 2009 15:04:26 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Mon, 26 Oct 2009 15:03:33 +0100 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <200910261258.08135.hselasky@c2i.net> <86skd6cmm8.fsf@ds4.des.no> <20091026.073759.2130803790.imp@bsdimp.com> In-Reply-To: <20091026.073759.2130803790.imp@bsdimp.com> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpO< =?iso-8859-1?q?Q0yAl=7E=3F=60=27F=3FjDVb=5DE6TQ7=27=23h-VlLs=7Dk/=0A=09?=(yxg(p!IL.`#ng"%`BMrham7%UK,}VH\wUOm=^>wEEQ+KWt[{J#x6ow~JO:,zwp.(t; @ =?iso-8859-1?q?Aq=0A=09=3A4=3A=26nFCgDb8=5B3oIeTb=5E=27?=",; u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200910261503.33747.hselasky@c2i.net> Cc: des@des.no, freebsd-usb@freebsd.org Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 14:04:28 -0000 On Monday 26 October 2009 14:37:59 M. Warner Losh wrote: > In message: <86skd6cmm8.fsf@ds4.des.no> > > Dag-Erling_Sm=F8rgrav writes: > : "M. Warner Losh" writes: > : > FreeBSD lighthouse 9.0-CURRENT FreeBSD 9.0-CURRENT #41 r185338:198411= M: > : > Fri Oct 23 10:08:48 MDT 2009 =20 > : > imp@lighthouse:/cache/svn/head/sys/amd64/compile/LIGHTHOUSE amd64 > : > > : > so it would have r197682 baked in (the first number in my rev string > : > is a mystery to me). > : > : It means you have an inconsistent tree. The first number is the oldest > : revision in your tree, the second is the newest, and the M means you > : have local modifications. > > Yes. Of course I have local modifications, but none in the usb stack. > But I've also done a svn update from the top of the tree multiple > times and this version number persists. > > : > Re another post: This is a 8GB flash, so I'm sure that there's enough > : > power. > : > : Non sequitur. Bigger chips draw more power. Is it plugged directly > : into the computer? If not, is it plugged into a powered hub? How many > : other devices are connected to the computer or hub? > Hi, > Not entirely. This flash has worked in this computer in the past > without issues (like a year ago when we were first integrating hpsusb > into the tree). Since then there has been at least one patch to improve performance in the= =20 EHCI driver. When the cat command stops, could you try to run: usbconfig -u XXX -a YYY dump_device_desc dump_curr_config_desc On that device. Is usbconfig able to extract the string descriptors in the= =20 device and config descriptor? Or do you get timeouts? Also check vmstat -i . > This flash is plugged directly into the computer. > This behavior is consistent across multiple ports on the computer (so > it isn't a bad port). While this doesn't prove it isn't a power > issue, the odds are stacked against it being one. If there were a way > to get the internal hub to tell me how much power it can deliver, and > for me to query the flash to see maximum current draws, we could see > if we're close to the edge or not... Usually the maximum current is given by the device descriptor, but it might= =20 now be the actual value. See usbconfig dump_device_desc. =2D-HPS From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 14:45:37 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 890D9106566C; Mon, 26 Oct 2009 14:45:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (unknown [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 49CA48FC1C; Mon, 26 Oct 2009 14:45:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9QEh5K5075101; Mon, 26 Oct 2009 08:43:05 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 26 Oct 2009 08:43:16 -0600 (MDT) Message-Id: <20091026.084316.35218995.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <86aazecl00.fsf@ds4.des.no> References: <86skd6cmm8.fsf@ds4.des.no> <20091026.073759.2130803790.imp@bsdimp.com> <86aazecl00.fsf@ds4.des.no> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, hackers@FreeBSD.org, freebsd-usb@FreeBSD.org, hselasky@c2i.net Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 14:45:37 -0000 In message: <86aazecl00.fsf@ds4.des.no> Dag-Erling_Sm=F8rgrav writes: : "M. Warner Losh" writes: : > Yes. Of course I have local modifications, but none in the usb sta= ck. : > But I've also done a svn update from the top of the tree multiple : > times and this version number persists. : = : Weird. r185338 was a commit to the old USB stack. Try to run : svnversion in sys/dev/usb, and in an unrelated directory such as : sys/conf. If there's a difference, run svn stat in sys/dev/usb and s= ee : if anything unexpected shows up. % cd sys/dev/usb % svnversion 198411M % cd ../../conf % svnversion 198411M Some more digging down this line shows that there was a dangling merge conflict in sys/i386/conf/GENERIC Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 14:45:37 2009 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 890D9106566C; Mon, 26 Oct 2009 14:45:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (unknown [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 49CA48FC1C; Mon, 26 Oct 2009 14:45:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9QEh5K5075101; Mon, 26 Oct 2009 08:43:05 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 26 Oct 2009 08:43:16 -0600 (MDT) Message-Id: <20091026.084316.35218995.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <86aazecl00.fsf@ds4.des.no> References: <86skd6cmm8.fsf@ds4.des.no> <20091026.073759.2130803790.imp@bsdimp.com> <86aazecl00.fsf@ds4.des.no> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, hackers@FreeBSD.org, freebsd-usb@FreeBSD.org, hselasky@c2i.net Subject: Re: Help troubleshooting... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 14:45:37 -0000 In message: <86aazecl00.fsf@ds4.des.no> Dag-Erling_Sm=F8rgrav writes: : "M. Warner Losh" writes: : > Yes. Of course I have local modifications, but none in the usb sta= ck. : > But I've also done a svn update from the top of the tree multiple : > times and this version number persists. : = : Weird. r185338 was a commit to the old USB stack. Try to run : svnversion in sys/dev/usb, and in an unrelated directory such as : sys/conf. If there's a difference, run svn stat in sys/dev/usb and s= ee : if anything unexpected shows up. % cd sys/dev/usb % svnversion 198411M % cd ../../conf % svnversion 198411M Some more digging down this line shows that there was a dangling merge conflict in sys/i386/conf/GENERIC Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 20:09:49 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F18F0106566C for ; Mon, 26 Oct 2009 20:09:49 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5E5DB8FC13 for ; Mon, 26 Oct 2009 20:09:49 +0000 (UTC) Received: from roadrunner.spoerlein.net (pD9E5C51D.dip.t-dialin.net [217.229.197.29]) by acme.spoerlein.net (8.14.3/8.14.3) with ESMTP id n9QK9iY3063462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 26 Oct 2009 21:09:47 +0100 (CET) (envelope-from uqs@spoerlein.net) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.3/8.14.3) with ESMTP id n9QK9avk013607 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 26 Oct 2009 21:09:36 +0100 (CET) (envelope-from uqs@spoerlein.net) Received: (from uqs@localhost) by roadrunner.spoerlein.net (8.14.3/8.14.3/Submit) id n9QK9ZiR013606 for hackers@freebsd.org; Mon, 26 Oct 2009 21:09:35 +0100 (CET) (envelope-from uqs@spoerlein.net) Date: Mon, 26 Oct 2009 21:09:35 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: hackers@freebsd.org Message-ID: <20091026200935.GA13602@roadrunner.spoerlein.net> Mail-Followup-To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: in_cksum.h for sparc64 missing ifdef KERNEL? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 20:09:50 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, while trying to cleanup some WARNS issues under sbin/, I noticed that natd(8) fails to compile for sparc64 only, due to missing "struct mbuf" declaration in in_cksum.h. Comparing that header to other arch's headers leads me to believe an #ifdef is missing. See attached patch, but please note that I do not have the resources to run this through a make universe right now. Regards, Uli --uAKRQypu60I7Lcqm Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="cksum.diff" 1618[tip] 350410f79434 2009-10-26 21:02 +0100 uqs Put this under KERNEL just like all other arch do. diff -r 5558195fb93d -r 350410f79434 sys/sparc64/include/in_cksum.h --- a/sys/sparc64/include/in_cksum.h Mon Oct 26 19:57:23 2009 +0100 +++ b/sys/sparc64/include/in_cksum.h Mon Oct 26 21:02:06 2009 +0100 @@ -164,6 +164,8 @@ return (__ret); } +#ifdef _KERNEL u_short in_cksum_skip(struct mbuf *m, int len, int skip); +#endif #endif /* _MACHINE_IN_CKSUM_H_ */ --uAKRQypu60I7Lcqm-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 20:36:08 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC84E1065694 for ; Mon, 26 Oct 2009 20:36:08 +0000 (UTC) (envelope-from olivermahmoudi@gmail.com) Received: from mail-bw0-f209.google.com (mail-bw0-f209.google.com [209.85.218.209]) by mx1.freebsd.org (Postfix) with ESMTP id 410D48FC12 for ; Mon, 26 Oct 2009 20:36:08 +0000 (UTC) Received: by bwz1 with SMTP id 1so2769184bwz.13 for ; Mon, 26 Oct 2009 13:36:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=f1/69KJ+L1aWaHwjaqwZQepiXkrXg2HwzU7sekf11CQ=; b=jC6QYs3TKLjfg9WxzxRHKAnWgvOVNjYZgLGimApy8v1vcTgsZOoCEXtRrC1w9sCfPU mJypoDTPG58eXOOl6d0B/qdUoYL3zQo2k2gzRAKHJqUXLJvvX0y5SjdRs7mF9fftIBHl A4Bd0BPL4wH9IbAWxl/tjNcWWZWV//r7zZzhE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=mtP3t7dBp6bh6z+92oc0Cg4OCWAfhBiKFpsypVVuFeHEY5BcA9fAg4ceWqtGnzjj9M PX5fBqfcsUbYxYPnhRRhAHTX2S1wNFCUlK+RbV/7i5CGgI3/WTePRGwahdszHOea4XkS oYgZ7GzMCLDsSJp/rMxO3c1P1W5vU2uizKzxs= MIME-Version: 1.0 Received: by 10.239.182.158 with SMTP id q30mr565287hbg.23.1256587696410; Mon, 26 Oct 2009 13:08:16 -0700 (PDT) Date: Mon, 26 Oct 2009 21:08:16 +0100 Message-ID: <6b4b2d2c0910261308i367569dbg887d7c713bf20ad1@mail.gmail.com> From: Oliver Mahmoudi To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: writing a FreeBSD C library X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 20:36:08 -0000 Hello all y'all Kernel Hackers, Trying to get a deeper understanding of the FreeBSD kernel I am currently I am studying C library files. For this reason I wrote a very simple library, just to understand how it works. Below are my source codes for: 1. the header 2. the library file 3. a simple C program with which I intend to test my library function ############## start of simple library header ######################## #ifndef _s_lib_h_ #define _s_lib_h_ #define SOME_INT 0x0001 /* prototype */ void myprnf(char *); #endif /* _s_lib_h_ */ ##################### end of header ############################ ################# start of library file lb.c ########################## #include #include "slib.h" static void _myprf(char *); void myprnf(char *farg) { char *narg = farg; _myprf(narg); } static void _myprf(char *sarg) { char *pstr = sarg; printf("%s\n", pstr); } ############## end of library file ############################### ################ start of source file ############################ #include "slib.h" int main() { char *somestr = "hello world"; myprnf(somestr); return(1-1); } ################# end of source file ########################### I compiled the library file in the following way. % gcc -I../include -Wall -c lb.c % ar rsv mylib.a lb.o The compilation finished with no warnings so I assume that there are no errors in the library itself. Trying to compile my source file - let's call it source.c - I always get the following error message: % gcc -o testfile source.c /var/tmp//ccQoff1S.o(.text+0x19): In function `main': : undefined reference to `myprintf' % In other words, gcc doesn't seem to find my library. I tried to mv my library file in /lib, /libexec /usr/lib, /usr/libdata and /usr/libexec but none of the above directories would directory would let me compile my source file. Now I am wondering where do I need to put mylib.a file to succeed? Also, this is a static library. What do I need to do under FreeBSD to compile this library into a dynamic library and where would I put this file? Lastly, most if not all the system calls can be found under /sys/kern/*.c. When writing a FreeBSD C program gcc makes use of the corresponding headers, e.g. unistd.h. and the standard library libc. Is it possible to peep a look at the source file for libc, i.e. is it included in the source tree? Where? Thanks Oliver There are many many more kernel related questions on my mind but I think that this is enought for one email. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 21:04:48 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E54C106566B for ; Mon, 26 Oct 2009 21:04:48 +0000 (UTC) (envelope-from f.loeber@googlemail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by mx1.freebsd.org (Postfix) with ESMTP id 98D9B8FC14 for ; Mon, 26 Oct 2009 21:04:47 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 9so2551325eyd.9 for ; Mon, 26 Oct 2009 14:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=IrHNFhIa56HaPyrVz2QsR+AXrghT/1u9DmWHvBpZ224=; b=sxhxP2YeenPXtYIzAw/O4DvyCOt4lZcRJMI+iyqLtwToQEBy8Qx8+LUpytgKjJoR6o ibTY7qokXebWqQ4t6AT3AfeMWqnHIN9+pNP7VsBMb8uVqyx32cFXVT0ys5UgW9wSm6IU dZgoLmCSRlBkwFyfzFiaboMkS0PmRy91x7lv4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=GrDf92mDlvz8WJ51alNPfhUf8b3EP6By/V25GkHpFvXboJxiPu3WEGkZA4W9ALS0BT 4hxJ3+7z06ymBe9L2q7sXaK3wdshf3Fmoeb9ZqozeqEmTh7nzObQ8NWOI7CzolMc8Hl1 A0GWDScdsXyWcfA9Y9K6fm8jFf1pExwxBOsWg= MIME-Version: 1.0 Received: by 10.216.93.2 with SMTP id k2mr1990905wef.210.1256589822570; Mon, 26 Oct 2009 13:43:42 -0700 (PDT) In-Reply-To: <6b4b2d2c0910261308i367569dbg887d7c713bf20ad1@mail.gmail.com> References: <6b4b2d2c0910261308i367569dbg887d7c713bf20ad1@mail.gmail.com> Date: Mon, 26 Oct 2009 21:43:42 +0100 Message-ID: From: Florian Loeber To: Oliver Mahmoudi Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org Subject: Re: writing a FreeBSD C library X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 21:04:48 -0000 Hi, you have to link your executable to your library. The command-line option is -l. % gcc -o testfile -lmylib source.c Without it, your program doesn't know that this library exists (somewhere, /usr/lib, ...) Regards, Florian From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 21:32:07 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DD7C106566B for ; Mon, 26 Oct 2009 21:32:07 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 915C48FC20 for ; Mon, 26 Oct 2009 21:32:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id E908E14D99BB; Mon, 26 Oct 2009 22:07:05 +0100 (CET) X-Virus-Scanned: amavisd-new at example.com Received: from server.mypc.hu ([127.0.0.1]) by localhost (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id isyRpEHgF8mG; Mon, 26 Oct 2009 22:07:03 +0100 (CET) Received: from [192.168.1.105] (catv-89-132-179-104.catv.broadband.hu [89.132.179.104]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 3237414D9A25; Mon, 26 Oct 2009 22:07:03 +0100 (CET) Message-ID: <4AE60F70.9070808@FreeBSD.org> Date: Mon, 26 Oct 2009 22:06:56 +0100 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Oliver Mahmoudi References: <6b4b2d2c0910261308i367569dbg887d7c713bf20ad1@mail.gmail.com> In-Reply-To: <6b4b2d2c0910261308i367569dbg887d7c713bf20ad1@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: writing a FreeBSD C library X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 21:32:07 -0000 Oliver Mahmoudi escribió: > I compiled the library file in the following way. > > % gcc -I../include -Wall -c lb.c > % ar rsv mylib.a lb.o > You can study bsd.lib.mk and bsd.prog.mk in /usr/share/mk. With these two includes you can deal easily with your C programs/libraries. It will serve you very well later. > The compilation finished with no warnings so I assume that there are no > errors in the library itself. > > Trying to compile my source file - let's call it source.c - I always get the > following error message: > > % gcc -o testfile source.c > /var/tmp//ccQoff1S.o(.text+0x19): In function `main': > : undefined reference to `myprintf' > % > > That's easy, your library isn't linked to your program. First, compile the source file but _do not link_: gcc -c source.c This will result in a source.o file. Then link the object files (source.o and the static library) with ld: ld -o testfile source.o mylib.a > In other words, gcc doesn't seem to find my library. I tried to mv my > library file in /lib, /libexec > /usr/lib, /usr/libdata and /usr/libexec but none of the above directories > would directory would > let me compile my source file. > > With static libraries you can just specify the full path when linking. > Now I am wondering where do I need to put mylib.a file to succeed? > > Also, this is a static library. What do I need to do under FreeBSD to > compile this library into a dynamic > library and where would I put this file? > Just using the proper parameters when compiling the library. It is a Linux article but you'll find some explications here: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html Again, the bsd.*.mk Makefile includes are pretty handful. > Lastly, most if not all the system calls can be found under /sys/kern/*.c. > When writing a FreeBSD C program > gcc makes use of the corresponding headers, e.g. unistd.h. and the standard > library libc. Is it possible > to peep a look at the source file for libc, i.e. is it included in the > source tree? Where? > In /usr/src/lib/libc provided you have the source code installed in /usr/src. > There are many many more kernel related questions on my mind but I think > that this is enought for one > email. > I don't want to desperate you but these are very basic things. You should get a deeper knowledge of the basics first, before you try to do some kernel-related things. Otherwise, you will find it way too difficult and you won't enjoy. Anyway, the book of Marshall K. McKusick and George V. Neville-Neil is a good source of learning kernel stuff: http://www.amazon.com/Design-Implementation-FreeBSD-Operating-System/dp/0201702452 Regards, -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 27 00:26:31 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 550BD106566B for ; Tue, 27 Oct 2009 00:26:31 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from core.tav.kiev.ua (tavex.colocall.com [62.149.10.42]) by mx1.freebsd.org (Postfix) with ESMTP id EF7A48FC14 for ; Tue, 27 Oct 2009 00:26:30 +0000 (UTC) Received: from [76.77.86.2] (helo=[10.80.5.136]) by core.tav.kiev.ua with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.52 (FreeBSD)) id 1N2Zdp-0005oa-1f for hackers@freebsd.org; Tue, 27 Oct 2009 02:10:25 +0200 Message-ID: <4AE63A64.7010205@bluezbox.com> Date: Mon, 26 Oct 2009 17:10:12 -0700 From: Oleksandr Tymoshenko User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Core-Spam-Level: / X-Core-Spam-Report: Spam detection software, running on the system "core.tav.kiev.ua", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: This problem haunts for a couple of days and I can't find a nice and clean solution so this email is actually a cry for help. The problem: There is a buffer loaded by bus_dmamap_load for use as a DMA buffer. Right before this buffer resides block of vital data structure. Consider following scenario: [...] Content analysis details: (-0.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.5174] 1.3 AWL AWL: From: address is in the auto white-list Cc: Subject: MIPS: bus_dma(9) and cache problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2009 00:26:31 -0000 This problem haunts for a couple of days and I can't find a nice and clean solution so this email is actually a cry for help. The problem: There is a buffer loaded by bus_dmamap_load for use as a DMA buffer. Right before this buffer resides block of vital data structure. Consider following scenario: 1. code modifies data in block and this modification ends up in cache and is not written back to memory 2. right after this code calls bus_dmamap_sync for this buffer and as a result cache invalidation is performed 3. Cache function operates on cache line size-aligned addresses and the block in question happens to share the same cache line with the buffer. So modification made at step (1) is lost. If busdma code controls allocation (bus_dmamem_alloc) this situation can be avoided by forcing pointer alignment. But when address come from the "outer space" via bus_dmamap_load* there is not much to do. There are two solutions I've figured so far: - Create bounce page for not properly aligned memory. Which would reduce performance a lot. - Remap buffer's page(s) as uncached. I haven't succeeded with this one yet and not sure it's always possible. May be someone can suggest better way to clean this mess? Thanks! -- gonzo From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 27 03:09:47 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A36F7106566B for ; Tue, 27 Oct 2009 03:09:47 +0000 (UTC) (envelope-from pirat@tint.or.th) Received: from mail.tint.or.th (ns2.tint.or.th [122.154.13.210]) by mx1.freebsd.org (Postfix) with SMTP id 249DC8FC0C for ; Tue, 27 Oct 2009 03:09:46 +0000 (UTC) Received: (qmail 8239 invoked from network); 27 Oct 2009 03:03:38 -0000 Received: from www.tint.or.th (HELO alpha.nst.or.th) (122.154.13.80) by mail.tint.or.th with SMTP; 27 Oct 2009 03:03:38 -0000 Received: from 10.3.1.26 (10.3.1.26 [10.3.1.26]) by webmail.tint.or.th (Horde Framework) with HTTP; Tue, 27 Oct 2009 09:43:15 +0700 Message-ID: <20091027094315.13736x5smfzo4g1v@webmail.tint.or.th> X-Priority: 3 (Normal) Date: Tue, 27 Oct 2009 09:43:15 +0700 From: =?utf-8?b?4LmE4Lie4Lij4Lix4LiKIA==?= =?utf-8?b?4Lio4Lij4Li14LmC4Lii4LiY4Liy?= To: Ruben de Groot References: <20091026143639.13895c34kml7gmmf@webmail.tint.or.th> <20091026095317.GA72492@ei.bzerk.org> In-Reply-To: <20091026095317.GA72492@ei.bzerk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3) Cc: freebsd-hackers@freebsd.org Subject: Re: make release stop at Creating ISO imagess X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2009 03:09:47 -0000 Quoting Ruben de Groot : > On Mon, Oct 26, 2009 at 02:36:39PM +0700, ??????????????? =20 > ????????????????????? typed: >> hi sirs, >> >> apologized me for disturbing this list but ireally have problem s. >> i make my own release by follwoing document in releng articles. >> >> here is my command >> >> cd /usr/src/release >> time make CHROOTDIR=3D/kaitag/KAITAG BUILDNAME=3D7.2-RELEASE \ >> CVSROOT=3D/var/ftp/pub/ncvs RELEASETAG=3DRELENG_7_2_0_RELEASE \ >> EXTSRCDIR=3D/usr/src EXTPORTSDIR=3D/usr/ports \ >> DOC_LANG=3Den_US.ISO8859-1 NODOC=3DNO NOPORTS=3DNO \ >> MAKE_DVD=3DYES MAKE_ISOS=3DYES CDROM=3DYES >> RELEASEDISTFILES=3D/var/ftp/pub/distfiles \ >> release >> >> the build process goes well but then fetching for cdrtools.tbz begin and >> stop. >> in my machine i have installed cdrtools and there is also mkisofs file >> so i wonder why the script /usr/src/release/i386/mkisofsimages.sh >> still fetching for cdrtools. > > Do you have the cdrtools.tbz package in /var/ftp/pub/distfiles ? > > Ruben > > i copy cdrtools.tbz to /var/ftp/pub/distfiles while answering your =20 first mail and let the process ran overnight here is a result, from screen shot =3D=3D begin of last page screen shot touch cdrom.1 Building CDROM disc1 filesystem image 0 blocks 0 blocks Building CDROM disc2 filesystem image Building CDROM disc3 filesystem image 0 blocks 0 blocks touch cdrom.2 Building bootonly CDROM filesystem image touch cdrom.3 Creating ISO images... The cdrtools port is not installed. Trying to get it now. Fetching =20 ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.2-release/Lates t/cdrtools.tbz...pkg_add: warning: error reading from server: =20 Operation timed ou t ^CSignal 2 received, cleaning up.. Could not get it via pkg_add - please go install this from the ports collection and run this script again. 6240.165u 575.390s 20:45:53.90 9.1% -259+1079k 167010+14463io 87062pf+0w maifa [/usr/src/release] # =3D=3D end of screen shot after interrupt the process i make ... rerelease once again and now it =20 stuck at the same point =3D=3D begin of screen shot + export RELEASETAG=3DRELENG_7_2_0_RELEASE + export RELNOTES_LANG=3Den_US.ISO8859-1 + export SEPARATE_LIVEFS=3D + export TARGET=3Di386 + export TARGET_ARCH=3Di386 + export RELEASEDIR=3D/R + export PATH=3D/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin + export MANBUILDCAT=3DYES + umount /dev + true + mount -t devfs devfs /dev + [ ! -c /dev/null ] + [ -x /etc/rc.d/ldconfig ] + /etc/rc.d/ldconfig start ELF ldconfig path: /lib /usr/lib /usr/lib/compat a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout + [ ! -f /tmp/.world_done ] + [ ! -f /tmp/.skip_ports_index ] + cd /usr/src/release + make obj + make doRELEASE Creating ISO images... The cdrtools port is not installed. Trying to get it now. Fetching =20 ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.2-release/Lates t/cdrtools.tbz... =3D=3D end of screen shot, currently running process i do not know what happend to the sh script mention ealier. anyway thanks indeed for your time. with best regards --=20 psr =E0=B8=A1=E0=B8=B0=E0=B8=83=E0=B8=B2=E0=B8=A1 =E0=B8=85=E0=B8=B4=E0=B8=99=E0= =B9=80=E0=B8=94=E0=B8=B4=E0=B8=99=E0=B8=94=E0=B8=99 =E0=B8=A1=E0=B8=B0=E0=B9=84=E0=B8=9F =E0=B8=85=E0=B8=99=E0=B9=80=E0=B8=AB=E0= =B8=A5=E0=B8=B4=E0=B8=87=E0=B8=9F=E0=B9=89=E0=B8=B2 http://makham.blogspot.com ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 27 17:13:24 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43E0E1065692 for ; Tue, 27 Oct 2009 17:13:24 +0000 (UTC) (envelope-from linda.messerschmidt@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 00B3D8FC21 for ; Tue, 27 Oct 2009 17:13:23 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 9so148575qwb.7 for ; Tue, 27 Oct 2009 10:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=5jj8yzoEJ6R+weElp9jQGjV74i1YJ6p6VOsbm88+S6g=; b=ktqvtcrEgkYlO1ZJ0hMjn2Ikx6IGuo3baTpfRfqth83h+XQlI/xP2hAG0C6NJODBDQ 1a6eScqKHk4WgqXK5zxizTsW9UrpFiWJYdNS9Uy8DElCKEqaugId8Ni6Q8m5RocXE3hP EInVBnbowv2CJLvJgQMrfH87dHyM7aoHppFtM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=HIHbemx8etKvfyKPSRB2QzNEL6vgw6Zbnoj50pIctHUXlmOVvb7OEQ9ecbFvPLv5Ek ktzUZx/Z/EXwQQ9rH/AEL8D2VKxJPDk7eFA5JSxRxHtOxdfbIK1y6fujilsNOpBXp32L z1olLFDT6PB/oUQMEJNw+6am7kl5+I6+Yp5x8= MIME-Version: 1.0 Received: by 10.220.126.214 with SMTP id d22mr9781955vcs.114.1256663598562; Tue, 27 Oct 2009 10:13:18 -0700 (PDT) Date: Tue, 27 Oct 2009 13:13:18 -0400 Message-ID: <237c27100910271013s1d8602d0l74d7d9d2c137adee@mail.gmail.com> From: Linda Messerschmidt To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: FreeBSD 7.2 + NFS + nullfs + unlink + fstat = Stale NFS File Handle X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2009 17:13:24 -0000 We have encountered a problem with a weird behavior when NFS and nullfs are combined and a program creates, unlinks, and then fstats a file in the resulting directory. After encountering this problem in the wild, I wrote a quick little C program. It creates a file, unlinks the file, and then fstat's the open file descriptor. The results: UFS: OK NFS: OK UFS+NULLFS: OK NFS+NULLFS: fstat returns ESTALE The UFS test is just run in /tmp. All others are run in /mnt (with umounts in between). The NFS setup looks like this: client# mount -o tcp server:/export/example /mnt The UFS+NULLFS setup looks like this: client# mount -t nullfs /tmp /mnt The NFS+NULLFS mount setup looks like this: client# mount -o tcp server:/export /export client# mount -t nullfs /export/example /mnt As far as I understand, this behavior should be supported, and the file should be "finally" deleted when the descriptor is closed. Even so, this is obscure enough that the response would be "don't do that" except that the open-unlink-fstat behavior was encountered with /usr/bin/vi, which does exactly that on its temporary files. So, we either fix it or retool everything not to use nullfs. Does anyone know what the likely source of this different behavior is, and whether it is feasible to address? Or is NFS+NULLFS just pushing the envelope a little too far? This is on 7.2-RELEASE-p1 and 7.2-STABLE. Thanks for any advice! Test program source below: #include #include #include #include #include #include int main() { int fd; struct stat st; fd = open("testfile", O_RDWR | O_CREAT | O_TRUNC, 0666); if (!fd) { fprintf(stderr, "open failed: %s\n",strerror(errno)); return 10; } if (unlink("testfile")) { fprintf(stderr, "unlink failed: %s\n",strerror(errno)); return 20; } if (fstat(fd, &st)) { fprintf(stderr, "fstat failed: %s\n",strerror(errno)); return 30; } close(fd); return 0; } From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 28 01:16:37 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E7EA1065692; Wed, 28 Oct 2009 01:16:37 +0000 (UTC) (envelope-from dclark@engr.scu.edu) Received: from endor.engr.scu.edu (smtp.engr.scu.edu [129.210.16.13]) by mx1.freebsd.org (Postfix) with ESMTP id 84B538FC0A; Wed, 28 Oct 2009 01:16:37 +0000 (UTC) Received: from nova46.dc.engr.scu.edu (nova46.dc.engr.scu.edu [129.210.16.43]) by endor.engr.scu.edu (8.13.6/8.13.6) with ESMTP id n9S0XQpu007996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 Oct 2009 17:33:28 -0700 Received: from localhost (dclark@localhost) by nova46.dc.engr.scu.edu (8.13.6/8.13.6) with ESMTP id n9S0WYNj018063; Tue, 27 Oct 2009 17:32:35 -0700 (PDT) X-Authentication-Warning: nova46.dc.engr.scu.edu: dclark owned process doing -bs Date: Tue, 27 Oct 2009 17:32:34 -0700 (PDT) From: "Dorr H. Clark" X-Sender: dclark@nova46.dc.engr.scu.edu To: freebsd-stable@freebsd.org In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Wed, 28 Oct 2009 01:45:05 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-bugs@freebsd.org Subject: ptrace problem 6.x/7.x - can someone explain this? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 01:16:37 -0000 We believe ptrace has a problem in 6.3; we have not tried other releases. The same code, however, exists in 7.1. The bug was first encountered in gdb... (gdb) det Detaching from program: /usr/local/bin/emacs, process 66217 (gdb) att 66224 Attaching to program: /usr/local/bin/emacs, process 66224 Error accessing memory address 0x281ba5a4: Device busy. (gdb) det Detaching from program: /usr/local/bin/emacs, process 66224 ptrace: Device busy. (gdb) quit <--- target process 66224 dies here To isolate this problem, a wrote a simple minded test program was written that just attached and detached. This test program found even the very first detach fails with EBUSY (see test source below): $ ./test1 -p 66217 -c 1 -d 10 pid 66217 count 1 delay 10 Start of pass 0 Calling PT_ATTACH pid 66217 addr 0x0 sig 0 Calling PT_DETACH pid 66217 addr 0xffffffff sig 0 Call 0 to PT_DETACH returned -1, errno 16 Once again, the target process died when the ptracing test program exitted, as would be expected if a detach had failed. The failure return was coming from the following test in kern_ptrace() in sys_process.c /* not currently stopped */ if ((p->p_flag & (P_STOPPED_SIG | P_STOPPED_TRACE)) == 0 || p->p_suspcount != p->p_numthreads || (p->p_flag & P_WAITED) == 0) { error = EBUSY; goto fail; } This is applied to all operations except PT_TRACE_ME, PT_ATTACH, and some instances of PT_CLEAR_STEP. P_WAITED is generally not true. In particular, it's not set automatically when a process is PT_ATTACHed. It is cleared by PT_DETACH and again when ptrace sends a signal (PT_CONTINUE, PT_DETACH.) _But_ it's set in only two places, and they aren't in ptrace code. 2 sys/kern/kern_exit.c kern_wait 773 p->p_flag |= P_WAITED; 3 compat/svr4/svr4_misc.c svr4_sys_waitsys 1351 q->p_flag |= P_WAITED; The relevant one is the first one, primarily. Here's the code: mtx_lock_spin(&sched_lock); if ((p->p_flag & P_STOPPED_SIG) && (p->p_suspcount == p->p_numthreads) && (p->p_flag & P_WAITED) == 0 && (p->p_flag & P_TRACED || options & WUNTRACED)) { mtx_unlock_spin(&sched_lock); p->p_flag |= P_WAITED; sx_xunlock(&proctree_lock); td->td_retval[0] = p->p_pid; if (status) *status = W_STOPCODE(p->p_xstat); PROC_UNLOCK(p); return (0); } mtx_unlock_spin(&sched_lock); So it's only set on processes which are already traced. But it's not set until someone calls wait4() on them - or the equivalent sysV compatability routine. Gdb doesn't always wait4() for processes immediately opon tracing them, and the ptrace man page does not imply this is needed. Moreover, it's not clear why it should matter. The process needs to be stopped in order for it to make sense to do most of the things ptrace does. But - why should it need to be waited for? And what kind of sense does this make to someone writing a debugging tool, where the natural logic seems to be: - attach to process - look at some stuff - stick in some kind of breakpoint or similar and start it going again (or 'step' it) - wait for it to stop - look at and modify stuff - detach, or set it moving again By way of experiment, the test for P_WAITED was removed. Gdb no longer had problems, and no new issues with gdb were encountered (although this was just interactive, no "gdb coverage test" was attempted). The test program also stopped having issues. /* not currently stopped */ if ((p->p_flag & (P_STOPPED_SIG | P_STOPPED_TRACE)) == 0 || p->p_suspcount != p->p_numthreads { error = EBUSY; goto fail; } So does anyone know whether it's safe to simply remove that test? Thanks, Arlie Stephens Engineer Dorr H. Clark Advisor Graduate School of Engineering Santa Clara University, Santa Clara, CA --------------------------------------------------------------------- Test program here --------------------------------------------------------------------- /* * experiment with ptrace, try to see which is broken - gdb or ptrace */ #include #include #include #include #include #include void usage(void) { printf("Simple program to play with ptrace\n"); printf("Usage: test1 -p -c -d \n"); printf("Specify -n for no explicit detach\n"); printf("Will attach and detach repeatedly from target process\n"); exit(1); } int main(int argc, char *argv[]) { pid_t pid = -1; int count = 2; int delay = 5; int nodetach = 0; int opt; int ret; int i; while((opt = getopt(argc, argv, ":p:c:d:n")) != -1) { switch(opt) { case 'c': if (sscanf(optarg, "%d", &count) != 1) { printf("Count should be numeric\n"); usage(); } break; case 'd': if (sscanf(optarg, "%d", &delay) != 1) { printf("Delay should be numeric\n"); usage(); } break; case 'n': nodetach = 1; break; case 'p': if (sscanf(optarg, "%d", &pid) != 1) { printf("Pid should be numeric\n"); usage(); } break; default: printf("Illegal option -%c\n", opt); usage(); break; } } printf("pid %d count %d delay %d\n", pid, count, delay); if (pid == -1) { printf("Pid must be specified\n"); usage(); } if (count <= 0) { printf("Count must be positive\n"); usage(); } if (delay < 0) { printf("Delay must not be negative\n"); usage(); } for (i = 0; i < count; i++) { printf("Start of pass %d\n", i); errno = 0; printf("Calling PT_ATTACH pid %d addr 0x%lx sig %d\n", pid, (unsigned long)(caddr_t)NULL, 0); ret = ptrace(PT_ATTACH, pid, NULL, 0); if (ret != 0) { printf("Call %d to PT_ATTACH returned %d, errno %d\n", i, ret, errno); } sleep(delay); if (!nodetach) { errno = 0; printf("Calling PT_DETACH pid %d addr 0x%lx sig %d\n", pid, (unsigned long)(caddr_t)-1, 0); ret = ptrace(PT_DETACH, pid, (caddr_t)-1, 0); if (ret != 0) { printf("Call %d to PT_DETACH returned %d, " "errno %d\n", i, ret, errno); } } sleep(delay); } return 0; } From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 28 12:48:47 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B798106568F for ; Wed, 28 Oct 2009 12:48:47 +0000 (UTC) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.ntu-kpi.kiev.ua (comsys.ntu-kpi.kiev.ua [77.47.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 59F478FC0C for ; Wed, 28 Oct 2009 12:48:39 +0000 (UTC) Received: from pm513-1.comsys.ntu-kpi.kiev.ua (pm513-1.comsys.ntu-kpi.kiev.ua [10.18.52.101]) (authenticated bits=0) by comsys.ntu-kpi.kiev.ua (8.13.7/8.13.7) with ESMTP id n9SCoiRI044255 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Oct 2009 14:50:44 +0200 (EET) Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001) id B908E1CC38; Wed, 28 Oct 2009 14:48:32 +0200 (EET) Date: Wed, 28 Oct 2009 14:48:32 +0200 From: Andrey Simonenko To: Linda Messerschmidt Message-ID: <20091028124832.GA7852@pm513-1.comsys.ntu-kpi.kiev.ua> References: <237c27100910271013s1d8602d0l74d7d9d2c137adee@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <237c27100910271013s1d8602d0l74d7d9d2c137adee@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: ClamAV version 0.93.1, clamav-milter version 0.93.1 on comsys.ntu-kpi.kiev.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.4 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on comsys.ntu-kpi.kiev.ua Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD 7.2 + NFS + nullfs + unlink + fstat = Stale NFS File Handle X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 12:48:47 -0000 On Tue, Oct 27, 2009 at 01:13:18PM -0400, Linda Messerschmidt wrote: > > Does anyone know what the likely source of this different behavior is, > and whether it is feasible to address? Or is NFS+NULLFS just pushing > the envelope a little too far? As I understand when a file is opened in NULLFS its vnode gets new reference on 'count of users', but this new reference is not propagated to the lower vnode (vnode that is under NULLFS). When a file is removed NULLFS passes this op to the lower FS (NFS in this example) and that FS sees that its vnode has only a single reference on 'count of users'. In case of NFS when there is a request to remove a vnode it checks that value of 'count of users' for this vnode. If this count is equal to 1, then NFS client code does 'RPC remove'. If this count is greater than 1 (for example when a file is opened), then NFS client code renames pathname to .nfs-file, but does not send 'RPC remove' to the NFS server. > > fd = open("testfile", O_RDWR | O_CREAT | O_TRUNC, 0666); > if (!fd) { ^^^^^ should be (fd < 0) From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 28 13:48:49 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C5251065670 for ; Wed, 28 Oct 2009 13:48:49 +0000 (UTC) (envelope-from linda.messerschmidt@gmail.com) Received: from mail-vw0-f173.google.com (mail-vw0-f173.google.com [209.85.212.173]) by mx1.freebsd.org (Postfix) with ESMTP id 3F1A68FC17 for ; Wed, 28 Oct 2009 13:48:49 +0000 (UTC) Received: by vws3 with SMTP id 3so65540vws.3 for ; Wed, 28 Oct 2009 06:48:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=6XtEUVuNh8WIlTBu7+sZ0YqJkG9gPPT5lTb402+IWOE=; b=xX5A9EEgGW2rAIyrNqhkOMUq6Nm+JdfBRMcFrOMuDS3Q+cszHbGyljJ+uqj+6bkrA7 Hk9XxlaDnXs5sJEjZAGO+xX1sB9/u2pfyxhYrdj2lKFaExFH2W/cuW81hy+ROjKQyXRG DbCEZHrz27Zl7XXvnruh8hwKouoA0lnxRgkjA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=hF5Ox1S2gaqCuRwBzpPsYlkBYIZPz5mEULH/KHaT02gJZfpR/LX79Li71klbFw6Knf W8KXvSZZqpr6PhfcuZtFlnXIFmAjMe4jsbv6hih40dIv8+PrNfYbBIbH7T3t9GxUf/uv wS7+EwZCzMWbunLJJgS/Tk/l4EJKxUNT8TKJ8= MIME-Version: 1.0 Received: by 10.220.124.88 with SMTP id t24mr11245079vcr.67.1256737728383; Wed, 28 Oct 2009 06:48:48 -0700 (PDT) In-Reply-To: <20091028124832.GA7852@pm513-1.comsys.ntu-kpi.kiev.ua> References: <237c27100910271013s1d8602d0l74d7d9d2c137adee@mail.gmail.com> <20091028124832.GA7852@pm513-1.comsys.ntu-kpi.kiev.ua> Date: Wed, 28 Oct 2009 09:48:48 -0400 Message-ID: <237c27100910280648k597e2159sf4fd663fe7b77b3b@mail.gmail.com> From: Linda Messerschmidt To: Andrey Simonenko Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD 7.2 + NFS + nullfs + unlink + fstat = Stale NFS File Handle X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 13:48:49 -0000 On Wed, Oct 28, 2009 at 8:48 AM, Andrey Simonenko wrote: > As I understand when a file is opened in NULLFS its vnode gets new > reference on 'count of users', but this new reference is not propagated > to the lower vnode (vnode that is under NULLFS). =A0When a file is remove= d > NULLFS passes this op to the lower FS (NFS in this example) and that > FS sees that its vnode has only a single reference on 'count of users'. > > In case of NFS when there is a request to remove a vnode it checks that > value of 'count of users' for this vnode. =A0If this count is equal to 1, > then NFS client code does 'RPC remove'. =A0If this count is greater than = 1 > (for example when a file is opened), then NFS client code renames pathnam= e > to .nfs-file, but does not send 'RPC remove' to the NFS server. That sounds like a pretty reasonable explanation of what's going on. Unfortunately it does sound like this would be tough to fix. Since NFS deletes are a special case, short of making an NFS-aware nullfs, which seems silly, it sounds like the "solution" would be rewriting nullfs to propagate the reference count. I don't know enough about nullfs to know exactly how hard that would be, but I'm guessing it's not the work of a lazy afternoon. :-) >> =A0 =A0 =A0 if (!fd) { > =A0 =A0 =A0 =A0 =A0 ^^^^^ should be (fd < 0) Oops, you are right! Thanks very much! From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 28 17:39:58 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FC751065697 for ; Wed, 28 Oct 2009 17:39:58 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-bw0-f209.google.com (mail-bw0-f209.google.com [209.85.218.209]) by mx1.freebsd.org (Postfix) with ESMTP id 1650C8FC43 for ; Wed, 28 Oct 2009 17:39:57 +0000 (UTC) Received: by bwz1 with SMTP id 1so1368441bwz.13 for ; Wed, 28 Oct 2009 10:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=HigF2N+gK6sPFhljpT3jrELM0uhkW/fye7QVO5iwknk=; b=Ngz8FuH42MY7lWh11CSGLQxINBner8ChSbZNh50S+NoiyjY732YT9tFjsG5qx/QpK0 nTXjWSCRNNK9bexnyPx97jxt8qUQtqPmQ+hkAgPOaTihvETtdM63DBwQZuBCA0w25OlQ i3gs25y+VwHbiMM+eRakXiPq57DtLIMLhNnzE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; b=jd3+cQlM/ff0gl2V8Zt3AyQVvxeccPvH9iskuvYyvrW5WJagCH3RJo0e/BFSulHicp wzF+kukwfCEsgk0UhQ4E3+1QVdcBvWh7i5HBAJ/O/Y19Nt74T3FmhPSuW72l+8Prddxo 412kGHvrF9N7YdizM1kThWJQ4AqQknpc57p+g= Received: by 10.204.154.155 with SMTP id o27mr1768624bkw.198.1256750183537; Wed, 28 Oct 2009 10:16:23 -0700 (PDT) Received: from localhost (lan-78-157-90-54.vln.skynet.lt [78.157.90.54]) by mx.google.com with ESMTPS id 12sm2180201fks.8.2009.10.28.10.16.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 28 Oct 2009 10:16:21 -0700 (PDT) Date: Wed, 28 Oct 2009 19:15:51 +0200 From: Gleb Kurtsou To: Linda Messerschmidt Message-ID: <20091028171550.GA1909@tops> References: <237c27100910271013s1d8602d0l74d7d9d2c137adee@mail.gmail.com> <20091028124832.GA7852@pm513-1.comsys.ntu-kpi.kiev.ua> <237c27100910280648k597e2159sf4fd663fe7b77b3b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <237c27100910280648k597e2159sf4fd663fe7b77b3b@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Andrey Simonenko , freebsd-hackers@freebsd.org Subject: Re: FreeBSD 7.2 + NFS + nullfs + unlink + fstat = Stale NFS File Handle X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 17:39:58 -0000 On (28/10/2009 09:48), Linda Messerschmidt wrote: > On Wed, Oct 28, 2009 at 8:48 AM, Andrey Simonenko > wrote: > > As I understand when a file is opened in NULLFS its vnode gets new > > reference on 'count of users', but this new reference is not propagated > > to the lower vnode (vnode that is under NULLFS).  When a file is removed > > NULLFS passes this op to the lower FS (NFS in this example) and that > > FS sees that its vnode has only a single reference on 'count of users'. > > > > In case of NFS when there is a request to remove a vnode it checks that > > value of 'count of users' for this vnode.  If this count is equal to 1, > > then NFS client code does 'RPC remove'.  If this count is greater than 1 > > (for example when a file is opened), then NFS client code renames pathname > > to .nfs-file, but does not send 'RPC remove' to the NFS server. > > That sounds like a pretty reasonable explanation of what's going on. > > Unfortunately it does sound like this would be tough to fix. Since > NFS deletes are a special case, short of making an NFS-aware nullfs, > which seems silly, it sounds like the "solution" would be rewriting > nullfs to propagate the reference count. I don't know enough about > nullfs to know exactly how hard that would be, but I'm guessing it's > not the work of a lazy afternoon. :-) I think that's not about nullfs. Nullfs behaves correctly. It grabs reference for a vnode and even tries too release it as soon as possible. NFS logic is wrong here, imho. vrefcnt(vp) == 1 supposed to mean that vnode is going to be reclaimed on next reference release and nothing more. And it doesn't mean that reference is going to be released any time soon. Although network filesystems in the tree abuse it the same way NFS does. Probably what NFS tries to do is to check if file descriptor is opened for a vnode. This assumption holds only for a single code path out of many: syscall by user. But there is plenty of code invoking vnode operations without even allocating file descriptor. Propagating per file descriptor reference counting into filesystem itself is a layer violation and should be avoided in my opinion. There should be a way to fix NFS by replacing vrefcnt check. > >>       if (!fd) { > >           ^^^^^ should be (fd < 0) > > Oops, you are right! > > Thanks very much! > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 28 19:46:21 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C15CA1065679 for ; Wed, 28 Oct 2009 19:46:21 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell.rawbw.com (shell.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id B117E8FC1A for ; Wed, 28 Oct 2009 19:46:21 +0000 (UTC) Received: from eagle.syrec.org (c-24-6-221-126.hsd1.ca.comcast.net [24.6.221.126]) (authenticated bits=0) by shell.rawbw.com (8.13.6/8.13.6) with ESMTP id n9SJkLDw037249 for ; Wed, 28 Oct 2009 12:46:21 -0700 (PDT) Message-ID: <4AE89F8C.60000@rawbw.com> Date: Wed, 28 Oct 2009 12:46:20 -0700 From: Yuri User-Agent: Thunderbird 2.0.0.23 (X11/20090824) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: USB floppy fails to attach X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: yuri@rawbw.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 19:46:21 -0000 My USB floppy dive fails to attach to device (see debug log below). VendorID=0x0409 ProductID=0x0040 not mentioned in /usr/src/sys/dev/usb/storage/umass.c Can this be that some that there is a simple fix for this, like adding a quirk? Yuri -----log------- ugen1.2: at usbus1 umass0: on usbus1 umass0: UFI over CBI with CCI; quirks = 0x0000 umass0:umass_cam_action: 4:-1:-1:XPT_PATH_INQ:. umass0:4:0:-1: Attached to scbus4 umass0:umass_cam_rescan: scbus4: scanning for 4:0:-1 umass0:umass_cam_action: 4:-1:-1:XPT_PATH_INQ:. umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 4:0:0:XPT_GET_TRAN_SETTINGS:. umass0:umass_cam_action: 4:0:0:XPT_SET_TRAN_SETTINGS:. umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x12, flags: 0x40, 6b cmd/36b data/18b sense umass0:umass_attach: Attach finishedumass0:umass_cbi_dump_cmd: cmd = 12b (0x120000002400...), data = 36b, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_cbi_data_read_callback: max_bulk=131072, data_rem=36 umass0:umass_t_cbi_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_t_cbi_status_callback: UFI CCI, ASC = 0x00, ASCQ = 0x00 umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 4:0:0:XPT_GET_TRAN_SETTINGS:. umass0:umass_cam_action: 4:0:0:XPT_SET_TRAN_SETTINGS:. umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x12, flags: 0x40, 6b cmd/255b data/18b sense umass0:umass_cbi_dump_cmd: cmd = 12b (0x12010000ff00...), data = 255b, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_cbi_data_read_callback: max_bulk=131072, data_rem=255 umass0:umass_t_cbi_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_t_cbi_status_callback: UFI CCI, ASC = 0x00, ASCQ = 0x00 umass0:umass_cam_action: 4:0:0:XPT_GET_TRAN_SETTINGS:. umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 4:0:0:XPT_GET_TRAN_SETTINGS:. umass0:umass_cam_action: 4:0:0:XPT_SET_TRAN_SETTINGS:. umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_cbi_dump_cmd: cmd = 12b (0x000000000000...), data = 0b, dir = no data phase umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umassX:umass_cam_rescan_callback: xpt0: Rescan succeeded umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset (da0:umass-sim0:0:0:0): got CAM status 0x4 (da0:umass-sim0:0:0:0): fatal error, failed to attach to device (da0:umass-sim0:0:0:0): lost device umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_t_cbi_reset1_callback: CBI reset! umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset (da0:umass-sim0:0:0:0): removing device entry From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 28 23:52:24 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96FC2106566B for ; Wed, 28 Oct 2009 23:52:24 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id D90F18FC08 for ; Wed, 28 Oct 2009 23:52:23 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=l81dycmF7dalFmfYEZ0A:9 a=B5MghczvbGh37a_O11qS5tVLSP8A:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1226379119; Thu, 29 Oct 2009 00:52:18 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org, yuri@rawbw.com Date: Thu, 29 Oct 2009 00:53:27 +0100 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <4AE89F8C.60000@rawbw.com> In-Reply-To: <4AE89F8C.60000@rawbw.com> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910290053.29271.hselasky@c2i.net> Cc: Subject: Re: USB floppy fails to attach X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 23:52:24 -0000 On Wednesday 28 October 2009 20:46:20 Yuri wrote: > My USB floppy dive fails to attach to device (see debug log below). > VendorID=0x0409 ProductID=0x0040 not mentioned in > /usr/src/sys/dev/usb/storage/umass.c > > Can this be that some that there is a simple fix for this, like adding a > quirk? > > Yuri > > -----log------- > > ugen1.2: at usbus1 > umass0: on usbus1 > umass0: UFI over CBI with CCI; quirks = 0x0000 > umass0:umass_cam_action: 4:-1:-1:XPT_PATH_INQ:. > umass0:4:0:-1: Attached to scbus4 > umass0:umass_cam_rescan: scbus4: scanning for 4:0:-1 > umass0:umass_cam_action: 4:-1:-1:XPT_PATH_INQ:. > umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. > umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. > umass0:umass_cam_action: 4:0:0:XPT_GET_TRAN_SETTINGS:. > umass0:umass_cam_action: 4:0:0:XPT_SET_TRAN_SETTINGS:. > umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. > umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x12, flags: 0x40, 6b > cmd/36b data/18b sense > umass0:umass_attach: Attach finishedumass0:umass_cbi_dump_cmd: cmd = 12b > (0x120000002400...), data = 36b, dir = in > > umass0:umass_transfer_start: transfer index = 4 > umass0:umass_t_cbi_data_read_callback: max_bulk=131072, data_rem=36 > umass0:umass_t_cbi_data_read_callback: max_bulk=131072, data_rem=0 > umass0:umass_transfer_start: transfer index = 8 > umass0:umass_t_cbi_status_callback: UFI CCI, ASC = 0x00, ASCQ = 0x00 > umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. > umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. > umass0:umass_cam_action: 4:0:0:XPT_GET_TRAN_SETTINGS:. > umass0:umass_cam_action: 4:0:0:XPT_SET_TRAN_SETTINGS:. > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x12, flags: 0x40, 6b > cmd/255b data/18b sense > umass0:umass_cbi_dump_cmd: cmd = 12b (0x12010000ff00...), data = 255b, > dir = in > umass0:umass_transfer_start: transfer index = 4 > umass0:umass_t_cbi_data_read_callback: max_bulk=131072, data_rem=255 > umass0:umass_t_cbi_data_read_callback: max_bulk=131072, data_rem=0 > umass0:umass_transfer_start: transfer index = 8 > umass0:umass_t_cbi_status_callback: UFI CCI, ASC = 0x00, ASCQ = 0x00 > umass0:umass_cam_action: 4:0:0:XPT_GET_TRAN_SETTINGS:. > umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. > umass0:umass_cam_action: 4:0:0:XPT_GET_TRAN_SETTINGS:. > umass0:umass_cam_action: 4:0:0:XPT_SET_TRAN_SETTINGS:. > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b > cmd/0b data/32b sense > umass0:umass_cbi_dump_cmd: cmd = 12b (0x000000000000...), data = 0b, dir > = no data phase > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b > cmd/0b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b > cmd/0b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b > cmd/0b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b > cmd/0b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b > cmd/0b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b > cmd/0b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b > cmd/0b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b > cmd/0b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b > cmd/0b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b > cmd/0b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_PATH_INQ:. > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b > cmd/8b data/32b sense > umassX:umass_cam_rescan_callback: xpt0: Rescan succeeded > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b > cmd/8b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b > cmd/8b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b > cmd/8b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b > cmd/8b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > (da0:umass-sim0:0:0:0): got CAM status 0x4 > (da0:umass-sim0:0:0:0): fatal error, failed to attach to device > (da0:umass-sim0:0:0:0): lost device > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b > cmd/8b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b > cmd/8b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b > cmd/8b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b > cmd/8b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > umass0:umass_cam_action: 4:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b > cmd/8b data/32b sense > umass0:umass_t_cbi_reset1_callback: CBI reset! > umass0:umass_tr_error: transfer error, USB_ERR_STALLED -> reset > (da0:umass-sim0:0:0:0): removing device entry Hi, Your device is stalling on the CBI reset command. Maybe there is a bug in the umass.c driver. Please investigate/experiment more with umass.c until the device works. Link to PDF specification for CBI is mentioned somewhere inside umass.c. -_HPS From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 29 06:50:51 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5301F10656A3 for ; Thu, 29 Oct 2009 06:50:50 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id D57168FC2A for ; Thu, 29 Oct 2009 06:50:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codelabs.ru; s=two; h=Date:From:To:Cc:Subject:Message-ID: Reply-To:References:MIME-Version:Content-Type:In-Reply-To: Sender; bh=rzdjl4zznLIKQA4G0GhnUq/jbsmY+2CcODK7u7uLVe8=; b=S22U5 oAu8m3eaqo7Ns5V9/a/VmwPstJJnFyVGlv7HfYJUdq05kGpCAvXp9NxAd7BG2A8P Ho6TnKX+PUgqauukJMAr9iFVArN2ZpqUArQ0XCzTqaH8RGJeg2biBimXJ8uBkMTM l4MhzQTCskLN9Har4E89kbxhr2vegCXN06vE3FUEuPjnjDSFxhTHq1DBAsroEVqQ 3OQnSDwoDByGQKoO2R6ziVYsPWqHPGaNq7YZfR905Rbfml6saQhiq6fdhXNsrpJW tkQGHLSN3IidqJcw1EqTyRFy9CToT61h35Wbt1paOoNwKnYHiS+8V1+UW4BOrsVj aiOwmxhXsJMe9M/Cw== Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1N3OqL-0003PZ-Rt; Thu, 29 Oct 2009 09:50:46 +0300 Date: Thu, 29 Oct 2009 09:50:43 +0300 From: Eygene Ryabinkin To: "Dorr H. Clark" Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Dxnq1zWXvFF0Q93v" Content-Disposition: inline In-Reply-To: Sender: rea-fbsd@codelabs.ru X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, freebsd-bugs@freebsd.org, freebsd-stable@freebsd.org Subject: Re: ptrace problem 6.x/7.x - can someone explain this? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2009 06:50:56 -0000 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Dorr, good day. Tue, Oct 27, 2009 at 05:32:34PM -0700, Dorr H. Clark wrote: > We believe ptrace has a problem in 6.3; we have not tried other > releases. The same code, however, exists in 7.1. And in HEAD too. > The bug was first encountered in gdb... > > (gdb) det > Detaching from program: /usr/local/bin/emacs, process 66217 > (gdb) att 66224 > Attaching to program: /usr/local/bin/emacs, process 66224 > Error accessing memory address 0x281ba5a4: Device busy. > (gdb) det > Detaching from program: /usr/local/bin/emacs, process 66224 > ptrace: Device busy. > (gdb) quit <--- target process 66224 dies here > > To isolate this problem, a wrote a simple minded test program was > written that just attached and detached. This test program found > even the very first detach fails with EBUSY (see test source below): > > $ ./test1 -p 66217 -c 1 -d 10 > pid 66217 count 1 delay 10 > Start of pass 0 > Calling PT_ATTACH pid 66217 addr 0x0 sig 0 > Calling PT_DETACH pid 66217 addr 0xffffffff sig 0 > Call 0 to PT_DETACH returned -1, errno 16 > > Once again, the target process died when the ptracing test program > exitted, as would be expected if a detach had failed. > > The failure return was coming from the following test in kern_ptrace() > in sys_process.c > > /* not currently stopped */ > if ((p->p_flag & (P_STOPPED_SIG | P_STOPPED_TRACE)) == 0 || > p->p_suspcount != p->p_numthreads || > (p->p_flag & P_WAITED) == 0) { > error = EBUSY; > goto fail; > } Yes, the ptraced process should have been waited for, even after the PT_ATTACH call. This is somewhat documented in ptrace(2), ----- ----- but I agree that the wording is a bit sloppy. I'll try to produce slightly modified explanation in the manual page and will post the patch here and as the PR. I had modified your example to visually display the results of each wait() call that is made after ptrace() invocation. Here we go: ----- $ ./test -p 45901 pid 45901 count 2 delay 5 Start of pass 0 Calling PT_ATTACH pid 45901 addr 0x0 sig 0 Attached wait() yield 0x117f: stopped by signal 17; <-- after PT_ATTACH wait() yield 0x57f: stopped by signal 5; <-- after PT_STEP Calling PT_DETACH pid 45901 addr 0xffffffffffffffff sig 0 Detached. ----- As you see, the process is stopped just after the PT_ATTACH with the signal 17, SIGSTOP. PT_STEP follows with the delivery of the SIGTRAP. Both of these signals should be processed by the parent's wait(). And PT_DETACH works, apart from one thing: on my 8.0 PT_DETACH leads to the segfault of the traced program. I hadn't yet tried it on the other versions, so may be there is some bug in the code of test.c, or some bug in the ptrace() implementation -- can't say for sure. If anyone knows why the program segfaults -- please, speak up. The modified source of the test.s is attached. > This is applied to all operations except PT_TRACE_ME, PT_ATTACH, and > some instances of PT_CLEAR_STEP. > > P_WAITED is generally not true. In particular, it's not set > automatically when a process is PT_ATTACHed. It is cleared by > PT_DETACH and again when ptrace sends a signal (PT_CONTINUE, > PT_DETACH.) _But_ it's set in only two places, and they aren't in > ptrace code. > > 2 sys/kern/kern_exit.c kern_wait 773 p->p_flag |= P_WAITED; > 3 compat/svr4/svr4_misc.c svr4_sys_waitsys 1351 q->p_flag |= P_WAITED; > > The relevant one is the first one, primarily. Here's the code: > > mtx_lock_spin(&sched_lock); > if ((p->p_flag & P_STOPPED_SIG) && > (p->p_suspcount == p->p_numthreads) && > (p->p_flag & P_WAITED) == 0 && > (p->p_flag & P_TRACED || options & WUNTRACED)) { > mtx_unlock_spin(&sched_lock); > p->p_flag |= P_WAITED; > sx_xunlock(&proctree_lock); > td->td_retval[0] = p->p_pid; > if (status) > *status = W_STOPCODE(p->p_xstat); > PROC_UNLOCK(p); > return (0); > } > mtx_unlock_spin(&sched_lock); > > So it's only set on processes which are already traced. But it's not > set until someone calls wait4() on them - or the equivalent sysV > compatability routine. > > Gdb doesn't always wait4() for processes immediately opon tracing > them, and the ptrace man page does not imply this is needed. Hmm, there is at least one thread on the simular matter, http://sourceware.org/ml/gdb/2008-12/msg00041.html and people are saying that wait() still should be present. > Moreover, it's not clear why it should matter. The process > needs to be stopped in order for it to make sense to do most > of the things ptrace does. But - why should it need to be waited for? To see if it was really stopped, I presume. > And what kind of sense does this make to someone writing a debugging > tool, where the natural logic seems to be: > - attach to process - wait for the process' attachment by doing wait(). > - look at some stuff > - stick in some kind of breakpoint or similar and start it going again > (or 'step' it) > - wait for it to stop > - look at and modify stuff > - detach, or set it moving again > > By way of experiment, the test for P_WAITED was removed. Gdb no longer had > problems, and no new issues with gdb were encountered (although this > was just interactive, no "gdb coverage test" was attempted). By the way, I can't reproduce gdb faults with the 8.0 sources. Will try 7.x, but I think that I have no 6.x handy. -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # --Dxnq1zWXvFF0Q93v-- From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 29 15:49:57 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8690A106566C for ; Thu, 29 Oct 2009 15:49:57 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1098FC0C for ; Thu, 29 Oct 2009 15:49:56 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id d23so923541fga.13 for ; Thu, 29 Oct 2009 08:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=WgmMKNyKSTHK+l+qX+mikB848UlBTL8kq46OdxNpW0w=; b=uDjlkASjL2Etqo3Zr25JO/pH0q/VcPY+y9ROmbqxjLbwPnceeNrJ/dqDgXOV15/qmi RXTy+eAOz/TcSqIFikEemYKStaoJscyTUytsBI2wpfjWraVHZljISbpKnMx0MmTgy6Ff BK1gXcjC8UW3ZPh9VA+EGwttLbPwhqy+HM8LE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=fkP/yjc2gQrhUpgp30G/Sc5UxY2jlvqV7EOnl+WaW12q/QHeS3Ym/QrTtWEwS3iIJA k4SxGPpDLBRoM+C41D2EH1kW+3RapvekRXWQYDtytu+lAcdi/nDnA+1N3M9khUEydEgb /zuWaRyddQnTBWqreEheuYcaf1dXMDT1rCFRM= MIME-Version: 1.0 Received: by 10.223.161.205 with SMTP id s13mr33028fax.70.1256831394451; Thu, 29 Oct 2009 08:49:54 -0700 (PDT) Date: Thu, 29 Oct 2009 10:49:54 -0500 Message-ID: <2d1264630910290849k2ca29237ubb25cc3b7313ec26@mail.gmail.com> From: Jason Harmening To: gonzo@bluezbox.com Content-Type: text/plain; charset=ISO-8859-1 X-Mailman-Approved-At: Thu, 29 Oct 2009 20:28:09 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: MIPS: bus_dma(9) and cache problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2009 15:49:57 -0000 > 1. code modifies data in block and this modification ends up in > cache and is not written back to memory > 2. right after this code calls bus_dmamap_sync for this buffer > and as a result cache invalidation is performed > 3. Cache function operates on cache line size-aligned addresses > and the block in question happens to share the same cache line > with the buffer. So modification made at step (1) is lost. What sync operation are you doing? At least for PREREAD or PREWRITE, I'd expect any dirty cache lines to be flushed to RAM. If this isn't happening, then you may want to submit a bug report. BTW, if you haven't already found it the MIPS sync code for 9-CURRENT is here: http://fxr.watson.org/fxr/source/mips/mips/busdma_machdep.c#L760 From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 30 18:05:49 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 818D71065679; Fri, 30 Oct 2009 18:05:49 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id DC1828FC17; Fri, 30 Oct 2009 18:05:48 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.44,655,1249250400"; d="scan'208";a="17215823" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 30 Oct 2009 19:05:46 +0100 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id EE9761B07BE; Fri, 30 Oct 2009 19:05:46 +0100 (CET) Date: Fri, 30 Oct 2009 19:05:46 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , Rong-En Fan Message-ID: In-Reply-To: <86zl7ecnyg.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Antony Mawer , Ed Schouten , Alexander Best , pluknet , freebsd-hackers@FreeBSD.ORG Subject: Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2009 18:05:49 -0000 Dag-Erling Sm=F8rgrav schrieb am 2009-10-26: > Rong-En Fan writes: > > devel/ncurses-devel will be updated this week. For base's ncurses, > > I'll > > check with Thomas Dickey to see if there will be 5.8 soon. If not, > > we > > can also import a recent snapshot. > There is no reason to wait, nor to import an entire snapshot. Se my > earlier message to Alexander. > DES rafan just mfc'ed the patch. could we also have the fix in 8.0-RELEASE? sho= uld get approved by re@. alex From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 31 02:00:00 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CE08106566C; Sat, 31 Oct 2009 02:00:00 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay2.uni-muenster.de (ZIVM-EXRELAY2.UNI-MUENSTER.DE [128.176.192.15]) by mx1.freebsd.org (Postfix) with ESMTP id 7BD198FC1A; Sat, 31 Oct 2009 01:59:59 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.44,657,1249250400"; d="scan'208";a="227686808" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay2.uni-muenster.de with ESMTP; 31 Oct 2009 02:59:46 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 6C3BB1B0766; Sat, 31 Oct 2009 02:59:46 +0100 (CET) Date: Sat, 31 Oct 2009 02:59:46 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: John Baldwin , Message-ID: In-Reply-To: <200910211340.39872.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Alexander Best , Robert Watson , Nate Eldredge Subject: Re: mmap(2) segaults with certain len values and MAP_ANON|MAP_FIXED X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2009 02:00:00 -0000 John Baldwin schrieb am 2009-10-21: > On Wednesday 21 October 2009 11:30:51 am Alexander Best wrote: > > Robert Watson schrieb am 2009-10-21: > > > On Wed, 21 Oct 2009, Alexander Best wrote: > > > >this code serves only one purpose: to trigger a segfault. i > > > >don't > > > >use the code for any other purpose. i was under the impression > > > >that > > > >mmap() should either succeed or fail (tertium non datur). mmap's > > > >manual doesn't say anything about mmap() causing segfaults. > > > Have you tried ktracing the application? I think you'll find > > > that > > > mmap(2) system call succeeded fine, and that the segfault comes > > > from > > > attempting to execute the address in libc on return to userspace, > > > as > > > a result of libc not being at that address anymore (since you > > > removed its mapping). You can use procstat -v to inspect address > > > space use by processes, but as a general rule you don't want to > > > pass > > > anything other than an address of 0x0 to mmap(2) unless you're > > > very > > > carefully managing the address space of the process. Many > > > userspace > > > libraries are involved in using that address space, but > > > especially > > > the runtime linker which begins execution in userspace when a > > > binary > > > is started. > > > Robert N M Watson > > > Computer Laboratory > > > University of Cambridge > > you're right. this kdump shows that the segfault isn't being caused > > by the > > mmap() call: > > 88343 mmap_test CALL > > mmap(0x1000,0x80047000,PROT_NONE,MAP_FIXED|MAP_ANON,0xffffffff,0,0) > > 88343 mmap_test RET mmap 4096/0x1000 > > 88343 mmap_test PSIG SIGSEGV SIG_DFL > > 88343 mmap_test NAMI "mmap_test.core" > > thanks for clearing things up. > > however i stil think mentioning this situation in the mmap(2) > > manual (maybe in > > section MAP_FIXED) would be a good idea. > I'm not sure it is useful to attempt to enumerate all the possible > ways one > can shoot one's own foot using mmap(2) in the manual page. The list > would be > quite long and would require a large amount of imagination. In > effect, you > are asking for a manual page to document all the possible bugs one > could have > and manual pages in general do not do that. you're probably right. documenting all things one can do wrong using mmap isn't what the manual is supposed to do. thanks for the help. alex From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 31 02:38:33 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76F0B1065670; Sat, 31 Oct 2009 02:38:33 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay2.uni-muenster.de (ZIVM-EXRELAY2.UNI-MUENSTER.DE [128.176.192.15]) by mx1.freebsd.org (Postfix) with ESMTP id D0C118FC1C; Sat, 31 Oct 2009 02:38:32 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.44,657,1249250400"; d="txt'?scan'208";a="227687925" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay2.uni-muenster.de with ESMTP; 31 Oct 2009 03:38:31 +0100 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 8383E1B0751; Sat, 31 Oct 2009 03:38:31 +0100 (CET) Date: Sat, 31 Oct 2009 03:38:24 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: John Baldwin , Message-ID: In-Reply-To: <200910211349.10174.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=+permail-200910310238241e86ffa800003202-a_best01+ Cc: Alexander Best Subject: Re: mmap(2) with MAP_ANON honouring offset although it shouldn't X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2009 02:38:33 -0000 This is a MIME encoded multipart message. --+permail-200910310238241e86ffa800003202-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit John Baldwin schrieb am 2009-10-21: > On Wednesday 21 October 2009 11:51:04 am Alexander Best wrote: > > although the mmap(2) manual states in section MAP_ANON: > > "The offset argument is ignored." > > this doesn't seem to be true. running > > printf("%p\n", mmap((void*)0x1000, 0x1000, PROT_NONE, MAP_ANON, -1, > > 0x12345678)); > > and > > printf("%p\n", mmap((void*)0x1000, 0x1000, PROT_NONE, MAP_ANON, -1, > > 0)); > > produces different outputs. i've attached a patch to solve the > > problem. the > > patch is similar to the one proposed in this PR, but should apply > > cleanly to > > CURRENT: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/71258 > A simpler patch would be to simply set pos = 0 below the MAP_STACK > line if > MAP_ANON is set. how about the following patch. problem seems to be that pos = 0 needs to be set before pageoff is being calculated. i've tested mmap with MAP_STACK and the offset gets discarded just as documented in mmap(2). with the patch the offset handling with MAP_ANON and MAP_STACK (implies MAP_ANON) are the same. another short question: why does the second call when doing printf("%p\n", mmap((void*)0x1000, 0x1000, PROT_READ|PROT_WRITE, MAP_STACK, -1, 0x0)); printf("%p\n", mmap((void*)0x1000, 0x1000, PROT_READ|PROT_WRITE, MAP_STACK, -1, 0x0)); fail? doesn't MAP_STACK allow mapping the same region twice? printf("%p\n", mmap((void*)0x1000, 0x1000, PROT_READ|PROT_WRITE, MAP_STACK, -1, 0x0)); printf("%p\n", mmap((void*)0x2000, 0x1000, PROT_READ|PROT_WRITE, MAP_STACK, -1, 0x0)); works just as expected. cheers. alex --+permail-200910310238241e86ffa800003202-a_best01+ Content-Type: text/plain Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="vmmmap.c.patch.txt" LS0tIC91c3Ivc3JjL3N5cy92bS92bV9tbWFwLmMJMjAwOS0xMC0yOCAyMTozNzo1My4wMDAwMDAw MDAgKzAxMDAKKysrIC4vdm1fbW1hcC5jCTIwMDktMTAtMzEgMDM6MjI6NDQuMDAwMDAwMDAwICsw MTAwCkBAIC0yNDEsOSArMjQxLDExIEBACiAJCSAgICAoKHByb3QgJiAoUFJPVF9SRUFEIHwgUFJP VF9XUklURSkpICE9IChQUk9UX1JFQUQgfCBQUk9UX1dSSVRFKSkpCiAJCQlyZXR1cm4gKEVJTlZB TCk7CiAJCWZsYWdzIHw9IE1BUF9BTk9OOwotCQlwb3MgPSAwOwogCX0KIAorCWlmIChmbGFncyAm IE1BUF9BTk9OKQorCQlwb3MgPSAwOworCiAJLyoKIAkgKiBBbGlnbiB0aGUgZmlsZSBwb3NpdGlv biB0byBhIHBhZ2UgYm91bmRhcnksCiAJICogYW5kIHNhdmUgaXRzIHBhZ2Ugb2Zmc2V0IGNvbXBv bmVudC4KQEAgLTMwMCw3ICszMDIsNiBAQAogCQloYW5kbGUgPSBOVUxMOwogCQloYW5kbGVfdHlw ZSA9IE9CSlRfREVGQVVMVDsKIAkJbWF4cHJvdCA9IFZNX1BST1RfQUxMOwotCQlwb3MgPSAwOwog CX0gZWxzZSB7CiAJCS8qCiAJCSAqIE1hcHBpbmcgZmlsZSwgZ2V0IGZwIGZvciB2YWxpZGF0aW9u IGFuZAo= --+permail-200910310238241e86ffa800003202-a_best01+-- From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 31 13:30:50 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C27D010656A7; Sat, 31 Oct 2009 13:30:50 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id 2631F8FC20; Sat, 31 Oct 2009 13:30:49 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.44,658,1249250400"; d="scan'208";a="286985835" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 31 Oct 2009 14:30:48 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 3E9771B0766; Sat, 31 Oct 2009 14:30:48 +0100 (CET) Date: Sat, 31 Oct 2009 14:30:47 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , Alexander Best Message-ID: In-Reply-To: <86d44ae5do.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Ed Schouten , freebsd-hackers@freebsd.org, pluknet , Antony Mawer , rafan@freebsd.org Subject: Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2009 13:30:50 -0000 Dag-Erling Sm=F8rgrav schrieb am 2009-10-26: > Alexander Best writes: > > the patch got committed by thomas and is included in > > ncurses-5.7-20091024.patch.gz. > > i guess it will be included in our base version of ncurses once 5.8 > > gets > > released, but the patch should quickly make it into the port > > version of > > ncurses. > Apply the upstream patch to vendor/ncurses/dist and merge it to head. > Subversion will DTRT when you import 5.8. I believe this is > documented > on the wiki. > DES great news. so should the PR be closed or should it remain in patched state= in order for 7.x to get patched? another question: how about our ncurses base version in general? should it remain the ncurses release version with our own patchset or would it be bet= ter to update it more frequently with the official ncurses patchsets? i guess t= his is the way acpi in the base dir is being handled. vendor updates get integrated on the fly into the base dir. on the other hand acpi isn't in the ports dir. if one needs cutting edge ncurses there's devel/ncurses-devel. so there's a reason to only to update = the base version of ncurses when a new release is happening (5.8 e.g.). what's your opinion? alex