From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 14 00:13:38 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 B7CD01065670 for ; Sun, 14 Jun 2009 00:13:38 +0000 (UTC) (envelope-from freebsd@akruijff.dds.nl) Received: from CPSMTPM-EML104.kpnxchange.com (cpsmtpm-eml104.kpnxchange.com [195.121.3.8]) by mx1.freebsd.org (Postfix) with ESMTP id 438088FC0C for ; Sun, 14 Jun 2009 00:13:37 +0000 (UTC) (envelope-from freebsd@akruijff.dds.nl) Received: from ip51cc8423.speed.planet.nl ([81.204.132.35]) by CPSMTPM-EML104.kpnxchange.com with Microsoft SMTPSVC(7.0.6001.18000); Sun, 14 Jun 2009 02:13:36 +0200 Received: from Alex1.lan (localhost [127.0.0.1]) by ip51cc8423.speed.planet.nl (8.14.2/8.14.2) with ESMTP id n5E0Da0s007589; Sun, 14 Jun 2009 02:13:36 +0200 (CEST) (envelope-from freebsd@akruijff.dds.nl) Received: (from akruijff@localhost) by Alex1.lan (8.14.2/8.14.2/Submit) id n5E0Daxv007582; Sun, 14 Jun 2009 02:13:36 +0200 (CEST) (envelope-from freebsd@akruijff.dds.nl) X-Authentication-Warning: Alex1.lan: akruijff set sender to freebsd@akruijff.dds.nl using -f Date: Sun, 14 Jun 2009 02:13:36 +0200 From: Alex de Kruijff To: Dag-Erling Sm??rgrav Message-ID: <20090614001336.GG1462@Alex1.lan> References: <20090613110618.GA1462@Alex1.lan> <20090613120117.GA28947@pm513-1.comsys.ntu-kpi.kiev.ua> <20090613133238.GC1462@Alex1.lan> <86prd7x4q1.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86prd7x4q1.fsf@ds4.des.no> User-Agent: Mutt/1.4.2.3i X-OriginalArrivalTime: 14 Jun 2009 00:13:36.0363 (UTC) FILETIME=[F5FD5BB0:01C9EC84] Cc: Andrey Simonenko , freebsd-hackers@freebsd.org Subject: Re: Porting problem with gnu configure (c++ -V) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd@akruijff.dds.nl List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 00:13:39 -0000 On Sat, Jun 13, 2009 at 10:23:50PM +0200, Dag-Erling Sm??rgrav wrote: > Alex de Kruijff writes: > > Andrey Simonenko writes: > > > It's better to see your version for configure.ac, since without its > > > content it is hard to say something. > > Oke here it is: > > This configure.ac can not possibly have produced the configure.log you > posted earlier. Can you please show us the *real* configure.ac and / or > configure.log? > > DES > -- > Dag-Erling Sm??rgrav - des@des.no The file is processed by sed, but the only difference is: -AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) +AC_INIT(SameSame, 1.3, samesame@akruijff.dds.nl) There is no configure.log. -- Alex Please copy the original recipients, otherwise I may not read your reply. http://samesame.kruijff.org/ From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 14 00:44:40 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 CE32F1065670 for ; Sun, 14 Jun 2009 00:44:40 +0000 (UTC) (envelope-from jgreco@aurora.sol.net) Received: from mail2.sol.net (mail2.sol.net [206.55.64.73]) by mx1.freebsd.org (Postfix) with ESMTP id 909278FC0A for ; Sun, 14 Jun 2009 00:44:40 +0000 (UTC) (envelope-from jgreco@aurora.sol.net) Received: from aurora.sol.net (aurora.sol.net [206.55.65.130]) by mail2.sol.net (8.14.1/8.14.1/SNNS-1.04) with ESMTP id n5E0icvB078426; Sat, 13 Jun 2009 19:44:39 -0500 (CDT) Received: (from jgreco@localhost) by aurora.sol.net (8.12.8p1/8.12.9/Submit) id n5E0iqYN072978; Sat, 13 Jun 2009 19:44:52 -0500 (CDT) From: Joe Greco Message-Id: <200906140044.n5E0iqYN072978@aurora.sol.net> To: peterjeremy@optushome.com.au (Peter Jeremy) Date: Sat, 13 Jun 2009 19:44:52 -0500 (CDT) In-Reply-To: <20090613230749.GA73896@server.vk2pj.dyndns.org> from "Peter Jeremy" at Jun 14, 2009 09:07:50 AM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Maybe confused about AMD64 / i386 compatibility 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, 14 Jun 2009 00:44:41 -0000 > On 2009-Jun-13 15:55:29 -0500, Joe Greco wrote: > >Adding a SIL3112A gives us the SATA. > > These are known to cause data corruption (check the archives). I > wouldn't trust anything that has passed through a SIL chip without > independent validation. I already said it had been validated. gunzip|restore tvf was happy with the entire thing. A FreeBSD 6.1R/amd64 box is currently happily RESTORING the SIL-written gzip'ed file using a USB-to-SATA adaptor, TOO, so all evidence is that the on-disk file data is sane. I checked for general data corruption at the device level with md5 and posted a brief summary of those results; the results are that everything appears to be reading the disk blocks sanely. That was why I posted such a long summary of what had been done; I felt certain someone would try to claim dodgy hardware. The SIL does seem to spit off lots of spurious interrupts, and does not work at all with non-native SATA drives; being a backup system, I had already stress tested various combinations of things, and I'm aware of the various PC hardware deficiencies. So, let me re-summarize and simplify the issue to clarify: I have a large (~400GB) file on a large (~1.5TB) filesystem created on 7.2R-i386. 7.2R-i386 reads the file correctly (via SIL or via USB-to-SATA). 6.1R-amd64 reads the file correctly (via USB-to-SATA). 7.1R-amd64 does NOT read the file correctly (via USB-to-SATA). In all of the above cases, the underlying hardware and device drivers appear to be returning the same data, as evidenced by dd |md5 of random portions of the disk. In other words, the SIL is not in the equation. ... JG -- Joe Greco - sol.net Network Services - Milwaukee, WI - http://www.sol.net "We call it the 'one bite at the apple' rule. Give me one chance [and] then I won't contact you again." - Direct Marketing Ass'n position on e-mail spam(CNN) With 24 million small businesses in the US alone, that's way too many apples. From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 14 01:03:13 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 7C51D1065674 for ; Sun, 14 Jun 2009 01:03:13 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from fallbackmx10.syd.optusnet.com.au (fallbackmx10.syd.optusnet.com.au [211.29.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id 7C5878FC13 for ; Sun, 14 Jun 2009 01:03:12 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by fallbackmx10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n5DN7s5g015072 for ; Sun, 14 Jun 2009 09:07:54 +1000 Received: from server.vk2pj.dyndns.org (c122-106-216-167.belrs3.nsw.optusnet.com.au [122.106.216.167]) by mail17.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n5DN7pPD008016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 14 Jun 2009 09:07:52 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id n5DN7oWT026370; Sun, 14 Jun 2009 09:07:50 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id n5DN7o9n026369; Sun, 14 Jun 2009 09:07:50 +1000 (EST) (envelope-from peter) Date: Sun, 14 Jun 2009 09:07:50 +1000 From: Peter Jeremy To: Joe Greco Message-ID: <20090613230749.GA73896@server.vk2pj.dyndns.org> References: <200906132055.n5DKtTAW063495@aurora.sol.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline In-Reply-To: <200906132055.n5DKtTAW063495@aurora.sol.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.19 (2009-01-05) Cc: freebsd-hackers@freebsd.org Subject: Re: Maybe confused about AMD64 / i386 compatibility 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, 14 Jun 2009 01:03:13 -0000 --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2009-Jun-13 15:55:29 -0500, Joe Greco wrote: >Adding a SIL3112A gives us the SATA. These are known to cause data corruption (check the archives). I wouldn't trust anything that has passed through a SIL chip without independent validation. --=20 Peter Jeremy --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAko0MUUACgkQ/opHv/APuIdFogCffCYOEmsdCz4NfsHz/HZqUgsV BJAAn04SHOxv1OhRA+td7Dxj3cl7XpzX =QE3y -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 14 01:04:11 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 107FD1065680; Sun, 14 Jun 2009 01:04:11 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 757F98FC1E; Sun, 14 Jun 2009 01:04:10 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp121-45-137-119.lns11.adl6.internode.on.net [121.45.137.119]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n5E147q5056799 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 14 Jun 2009 10:34:08 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Adrian Chadd Date: Sun, 14 Jun 2009 10:33:54 +0930 User-Agent: KMail/1.9.10 References: <200906140015.44560.doconnor@gsoft.com.au> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart23491524.SBdZhJSTAu"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200906141034.01890.doconnor@gsoft.com.au> X-Spam-Score: -1.237 () AWL,BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: Booting from FAT(32) 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, 14 Jun 2009 01:04:11 -0000 --nextPart23491524.SBdZhJSTAu Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sun, 14 Jun 2009, Adrian Chadd wrote: > I believe there's some NetBSD FAT32 aware loader. Dianora stumbled > across it when I was talking about this very thing earlier. I thought the FreeBSD loader spoke FAT32 already, although now I go and=20 have a proper look I see otherwise :( > I've been meaning to trial it out actually. It sure would be > interesting to boot a kernel/mfs off of a DOS bootable FAT USB. I think you can do it if you makefs /boot and feed it to syslinux using=20 memdisk (I plan on trying this today). I was thinking the loader had FAT support though so I could just get=20 Syslinux to load the loader then it would do the rest. Although heck=20 how hard can read only FAT support be to write? :) =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart23491524.SBdZhJSTAu Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iD8DBQBKNEyB5ZPcIHs/zowRAtxwAJ9dzxf1GEJMAaG9pQXnEdDvU+q1FwCgmtgl U//jR4M/KGphQMI4x2S4KKY= =J+uN -----END PGP SIGNATURE----- --nextPart23491524.SBdZhJSTAu-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 14 04:40: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 98ABA106564A; Sun, 14 Jun 2009 04:40:20 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id E3BFF8FC12; Sun, 14 Jun 2009 04:40:18 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp121-45-137-119.lns11.adl6.internode.on.net [121.45.137.119]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n5E4eHIs062185 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 14 Jun 2009 14:10:17 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Adrian Chadd Date: Sun, 14 Jun 2009 14:10:13 +0930 User-Agent: KMail/1.9.10 References: <200906140015.44560.doconnor@gsoft.com.au> <200906141034.01890.doconnor@gsoft.com.au> In-Reply-To: <200906141034.01890.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2601132.gjJxcnWojr"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200906141410.14771.doconnor@gsoft.com.au> X-Spam-Score: -1.244 () AWL,BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: Booting from FAT(32) 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, 14 Jun 2009 04:40:20 -0000 --nextPart2601132.gjJxcnWojr Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sun, 14 Jun 2009, Daniel O'Connor wrote: > > I've been meaning to trial it out actually. It sure would be > > interesting to boot a kernel/mfs off of a DOS bootable FAT USB. > > I think you can do it if you makefs /boot and feed it to syslinux > using memdisk (I plan on trying this today). I used Luigi's iso2flash.sh script (the guts thereof) and it worked fine, i= e.. mkdir /tmp/boot cp -r /boot /tmp/boot [ fixup /tmp/boot/boot how you like ] makefs -t ffs -o bsize=3D4096 -o fsize=3D512 -f 50 /tmp/boot.img /tmp/boot bsdlabel -Bw -f /tmp/boot.img auto bsdlabel -f /tmp/boot.img | sed -e '/ c:/{p;s/c:/a:/;}' | bsdlabel -R -f /= tmp/boot.img /dev/stdin gzip /tmp/boot.img (Using -B obviated the need for the dd magic in the original script) Copy /tmp/boot.img.gz to the USB stick and then you can use a syslinux conf= =20 like.. label FreeBSD kernel memdisk append initrd=3Dboot.img.gz I got the kernel to mount root off the FAT32 partition although you need to make sure /dev exists and all the binaries & libs it wants are present. (eg mkdir /mnt/dev ; cp -r /bin /sbin /lib /libexec /mnt) =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart2601132.gjJxcnWojr Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iD8DBQBKNH8u5ZPcIHs/zowRAlXYAJ9pNfI4gxKeeNhtjsP8kwq4zcpsUwCfdK3r 1GaLvIjS7VGFolIqb81hE1M= =9IU4 -----END PGP SIGNATURE----- --nextPart2601132.gjJxcnWojr-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 14 12:39:39 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 E5DE11065673; Sun, 14 Jun 2009 12:39:39 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from kennaway-macbookpro.config (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 37A1B8FC1C; Sun, 14 Jun 2009 12:39:38 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <4A34EF89.10107@FreeBSD.org> Date: Sun, 14 Jun 2009 13:39:37 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: John Baldwin References: <200904270150.31912.pieter@degoeje.nl> <7d6fde3d0904261927s1a67cf85jc982c1a68e30e081@mail.gmail.com> <200904300846.41576.jhb@freebsd.org> In-Reply-To: <200904300846.41576.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: acpi , freebsd-hackers@freebsd.org, freebsd-acpi@freebsd.org, Pieter de Goeje , Garrett Cooper , freebsd-performance@freebsd.org Subject: Re: ACPI-fast default timecounter, but HPET 83% faster 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, 14 Jun 2009 12:39:41 -0000 John Baldwin wrote: > On Sunday 26 April 2009 10:27:42 pm Garrett Cooper wrote: >> I'm seeing similar results. >> >> [root@orangebox /usr/home/gcooper]# dmesg | grep 'Timecounter "' >> Timecounter "i8254" frequency 1193182 Hz quality 0 >> Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 >> Timecounter "HPET" frequency 14318180 Hz quality 900 >> [root@orangebox /usr/home/gcooper]# ./cgt >> 1369355 >> [root@orangebox /usr/home/gcooper]# sysctl >> kern.timecounter.hardware="ACPI-fast" >> kern.timecounter.hardware: HPET -> ACPI-fast >> [root@orangebox /usr/home/gcooper]# ./cgt >> 772289 >> >> Why's the default ACPI-fast? For power-saving functionality or because >> of the `quality' factor? What is the criteria that determines the >> `quality' of a clock as what's being reported above (I know what >> determines the quality of a clock visually from a oscilloscope =])? > > I suspect that the quality of the HPET driver is lower simply because no one > had measured it previously and HPET is newer and less "proven". > From memory, HPET was massively slower on some of the AMD test hardware I was using. There was a thread about it on one of the mailing lists, but I can't find it right now. Kris From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 14 15:44:41 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 AD1421065702; Sun, 14 Jun 2009 15:44:41 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from ramstind.fig.ol.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:250:4ff:fe43:9d15]) by mx1.freebsd.org (Postfix) with ESMTP id 1B4F28FC1C; Sun, 14 Jun 2009 15:44:40 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from ramstind.fig.ol.no (trond@localhost [127.0.0.1]) by ramstind.fig.ol.no (8.13.8/8.13.8) with ESMTP id n5EFiW2x034926 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 14 Jun 2009 17:44:32 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by ramstind.fig.ol.no (8.13.8/8.13.8/Submit) with ESMTP id n5EFiWZ7034922; Sun, 14 Jun 2009 17:44:32 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: ramstind.fig.ol.no: trond owned process doing -bs Date: Sun, 14 Jun 2009 17:44:27 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: freebsd-hackers@freebsd.org, FreeBSD current In-Reply-To: Message-ID: <20090614172116.C55547@ramstind.fig.ol.no> References: <4A2E84DC.1010900@unsane.co.uk> Organization: =?ISO-8859-1?Q?Fagskolen_i_Gj=F8vik?= OpenPGP: url=http://fagskolen.gjovik.no/~trond/trond.key MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1121150211-1244993917=:55547" Content-ID: <20090614173858.T55547@ramstind.fig.ol.no> X-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_50 autolearn=ham X-Spam-Checker-Version: SpamAssassin on ramstind.fig.ol.no Cc: Subject: Re: sysinstall, GJOURNAL and ZFS 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, 14 Jun 2009 15:44:42 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1121150211-1244993917=:55547 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1 Content-Transfer-Encoding: 8BIT Content-ID: <20090614173858.M55547@ramstind.fig.ol.no> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, 13 Jun 2009 01:07+0300, Dan Naumov wrote: > screen: The screen states that in order to do a > manual installation " login as root, and follow the instructions > given in the file /README". There is no indication regarding how the > user is supposed to open the README file, at least ONE sane option > should be suggested (for example: login as root and type "vi README" > at the command prompt to read the instructions regarding installing > FreeBSD manually. Although longer to type, "less /README" would be a better alternative than using vi to view the contents of the file. You could otherwise risk the user destroying the README file due to unfamiliarity with this particular editor. OTOH, why not adopt OpenBSD's afterboot(8) man page? === Almost completely off-topic: An /altroot mechanism would be nice to have in FreeBSD. ;-) There are at least two schools of thought regarding /altroot. One school of thought would be to simply dd the contents of the root partition on to the altroot partition and run fsck on /altroot, assuming /root and /altroot have the same size. I believe this is how OpenBSD handles /altroot when configured to do so. My school of thought, given a system with more than one hard drive, physical or virtual (as in RAID volumes), is to have /altroot appear as a regular root file system (partition a) on the other drive and thus being able to (manually) boot from the available root file system. Both hard drives should be made bootable with the EasyBoot loader placed in the MBRs and with regular boot blocks in the FreeBSD slices. Of course, /altroot should normally remain unmounted. There is also the possible need of having /etc/fstab files with specific contents for each root file system. For instance, /'s /altroot should be mounted as /altroot's /. I'm not sure how to handle this scenario with either installers as you probably need to perform the installation twice, that's how I did it on a couple of recently installed systems, not to mention how to handle make install{kernel,world} for both of the two root file systems. Just some random thoughts, Trond. - -- - ---------------------------------------------------------------------- Trond Endrestøl | Trond.Endrestol@fagskolen.gjovik.no ACM, NAS, NUUG, SAGE, USENIX | FreeBSD 6.2-STABLE & Pine 4.64 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFKNRrfbYWZalUoElsRAnzTAJ0StVu1t2FY1rr9JjI2MVQ0jexsAgCfZICv kbpbqm4Vzv/vGYVTZEPwmfw= =dPhW -----END PGP SIGNATURE----- --0-1121150211-1244993917=:55547-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 14 22:49:14 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 5F870106564A for ; Sun, 14 Jun 2009 22:49:14 +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 217628FC1D for ; Sun, 14 Jun 2009 22:49:14 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 36E3E6D418; Mon, 15 Jun 2009 00:49:13 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 18EFE84498; Mon, 15 Jun 2009 00:49:13 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: freebsd@akruijff.dds.nl References: <20090613110618.GA1462@Alex1.lan> <20090613120117.GA28947@pm513-1.comsys.ntu-kpi.kiev.ua> <20090613133238.GC1462@Alex1.lan> <86prd7x4q1.fsf@ds4.des.no> <20090614001336.GG1462@Alex1.lan> Date: Mon, 15 Jun 2009 00:49:12 +0200 In-Reply-To: <20090614001336.GG1462@Alex1.lan> (Alex de Kruijff's message of "Sun, 14 Jun 2009 02:13:36 +0200") Message-ID: <86k53ev3br.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Andrey Simonenko , freebsd-hackers@freebsd.org Subject: Re: Porting problem with gnu configure (c++ -V) 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, 14 Jun 2009 22:49:14 -0000 Alex de Kruijff writes: > There is no configure.log. There is a config.log which you posted, but it was corrupted by your MUA. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 06:14:09 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 020A0106566B for ; Mon, 15 Jun 2009 06:14:09 +0000 (UTC) (envelope-from malathiramya@gmail.com) Received: from mail-ew0-f212.google.com (mail-ew0-f212.google.com [209.85.219.212]) by mx1.freebsd.org (Postfix) with ESMTP id 89D5F8FC18 for ; Mon, 15 Jun 2009 06:14:08 +0000 (UTC) (envelope-from malathiramya@gmail.com) Received: by ewy8 with SMTP id 8so3947063ewy.43 for ; Sun, 14 Jun 2009 23:14: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=jzsfvht/eNffXgNEte5H45uI2H+WPF2ahrEje64/XqI=; b=UetMWsvb2bO4D/qm+bx8pZIPCBgHiVKIrShJr/Lcu6td06F6HBQyq57c5r/6xuwDNJ JKuD5Y1oGqpWVo0PcvnQ0/KdDIW9quGmFWQfwS3nBL5qpdgqZ2BdB5VvxK2KAteBg8Cs eaykUcbX03/WmEuEVXDJJBBWOfZLsn/yVwK8E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=REUtAjfaF/Wi4vuFy1U0EEk64jCVODwZJBW1tkh78ujPQxyFfVQ2RzLrQ/N8tNPPgL 6bB60xLUmv4YjJTwHO/BI4baP45rv3a/nG/sm/1OpqitmKYC1/46ogtZ+9KLeZe05/ek WLjw+XkA74xHdRFiKyiXSS3YM8y8gtzsfJtYk= MIME-Version: 1.0 Received: by 10.210.134.6 with SMTP id h6mr7665916ebd.35.1245045137566; Sun, 14 Jun 2009 22:52:17 -0700 (PDT) Date: Mon, 15 Jun 2009 11:22:17 +0530 Message-ID: From: malathi selvaraj To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: good morning to all 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, 15 Jun 2009 06:14:09 -0000 i am new one to freeBSD, kindly guide me -- S.MALATHI From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 06:36:39 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 359E61065670 for ; Mon, 15 Jun 2009 06:36:39 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id EEBB08FC12 for ; Mon, 15 Jun 2009 06:36:38 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 544A61CC2E; Mon, 15 Jun 2009 08:36:38 +0200 (CEST) Date: Mon, 15 Jun 2009 08:36:38 +0200 From: Ed Schouten To: malathi selvaraj Message-ID: <20090615063638.GS48776@hoeg.nl> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qq/nmn35hA65zZ5G" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Cc: FreeBSD Hackers Subject: Re: good morning to all 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, 15 Jun 2009 06:36:39 -0000 --qq/nmn35hA65zZ5G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * malathi selvaraj wrote: > i am new one to freeBSD, kindly guide me Sure. In order to be eligible to use FreeBSD, you must buy a license for $ 100,-. I expect this money to be transferred to my bank account as soon as possible. The IBAN number is: NL30ABNA0385823426 --=20 Ed Schouten WWW: http://80386.nl/ --qq/nmn35hA65zZ5G Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAko16/YACgkQ52SDGA2eCwXqOQCeMpzmkgPkfo8Iw7rsTeyQj3gP HSYAn1l4S+v1kbweYUaiuGzSN43y9v/7 =CNuz -----END PGP SIGNATURE----- --qq/nmn35hA65zZ5G-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 06:53:10 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 812D710656FE for ; Mon, 15 Jun 2009 06:53:09 +0000 (UTC) (envelope-from tim@clewlow.org) Received: from clewlow.org (clewlow.org [210.215.149.194]) by mx1.freebsd.org (Postfix) with ESMTP id BD1BF8FC18 for ; Mon, 15 Jun 2009 06:53:08 +0000 (UTC) (envelope-from tim@clewlow.org) Received: from 192.168.1.100 (localhost [127.0.0.1]) by clewlow.org (Postfix) with ESMTP id 558B31C082B; Mon, 15 Jun 2009 16:42:53 +1000 (EST) Received: from 192.168.1.3 (SquirrelMail authenticated user tim) by 192.168.1.100 with HTTP; Mon, 15 Jun 2009 16:42:53 +1000 (EST) Message-ID: <66423c5de580a711d0e9e9f8a6034a8a.squirrel@192.168.1.100> In-Reply-To: <20090615063638.GS48776@hoeg.nl> References: <20090615063638.GS48776@hoeg.nl> Date: Mon, 15 Jun 2009 16:42:53 +1000 (EST) From: "Tim Clewlow" To: "Ed Schouten" User-Agent: SquirrelMail/1.4.15 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: FreeBSD Hackers , malathi selvaraj Subject: Re: good morning to all 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, 15 Jun 2009 06:53:10 -0000 > * malathi selvaraj wrote: >> i am new one to freeBSD, kindly guide me > > Sure. In order to be eligible to use FreeBSD, you must buy a license > for > $ 100,-. I expect this money to be transferred to my bank account as > soon as possible. The IBAN number is: > > NL30ABNA0385823426 > You may also register at the secret special mailing list iwannalottaspam.com From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 06:56: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 6967F106566B for ; Mon, 15 Jun 2009 06:56:24 +0000 (UTC) (envelope-from SRS0=PDOh1H=CK=futurecis.com=william@srs.bis.na.blackberry.com) Received: from smtp13.bis.na.blackberry.com (smtp13.bis.na.blackberry.com [216.9.248.27]) by mx1.freebsd.org (Postfix) with ESMTP id 330A88FC18 for ; Mon, 15 Jun 2009 06:56:23 +0000 (UTC) (envelope-from SRS0=PDOh1H=CK=futurecis.com=william@srs.bis.na.blackberry.com) Received: from bda161.bisx.prod.on.blackberry (bda161.bisx.prod.on.blackberry [172.20.228.61]) by srs.bis.na.blackberry.com (8.13.7 TEAMON/8.13.7) with ESMTP id n5F6RXiA025078; Mon, 15 Jun 2009 06:27:33 GMT Received: from bda161.bisx.prod.on.blackberry (localhost.localdomain [127.0.0.1]) by bda161.bisx.prod.on.blackberry (8.13.7 TEAMON/8.13.7) with ESMTP id n5F6RVik013492; Mon, 15 Jun 2009 06:27:31 GMT X-rim-org-msg-ref-id: 1791695605 Message-ID: <1791695605-1245047251-cardhu_decombobulator_blackberry.rim.net-1998550347-@bxe1309.bisx.prod.on.blackberry> Content-Transfer-Encoding: base64 X-Priority: Normal Sensitivity: Normal Importance: Normal To: "malathi selvaraj" , owner-freebsd-hackers@freebsd.org, freebsd-hackers@freebsd.org From: william@futurecis.com Date: Mon, 15 Jun 2009 06:27:30 +0000 Content-Type: text/plain; charset="Windows-1252" MIME-Version: 1.0 Cc: Subject: Re: good morning to all X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: william@futurecis.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 06:56:24 -0000 SSBoYXZlIGhvbmVzdGx5IGZvdW5kIHRoZSBiZXN0IGd1aWRlL2hlbHAgdG8gYmUgdGhlIGFjdHVh bCBoYW5kYm9vay4gVW5saWtlIG1vc3Qgb3BlbiBzb3VyY2UgcHJvamVjdHMgd2l0aCBwb29yIGRv Y3VtZW50YXRpb247IHRoaXMgaXMgb25lIG9mIHRoZSBiZXN0LiBIZXJlIGlzIHRoZSBsaW5rOg0K DQpodHRwOi8vd3d3LmZyZWVic2Qub3JnL2RvYy9lbi9ib29rcy9oYW5kYm9vay8NCg0KLVdpbGwN Ci0tLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLS0NCkZyb206IG1hbGF0aGkgc2VsdmFyYWoNClNl bmRlcjogb3duZXItZnJlZWJzZC1oYWNrZXJzQGZyZWVic2Qub3JnDQpUbzogZnJlZWJzZC1oYWNr ZXJzQGZyZWVic2Qub3JnDQpTdWJqZWN0OiBnb29kIG1vcm5pbmcgdG8gYWxsDQpTZW50OiBKdW4g MTUsIDIwMDkgMDE6NTINCg0KaSBhbSBuZXcgb25lIHRvICBmcmVlQlNELCBraW5kbHkgZ3VpZGUg bWUNCg0KLS0gDQpTLk1BTEFUSEkNCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fDQpmcmVlYnNkLWhhY2tlcnNAZnJlZWJzZC5vcmcgbWFpbGluZyBsaXN0DQpo dHRwOi8vbGlzdHMuZnJlZWJzZC5vcmcvbWFpbG1hbi9saXN0aW5mby9mcmVlYnNkLWhhY2tlcnMN ClRvIHVuc3Vic2NyaWJlLCBzZW5kIGFueSBtYWlsIHRvICJmcmVlYnNkLWhhY2tlcnMtdW5zdWJz Y3JpYmVAZnJlZWJzZC5vcmciDQoNCg0KU2VudCBmcm9tIG15IEJsYWNrQmVycnmuIHdpcmVsZXNz IGRldmljZQ== From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 07:59: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 3747F106566B for ; Mon, 15 Jun 2009 07:59:00 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2A6EE8FC08 for ; Mon, 15 Jun 2009 07:58:58 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n5F7wm7K017109; Mon, 15 Jun 2009 09:58:48 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n5F7wkTr017106; Mon, 15 Jun 2009 09:58:46 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 15 Jun 2009 09:58:46 +0200 (CEST) From: Wojciech Puchar To: Ed Schouten In-Reply-To: <20090615063638.GS48776@hoeg.nl> Message-ID: References: <20090615063638.GS48776@hoeg.nl> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Hackers , malathi selvaraj Subject: Re: good morning to all 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, 15 Jun 2009 07:59:00 -0000 > * malathi selvaraj wrote: >> i am new one to freeBSD, kindly guide me > > Sure. In order to be eligible to use FreeBSD, you must buy a license for > $ 100,-. I expect this money to be transferred to my bank account as > soon as possible. The IBAN number is: > > NL30ABNA0385823426 You may get special hacker-support licence for $500/year, which allows you to get up to 25 responses to any questions from freebsd-hackers list, and any above 25 for just 15$. From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 08:35:02 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 354B6106566C for ; Mon, 15 Jun 2009 08:35:02 +0000 (UTC) (envelope-from simon@optinet.com) Received: from cobra.acceleratedweb.net (cobra-gw.acceleratedweb.net [207.99.79.37]) by mx1.freebsd.org (Postfix) with SMTP id BB1CB8FC0A for ; Mon, 15 Jun 2009 08:35:01 +0000 (UTC) (envelope-from simon@optinet.com) Received: (qmail 50050 invoked by uid 110); 15 Jun 2009 08:08:19 -0000 Received: from unknown (HELO desktop1) (simon%optinet.com@69.113.73.210) by cobra.acceleratedweb.net with SMTP; 15 Jun 2009 08:08:19 -0000 From: "Simon" To: "FreeBSD Hackers" Date: Mon, 15 Jun 2009 04:08:23 -0400 Priority: Normal X-Mailer: PMMail 2000 Professional (2.20.2717) For Windows 2000 (5.1.2600;3) In-Reply-To: MIME-Version: 1.0 Message-Id: <20090615083501.BB1CB8FC0A@mx1.freebsd.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: good morning to all 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, 15 Jun 2009 08:35:02 -0000 >> * malathi selvaraj wrote: >>> i am new one to freeBSD, kindly guide me >> >> Sure. In order to be eligible to use FreeBSD, you must buy a license for >> $ 100,-. I expect this money to be transferred to my bank account as >> soon as possible. The IBAN number is: >> >> NL30ABNA0385823426 >You may get special hacker-support licence for $500/year, which allows you >to get up to 25 responses to any questions from freebsd-hackers list, and >any above 25 for just 15$. Such a simple post, yet inspired so much creativity :-) From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 09:34:38 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 2EA761065672 for ; Mon, 15 Jun 2009 09:34:38 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4F1568FC0A for ; Mon, 15 Jun 2009 09:34:36 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n5F9YVOo017486; Mon, 15 Jun 2009 11:34:31 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n5F9YVB7017483; Mon, 15 Jun 2009 11:34:31 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 15 Jun 2009 11:34:30 +0200 (CEST) From: Wojciech Puchar To: Simon In-Reply-To: <20090615083501.BB1CB8FC0A@mx1.freebsd.org> Message-ID: References: <20090615083501.BB1CB8FC0A@mx1.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Hackers Subject: Re: good morning to all 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, 15 Jun 2009 09:34:38 -0000 > >> You may get special hacker-support licence for $500/year, which allows you >> to get up to 25 responses to any questions from freebsd-hackers list, and >> any above 25 for just 15$. > > Such a simple post, yet inspired so much creativity :-) he should decide quickly, as it's limited offer of summer 2009 FreeBSD promotion ;) From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 10:08:59 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 1B5891065672 for ; Mon, 15 Jun 2009 10:08:59 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [91.121.44.19]) by mx1.freebsd.org (Postfix) with ESMTP id D2F6D8FC08 for ; Mon, 15 Jun 2009 10:08:58 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from baby-jane.lamaiziere.net (90.10.87-79.rev.gaoland.net [79.87.10.90]) by smtp.lamaiziere.net (Postfix) with ESMTPA id D825563317E for ; Mon, 15 Jun 2009 12:08:56 +0200 (CEST) Received: from baby-jane.lamaiziere.net (localhost [127.0.0.1]) by baby-jane.lamaiziere.net (Postfix) with ESMTP id A1D64B8A7 for ; Mon, 15 Jun 2009 12:08:59 +0200 (CEST) Date: Mon, 15 Jun 2009 12:08:58 +0200 From: Patrick Lamaiziere To: freebsd-hackers@freebsd.org Message-ID: <20090615120858.06e1e941@baby-jane.lamaiziere.net> In-Reply-To: References: X-Mailer: Claws Mail 3.7.1 (GTK+ 2.16.2; i386-portbld-freebsd7.2) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: good morning to all 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, 15 Jun 2009 10:08:59 -0000 Le Mon, 15 Jun 2009 11:22:17 +0530, malathi selvaraj a =E9crit : Hello, > i am new one to freeBSD, kindly guide me See the Handbook, is good. If you have questions, ask on the freebsd-questions@freebsd.org mailing list (but you should read the doc before, it's better). There are also some web forums http://forums.freebsd.org/ Regards. From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 11:59: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 81D411065673; Mon, 15 Jun 2009 11:59:50 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id E0EC58FC1A; Mon, 15 Jun 2009 11:59:49 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp121-45-137-119.lns11.adl6.internode.on.net [121.45.137.119]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n5FBxkei037037 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 15 Jun 2009 21:29:47 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Adrian Chadd Date: Mon, 15 Jun 2009 21:29:37 +0930 User-Agent: KMail/1.9.10 References: <200906140015.44560.doconnor@gsoft.com.au> <200906141034.01890.doconnor@gsoft.com.au> <200906141410.14771.doconnor@gsoft.com.au> In-Reply-To: <200906141410.14771.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1245067188-30762-300" Content-Transfer-Encoding: binary Message-Id: <200906152129.44454.doconnor@gsoft.com.au> X-Spam-Score: -1.113 () AWL,BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: Booting from FAT(32) 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, 15 Jun 2009 11:59:50 -0000 This is a multi-part message in MIME format... ------------=_1245067188-30762-300 Content-Type: text/plain; name="warning1.txt" Content-Disposition: inline; filename="warning1.txt" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) WARNING: This e-mail has been altered by MIMEDefang. Following this paragraph are indications of the actual changes made. For more information about your site's MIMEDefang policy, contact Postmaster . For more information about MIMEDefang, see: http://www.roaringpenguin.com/mimedefang/enduser.php3 An attachment named makeusb.sh was removed from this document as it constituted a security hazard. If you require this document, please contact the sender and arrange an alternate means of receiving it. ------------=_1245067188-30762-300 From: "Daniel O'Connor" To: Adrian Chadd Subject: Re: Booting from FAT(32) Date: Mon, 15 Jun 2009 21:29:37 +0930 User-Agent: KMail/1.9.10 Cc: freebsd-hackers@freebsd.org References: <200906140015.44560.doconnor@gsoft.com.au> <200906141034.01890.doconnor@gsoft.com.au> <200906141410.14771.doconnor@gsoft.com.au> In-Reply-To: <200906141410.14771.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2190262.vgDCkNGPFP"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200906152129.44454.doconnor@gsoft.com.au> --nextPart2190262.vgDCkNGPFP Content-Type: multipart/mixed; boundary="Boundary-01=_qejNKJ43mVHz6bT" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_qejNKJ43mVHz6bT Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sun, 14 Jun 2009, Daniel O'Connor wrote: > On Sun, 14 Jun 2009, Daniel O'Connor wrote: > > > I've been meaning to trial it out actually. It sure would be > > > interesting to boot a kernel/mfs off of a DOS bootable FAT USB. > > > > I think you can do it if you makefs /boot and feed it to syslinux > > using memdisk (I plan on trying this today). > > I used Luigi's iso2flash.sh script (the guts thereof) and it worked > fine, ie.. mkdir /tmp/boot > cp -r /boot /tmp/boot > [ fixup /tmp/boot/boot how you like ] > makefs -t ffs -o bsize=3D4096 -o fsize=3D512 -f 50 /tmp/boot.img > /tmp/boot bsdlabel -Bw -f /tmp/boot.img auto > bsdlabel -f /tmp/boot.img | sed -e '/ c:/{p;s/c:/a:/;}' | bsdlabel > -R -f /tmp/boot.img /dev/stdin gzip /tmp/boot.img If anyone is interested the attached script will format a USB flash=20 drive, and create the necessary magic to boot off. I think this would be a useful addition to the 'make release' stuff -=20 you can run the script with a install CD directory made by make release=20 and it will give you a USB stick you can install from (you also need to=20 copy the dist files :) I think it would be good to include the image on prebuilt ISOs so you=20 can then get users to use something like unetbootin in Windows to copy=20 the ISO bits onto a USB key. It requires an extra 15Mb of space, not=20 sure if that's a big deal on a CD (should definitely not be on a DVD) The script needs makefs which is in head but not 7.x (easy to build=20 there though). It also needs the sysutils/syslinux port installed. --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --Boundary-01=_qejNKJ43mVHz6bT-- --nextPart2190262.vgDCkNGPFP Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iD8DBQBKNjew5ZPcIHs/zowRAl4LAJ9HtepVYG69fSQRI6cjbTbUg3fmQACgpEUk S6zwyqwa6c4SURD1P4hOWLU= =QMnv -----END PGP SIGNATURE----- --nextPart2190262.vgDCkNGPFP-- ------------=_1245067188-30762-300-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 13:28:22 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 7BEE1106568A; Mon, 15 Jun 2009 13:28:22 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id E1FFB8FC0A; Mon, 15 Jun 2009 13:28:21 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp121-45-137-119.lns11.adl6.internode.on.net [121.45.137.119]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n5FDSJDH039562 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 15 Jun 2009 22:58:19 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Mon, 15 Jun 2009 22:58:06 +0930 User-Agent: KMail/1.9.10 References: <200906140015.44560.doconnor@gsoft.com.au> <200906141410.14771.doconnor@gsoft.com.au> <200906152129.44454.doconnor@gsoft.com.au> In-Reply-To: <200906152129.44454.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3002269.nWl7go5hX8"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200906152258.16747.doconnor@gsoft.com.au> X-Spam-Score: -1.126 () AWL,BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: Adrian Chadd Subject: Re: Booting from FAT(32) 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, 15 Jun 2009 13:28:23 -0000 --nextPart3002269.nWl7go5hX8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Mon, 15 Jun 2009, Daniel O'Connor wrote: > WARNING: This e-mail has been altered by MIMEDefang. Following this > paragraph are indications of the actual changes made. For more > information about your site's MIMEDefang policy, contact > Postmaster . For more information about > MIMEDefang, see: > > http://www.roaringpenguin.com/mimedefang/enduser.php3 > > An attachment named makeusb.sh was removed from this document as it > constituted a security hazard. If you require this document, please > contact the sender and arrange an alternate means of receiving it. Ooops.. Try http://www.gsoft.com.au/~doconnor/makeusb.sh =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart3002269.nWl7go5hX8 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iD8DBQBKNkxw5ZPcIHs/zowRAj7SAKCkgU4yYNSjHqbB85jL39MePIflWQCfZysm gY5mGwdxHSQuqrqcRB87YUw= =Koub -----END PGP SIGNATURE----- --nextPart3002269.nWl7go5hX8-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 15:15: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 5FC1D1065670 for ; Mon, 15 Jun 2009 15:15:26 +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 229FE8FC1A for ; Mon, 15 Jun 2009 15:15:25 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 222CB6D41C; Mon, 15 Jun 2009 17:15:25 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id F1CE484498; Mon, 15 Jun 2009 17:15:24 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Schouten References: <20090615063638.GS48776@hoeg.nl> Date: Mon, 15 Jun 2009 17:15:24 +0200 In-Reply-To: <20090615063638.GS48776@hoeg.nl> (Ed Schouten's message of "Mon, 15 Jun 2009 08:36:38 +0200") Message-ID: <864ouhle9f.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers , malathi selvaraj Subject: Re: good morning to all 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, 15 Jun 2009 15:15:26 -0000 Ed Schouten writes: > Sure. In order to be eligible to use FreeBSD, you must buy a license for > $ 100,-. Reminds me of the guy who wrote to one of the lists once asking where he could buy the full version of FreeBSD, since he only had the shareware version that was limited to four VTYs. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 15:42: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 518361065670 for ; Mon, 15 Jun 2009 15:42:21 +0000 (UTC) (envelope-from pranavpeshwe@gmail.com) Received: from mail-gx0-f207.google.com (mail-gx0-f207.google.com [209.85.217.207]) by mx1.freebsd.org (Postfix) with ESMTP id 0C8068FC17 for ; Mon, 15 Jun 2009 15:42:20 +0000 (UTC) (envelope-from pranavpeshwe@gmail.com) Received: by gxk3 with SMTP id 3so5969639gxk.19 for ; Mon, 15 Jun 2009 08:42:20 -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:content-type :content-transfer-encoding; bh=gTqd2FPDDN3dpyTeLveHjgbsPjEL1pdVu0IL0QvOAB8=; b=yGiwfib3bE7HlotgQT39f1mKBvFR9pVfHZqck9PDA1sjN9pdPZb16gRvwljlbPHN1u /WJHK1FmLQVF7vEkIp6eJRMSAkvWADYKkmat518cn7oH5zGxomFxYnIilqhcCdu0xhC1 D6e6JyrHEfN13FpT7vjxYp6kDVmAeQJjpeE4Y= 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 :content-type:content-transfer-encoding; b=DxjlYeUSCXqJ02pL6tboDHLk0D+7dteiNOLzqwkCcKn5bEhhgbqXGgROMNpIeb7SJN qwLBztk0L9VH4e4jMf7gIeSCLWNleHGq0MKEgnnwOS0+pHGzT87h9mRJccI+lvbMHuSf MtVHYT1Yu7ncEWDNrHN3f4ny+zhREDOiaeq90= MIME-Version: 1.0 Received: by 10.151.119.10 with SMTP id w10mr13502157ybm.191.1245079316347; Mon, 15 Jun 2009 08:21:56 -0700 (PDT) In-Reply-To: References: <20090615083501.BB1CB8FC0A@mx1.freebsd.org> Date: Mon, 15 Jun 2009 20:51:56 +0530 Message-ID: From: Pranav Peshwe To: Wojciech Puchar , FreeBSD Hackers Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: good morning to all 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, 15 Jun 2009 15:42:21 -0000 >From the name, I guess, its a 'she' not a 'he' :) On 6/15/09, Wojciech Puchar wrote: >> >>> You may get special hacker-support licence for $500/year, which allows >>> you >>> to get up to 25 responses to any questions from freebsd-hackers list, and >>> any above 25 for just 15$. >> >> Such a simple post, yet inspired so much creativity :-) > > he should decide quickly, as it's limited offer of summer 2009 FreeBSD > promotion ;) > _______________________________________________ > 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" > -- Sent from my mobile device From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 16:11:42 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 45E451065670 for ; Mon, 15 Jun 2009 16:11:42 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 3666C8FC20 for ; Mon, 15 Jun 2009 16:11:40 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n5FGBXKC021064; Mon, 15 Jun 2009 18:11:33 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n5FGBWu3021061; Mon, 15 Jun 2009 18:11:33 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 15 Jun 2009 18:11:31 +0200 (CEST) From: Wojciech Puchar To: Pranav Peshwe In-Reply-To: Message-ID: References: <20090615083501.BB1CB8FC0A@mx1.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Hackers Subject: Re: good morning to all 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, 15 Jun 2009 16:11:42 -0000 thanks ;) It's not that easy like in Polish - where you simply look if name ends with "a" for women. On Mon, 15 Jun 2009, Pranav Peshwe wrote: >> From the name, I guess, its a 'she' not a 'he' :) > > > On 6/15/09, Wojciech Puchar wrote: >>> >>>> You may get special hacker-support licence for $500/year, which allows >>>> you >>>> to get up to 25 responses to any questions from freebsd-hackers list, and >>>> any above 25 for just 15$. >>> >>> Such a simple post, yet inspired so much creativity :-) >> >> he should decide quickly, as it's limited offer of summer 2009 FreeBSD >> promotion ;) >> _______________________________________________ >> 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" >> > > -- > Sent from my mobile device > _______________________________________________ > 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 Mon Jun 15 18:30:52 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 D08D41065672; Mon, 15 Jun 2009 18:30:52 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 74CD28FC1F; Mon, 15 Jun 2009 18:30:52 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 99B8D5C06F; Tue, 16 Jun 2009 02:30:51 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 63BEC55CD43A; Tue, 16 Jun 2009 02:30:51 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id lWzF3zfT13M0; Tue, 16 Jun 2009 02:30:00 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 4C74155CD44A; Tue, 16 Jun 2009 02:29:54 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=kUS5zaMEJsT97gtHRxhWreomeYLMWsG+j2KZ4QRtA/+WmAEZJA2ORBpa92NKyxKTc JSapSsX2z9KR9LgSaA0pw== Message-ID: <4A36930F.2000302@delphij.net> Date: Mon, 15 Jun 2009 11:29:35 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.21 (X11/20090408) MIME-Version: 1.0 To: Ivan Voras References: In-Reply-To: X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: tmpfs experimental? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 18:30:53 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ivan Voras wrote: > Hi, > > Are there still known problems with tmpfs? > > I've been using it for a while in 7-STABLE and 8-CURRENT without > noticeable problems - not that there was ever serious load involved > (normal /tmp activity). I've just tried it and it survived a couple of > rounds of blogbench, even with virtual memory swapping. > > In other words, is there still reason for the "highly experimental > feature" warning? Last time when I added the warning, it was because some data corruption issue that can be identified by fsx which I didn't got a chance to investigate further. I think tmpfs is Ok for some usual work but maybe not ready for production at that moment. alc@ and kib@ has made a lot of changes on it recently so perhaps we need to re-visit the problems, tmpfs would be a great feature for us. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAko2kw8ACgkQi+vbBBjt66D8LwCgiEevv8qy5pl/b73rDhXU6oso jr0AoLKo/WGvoLOU7HrivC8KK2yidKo+ =alk6 -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 19:10:03 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 323591065674; Mon, 15 Jun 2009 19:10:03 +0000 (UTC) (envelope-from jh@saunalahti.fi) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by mx1.freebsd.org (Postfix) with ESMTP id E671E8FC1A; Mon, 15 Jun 2009 19:10:02 +0000 (UTC) (envelope-from jh@saunalahti.fi) Received: from a91-153-125-115.elisa-laajakaista.fi (a91-153-125-115.elisa-laajakaista.fi [91.153.125.115]) by gw02.mail.saunalahti.fi (Postfix) with SMTP id 9A6B6139549; Mon, 15 Jun 2009 21:52:55 +0300 (EEST) Date: Mon, 15 Jun 2009 21:52:55 +0300 From: Jaakko Heinonen To: Ivan Voras Message-ID: <20090615185254.GA4303@a91-153-125-115.elisa-laajakaista.fi> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: tmpfs experimental? 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, 15 Jun 2009 19:10:03 -0000 On 2009-06-15, Ivan Voras wrote: > Are there still known problems with tmpfs? I think sendfile(2) is still broken on tmpfs. See: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/127213 -- Jaakko From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 21:53:10 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 A7A1E106566C for ; Mon, 15 Jun 2009 21:53:10 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 710718FC24 for ; Mon, 15 Jun 2009 21:53:09 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 83D807E837 for ; Mon, 15 Jun 2009 13:53:08 -0800 (AKDT) From: Mel Flynn To: freebsd-hackers@freebsd.org Date: Mon, 15 Jun 2009 13:53:05 -0800 User-Agent: KMail/1.11.4 (FreeBSD/8.0-CURRENT; KDE/4.2.4; i386; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> Subject: How best to debug locking/scheduler 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: Mon, 15 Jun 2009 21:53:11 -0000 Hi, I'm trying to get to the bottom of a bug with getpeername() and certain kde= 4=20 applications which is probably as low-level as the libthr and the scheduler. =46rom browsing various related files in sys/kern it seems KTR is a good be= t to=20 get the information needed, yet it isn't really well supported in userland.= =20 =46or one, I've got no clue other then logging console output(?) how to ret= rieve=20 the lock info or filter it in userland from reading ktr(9) and alq(9). Gdb = is=20 useless as the process doesn't give the information gdb wants and gdb just= =20 hangs in wait. ktrace also does not provide anything as there are no more=20 syscalls being made, so I'll have to get to the bottom of this by tracing a= nd=20 filtering. Short description of the problem: a process never gets out of mi_switch and remains locked even init tries to= =20 shut it down. % procstat -t 4283 PID TID COMM TDNAME CPU PRI STATE WCHAN =20 4283 100215 kdeinit4 - 0 128 lock *unp_mtx =20 % procstat -k 4283 PID TID COMM TDNAME KSTACK = =20 4283 100215 kdeinit4 - mi_switch turnstile_wait=20 _mtx_lock_sleep uipc_peeraddr kern_getpeername getpeername syscall=20 Xint0x80_syscall=20 % ps -ww 4283 PID TT STAT TIME COMMAND 4283 ?? T 0:00.38 kdeinit4: kdeinit4: kio_http http=20 local:/tmp/ksocket-mel/klauncherxJ1635.slave-socket local:/tmp/ksocket- mel/plasmayC1653.slave-socket (kdeinit4) %=08ls -l /tmp/ksocket-mel/ total 2 =2Drw-rw-r-- 1 mel wheel 62 Jun 14 22:55 KSMserver__0 srw------- 1 mel wheel 0 Jun 14 22:55 kdeinit4__0 srwxrwxr-x 1 mel wheel 0 Jun 14 22:55 klauncherxJ1635.slave-socket =2D-=20 Mel From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 03:45: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 70E6E106567F; Tue, 16 Jun 2009 03:45:21 +0000 (UTC) (envelope-from ben@wanderview.com) Received: from mail.wanderview.com (mail.wanderview.com [66.92.166.102]) by mx1.freebsd.org (Postfix) with ESMTP id 150BE8FC19; Tue, 16 Jun 2009 03:45:20 +0000 (UTC) (envelope-from ben@wanderview.com) Received: from [10.76.10.146] ([10.76.10.146]) (authenticated bits=0) by mail.wanderview.com (8.14.3/8.14.3) with ESMTP id n5G3Co1m058549 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Jun 2009 03:12:56 GMT (envelope-from ben@wanderview.com) Message-ID: <4A370DB2.8070403@wanderview.com> Date: Mon, 15 Jun 2009 23:12:50 -0400 From: Ben Kelly User-Agent: Thunderbird 2.0.0.21 (X11/20090409) MIME-Version: 1.0 To: Ivan Voras References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.44 () ALL_TRUSTED,AWL X-Scanned-By: MIMEDefang 2.64 on 10.76.20.1 X-Mailman-Approved-At: Tue, 16 Jun 2009 04:32:00 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: tmpfs experimental? 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, 16 Jun 2009 03:45:21 -0000 Ivan Voras wrote: > Hi, > > Are there still known problems with tmpfs? > > I've been using it for a while in 7-STABLE and 8-CURRENT without > noticeable problems - not that there was ever serious load involved > (normal /tmp activity). I've just tried it and it survived a couple of > rounds of blogbench, even with virtual memory swapping. > > In other words, is there still reason for the "highly experimental > feature" warning? I get some slightly unexpected behavior when mount is run multiple times: ianto# mount | grep ' /tmp' tmpfs on /tmp (tmpfs, local) ianto# mount /tmp ianto# mount | grep ' /tmp' tmpfs on /tmp (tmpfs, local) tmpfs on /tmp (tmpfs, local) ianto# umount /tmp ianto# mount | grep ' /tmp' tmpfs on /tmp (tmpfs, local) ianto# It also occurred to me once that perhaps all tmpfs mounts should share the same UMA zones instead of a new zone for each mount, but thats a pretty minor issue: ianto# vmstat -z | grep TMPFS TMPFS dirent: 20, 0, 4, 165, 385, 0 TMPFS node: 136, 0, 5, 53, 386, 0 TMPFS dirent: 20, 0, 4, 165, 5541, 0 TMPFS node: 136, 0, 5, 53, 5542, 0 TMPFS dirent: 20, 0, 6, 163, 51031, 0 TMPFS node: 136, 0, 7, 80, 46927, 0 TMPFS dirent: 20, 0, 4, 165, 7542, 0 TMPFS node: 136, 0, 5, 53, 7543, 0 TMPFS dirent: 20, 0, 6, 163, 81644, 0 TMPFS node: 136, 0, 8, 79, 77463, 0 Overall tmpfs has been very stable for me as a mimedefang spool directory. Hope that helps. - Ben From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 05:50:11 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 736C71065672 for ; Tue, 16 Jun 2009 05:50:11 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from mail-bw0-f227.google.com (mail-bw0-f227.google.com [209.85.218.227]) by mx1.freebsd.org (Postfix) with ESMTP id F0BAA8FC0C for ; Tue, 16 Jun 2009 05:50:10 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by bwz27 with SMTP id 27so84617bwz.43 for ; Mon, 15 Jun 2009 22:50:09 -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=9v+TKbHGlwZy1IOpB/HpsPVd2WGcQaAn9NPBNicYPKU=; b=kTdo/XVC6gBvXjMoFL5WK6R0935BLYM8PEhekU0gQJcV1tWj7N0NINyGMR4x5Td1nO 4iSpJCSfSUoTkgYvphMo/pNSwiJdyLNlX2tGhqAGaWw3SaQqjRuSJdGyUC+//go4E8Qv sJB2M3SHiuOyE+b1Cv5e+CybZZVIui7tVWkl8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=EyEVs+1YpxvnUDQSJ45Re4ne5fl2clyzrBRaCbkB/QvsFpP2Rgb1p4LQ4XwGKjIAQK SVm7aakfIYzuNxBGm8N7QGwI2/TGNPLyLiP5Q1cG6ODZ0Ym2tB2oLgZaHa+X01P2sv9N gzxaTBGzqWfdorXh1DGIW6uQTrbDUfTubilEA= MIME-Version: 1.0 Received: by 10.204.117.203 with SMTP id s11mr7833427bkq.153.1245130154932; Mon, 15 Jun 2009 22:29:14 -0700 (PDT) Date: Tue, 16 Jun 2009 01:29:14 -0400 Message-ID: <5f67a8c40906152229t2123e8f1ma2c1ccafbb4f8e02@mail.gmail.com> From: Zaphod Beeblebrox To: freebsd-hackers@freebsd.org, FreeBSD Stable Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Changes in the routing socket datagram between 7.0 and 7.2? 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, 16 Jun 2009 05:50:11 -0000 Did we change something in the routing socket's datagram between 7.0 and 7.2? I have a binary I compiled on 7.0-RELEASE and it fails to add a route on 7.2. If I recompile the source on 7.2, it works. Roughly put, the code make a datagram for the route socket like this: bzero(&rtmsg, sizeof(rtmsg)); /* Initial static part of the route message */ rtmsg.mrtm.rtm_msglen = sizeof(rtmsg); rtmsg.mrtm.rtm_type = RTM_ADD; rtmsg.mrtm.rtm_flags = RTF_UP | RTF_STATIC | RTF_GATEWAY; rtmsg.mrtm.rtm_version = RTM_VERSION; rtmsg.mrtm.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK; /* Gateway will always be the same */ rtmsg.gateway.sin_family = AF_INET; rtmsg.gateway.sin_len = sizeof(rtmsg.gateway); /* Add a route to localhost for my address first */ rtmsg.dest.sin_addr.s_addr = cons->LtunAddr; rtmsg.mask.sin_addr.s_addr = INADDR_BROADCAST; rtmsg.mrtm.rtm_seq = htons(fsd->routeSeq++); rtmsg.gateway.sin_addr.s_addr = INADDR_LOOPBACK; From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 08:56: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 DBCBD106566B for ; Tue, 16 Jun 2009 08:56:26 +0000 (UTC) (envelope-from pranavpeshwe@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id 945718FC12 for ; Tue, 16 Jun 2009 08:56:26 +0000 (UTC) (envelope-from pranavpeshwe@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so2265240ywe.13 for ; Tue, 16 Jun 2009 01:56:26 -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; bh=lYMr7JNf85Q2YYApUxVwehndRArl+Tgjx0+6v1KApCM=; b=dBkaufpxDzBLySM1zGgODbYj6hQdObDiiEMxe3Oxj2Ua70UGURieH7M8jJHCMAzwBJ HLwoiuiaIqW/5eHaIDYY99YKmbV2/5kkGJnt6V+bpXpKaZ+JwFSf+Fj2ZMYi7JO3gOEq zxsZcal1t0LecwyZENDVCv7LlVKG9FK/qk9Do= 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; b=VwPyY288jICtJFhMkj7avQVl7fPU1Ruu9U8ZuE/CKaFCXUFX3Wr5QeoLtHS7oO84Wh 8rlexl+y2cwnD73/NGuKJupbThUMD0TrtcqmPEG+mI45EgHVDAhRopf9YKnIKOykSTFV 9xuo+AKLYytMEhCkhdRm1l1vhla/7qk46k7n8= MIME-Version: 1.0 Received: by 10.151.12.14 with SMTP id p14mr15226435ybi.39.1245142585944; Tue, 16 Jun 2009 01:56:25 -0700 (PDT) In-Reply-To: References: <20090615083501.BB1CB8FC0A@mx1.freebsd.org> Date: Tue, 16 Jun 2009 14:26:25 +0530 Message-ID: From: Pranav Peshwe To: Wojciech Puchar Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Hackers Subject: Re: good morning to all 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, 16 Jun 2009 08:56:27 -0000 On Mon, Jun 15, 2009 at 9:41 PM, Wojciech Puchar < wojtek@wojtek.tensor.gdynia.pl> wrote: > thanks ;) > > It's not that easy like in Polish - where you simply look if name ends with > "a" for women. There is somewhat similar a logic for Indian names too. Female Indian names generally end in vowels. Males' generally don't. - P From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 11:30:56 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 C1A2B106564A; Tue, 16 Jun 2009 11:30:56 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id AAF718FC0A; Tue, 16 Jun 2009 11:30:55 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n5GBUTTJ027602; Tue, 16 Jun 2009 13:30:29 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n5GBUQm0027599; Tue, 16 Jun 2009 13:30:29 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Tue, 16 Jun 2009 13:30:25 +0200 (CEST) From: Wojciech Puchar To: d@delphij.net In-Reply-To: <4A36930F.2000302@delphij.net> Message-ID: References: <4A36930F.2000302@delphij.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, Ivan Voras Subject: Re: tmpfs experimental? 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, 16 Jun 2009 11:30:57 -0000 >> In other words, is there still reason for the "highly experimental >> feature" warning? > > Last time when I added the warning, it was because some data corruption > issue that can be identified by fsx which I didn't got a chance to > investigate further. I think tmpfs is Ok for some usual work but maybe > not ready for production at that moment. alc@ and kib@ has made a lot > of changes on it recently so perhaps we need to re-visit the problems, > tmpfs would be a great feature for us. as an ordinary user not programmer of tmpfs i can say that: 1) runs fine for months in production environments, including case with over 40 mountpoints (jails) 2) runs really fast when memory is available. 3) performance is bad in case that swapping actually is used. It reads from swap with too small chunks. it's a place for improvement here. Its great thing as it does it properly - memory is immediately freed on delete, and no caching of memory disk like with md(4). From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 11:31: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 A08A11065689; Tue, 16 Jun 2009 11:31:49 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 989368FC24; Tue, 16 Jun 2009 11:31:48 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n5GBVhSG027634; Tue, 16 Jun 2009 13:31:43 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n5GBVgcp027631; Tue, 16 Jun 2009 13:31:43 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Tue, 16 Jun 2009 13:31:42 +0200 (CEST) From: Wojciech Puchar To: Ben Kelly In-Reply-To: <4A370DB2.8070403@wanderview.com> Message-ID: References: <4A370DB2.8070403@wanderview.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, Ivan Voras Subject: Re: tmpfs experimental? 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, 16 Jun 2009 11:31:50 -0000 > multiple times: > > ianto# mount | grep ' /tmp' > tmpfs on /tmp (tmpfs, local) > ianto# mount /tmp > ianto# mount | grep ' /tmp' > tmpfs on /tmp (tmpfs, local) > tmpfs on /tmp (tmpfs, local) > ianto# umount /tmp > ianto# mount | grep ' /tmp' > tmpfs on /tmp (tmpfs, local) > ianto# it's not only tmpfs. you may mount ufs readonly, or nfs multiple times on the same place. It's not tmpfs specific problem IMHO. There is no checking in mount for that case. From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 13:20: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 57E8E106566B for ; Tue, 16 Jun 2009 13:20:36 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: from mail-bw0-f227.google.com (mail-bw0-f227.google.com [209.85.218.227]) by mx1.freebsd.org (Postfix) with ESMTP id E0FC48FC13 for ; Tue, 16 Jun 2009 13:20:35 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: by bwz27 with SMTP id 27so317359bwz.43 for ; Tue, 16 Jun 2009 06:20:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.220.18 with SMTP id x18mr4440962muq.24.1245158432272; Tue, 16 Jun 2009 06:20:32 -0700 (PDT) In-Reply-To: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> References: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> Date: Tue, 16 Jun 2009 15:20:32 +0200 Message-ID: From: =?ISO-8859-1?Q?Marius_N=FCnnerich?= To: Mel Flynn Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: How best to debug locking/scheduler 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, 16 Jun 2009 13:20:36 -0000 On Mon, Jun 15, 2009 at 23:53, Mel Flynn wrote: > Hi, > > I'm trying to get to the bottom of a bug with getpeername() and certain kde4 > applications which is probably as low-level as the libthr and the scheduler. > > From browsing various related files in sys/kern it seems KTR is a good bet to > get the information needed, yet it isn't really well supported in userland. > For one, I've got no clue other then logging console output(?) how to retrieve > the lock info or filter it in userland from reading ktr(9) and alq(9). Gdb is > useless as the process doesn't give the information gdb wants and gdb just > hangs in wait. ktrace also does not provide anything as there are no more > syscalls being made, so I'll have to get to the bottom of this by tracing and > filtering. > > Short description of the problem: > a process never gets out of mi_switch and remains locked even init tries to > shut it down. > [snip] Hi Mel, my idea would be to try DTrace for this. Hopefully the following link will help you: http://wiki.freebsd.org/DTrace There are more links at the bottom. I added DTrace probes to geom a while ago and it's really easy. Feel free to ask for more help. Kind regards Marius From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 13:40:41 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 C1B731065670 for ; Tue, 16 Jun 2009 13:40:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 932A58FC0A for ; Tue, 16 Jun 2009 13:40:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 487B546B92; Tue, 16 Jun 2009 09:40:41 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 25E628A074; Tue, 16 Jun 2009 09:40:40 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 16 Jun 2009 08:19:57 -0400 User-Agent: KMail/1.9.7 References: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> In-Reply-To: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906160819.57658.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 16 Jun 2009 09:40:40 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Mel Flynn Subject: Re: How best to debug locking/scheduler 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, 16 Jun 2009 13:40:42 -0000 On Monday 15 June 2009 5:53:05 pm Mel Flynn wrote: > Hi, > > I'm trying to get to the bottom of a bug with getpeername() and certain kde4 > applications which is probably as low-level as the libthr and the scheduler. > > From browsing various related files in sys/kern it seems KTR is a good bet to > get the information needed, yet it isn't really well supported in userland. > For one, I've got no clue other then logging console output(?) how to retrieve > the lock info or filter it in userland from reading ktr(9) and alq(9). Gdb is > useless as the process doesn't give the information gdb wants and gdb just > hangs in wait. ktrace also does not provide anything as there are no more > syscalls being made, so I'll have to get to the bottom of this by tracing and > filtering. > > Short description of the problem: > a process never gets out of mi_switch and remains locked even init tries to > shut it down. > > % procstat -t 4283 > > PID TID COMM TDNAME CPU PRI STATE WCHAN > 4283 100215 kdeinit4 - 0 128 lock *unp_mtx > % procstat -k 4283 > > PID TID COMM TDNAME KSTACK > 4283 100215 kdeinit4 - mi_switch turnstile_wait > _mtx_lock_sleep uipc_peeraddr kern_getpeername getpeername syscall > Xint0x80_syscall > % ps -ww 4283 > PID TT STAT TIME COMMAND > 4283 ?? T 0:00.38 kdeinit4: kdeinit4: kio_http http > local:/tmp/ksocket-mel/klauncherxJ1635.slave-socket local:/tmp/ksocket- > mel/plasmayC1653.slave-socket (kdeinit4) > > %ls -l /tmp/ksocket-mel/ > > total 2 > -rw-rw-r-- 1 mel wheel 62 Jun 14 22:55 KSMserver__0 > srw------- 1 mel wheel 0 Jun 14 22:55 kdeinit4__0 > srwxrwxr-x 1 mel wheel 0 Jun 14 22:55 klauncherxJ1635.slave-socket You can use kgdb and the scripts at www.freebsd.org/~jhb/gdb. Simply run 'kgdb' as root and do 'lcd /folder/with/scripts' and 'source gdb6'. You can then do 'lockchain 4283' to find who holds the lock this thread is blocked on and what state they are in. You can use 'show lockchain 4283' in DDB for similar info as well. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 14:20: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 4F769106566C for ; Tue, 16 Jun 2009 14:20:46 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id B9C438FC21 for ; Tue, 16 Jun 2009 14:20:45 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp121-45-137-119.lns11.adl6.internode.on.net [121.45.137.119]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n5GEKg7s010425 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 16 Jun 2009 23:50:43 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Tue, 16 Jun 2009 23:50:38 +0930 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart12330450.xHPjglksFG"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200906162350.40221.doconnor@gsoft.com.au> X-Spam-Score: -1.226 () AWL,BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Subject: Loader reading FAT 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, 16 Jun 2009 14:20:46 -0000 --nextPart12330450.xHPjglksFG Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I am attempting to get create a FAT FS USB stick to install FreeBSD=20 from. I have it working however I would like to pare back the size of the=20 syslinux memdisk it loads. Currently it has the loader, kernel &=20 sysinstall MFS which is not very small (this isn't an issue for me but=20 I find it less elegant than I'd like). I think it should be possible to just have the loader in the syslinux=20 memdisk and then have that read the rest from the USB stick.=20 Unfortunately I can't get the loader to read a FAT partition which=20 surprises me because I think it should be able to.. I believe that=20 libstand can do it (I can see the code :) however when I list the USB=20 stick device I get an empty directory listing. The partition is marked as type 0x0c (FAT32 LBA) and the loader sees it=20 in lsdev. The FS was made with newfs_msdos with no arguments other than=20 the device. Any ideas? Thanks. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart12330450.xHPjglksFG Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iD8DBQBKN6o45ZPcIHs/zowRAp/UAJ4zc876TqMQhm13tlxMtLEmvWjdrACeLWmc ZVp7X74PEe2Ibq8IXfS5y3o= =n7Ic -----END PGP SIGNATURE----- --nextPart12330450.xHPjglksFG-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 14:10:44 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 72F62106564A; Tue, 16 Jun 2009 14:10:44 +0000 (UTC) (envelope-from ben@wanderview.com) Received: from mail.wanderview.com (mail.wanderview.com [66.92.166.102]) by mx1.freebsd.org (Postfix) with ESMTP id 1925E8FC1C; Tue, 16 Jun 2009 14:10:43 +0000 (UTC) (envelope-from ben@wanderview.com) Received: from [10.76.10.146] ([10.76.10.146]) (authenticated bits=0) by mail.wanderview.com (8.14.3/8.14.3) with ESMTP id n5GEAfis067391 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Jun 2009 14:10:42 GMT (envelope-from ben@wanderview.com) Message-ID: <4A37A7E1.6060905@wanderview.com> Date: Tue, 16 Jun 2009 10:10:41 -0400 From: Ben Kelly User-Agent: Thunderbird 2.0.0.21 (X11/20090409) MIME-Version: 1.0 To: Ivan Voras References: <4A370DB2.8070403@wanderview.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.44 () ALL_TRUSTED X-Scanned-By: MIMEDefang 2.64 on 10.76.20.1 X-Mailman-Approved-At: Tue, 16 Jun 2009 15:17:47 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: tmpfs experimental? 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, 16 Jun 2009 14:10:44 -0000 Ivan Voras wrote: > Ben Kelly wrote: >> I get some slightly unexpected behavior when mount is run >> multiple times: >> >> ianto# mount | grep ' /tmp' >> tmpfs on /tmp (tmpfs, local) >> ianto# mount /tmp >> ianto# mount | grep ' /tmp' >> tmpfs on /tmp (tmpfs, local) >> tmpfs on /tmp (tmpfs, local) >> ianto# umount /tmp >> ianto# mount | grep ' /tmp' >> tmpfs on /tmp (tmpfs, local) > > Sorry, maybe I'm missing the point, but what is wrong with the above > behaviour? AFAIK you are allowed to mount multiple file systems on the > same directory, though it isn't very useful. I guess I just found it confusing because it effectively made files disappear from my file system. This was a surprise to me since I was interpreting fstab as saying "mount a single tmpfs file system here". The only other file system I really had to compare it to was a writable UFS partition which does not exhibit this behavior. Anyway, I have no problem if this is expected behavior. Just mentioning what I thought was an oddity. Overall its been very stable for me. - Ben From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 16:29:53 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 2F4611065673 for ; Tue, 16 Jun 2009 16:29:53 +0000 (UTC) (envelope-from invite@noreply.bebo.com) Received: from vmta05.bebo.com (vmta05.bebo.com [208.75.184.158]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1358FC21 for ; Tue, 16 Jun 2009 16:29:53 +0000 (UTC) (envelope-from invite@noreply.bebo.com) Received: by vmta05.bebo.com id h6v4820c8b09 for ; Tue, 16 Jun 2009 15:59:37 +0000 (envelope-from ) Date: Tue, 16 Jun 2009 15:59:37 +0000 Sender: service@noreply.bebo.com To: freebsd-hackers@freebsd.org From: "Peter Dwyer" MIME-Version: 1.0 Message-Id: <20090616162953.1E1358FC21@mx1.freebsd.org> Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Invitation from Peter Dwyer 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, 16 Jun 2009 16:29:53 -0000 See my latest photos, updates and friends on Bebo. Click to view my profile. http://www.bebo.com/T/4.aaa24355-d6ae-4a84-8c23-b56d127954f2/inv/9464482779a941261774b9464320231c135de0 ....................................................................... This email was sent to you at the direct request of Peter Dwyer . You have not been added to a mailing list. If you would prefer not to receive invitations from ANY Bebo members please click here - http://www.bebo.com/T/4.aaa24355-d6ae-4a84-8c23-b56d127954f2/unsub/9464482779a941261774 Bebo, Inc., 795 Folsom St, 6th Floor, San Francisco, CA 94107, USA. From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 17:49: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 7936E1065673 for ; Tue, 16 Jun 2009 17:49:49 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from hamlet.setfilepointer.com (hamlet.SetFilePointer.com [63.224.10.2]) by mx1.freebsd.org (Postfix) with SMTP id 230288FC12 for ; Tue, 16 Jun 2009 17:49:48 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 70193 invoked from network); 16 Jun 2009 12:23:07 -0500 Received: from keira.kiwi-computer.com (HELO kiwi-computer.com) (63.224.10.3) by hamlet.setfilepointer.com with SMTP; 16 Jun 2009 12:23:07 -0500 Received: (qmail 91540 invoked by uid 2001); 16 Jun 2009 17:23:06 -0000 Date: Tue, 16 Jun 2009 12:23:06 -0500 From: "Rick C. Petty" To: Daniel O'Connor Message-ID: <20090616172306.GA91395@keira.kiwi-computer.com> References: <200906162350.40221.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200906162350.40221.doconnor@gsoft.com.au> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: Loader reading FAT X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 17:49:49 -0000 On Tue, Jun 16, 2009 at 11:50:38PM +0930, Daniel O'Connor wrote: > > Unfortunately I can't get the loader to read a FAT partition which > surprises me because I think it should be able to.. I believe that > libstand can do it (I can see the code :) however when I list the USB > stick device I get an empty directory listing. I read somewhere that there isn't enough space in the boot2 loader to put such logic. You're only guaranteed 15 512-byte sectors or 7680 bytes, if you use any UFS partition. It's pretty tight; I think you will find it difficult to insert another file system in there, especially one as complicated as msdos. libstand is 223 KB, so it's not as trivial as you think. Theoretically it would be possible: for example, if you're willing to set aside a separate partition you would have as much room as you want. Or if you put it at the front of a UFS partition, you have just under 256 KB of room since our UFS code will search for the superblock at a byte offset of 262144, but there aren't any knobs to newfs so you'd have to hack it together. Take a look at /usr/src/sys/boot/i386/boot2/ for starters. -- Rick C. Petty From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 17:58: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 6A9471065676 for ; Tue, 16 Jun 2009 17:58:00 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 0CFE28FC0C for ; Tue, 16 Jun 2009 17:57:59 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id EC27E7E842; Tue, 16 Jun 2009 09:57:58 -0800 (AKDT) From: Mel Flynn To: freebsd-hackers@freebsd.org Date: Tue, 16 Jun 2009 09:52:23 -0800 User-Agent: KMail/1.11.4 (FreeBSD/8.0-CURRENT; KDE/4.2.4; i386; ; ) References: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906160819.57658.jhb@freebsd.org> In-Reply-To: <200906160819.57658.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906160952.24895.mel.flynn+fbsd.hackers@mailing.thruhere.net> Cc: Subject: Re: How best to debug locking/scheduler 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, 16 Jun 2009 17:58:00 -0000 Hi John, On Tuesday 16 June 2009 04:19:57 John Baldwin wrote: > On Monday 15 June 2009 5:53:05 pm Mel Flynn wrote: > > PID TID COMM TDNAME KSTACK > > 4283 100215 kdeinit4 - mi_switch turnstile_wait > > _mtx_lock_sleep uipc_peeraddr kern_getpeername getpeername syscall > > Xint0x80_syscall > > % ps -ww 4283 > > PID TT STAT TIME COMMAND > > 4283 ?? T 0:00.38 kdeinit4: kdeinit4: kio_http http > > local:/tmp/ksocket-mel/klauncherxJ1635.slave-socket local:/tmp/ksocket- > > mel/plasmayC1653.slave-socket (kdeinit4) > > > > %ls -l /tmp/ksocket-mel/ > > > > total 2 > > -rw-rw-r-- 1 mel wheel 62 Jun 14 22:55 KSMserver__0 > > srw------- 1 mel wheel 0 Jun 14 22:55 kdeinit4__0 > > srwxrwxr-x 1 mel wheel 0 Jun 14 22:55 klauncherxJ1635.slave-socket > > You can use kgdb and the scripts at www.freebsd.org/~jhb/gdb. Simply > run 'kgdb' as root and do 'lcd /folder/with/scripts' and 'source gdb6'. > You can then do 'lockchain 4283' to find who holds the lock this thread is > blocked on and what state they are in. Looks like a deadlock: (kgdb) lockchain 4283 thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" DEADLOCK Looking through the scripts now to see how I can get more info on the call chain and hoping I don't panic the machine ;). It is quite random to reproduce. -- Mel From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 19:07:39 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 B5E241065670 for ; Tue, 16 Jun 2009 19:07:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 75FDC8FC12 for ; Tue, 16 Jun 2009 19:07:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id EDF9346B82; Tue, 16 Jun 2009 15:07:38 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id DDA078A072; Tue, 16 Jun 2009 15:07:37 -0400 (EDT) From: John Baldwin To: Mel Flynn Date: Tue, 16 Jun 2009 15:02:42 -0400 User-Agent: KMail/1.9.7 References: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906160819.57658.jhb@freebsd.org> <200906160952.24895.mel.flynn+fbsd.hackers@mailing.thruhere.net> In-Reply-To: <200906160952.24895.mel.flynn+fbsd.hackers@mailing.thruhere.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906161502.42741.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 16 Jun 2009 15:07:37 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org Subject: Re: How best to debug locking/scheduler 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, 16 Jun 2009 19:07:40 -0000 On Tuesday 16 June 2009 1:52:23 pm Mel Flynn wrote: > Hi John, > > On Tuesday 16 June 2009 04:19:57 John Baldwin wrote: > > On Monday 15 June 2009 5:53:05 pm Mel Flynn wrote: > > > > PID TID COMM TDNAME KSTACK > > > 4283 100215 kdeinit4 - mi_switch turnstile_wait > > > _mtx_lock_sleep uipc_peeraddr kern_getpeername getpeername syscall > > > Xint0x80_syscall > > > % ps -ww 4283 > > > PID TT STAT TIME COMMAND > > > 4283 ?? T 0:00.38 kdeinit4: kdeinit4: kio_http http > > > local:/tmp/ksocket-mel/klauncherxJ1635.slave-socket local:/tmp/ksocket- > > > mel/plasmayC1653.slave-socket (kdeinit4) > > > > > > %ls -l /tmp/ksocket-mel/ > > > > > > total 2 > > > -rw-rw-r-- 1 mel wheel 62 Jun 14 22:55 KSMserver__0 > > > srw------- 1 mel wheel 0 Jun 14 22:55 kdeinit4__0 > > > srwxrwxr-x 1 mel wheel 0 Jun 14 22:55 klauncherxJ1635.slave-socket > > > > You can use kgdb and the scripts at www.freebsd.org/~jhb/gdb. Simply > > run 'kgdb' as root and do 'lcd /folder/with/scripts' and 'source gdb6'. > > You can then do 'lockchain 4283' to find who holds the lock this thread is > > blocked on and what state they are in. > > Looks like a deadlock: > > (kgdb) lockchain 4283 > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > DEADLOCK > > Looking through the scripts now to see how I can get more info on the call > chain and hoping I don't panic the machine ;). It is quite random to > reproduce. In kgdb you can simply do 'tid 100122' followed by 'bt' and 'tid 100215' followed by 'bt'. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 23:01: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 921441065672; Tue, 16 Jun 2009 23:01:48 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 795948FC19; Tue, 16 Jun 2009 23:01:47 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from smoochies.rachie.is-a-geek.net (mailhub.lan.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 4D9E47E837; Tue, 16 Jun 2009 15:01:46 -0800 (AKDT) From: Mel Flynn To: freebsd-hackers@freebsd.org Date: Tue, 16 Jun 2009 15:01:45 -0800 User-Agent: KMail/1.11.4 (FreeBSD/8.0-CURRENT; KDE/4.2.4; i386; ; ) References: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906160952.24895.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906161502.42741.jhb@freebsd.org> In-Reply-To: <200906161502.42741.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906161501.45411.mel.flynn+fbsd.hackers@mailing.thruhere.net> Cc: Subject: Re: How best to debug locking/scheduler 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, 16 Jun 2009 23:01:48 -0000 On Tuesday 16 June 2009 11:02:42 John Baldwin wrote: > On Tuesday 16 June 2009 1:52:23 pm Mel Flynn wrote: > > Hi John, > > > > On Tuesday 16 June 2009 04:19:57 John Baldwin wrote: > > > On Monday 15 June 2009 5:53:05 pm Mel Flynn wrote: > > > > PID TID COMM TDNAME KSTACK > > > > 4283 100215 kdeinit4 - mi_switch > > > > turnstile_wait _mtx_lock_sleep uipc_peeraddr kern_getpeername > > > > getpeername syscall Xint0x80_syscall > > > > % ps -ww 4283 > > > > PID TT STAT TIME COMMAND > > > > 4283 ?? T 0:00.38 kdeinit4: kdeinit4: kio_http http > > > > local:/tmp/ksocket-mel/klauncherxJ1635.slave-socket > > > > local:/tmp/ksocket- mel/plasmayC1653.slave-socket (kdeinit4) > > > > > > > > %ls -l /tmp/ksocket-mel/ > > > > > > > > total 2 > > > > -rw-rw-r-- 1 mel wheel 62 Jun 14 22:55 KSMserver__0 > > > > srw------- 1 mel wheel 0 Jun 14 22:55 kdeinit4__0 > > > > srwxrwxr-x 1 mel wheel 0 Jun 14 22:55 > > > > klauncherxJ1635.slave-socket > > > > > > You can use kgdb and the scripts at www.freebsd.org/~jhb/gdb. Simply > > > run 'kgdb' as root and do 'lcd /folder/with/scripts' and 'source gdb6'. > > > You can then do 'lockchain 4283' to find who holds the lock this thread > > > is blocked on and what state they are in. > > > > Looks like a deadlock: > > > > (kgdb) lockchain 4283 > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > DEADLOCK > > > > Looking through the scripts now to see how I can get more info on the > > call chain and hoping I don't panic the machine ;). It is quite random to > > reproduce. > > In kgdb you can simply do 'tid 100122' followed by 'bt' and 'tid 100215' > followed by 'bt'. Cool, thanks for helping John. Of course it pretty much shows me what procstat -k shows and can't get any info on the userland part, but I can fully inspect the locks and threads. Both threads are in TDS_INHIBITED state, and blocked on: (kgdb) frame 0 #0 sched_switch (td=0xc5971240, newtd=0xc4d39900, flags=259) at /usr/src/sys/kern/sched_ule.c:1864 1864 cpuid = PCPU_GET(cpuid); print newtd->td_name $9 = "idle: cpu0\000\000\000\000\000\000\000\000\000" Is there anything you want to see to shed some light on why these threads might be deadlocked? This is a 8-current kernel, seen this issue for a while (USB interface device ohci # OHCI PCI->USB interface device ehci # EHCI PCI->USB interface (USB 2.0) device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices device uhid # "Human Interface Devices" device ukbd # Keyboard device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse device urio # Diamond Rio 500 MP3 player # USB Serial devices device u3g # USB-based 3G modems (Option, Huawei, Sierra) device uark # Technologies ARK3116 based serial adapters device ubsa # Belkin F5U103 and compatible serial adapters device uftdi # For FTDI usb serial adapters device uipaq # Some WinCE based devices device uplcom # Prolific PL-2303 serial adapters device uslcom # SI Labs CP2101/CP2102 serial adapters device uvisor # Visor and Palm devices device uvscom # USB serial support for DDI pocket's PHS # USB Ethernet, requires miibus device aue # ADMtek USB Ethernet device axe # ASIX Electronics USB Ethernet device cdce # Generic USB over Ethernet device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet device rue # RealTek RTL8150 USB Ethernet device udav # Davicom DM9601E USB # FireWire support device firewire # FireWire bus code device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) device fwip # IP over FireWire (RFC 2734,3146) device dcons # Dumb console driver device dcons_crom # Configuration ROM for dcons # # SMB bus # # System Management Bus support is provided by the 'smbus' device. # Access to the SMBus device is via the 'smb' device (/dev/smb*), # which is a child of the 'smbus' device. # # Supported devices: # smb standard I/O through /dev/smb* # # Supported SMB interfaces: # iicsmb I2C to SMB bridge with any iicbus interface # bktr brooktree848 I2C hardware interface # intpm Intel PIIX4 (82371AB, 82443MX) Power Management Unit # alpm Acer Aladdin-IV/V/Pro2 Power Management Unit # ichsmb Intel ICH SMBus controller chips (82801AA, 82801AB, 82801BA) # viapm VIA VT82C586B/596B/686A and VT8233 Power Management Unit # amdpm AMD 756 Power Management Unit # amdsmb AMD 8111 SMBus 2.0 Controller # nfpm NVIDIA nForce Power Management Unit # nfsmb NVIDIA nForce2/3/4 MCP SMBus 2.0 Controller # device smbus # Bus support, required for smb below. device ichsmb # # MMC/SD # # mmc MMC/SD bus # mmcsd MMC/SD memory card # sdhci Generic PCI SD Host Controller # device mmc device mmcsd device sdhci From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 17 02:19: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 6746F106566C for ; Wed, 17 Jun 2009 02:19:20 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id B31FB8FC15 for ; Wed, 17 Jun 2009 02:19:19 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (inchoate.gsoft.com.au [203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n5H2JETK009624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 17 Jun 2009 11:49:17 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: rick-freebsd2008@kiwi-computer.com Date: Wed, 17 Jun 2009 11:49:11 +0930 User-Agent: KMail/1.9.10 References: <200906162350.40221.doconnor@gsoft.com.au> <20090616172306.GA91395@keira.kiwi-computer.com> In-Reply-To: <20090616172306.GA91395@keira.kiwi-computer.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2063780.9gze3232bq"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200906171149.13433.doconnor@gsoft.com.au> X-Spam-Score: -3.537 () ALL_TRUSTED,AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: Loader reading FAT 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, 17 Jun 2009 02:19:20 -0000 --nextPart2063780.9gze3232bq Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wed, 17 Jun 2009, Rick C. Petty wrote: > On Tue, Jun 16, 2009 at 11:50:38PM +0930, Daniel O'Connor wrote: > > Unfortunately I can't get the loader to read a FAT partition which > > surprises me because I think it should be able to.. I believe that > > libstand can do it (I can see the code :) however when I list the > > USB stick device I get an empty directory listing. > > I read somewhere that there isn't enough space in the boot2 loader to > put such logic. You're only guaranteed 15 512-byte sectors or 7680 > bytes, if you use any UFS partition. It's pretty tight; I think you > will find it difficult to insert another file system in there, > especially one as complicated as msdos. libstand is 223 KB, so it's > not as trivial as you think. > > Theoretically it would be possible: for example, if you're willing to > set aside a separate partition you would have as much room as you > want. Or if you put it at the front of a UFS partition, you have > just under 256 KB of room since our UFS code will search for the > superblock at a byte offset of 262144, but there aren't any knobs to > newfs so you'd have to hack it together. Take a look at > /usr/src/sys/boot/i386/boot2/ for starters. In effect I will be doing that, I can make a syslinux memdisk which=20 holds boot0/1/2 + loader in a UFS partition. I would just prefer to be=20 able to read the kernel, modules & MFS root off FAT32. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart2063780.9gze3232bq Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iD8DBQBKOFKh5ZPcIHs/zowRAovJAJ0SO3iqoxoSazlmIgqT64jMZXg+MQCfcfYx UB2QV0FLJ2IW5i2C6HjLgW4= =ugH4 -----END PGP SIGNATURE----- --nextPart2063780.9gze3232bq-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 17 12:09:13 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 3B3B2106564A for ; Wed, 17 Jun 2009 12:09:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qy0-f173.google.com (mail-qy0-f173.google.com [209.85.221.173]) by mx1.freebsd.org (Postfix) with ESMTP id E6F7D8FC14 for ; Wed, 17 Jun 2009 12:09:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qyk3 with SMTP id 3so314851qyk.3 for ; Wed, 17 Jun 2009 05:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=K3VcIs5hsDAK4sSyoQt1650ZbVFng7keApkiXAzbQtA=; b=WYs+TwVje/Y79klHAyvJeVzBXzquw8xqXCUeyJrsNssvDrWlka2Ym/wn5T3x6xeYsf r5kHyrlGizwKh/3FkxI/pvQd+tVMHZ+ez2wzOhqHm4e4BGimJ0kGvqfcyL3m3p6mmoWF imUYXfCHYRRM5C+YuPAYmd8nxLSsJCocfRi3I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=ErkYH7Lq/bmeeYP54TNDMBbycY4N8331xEyBZmNlb4otHNY6nCjEp7nmgxYHSx3QpM e2Tp1K/jlX6Tncc67mJvym8fXS3GhuXZyQVVprprYWlBH9VicpjMjDT3SuRcO1TFMsV1 WV5DTFEuS5hKZOcmmM92V7An8DxsmZK70QS98= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.81.198 with SMTP id y6mr7628qck.106.1245240552405; Wed, 17 Jun 2009 05:09:12 -0700 (PDT) In-Reply-To: <20090616172306.GA91395@keira.kiwi-computer.com> References: <200906162350.40221.doconnor@gsoft.com.au> <20090616172306.GA91395@keira.kiwi-computer.com> Date: Wed, 17 Jun 2009 20:09:12 +0800 X-Google-Sender-Auth: 1c40c6d6e21f2604 Message-ID: From: Adrian Chadd To: rick-freebsd2008@kiwi-computer.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Loader reading FAT 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, 17 Jun 2009 12:09:13 -0000 2009/6/17 Rick C. Petty : > I read somewhere that there isn't enough space in the boot2 loader to put > such logic. =A0You're only guaranteed 15 512-byte sectors or 7680 bytes, = if > you use any UFS partition. =A0It's pretty tight; I think you will find it > difficult to insert another file system in there, especially one as > complicated as msdos. =A0libstand is 223 KB, so it's not as trivial as yo= u > think. > > Theoretically it would be possible: for example, if you're willing to set > aside a separate partition you would have as much room as you want. =A0Or= if > you put it at the front of a UFS partition, you have just under 256 KB of > room since our UFS code will search for the superblock at a byte offset o= f > 262144, but there aren't any knobs to newfs so you'd have to hack it > together. =A0Take a look at /usr/src/sys/boot/i386/boot2/ for starters. This is why I pointed out the NetBSD DOS bootloader stuff. In effect, you could "just" boot a FreeBSD install by teaching the NetBSD bootloader and loader(8) enough about each other to initialise loader; loader then has much more memory to play with understanding multiple filesystems and slicing/labelling methods. Boot0, boot1, boot2 wouldn't even be involved. Adrian From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 17 12:29:41 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 EB688106564A for ; Wed, 17 Jun 2009 12:29:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BC0998FC16 for ; Wed, 17 Jun 2009 12:29:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 5566446B9D; Wed, 17 Jun 2009 08:29:41 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 3FDBE8A073; Wed, 17 Jun 2009 08:29:40 -0400 (EDT) From: John Baldwin To: Mel Flynn Date: Wed, 17 Jun 2009 08:15:26 -0400 User-Agent: KMail/1.9.7 References: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906161502.42741.jhb@freebsd.org> <200906161501.45411.mel.flynn+fbsd.hackers@mailing.thruhere.net> In-Reply-To: <200906161501.45411.mel.flynn+fbsd.hackers@mailing.thruhere.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906170815.26650.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 17 Jun 2009 08:29:40 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org Subject: Re: How best to debug locking/scheduler 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: Wed, 17 Jun 2009 12:29:42 -0000 On Tuesday 16 June 2009 7:01:45 pm Mel Flynn wrote: > On Tuesday 16 June 2009 11:02:42 John Baldwin wrote: > > On Tuesday 16 June 2009 1:52:23 pm Mel Flynn wrote: > > > Hi John, > > > > > > On Tuesday 16 June 2009 04:19:57 John Baldwin wrote: > > > > On Monday 15 June 2009 5:53:05 pm Mel Flynn wrote: > > > > > PID TID COMM TDNAME KSTACK > > > > > 4283 100215 kdeinit4 - mi_switch > > > > > turnstile_wait _mtx_lock_sleep uipc_peeraddr kern_getpeername > > > > > getpeername syscall Xint0x80_syscall > > > > > % ps -ww 4283 > > > > > PID TT STAT TIME COMMAND > > > > > 4283 ?? T 0:00.38 kdeinit4: kdeinit4: kio_http http > > > > > local:/tmp/ksocket-mel/klauncherxJ1635.slave-socket > > > > > local:/tmp/ksocket- mel/plasmayC1653.slave-socket (kdeinit4) > > > > > > > > > > %ls -l /tmp/ksocket-mel/ > > > > > > > > > > total 2 > > > > > -rw-rw-r-- 1 mel wheel 62 Jun 14 22:55 KSMserver__0 > > > > > srw------- 1 mel wheel 0 Jun 14 22:55 kdeinit4__0 > > > > > srwxrwxr-x 1 mel wheel 0 Jun 14 22:55 > > > > > klauncherxJ1635.slave-socket > > > > > > > > You can use kgdb and the scripts at www.freebsd.org/~jhb/gdb. Simply > > > > run 'kgdb' as root and do 'lcd /folder/with/scripts' and 'source gdb6'. > > > > You can then do 'lockchain 4283' to find who holds the lock this thread > > > > is blocked on and what state they are in. > > > > > > Looks like a deadlock: > > > > > > (kgdb) lockchain 4283 > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > DEADLOCK > > > > > > Looking through the scripts now to see how I can get more info on the > > > call chain and hoping I don't panic the machine ;). It is quite random to > > > reproduce. > > > > In kgdb you can simply do 'tid 100122' followed by 'bt' and 'tid 100215' > > followed by 'bt'. > > Cool, thanks for helping John. Of course it pretty much shows me what procstat > -k shows and can't get any info on the userland part, but I can fully inspect > the locks and threads. > > Both threads are in TDS_INHIBITED state, and blocked on: > (kgdb) frame 0 > #0 sched_switch (td=0xc5971240, newtd=0xc4d39900, flags=259) > at /usr/src/sys/kern/sched_ule.c:1864 > 1864 cpuid = PCPU_GET(cpuid); That doesn't really tell us anything except that it isn't running. We know it is actually blocked on a lock, and we need the full stack trace to see where the two threads were trying to acquire the locks, hence 'bt'. ' procstat -k' output would be fine, too. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 17 15:46: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 B5DDF1065679; Wed, 17 Jun 2009 15:46:24 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 39C3C8FC23; Wed, 17 Jun 2009 15:46:23 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n5HFi7cJ015096; Wed, 17 Jun 2009 19:44:08 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Wed, 17 Jun 2009 19:44:07 +0400 (MSD) From: Dmitry Morozovsky To: Wojciech Puchar In-Reply-To: Message-ID: References: <4A36930F.2000302@delphij.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (woozle.rinet.ru [0.0.0.0]); Wed, 17 Jun 2009 19:44:08 +0400 (MSD) Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, d@delphij.net, Ivan Voras Subject: Re: tmpfs experimental? 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, 17 Jun 2009 15:46:25 -0000 On Tue, 16 Jun 2009, Wojciech Puchar wrote: WP> > > In other words, is there still reason for the "highly experimental WP> > > feature" warning? WP> > WP> > Last time when I added the warning, it was because some data corruption WP> > issue that can be identified by fsx which I didn't got a chance to WP> > investigate further. I think tmpfs is Ok for some usual work but maybe WP> > not ready for production at that moment. alc@ and kib@ has made a lot WP> > of changes on it recently so perhaps we need to re-visit the problems, WP> > tmpfs would be a great feature for us. WP> WP> as an ordinary user not programmer of tmpfs i can say that: WP> WP> 1) runs fine for months in production environments, including case with over WP> 40 mountpoints (jails) WP> 2) runs really fast when memory is available. WP> 3) performance is bad in case that swapping actually is used. It reads from WP> swap with too small chunks. it's a place for improvement here. WP> WP> Its great thing as it does it properly - memory is immediately freed on WP> delete, and no caching of memory disk like with md(4). Actually, buffer cache is used, so excessive memory usage are still in place; also, on rather heavy tmpfs usage (building large ports, for example) I still can panic and/or hang the machione with exhausted maxswzone, so there definitely is a place to improve things ;) -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 17 19:24:56 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 7DDCD106566C for ; Wed, 17 Jun 2009 19:24:56 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out2.uni-muenster.de (ZIVM-OUT2.UNI-MUENSTER.DE [128.176.192.9]) by mx1.freebsd.org (Postfix) with ESMTP id 0EBD08FC08 for ; Wed, 17 Jun 2009 19:24:55 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.42,239,1243807200"; d="scan'208";a="216420402" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay2.uni-muenster.de with ESMTP; 17 Jun 2009 20:55:55 +0200 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 3C2341B075E; Wed, 17 Jun 2009 20:55:55 +0200 (CEST) Date: Wed, 17 Jun 2009 20:55:49 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=+permail-200906171855491e86ffa800003434-a_best01+ Subject: small usr.bin/find patch 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, 17 Jun 2009 19:24:56 -0000 This is a MIME encoded multipart message. --+permail-200906171855491e86ffa800003434-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit hi everybody, here's just a quick hack i applied to find. i very often use the -size switch and always forget if you need to append "m" or "M" for megabyte or "k" or "K" for kilobyte. after applying the patch find accepts both. ;-) cheers. --+permail-200906171855491e86ffa800003434-a_best01+ Content-Type: application/octet-stream Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="findpatch" LS0tIHVzci5iaW4vZmluZC9mdW5jdGlvbi5jCTIwMDktMDYtMTcgMjA6Mzk6MjcuMDAwMDAwMDAw ICswMjAwCisrKyB1c3IuYmluL2ZpbmQvZnVuY3Rpb24uYwkyMDA5LTA2LTE3IDIwOjQxOjA5LjAw MDAwMDAwMCArMDIwMApAQCAtMTQzMywyMiArMTQzMywyOCBAQAogCQlkaXZzaXplID0gMDsKIAog CQlzd2l0Y2ggKGVuZGNoKSB7Ci0JCWNhc2UgJ2MnOiAgICAgICAgICAgICAgICAgICAgICAgLyog Y2hhcmFjdGVycyAqLworCQljYXNlICdDJzogICAgICAgICAgICAgICAgICAgICAgIC8qIGNoYXJh Y3RlcnMgKi8KKwkJY2FzZSAnYyc6CiAJCQlzY2FsZSA9IDB4MUxMOwogCQkJYnJlYWs7Ci0JCWNh c2UgJ2snOiAgICAgICAgICAgICAgICAgICAgICAgLyoga2lsb2J5dGVzIDE8PDEwICovCisJCWNh c2UgJ0snOiAgICAgICAgICAgICAgICAgICAgICAgLyoga2lsb2J5dGVzIDE8PDEwICovCisJCWNh c2UgJ2snOgogCQkJc2NhbGUgPSAweDQwMExMOwogCQkJYnJlYWs7CiAJCWNhc2UgJ00nOiAgICAg ICAgICAgICAgICAgICAgICAgLyogbWVnYWJ5dGVzIDE8PDIwICovCisJCWNhc2UgJ20nOgogCQkJ c2NhbGUgPSAweDEwMDAwMExMOwogCQkJYnJlYWs7CiAJCWNhc2UgJ0cnOiAgICAgICAgICAgICAg ICAgICAgICAgLyogZ2lnYWJ5dGVzIDE8PDMwICovCisJCWNhc2UgJ2cnOgogCQkJc2NhbGUgPSAw eDQwMDAwMDAwTEw7CiAJCQlicmVhazsKIAkJY2FzZSAnVCc6ICAgICAgICAgICAgICAgICAgICAg ICAvKiB0ZXJhYnl0ZXMgMTw8NDAgKi8KKwkJY2FzZSAndCc6CiAJCQlzY2FsZSA9IDB4MTAwMDAw MDAwMExMOwogCQkJYnJlYWs7CiAJCWNhc2UgJ1AnOiAgICAgICAgICAgICAgICAgICAgICAgLyog cGV0YWJ5dGVzIDE8PDUwICovCisJCWNhc2UgJ3AnOgogCQkJc2NhbGUgPSAweDQwMDAwMDAwMDAw MDBMTDsKIAkJCWJyZWFrOwogCQlkZWZhdWx0Ogo= --+permail-200906171855491e86ffa800003434-a_best01+-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 17 19:52: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 A20D1106564A; Wed, 17 Jun 2009 19:52:57 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 22F208FC18; Wed, 17 Jun 2009 19:52:57 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from smoochies.rachie.is-a-geek.net (mailhub.lan.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 6F9BE7E837; Wed, 17 Jun 2009 11:52:56 -0800 (AKDT) From: Mel Flynn To: freebsd-hackers@freebsd.org Date: Wed, 17 Jun 2009 11:52:54 -0800 User-Agent: KMail/1.11.4 (FreeBSD/8.0-CURRENT; KDE/4.2.4; i386; ; ) References: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906161501.45411.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906170815.26650.jhb@freebsd.org> In-Reply-To: <200906170815.26650.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906171152.55438.mel.flynn+fbsd.hackers@mailing.thruhere.net> Cc: Subject: Re: How best to debug locking/scheduler 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: Wed, 17 Jun 2009 19:52:57 -0000 On Wednesday 17 June 2009 04:15:26 John Baldwin wrote: > On Tuesday 16 June 2009 7:01:45 pm Mel Flynn wrote: > > On Tuesday 16 June 2009 11:02:42 John Baldwin wrote: > > > On Tuesday 16 June 2009 1:52:23 pm Mel Flynn wrote: > > > > Hi John, > > > > > > > > On Tuesday 16 June 2009 04:19:57 John Baldwin wrote: > > > > > On Monday 15 June 2009 5:53:05 pm Mel Flynn wrote: > > > > > > PID TID COMM TDNAME KSTACK > > > > > > 4283 100215 kdeinit4 - mi_switch > > > > > > turnstile_wait _mtx_lock_sleep uipc_peeraddr kern_getpeername > > > > > > getpeername syscall Xint0x80_syscall > > > > > > % ps -ww 4283 > > > > > > PID TT STAT TIME COMMAND > > > > > > 4283 ?? T 0:00.38 kdeinit4: kdeinit4: kio_http http > > > > > > local:/tmp/ksocket-mel/klauncherxJ1635.slave-socket > > > > > > local:/tmp/ksocket- mel/plasmayC1653.slave-socket (kdeinit4) > > > > > > > > > > > > %ls -l /tmp/ksocket-mel/ > > > > > > > > > > > > total 2 > > > > > > -rw-rw-r-- 1 mel wheel 62 Jun 14 22:55 KSMserver__0 > > > > > > srw------- 1 mel wheel 0 Jun 14 22:55 kdeinit4__0 > > > > > > srwxrwxr-x 1 mel wheel 0 Jun 14 22:55 > > > > > > klauncherxJ1635.slave-socket > > > > > > > > > > You can use kgdb and the scripts at www.freebsd.org/~jhb/gdb. > > > > > Simply run 'kgdb' as root and do 'lcd /folder/with/scripts' and > > > > > 'source gdb6'. You can then do 'lockchain 4283' to find who holds > > > > > the lock this thread is blocked on and what state they are in. > > > > > > > > Looks like a deadlock: > > > > > > > > (kgdb) lockchain 4283 > > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 > > > > "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock > > > > 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on > > > > lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked > > > > on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) > > > > blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, > > > > klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid > > > > 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 > > > > (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread > > > > 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 > > > > "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock > > > > 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on > > > > lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked > > > > on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) > > > > blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, > > > > kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid > > > > 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 > > > > (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread > > > > 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 > > > > "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock > > > > 0xc6806348 "unp_mtx" DEADLOCK > > > > > > > > Looking through the scripts now to see how I can get more info on the > > > > call chain and hoping I don't panic the machine ;). It is quite > > > > random to reproduce. > > > > > > In kgdb you can simply do 'tid 100122' followed by 'bt' and 'tid > > > 100215' followed by 'bt'. > > > > Cool, thanks for helping John. Of course it pretty much shows me what > > procstat -k shows and can't get any info on the userland part, but I can > > fully inspect the locks and threads. > > > > Both threads are in TDS_INHIBITED state, and blocked on: > > (kgdb) frame 0 > > #0 sched_switch (td=0xc5971240, newtd=0xc4d39900, flags=259) > > at /usr/src/sys/kern/sched_ule.c:1864 > > 1864 cpuid = PCPU_GET(cpuid); > > That doesn't really tell us anything except that it isn't running. We know > it is actually blocked on a lock, and we need the full stack trace to see > where the two threads were trying to acquire the locks, hence 'bt'. ' > procstat -k' output would be fine, too. They're blocking on each other: (kgdb) tid 100122 (kgdb) print td->td_contested.lh_first $16 = (struct turnstile *) 0xc4f8fb00 (kgdb) print td->td_lock $17 = (struct mtx * volatile) 0xc538cb00 (kgdb) tid 100215 (kgdb) print td->td_contested.lh_first $18 = (struct turnstile *) 0xc538cb00 (kgdb) print td->td_lock $19 = (struct mtx * volatile) 0xc4f8fb00 the respective bt's: (kgdb) tid 100122 #0 sched_switch (td=0xc56e8900, newtd=0xc4d39b40, flags=259) at /usr/src/sys/kern/sched_ule.c:1864 #1 0xc064bcfa in mi_switch (flags=259, newtd=0x0) at /usr/src/sys/kern/kern_synch.c:444 #2 0xc067d30b in turnstile_wait (ts=0xc538cb00, owner=0xc5971240, queue=Variable "queue" is not available. ) at /usr/src/sys/kern/subr_turnstile.c:745 #3 0xc06346ac in _mtx_lock_sleep (m=0xc6806348, tid=3312355584, opts=0, file=0x0, line=0) at /usr/src/sys/kern/kern_mutex.c:447 #4 0xc06a68a5 in uipc_peeraddr (so=0xc64309a8, nam=0xe79a2c70) at /usr/src/sys/kern/uipc_usrreq.c:682 #5 0xc06a1e71 in kern_getpeername (td=0xc56e8900, fd=12, sa=0xe79a2c70, alen=0xe79a2c6c) at /usr/src/sys/kern/uipc_syscalls.c:1566 #6 0xc06a1f72 in getpeername (td=0xc56e8900, uap=0xe79a2cf8) at /usr/src/sys/kern/uipc_syscalls.c:1527 #7 0xc0872415 in syscall (frame=0xe79a2d38) at /usr/src/sys/i386/i386/trap.c:1073 #8 0xc0856970 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:261 #9 0x00000033 in ?? () (kgdb) tid 100215 (kgdb) bt #0 sched_switch (td=0xc5971240, newtd=0xc4d39900, flags=259) at /usr/src/sys/kern/sched_ule.c:1864 #1 0xc064bcfa in mi_switch (flags=259, newtd=0x0) at /usr/src/sys/kern/kern_synch.c:444 #2 0xc067d30b in turnstile_wait (ts=0xc4f8fb00, owner=0xc56e8900, queue=Variable "queue" is not available. ) at /usr/src/sys/kern/subr_turnstile.c:745 #3 0xc06346ac in _mtx_lock_sleep (m=0xc64374a0, tid=3315012160, opts=0, file=0x0, line=0) at /usr/src/sys/kern/kern_mutex.c:447 #4 0xc06a68a5 in uipc_peeraddr (so=0xc6976338, nam=0xe9ae9c70) at /usr/src/sys/kern/uipc_usrreq.c:682 #5 0xc06a1e71 in kern_getpeername (td=0xc5971240, fd=7, sa=0xe9ae9c70, alen=0xe9ae9c6c) at /usr/src/sys/kern/uipc_syscalls.c:1566 #6 0xc06a1f72 in getpeername (td=0xc5971240, uap=0xe9ae9cf8) at /usr/src/sys/kern/uipc_syscalls.c:1527 #7 0xc0872415 in syscall (frame=0xe9ae9d38) at /usr/src/sys/i386/i386/trap.c:1073 #8 0xc0856970 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:261 #9 0x00000033 in ?? () Previous frame inner to this frame (corrupt stack?) -- Mel From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 17 21:02: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 2FE771065688 for ; Wed, 17 Jun 2009 21:02:26 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outN.internet-mail-service.net (outn.internet-mail-service.net [216.240.47.237]) by mx1.freebsd.org (Postfix) with ESMTP id 1686F8FC1B for ; Wed, 17 Jun 2009 21:02:25 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 3F67CB998C; Wed, 17 Jun 2009 14:02:26 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 56B332D600D; Wed, 17 Jun 2009 14:02:25 -0700 (PDT) Message-ID: <4A3959E1.1070306@elischer.org> Date: Wed, 17 Jun 2009 14:02:25 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Alexander Best References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: small usr.bin/find patch 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, 17 Jun 2009 21:02:26 -0000 Alexander Best wrote: > hi everybody, > > here's just a quick hack i applied to find. i very often use the -size switch > and always forget if you need to append "m" or "M" for megabyte or "k" or "K" > for kilobyte. after applying the patch find accepts both. ;-) > > cheers. > Are you sure this is wise? after all 125 millibytes would be 1 bit.. ( :-) ) > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 Jun 17 21:18:10 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 9E22B1065672; Wed, 17 Jun 2009 21:18:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6288D8FC0C; Wed, 17 Jun 2009 21:18:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id D184A46B45; Wed, 17 Jun 2009 17:18:09 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id A2C688A072; Wed, 17 Jun 2009 17:18:08 -0400 (EDT) From: John Baldwin To: Mel Flynn Date: Wed, 17 Jun 2009 17:17:37 -0400 User-Agent: KMail/1.9.7 References: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906170815.26650.jhb@freebsd.org> <200906171152.55438.mel.flynn+fbsd.hackers@mailing.thruhere.net> In-Reply-To: <200906171152.55438.mel.flynn+fbsd.hackers@mailing.thruhere.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906171717.37677.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 17 Jun 2009 17:18:08 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: How best to debug locking/scheduler 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: Wed, 17 Jun 2009 21:18:11 -0000 On Wednesday 17 June 2009 3:52:54 pm Mel Flynn wrote: > On Wednesday 17 June 2009 04:15:26 John Baldwin wrote: > > On Tuesday 16 June 2009 7:01:45 pm Mel Flynn wrote: > > > On Tuesday 16 June 2009 11:02:42 John Baldwin wrote: > > > > On Tuesday 16 June 2009 1:52:23 pm Mel Flynn wrote: > > > > > Hi John, > > > > > > > > > > On Tuesday 16 June 2009 04:19:57 John Baldwin wrote: > > > > > > On Monday 15 June 2009 5:53:05 pm Mel Flynn wrote: > > > > > > > PID TID COMM TDNAME KSTACK > > > > > > > 4283 100215 kdeinit4 - mi_switch > > > > > > > turnstile_wait _mtx_lock_sleep uipc_peeraddr kern_getpeername > > > > > > > getpeername syscall Xint0x80_syscall > > > > > > > % ps -ww 4283 > > > > > > > PID TT STAT TIME COMMAND > > > > > > > 4283 ?? T 0:00.38 kdeinit4: kdeinit4: kio_http http > > > > > > > local:/tmp/ksocket-mel/klauncherxJ1635.slave-socket > > > > > > > local:/tmp/ksocket- mel/plasmayC1653.slave-socket (kdeinit4) > > > > > > > > > > > > > > %ls -l /tmp/ksocket-mel/ > > > > > > > > > > > > > > total 2 > > > > > > > -rw-rw-r-- 1 mel wheel 62 Jun 14 22:55 KSMserver__0 > > > > > > > srw------- 1 mel wheel 0 Jun 14 22:55 kdeinit4__0 > > > > > > > srwxrwxr-x 1 mel wheel 0 Jun 14 22:55 > > > > > > > klauncherxJ1635.slave-socket > > > > > > > > > > > > You can use kgdb and the scripts at www.freebsd.org/~jhb/gdb. > > > > > > Simply run 'kgdb' as root and do 'lcd /folder/with/scripts' and > > > > > > 'source gdb6'. You can then do 'lockchain 4283' to find who holds > > > > > > the lock this thread is blocked on and what state they are in. > > > > > > > > > > Looks like a deadlock: > > > > > > > > > > (kgdb) lockchain 4283 > > > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 > > > > > "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock > > > > > 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on > > > > > lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked > > > > > on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) > > > > > blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, > > > > > klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid > > > > > 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 > > > > > (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread > > > > > 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 > > > > > "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock > > > > > 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on > > > > > lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked > > > > > on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) > > > > > blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, > > > > > kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid > > > > > 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 > > > > > (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread > > > > > 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 > > > > > "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock > > > > > 0xc6806348 "unp_mtx" DEADLOCK > > > > > > > > > > Looking through the scripts now to see how I can get more info on the > > > > > call chain and hoping I don't panic the machine ;). It is quite > > > > > random to reproduce. > > > > > > > > In kgdb you can simply do 'tid 100122' followed by 'bt' and 'tid > > > > 100215' followed by 'bt'. > > > > > > Cool, thanks for helping John. Of course it pretty much shows me what > > > procstat -k shows and can't get any info on the userland part, but I can > > > fully inspect the locks and threads. > > > > > > Both threads are in TDS_INHIBITED state, and blocked on: > > > (kgdb) frame 0 > > > #0 sched_switch (td=0xc5971240, newtd=0xc4d39900, flags=259) > > > at /usr/src/sys/kern/sched_ule.c:1864 > > > 1864 cpuid = PCPU_GET(cpuid); > > > > That doesn't really tell us anything except that it isn't running. We know > > it is actually blocked on a lock, and we need the full stack trace to see > > where the two threads were trying to acquire the locks, hence 'bt'. ' > > procstat -k' output would be fine, too. > > the respective bt's: > (kgdb) tid 100122 > at /usr/src/sys/kern/kern_mutex.c:447 > #4 0xc06a68a5 in uipc_peeraddr (so=0xc64309a8, nam=0xe79a2c70) > at /usr/src/sys/kern/uipc_usrreq.c:682 > #5 0xc06a1e71 in kern_getpeername (td=0xc56e8900, fd=12, sa=0xe79a2c70, > alen=0xe79a2c6c) > at /usr/src/sys/kern/uipc_syscalls.c:1566 > > (kgdb) tid 100215 > (kgdb) bt > at /usr/src/sys/kern/kern_mutex.c:447 > #4 0xc06a68a5 in uipc_peeraddr (so=0xc6976338, nam=0xe9ae9c70) > at /usr/src/sys/kern/uipc_usrreq.c:682 > #5 0xc06a1e71 in kern_getpeername (td=0xc5971240, fd=7, sa=0xe9ae9c70, > alen=0xe9ae9c6c) > at /usr/src/sys/kern/uipc_syscalls.c:1566 These are the key frames. It looks like uipc_peeraddr() tries to lock two unp locks w/o any protection from the global unp linkage lock. I've changed it to use the same locking as uipc_accept() where it first grabs a read lock on the linkage lock and then just locks the other end of the connection to copy out its sockaddr. --- //depot/user/jhb/socket/kern/uipc_usrreq.c +++ /home/jhb/work/p4/socket/kern/uipc_usrreq.c @@ -671,7 +671,7 @@ KASSERT(unp != NULL, ("uipc_peeraddr: unp == NULL")); *nam = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); - UNP_PCB_LOCK(unp); + UNP_LINK_RLOCK(); /* * XXX: It seems that this test always fails even when connection is * established. So, this else clause is added as workaround to @@ -681,7 +681,7 @@ if (unp2 != NULL) { UNP_PCB_LOCK(unp2); if (unp2->unp_addr != NULL) - sa = (struct sockaddr *) unp->unp_conn->unp_addr; + sa = (struct sockaddr *) unp2->unp_addr; else sa = &sun_noname; bcopy(sa, *nam, sa->sa_len); @@ -690,7 +690,7 @@ sa = &sun_noname; bcopy(sa, *nam, sa->sa_len); } - UNP_PCB_UNLOCK(unp); + UNP_LINK_RUNLOCK(); return (0); } @@ -850,7 +850,7 @@ * return the slightly counter-intuitive but otherwise * correct error that the socket is not connected. * - * Locking here must be done carefully: the inkage lock + * Locking here must be done carefully: the linkage lock * prevents interconnections between unpcbs from changing, so * we can traverse from unp to unp2 without acquiring unp's * lock. Socket buffer locks follow unpcb locks, so we can -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 17 21:26:30 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 9F11C106566B for ; Wed, 17 Jun 2009 21:26:30 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id D3FE48FC08 for ; Wed, 17 Jun 2009 21:26:29 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n5HLQG4c036986; Wed, 17 Jun 2009 23:26:16 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n5HLQF9s036983; Wed, 17 Jun 2009 23:26:15 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Wed, 17 Jun 2009 23:26:15 +0200 (CEST) From: Wojciech Puchar To: Julian Elischer In-Reply-To: <4A3959E1.1070306@elischer.org> Message-ID: References: <4A3959E1.1070306@elischer.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Alexander Best Subject: Re: small usr.bin/find patch 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, 17 Jun 2009 21:26:31 -0000 >> >> cheers. >> > > Are you sure this is wise? after all 125 millibytes would be 1 bit.. Agree. While lots of people use m instead of M and b instead of B, this is not right to correct proper behavior to improper just for them. From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 17 22:11: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 92E521065672; Wed, 17 Jun 2009 22:11:45 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id D5A608FC22; Wed, 17 Jun 2009 22:11:44 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from smoochies.rachie.is-a-geek.net (mailhub.lan.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id E08667E837; Wed, 17 Jun 2009 14:11:43 -0800 (AKDT) From: Mel Flynn To: freebsd-hackers@freebsd.org Date: Wed, 17 Jun 2009 14:11:42 -0800 User-Agent: KMail/1.11.4 (FreeBSD/8.0-CURRENT; KDE/4.2.4; i386; ; ) References: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906171152.55438.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906171717.37677.jhb@freebsd.org> In-Reply-To: <200906171717.37677.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906171411.42957.mel.flynn+fbsd.hackers@mailing.thruhere.net> Cc: Robert Watson Subject: Re: How best to debug locking/scheduler 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: Wed, 17 Jun 2009 22:11:45 -0000 On Wednesday 17 June 2009 13:17:37 John Baldwin wrote: > On Wednesday 17 June 2009 3:52:54 pm Mel Flynn wrote: > > On Wednesday 17 June 2009 04:15:26 John Baldwin wrote: > > > On Tuesday 16 June 2009 7:01:45 pm Mel Flynn wrote: > > > > On Tuesday 16 June 2009 11:02:42 John Baldwin wrote: > > > > > On Tuesday 16 June 2009 1:52:23 pm Mel Flynn wrote: > > > > > > Hi John, > > > > > > > > > > > > On Tuesday 16 June 2009 04:19:57 John Baldwin wrote: > > > > > > > On Monday 15 June 2009 5:53:05 pm Mel Flynn wrote: > > > > > > > > PID TID COMM TDNAME KSTACK > > > > > > > > 4283 100215 kdeinit4 - mi_switch > > > > > > > > turnstile_wait _mtx_lock_sleep uipc_peeraddr kern_getpeername > > > > > > > > getpeername syscall Xint0x80_syscall > > > > > > > > % ps -ww 4283 > > > > > > > > PID TT STAT TIME COMMAND > > > > > > > > 4283 ?? T 0:00.38 kdeinit4: kdeinit4: kio_http http > > > > > > > > local:/tmp/ksocket-mel/klauncherxJ1635.slave-socket > > > > > > > > local:/tmp/ksocket- mel/plasmayC1653.slave-socket (kdeinit4) > > > > > > > > > > > > > > > > %ls -l /tmp/ksocket-mel/ > > > > > > > > > > > > > > > > total 2 > > > > > > > > -rw-rw-r-- 1 mel wheel 62 Jun 14 22:55 KSMserver__0 > > > > > > > > srw------- 1 mel wheel 0 Jun 14 22:55 kdeinit4__0 > > > > > > > > srwxrwxr-x 1 mel wheel 0 Jun 14 22:55 > > > > > > > > klauncherxJ1635.slave-socket > > > > > > > > > > > > > > You can use kgdb and the scripts at www.freebsd.org/~jhb/gdb. > > > > > > > Simply run 'kgdb' as root and do 'lcd /folder/with/scripts' and > > > > > > > 'source gdb6'. You can then do 'lockchain 4283' to find who > > > > > > > holds the lock this thread is blocked on and what state they > > > > > > > are in. > > > > > > > > > > > > Looks like a deadlock: > > > > > > > > > > > > (kgdb) lockchain 4283 > > > > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 > > > > > > "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock > > > > > > 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked > > > > > > on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) > > blocked > > > > > > > on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) > > > > > > blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, > > > > > > klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 > > > > > > (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread > > > > > > 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 > > > > > > "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock > > > > > > 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked > > > > > > on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) > > > > > > blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, > > > > > > kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid > > > > > > 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread > > > > > > 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 > > > > > > "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock > > > > > > 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked > > > > > > on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) > > > > > > blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, > > > > > > klauncher) blocked on lock 0xc6806348 "unp_mtx" DEADLOCK > > > > > > > > > > > > Looking through the scripts now to see how I can get more info on > > the > > > > > > > call chain and hoping I don't panic the machine ;). It is quite > > > > > > random to reproduce. > > > > > > > > > > In kgdb you can simply do 'tid 100122' followed by 'bt' and 'tid > > > > > 100215' followed by 'bt'. > > > > > > > > Cool, thanks for helping John. Of course it pretty much shows me what > > > > procstat -k shows and can't get any info on the userland part, but I > > > > can fully inspect the locks and threads. > > > > > > > > Both threads are in TDS_INHIBITED state, and blocked on: > > > > (kgdb) frame 0 > > > > #0 sched_switch (td=0xc5971240, newtd=0xc4d39900, flags=259) > > > > at /usr/src/sys/kern/sched_ule.c:1864 > > > > 1864 cpuid = PCPU_GET(cpuid); > > > > > > That doesn't really tell us anything except that it isn't running. We > > know > > > > it is actually blocked on a lock, and we need the full stack trace to > > > see where the two threads were trying to acquire the locks, hence 'bt'. > > > ' procstat -k' output would be fine, too. > > > > the respective bt's: > > (kgdb) tid 100122 > > at /usr/src/sys/kern/kern_mutex.c:447 > > #4 0xc06a68a5 in uipc_peeraddr (so=0xc64309a8, nam=0xe79a2c70) > > at /usr/src/sys/kern/uipc_usrreq.c:682 > > #5 0xc06a1e71 in kern_getpeername (td=0xc56e8900, fd=12, sa=0xe79a2c70, > > alen=0xe79a2c6c) > > at /usr/src/sys/kern/uipc_syscalls.c:1566 > > > > (kgdb) tid 100215 > > (kgdb) bt > > at /usr/src/sys/kern/kern_mutex.c:447 > > #4 0xc06a68a5 in uipc_peeraddr (so=0xc6976338, nam=0xe9ae9c70) > > at /usr/src/sys/kern/uipc_usrreq.c:682 > > #5 0xc06a1e71 in kern_getpeername (td=0xc5971240, fd=7, sa=0xe9ae9c70, > > alen=0xe9ae9c6c) > > at /usr/src/sys/kern/uipc_syscalls.c:1566 > > These are the key frames. It looks like uipc_peeraddr() tries to lock two > unp locks w/o any protection from the global unp linkage lock. I've > changed it to use the same locking as uipc_accept() where it first grabs a > read lock on the linkage lock and then just locks the other end of the > connection to copy out its sockaddr. Thanks John. I'll recompile the kernel with patch and up-to-date current and report back if there are any side effects or if the bug resurfaces. Is there a sure way (i.e. testcase) that would expose this condition? At present, all I can do is wait and maybe play with network interface link up/down, as it seems to be related from a high level view. -- Mel From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 17 22:32:44 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 1E3BA106564A; Wed, 17 Jun 2009 22:32:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id EB2D28FC12; Wed, 17 Jun 2009 22:32:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 7A18546B51; Wed, 17 Jun 2009 18:32:43 -0400 (EDT) Date: Wed, 17 Jun 2009 23:32:43 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John Baldwin In-Reply-To: <200906171717.37677.jhb@freebsd.org> Message-ID: References: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906170815.26650.jhb@freebsd.org> <200906171152.55438.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906171717.37677.jhb@freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Mel Flynn Subject: Re: How best to debug locking/scheduler 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: Wed, 17 Jun 2009 22:32:44 -0000 On Wed, 17 Jun 2009, John Baldwin wrote: > These are the key frames. It looks like uipc_peeraddr() tries to lock two > unp locks w/o any protection from the global unp linkage lock. I've changed > it to use the same locking as uipc_accept() where it first grabs a read lock > on the linkage lock and then just locks the other end of the connection to > copy out its sockaddr. This change looks reasonable to me, thanks for tracking this down! Robert N M Watson Computer Laboratory University of Cambridge > > --- //depot/user/jhb/socket/kern/uipc_usrreq.c > +++ /home/jhb/work/p4/socket/kern/uipc_usrreq.c > @@ -671,7 +671,7 @@ > KASSERT(unp != NULL, ("uipc_peeraddr: unp == NULL")); > > *nam = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); > - UNP_PCB_LOCK(unp); > + UNP_LINK_RLOCK(); > /* > * XXX: It seems that this test always fails even when connection is > * established. So, this else clause is added as workaround to > @@ -681,7 +681,7 @@ > if (unp2 != NULL) { > UNP_PCB_LOCK(unp2); > if (unp2->unp_addr != NULL) > - sa = (struct sockaddr *) unp->unp_conn->unp_addr; > + sa = (struct sockaddr *) unp2->unp_addr; > else > sa = &sun_noname; > bcopy(sa, *nam, sa->sa_len); > @@ -690,7 +690,7 @@ > sa = &sun_noname; > bcopy(sa, *nam, sa->sa_len); > } > - UNP_PCB_UNLOCK(unp); > + UNP_LINK_RUNLOCK(); > return (0); > } > > @@ -850,7 +850,7 @@ > * return the slightly counter-intuitive but otherwise > * correct error that the socket is not connected. > * > - * Locking here must be done carefully: the inkage lock > + * Locking here must be done carefully: the linkage lock > * prevents interconnections between unpcbs from changing, so > * we can traverse from unp to unp2 without acquiring unp's > * lock. Socket buffer locks follow unpcb locks, so we can > > -- > John Baldwin > From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 00:03: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 799B7106566B; Thu, 18 Jun 2009 00:03:57 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (cl-162.ewr-01.us.sixxs.net [IPv6:2001:4830:1200:a1::2]) by mx1.freebsd.org (Postfix) with ESMTP id 189248FC12; Thu, 18 Jun 2009 00:03:56 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id n5I048JR046030; Wed, 17 Jun 2009 19:04:08 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id n5I048KI046029; Wed, 17 Jun 2009 19:04:08 -0500 (CDT) (envelope-from brooks) Date: Wed, 17 Jun 2009 19:04:08 -0500 From: Brooks Davis To: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Message-ID: <20090618000407.GA43514@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Wed, 17 Jun 2009 19:04:08 -0500 (CDT) Cc: Subject: CFT: final patches for NGROUPS>>16 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, 18 Jun 2009 00:03:57 -0000 --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Please find attached three patches which result in raising NGROUPS to 1024, making programs in the base system immune to changing values of NGROUPS, and pave the way for NGROUPS to be boot time configurable. The first two patches (ngroups-catman.diff and ngroups-posix.diff) are userland cleanups. The third (ngroups-main.diff) is the core of the change and primairly in the kernel. It is strongly based on work contributed by Isilon Systems. The proposed commit messages appear to the bottom of this message. I've been running the basic code on my FreeBSD laptop for a while and I've tested basic NFS mounts, but more areas need testing before this hits a release. Key things to hit include: - NFS mount and export - IPFW uid, gid, and jail rules - portalfs (ideally portalfs should be extended to not truncate groups) In practice, expect appliations to not care about this change unless they are run with more than 16 groups. If that happens, calls to getgroups() will fail if they use statically sized buffers recompilation should fix them. Please test, review, etc. I'd like to get this in before code freeze if at all possible. -- Brooks ngroups-catman.diff: When checking if we can write to a file, use access() instead of a manual permission check based on stat output. Also, get rid of the executability check since it is not used. MFC after: 2 weeks ngroups-posix.diff In preparation for raising NGROUPS and NGROUPS_MAX, change base system callers of getgroups(), getgrouplist(), and setgroups() to allocate buffers dynamically. Specifically, allocate a buffer of size sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow). This (or similar gymnastics) is required for the code to actually follow the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime and where getgroups may return {NGROUPS_MAX}+1 results on systems like FreeBSD which include the primary group. In id(1), don't pointlessly add the primary group to the list of all groups, it is always the first result from getgroups(). In principle the old code was more portable, but this was only done in one of the two places where getgroups() was called to the overall effect was pointless. Document the actual POSIX requirements in the getgroups(2) and setgroups(2) manpages. We do not yet support a dynamic NGROUPS, but we may in the future. MFC after: 2 weeks ngroups-main.diff: Rework the credential code to support larger values of NGROUPS and NGROUPS_MAX, eliminate ABI dependencies on them, and raise the to 1024 and 1023 respectively. (Previously they were equal, but under a close reading of POSIX, NGROUPS_MAX was defined to be too large by 1 since it is the number of supplemental groups, not total number of groups.) The bulk of the change consists of converting the struct ucred member cr_groups from a static array to a pointer. Do the equivalent in kinfo_proc. Introduce new interfaces crcopysafe() and crsetgroups() for duplicating a process credential before modifying it and for setting group lists respectively. Both interfaces take care for the details of allocating groups array. crsetgroups() takes care of truncating the group list to the current maximum (NGROUPS) if necessary. In the future, crsetgroups() may be responsible for insuring invariants such as sorting the supplemental groups to allow groupmember() to be implemented as a binary search. Because we can not change struct xucred without breaking application ABIs, we leave it alone and introduce a new XU_NGROUPS value which is always 16 and is to be used or NGRPS as appropriate for things such as NFS which need to use no more than 16 groups. When feasible, truncate the group list rather than generating an error. Minor changes: - Reduce the number of hand rolled versions of groupmember(). - Do not assign to both cr_gid and cr_groups[0]. - Modify ipfw to cache ucreds instead of part of their contents since they are immutable once referenced by more than one entity. Submitted by: Isilon Systems X-MFC after: never --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFKOYR3XY6L6fI4GtQRAlOkAJwKRcS2PcUsUAyGurwQZMgAyM5npQCgkGR8 u6SdpLhMZAQgQ7+RXhyJ5FU= =TZms -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 00:05: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 38425106564A; Thu, 18 Jun 2009 00:05:21 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (cl-162.ewr-01.us.sixxs.net [IPv6:2001:4830:1200:a1::2]) by mx1.freebsd.org (Postfix) with ESMTP id BDD9B8FC1C; Thu, 18 Jun 2009 00:05:19 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id n5I05VUI046057; Wed, 17 Jun 2009 19:05:31 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id n5I05VQW046056; Wed, 17 Jun 2009 19:05:31 -0500 (CDT) (envelope-from brooks) Date: Wed, 17 Jun 2009 19:05:31 -0500 From: Brooks Davis To: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Message-ID: <20090618000531.GA46033@lor.one-eyed-alien.net> References: <20090618000407.GA43514@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O5XBE6gyVG5Rl6Rj" Content-Disposition: inline In-Reply-To: <20090618000407.GA43514@lor.one-eyed-alien.net> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Wed, 17 Jun 2009 19:05:31 -0500 (CDT) Cc: Subject: Re: CFT: final patches for NGROUPS>>16 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, 18 Jun 2009 00:05:21 -0000 --O5XBE6gyVG5Rl6Rj Content-Type: multipart/mixed; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable As usual, I forgot the attachments. Here they are. -- Brooks On Wed, Jun 17, 2009 at 07:04:07PM -0500, Brooks Davis wrote: > Please find attached three patches which result in raising NGROUPS to > 1024, making programs in the base system immune to changing values of > NGROUPS, and pave the way for NGROUPS to be boot time configurable. >=20 > The first two patches (ngroups-catman.diff and ngroups-posix.diff) > are userland cleanups. The third (ngroups-main.diff) is the core of > the change and primairly in the kernel. It is strongly based on work > contributed by Isilon Systems. The proposed commit messages appear to > the bottom of this message. >=20 > I've been running the basic code on my FreeBSD laptop for a while and > I've tested basic NFS mounts, but more areas need testing before this > hits a release. Key things to hit include: > - NFS mount and export > - IPFW uid, gid, and jail rules > - portalfs (ideally portalfs should be extended to not truncate groups) >=20 > In practice, expect appliations to not care about this change unless > they are run with more than 16 groups. If that happens, calls to > getgroups() will fail if they use statically sized buffers recompilation > should fix them. >=20 > Please test, review, etc. I'd like to get this in before code freeze if > at all possible. >=20 > -- Brooks >=20 > ngroups-catman.diff: >=20 > When checking if we can write to a file, use access() instead of a > manual permission check based on stat output. Also, get rid of the > executability check since it is not used. >=20 > MFC after: 2 weeks >=20 > ngroups-posix.diff >=20 > In preparation for raising NGROUPS and NGROUPS_MAX, change base > system callers of getgroups(), getgrouplist(), and setgroups() to > allocate buffers dynamically. Specifically, allocate a buffer of size > sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow). >=20 > This (or similar gymnastics) is required for the code to actually follow > the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime > and where getgroups may return {NGROUPS_MAX}+1 results on systems like > FreeBSD which include the primary group. >=20 > In id(1), don't pointlessly add the primary group to the list of all > groups, it is always the first result from getgroups(). In principle > the old code was more portable, but this was only done in one of the two > places where getgroups() was called to the overall effect was pointless. >=20 > Document the actual POSIX requirements in the getgroups(2) and > setgroups(2) manpages. We do not yet support a dynamic NGROUPS, but we > may in the future. >=20 > MFC after: 2 weeks >=20 > ngroups-main.diff: >=20 > Rework the credential code to support larger values of NGROUPS and > NGROUPS_MAX, eliminate ABI dependencies on them, and raise the to 1024 > and 1023 respectively. (Previously they were equal, but under a close > reading of POSIX, NGROUPS_MAX was defined to be too large by 1 since it > is the number of supplemental groups, not total number of groups.) >=20 > The bulk of the change consists of converting the struct ucred member > cr_groups from a static array to a pointer. Do the equivalent in > kinfo_proc. >=20 > Introduce new interfaces crcopysafe() and crsetgroups() for duplicating > a process credential before modifying it and for setting group lists > respectively. Both interfaces take care for the details of allocating > groups array. crsetgroups() takes care of truncating the group list > to the current maximum (NGROUPS) if necessary. In the future, > crsetgroups() may be responsible for insuring invariants such as sorting > the supplemental groups to allow groupmember() to be implemented as a > binary search. >=20 > Because we can not change struct xucred without breaking application > ABIs, we leave it alone and introduce a new XU_NGROUPS value which is > always 16 and is to be used or NGRPS as appropriate for things such as > NFS which need to use no more than 16 groups. When feasible, truncate > the group list rather than generating an error. >=20 > Minor changes: > - Reduce the number of hand rolled versions of groupmember(). > - Do not assign to both cr_gid and cr_groups[0]. > - Modify ipfw to cache ucreds instead of part of their contents since > they are immutable once referenced by more than one entity. >=20 > Submitted by: Isilon Systems > X-MFC after: never --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ngroups-catman.diff" Content-Transfer-Encoding: quoted-printable diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/usr.bin/catman/catman.c ./usr.bin/c= atman/catman.c --- /usr/fsvn/head/usr.bin/catman/catman.c 2009-01-22 10:04:12.000000000 -0= 600 +++ ./usr.bin/catman/catman.c 2009-05-08 15:47:47.000000000 -0500 @@ -57,7 +57,6 @@ #define TEST_FILE 0x04 #define TEST_READABLE 0x08 #define TEST_WRITABLE 0x10 -#define TEST_EXECUTABLE 0x20 =20 static int verbose; /* -v flag: be verbose with warnings */ static int pretend; /* -n, -p flags: print out what would be done @@ -92,9 +91,6 @@ #define GZCAT_CMD "z" enum Ziptype {NONE, BZIP, GZIP}; =20 -static uid_t uid; -static gid_t gids[NGROUPS_MAX]; -static int ngids; static int starting_dir; static char tmp_file[MAXPATHLEN]; struct stat test_st; @@ -320,23 +316,10 @@ result |=3D TEST_DIR; else if (S_ISREG(test_st.st_mode)) result |=3D TEST_FILE; - if (test_st.st_uid =3D=3D uid) { - test_st.st_mode >>=3D 6; - } else { - int i; - for (i =3D 0; i < ngids; i++) { - if (test_st.st_gid =3D=3D gids[i]) { - test_st.st_mode >>=3D 3; - break; - } - } - } - if (test_st.st_mode & S_IROTH) + if (access(name, R_OK)) result |=3D TEST_READABLE; - if (test_st.st_mode & S_IWOTH) + if (access(name, W_OK)) result |=3D TEST_WRITABLE; - if (test_st.st_mode & S_IXOTH) - result |=3D TEST_EXECUTABLE; return result; } =20 @@ -759,14 +742,6 @@ { int opt; =20 - if ((uid =3D getuid()) =3D=3D 0) { - fprintf(stderr, "don't run %s as root, use:\n echo", argv[0]); - for (optind =3D 0; optind < argc; optind++) { - fprintf(stderr, " %s", argv[optind]); - } - fprintf(stderr, " | nice -5 su -m man\n"); - exit(1); - } while ((opt =3D getopt(argc, argv, "vnfLrh")) !=3D -1) { switch (opt) { case 'f': @@ -789,7 +764,6 @@ /* NOTREACHED */ } } - ngids =3D getgroups(NGROUPS_MAX, gids); if ((starting_dir =3D open(".", 0)) < 0) { err(1, "."); } --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ngroups-posix.diff" Content-Transfer-Encoding: quoted-printable diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/lib/libc/gen/initgroups.3 ./lib/lib= c/gen/initgroups.3 --- /usr/fsvn/head/lib/libc/gen/initgroups.3 2009-01-22 10:05:45.000000000 = -0600 +++ ./lib/libc/gen/initgroups.3 2009-06-09 09:17:36.000000000 -0500 @@ -65,6 +65,13 @@ .Va errno for any of the errors specified for the library function .Xr setgroups 2 . +It may also return: +.Bl -tag -width Er +.It Bq Er ENOMEM +The +.Fn initgroups +function was unable to allocate temporary storage. +.El .Sh SEE ALSO .Xr setgroups 2 , .Xr getgrouplist 3 diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/lib/libc/gen/initgroups.c ./lib/lib= c/gen/initgroups.c --- /usr/fsvn/head/lib/libc/gen/initgroups.c 2009-01-22 10:05:45.000000000 = -0600 +++ ./lib/libc/gen/initgroups.c 2009-06-17 14:00:59.000000000 -0500 @@ -35,10 +35,12 @@ =20 #include =20 -#include #include "namespace.h" #include #include "un-namespace.h" +#include +#include +#include #include =20 int @@ -46,14 +48,21 @@ const char *uname; gid_t agroup; { - int ngroups; + int ngroups, ret; + long ngroups_max; + gid_t *groups; + /* - * Provide space for one group more than NGROUPS to allow + * Provide space for one group more than possible to allow * setgroups to fail and set errno. */ - gid_t groups[NGROUPS + 1]; + ngroups_max =3D sysconf(_SC_NGROUPS_MAX) + 2; + if ((groups =3D malloc(sizeof(*groups) * ngroups_max)) =3D=3D NULL) + return (ENOMEM); =20 - ngroups =3D NGROUPS + 1; + ngroups =3D (int)ngroups_max; getgrouplist(uname, agroup, groups, &ngroups); - return (setgroups(ngroups, groups)); + ret =3D setgroups(ngroups, groups); + free(groups); + return (ret); } diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/lib/libc/rpc/auth_unix.c ./lib/libc= /rpc/auth_unix.c --- /usr/fsvn/head/lib/libc/rpc/auth_unix.c 2009-01-22 10:05:43.000000000 -= 0600 +++ ./lib/libc/rpc/auth_unix.c 2009-06-17 14:00:59.000000000 -0500 @@ -185,23 +185,29 @@ AUTH * authunix_create_default() { - int len; + int ngids; + long ngids_max; char machname[MAXHOSTNAMELEN + 1]; uid_t uid; gid_t gid; - gid_t gids[NGROUPS_MAX]; + gid_t *gids; + + ngids_max =3D sysconf(_SC_NGROUPS_MAX) + 1; + gids =3D malloc(sizeof(gid_t) * ngids_max); + if (gids =3D=3D NULL) + return (NULL); =20 if (gethostname(machname, sizeof machname) =3D=3D -1) abort(); machname[sizeof(machname) - 1] =3D 0; uid =3D geteuid(); gid =3D getegid(); - if ((len =3D getgroups(NGROUPS_MAX, gids)) < 0) + if ((ngids =3D getgroups(ngids_max, gids)) < 0) abort(); - if (len > NGRPS) - len =3D NGRPS; + if (ngids > NGRPS) + ngids =3D NGRPS; /* XXX: interface problem; those should all have been unsigned */ - return (authunix_create(machname, (int)uid, (int)gid, len, + return (authunix_create(machname, (int)uid, (int)gid, ngids, (int *)gids)); } =20 diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/lib/libc/sys/getgroups.2 ./lib/libc= /sys/getgroups.2 --- /usr/fsvn/head/lib/libc/sys/getgroups.2 2009-01-22 10:05:48.000000000 -= 0600 +++ ./lib/libc/sys/getgroups.2 2009-06-16 13:56:17.000000000 -0500 @@ -58,10 +58,7 @@ system call returns the actual number of groups returned in .Fa gidset . -No more than -.Dv NGROUPS_MAX -will ever -be returned. +At least one and as many as {NGROUPS_MAX}+1 values may be returned. If .Fa gidsetlen is zero, @@ -92,6 +89,11 @@ .Sh SEE ALSO .Xr setgroups 2 , .Xr initgroups 3 +.Sh STANDARDS +The +.Fn getgroups +system call conforms to +.St -p1003.1-2008 . .Sh HISTORY The .Fn getgroups diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/lib/libc/sys/setgroups.2 ./lib/libc= /sys/setgroups.2 --- /usr/fsvn/head/lib/libc/sys/setgroups.2 2009-01-22 10:05:48.000000000 -= 0600 +++ ./lib/libc/sys/setgroups.2 2009-06-16 13:56:17.000000000 -0500 @@ -53,9 +53,7 @@ argument indicates the number of entries in the array and must be no more than -.Dv NGROUPS , -as defined in -.In sys/param.h . +.Dv {NGROUPS_MAX}+1 . .Pp Only the super-user may set a new group list. .Sh RETURN VALUES @@ -71,7 +69,7 @@ The number specified in the .Fa ngroups argument is larger than the -.Dv NGROUPS +.Dv {NGROUPS_MAX}+1 limit. .It Bq Er EFAULT The address specified for diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/usr.bin/id/id.c ./usr.bin/id/id.c --- /usr/fsvn/head/usr.bin/id/id.c 2009-01-22 10:04:13.000000000 -0600 +++ ./usr.bin/id/id.c 2009-06-17 14:00:59.000000000 -0500 @@ -258,7 +258,8 @@ gid_t gid, egid, lastgid; uid_t uid, euid; int cnt, ngroups; - gid_t groups[NGROUPS + 1]; + long ngroups_max; + gid_t *groups; const char *fmt; =20 if (pw !=3D NULL) { @@ -270,12 +271,16 @@ gid =3D getgid(); } =20 + ngroups_max =3D sysconf(_SC_NGROUPS_MAX) + 1; + if ((groups =3D malloc(sizeof(gid_t) * ngroups_max)) =3D=3D NULL) + err(1, "malloc"); + if (use_ggl && pw !=3D NULL) { - ngroups =3D NGROUPS + 1; + ngroups =3D ngroups_max; getgrouplist(pw->pw_name, gid, groups, &ngroups); } else { - ngroups =3D getgroups(NGROUPS + 1, groups); + ngroups =3D getgroups(ngroups_max, groups); } =20 if (pw !=3D NULL) @@ -306,6 +311,7 @@ lastgid =3D gid; } printf("\n"); + free(groups); } =20 #ifdef USE_BSM_AUDIT @@ -361,15 +367,19 @@ { struct group *gr; int cnt, id, lastid, ngroups; - gid_t groups[NGROUPS + 1]; + long ngroups_max; + gid_t *groups; const char *fmt; =20 + ngroups_max =3D sysconf(_SC_NGROUPS_MAX) + 1; + if ((groups =3D malloc(sizeof(gid_t) * (ngroups_max))) =3D=3D NULL) + err(1, "malloc"); + if (pw) { - ngroups =3D NGROUPS + 1; + ngroups =3D ngroups_max; (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups); } else { - groups[0] =3D getgid(); - ngroups =3D getgroups(NGROUPS, groups + 1) + 1; + ngroups =3D getgroups(ngroups_max, groups); } fmt =3D nflag ? "%s" : "%u"; for (lastid =3D -1, cnt =3D 0; cnt < ngroups; ++cnt) { @@ -389,6 +399,7 @@ lastid =3D id; } (void)printf("\n"); + free(groups); } =20 void diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/usr.bin/newgrp/newgrp.c ./usr.bin/n= ewgrp/newgrp.c --- /usr/fsvn/head/usr.bin/newgrp/newgrp.c 2009-01-22 10:04:11.000000000 -0= 600 +++ ./usr.bin/newgrp/newgrp.c 2009-06-17 14:00:59.000000000 -0500 @@ -146,8 +146,8 @@ static void addgroup(const char *grpname) { - gid_t grps[NGROUPS_MAX]; - long lgid; + gid_t *grps; + long lgid, ngrps_max; int dbmember, i, ngrps; gid_t egid; struct group *grp; @@ -185,7 +185,10 @@ } } =20 - if ((ngrps =3D getgroups(NGROUPS_MAX, (gid_t *)grps)) < 0) { + ngrps_max =3D sysconf(_SC_NGROUPS_MAX) + 1; + if ((grps =3D malloc(sizeof(gid_t) * ngrps_max)) =3D=3D NULL) + err(1, "malloc"); + if ((ngrps =3D getgroups(ngrps_max, (gid_t *)grps)) < 0) { warn("getgroups"); return; } @@ -217,7 +220,7 @@ =20 /* Add old effective gid to supp. list if it does not exist. */ if (egid !=3D grp->gr_gid && !inarray(egid, grps, ngrps)) { - if (ngrps =3D=3D NGROUPS_MAX) + if (ngrps =3D=3D ngrps_max) warnx("too many groups"); else { grps[ngrps++] =3D egid; @@ -231,6 +234,7 @@ } } =20 + free(grps); } =20 static int diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/usr.bin/quota/quota.c ./usr.bin/quo= ta/quota.c --- /usr/fsvn/head/usr.bin/quota/quota.c 2009-01-22 10:04:12.000000000 -0600 +++ ./usr.bin/quota/quota.c 2009-06-17 14:00:59.000000000 -0500 @@ -117,7 +117,8 @@ main(int argc, char *argv[]) { int ngroups;=20 - gid_t mygid, gidset[NGROUPS]; + long ngroups_max; + gid_t mygid, *gidset; int i, ch, gflag =3D 0, uflag =3D 0, errflag =3D 0; =20 while ((ch =3D getopt(argc, argv, "f:ghlrquv")) !=3D -1) { @@ -159,13 +160,18 @@ errflag +=3D showuid(getuid()); if (gflag) { mygid =3D getgid(); - ngroups =3D getgroups(NGROUPS, gidset); + ngroups_max =3D sysconf(_SC_NGROUPS_MAX) + 1; + if ((gidset =3D malloc(sizeof(gid_t) * ngroups_max)) + =3D=3D NULL) + err(1, "malloc"); + ngroups =3D getgroups(ngroups_max, gidset); if (ngroups < 0) err(1, "getgroups"); errflag +=3D showgid(mygid); for (i =3D 0; i < ngroups; i++) if (gidset[i] !=3D mygid) errflag +=3D showgid(gidset[i]); + free(gidset); } return(errflag); } diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/usr.sbin/chown/chown.c ./usr.sbin/c= hown/chown.c --- /usr/fsvn/head/usr.sbin/chown/chown.c 2009-01-22 10:05:31.000000000 -06= 00 +++ ./usr.sbin/chown/chown.c 2009-06-17 14:00:59.000000000 -0500 @@ -269,7 +269,8 @@ { static uid_t euid =3D -1; static int ngroups =3D -1; - gid_t groups[NGROUPS_MAX]; + static long ngroups_max; + gid_t *groups; =20 /* Check for chown without being root. */ if (errno !=3D EPERM || (uid !=3D (uid_t)-1 && @@ -281,7 +282,10 @@ /* Check group membership; kernel just returns EPERM. */ if (gid !=3D (gid_t)-1 && ngroups =3D=3D -1 && euid =3D=3D (uid_t)-1 && (euid =3D geteuid()) !=3D 0) { - ngroups =3D getgroups(NGROUPS_MAX, groups); + ngroups_max =3D sysconf(_SC_NGROUPS_MAX) + 1; + if ((groups =3D malloc(sizeof(gid_t) * ngroups_max)) =3D=3D NULL) + err(1, "malloc"); + ngroups =3D getgroups(ngroups_max, groups); while (--ngroups >=3D 0 && gid !=3D groups[ngroups]); if (ngroups < 0) { warnx("you are not a member of group %s", gname); diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/usr.sbin/chroot/chroot.c ./usr.sbin= /chroot/chroot.c --- /usr/fsvn/head/usr.sbin/chroot/chroot.c 2009-01-22 10:05:34.000000000 -= 0600 +++ ./usr.sbin/chroot/chroot.c 2009-06-17 14:00:59.000000000 -0500 @@ -69,9 +69,10 @@ struct passwd *pw; char *endp, *p; const char *shell; - gid_t gid, gidlist[NGROUPS_MAX]; + gid_t gid, *gidlist; uid_t uid; int ch, gids; + long ngroups_max; =20 gid =3D 0; uid =3D 0; @@ -117,8 +118,11 @@ } } =20 + ngroups_max =3D sysconf(_SC_NGROUPS_MAX) + 1; + if ((gidlist =3D malloc(sizeof(gid_t) * ngroups_max)) =3D=3D NULL) + err(1, "malloc"); for (gids =3D 0; - (p =3D strsep(&grouplist, ",")) !=3D NULL && gids < NGROUPS_MAX; ) { + (p =3D strsep(&grouplist, ",")) !=3D NULL && gids < ngroups_max; ) { if (*p =3D=3D '\0') continue; =20 @@ -135,7 +139,7 @@ } gids++; } - if (p !=3D NULL && gids =3D=3D NGROUPS_MAX) + if (p !=3D NULL && gids =3D=3D ngroups_max) errx(1, "too many supplementary groups provided"); =20 if (user !=3D NULL) { diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/usr.sbin/jail/jail.c ./usr.sbin/jai= l/jail.c --- /usr/fsvn/head/usr.sbin/jail/jail.c 2009-06-12 00:52:16.000000000 -0500 +++ ./usr.sbin/jail/jail.c 2009-06-17 14:00:59.000000000 -0500 @@ -104,7 +104,7 @@ lcap =3D login_getpwclass(pwd); \ if (lcap =3D=3D NULL) \ err(1, "getpwclass: %s", username); \ - ngroups =3D NGROUPS; \ + ngroups =3D ngroups_max; \ if (getgrouplist(username, pwd->pw_gid, groups, &ngroups) !=3D 0) \ err(1, "getgrouplist: %s", username); \ } while (0) @@ -115,10 +115,11 @@ login_cap_t *lcap =3D NULL; struct iovec rparams[2]; struct passwd *pwd =3D NULL; - gid_t groups[NGROUPS]; + gid_t *groups; size_t sysvallen; int ch, cmdarg, i, jail_set_flags, jid, ngroups, sysval; int hflag, iflag, Jflag, lflag, rflag, uflag, Uflag; + long ngroups_max; unsigned pi; char *ep, *jailname, *securelevel, *username, *JidFile; char errmsg[ERRMSG_SIZE], enforce_statfs[4]; @@ -132,6 +133,10 @@ jailname =3D securelevel =3D username =3D JidFile =3D cleanenv =3D NULL; fp =3D NULL; =20 + ngroups_max =3D sysconf(_SC_NGROUPS_MAX) + 1;=09 + if ((groups =3D malloc(sizeof(gid_t) * ngroups_max)) =3D=3D NULL) + err(1, "malloc"); + while ((ch =3D getopt(argc, argv, "cdhilmn:r:s:u:U:J:")) !=3D -1) { switch (ch) { case 'd': diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/usr.sbin/jexec/jexec.c ./usr.sbin/j= exec/jexec.c --- /usr/fsvn/head/usr.sbin/jexec/jexec.c 2009-05-29 12:48:00.000000000 -05= 00 +++ ./usr.sbin/jexec/jexec.c 2009-06-17 14:00:59.000000000 -0500 @@ -59,7 +59,7 @@ lcap =3D login_getpwclass(pwd); \ if (lcap =3D=3D NULL) \ err(1, "getpwclass: %s", username); \ - ngroups =3D NGROUPS; \ + ngroups =3D ngroups_max; \ if (getgrouplist(username, pwd->pw_gid, groups, &ngroups) !=3D 0) \ err(1, "getgrouplist: %s", username); \ } while (0) @@ -71,12 +71,17 @@ int jid; login_cap_t *lcap =3D NULL; struct passwd *pwd =3D NULL; - gid_t groups[NGROUPS]; + gid_t *groups =3D NULL; int ch, ngroups, uflag, Uflag; + long ngroups_max; char *ep, *username; ch =3D uflag =3D Uflag =3D 0; username =3D NULL; =20 + ngroups_max =3D sysconf(_SC_NGROUPS_MAX) + 1; + if ((groups =3D malloc(sizeof(gid_t) * ngroups_max)) =3D=3D NULL) + err(1, "malloc"); + while ((ch =3D getopt(argc, argv, "nu:U:")) !=3D -1) { switch (ch) { case 'n': diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/usr.sbin/lpr/lpc/lpc.c ./usr.sbin/l= pr/lpc/lpc.c --- /usr/fsvn/head/usr.sbin/lpr/lpc/lpc.c 2009-01-22 10:05:32.000000000 -06= 00 +++ ./usr.sbin/lpr/lpc/lpc.c 2009-06-17 14:00:59.000000000 -0500 @@ -356,7 +356,8 @@ { static struct group *gptr=3DNULL; static int ngroups =3D 0; - static gid_t groups[NGROUPS]; + static long ngroups_max; + static gid_t *groups; register gid_t gid; register int i; =20 @@ -365,7 +366,10 @@ warnx("warning: unknown group '%s'", grname); return(0); } - ngroups =3D getgroups(NGROUPS, groups); + ngroups_max =3D sysconf(_SC_NGROUPS_MAX); + if ((groups =3D malloc(sizeof(gid_t) * ngroups_max)) =3D=3D NULL) + err(1, "malloc"); + ngroups =3D getgroups(ngroups_max, groups); if (ngroups < 0) err(1, "getgroups"); } --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ngroups-main.diff" Content-Transfer-Encoding: quoted-printable diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/lib/libc/rpc/netname.c ./lib/libc/r= pc/netname.c --- /usr/fsvn/head/lib/libc/rpc/netname.c 2009-01-22 10:05:44.000000000 -06= 00 +++ ./lib/libc/rpc/netname.c 2009-05-14 01:48:22.000000000 -0500 @@ -61,9 +61,6 @@ #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 256 #endif -#ifndef NGROUPS -#define NGROUPS 16 -#endif =20 #define TYPE_BIT(type) (sizeof (type) * CHAR_BIT) =20 diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/lib/libc/rpc/netnamer.c ./lib/libc/= rpc/netnamer.c --- /usr/fsvn/head/lib/libc/rpc/netnamer.c 2009-01-22 10:05:44.000000000 -0= 600 +++ ./lib/libc/rpc/netnamer.c 2009-05-13 22:51:38.000000000 -0500 @@ -66,10 +66,6 @@ static int getnetid( char *, char * ); static int _getgroups( char *, gid_t * ); =20 -#ifndef NGROUPS -#define NGROUPS 16 -#endif - /* * Convert network-name into unix credential */ @@ -104,7 +100,7 @@ return (0); } *gidp =3D (gid_t) atol(p); - for (gidlen =3D 0; gidlen < NGROUPS; gidlen++) { + for (gidlen =3D 0; gidlen < NGRPS; gidlen++) { p =3D strsep(&res, "\n,"); if (p =3D=3D NULL) break; @@ -157,7 +153,7 @@ static int _getgroups(uname, groups) char *uname; - gid_t groups[NGROUPS]; + gid_t groups[NGRPS]; { gid_t ngroups =3D 0; struct group *grp; @@ -169,7 +165,7 @@ while ((grp =3D getgrent())) { for (i =3D 0; grp->gr_mem[i]; i++) if (!strcmp(grp->gr_mem[i], uname)) { - if (ngroups =3D=3D NGROUPS) { + if (ngroups =3D=3D NGRPS) { #ifdef DEBUG fprintf(stderr, "initgroups: %s is in too many groups\n", uname); diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/lib/libkvm/kvm_proc.c ./lib/libkvm/= kvm_proc.c --- /usr/fsvn/head/lib/libkvm/kvm_proc.c 2009-06-16 15:54:14.000000000 -0500 +++ ./lib/libkvm/kvm_proc.c 2009-05-28 16:40:33.000000000 -0500 @@ -146,8 +146,7 @@ kp->ki_rgid =3D ucred.cr_rgid; kp->ki_svgid =3D ucred.cr_svgid; kp->ki_ngroups =3D ucred.cr_ngroups; - bcopy(ucred.cr_groups, kp->ki_groups, - NGROUPS * sizeof(gid_t)); + kp->ki_groups =3D ucred.cr_groups; kp->ki_uid =3D ucred.cr_uid; if (ucred.cr_prison !=3D NULL) { if (KREAD(kd, (u_long)ucred.cr_prison, &pr)) { Files /usr/fsvn/head/share/examples/kld/firmware/fwimage/firmware.img and .= /share/examples/kld/firmware/fwimage/firmware.img differ Only in /usr/fsvn/head/sys: .glimpse_exclude Only in /usr/fsvn/head/sys: .glimpse_filenames Only in /usr/fsvn/head/sys: .glimpse_filenames_index Only in /usr/fsvn/head/sys: .glimpse_filetimes Only in /usr/fsvn/head/sys: .glimpse_index Only in /usr/fsvn/head/sys: .glimpse_messages Only in /usr/fsvn/head/sys: .glimpse_partitions Only in /usr/fsvn/head/sys: .glimpse_statistics Only in /usr/fsvn/head/sys: .glimpse_turbo diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/compat/linux/linux_misc.c ./sys= /compat/linux/linux_misc.c --- /usr/fsvn/head/sys/compat/linux/linux_misc.c 2009-06-16 15:54:53.000000= 000 -0500 +++ ./sys/compat/linux/linux_misc.c 2009-06-16 13:56:19.000000000 -0500 @@ -1132,7 +1132,7 @@ linux_setgroups(struct thread *td, struct linux_setgroups_args *args) { struct ucred *newcred, *oldcred; - l_gid_t linux_gidset[NGROUPS]; + l_gid_t *linux_gidset; gid_t *bsd_gidset; int ngrp, error; struct proc *p; @@ -1140,13 +1140,14 @@ ngrp =3D args->gidsetsize; if (ngrp < 0 || ngrp >=3D NGROUPS) return (EINVAL); + linux_gidset =3D malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); error =3D copyin(args->grouplist, linux_gidset, ngrp * sizeof(l_gid_t)); if (error) - return (error); + goto out; newcred =3D crget(); p =3D td->td_proc; PROC_LOCK(p); - oldcred =3D p->p_ucred; + oldcred =3D crcopysafe(p, newcred); =20 /* * cr_groups[0] holds egid. Setting the whole set from @@ -1157,10 +1158,9 @@ if ((error =3D priv_check_cred(oldcred, PRIV_CRED_SETGROUPS, 0)) !=3D 0) { PROC_UNLOCK(p); crfree(newcred); - return (error); + goto out; } =20 - crcopy(newcred, oldcred); if (ngrp > 0) { newcred->cr_ngroups =3D ngrp + 1; =20 @@ -1177,14 +1177,17 @@ p->p_ucred =3D newcred; PROC_UNLOCK(p); crfree(oldcred); - return (0); + error =3D 0; +out: + free(linux_gidset, M_TEMP); + return (error); } =20 int linux_getgroups(struct thread *td, struct linux_getgroups_args *args) { struct ucred *cred; - l_gid_t linux_gidset[NGROUPS]; + l_gid_t *linux_gidset; gid_t *bsd_gidset; int bsd_gidsetsz, ngrp, error; =20 @@ -1207,13 +1210,16 @@ return (EINVAL); =20 ngrp =3D 0; + linux_gidset =3D malloc(bsd_gidsetsz * sizeof(*linux_gidset), + M_TEMP, M_WAITOK); while (ngrp < bsd_gidsetsz) { linux_gidset[ngrp] =3D bsd_gidset[ngrp + 1]; ngrp++; } =20 - if ((error =3D copyout(linux_gidset, args->grouplist, - ngrp * sizeof(l_gid_t)))) + error =3D copyout(linux_gidset, args->grouplist, ngrp * sizeof(l_gid_t)); + free(linux_gidset, M_TEMP); + if (error) return (error); =20 td->td_retval[0] =3D ngrp; diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/compat/linux/linux_uid16.c ./sy= s/compat/linux/linux_uid16.c --- /usr/fsvn/head/sys/compat/linux/linux_uid16.c 2009-06-16 15:54:53.00000= 0000 -0500 +++ ./sys/compat/linux/linux_uid16.c 2009-05-28 16:40:33.000000000 -0500 @@ -98,7 +98,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args) { struct ucred *newcred, *oldcred; - l_gid16_t linux_gidset[NGROUPS]; + l_gid16_t *linux_gidset; gid_t *bsd_gidset; int ngrp, error; struct proc *p; @@ -111,13 +111,14 @@ ngrp =3D args->gidsetsize; if (ngrp < 0 || ngrp >=3D NGROUPS) return (EINVAL); + linux_gidset =3D malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); error =3D copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); if (error) return (error); newcred =3D crget(); p =3D td->td_proc; PROC_LOCK(p); - oldcred =3D p->p_ucred; + oldcred =3D crcopysafe(p, newcred); =20 /* * cr_groups[0] holds egid. Setting the whole set from @@ -128,10 +129,9 @@ if ((error =3D priv_check_cred(oldcred, PRIV_CRED_SETGROUPS, 0)) !=3D 0) { PROC_UNLOCK(p); crfree(newcred); - return (error); + goto out; } =20 - crcopy(newcred, oldcred); if (ngrp > 0) { newcred->cr_ngroups =3D ngrp + 1; =20 @@ -149,14 +149,17 @@ p->p_ucred =3D newcred; PROC_UNLOCK(p); crfree(oldcred); - return (0); + error =3D 0; +out: + free(linux_gidset, M_TEMP); + return (error); } =20 int linux_getgroups16(struct thread *td, struct linux_getgroups16_args *args) { struct ucred *cred; - l_gid16_t linux_gidset[NGROUPS]; + l_gid16_t *linux_gidset; gid_t *bsd_gidset; int bsd_gidsetsz, ngrp, error; =20 @@ -184,12 +187,15 @@ return (EINVAL); =20 ngrp =3D 0; + linux_gidset =3D malloc(bsd_gidsetsz * sizeof(*linux_gidset), + M_TEMP, M_WAITOK); while (ngrp < bsd_gidsetsz) { linux_gidset[ngrp] =3D bsd_gidset[ngrp + 1]; ngrp++; } =20 error =3D copyout(linux_gidset, args->gidset, ngrp * sizeof(l_gid16_t)); + free(linux_gidset, M_TEMP); if (error) return (error); =20 diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/fs/nfs/nfs_commonport.c ./sys/f= s/nfs/nfs_commonport.c --- /usr/fsvn/head/sys/fs/nfs/nfs_commonport.c 2009-05-29 12:48:03.00000000= 0 -0500 +++ ./sys/fs/nfs/nfs_commonport.c 2009-06-09 08:49:37.000000000 -0500 @@ -220,14 +220,9 @@ void newnfs_copycred(struct nfscred *nfscr, struct ucred *cr) { - int ngroups, i; =20 cr->cr_uid =3D nfscr->nfsc_uid; - ngroups =3D (nfscr->nfsc_ngroups < NGROUPS) ? - nfscr->nfsc_ngroups : NGROUPS; - for (i =3D 0; i < ngroups; i++) - cr->cr_groups[i] =3D nfscr->nfsc_groups[i]; - cr->cr_ngroups =3D ngroups; + crsetgroups(cr, nfscr->nfsc_ngroups, nfscr->nfsc_groups); } =20 /* diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/fs/nfsclient/nfs_clport.c ./sys= /fs/nfsclient/nfs_clport.c --- /usr/fsvn/head/sys/fs/nfsclient/nfs_clport.c 2009-05-29 12:48:03.000000= 000 -0500 +++ ./sys/fs/nfsclient/nfs_clport.c 2009-06-05 15:33:54.000000000 -0500 @@ -976,14 +976,12 @@ void newnfs_copyincred(struct ucred *cr, struct nfscred *nfscr) { - int ngroups, i; + int i; =20 nfscr->nfsc_uid =3D cr->cr_uid; - ngroups =3D (cr->cr_ngroups > NGROUPS) ? NGROUPS : - cr->cr_ngroups; - for (i =3D 0; i < ngroups; i++) + nfscr->nfsc_ngroups =3D MIN(cr->cr_ngroups, XU_NGROUPS); + for (i =3D 0; i < nfscr->nfsc_ngroups; i++) nfscr->nfsc_groups[i] =3D cr->cr_groups[i]; - nfscr->nfsc_ngroups =3D ngroups; } =20 =20 diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/fs/nfsserver/nfs_nfsdport.c ./s= ys/fs/nfsserver/nfs_nfsdport.c --- /usr/fsvn/head/sys/fs/nfsserver/nfs_nfsdport.c 2009-06-05 15:33:50.0000= 00000 -0500 +++ ./sys/fs/nfsserver/nfs_nfsdport.c 2009-06-05 16:02:29.000000000 -0500 @@ -2360,7 +2360,6 @@ nfsd_excred(struct nfsrv_descript *nd, struct nfsexstuff *exp, struct ucred *credanon) { - int i; int error =3D 0; =20 /* @@ -2403,9 +2402,8 @@ (nd->nd_flag & ND_AUTHNONE))) { nd->nd_cred->cr_uid =3D credanon->cr_uid; nd->nd_cred->cr_gid =3D credanon->cr_gid; - for (i =3D 0; i < credanon->cr_ngroups && i < NGROUPS; i++) - nd->nd_cred->cr_groups[i] =3D credanon->cr_groups[i]; - nd->nd_cred->cr_ngroups =3D i; + crsetgroups(nd->nd_cred, credanon->cr_ngroups, + credanon->cr_groups); } return (0); } diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/fs/nfsserver/nfs_nfsdstate.c ./= sys/fs/nfsserver/nfs_nfsdstate.c --- /usr/fsvn/head/sys/fs/nfsserver/nfs_nfsdstate.c 2009-06-16 13:55:57.000= 000000 -0500 +++ ./sys/fs/nfsserver/nfs_nfsdstate.c 2009-06-16 13:56:18.000000000 -0500 @@ -3577,7 +3577,6 @@ nd->nd_repstat =3D 0; cred->cr_uid =3D clp->lc_uid; cred->cr_gid =3D clp->lc_gid; - cred->cr_groups[0] =3D clp->lc_gid; callback =3D clp->lc_callback; NFSUNLOCKSTATE(); cred->cr_ngroups =3D 1; diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/fs/portalfs/portal.h ./sys/fs/p= ortalfs/portal.h --- /usr/fsvn/head/sys/fs/portalfs/portal.h 2009-01-22 10:06:01.000000000 -= 0600 +++ ./sys/fs/portalfs/portal.h 2009-06-05 15:33:54.000000000 -0500 @@ -43,7 +43,7 @@ int pcr_flag; /* File open mode */ uid_t pcr_uid; /* From ucred */ short pcr_ngroups; /* From ucred */ - gid_t pcr_groups[NGROUPS]; /* From ucred */ + gid_t pcr_groups[XU_NGROUPS]; /* From ucred */ }; =20 #ifdef _KERNEL diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/fs/portalfs/portal_vnops.c ./sy= s/fs/portalfs/portal_vnops.c --- /usr/fsvn/head/sys/fs/portalfs/portal_vnops.c 2009-01-22 10:06:01.00000= 0000 -0600 +++ ./sys/fs/portalfs/portal_vnops.c 2009-06-05 15:33:54.000000000 -0500 @@ -311,8 +311,9 @@ =20 pcred.pcr_flag =3D ap->a_mode; pcred.pcr_uid =3D ap->a_cred->cr_uid; - pcred.pcr_ngroups =3D ap->a_cred->cr_ngroups; - bcopy(ap->a_cred->cr_groups, pcred.pcr_groups, NGROUPS * sizeof(gid_t)); + pcred.pcr_ngroups =3D MIN(ap->a_cred->cr_ngroups, XU_NGROUPS); + bcopy(ap->a_cred->cr_groups, pcred.pcr_groups, + pcred.pcr_ngroups * sizeof(gid_t)); aiov[0].iov_base =3D (caddr_t) &pcred; aiov[0].iov_len =3D sizeof(pcred); aiov[1].iov_base =3D pt->pt_arg; diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/fs/unionfs/union_vnops.c ./sys/= fs/unionfs/union_vnops.c --- /usr/fsvn/head/sys/fs/unionfs/union_vnops.c 2009-04-12 15:26:52.0000000= 00 -0500 +++ ./sys/fs/unionfs/union_vnops.c 2009-06-05 15:33:54.000000000 -0500 @@ -638,7 +638,6 @@ uid_t uid; /* upper side vnode's uid */ gid_t gid; /* upper side vnode's gid */ u_short vmode; /* upper side vnode's mode */ - gid_t *gp; u_short mask; =20 mask =3D 0; @@ -659,17 +658,14 @@ =20 /* check group */ count =3D 0; - gp =3D cred->cr_groups; - for (; count < cred->cr_ngroups; count++, gp++) { - if (gid =3D=3D *gp) { - if (accmode & VEXEC) - mask |=3D S_IXGRP; - if (accmode & VREAD) - mask |=3D S_IRGRP; - if (accmode & VWRITE) - mask |=3D S_IWGRP; - return ((vmode & mask) =3D=3D mask ? 0 : EACCES); - } + if (groupmember(gid, cred)) { + if (accmode & VEXEC) + mask |=3D S_IXGRP; + if (accmode & VREAD) + mask |=3D S_IRGRP; + if (accmode & VWRITE) + mask |=3D S_IWGRP; + return ((vmode & mask) =3D=3D mask ? 0 : EACCES); } =20 /* check other */ diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/i386/ibcs2/ibcs2_misc.c ./sys/i= 386/ibcs2/ibcs2_misc.c --- /usr/fsvn/head/sys/i386/ibcs2/ibcs2_misc.c 2009-06-16 15:54:53.00000000= 0 -0500 +++ ./sys/i386/ibcs2/ibcs2_misc.c 2009-06-05 16:02:31.000000000 -0500 @@ -657,24 +657,29 @@ struct thread *td; struct ibcs2_getgroups_args *uap; { - ibcs2_gid_t iset[NGROUPS_MAX]; - gid_t gp[NGROUPS_MAX]; + ibcs2_gid_t *iset; + gid_t *gp; u_int i, ngrp; int error; =20 if (uap->gidsetsize < 0) return (EINVAL); ngrp =3D MIN(uap->gidsetsize, NGROUPS_MAX); + gp =3D malloc(ngrp * sizeof(*gp), M_TEMP, M_WAITOK); error =3D kern_getgroups(td, &ngrp, gp); if (error) - return (error); + goto out; if (uap->gidsetsize > 0) { + iset =3D malloc(ngrp * sizeof(*iset), M_TEMP, M_WAITOK); for (i =3D 0; i < ngrp; i++) iset[i] =3D (ibcs2_gid_t)gp[i]; error =3D copyout(iset, uap->gidset, ngrp * sizeof(ibcs2_gid_t)); + free(iset, M_TEMP); } if (error =3D=3D 0) td->td_retval[0] =3D ngrp; +out: + free(gp, M_TEMP); return (error); } =20 @@ -683,21 +688,31 @@ struct thread *td; struct ibcs2_setgroups_args *uap; { - ibcs2_gid_t iset[NGROUPS_MAX]; - gid_t gp[NGROUPS_MAX]; + ibcs2_gid_t *iset; + gid_t *gp; int error, i; =20 if (uap->gidsetsize < 0 || uap->gidsetsize > NGROUPS_MAX) return (EINVAL); - if (uap->gidsetsize && uap->gidset) { + if (uap->gidsetsize && uap->gidset =3D=3D NULL) + return (EINVAL); + gp =3D malloc(uap->gidsetsize * sizeof(*gp), M_TEMP, M_WAITOK); + if (uap->gidsetsize) { + iset =3D malloc(uap->gidsetsize * sizeof(*iset), M_TEMP, M_WAITOK); error =3D copyin(uap->gidset, iset, sizeof(ibcs2_gid_t) * uap->gidsetsize); - if (error) - return (error); + if (error) { + free(iset, M_TEMP); + goto out; + } for (i =3D 0; i < uap->gidsetsize; i++) gp[i] =3D (gid_t)iset[i]; } - return (kern_setgroups(td, uap->gidsetsize, gp)); + + error =3D kern_setgroups(td, uap->gidsetsize, gp); +out: + free(gp, M_TEMP); + return (error); } =20 int diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/kern/kern_exec.c ./sys/kern/ker= n_exec.c --- /usr/fsvn/head/sys/kern/kern_exec.c 2009-06-16 15:54:34.000000000 -0500 +++ ./sys/kern/kern_exec.c 2009-06-12 01:13:11.000000000 -0500 @@ -579,6 +579,7 @@ * reset. */ PROC_LOCK(p); + oldcred =3D crcopysafe(p, newcred); if (sigacts_shared(p->p_sigacts)) { oldsigacts =3D p->p_sigacts; PROC_UNLOCK(p); @@ -629,7 +630,6 @@ * XXXMAC: For the time being, use NOSUID to also prohibit * transitions on the file system. */ - oldcred =3D p->p_ucred; credential_changing =3D 0; credential_changing |=3D (attr.va_mode & S_ISUID) && oldcred->cr_uid !=3D attr.va_uid; @@ -683,7 +683,6 @@ /* * Set the new credentials. */ - crcopy(newcred, oldcred); if (attr.va_mode & S_ISUID) change_euid(newcred, euip); if (attr.va_mode & S_ISGID) @@ -723,7 +722,6 @@ */ if (oldcred->cr_svuid !=3D oldcred->cr_uid || oldcred->cr_svgid !=3D oldcred->cr_gid) { - crcopy(newcred, oldcred); change_svuid(newcred, newcred->cr_uid); change_svgid(newcred, newcred->cr_gid); p->p_ucred =3D newcred; diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/kern/kern_proc.c ./sys/kern/ker= n_proc.c --- /usr/fsvn/head/sys/kern/kern_proc.c 2009-06-16 15:54:34.000000000 -0500 +++ ./sys/kern/kern_proc.c 2009-06-05 16:02:28.000000000 -0500 @@ -730,10 +730,8 @@ kp->ki_uid =3D cred->cr_uid; kp->ki_ruid =3D cred->cr_ruid; kp->ki_svuid =3D cred->cr_svuid; - /* XXX bde doesn't like KI_NGROUPS */ - kp->ki_ngroups =3D min(cred->cr_ngroups, KI_NGROUPS); - bcopy(cred->cr_groups, kp->ki_groups, - kp->ki_ngroups * sizeof(gid_t)); + kp->ki_ngroups =3D cred->cr_ngroups; + kp->ki_groups =3D cred->cr_groups; kp->ki_rgid =3D cred->cr_rgid; kp->ki_svgid =3D cred->cr_svgid; kp->ki_cr_flags =3D cred->cr_flags; --- /usr/fsvn/head/sys/kern/kern_prot.c 2009-06-16 15:54:34.000000000 -0500 +++ ./sys/kern/kern_prot.c 2009-06-17 18:24:56.000000000 -0500 @@ -82,6 +82,10 @@ =20 SYSCTL_NODE(_security, OID_AUTO, bsd, CTLFLAG_RW, 0, "BSD security policy"= ); =20 +static void crextend(struct ucred *cr, int n); +static void crsetgroups_locked(struct ucred *cr, int ngrp, + gid_t *groups); + #ifndef _SYS_SYSPROTO_H_ struct getpid_args { int dummy; @@ -276,18 +280,21 @@ int getgroups(struct thread *td, register struct getgroups_args *uap) { - gid_t groups[NGROUPS]; + gid_t *groups; u_int ngrp; int error; =20 ngrp =3D MIN(uap->gidsetsize, NGROUPS); + groups =3D malloc(ngrp * sizeof(*groups), M_TEMP, M_WAITOK); error =3D kern_getgroups(td, &ngrp, groups); if (error) - return (error); + goto out; if (uap->gidsetsize > 0) error =3D copyout(groups, uap->gidset, ngrp * sizeof(gid_t)); if (error =3D=3D 0) td->td_retval[0] =3D ngrp; +out: + free(groups, M_TEMP); return (error); } =20 @@ -486,7 +493,10 @@ newcred =3D crget(); uip =3D uifind(uid); PROC_LOCK(p); - oldcred =3D p->p_ucred; + /* + * Copy credentials so other references do not see our changes. + */ + oldcred =3D crcopysafe(p, newcred); =20 #ifdef MAC error =3D mac_cred_check_setuid(oldcred, uid); @@ -521,10 +531,6 @@ (error =3D priv_check_cred(oldcred, PRIV_CRED_SETUID, 0)) !=3D 0) goto fail; =20 - /* - * Copy credentials so other references do not see our changes. - */ - crcopy(newcred, oldcred); #ifdef _POSIX_SAVED_IDS /* * Do we have "appropriate privileges" (are we root or uid =3D=3D euid) @@ -598,7 +604,10 @@ newcred =3D crget(); euip =3D uifind(euid); PROC_LOCK(p); - oldcred =3D p->p_ucred; + /* + * Copy credentials so other references do not see our changes. + */ + oldcred =3D crcopysafe(p, newcred); =20 #ifdef MAC error =3D mac_cred_check_seteuid(oldcred, euid); @@ -612,8 +621,7 @@ goto fail; =20 /* - * Everything's okay, do it. Copy credentials so other references do - * not see our changes. + * Everything's okay, do it. */ crcopy(newcred, oldcred); if (oldcred->cr_uid !=3D euid) { @@ -651,7 +659,7 @@ AUDIT_ARG(gid, gid); newcred =3D crget(); PROC_LOCK(p); - oldcred =3D p->p_ucred; + oldcred =3D crcopysafe(p, newcred); =20 #ifdef MAC error =3D mac_cred_check_setgid(oldcred, gid); @@ -680,7 +688,6 @@ (error =3D priv_check_cred(oldcred, PRIV_CRED_SETGID, 0)) !=3D 0) goto fail; =20 - crcopy(newcred, oldcred); #ifdef _POSIX_SAVED_IDS /* * Do we have "appropriate privileges" (are we root or gid =3D=3D egid) @@ -750,7 +757,7 @@ AUDIT_ARG(egid, egid); newcred =3D crget(); PROC_LOCK(p); - oldcred =3D p->p_ucred; + oldcred =3D crcopysafe(p, newcred); =20 #ifdef MAC error =3D mac_cred_check_setegid(oldcred, egid); @@ -763,7 +770,6 @@ (error =3D priv_check_cred(oldcred, PRIV_CRED_SETEGID, 0)) !=3D 0) goto fail; =20 - crcopy(newcred, oldcred); if (oldcred->cr_groups[0] !=3D egid) { change_egid(newcred, egid); setsugid(p); @@ -789,15 +795,19 @@ int setgroups(struct thread *td, struct setgroups_args *uap) { - gid_t groups[NGROUPS]; + gid_t *groups =3D NULL; int error; =20 if (uap->gidsetsize > NGROUPS) return (EINVAL); + groups =3D malloc(uap->gidsetsize * sizeof(gid_t), M_TEMP, M_WAITOK); error =3D copyin(uap->gidset, groups, uap->gidsetsize * sizeof(gid_t)); if (error) - return (error); - return (kern_setgroups(td, uap->gidsetsize, groups)); + goto out; + error =3D kern_setgroups(td, uap->gidsetsize, groups); +out: + free(groups, M_TEMP); + return (error); } =20 int @@ -811,8 +821,9 @@ return (EINVAL); AUDIT_ARG(groupset, groups, ngrp); newcred =3D crget(); + crextend(newcred, ngrp); PROC_LOCK(p); - oldcred =3D p->p_ucred; + oldcred =3D crcopysafe(p, newcred); =20 #ifdef MAC error =3D mac_cred_check_setgroups(oldcred, ngrp, groups); @@ -824,11 +835,6 @@ if (error) goto fail; =20 - /* - * XXX A little bit lazy here. We could test if anything has - * changed before crcopy() and setting P_SUGID. - */ - crcopy(newcred, oldcred); if (ngrp < 1) { /* * setgroups(0, NULL) is a legitimate way of clearing the @@ -838,8 +844,7 @@ */ newcred->cr_ngroups =3D 1; } else { - bcopy(groups, newcred->cr_groups, ngrp * sizeof(gid_t)); - newcred->cr_ngroups =3D ngrp; + crsetgroups_locked(newcred, ngrp, groups); } setsugid(p); p->p_ucred =3D newcred; @@ -877,7 +882,7 @@ euip =3D uifind(euid); ruip =3D uifind(ruid); PROC_LOCK(p); - oldcred =3D p->p_ucred; + oldcred =3D crcopysafe(p, newcred); =20 #ifdef MAC error =3D mac_cred_check_setreuid(oldcred, ruid, euid); @@ -892,7 +897,6 @@ (error =3D priv_check_cred(oldcred, PRIV_CRED_SETREUID, 0)) !=3D 0) goto fail; =20 - crcopy(newcred, oldcred); if (euid !=3D (uid_t)-1 && oldcred->cr_uid !=3D euid) { change_euid(newcred, euip); setsugid(p); @@ -942,7 +946,7 @@ AUDIT_ARG(rgid, rgid); newcred =3D crget(); PROC_LOCK(p); - oldcred =3D p->p_ucred; + oldcred =3D crcopysafe(p, newcred); =20 #ifdef MAC error =3D mac_cred_check_setregid(oldcred, rgid, egid); @@ -957,7 +961,6 @@ (error =3D priv_check_cred(oldcred, PRIV_CRED_SETREGID, 0)) !=3D 0) goto fail; =20 - crcopy(newcred, oldcred); if (egid !=3D (gid_t)-1 && oldcred->cr_groups[0] !=3D egid) { change_egid(newcred, egid); setsugid(p); @@ -1013,7 +1016,7 @@ euip =3D uifind(euid); ruip =3D uifind(ruid); PROC_LOCK(p); - oldcred =3D p->p_ucred; + oldcred =3D crcopysafe(p, newcred); =20 #ifdef MAC error =3D mac_cred_check_setresuid(oldcred, ruid, euid, suid); @@ -1033,7 +1036,6 @@ (error =3D priv_check_cred(oldcred, PRIV_CRED_SETRESUID, 0)) !=3D 0) goto fail; =20 - crcopy(newcred, oldcred); if (euid !=3D (uid_t)-1 && oldcred->cr_uid !=3D euid) { change_euid(newcred, euip); setsugid(p); @@ -1090,7 +1092,7 @@ AUDIT_ARG(sgid, sgid); newcred =3D crget(); PROC_LOCK(p); - oldcred =3D p->p_ucred; + oldcred =3D crcopysafe(p, newcred); =20 #ifdef MAC error =3D mac_cred_check_setresgid(oldcred, rgid, egid, sgid); @@ -1110,7 +1112,6 @@ (error =3D priv_check_cred(oldcred, PRIV_CRED_SETRESGID, 0)) !=3D 0) goto fail; =20 - crcopy(newcred, oldcred); if (egid !=3D (gid_t)-1 && oldcred->cr_groups[0] !=3D egid) { change_egid(newcred, egid); setsugid(p); @@ -1780,6 +1781,7 @@ #ifdef MAC mac_cred_init(cr); #endif + crextend(cr, XU_NGROUPS); return (cr); } =20 @@ -1829,6 +1831,7 @@ #ifdef MAC mac_cred_destroy(cr); #endif + free(cr->cr_groups, M_CRED); free(cr, M_CRED); } } @@ -1854,6 +1857,7 @@ bcopy(&src->cr_startcopy, &dest->cr_startcopy, (unsigned)((caddr_t)&src->cr_endcopy - (caddr_t)&src->cr_startcopy)); + crsetgroups(dest, src->cr_ngroups, src->cr_groups); uihold(dest->cr_uidinfo); uihold(dest->cr_ruidinfo); prison_hold(dest->cr_prison); @@ -1888,12 +1892,16 @@ void cru2x(struct ucred *cr, struct xucred *xcr) { + int ngroups; =20 bzero(xcr, sizeof(*xcr)); xcr->cr_version =3D XUCRED_VERSION; xcr->cr_uid =3D cr->cr_uid; - xcr->cr_ngroups =3D cr->cr_ngroups; - bcopy(cr->cr_groups, xcr->cr_groups, sizeof(cr->cr_groups)); + + ngroups =3D MIN(cr->cr_ngroups, XU_NGROUPS); + xcr->cr_ngroups =3D ngroups; + bcopy(cr->cr_groups, xcr->cr_groups, + ngroups * sizeof(*cr->cr_groups)); } =20 /* @@ -1915,6 +1923,97 @@ crfree(cred); } =20 +struct ucred * +crcopysafe(struct proc *p, struct ucred *cr) +{ + struct ucred *oldcred; + int groups; + + PROC_LOCK_ASSERT(p, MA_OWNED); + + oldcred =3D p->p_ucred; + while (cr->cr_agroups < oldcred->cr_agroups) { + groups =3D oldcred->cr_agroups; + PROC_UNLOCK(p); + crextend(cr, groups); + PROC_LOCK(p); + oldcred =3D p->p_ucred; + } + crcopy(cr, oldcred); + + return (oldcred); +} + +/* + * Extend the passed in credential to hold n items. + */ +static void +crextend(struct ucred *cr, int n) +{ + int cnt; + + /* Truncate? */ + if (n <=3D cr->cr_agroups) + return; + + /* + * We extend by 2 each time since we're using a power of two + * allocator until we need enough groups to fill a page. + * Once we're allocating multiple pages, only allocate as many + * as we actually need. The case of processes needing a + * non-power of two number of pages seems more likely than + * a real world process that adds thousands of groups one at a + * time. + */ + if ( n < PAGE_SIZE / sizeof(gid_t) ) { + if (cr->cr_agroups =3D=3D 0) + cnt =3D MINALLOCSIZE / sizeof(gid_t); + else + cnt =3D cr->cr_agroups * 2; + + while (cnt < n) + cnt *=3D 2; + } else + cnt =3D roundup2(n, PAGE_SIZE / sizeof(gid_t)); + + /* Free the old array. */ + if (cr->cr_groups) + free(cr->cr_groups, M_CRED); + + cr->cr_groups =3D malloc(cnt * sizeof(gid_t), M_CRED, M_WAITOK | M_ZERO); + cr->cr_agroups =3D cnt; +} + +/* + * Copy groups in to a credential, preserving any necessicary invariants + * (i.e. sorting in the future). crextend() must have been called + * before hand to ensure sufficient space is available. If=20 + */ +static void +crsetgroups_locked(struct ucred *cr, int ngrp, gid_t *groups) +{ +=09 + KASSERT(cr->cr_agroups >=3D ngrp, ("cr_ngroups is too small")); + + bcopy(groups, cr->cr_groups, ngrp * sizeof(gid_t)); + cr->cr_ngroups =3D ngrp; +} + +/* + * Copy groups in to a credential after expanding it if required. + * Truncate the list to NGROUPS if it is too large. + */ +void +crsetgroups(struct ucred *cr, int ngrp, gid_t *groups) +{ + + if (ngrp > NGROUPS) + ngrp =3D NGROUPS; + + crextend(cr, ngrp); + crsetgroups_locked(cr, ngrp, groups); +} + /* * Get login name, if available. */ diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/kern/vfs_export.c ./sys/kern/vf= s_export.c --- /usr/fsvn/head/sys/kern/vfs_export.c 2009-05-29 12:48:02.000000000 -0500 +++ ./sys/kern/vfs_export.c 2009-06-05 15:33:54.000000000 -0500 @@ -120,9 +120,8 @@ np->netc_exflags =3D argp->ex_flags; np->netc_anon =3D crget(); np->netc_anon->cr_uid =3D argp->ex_anon.cr_uid; - np->netc_anon->cr_ngroups =3D argp->ex_anon.cr_ngroups; - bcopy(argp->ex_anon.cr_groups, np->netc_anon->cr_groups, - sizeof(np->netc_anon->cr_groups)); + crsetgroups(np->netc_anon, argp->ex_anon.cr_ngroups, + argp->ex_anon.cr_groups); np->netc_numsecflavors =3D argp->ex_numsecflavors; bcopy(argp->ex_secflavors, np->netc_secflavors, sizeof(np->netc_secflavors)); @@ -205,9 +204,8 @@ np->netc_exflags =3D argp->ex_flags; np->netc_anon =3D crget(); np->netc_anon->cr_uid =3D argp->ex_anon.cr_uid; - np->netc_anon->cr_ngroups =3D argp->ex_anon.cr_ngroups; - bcopy(argp->ex_anon.cr_groups, np->netc_anon->cr_groups, - sizeof(np->netc_anon->cr_groups)); + crsetgroups(np->netc_anon, argp->ex_anon.cr_ngroups, + np->netc_anon->cr_groups); np->netc_numsecflavors =3D argp->ex_numsecflavors; bcopy(argp->ex_secflavors, np->netc_secflavors, sizeof(np->netc_secflavors)); diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/netinet/ipfw/ip_fw2.c ./sys/net= inet/ipfw/ip_fw2.c --- /usr/fsvn/head/sys/netinet/ipfw/ip_fw2.c 2009-06-12 00:52:26.000000000 = -0500 +++ ./sys/netinet/ipfw/ip_fw2.c 2009-06-17 13:42:23.000000000 -0500 @@ -135,19 +135,6 @@ struct ip_fw *ip_fw_default_rule; =20 /* - * Data structure to cache our ucred related - * information. This structure only gets used if - * the user specified UID/GID based constraints in - * a firewall rule. - */ -struct ip_fw_ugid { - gid_t fw_groups[NGROUPS]; - int fw_ngroups; - uid_t fw_uid; - int fw_prid; -}; - -/* * list of rules for layer 3 */ #ifdef VIMAGE_GLOBALS @@ -2009,22 +1996,10 @@ return (0); } =20 -static void -fill_ugid_cache(struct inpcb *inp, struct ip_fw_ugid *ugp) -{ - struct ucred *cr; - - cr =3D inp->inp_cred; - ugp->fw_prid =3D jailed(cr) ? cr->cr_prison->pr_id : -1; - ugp->fw_uid =3D cr->cr_uid; - ugp->fw_ngroups =3D cr->cr_ngroups; - bcopy(cr->cr_groups, ugp->fw_groups, sizeof(ugp->fw_groups)); -} - static int check_uidgid(ipfw_insn_u32 *insn, int proto, struct ifnet *oif, struct in_addr dst_ip, u_int16_t dst_port, struct in_addr src_ip, - u_int16_t src_port, struct ip_fw_ugid *ugp, int *ugid_lookupp, + u_int16_t src_port, struct ucred **uc, int *ugid_lookupp, struct inpcb *inp) { INIT_VNET_INET(curvnet); @@ -2032,7 +2007,6 @@ int wildcard; struct inpcb *pcb; int match; - gid_t *gp; =20 /* * Check to see if the UDP or TCP stack supplied us with @@ -2042,7 +2016,7 @@ if (inp && *ugid_lookupp =3D=3D 0) { INP_LOCK_ASSERT(inp); if (inp->inp_socket !=3D NULL) { - fill_ugid_cache(inp, ugp); + *uc =3D crhold(inp->inp_cred); *ugid_lookupp =3D 1; } else *ugid_lookupp =3D -1; @@ -2075,7 +2049,7 @@ dst_ip, htons(dst_port), wildcard, NULL); if (pcb !=3D NULL) { - fill_ugid_cache(pcb, ugp); + *uc =3D crhold(inp->inp_cred); *ugid_lookupp =3D 1; } INP_INFO_RUNLOCK(pi); @@ -2091,16 +2065,11 @@ } }=20 if (insn->o.opcode =3D=3D O_UID) - match =3D (ugp->fw_uid =3D=3D (uid_t)insn->d[0]); - else if (insn->o.opcode =3D=3D O_GID) { - for (gp =3D ugp->fw_groups; - gp < &ugp->fw_groups[ugp->fw_ngroups]; gp++) - if (*gp =3D=3D (gid_t)insn->d[0]) { - match =3D 1; - break; - } - } else if (insn->o.opcode =3D=3D O_JAIL) - match =3D (ugp->fw_prid =3D=3D (int)insn->d[0]); + match =3D ((*uc)->cr_uid =3D=3D (uid_t)insn->d[0]); + else if (insn->o.opcode =3D=3D O_GID) + match =3D groupmember((gid_t)insn->d[0], *uc); + else if (insn->o.opcode =3D=3D O_JAIL) + match =3D ((*uc)->cr_prison->pr_id =3D=3D (int)insn->d[0]); return match; } =20 @@ -2178,8 +2147,8 @@ * these types of constraints, as well as decrease contention * on pcb related locks. */ - struct ip_fw_ugid fw_ugid_cache; - int ugid_lookup =3D 0; + struct ucred *ucred_cache =3D NULL; + int ucred_lookup =3D 0; =20 /* * divinput_flags If non-zero, set to the IP_FW_DIVERT_*_FLAG @@ -2641,8 +2610,8 @@ (ipfw_insn_u32 *)cmd, proto, oif, dst_ip, dst_port, - src_ip, src_port, &fw_ugid_cache, - &ugid_lookup, args->inp); + src_ip, src_port, &ucred_cache, + &ucred_lookup, args->inp); break; =20 case O_RECV: @@ -3270,6 +3239,8 @@ /* XXX statistic */ /* drop packet */ IPFW_RUNLOCK(chain); + if (ucred_cache !=3D NULL) + crfree(ucred_cache); return (IP_FW_DENY); } dt =3D (struct divert_tag *)(mtag+1); @@ -3475,6 +3446,8 @@ } /* end of outer for, scan rules */ printf("ipfw: ouch!, skip past end of rules, denying packet\n"); IPFW_RUNLOCK(chain); + if (ucred_cache !=3D NULL) + crfree(ucred_cache); return (IP_FW_DENY); =20 done: @@ -3483,6 +3456,8 @@ f->bcnt +=3D pktlen; f->timestamp =3D time_uptime; IPFW_RUNLOCK(chain); + if (ucred_cache !=3D NULL) + crfree(ucred_cache); return (retval); =20 pullup_failed: diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/nfsserver/nfs_srvsock.c ./sys/n= fsserver/nfs_srvsock.c --- /usr/fsvn/head/sys/nfsserver/nfs_srvsock.c 2009-06-16 15:54:40.00000000= 0 -0500 +++ ./sys/nfsserver/nfs_srvsock.c 2009-06-09 08:49:37.000000000 -0500 @@ -370,11 +370,11 @@ } tl =3D nfsm_dissect_nonblock(u_int32_t *, (len + 2) * NFSX_UNSIGNED); for (i =3D 1; i <=3D len; i++) - if (i < NGROUPS) + if (i < XU_NGROUPS) nd->nd_cr->cr_groups[i] =3D fxdr_unsigned(gid_t, *tl++); else tl++; - nd->nd_cr->cr_ngroups =3D (len >=3D NGROUPS) ? NGROUPS : (len + 1); + nd->nd_cr->cr_ngroups =3D MIN(XU_NGROUPS, len + 1); if (nd->nd_cr->cr_ngroups > 1) nfsrvw_sort(nd->nd_cr->cr_groups, nd->nd_cr->cr_ngroups); len =3D fxdr_unsigned(int, *++tl); diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/nfsserver/nfs_srvsubs.c ./sys/n= fsserver/nfs_srvsubs.c --- /usr/fsvn/head/sys/nfsserver/nfs_srvsubs.c 2009-05-29 12:48:04.00000000= 0 -0500 +++ ./sys/nfsserver/nfs_srvsubs.c 2009-06-05 15:33:54.000000000 -0500 @@ -1181,9 +1181,7 @@ cred =3D nfsd->nd_cr; if (cred->cr_uid =3D=3D 0 || (exflags & MNT_EXPORTANON)) { cred->cr_uid =3D credanon->cr_uid; - for (i =3D 0; i < credanon->cr_ngroups && i < NGROUPS; i++) - cred->cr_groups[i] =3D credanon->cr_groups[i]; - cred->cr_ngroups =3D i; + crsetgroups(cred, credanon->cr_ngroups, credanon->cr_groups); } if (exflags & MNT_EXRDONLY) *rdonlyp =3D 1; diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c= ./sys/rpc/rpcsec_gss/svc_rpcsec_gss.c --- /usr/fsvn/head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c 2009-06-16 13:55:57.= 000000000 -0500 +++ ./sys/rpc/rpcsec_gss/svc_rpcsec_gss.c 2009-06-16 13:56:18.000000000 -05= 00 @@ -449,11 +449,7 @@ cr =3D client->cl_cred =3D crget(); cr->cr_uid =3D cr->cr_ruid =3D cr->cr_svuid =3D uc->uid; cr->cr_rgid =3D cr->cr_svgid =3D uc->gid; - cr->cr_ngroups =3D uc->gidlen; - if (cr->cr_ngroups > NGROUPS) - cr->cr_ngroups =3D NGROUPS; - for (i =3D 0; i < cr->cr_ngroups; i++) - cr->cr_groups[i] =3D uc->gidlist[i]; + crsetgroups(cr, uc->gidlen, uc->gidlist); *crp =3D crhold(cr); =20 return (TRUE); diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/rpc/svc_auth.c ./sys/rpc/svc_au= th.c --- /usr/fsvn/head/sys/rpc/svc_auth.c 2009-06-12 00:52:17.000000000 -0500 +++ ./sys/rpc/svc_auth.c 2009-06-12 01:13:12.000000000 -0500 @@ -166,7 +166,7 @@ svc_getcred(struct svc_req *rqst, struct ucred **crp, int *flavorp) { struct ucred *cr =3D NULL; - int flavor, i; + int flavor; struct xucred *xcr; =20 flavor =3D rqst->rq_cred.oa_flavor; @@ -178,9 +178,7 @@ xcr =3D (struct xucred *) rqst->rq_clntcred; cr =3D crget(); cr->cr_uid =3D cr->cr_ruid =3D cr->cr_svuid =3D xcr->cr_uid; - cr->cr_ngroups =3D xcr->cr_ngroups; - for (i =3D 0; i < xcr->cr_ngroups; i++) - cr->cr_groups[i] =3D xcr->cr_groups[i]; + crsetgroups(cr, xcr->cr_ngroups, xcr->cr_groups); cr->cr_rgid =3D cr->cr_svgid =3D cr->cr_groups[0]; cr->cr_prison =3D &prison0; prison_hold(cr->cr_prison); diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/rpc/svc_auth_unix.c ./sys/rpc/s= vc_auth_unix.c --- /usr/fsvn/head/sys/rpc/svc_auth_unix.c 2009-01-22 10:05:57.000000000 -0= 600 +++ ./sys/rpc/svc_auth_unix.c 2009-06-09 08:49:37.000000000 -0500 @@ -95,13 +95,13 @@ goto done; } for (i =3D 0; i < gid_len; i++) { - if (i + 1 < NGROUPS) + if (i + 1 < XU_NGROUPS) xcr->cr_groups[i + 1] =3D IXDR_GET_INT32(buf); else buf++; } - if (gid_len + 1 > NGROUPS) - xcr->cr_ngroups =3D NGROUPS; + if (gid_len + 1 > XU_NGROUPS) + xcr->cr_ngroups =3D XU_NGROUPS; else xcr->cr_ngroups =3D gid_len + 1; =20 diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/sys/param.h ./sys/sys/param.h --- /usr/fsvn/head/sys/sys/param.h 2009-06-16 13:55:59.000000000 -0500 +++ ./sys/sys/param.h 2009-06-16 13:56:20.000000000 -0500 @@ -77,7 +77,7 @@ #define MAXLOGNAME 17 /* max login name length (incl. NUL) */ #define MAXUPRC CHILD_MAX /* max simultaneous processes */ #define NCARGS ARG_MAX /* max bytes for an exec function */ -#define NGROUPS NGROUPS_MAX /* max number groups */ +#define NGROUPS NGROUPS_MAX+1 /* max number groups */ #define NOFILE OPEN_MAX /* max open files per process */ #define NOGROUP 65535 /* marker for empty group set member */ #define MAXHOSTNAMELEN 256 /* max hostname size */ diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/sys/syslimits.h ./sys/sys/sysli= mits.h --- /usr/fsvn/head/sys/sys/syslimits.h 2009-01-22 10:06:22.000000000 -0600 +++ ./sys/sys/syslimits.h 2009-06-08 23:57:36.000000000 -0500 @@ -54,7 +54,9 @@ #define MAX_CANON 255 /* max bytes in term canon input line */ #define MAX_INPUT 255 /* max bytes in terminal input */ #define NAME_MAX 255 /* max bytes in a file name */ -#define NGROUPS_MAX 16 /* max supplemental group id's */ +#ifndef NGROUPS_MAX +#define NGROUPS_MAX 1023 /* max supplemental group id's */ +#endif #ifndef OPEN_MAX #define OPEN_MAX 64 /* max open files per process */ #endif --- /usr/fsvn/head/sys/sys/ucred.h 2009-06-16 15:54:53.000000000 -0500 +++ ./sys/sys/ucred.h 2009-06-17 18:23:49.000000000 -0500 @@ -48,8 +48,7 @@ uid_t cr_uid; /* effective user id */ uid_t cr_ruid; /* real user id */ uid_t cr_svuid; /* saved user id */ - short cr_ngroups; /* number of groups */ - gid_t cr_groups[NGROUPS]; /* groups */ + int cr_ngroups; /* number of groups */ gid_t cr_rgid; /* real group id */ gid_t cr_svgid; /* saved group id */ struct uidinfo *cr_uidinfo; /* per euid resource consumption */ @@ -61,11 +60,15 @@ #define cr_endcopy cr_label struct label *cr_label; /* MAC label */ struct auditinfo_addr cr_audit; /* Audit properties. */ + gid_t *cr_groups; /* groups */ + int cr_agroups; /* Available groups */ }; #define NOCRED ((struct ucred *)0) /* no credential available */ #define FSCRED ((struct ucred *)-1) /* filesystem credential */ #endif /* _KERNEL || _WANT_UCRED */ =20 +#define XU_NGROUPS 16 + /* * This is the external representation of struct ucred. */ @@ -73,7 +76,7 @@ u_int cr_version; /* structure layout version */ uid_t cr_uid; /* effective user id */ short cr_ngroups; /* number of groups */ - gid_t cr_groups[NGROUPS]; /* groups */ + gid_t cr_groups[XU_NGROUPS]; /* groups */ void *_cr_unused1; /* compatibility with old ucred */ }; #define XUCRED_VERSION 0 @@ -82,6 +85,7 @@ #define cr_gid cr_groups[0] =20 #ifdef _KERNEL +struct proc; struct thread; =20 void change_egid(struct ucred *newcred, gid_t egid); @@ -91,6 +95,7 @@ void change_svgid(struct ucred *newcred, gid_t svgid); void change_svuid(struct ucred *newcred, uid_t svuid); void crcopy(struct ucred *dest, struct ucred *src); +struct ucred *crcopysafe(struct proc *p, struct ucred *cr); struct ucred *crdup(struct ucred *cr); void cred_update_thread(struct thread *td); void crfree(struct ucred *cr); @@ -98,6 +103,7 @@ struct ucred *crhold(struct ucred *cr); int crshared(struct ucred *cr); void cru2x(struct ucred *cr, struct xucred *xcr); +void crsetgroups(struct ucred *cr, int n, gid_t *groups); int groupmember(gid_t gid, struct ucred *cred); #endif /* _KERNEL */ =20 diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/sys/user.h ./sys/sys/user.h --- /usr/fsvn/head/sys/sys/user.h 2009-06-16 15:54:53.000000000 -0500 +++ ./sys/sys/user.h 2009-06-05 16:02:34.000000000 -0500 @@ -85,7 +85,7 @@ */ #define KI_NSPARE_INT 9 #define KI_NSPARE_LONG 12 -#define KI_NSPARE_PTR 7 +#define KI_NSPARE_PTR 6 =20 #ifdef __amd64__ #define KINFO_PROC_SIZE 1088 @@ -117,7 +117,6 @@ #define OCOMMLEN 16 /* size of returned thread name */ #define COMMLEN 19 /* size of returned ki_comm name */ #define KI_EMULNAMELEN 16 /* size of returned ki_emul */ -#define KI_NGROUPS 16 /* number of groups in ki_groups */ #define LOGNAMELEN 17 /* size of returned ki_login */ =20 struct kinfo_proc { @@ -151,7 +150,7 @@ gid_t ki_svgid; /* Saved effective group id */ short ki_ngroups; /* number of groups */ short ki_spare_short2; /* unused (just here for alignment) */ - gid_t ki_groups[KI_NGROUPS]; /* groups */ + uint32_t __was_ki_groups[16]; /* unused; left for bin compat */ vm_size_t ki_size; /* virtual size */ segsz_t ki_rssize; /* current resident set size in pages */ segsz_t ki_swrss; /* resident set size before last swap */ @@ -201,6 +200,7 @@ struct pcb *ki_pcb; /* kernel virtual addr of pcb */ void *ki_kstack; /* kernel virtual addr of stack */ void *ki_udata; /* User convenience pointer */ + gid_t *ki_groups; /* groups */ /* * When adding new variables, take space for pointers from the * front of ki_spareptrs, and longs from the end of ki_sparelongs. diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/sys/ufs/ufs/ufs_vnops.c ./sys/ufs/u= fs/ufs_vnops.c --- /usr/fsvn/head/sys/ufs/ufs/ufs_vnops.c 2009-06-16 13:55:57.000000000 -0= 500 +++ ./sys/ufs/ufs/ufs_vnops.c 2009-06-16 13:56:20.000000000 -0500 @@ -2266,6 +2266,7 @@ { #ifdef QUOTA struct ucred ucred, *ucp; + gid_t ucred_group; ucp =3D cnp->cn_cred; #endif /* @@ -2292,6 +2293,7 @@ refcount_init(&ucred.cr_ref, 1); ucred.cr_uid =3D ip->i_uid; ucred.cr_ngroups =3D 1; + ucred.cr_groups =3D &ucred_group; ucred.cr_groups[0] =3D pdir->i_gid; ucp =3D &ucred; #endif diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/usr.sbin/mount_portalfs/portald.h .= /usr.sbin/mount_portalfs/portald.h --- /usr/fsvn/head/usr.sbin/mount_portalfs/portald.h 2009-01-22 10:05:31.00= 0000000 -0600 +++ ./usr.sbin/mount_portalfs/portald.h 2009-06-17 13:41:26.000000000 -0500 @@ -36,6 +36,7 @@ */ =20 #include +#include #include =20 /* diff -ru --exclude=3D.svn --exclude=3Dcompile --exclude=3Dcardbus.c --ignor= e-matching=3D'$FreeBSD:' /usr/fsvn/head/usr.sbin/mountd/mountd.c ./usr.sbin= /mountd/mountd.c --- /usr/fsvn/head/usr.sbin/mountd/mountd.c 2009-06-16 15:54:05.000000000 -= 0500 +++ ./usr.sbin/mountd/mountd.c 2009-06-17 15:25:33.000000000 -0500 @@ -2644,7 +2644,7 @@ char *names; struct passwd *pw; struct group *gr; - gid_t groups[NGROUPS + 1]; + gid_t groups[XU_NGROUPS + 1]; int ngroups; =20 cr->cr_version =3D XUCRED_VERSION; @@ -2672,7 +2672,7 @@ return; } cr->cr_uid =3D pw->pw_uid; - ngroups =3D NGROUPS + 1; + ngroups =3D XU_NGROUPS + 1; if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) syslog(LOG_ERR, "too many groups"); /* @@ -2697,7 +2697,7 @@ return; } cr->cr_ngroups =3D 0; - while (names !=3D NULL && *names !=3D '\0' && cr->cr_ngroups < NGROUPS) { + while (names !=3D NULL && *names !=3D '\0' && cr->cr_ngroups < XU_NGROUPS= ) { name =3D strsep(&names, ":"); if (isdigit(*name) || *name =3D=3D '-') { cr->cr_groups[cr->cr_ngroups++] =3D atoi(name); @@ -2709,7 +2709,7 @@ cr->cr_groups[cr->cr_ngroups++] =3D gr->gr_gid; } } - if (names !=3D NULL && *names !=3D '\0' && cr->cr_ngroups =3D=3D NGROUPS) + if (names !=3D NULL && *names !=3D '\0' && cr->cr_ngroups =3D=3D XU_NGROU= PS) syslog(LOG_ERR, "too many groups"); } =20 --YZ5djTAD1cGYuMQK-- --O5XBE6gyVG5Rl6Rj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFKOYTKXY6L6fI4GtQRAoiYAJ9BzCBNbP/75Un8IE0lnANi+vLzcACgvb3y Qn1aK6Ca1A8ZeOXWFkULVJo= =wA9V -----END PGP SIGNATURE----- --O5XBE6gyVG5Rl6Rj-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 00:19: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 C05C4106564A for ; Thu, 18 Jun 2009 00:19:33 +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 A3A658FC0C for ; Thu, 18 Jun 2009 00:19:33 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from eagle.syrec.org (c-67-188-87-228.hsd1.ca.comcast.net [67.188.87.228]) (authenticated bits=0) by shell.rawbw.com (8.13.6/8.13.6) with ESMTP id n5I0H8j7015606; Wed, 17 Jun 2009 17:17:09 -0700 (PDT) Message-ID: <4A398783.5060806@rawbw.com> Date: Wed, 17 Jun 2009 17:17:07 -0700 From: Yuri User-Agent: Thunderbird 2.0.0.21 (X11/20090419) MIME-Version: 1.0 To: Jeroen Ruigrok van der Werven References: <200803172156.37407.modelnine@modelnine.org> <20080317214510.G89676@odysseus.silby.com> <20080413103351.GA1382@dose.local.invalid> <4803C3B4.4000405@delphij.net> <48E474C7.8050507@rawbw.com> <20081002073454.GA30869@nexus.in-nomine.org> In-Reply-To: <20081002073454.GA30869@nexus.in-nomine.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Heiko Wundram , d@delphij.net, Simon Barner Subject: Re: valgrind on FreeBSD 7 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: Thu, 18 Jun 2009 00:19:34 -0000 Jeroen Ruigrok van der Werven wrote: > I have been working on/off on it. > > I am trying to find my work in progress sources, but I think they got lost > when a hard disk died. > > This is all I have found: > > http://www.in-nomine.org/~asmodai/valgrind/valgrind-trunk-for-freebsd.diff > Any news on valgrind for FreeBSD? Also is there a way to check it out from the server? Is it on perforce? I believe there is no easy way to even get it read-only without user id. So are there snapshots somewhere? Yuri From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 06:18:12 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 DA8C9106564A for ; Thu, 18 Jun 2009 06:18:12 +0000 (UTC) (envelope-from elias@artx.ru) Received: from round.artx.ru (round.artx.ru [80.73.175.73]) by mx1.freebsd.org (Postfix) with ESMTP id 94B458FC08 for ; Thu, 18 Jun 2009 06:18:12 +0000 (UTC) (envelope-from elias@artx.ru) Received: by round.artx.ru (Postfix, from userid 1001) id 62A175C2E; Thu, 18 Jun 2009 10:18:10 +0400 (MSD) Date: Thu, 18 Jun 2009 10:18:10 +0400 From: Ilya Orehov To: Julian Elischer Message-ID: <20090618061810.GA11636@artx.ru> Mail-Followup-To: Ilya Orehov , Julian Elischer , freebsd-hackers@freebsd.org References: <4A3959E1.1070306@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4A3959E1.1070306@elischer.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: small usr.bin/find patch 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, 18 Jun 2009 06:18:13 -0000 +------- Julian Elischer, 2009-06-17 ------- | Alexander Best wrote: | >hi everybody, | > | >here's just a quick hack i applied to find. i very often use the -size | >switch | >and always forget if you need to append "m" or "M" for megabyte or "k" or | >"K" | >for kilobyte. after applying the patch find accepts both. ;-) | > | >cheers. | > | | Are you sure this is wise? after all 125 millibytes would be 1 bit.. | | ( :-) ) BTW, our du(1) accepts only lowercase -k and -m. From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 06:24: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 693F0106566C for ; Thu, 18 Jun 2009 06:24:00 +0000 (UTC) (envelope-from malathiramya@gmail.com) Received: from mail-ew0-f212.google.com (mail-ew0-f212.google.com [209.85.219.212]) by mx1.freebsd.org (Postfix) with ESMTP id F33418FC0A for ; Thu, 18 Jun 2009 06:23:59 +0000 (UTC) (envelope-from malathiramya@gmail.com) Received: by ewy8 with SMTP id 8so973138ewy.43 for ; Wed, 17 Jun 2009 23:23:59 -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=RGWKbZmB2sDU64TSq1RbSJ9VWCJAzsG02/h1UnVe5cY=; b=sUWGq7eQKBoYLLnhFBZLLSFQTFmH8DyOifuhVnS1HzFstgB4PXDd2/yUBDPwoP4VOw J1SvBzLHdzbs8pWS/79/8FfT7dJGxsnKFaZufgYX7XC06mRB3sRA1J/rFxB2tiB9GsUS iHnnuJpupDZtFDHu68GBS8LkTtiZCysq9SNn0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=alQ0oAZLwJd4gKUOBaZJX6eB87xhgS3h9DDRtAep7Y6OeD0ddUWw4R2q9o7fSvw1Ss xPfuTMlYw7tsI31S7E8J73P/jK8uqjAya5VOGqdH3nzpU6rrnH7x0r/+WiuAM66fEAXI RZxgDIv6SUH3eUufCpocJP6kCb0q0m+jMtOb4= MIME-Version: 1.0 Received: by 10.210.91.7 with SMTP id o7mr4003590ebb.32.1245306239056; Wed, 17 Jun 2009 23:23:59 -0700 (PDT) Date: Thu, 18 Jun 2009 11:53:59 +0530 Message-ID: From: malathi selvaraj To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: good morning to all 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, 18 Jun 2009 06:24:00 -0000 how to install samba in freebsd advance thanks From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 07:43:27 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 60A20106567A for ; Thu, 18 Jun 2009 07:43:27 +0000 (UTC) (envelope-from fergus@cobbled.net) Received: from mail1.slb.deg.dub.stisp.net (mail1.slb.deg.dub.stisp.net [84.203.253.98]) by mx1.freebsd.org (Postfix) with SMTP id AE1A88FC1C for ; Thu, 18 Jun 2009 07:43:26 +0000 (UTC) (envelope-from fergus@cobbled.net) Received: (qmail 68305 invoked from network); 18 Jun 2009 07:16:44 -0000 Received: from unknown (HELO holyman.cobbled.net) (84.203.180.117) by mail1.slb.deg.dub.stisp.net with SMTP; 18 Jun 2009 07:16:44 -0000 Received: by holyman.cobbled.net (Postfix, from userid 16385) id 6A8A91031D; Thu, 18 Jun 2009 07:16:43 +0000 (UTC) Date: Thu, 18 Jun 2009 07:16:43 +0000 From: ttw+bsd@cobbled.net To: Brooks Davis Message-ID: <20090618071643.GA27928@holyman.cobbled.net> Mail-Followup-To: Brooks Davis , freebsd-hackers@freebsd.org, freebsd-current@freebsd.org References: <20090618000407.GA43514@lor.one-eyed-alien.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090618000407.GA43514@lor.one-eyed-alien.net> Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: CFT: final patches for NGROUPS>>16 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, 18 Jun 2009 07:43:27 -0000 posted patches to this effect some months ago. they needed some clean-up and validation but the also mapped correctly into an RPC_NGROUPS_MAX and IPC_NGROUPS_MAX for consistent (and possibly dynamic) mapping to those problem areas. they build and run but are untested beyond that. i do not expect to have time to re-visit the problem in reasonable order. they also included some other userland changes that may be of interest. From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 07:57:38 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 6BA131065672 for ; Thu, 18 Jun 2009 07:57:38 +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 284928FC0A for ; Thu, 18 Jun 2009 07:57:38 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 489AB6D41D; Thu, 18 Jun 2009 09:57:37 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 20527844E2; Thu, 18 Jun 2009 09:57:37 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: yuri@rawbw.com References: <200803172156.37407.modelnine@modelnine.org> <20080317214510.G89676@odysseus.silby.com> <20080413103351.GA1382@dose.local.invalid> <4803C3B4.4000405@delphij.net> <48E474C7.8050507@rawbw.com> <20081002073454.GA30869@nexus.in-nomine.org> <4A398783.5060806@rawbw.com> Date: Thu, 18 Jun 2009 09:57:37 +0200 In-Reply-To: <4A398783.5060806@rawbw.com> (yuri@rawbw.com's message of "Wed, 17 Jun 2009 17:17:07 -0700") Message-ID: <86eitidle6.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Heiko Wundram , d@delphij.net, Jeroen Ruigrok van der Werven , Simon Barner Subject: Re: valgrind on FreeBSD 7 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, 18 Jun 2009 07:57:38 -0000 Yuri writes: > Any news on valgrind for FreeBSD? http://perforce.freebsd.org/changeList.cgi?FSPC=3D//depot/projects/valgrind= /... DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 09:59:38 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 C2629106566B for ; Thu, 18 Jun 2009 09:59:38 +0000 (UTC) (envelope-from malathiramya@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by mx1.freebsd.org (Postfix) with ESMTP id 55C2B8FC20 for ; Thu, 18 Jun 2009 09:59:38 +0000 (UTC) (envelope-from malathiramya@gmail.com) Received: by ey-out-2122.google.com with SMTP id 9so106130eyd.7 for ; Thu, 18 Jun 2009 02:59:37 -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:content-type; bh=2AzGK6QcUrKeux9QfosJkjNo70aiiPMqkYzalJKepeQ=; b=GMGZ80P2iTrKAacQLTSyFzl26BmVTC61y43KKEotxe0bYmmRrejO9lclrwJpiz1nh/ mgpsibhy0v70wzvg3Un9Atb9KTHwGRUYvmY9HavKlstJbysU4Tzw0rIADHJM4Vl8Yu5v YPLrR4LPJ1M/UOeiW57OrzMnMO6FfoNEDFaOM= 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 :content-type; b=igiZo1Bra9KTIM+dHmh9fMur2O4TjzuxKfOrieeCiJHvPsnUCGK7DWHvGx1Z1n9NjQ N23UVwsd+l9+wFX8WUIyt9L48rAD6K/RJHkm3K6RnRp5FDCAi1CEPi6JhaG1BgEzlskm 9TbVZt68PN+MS2QZl9VEhKpZ+SKQkCpNhwa1I= MIME-Version: 1.0 Received: by 10.210.29.9 with SMTP id c9mr2557058ebc.17.1245319177418; Thu, 18 Jun 2009 02:59:37 -0700 (PDT) In-Reply-To: <20090618000546.433BB10657B5@hub.freebsd.org> References: <20090618000546.433BB10657B5@hub.freebsd.org> Date: Thu, 18 Jun 2009 15:29:37 +0530 Message-ID: From: malathi selvaraj To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: freebsd-hackers Digest, Vol 325, Issue 4 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, 18 Jun 2009 09:59:39 -0000 how to start local host is freeBSD, i install apache22 even after localhost is not working From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 13:37:40 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 5AC0C106564A; Thu, 18 Jun 2009 13:37:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2B0988FC1D; Thu, 18 Jun 2009 13:37:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id D0EEA46BC2; Thu, 18 Jun 2009 09:37:39 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 8BEFD8A077; Thu, 18 Jun 2009 09:37:38 -0400 (EDT) From: John Baldwin To: Mel Flynn Date: Thu, 18 Jun 2009 09:23:57 -0400 User-Agent: KMail/1.9.7 References: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906171717.37677.jhb@freebsd.org> <200906171411.42957.mel.flynn+fbsd.hackers@mailing.thruhere.net> In-Reply-To: <200906171411.42957.mel.flynn+fbsd.hackers@mailing.thruhere.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906180923.57749.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 18 Jun 2009 09:37:38 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: How best to debug locking/scheduler 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, 18 Jun 2009 13:37:40 -0000 On Wednesday 17 June 2009 6:11:42 pm Mel Flynn wrote: > On Wednesday 17 June 2009 13:17:37 John Baldwin wrote: > > On Wednesday 17 June 2009 3:52:54 pm Mel Flynn wrote: > > > On Wednesday 17 June 2009 04:15:26 John Baldwin wrote: > > > > On Tuesday 16 June 2009 7:01:45 pm Mel Flynn wrote: > > > > > On Tuesday 16 June 2009 11:02:42 John Baldwin wrote: > > > > > > On Tuesday 16 June 2009 1:52:23 pm Mel Flynn wrote: > > > > > > > Hi John, > > > > > > > > > > > > > > On Tuesday 16 June 2009 04:19:57 John Baldwin wrote: > > > > > > > > On Monday 15 June 2009 5:53:05 pm Mel Flynn wrote: > > > > > > > > > PID TID COMM TDNAME KSTACK > > > > > > > > > 4283 100215 kdeinit4 - mi_switch > > > > > > > > > turnstile_wait _mtx_lock_sleep uipc_peeraddr kern_getpeername > > > > > > > > > getpeername syscall Xint0x80_syscall > > > > > > > > > % ps -ww 4283 > > > > > > > > > PID TT STAT TIME COMMAND > > > > > > > > > 4283 ?? T 0:00.38 kdeinit4: kdeinit4: kio_http http > > > > > > > > > local:/tmp/ksocket-mel/klauncherxJ1635.slave-socket > > > > > > > > > local:/tmp/ksocket- mel/plasmayC1653.slave-socket (kdeinit4) > > > > > > > > > > > > > > > > > > %ls -l /tmp/ksocket-mel/ > > > > > > > > > > > > > > > > > > total 2 > > > > > > > > > -rw-rw-r-- 1 mel wheel 62 Jun 14 22:55 KSMserver__0 > > > > > > > > > srw------- 1 mel wheel 0 Jun 14 22:55 kdeinit4__0 > > > > > > > > > srwxrwxr-x 1 mel wheel 0 Jun 14 22:55 > > > > > > > > > klauncherxJ1635.slave-socket > > > > > > > > > > > > > > > > You can use kgdb and the scripts at www.freebsd.org/~jhb/gdb. > > > > > > > > Simply run 'kgdb' as root and do 'lcd /folder/with/scripts' and > > > > > > > > 'source gdb6'. You can then do 'lockchain 4283' to find who > > > > > > > > holds the lock this thread is blocked on and what state they > > > > > > > > are in. > > > > > > > > > > > > > > Looks like a deadlock: > > > > > > > > > > > > > > (kgdb) lockchain 4283 > > > > > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 > > > > > > > "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock > > > > > > > 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked > > > > > > > on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) > > > > blocked > > > > > > > > > on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) > > > > > > > blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, > > > > > > > klauncher) blocked on lock 0xc6806348 "unp_mtx" thread 100215 > > > > > > > (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread > > > > > > > 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" > > > > > > > thread 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 > > > > > > > "unp_mtx" thread 100122 (pid 1635, klauncher) blocked on lock > > > > > > > 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked > > > > > > > on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) > > > > > > > blocked on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, > > > > > > > kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid > > > > > > > 1635, klauncher) blocked on lock 0xc6806348 "unp_mtx" thread > > > > > > > 100215 (pid 4283, kdeinit4) blocked on lock 0xc64374a0 "unp_mtx" > > > > > > > thread 100122 (pid 1635, klauncher) blocked on lock 0xc6806348 > > > > > > > "unp_mtx" thread 100215 (pid 4283, kdeinit4) blocked on lock > > > > > > > 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, klauncher) blocked > > > > > > > on lock 0xc6806348 "unp_mtx" thread 100215 (pid 4283, kdeinit4) > > > > > > > blocked on lock 0xc64374a0 "unp_mtx" thread 100122 (pid 1635, > > > > > > > klauncher) blocked on lock 0xc6806348 "unp_mtx" DEADLOCK > > > > > > > > > > > > > > Looking through the scripts now to see how I can get more info on > > > > the > > > > > > > > > call chain and hoping I don't panic the machine ;). It is quite > > > > > > > random to reproduce. > > > > > > > > > > > > In kgdb you can simply do 'tid 100122' followed by 'bt' and 'tid > > > > > > 100215' followed by 'bt'. > > > > > > > > > > Cool, thanks for helping John. Of course it pretty much shows me what > > > > > procstat -k shows and can't get any info on the userland part, but I > > > > > can fully inspect the locks and threads. > > > > > > > > > > Both threads are in TDS_INHIBITED state, and blocked on: > > > > > (kgdb) frame 0 > > > > > #0 sched_switch (td=0xc5971240, newtd=0xc4d39900, flags=259) > > > > > at /usr/src/sys/kern/sched_ule.c:1864 > > > > > 1864 cpuid = PCPU_GET(cpuid); > > > > > > > > That doesn't really tell us anything except that it isn't running. We > > > > know > > > > > > it is actually blocked on a lock, and we need the full stack trace to > > > > see where the two threads were trying to acquire the locks, hence 'bt'. > > > > ' procstat -k' output would be fine, too. > > > > > > the respective bt's: > > > (kgdb) tid 100122 > > > at /usr/src/sys/kern/kern_mutex.c:447 > > > #4 0xc06a68a5 in uipc_peeraddr (so=0xc64309a8, nam=0xe79a2c70) > > > at /usr/src/sys/kern/uipc_usrreq.c:682 > > > #5 0xc06a1e71 in kern_getpeername (td=0xc56e8900, fd=12, sa=0xe79a2c70, > > > alen=0xe79a2c6c) > > > at /usr/src/sys/kern/uipc_syscalls.c:1566 > > > > > > (kgdb) tid 100215 > > > (kgdb) bt > > > at /usr/src/sys/kern/kern_mutex.c:447 > > > #4 0xc06a68a5 in uipc_peeraddr (so=0xc6976338, nam=0xe9ae9c70) > > > at /usr/src/sys/kern/uipc_usrreq.c:682 > > > #5 0xc06a1e71 in kern_getpeername (td=0xc5971240, fd=7, sa=0xe9ae9c70, > > > alen=0xe9ae9c6c) > > > at /usr/src/sys/kern/uipc_syscalls.c:1566 > > > > These are the key frames. It looks like uipc_peeraddr() tries to lock two > > unp locks w/o any protection from the global unp linkage lock. I've > > changed it to use the same locking as uipc_accept() where it first grabs a > > read lock on the linkage lock and then just locks the other end of the > > connection to copy out its sockaddr. > > Thanks John. I'll recompile the kernel with patch and up-to-date current and > report back if there are any side effects or if the bug resurfaces. > Is there a sure way (i.e. testcase) that would expose this condition? At > present, all I can do is wait and maybe play with network interface link > up/down, as it seems to be related from a high level view. It looks like two ends of a PF_LOCAL socket doing getpeername() at the same time would provoke this. I can maybe write a test program today to provoke this and test it locally. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 15:13:54 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 0F03B106566C; Thu, 18 Jun 2009 15:13:54 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-bw0-f227.google.com (mail-bw0-f227.google.com [209.85.218.227]) by mx1.freebsd.org (Postfix) with ESMTP id 267F68FC0C; Thu, 18 Jun 2009 15:13:52 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by bwz27 with SMTP id 27so349436bwz.43 for ; Thu, 18 Jun 2009 08:13:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=wuLZS7sIdgxKhDFPKCef43Z3RzP7Kfk1QadjZs+tkss=; b=dHTzvpl+uuDWaXpb7jiiUvxmawyaOEM3CYi4FhBmNwqhtVN1lAwsB9H4IRCJobwSQT cPrN6SKa580k2pAF8/1ZmlgFCJUoKpWzvsUeqFeyyzjc23/sqzfuWhA01DKTzuQt68Q/ uszOkR2M/0KJvjHx6/aoMpe0uSbmeAbd0wTpI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=HeMAS5+hHkPD2Vr90dW+JFDwl6mxgrR8yJ/rAZVRBRYTh4P5QEkULHhuoISBy+n6ia C0vLih6k0oOjZa2qooMdP3QQ7SdTh4YuprNYB/XMu41TRNSfIirGeUirYNCZohTIEO5l H5TBYGUWFVgmcnrjMwgsMxXdGdcpem+GiR/Zc= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.108.196 with SMTP id g4mr1304905fap.36.1245336231026; Thu, 18 Jun 2009 07:43:51 -0700 (PDT) In-Reply-To: <48E474C7.8050507@rawbw.com> References: <200803172156.37407.modelnine@modelnine.org> <20080317214510.G89676@odysseus.silby.com> <20080413103351.GA1382@dose.local.invalid> <4803C3B4.4000405@delphij.net> <48E474C7.8050507@rawbw.com> Date: Thu, 18 Jun 2009 16:43:50 +0200 X-Google-Sender-Auth: 67141b5a46dc28b1 Message-ID: <3bbf2fe10906180743pc9bd84bu420db38275fe3888@mail.gmail.com> From: Attilio Rao To: yuri@rawbw.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: d@delphij.net, peter@freebsd.org, freebsd-hackers@freebsd.org, Simon Barner , Heiko Wundram , Ed Maste Subject: Re: valgrind on FreeBSD 7 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, 18 Jun 2009 15:13:54 -0000 2008/10/2 Yuri : > Xin LI wrote: >> >> Simon Barner wrote: >>> >>> Mike Silbersack wrote: >>>> >>>> On Mon, 17 Mar 2008, Heiko Wundram wrote: >>>> >>>> Here's a tarball of what's in perforce right now. I tried it a little >>>> bit, and it seemed to work for me. Make sure to install the kernel module! >>>> >>>> http://www.silby.com/valgrind_freebsd_3.tar.gz >>>> >>>> But don't send me questions about it - I'm not an expert on it, I'm just >>>> the guy who grabbed it from perforce and found that it seems to work. :) >>> >>> Could you please provide me with the details, so I can update my >>> (horribly outdated :( valgrind ports? >> >> It was available from p4 at: >> >> //depot/projects/valgrind/... >> >> Note that this version does not work on architectures other than i386. >> >> Cheers, > > > Any developments in Valgrind/Callgrind on FreeBSD? > Any hope to get this version into ports and to merge FreeBSD support up into > Valgrind project? For our employer (Sandvine incorporated) Ed Maste and me are working on finishing the port Peter Wemm started a while ago. You can find updated informations on the project here: http://wiki.freebsd.org/Valgrind while you can get the sources pack here: http://people.freebsd.org/~attilio/Sandvine/valgrind/valgrind.tar.bz2 Please note that 8 and 7 now have all the required support to let run this modified version, so no further modify is required to these branches. Valgrind is able to run on 6 too, if the patch system_valgrind.diff is applied (I can't recall if it targeted for SVOS, as I think, or it is stock STABLE_6, just try it, it may apply to both). The port is really not clean, but that's not Peter's fault. Valgrind should be really rewritten in order to be less Linux-centric and be more smart about interface sucking. The effort, though, would be so large that would require too much work to happen in the short term. What is in the tar works mostly ok (modulo missing syscalls) on both ia32 and amd64, but you should carefully follow what is written in the Wiki for a good install of the product. Also note that I have an internal version that should fix most (all?) the issues reported in the Wiki and I will try to release it on a regular basis, until possible. So far, I'm fighting with a segfault in the profiled process while running with SV environment {amd64 arch}, a symptomancy that doesn't show with a stock FreeBSD installation so far. If you could try the port and report to us I would appreciate a lot. For any other question please refer to us. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 18:58: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 79F2010656AC for ; Thu, 18 Jun 2009 18:58:21 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 6230A8FC1C for ; Thu, 18 Jun 2009 18:58:20 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n5IIwCMt043272; Thu, 18 Jun 2009 20:58:12 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n5IIwBnX043269; Thu, 18 Jun 2009 20:58:12 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Thu, 18 Jun 2009 20:58:11 +0200 (CEST) From: Wojciech Puchar To: malathi selvaraj In-Reply-To: Message-ID: References: <20090618000546.433BB10657B5@hub.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: freebsd-hackers Digest, Vol 325, Issue 4 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, 18 Jun 2009 18:58:22 -0000 start reading books On Thu, 18 Jun 2009, malathi selvaraj wrote: > how to start local host is freeBSD, > i install apache22 even after localhost is not working > _______________________________________________ > 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 Thu Jun 18 20:54: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 DF7AC106566B; Thu, 18 Jun 2009 20:54:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AFC348FC18; Thu, 18 Jun 2009 20:54:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 6660B46B8B; Thu, 18 Jun 2009 16:54:08 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 599F28A074; Thu, 18 Jun 2009 16:54:07 -0400 (EDT) From: John Baldwin To: Mel Flynn Date: Thu, 18 Jun 2009 16:54:02 -0400 User-Agent: KMail/1.9.7 References: <200906151353.06630.mel.flynn+fbsd.hackers@mailing.thruhere.net> <200906171717.37677.jhb@freebsd.org> <200906171411.42957.mel.flynn+fbsd.hackers@mailing.thruhere.net> In-Reply-To: <200906171411.42957.mel.flynn+fbsd.hackers@mailing.thruhere.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906181654.02970.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 18 Jun 2009 16:54:07 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: How best to debug locking/scheduler 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, 18 Jun 2009 20:54:09 -0000 On Wednesday 17 June 2009 6:11:42 pm Mel Flynn wrote: > On Wednesday 17 June 2009 13:17:37 John Baldwin wrote: > > These are the key frames. It looks like uipc_peeraddr() tries to lock two > > unp locks w/o any protection from the global unp linkage lock. I've > > changed it to use the same locking as uipc_accept() where it first grabs a > > read lock on the linkage lock and then just locks the other end of the > > connection to copy out its sockaddr. > > Thanks John. I'll recompile the kernel with patch and up-to-date current and > report back if there are any side effects or if the bug resurfaces. > Is there a sure way (i.e. testcase) that would expose this condition? At > present, all I can do is wait and maybe play with network interface link > up/down, as it seems to be related from a high level view. I write a testcase for this that had two threads calling getpeername() against each other in a loop. It locked up on a stock 7.x box in a few seconds. :) It has run to completion without deadlocking with the patch. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 22:18:47 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 E138A1065672; Thu, 18 Jun 2009 22:18:47 +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 A2B998FC19; Thu, 18 Jun 2009 22:18:47 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id EB7B46D418; Fri, 19 Jun 2009 00:18:46 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id D1268844A4; Fri, 19 Jun 2009 00:18:46 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Doug Barton References: <200906071326.n57DQvSG095104@svn.freebsd.org> <86iqiudm63.fsf@ds4.des.no> <4A3A88BD.5030703@FreeBSD.org> Date: Fri, 19 Jun 2009 00:18:46 +0200 In-Reply-To: <4A3A88BD.5030703@FreeBSD.org> (Doug Barton's message of "Thu, 18 Jun 2009 11:34:37 -0700") Message-ID: <86ab455gop.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org, Edwin Groothuis Subject: Re: svn commit: r193635 - head/etc 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, 18 Jun 2009 22:18:48 -0000 Doug Barton writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Great, now mergemaster blew away my ntp.conf and installed this one > > instead. Apparently, it thinks AUTO_UPGRADE means it's fine to > > overwrite an existing file with a new one... > Yes, that's exactly what the option means. The problem comes in > because it's a new file, which means that there is no record of it in > the mtree file, so it does not show up as "changed." Hmm, I'm not sure I follow, since I'm not familiar with the innards of mergemaster, but can you tell it's new? If you can, you can check if there's already a file of the same name before installing the new one? > FWIW, this is one of the reasons that I resisted the idea of using > mtree for this function, and continue to resist the idea of the -U > option being the default. I didn't realize it was the default - but I really, really like it. It makes mergemaster a *lot* easier to use. > There is no way that I can see to have mtree list the files that have > _not_ changed, which would be the safest way to implement this > option. Doesn't sound unsurmountable. > Meanwhile I'm sure you were able to restore from backups Of course (not that there was much to restore - just "server ntp.des.no iburst maxpoll 6"), and now that I know about it, I can list it in IGNORE_FILES along with motd and printcap. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 18 23:47:44 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 2D5B910657EA for ; Thu, 18 Jun 2009 23:47:44 +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 E46AF8FC08 for ; Thu, 18 Jun 2009 23:47:43 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 162026D41C; Fri, 19 Jun 2009 01:47:43 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id E64C784502; Fri, 19 Jun 2009 01:47:42 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: malathi selvaraj References: <20090618000546.433BB10657B5@hub.freebsd.org> Date: Fri, 19 Jun 2009 01:47:42 +0200 In-Reply-To: (malathi selvaraj's message of "Thu, 18 Jun 2009 15:29:37 +0530") Message-ID: <86skhxnly9.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: freebsd-hackers Digest, Vol 325, Issue 4 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, 18 Jun 2009 23:47:44 -0000 malathi selvaraj writes: > how to start local host is freeBSD, > i install apache22 even after localhost is not working You'll have to state your question more clearly... and ask it on -questions; it is not appropriate for this list. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 19 05:02:30 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 626BA106566C; Fri, 19 Jun 2009 05:02:30 +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 22A698FC16; Fri, 19 Jun 2009 05:02:30 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 6D3E46D41C; Fri, 19 Jun 2009 07:02:29 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 440EC8450C; Fri, 19 Jun 2009 07:02:29 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Doug Barton References: <200906071326.n57DQvSG095104@svn.freebsd.org> <86iqiudm63.fsf@ds4.des.no> <4A3A88BD.5030703@FreeBSD.org> <86ab455gop.fsf@ds4.des.no> <4A3B1AD9.90507@FreeBSD.org> Date: Fri, 19 Jun 2009 07:02:29 +0200 In-Reply-To: <4A3B1AD9.90507@FreeBSD.org> (Doug Barton's message of "Thu, 18 Jun 2009 21:58:01 -0700") Message-ID: <86k538oly2.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org, Edwin Groothuis Subject: Re: svn commit: r193635 - head/etc 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, 19 Jun 2009 05:02:30 -0000 Doug Barton writes: > Now that you've had a successful run with the new sources the > signature for the stock file will be in mergemaster's mtree file so > you won't have to worry. I will for my other machines :) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 19 05:24:47 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 9A1231065680 for ; Fri, 19 Jun 2009 05:24:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 280D68FC1D for ; Fri, 19 Jun 2009 05:24:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 23236 invoked by uid 399); 19 Jun 2009 04:58:03 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 19 Jun 2009 04:58:03 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A3B1AD9.90507@FreeBSD.org> Date: Thu, 18 Jun 2009 21:58:01 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.21 (X11/20090423) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <200906071326.n57DQvSG095104@svn.freebsd.org> <86iqiudm63.fsf@ds4.des.no> <4A3A88BD.5030703@FreeBSD.org> <86ab455gop.fsf@ds4.des.no> In-Reply-To: <86ab455gop.fsf@ds4.des.no> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: hackers@freebsd.org, Edwin Groothuis Subject: Re: svn commit: r193635 - head/etc 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, 19 Jun 2009 05:24:48 -0000 Dag-Erling Smørgrav wrote: > Doug Barton writes: >> Dag-Erling Smørgrav writes: >>> Great, now mergemaster blew away my ntp.conf and installed this one >>> instead. Apparently, it thinks AUTO_UPGRADE means it's fine to >>> overwrite an existing file with a new one... >> Yes, that's exactly what the option means. The problem comes in >> because it's a new file, which means that there is no record of it in >> the mtree file, so it does not show up as "changed." > > Hmm, I'm not sure I follow, since I'm not familiar with the innards of > mergemaster, The -U option works by comparing the installed files to the mtree file created from the unmodified source files. If the file is listed as having been changed, the -U option ignores it. If not, it auto-installs it. > but can you tell it's new? If you can, you can check if > there's already a file of the same name before installing the new one? The whole point of the option is to automatically overwrite the existing file if it isn't listed as being changed. >> FWIW, this is one of the reasons that I resisted the idea of using >> mtree for this function, and continue to resist the idea of the -U >> option being the default. > > I didn't realize it was the default - but I really, really like it. It > makes mergemaster a *lot* easier to use. It's not the default. Corner cases like this one are the reason I resist making it the default. >> There is no way that I can see to have mtree list the files that have >> _not_ changed, which would be the safest way to implement this >> option. > > Doesn't sound unsurmountable. > >> Meanwhile I'm sure you were able to restore from backups > > Of course (not that there was much to restore - just "server ntp.des.no > iburst maxpoll 6"), and now that I know about it, I can list it in > IGNORE_FILES along with motd and printcap. Now that you've had a successful run with the new sources the signature for the stock file will be in mergemaster's mtree file so you won't have to worry. You might also consider adding the svn Id for the source file which will allow mergemaster to ignore it altogether at least until it changes. hope this helps, Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 19 05:33:52 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 515AF1065672; Fri, 19 Jun 2009 05:33:52 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [IPv6:2001:4200:7000:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 960778FC1D; Fri, 19 Jun 2009 05:33:51 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id 9D83633CBA; Fri, 19 Jun 2009 07:33:43 +0200 (SAST) Date: Fri, 19 Jun 2009 07:33:43 +0200 From: John Hay To: Doug Barton Message-ID: <20090619053343.GA1374@zibbi.meraka.csir.co.za> References: <200906071326.n57DQvSG095104@svn.freebsd.org> <86iqiudm63.fsf@ds4.des.no> <4A3A88BD.5030703@FreeBSD.org> <86ab455gop.fsf@ds4.des.no> <4A3B1AD9.90507@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A3B1AD9.90507@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: hackers@freebsd.org Subject: Re: svn commit: r193635 - head/etc 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, 19 Jun 2009 05:33:52 -0000 On Thu, Jun 18, 2009 at 09:58:01PM -0700, Doug Barton wrote: > Dag-Erling Sm??rgrav wrote: > > Doug Barton writes: > >> Dag-Erling Sm??rgrav writes: > >>> Great, now mergemaster blew away my ntp.conf and installed this one > >>> instead. Apparently, it thinks AUTO_UPGRADE means it's fine to > >>> overwrite an existing file with a new one... > >> Yes, that's exactly what the option means. The problem comes in > >> because it's a new file, which means that there is no record of it in > >> the mtree file, so it does not show up as "changed." > > > > Hmm, I'm not sure I follow, since I'm not familiar with the innards of > > mergemaster, > > The -U option works by comparing the installed files to the mtree file > created from the unmodified source files. If the file is listed as > having been changed, the -U option ignores it. If not, it > auto-installs it. Is it not possible to change the logic of -U a little. Only auto install if it is in mtree and has not changed. So if it has changed or is not in mtree, skip the auto install. John -- John Hay -- jhay@meraka.csir.co.za / jhay@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 19 05:36:13 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 561061065674 for ; Fri, 19 Jun 2009 05:36:13 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id E31BB8FC20 for ; Fri, 19 Jun 2009 05:36:12 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 8731 invoked by uid 399); 19 Jun 2009 05:36:12 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 19 Jun 2009 05:36:12 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A3B23CA.4070701@FreeBSD.org> Date: Thu, 18 Jun 2009 22:36:10 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.21 (X11/20090423) MIME-Version: 1.0 To: John Hay References: <200906071326.n57DQvSG095104@svn.freebsd.org> <86iqiudm63.fsf@ds4.des.no> <4A3A88BD.5030703@FreeBSD.org> <86ab455gop.fsf@ds4.des.no> <4A3B1AD9.90507@FreeBSD.org> <20090619053343.GA1374@zibbi.meraka.csir.co.za> In-Reply-To: <20090619053343.GA1374@zibbi.meraka.csir.co.za> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: svn commit: r193635 - head/etc 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, 19 Jun 2009 05:36:14 -0000 John Hay wrote: > Is it not possible to change the logic of -U a little. Only auto install > if it is in mtree and has not changed. So if it has changed or is not in > mtree, skip the auto install. Apparently you didn't read the whole thread, but the answer is no. Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 19 12:38: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 0AD721065672 for ; Fri, 19 Jun 2009 12:38:51 +0000 (UTC) (envelope-from vasanth.raonaik@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id BB5FF8FC14 for ; Fri, 19 Jun 2009 12:38:50 +0000 (UTC) (envelope-from vasanth.raonaik@gmail.com) Received: by an-out-0708.google.com with SMTP id c3so739295ana.13 for ; Fri, 19 Jun 2009 05:38:50 -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=rLvmS29KESTjDRk+RK61Od7gjjJKYH6RxUAH6rYdkhI=; b=YzK0Q0z4ur3YHR6GYGfnqxQ0FvZotf04EuejxKggHIpH+b0Y/f3CTggPXnR9KAYmCk S6U/raqS8kWkuaFg/SQXcwUlG20+8MDGL8FpRJIwHlNGkTCmgvzqZiCp+3lQuiMu+DZQ BkmsuAkL7BDlWY07H4PLzq08Coyh6OuGqsMQk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=bj3QOu9UqzaTANHHHeKWjNQnRfqNWCVfhoiL2HZNdn/RQRmp+ZtEY1Zpc4MrH7B/hi EKIkb+whc7y/GASQqUGM3+6F8+piUi8yXLShCbTOz9fUiCQyWijiuBfjFveC9Lw+kl7u KrKo2sir7CoLewZ9z7TzJP9AaY/zlW40EN46o= MIME-Version: 1.0 Received: by 10.100.231.8 with SMTP id d8mr3703170anh.196.1245413523696; Fri, 19 Jun 2009 05:12:03 -0700 (PDT) Date: Fri, 19 Jun 2009 17:42:03 +0530 Message-ID: From: vasanth raonaik To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Regarding Signal IPC 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, 19 Jun 2009 12:38:51 -0000 Hello Hackers, I want to print out the process ID of the process which is sending the Signal. Is it possible. if yes, can you please point me to any related documents. Thanks, Vasanth From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 19 13:03:29 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 ABE8B106568B for ; Fri, 19 Jun 2009 13:03:29 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 6E6C68FC16 for ; Fri, 19 Jun 2009 13:03:29 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id n5JD3S7B015434; Fri, 19 Jun 2009 09:03:28 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Fri, 19 Jun 2009 09:03:28 -0400 (EDT) Date: Fri, 19 Jun 2009 09:03:28 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: vasanth raonaik In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Regarding Signal IPC X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2009 13:03:30 -0000 On Fri, 19 Jun 2009, vasanth raonaik wrote: > Hello Hackers, > > I want to print out the process ID of the process which is sending the > Signal. > > Is it possible. if yes, can you please point me to any related documents. Though I have not tried this, there is an si_pid field (and other fields you might be interested in) in struct siginfo. If you use a POSIX signal handler (see sigaction(2)), a pointer to a struct siginfo is the 2nd argument to your signal handler. See for the definition of struct siginfo. -- DE From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 19 14:03:55 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 81E271065672; Fri, 19 Jun 2009 14:03:55 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 3BF6D8FC0A; Fri, 19 Jun 2009 14:03:55 +0000 (UTC) (envelope-from jilles@stack.nl) Received: by mx1.stack.nl (Postfix, from userid 65534) id 5A2B6359931; Fri, 19 Jun 2009 16:03:54 +0200 (CEST) X-Spam-DCC: dcc1: scanner01.stack.nl 1182; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on scanner01.stack.nl X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Relay-Country: _RELAYCOUNTRY_ Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 592BB35992A; Fri, 19 Jun 2009 16:03:52 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 19E27228CB; Fri, 19 Jun 2009 16:03:27 +0200 (CEST) Date: Fri, 19 Jun 2009 16:03:27 +0200 From: Jilles Tjoelker To: Daniel Eischen Message-ID: <20090619140326.GA75222@stack.nl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org, vasanth raonaik Subject: Re: Regarding Signal IPC 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, 19 Jun 2009 14:03:55 -0000 On Fri, Jun 19, 2009 at 09:03:28AM -0400, Daniel Eischen wrote: > On Fri, 19 Jun 2009, vasanth raonaik wrote: > > I want to print out the process ID of the process which is sending the > > Signal. > > Is it possible. if yes, can you please point me to any related documents. > Though I have not tried this, there is an si_pid field > (and other fields you might be interested in) in > struct siginfo. If you use a POSIX signal handler > (see sigaction(2)), a pointer to a struct siginfo is > the 2nd argument to your signal handler. > See for the definition of struct siginfo. Meaningful siginfo is only given for signals sent by sigqueue(2), traps, child processes (SIGCHLD) and sigevent structures (for example mq_notify(2)). If you want to handle signals synchronously, you can use sigtimedwait(2). It is still necessary to call sigaction(2) with the SA_SIGINFO flag, even though the signal handler will not be called because the signal is blocked (a necessary step before using sigwait-like calls). This alternate mechanism may be particularly useful here because getting the siginfo data out of the signal handler safely is a tricky business. Although I haven't tried this, kqueue's SIGEV_SIGNAL may be helpful in managing this from a single-threaded program. This is, however, not portable. -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 19 20:14: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 CB3F91065672; Fri, 19 Jun 2009 20:14:16 +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 8BEC08FC08; Fri, 19 Jun 2009 20:14:16 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 9C8B66D418; Fri, 19 Jun 2009 22:14:15 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 79D3584502; Fri, 19 Jun 2009 22:14:15 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Doug Barton References: <200906071326.n57DQvSG095104@svn.freebsd.org> <86iqiudm63.fsf@ds4.des.no> <4A3A88BD.5030703@FreeBSD.org> <86ab455gop.fsf@ds4.des.no> <4A3B1AD9.90507@FreeBSD.org> <20090619053343.GA1374@zibbi.meraka.csir.co.za> <4A3B23CA.4070701@FreeBSD.org> Date: Fri, 19 Jun 2009 22:14:15 +0200 In-Reply-To: <4A3B23CA.4070701@FreeBSD.org> (Doug Barton's message of "Thu, 18 Jun 2009 22:36:10 -0700") Message-ID: <867hz8nfqg.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: svn commit: r193635 - head/etc 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, 19 Jun 2009 20:14:17 -0000 Doug Barton writes: > John Hay writes: > > Is it not possible to change the logic of -U a little. Only auto install > > if it is in mtree and has not changed. So if it has changed or is not in > > mtree, skip the auto install. > Apparently you didn't read the whole thread, but the answer is no. Or rather "not with the tools currently available in FreeBSD". DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no