From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 7 01:19:14 2010 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 9CAFA1065674; Sun, 7 Nov 2010 01:19:14 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 7AF818FC16; Sun, 7 Nov 2010 01:19:14 +0000 (UTC) Received: from [10.123.2.178] (DIR-655 [192.168.1.65]) by monday.kientzle.com (8.14.3/8.14.3) with ESMTP id oA714OIJ084318; Sun, 7 Nov 2010 01:04:25 GMT (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: <201011060017.10067.jpaetzel@freebsd.org> Date: Sat, 6 Nov 2010 18:04:24 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201011052316.27839.jpaetzel@freebsd.org> <201011060017.10067.jpaetzel@freebsd.org> To: Josh Paetzel X-Mailer: Apple Mail (2.1081) Cc: freebsd-hackers@freebsd.org Subject: Re: txt-sysinstall scrapped 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, 07 Nov 2010 01:19:14 -0000 On Nov 5, 2010, at 10:17 PM, Josh Paetzel wrote: > On Friday, November 05, 2010 11:48:27 pm Garrett Cooper wrote: >=20 >>> Just to add to that (because I do find it a novel idea), 1) how >>> are you going to properly prevent man in the middle attacks (SSL, = TLS, >>> etc?), and 2) what webserver would you use? >=20 > Without putting much analysis into it, we talked about using lighttpd, = which=20 > is BSDL. As far as another service, it would be running for the = install only=20 > which is in most circumstances something that happens locally. The whole idea makes a huge amount of sense to me. Besides the usual application HTTP servers, there are also quite a few HTTP server libraries that could be embedded into the installer. Even without SSL support, this would be a big win for both local installs and for installs within a controlled network. Supporting installs over the public Internet would be an interesting project, but certainly does not need to be a goal of the first iteration. Can't wait to see this in action! Tim From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 7 10:40:24 2010 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 58E111065673 for ; Sun, 7 Nov 2010 10:40:24 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from services.syscare.sk (services.syscare.sk [188.40.39.36]) by mx1.freebsd.org (Postfix) with ESMTP id 0E0738FC0C for ; Sun, 7 Nov 2010 10:40:23 +0000 (UTC) Received: from services.syscare.sk (services [188.40.39.36]) by services.syscare.sk (Postfix) with ESMTP id 82EC156B12 for ; Sun, 7 Nov 2010 11:40:22 +0100 (CET) X-Virus-Scanned: amavisd-new at rulez.sk Received: from services.syscare.sk ([188.40.39.36]) by services.syscare.sk (services.rulez.sk [188.40.39.36]) (amavisd-new, port 10024) with ESMTP id lHmhkvRC+q50 for ; Sun, 7 Nov 2010 11:40:20 +0100 (CET) Received: from danger-mbp.local (adsl-dyn122.78-98-108.t-com.sk [78.98.108.122]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: danger@rulez.sk) by services.syscare.sk (Postfix) with ESMTPSA id A5D6E56B01 for ; Sun, 7 Nov 2010 11:40:20 +0100 (CET) Message-ID: <4CD68214.3030509@FreeBSD.org> Date: Sun, 07 Nov 2010 11:40:20 +0100 From: Daniel Gerzo Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13pre) Gecko/20101031 Lanikai/3.1.7pre MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <201011052316.27839.jpaetzel@freebsd.org> <201011060017.10067.jpaetzel@freebsd.org> In-Reply-To: <201011060017.10067.jpaetzel@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: txt-sysinstall scrapped 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, 07 Nov 2010 10:40:24 -0000 On 6.11.2010 6:17, Josh Paetzel wrote: > Without putting much analysis into it, we talked about using lighttpd, which > is BSDL. As far as another service, it would be running for the install only > which is in most circumstances something that happens locally. > NGiNX might a worth a shoot as well. Seems like the development of lighty has been somewhat "stalled", and Igor Sysoev seems like a FreeBSD user himself too... -- S pozdravom / Best regards Daniel Gerzo From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 7 11:07:37 2010 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 19796106566B; Sun, 7 Nov 2010 11:07:37 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from mail.vnode.se (mail.vnode.se [62.119.52.80]) by mx1.freebsd.org (Postfix) with ESMTP id C1F168FC15; Sun, 7 Nov 2010 11:07:36 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id 2E599E3F07A; Sun, 7 Nov 2010 11:49:12 +0100 (CET) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tlsYfJ50fJnW; Sun, 7 Nov 2010 11:49:07 +0100 (CET) Received: from pluto.vnode.local (unknown [83.223.1.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id ABD7DE3F079; Sun, 7 Nov 2010 11:49:06 +0100 (CET) Date: Sun, 7 Nov 2010 11:49:04 +0100 From: Joel Dahl To: Daniel Gerzo Message-ID: <20101107104903.GE1079@pluto.vnode.local> References: <201011052316.27839.jpaetzel@freebsd.org> <201011060017.10067.jpaetzel@freebsd.org> <4CD68214.3030509@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CD68214.3030509@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org Subject: Re: txt-sysinstall scrapped 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, 07 Nov 2010 11:07:37 -0000 On 07-11-2010 11:40, Daniel Gerzo wrote: > On 6.11.2010 6:17, Josh Paetzel wrote: > > Without putting much analysis into it, we talked about using lighttpd, which > > is BSDL. As far as another service, it would be running for the install only > > which is in most circumstances something that happens locally. > > > > NGiNX might a worth a shoot as well. Seems like the development of > lighty has been somewhat "stalled", and Igor Sysoev seems like a FreeBSD > user himself too... I was about to suggest the same thing myself. I use nginx everywhere nowadays. It's both small and powerful, easy to setup and BSD licensed. -- Joel From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 7 13:04:50 2010 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 952771065670; Sun, 7 Nov 2010 13:04:50 +0000 (UTC) (envelope-from kimelto@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id D0C708FC13; Sun, 7 Nov 2010 13:04:49 +0000 (UTC) Received: by wwb28 with SMTP id 28so969345wwb.31 for ; Sun, 07 Nov 2010 05:04:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=VhGAJo4sMxUXsTb58xdeC49h1YMmXOz09ouduAc5Rs4=; b=v9IOeZuBxRfWyKI+9VK+EVUCtT/2Rc8eKz+TuhytPz704vTrzGBQCFntMpwKvf8xZ7 hjl/lDf99swY6lzDs9oadOVZtiquH8E5S+4LClRbWLXcMaJmU59KuSz4EdboL3EQWZVY hZwIGlwUbdIDm1LA4Fa6nzMY37YAfh20Vo8gc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Cbl2Wnra6/L54LxuqDrCPAoyxsQ7WBjAGKH8v86HNBozXYzvLGvXrNSrRAHgEY09mA fhrT/8DDitVVR6i8n5EZkdVAVR2FHjOmRE1JKs//6IIQk6jtp1ar5kd9d5+Lb3PB8JeT jYT2dUgj9pzrwfQXC3dZ/boBfbIHu7O7z+vP4= MIME-Version: 1.0 Received: by 10.216.173.139 with SMTP id v11mr3841074wel.98.1289133255206; Sun, 07 Nov 2010 04:34:15 -0800 (PST) Received: by 10.216.50.69 with HTTP; Sun, 7 Nov 2010 04:34:14 -0800 (PST) In-Reply-To: <20101107104903.GE1079@pluto.vnode.local> References: <201011052316.27839.jpaetzel@freebsd.org> <201011060017.10067.jpaetzel@freebsd.org> <4CD68214.3030509@FreeBSD.org> <20101107104903.GE1079@pluto.vnode.local> Date: Sun, 7 Nov 2010 12:34:14 +0000 Message-ID: From: Julien Laffaye To: Joel Dahl Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Daniel Gerzo Subject: Re: txt-sysinstall scrapped 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, 07 Nov 2010 13:04:50 -0000 On Sun, Nov 7, 2010 at 10:49 AM, Joel Dahl wrote: > On 07-11-2010 11:40, Daniel Gerzo wrote: >> On 6.11.2010 6:17, Josh Paetzel wrote: >> > Without putting much analysis into it, we talked about using lighttpd,= which >> > is BSDL. =A0As far as another service, it would be running for the ins= tall only >> > which is in most circumstances something that happens locally. >> > >> >> NGiNX might a worth a shoot as well. Seems like the development of >> lighty has been somewhat "stalled", and Igor Sysoev seems like a FreeBSD >> user himself too... > > I was about to suggest the same thing myself. =A0I use nginx everywhere > nowadays. =A0It's both small and powerful, easy to setup and BSD licensed= . > Mongoose [1] is a very small HTTP server. It is designed to be embedded in C programs. Basically it is a lib, and a daemon. I think it would perfectly replace Lighttpd/Nginx/Apache for the tasks described. [1]: http://code.google.com/p/mongoose/ From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 7 15:38:34 2010 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 EDF31106566B for ; Sun, 7 Nov 2010 15:38:34 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7DEE48FC0A for ; Sun, 7 Nov 2010 15:38:34 +0000 (UTC) Received: by bwz3 with SMTP id 3so4127169bwz.13 for ; Sun, 07 Nov 2010 07:38:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=8V+XnIDTtOelPP0O5F89yIE1ESfhzRDMEvHofAazMSE=; b=Qmj6UNU/aaZ4ylOnPBpb/Nx34ZYjDoawNhHwrlxgfKkXejvizSsSBlYPYqA6aR8CwB PRbgLe55L/82lUGsWzCYUiGMzV9gngL+HrosOgtmo4ySpNxQYi14p+J0s6YwC2Y5SvJK WKIUA89eORgiATECy1LYLpvocJy2WWh5bVHP4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ERf111MO/35/cHkqiSSxCrRJ3ae68kT7SS1S2bXm+uuBOdV5wsv6BsRlXkeie10Vk+ FYB9qbxWG1v3u8hTmc4+S2GmScxMAOlSbFG7XHR5124SrZ2uHKNnGPu60n49UnNmFksr NrAeTbWAn+MbpSpSYWAoaqbOCbQub9xe8ciSE= MIME-Version: 1.0 Received: by 10.204.122.65 with SMTP id k1mr3675717bkr.151.1289142488723; Sun, 07 Nov 2010 07:08:08 -0800 (PST) Received: by 10.204.136.211 with HTTP; Sun, 7 Nov 2010 07:08:08 -0800 (PST) Date: Sun, 7 Nov 2010 16:08:08 +0100 Message-ID: From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: FreeBSD Hackers Content-Type: text/plain; charset=ISO-8859-1 Subject: Fileops in file.h 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, 07 Nov 2010 15:38:35 -0000 Hi, I'm trying to understand some pieces of the FreeBSD kernel. Having a look at struct fileops in file.h I was wondering why other file related functions don't have an entry in the function vector. I was thinking in mmap, fsync or sendfile. Can anyone tell me the reason? Thanks in advance. From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 12:31:43 2010 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 8B6AB106566C for ; Mon, 8 Nov 2010 12:31:43 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 1AA7A8FC1E for ; Mon, 8 Nov 2010 12:31:42 +0000 (UTC) Received: by wwb34 with SMTP id 34so7313wwb.31 for ; Mon, 08 Nov 2010 04:31:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=VbmIR/UoAkQoKPGo8oKQCJ3UlEpW84P0OtkJlkGx2JM=; b=EU4Uk7ReWTosizGsDfazDI5moSk4D81SIuZRbbZOl2YAFVLiE07vxJjgdraVuz3hkf ekpCawKN9ZaL67OMEM2HtmNOCJId5+rt1jMFvf5OcWomoG2fpR00XNtG7zjaC1XrWcWN VeHLNRhc48dABaLKDzhvgs8jFvvSgYIbb6f58= 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; b=n9J5U8XtgTGg8d26Birv8EhvUu8MsU+aTPy+0r+53TwYa43oajYc+0CAwc2FbFR/f9 2zeJ/AW3IbOrXPOX8cWVZKo/Zh7v3GbIXw4y9XXgwmGkWTkEIp+oAvgIljBCxpZGi2Ce MSBeyB18f6X/azobtiVlu2YSMNbyxD8hFVGq0= MIME-Version: 1.0 Received: by 10.216.68.21 with SMTP id k21mr2080317wed.107.1289219501313; Mon, 08 Nov 2010 04:31:41 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.168.200 with HTTP; Mon, 8 Nov 2010 04:31:41 -0800 (PST) In-Reply-To: References: Date: Mon, 8 Nov 2010 20:31:41 +0800 X-Google-Sender-Auth: oqniIzezuKLWpguD3ju2Vq4qa2k Message-ID: From: Adrian Chadd To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-current Subject: Re: breaking the crunchgen logic into a share/mk file 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, 08 Nov 2010 12:31:43 -0000 Hi all, I plan on committing this later on this week if there are no objections. I don't plan on back-porting it to RELENG_8. Others are more than welcome to. Thanks, Adrian On 5 October 2010 10:36, Adrian Chadd wrote: > Hi, > > I've broken out the crunchgen logic from src/rescue/rescue into a > share/mk file - that way it can be reused in other areas. > > The diff is here: http://people.freebsd.org/~adrian/crunchgen-mk.diff > > This bsd.crunchgen.mk file is generic enough to use in my > busybox-style thing as well as for src/rescue/rescue/. > > Comments, feedback, etc welcome! > > > Adrian > From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 13:48:12 2010 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 2C7B9106564A for ; Mon, 8 Nov 2010 13:48:12 +0000 (UTC) (envelope-from cronfy@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id AB2F08FC1B for ; Mon, 8 Nov 2010 13:48:11 +0000 (UTC) Received: by bwz3 with SMTP id 3so4882227bwz.13 for ; Mon, 08 Nov 2010 05:48:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=+s93hXF1z+Vg9sqen/pX3lCznrlo+uRftW0REF8WjcE=; b=kaIjVp8KLOVI4VcHprJ/TVQh66joku0PZRv9c1b5YuqcTF+aovoTzH9zkmNuYSkDcz zcnNEk0i3sIbMuWhFFl9KIlyiEXRA9AlHUhic5nPFikw88Fj4U5+26mWxDbgAM1LnFNQ 2OLiCYMbZSazzB7lm+oM2u8VsKHK2Tu4gxr5w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=pDnD8VThm5+Jske5+dFRa6IafqZJK3GQ5FytPQrOT2RvyUenk69rdbi2TRu7cP1gcq W1I3AgIP0c5Ykxx7e8peDKZOlPoif80s47FuTRnZF4RqJfjRGun4DMki5cPz4X50Bonl EYa9y+TNh8SFWYj0DQ6Ef4L4uM75SF2n1Xt3Q= Received: by 10.204.73.78 with SMTP id p14mr4955761bkj.154.1289224090512; Mon, 08 Nov 2010 05:48:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.73.135 with HTTP; Mon, 8 Nov 2010 05:47:40 -0800 (PST) In-Reply-To: References: <4ccdcdaa.XSDkZZUUYXDXpkXV%perryh@pluto.rain.com> <201010312044.o9VKiPwG049615@apollo.backplane.com> <201011010916.59108.j.mckeown@ru.ac.za> From: cronfy Date: Mon, 8 Nov 2010 16:47:40 +0300 Message-ID: To: Buganini , freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: Slow disk access while rsync - what should I tune? 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, 08 Nov 2010 13:48:12 -0000 Hello, > Might gsched(8) help ? I am using 7.3, there is no gsched as far as I know.. I am going to try gjournal instead - there was a suggest that gjoural may help here to scale huge io requests. -- // cronfy From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 13:48:13 2010 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 862121065670 for ; Mon, 8 Nov 2010 13:48:13 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from mx.critical.ch (cl-8.zrh-02.ch.sixxs.net [IPv6:2001:1620:f00:7::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2C3D88FC2B for ; Mon, 8 Nov 2010 13:48:13 +0000 (UTC) Received: from wiggles.bwns.ch (localhost [IPv6:::1]) by mx.critical.ch (8.14.3/8.14.3/critical-1.0) with SMTP id oA8DmBG9061121; Mon, 8 Nov 2010 14:48:11 +0100 (CET) (envelope-from ehaupt@FreeBSD.org) Date: Mon, 8 Nov 2010 14:48:11 +0100 From: Emanuel Haupt To: Warren Block Message-Id: <20101108144811.4a737a7a.ehaupt@FreeBSD.org> In-Reply-To: References: X-Mailer: Sylpheed 3.0.3 (GTK+ 2.20.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org Subject: Re: ccache pausing in buildworld 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, 08 Nov 2010 13:48:13 -0000 Warren Block wrote: > About a month ago, ccache began to pause in buildworld. The build > doesn't halt or quit, it stays running but not doing anything: > > /usr/local/libexec/ccache/world-cc -fpic -DPIC -O2 -pipe > -march=prescott -I/usr/src/lib/libc/include > -I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/i386-DNLS > -D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa > -DINET6 -I/usr/obj/usr/src/lib/libc -I/usr/src/lib/libc/resolv > -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/src/lib/libc/locale > -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP > -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 -fstack-protector > -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized > -Wno-pointer-sign -c crypt_xdr.c -o crypt_xdr.So > > And there it stays: > > load: 0.02 cmd: make 83143 [select] 401.32r 0.05u 0.05s 0% 852k > load: 0.01 cmd: make 83143 [select] 409.08r 0.05u 0.05s 0% 852k > load: 0.01 cmd: make 83143 [select] 422.00r 0.05u 0.05s 0% 852k > > The file where it pauses varies depending on the number of jobs (-j) > option. The example above is with -j6; -j1 doesn't fix it, although > it pauses on nslexer.c instead. > > This is on 8-stable as of today, i386. The -march=prescott option > comes from CPUTYPE?=core2 in make.conf, and removing that setting > doesn't fix the problem. > > buildworld without ccache works fine, just takes more than twice as > long. > > The kernel target works fine with or without ccache. > > Any ideas? I've just updated the ccache port to 3.1.1. Excerpt from the ChangeLog: * ccache now falls back to preprocessor mode when a non-regular include file (device, socket, etc) has been detected so that potential hanging due to blocking reads is avoided. * CRC errors are now detected when decompressing compressed files in the cache. * Fixed potential object file corruption race on NFS. * Minor documentation corrections. * Fixed configure detection of ar. After updating and zeroing the cache files the a build of RELENG_8_1 fails with: CC='/usr/local/libexec/ccache/world-cc' mkdep -f .depend -a -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include /usr/src/lib/csu/i386-elf/crti.S /usr/src/lib/csu/i386-elf/crtn.S /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crti.S /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crtn.S /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -DGCRT -c -o gcrt1_c.o /usr/src/lib/csu/i386-elf/crt1_c.c /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crt1_s.S /usr/src/lib/csu/i386-elf/crt1_s.S: Assembler messages: /usr/src/lib/csu/i386-elf/crt1_s.S:34: Error: suffix or operands invalid for `push' /usr/src/lib/csu/i386-elf/crt1_s.S:37: Error: `8(%ebp)' is not a valid 64 bit base/index expression /usr/src/lib/csu/i386-elf/crt1_s.S:38: Error: suffix or operands invalid for `push' /usr/src/lib/csu/i386-elf/crt1_s.S:39: Error: `4(%ebp)' is not a valid 64 bit base/index expression /usr/src/lib/csu/i386-elf/crt1_s.S:40: Error: suffix or operands invalid for `push' *** Error code 1 Stop in /usr/src/lib/csu/i386-elf. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. Emanuel From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 13:57:42 2010 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 305D91065675 for ; Mon, 8 Nov 2010 13:57:42 +0000 (UTC) (envelope-from cronfy@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id AF98C8FC29 for ; Mon, 8 Nov 2010 13:57:40 +0000 (UTC) Received: by bwz3 with SMTP id 3so4891041bwz.13 for ; Mon, 08 Nov 2010 05:57:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=txe4DO7Is+idhxuOEpqrGZa5UwKiglQr99k4z3Pdc6M=; b=WetQEfFWYGf4jHYMHWBsXSiT7nnGKIKxVYn/ClYesvfXGFcUwrBCCyz6EBf3Z9zzQj 59pBpk2S6BwYVK9CvtanSIhfetBHqkUXXZeC+frk7zmLoTHr5L5KrbQFR26fcL3gchz9 2QguTKXd4+eKkwVAZiJ9wAacc1FSx09QFLf4M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=xVyxdSA87cNOo4C3yPlFZRhg5a9YfVuTkhJcGfiNbx07XB1gkyek4J6Tt//X/xN57H cc3EhRrmFJYUcHpLNfaJBmQQznXXsJhpbFSU7cCsbxTGIF8kVz9mmrvGkpKAdXOl22Wn 5GaIdcNouwvU2wBPVGY5VVH77LxIiM+TOAgws= Received: by 10.204.73.75 with SMTP id p11mr4953710bkj.46.1289224660308; Mon, 08 Nov 2010 05:57:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.73.135 with HTTP; Mon, 8 Nov 2010 05:57:09 -0800 (PST) In-Reply-To: <201010302237.o9UMb157032371@apollo.backplane.com> References: <201010302237.o9UMb157032371@apollo.backplane.com> From: cronfy Date: Mon, 8 Nov 2010 16:57:09 +0300 Message-ID: To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: Slow disk access while rsync - what should I tune? 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, 08 Nov 2010 13:57:42 -0000 Hello. Thanks again. > Yes, hardlinked backups pretty much destroy performance, mainly > because it destroys all locality of reference on the storage media > when files are slowly modified and get their own copies, mixed with > other 'old' files which have not been modified. But theoretically > that should only effect the backup target storage and not the server's > production storage. That is what surprised me when I did experiment with backups. If I move backup off from the production server (to another less loaded production server indeed), server that shuld be backed up starts to run fine while backups are created. I think it means that problem is not with vnode/dir caches.. At the other side the server who received backups became very slow. So the problem looks to be related to writes or file creation/hardlinking somehow... At the moment I do not have server with ZFS, but I will think in this direction. But I heard that ZFS has less performance than UFS, is it really like this? I mean I have seen benchmarks and system requirements, but would like to hear about your own experience. -- // cronfy From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 14:02:04 2010 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 E8985106564A; Mon, 8 Nov 2010 14:02:03 +0000 (UTC) (envelope-from krivenok.dmitry@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7B0CB8FC16; Mon, 8 Nov 2010 14:02:03 +0000 (UTC) Received: by gya6 with SMTP id 6so3475555gya.13 for ; Mon, 08 Nov 2010 06:02:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=AG9668pM+cbpCJUQMBUktFfCsHw5gu/LEh45z5Hx5fo=; b=QdzBxZFXUeFtZe7s5BmC7baPzzBrXlqYOnKW4DPxxd36siH7T/aOWRoULsE3Ewjkxk 1qMYNMcL8hIdeE0jOleG3nat3Moazoxq0BDMj8u+bn/7rxB4ASBxxaTin6R6ZlRjGtuS ThFBhvwqL2PDMWe1b1tMvAinjIbiZkbEIUHLM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=H/jXDFEQzBTaDxTrYDYdatK+JeZC1JEDDoOc1y8Wv12NMAUzP6AMQMKem1SSg4yknO +Ck80AKsizkHGmsJL2vwrPofrELAVfNhzBGXBrt0hg4u6rYoqiLCfG7Bnzuubw1TJTij aJA7u0tDB47m/fvRBeZrbbAs287yHDnNySPP0= MIME-Version: 1.0 Received: by 10.42.176.135 with SMTP id be7mr521985icb.245.1289223050647; Mon, 08 Nov 2010 05:30:50 -0800 (PST) Received: by 10.231.149.210 with HTTP; Mon, 8 Nov 2010 05:30:50 -0800 (PST) In-Reply-To: <201010251129.44262.bschmidt@freebsd.org> References: <20101024052559.GA1971@current.Sisis.de> <201010251129.44262.bschmidt@freebsd.org> Date: Mon, 8 Nov 2010 16:30:50 +0300 Message-ID: From: Dmitry Krivenok To: bschmidt@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org, Matthias Apitz , freebsd-hackers@freebsd.org Subject: Re: Broadcom BCM4310 / bwi(4) and interface bwi0 is not showing up 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, 08 Nov 2010 14:02:04 -0000 I tried your patch, but my laptop hung at startup. The last line I saw on console was "Timecounters tick every 1.000 msec". I didn't dig into the problem and don't have any information useful for debugging, but I'm going to play with it later today. Dmitry On Mon, Oct 25, 2010 at 1:29 PM, Bernhard Schmidt wr= ote: > On Sunday, October 24, 2010 07:25:59 Matthias Apitz wrote: >> Hello, >> >> I have a new laptop Acer Aspire One D250 and I want to install a >> 8-CURRENT as of CVS from May 2009 (as I use this on all my laptops). >> The laptop comes with as Wifi chip: >> >> none2@pci0:1:0:0: =A0 =A0 =A0 class=3D0x028000 card=3D0xe01b105b chip=3D= 0x431514e4 >> rev=3D0x01 hdr=3D0x00 >> =A0 =A0 vendor =A0 =A0 =3D 'Broadcom Corporation' >> =A0 =A0 device =A0 =A0 =3D 'BCM4310 USB Controller' >> =A0 =A0 class =A0 =A0 =A0=3D network >> >> I learned after searching around that it should be supported by bwi(4) >> and one should install the firmware kmod from the ports. I have in >> loader.conf: >> [..] > > Please try attached patch, I'm not sure if it is that simple.. worth a tr= y > though. > > -- > Bernhard > > _______________________________________________ > 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= " > --=20 Sincerely yours, Dmitry V. Krivenok e-mail: krivenok.dmitry@gmail.com skype: krivenok_dmitry jabber: krivenok_dmitry@jabber.ru icq: 242-526-443 From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 14:21:50 2010 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 C46F61065674 for ; Mon, 8 Nov 2010 14:21:50 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 8314A8FC19 for ; Mon, 8 Nov 2010 14:21:50 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 17F9373098; Mon, 8 Nov 2010 15:18:31 +0100 (CET) Date: Mon, 8 Nov 2010 15:18:31 +0100 From: Luigi Rizzo To: cronfy Message-ID: <20101108141831.GB84881@onelab2.iet.unipi.it> References: <4ccdcdaa.XSDkZZUUYXDXpkXV%perryh@pluto.rain.com> <201010312044.o9VKiPwG049615@apollo.backplane.com> <201011010916.59108.j.mckeown@ru.ac.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, Buganini Subject: Re: Slow disk access while rsync - what should I tune? 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, 08 Nov 2010 14:21:50 -0000 On Mon, Nov 08, 2010 at 04:47:40PM +0300, cronfy wrote: > Hello, > > > Might gsched(8) help ? > > I am using 7.3, there is no gsched as far as I know.. it actually works just fine there, just take the code from http://info.iet.unipi.it/~luigi/geom_sched/ cheers luigi > I am going to try gjournal instead - there was a suggest that gjoural > may help here to scale huge io requests. > > -- > // cronfy > _______________________________________________ > 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 Nov 8 15:05:03 2010 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 A62491065675 for ; Mon, 8 Nov 2010 15:05:03 +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 707CA8FC0A for ; Mon, 8 Nov 2010 15:05:03 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 21A4146B35; Mon, 8 Nov 2010 10:05:03 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 40DC48A01D; Mon, 8 Nov 2010 10:05:02 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 8 Nov 2010 09:27:26 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201011080927.26941.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 08 Nov 2010 10:05:02 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Fernando =?iso-8859-1?q?Apestegu=EDa?= Subject: Re: Fileops in file.h 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, 08 Nov 2010 15:05:03 -0000 On Sunday, November 07, 2010 10:08:08 am Fernando Apestegu=EDa wrote: > Hi, >=20 > I'm trying to understand some pieces of the FreeBSD kernel. > Having a look at struct fileops in file.h I was wondering why other > file related functions don't have an entry in the function vector. I > was thinking in mmap, fsync or sendfile. >=20 > Can anyone tell me the reason? Mostly that it hasn't been done yet. If there was a clean way to do an=20 f_mmap() and get some of the type-specific knowledge out of vm_mmap.c I'd=20 really like it. =2D-=20 John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 15:05:09 2010 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 33481106566C for ; Mon, 8 Nov 2010 15:05:09 +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 F13328FC0C for ; Mon, 8 Nov 2010 15:05:08 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9E58246B06; Mon, 8 Nov 2010 10:05:08 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8054B8A01D; Mon, 8 Nov 2010 10:05:07 -0500 (EST) From: John Baldwin To: Garrett Cooper Date: Mon, 8 Nov 2010 09:58:39 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201011080958.39156.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 08 Nov 2010 10:05:07 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] mptutil(8) - capture errors and percolate up to caller 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, 08 Nov 2010 15:05:09 -0000 On Saturday, November 06, 2010 4:13:23 am Garrett Cooper wrote: > Similar to r214396, this patch deals with properly capturing error > and passing it up to the caller in mptutil just in case the errno > value gets stomped on by warn*(3); this patch deals with an improper > use of warn(3), and also some malloc(3) errors, as well as shrink down > some static buffers to fit the data being output. > If someone could review and help me commit this patch it would be > much appreciated; all I could do is run negative tests on my local box > and minor positive tests on my vmware fusion instance because it > doesn't fully emulate a fully working mpt(4) device (the vmware > instance consistently crashed with a warning about the mpt > controller's unimplemented features after I poked at it enough). > I'll submit another patch to fix up style(9) in this app if requested. > Thanks! The explicit 'return (ENOMEM)' calls are fine as-is. I do not think they need changing. Having static char arrays of '15' rather than '16' is probably pointless. The stack is already at least 4-byte aligned on all the architectures we support, so a 15-byte char array will actually be 16 bytes. It was chose to be a good enough value, not an exact fit. An exact fit is not important here. Moving the 'buf' in mpt_raid_level() is a style bug. It should stay where it is. Same with 'buf' in mpt_volstate() and mpt_pdstate(). IOC_STATUS_SUCCESS() returns a boolean, it is appropriate to test it with ! rather than == 0. It is also easier for a person to read the code that way. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 15:59:45 2010 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 19CD310656B2; Mon, 8 Nov 2010 15:59:43 +0000 (UTC) (envelope-from shuvaev@physik.uni-wuerzburg.de) Received: from mailrelay.rz.uni-wuerzburg.de (mailrelay.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.freebsd.org (Postfix) with ESMTP id 455338FC1B; Mon, 8 Nov 2010 15:59:43 +0000 (UTC) Received: from virusscan.mail (localhost [127.0.0.1]) by mailrelay.mail (Postfix) with ESMTP id B52BC5AC80; Mon, 8 Nov 2010 16:34:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by virusscan.mail (Postfix) with ESMTP id B1BEA5AC58; Mon, 8 Nov 2010 16:34:36 +0100 (CET) X-Virus-Scanned: by amavisd-new at uni-wuerzburg.de Received: from mail.physik.uni-wuerzburg.de (wthp192.physik.uni-wuerzburg.de [132.187.40.192]) by mailmaster.uni-wuerzburg.de (Postfix) with ESMTP id 8D71E5CD4C; Mon, 8 Nov 2010 16:34:36 +0100 (CET) Received: from wep4035.physik.uni-wuerzburg.de ([132.187.37.35]) by mail.physik.uni-wuerzburg.de (Lotus Domino Release 8.5.2HF105) with ESMTP id 2010110816343542-82537 ; Mon, 8 Nov 2010 16:34:35 +0100 Date: Mon, 8 Nov 2010 16:34:34 +0100 From: Alexey Shuvaev To: Emanuel Haupt Message-ID: <20101108153434.GC17517@wep4035.physik.uni-wuerzburg.de> References: <20101108144811.4a737a7a.ehaupt@FreeBSD.org> MIME-Version: 1.0 In-Reply-To: <20101108144811.4a737a7a.ehaupt@FreeBSD.org> Organization: Universitaet Wuerzburg User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on domino1/uni-wuerzburg(Release 8.5.2HF105 | October 15, 2010) at 11/08/2010 04:34:36 PM, Serialize by Router on domino1/uni-wuerzburg(Release 8.5.2HF105 | October 15, 2010) at 11/08/2010 04:34:36 PM, Serialize complete at 11/08/2010 04:34:36 PM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cc: hackers@FreeBSD.org Subject: Re: ccache pausing in buildworld 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, 08 Nov 2010 15:59:45 -0000 On Mon, Nov 08, 2010 at 02:48:11PM +0100, Emanuel Haupt wrote: > Warren Block wrote: > > About a month ago, ccache began to pause in buildworld. The build > > doesn't halt or quit, it stays running but not doing anything: > > [snip] > > > > This is on 8-stable as of today, i386. The -march=prescott option > > comes from CPUTYPE?=core2 in make.conf, and removing that setting > > doesn't fix the problem. > > > > buildworld without ccache works fine, just takes more than twice as > > long. > > > > The kernel target works fine with or without ccache. > > > > Any ideas? > > I've just updated the ccache port to 3.1.1. > > Excerpt from the ChangeLog: > > * ccache now falls back to preprocessor mode when a non-regular include file > (device, socket, etc) has been detected so that potential hanging due to > blocking reads is avoided. > * CRC errors are now detected when decompressing compressed files in the > cache. > * Fixed potential object file corruption race on NFS. > * Minor documentation corrections. > * Fixed configure detection of ar. > > After updating and zeroing the cache files the a build of RELENG_8_1 fails with: > > CC='/usr/local/libexec/ccache/world-cc' mkdep -f .depend -a -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include /usr/src/lib/csu/i386-elf/crti.S /usr/src/lib/csu/i386-elf/crtn.S > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crti.S > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crtn.S > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -DGCRT -c -o gcrt1_c.o /usr/src/lib/csu/i386-elf/crt1_c.c > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crt1_s.S > /usr/src/lib/csu/i386-elf/crt1_s.S: Assembler messages: > /usr/src/lib/csu/i386-elf/crt1_s.S:34: Error: suffix or operands invalid for `push' > /usr/src/lib/csu/i386-elf/crt1_s.S:37: Error: `8(%ebp)' is not a valid 64 bit base/index expression > /usr/src/lib/csu/i386-elf/crt1_s.S:38: Error: suffix or operands invalid for `push' > /usr/src/lib/csu/i386-elf/crt1_s.S:39: Error: `4(%ebp)' is not a valid 64 bit base/index expression > /usr/src/lib/csu/i386-elf/crt1_s.S:40: Error: suffix or operands invalid for `push' > *** Error code 1 > > Stop in /usr/src/lib/csu/i386-elf. > *** Error code 1 > > Stop in /usr/src. > *** Error code 1 > > Stop in /usr/src. > *** Error code 1 > > Stop in /usr/src. > *** Error code 1 > > Stop in /usr/src. > Just FYI, you would see exact the same problem if you try to compile i386 world on amd64-CURRENT with clang: ... /src/lib/csu/i386-elf/crt1_s.S: Assembler messages: /src/lib/csu/i386-elf/crt1_s.S:34: Error: suffix or operands invalid for `push' /src/lib/csu/i386-elf/crt1_s.S:37: Error: `8(%ebp)' is not a valid 64 bit base/index expression /src/lib/csu/i386-elf/crt1_s.S:38: Error: suffix or operands invalid for `push' /src/lib/csu/i386-elf/crt1_s.S:39: Error: `4(%ebp)' is not a valid 64 bit base/index expression /src/lib/csu/i386-elf/crt1_s.S:40: Error: suffix or operands invalid for `push' clang: error: assembler command failed with exit code 1 (use -v to see invocation) *** Error code 1 ... As far as I understand this, there is no clang cross-compiler support at the moment. So compiler generates (somehow) i386 assembler code which amd64 assembler does not like. Looks like something similar happens here too... HTH, Alexey. From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 17:47:41 2010 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 798881065673; Mon, 8 Nov 2010 17:47:41 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 870F48FC1F; Mon, 8 Nov 2010 17:47:40 +0000 (UTC) Received: by wya21 with SMTP id 21so11692wya.13 for ; Mon, 08 Nov 2010 09:47:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=N8MH7Rb9LxUWlqapgL6P1dlJE21Jjtwq8J6f8gP31gg=; b=P3WFXO04+kMxlV29CO3VP/4et0FFAbykzn8I9hxD0ApG67d2QImfJns6CNufMhZf57 kZ5bSOlPmDeCrEC9pAy5+BnPIOPtBdWgVvuWxZTSw3MFZFnQaxBPxoUq9rhK4uzFvY23 pJoO5ox8ElfZZOT5t1UVs203dE1ASxyp74BRQ= 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=oAUJQzk5QfoQM/8r8W2BVO7b1yUDhgwzrQB6cCOYenjpt+7kk6BJbVd8mXmUoWxc/G x2ypeSKY/WpChMTYC0E/fMiqn0WNyWb4FgwGzjhjTxV5JUpm/38pjhD56UvMTcLtJDaQ BTgz9FJ4SXh1T6X37/7tBdWjDB4rgUfb5CWUA= MIME-Version: 1.0 Received: by 10.227.207.132 with SMTP id fy4mr5627361wbb.0.1289238458712; Mon, 08 Nov 2010 09:47:38 -0800 (PST) Received: by 10.216.198.27 with HTTP; Mon, 8 Nov 2010 09:47:38 -0800 (PST) In-Reply-To: <201011080958.39156.jhb@freebsd.org> References: <201011080958.39156.jhb@freebsd.org> Date: Mon, 8 Nov 2010 09:47:38 -0800 Message-ID: From: Garrett Cooper To: John Baldwin Content-Type: multipart/mixed; boundary=000e0ce001e65cc53d04948e3869 Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] mptutil(8) - capture errors and percolate up to caller 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, 08 Nov 2010 17:47:41 -0000 --000e0ce001e65cc53d04948e3869 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Nov 8, 2010 at 6:58 AM, John Baldwin wrote: > On Saturday, November 06, 2010 4:13:23 am Garrett Cooper wrote: >> =A0 =A0 Similar to r214396, this patch deals with properly capturing err= or >> and passing it up to the caller in mptutil just in case the errno >> value gets stomped on by warn*(3); this patch deals with an improper >> use of warn(3), and also some malloc(3) errors, as well as shrink down >> some static buffers to fit the data being output. >> =A0 =A0 If someone could review and help me commit this patch it would b= e >> much appreciated; all I could do is run negative tests on my local box >> and minor positive tests on my vmware fusion instance because it >> doesn't fully emulate a fully working mpt(4) device (the vmware >> instance consistently crashed with a warning about the mpt >> controller's unimplemented features after I poked at it enough). >> =A0 =A0 I'll submit another patch to fix up style(9) in this app if requ= ested. >> Thanks! > > The explicit 'return (ENOMEM)' calls are fine as-is. =A0I do not think th= ey need > changing. I'll changed back all of the other *alloc calls (I was just thinking about all of the other awesome cases that malloc can fail, but if we break that assumption a lot more of our programs would break too unfortunately :(...). I read up on cam_getccb and I agree based on the description today: "cam_getccb() allocates a CCB using malloc(3) and sets fields in the C= CB header using values from the cam_device structure." But if it called something else in cam_getccb other than malloc it might confuse the end-user if it failed *shrugs*... But whatever, that would have to be a wholesale change if things changed in this area so I'll default to being lazy now :) (I'm almost positive Scott did that because he understands the overall system a lot better than me :D..). > Having static char arrays of '15' rather than '16' is probably pointless.= =A0The > stack is already at least 4-byte aligned on all the architectures we supp= ort, > so a 15-byte char array will actually be 16 bytes. =A0It was chose to be = a good > enough value, not an exact fit. =A0An exact fit is not important here. Yeah, that was stupid micro-optimization on my part. > Moving the 'buf' in mpt_raid_level() is a style bug. =A0It should stay wh= ere it > is. =A0Same with 'buf' in mpt_volstate() and mpt_pdstate(). Same as above. > IOC_STATUS_SUCCESS() returns a boolean, it is appropriate to test it with= ! > rather than =3D=3D 0. =A0It is also easier for a person to read the code = that way. Good point. I didn't catch that part in style(9) before now. Thanks for the review! -Garrett --000e0ce001e65cc53d04948e3869 Content-Type: text/x-patch; charset=US-ASCII; name="mptutil-capture-errno-values.patch" Content-Disposition: attachment; filename="mptutil-capture-errno-values.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gg9n9sej0 SW5kZXg6IHVzci5zYmluL21wdHV0aWwvbXB0X2V2dC5jCj09PT09PT09P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5jZG0ucGF0dGVybnMpOwogCkBAIC00 ODEsNiArNDgzLDggQEAKIAkgKiBleGNsdWRlIHRoZW0gZnJvbSB0aGUgbGlzdC4KIAkgKi8KIAlp b2MyID0gbXB0X3JlYWRfaW9jX3BhZ2UoZmQsIDIsIE5VTEwpOworCWlmIChpb2MyID09IE5VTEwp CisJCXJldHVybiAoZXJybm8pOwogCWRpc2tzID0gY2FsbG9jKGNjYi5jZG0ubnVtX21hdGNoZXMs IHNpemVvZigqZGlza3MpKTsKIAljb3VudCA9IDA7CiAJZm9yIChpID0gMDsgaSA8IGNjYi5jZG0u bnVtX21hdGNoZXM7IGkrKykgewpJbmRleDogdXNyLnNiaW4vbXB0dXRpbC9tcHRfc2hvdy5jCj09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT0KLS0tIHVzci5zYmluL21wdHV0aWwvbXB0X3Nob3cuYwkocmV2aXNpb24gMjE0OTA3 KQorKysgdXNyLnNiaW4vbXB0dXRpbC9tcHRfc2hvdy5jCSh3b3JraW5nIGNvcHkpCkBAIC03OSw3 ICs3OSw3IEBACiAJQ09ORklHX1BBR0VfSU9DXzIgKmlvYzI7CiAJQ09ORklHX1BBR0VfSU9DXzYg KmlvYzY7CiAJVTE2IElPQ1N0YXR1czsKLQlpbnQgZmQsIGNvbW1hOworCWludCBjb21tYSwgZXJy b3IsIGZkOwogCiAJaWYgKGFjICE9IDEpIHsKIAkJd2FybngoInNob3cgYWRhcHRlcjogZXh0cmEg YXJndW1lbnRzIik7CkBAIC04OCwxNyArODgsMTkgQEAKIAogCWZkID0gbXB0X29wZW4obXB0X3Vu aXQpOwogCWlmIChmZCA8IDApIHsKKwkJZXJyb3IgPSBlcnJubzsKIAkJd2FybigibXB0X29wZW4i KTsKLQkJcmV0dXJuIChlcnJubyk7CisJCXJldHVybiAoZXJyb3IpOwogCX0KIAogCW1hbjAgPSBt cHRfcmVhZF9tYW5fcGFnZShmZC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Rf YWN0aW9uKGZkLCBBY3Rpb24sIDAsIDAsIFBoeXNEaXNrTnVtLCAwLCBOVUxMLCAwLCBOVUxMLAor CSAgICBOVUxMLCAwLCBOVUxMLCBOVUxMLCAwKTsKKwlpZiAoZXJyb3IpIHsKKwkJZXJybm8gPSBl cnJvcjsKIAkJd2FybigiRmFpbGVkIHRvIHNldCBkcml2ZSAldSB0byAlcyIsIFBoeXNEaXNrTnVt LCBuYW1lKTsKLQkJcmV0dXJuIChlcnJubyk7CisJCXJldHVybiAoZXJyb3IpOwogCX0KIAogCWZy ZWUoaW5mbyk7Cg== --000e0ce001e65cc53d04948e3869-- From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 18:01:20 2010 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 077A7106564A; Mon, 8 Nov 2010 18:01:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id B3E428FC12; Mon, 8 Nov 2010 18:01:19 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:a408:958e:5aa:3734] (unknown [IPv6:2001:7b8:3a7:0:a408:958e:5aa:3734]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id C2BB85C43; Mon, 8 Nov 2010 19:01:18 +0100 (CET) Message-ID: <4CD83AF3.9090507@FreeBSD.org> Date: Mon, 08 Nov 2010 19:01:23 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13pre) Gecko/20101104 Lanikai/3.1.7pre MIME-Version: 1.0 To: Alexey Shuvaev References: <20101108144811.4a737a7a.ehaupt@FreeBSD.org> <20101108153434.GC17517@wep4035.physik.uni-wuerzburg.de> In-Reply-To: <20101108153434.GC17517@wep4035.physik.uni-wuerzburg.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org, Emanuel Haupt Subject: Re: ccache pausing in buildworld 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, 08 Nov 2010 18:01:20 -0000 On 2010-11-08 16:34, Alexey Shuvaev wrote: > Just FYI, you would see exact the same problem if you try to compile > i386 world on amd64-CURRENT with clang: > ... > /src/lib/csu/i386-elf/crt1_s.S: Assembler messages: > /src/lib/csu/i386-elf/crt1_s.S:34: Error: suffix or operands invalid for `push' > /src/lib/csu/i386-elf/crt1_s.S:37: Error: `8(%ebp)' is not a valid 64 bit base/index expression > /src/lib/csu/i386-elf/crt1_s.S:38: Error: suffix or operands invalid for `push' > /src/lib/csu/i386-elf/crt1_s.S:39: Error: `4(%ebp)' is not a valid 64 bit base/index expression > /src/lib/csu/i386-elf/crt1_s.S:40: Error: suffix or operands invalid for `push' > clang: error: assembler command failed with exit code 1 (use -v to see invocation) > *** Error code 1 > ... > > As far as I understand this, there is no clang cross-compiler support > at the moment. So compiler generates (somehow) i386 assembler code > which amd64 assembler does not like. Looks like something similar happens > here too... Have you read http://wiki.freebsd.org/BuildingFreeBSDWithClang, which suggests to put: .if !defined(CC) || ${CC} == "cc" CC=clang .endif .if !defined(CXX) || ${CXX} == "c++" CXX=clang++ .endif # Don't die on warnings NO_WERROR= WERROR= in your /etc/src.conf (or make.conf, depending on your preference)? If you use that, it should work, at least for the build32 stage of buildworld on amd64. This workaround is only needed on amd64, not for i386. From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 18:14:11 2010 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 CDCB11065672 for ; Mon, 8 Nov 2010 18:14:11 +0000 (UTC) (envelope-from shuvaev@physik.uni-wuerzburg.de) Received: from mailrelay.rz.uni-wuerzburg.de (mailrelay.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.freebsd.org (Postfix) with ESMTP id 776F68FC13 for ; Mon, 8 Nov 2010 18:14:11 +0000 (UTC) Received: from virusscan.mail (localhost [127.0.0.1]) by mailrelay.mail (Postfix) with ESMTP id 8CBA85AC17; Mon, 8 Nov 2010 19:13:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by virusscan.mail (Postfix) with ESMTP id 8A4FC5ABF7; Mon, 8 Nov 2010 19:13:36 +0100 (CET) X-Virus-Scanned: by amavisd-new at uni-wuerzburg.de Received: from mail.physik.uni-wuerzburg.de (wthp192.physik.uni-wuerzburg.de [132.187.40.192]) by mailmaster.uni-wuerzburg.de (Postfix) with ESMTP id 6971D5CC54; Mon, 8 Nov 2010 19:13:36 +0100 (CET) Received: from wep4035.physik.uni-wuerzburg.de ([132.187.37.35]) by mail.physik.uni-wuerzburg.de (Lotus Domino Release 8.5.2HF105) with ESMTP id 2010110819133547-83397 ; Mon, 8 Nov 2010 19:13:35 +0100 Date: Mon, 8 Nov 2010 19:13:34 +0100 From: Alexey Shuvaev To: Dimitry Andric Message-ID: <20101108181334.GA20814@wep4035.physik.uni-wuerzburg.de> References: <20101108144811.4a737a7a.ehaupt@FreeBSD.org> <20101108153434.GC17517@wep4035.physik.uni-wuerzburg.de> <4CD83AF3.9090507@FreeBSD.org> MIME-Version: 1.0 In-Reply-To: <4CD83AF3.9090507@FreeBSD.org> Organization: Universitaet Wuerzburg User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on domino1/uni-wuerzburg(Release 8.5.2HF105 | October 15, 2010) at 11/08/2010 07:13:35 PM, Serialize by Router on domino1/uni-wuerzburg(Release 8.5.2HF105 | October 15, 2010) at 11/08/2010 07:13:35 PM, Serialize complete at 11/08/2010 07:13:35 PM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cc: hackers@FreeBSD.org Subject: Re: ccache pausing in buildworld 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, 08 Nov 2010 18:14:11 -0000 On Mon, Nov 08, 2010 at 07:01:23PM +0100, Dimitry Andric wrote: > On 2010-11-08 16:34, Alexey Shuvaev wrote: > >Just FYI, you would see exact the same problem if you try to compile > >i386 world on amd64-CURRENT with clang: > >... > >/src/lib/csu/i386-elf/crt1_s.S: Assembler messages: > >/src/lib/csu/i386-elf/crt1_s.S:34: Error: suffix or operands invalid for `push' > >/src/lib/csu/i386-elf/crt1_s.S:37: Error: `8(%ebp)' is not a valid 64 bit base/index expression > >/src/lib/csu/i386-elf/crt1_s.S:38: Error: suffix or operands invalid for `push' > >/src/lib/csu/i386-elf/crt1_s.S:39: Error: `4(%ebp)' is not a valid 64 bit base/index expression > >/src/lib/csu/i386-elf/crt1_s.S:40: Error: suffix or operands invalid for `push' > >clang: error: assembler command failed with exit code 1 (use -v to see invocation) > >*** Error code 1 > >... > > > >As far as I understand this, there is no clang cross-compiler support > >at the moment. So compiler generates (somehow) i386 assembler code > >which amd64 assembler does not like. Looks like something similar happens > >here too... > > Have you read http://wiki.freebsd.org/BuildingFreeBSDWithClang, which > suggests to put: > > .if !defined(CC) || ${CC} == "cc" > CC=clang > .endif > .if !defined(CXX) || ${CXX} == "c++" > CXX=clang++ > .endif > # Don't die on warnings > NO_WERROR= > WERROR= > > in your /etc/src.conf (or make.conf, depending on your preference)? > > If you use that, it should work, at least for the build32 stage of > buildworld on amd64. This workaround is only needed on amd64, not for > i386. > Certainly, I have all these in the host machine and native buildworld works as expected. What I was talking about is cross-compiling, i.e.: make TARGET=i386 buildworld on amd64 host. BTW, the absence of clang testers on arm architecture would not change unless the cross-compiling issue with clang is resolved. Cross-compilation is a MUST HAVE here (there is no other way to bootstrap the platform). Alexey. From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 18:20:12 2010 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 2745E1065693 for ; Mon, 8 Nov 2010 18:20:12 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id A11F28FC08 for ; Mon, 8 Nov 2010 18:20:08 +0000 (UTC) Received: by bwz3 with SMTP id 3so5155157bwz.13 for ; Mon, 08 Nov 2010 10:20:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=yrGIgIRYnwIyzL/bwfuaU3OC9X1wCUbxPCb7xWcJAyY=; b=HKKUtRth6zQN4tyYxrUwHyTV88RRbK7x8XDcblweEuGegITmY3XQXYf855riCUGMyZ 9Bhs1GgEXxR6pYIrxuyuLRiAtr05Ga78wIeJ+4tRkWJM70qTkQ6B15mVK3ZyWEF++mqk h5qS1UPoolug5dZAgkz48LtjpMLuoAhRQDt48= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=r0hKc2migsNpudJz3CfreCm0NWMaQsgqA83uaOk+JDrfMcQ9UANKxui4Kg5xsMDAyf IWdA2F12rwrllNCBJ2Ng3qhhfRKxd2iUwToJUnwK6VD6LzSVH52rovVoAT7ZXkaXXgx3 YKp0mwstsdowSFw6CN3xhQO0eryvp1BKHMf6w= MIME-Version: 1.0 Received: by 10.204.72.207 with SMTP id n15mr5296430bkj.70.1289240406187; Mon, 08 Nov 2010 10:20:06 -0800 (PST) Received: by 10.204.136.211 with HTTP; Mon, 8 Nov 2010 10:20:06 -0800 (PST) In-Reply-To: <201011080927.26941.jhb@freebsd.org> References: <201011080927.26941.jhb@freebsd.org> Date: Mon, 8 Nov 2010 19:20:06 +0100 Message-ID: From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Fileops in file.h 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, 08 Nov 2010 18:20:12 -0000 2010/11/8 John Baldwin : > On Sunday, November 07, 2010 10:08:08 am Fernando Apestegu=EDa wrote: >> Hi, >> >> I'm trying to understand =A0some pieces of the FreeBSD kernel. >> Having a look at struct fileops in file.h I was wondering why other >> file related functions don't have an entry in the function vector. I >> was thinking in mmap, fsync or sendfile. >> >> Can anyone tell me the reason? > > Mostly that it hasn't been done yet. =A0If there was a clean way to do an > f_mmap() and get some of the type-specific knowledge out of vm_mmap.c I'd > really like it. Thanks. > > -- > John Baldwin > _______________________________________________ > 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 Nov 8 18:42:25 2010 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 492821065675; Mon, 8 Nov 2010 18:42:25 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from mx.critical.ch (cl-8.zrh-02.ch.sixxs.net [IPv6:2001:1620:f00:7::2]) by mx1.freebsd.org (Postfix) with ESMTP id AFDA58FC25; Mon, 8 Nov 2010 18:42:24 +0000 (UTC) Received: from beaver.home.critical.ch (80-218-148-45.dclient.hispeed.ch [80.218.148.45]) (authenticated bits=0) by mx.critical.ch (8.14.3/8.14.3/critical-1.0) with ESMTP id oA8IgMiw067156; Mon, 8 Nov 2010 19:42:23 +0100 (CET) (envelope-from ehaupt@FreeBSD.org) Date: Mon, 8 Nov 2010 19:42:22 +0100 From: Emanuel Haupt To: Dimitry Andric Message-Id: <20101108194222.78551048.ehaupt@FreeBSD.org> In-Reply-To: <4CD83AF3.9090507@FreeBSD.org> References: <20101108144811.4a737a7a.ehaupt@FreeBSD.org> <20101108153434.GC17517@wep4035.physik.uni-wuerzburg.de> <4CD83AF3.9090507@FreeBSD.org> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.20.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Alexey Shuvaev , hackers@FreeBSD.org Subject: Re: ccache pausing in buildworld 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, 08 Nov 2010 18:42:25 -0000 Dimitry Andric wrote: > On 2010-11-08 16:34, Alexey Shuvaev wrote: > > Just FYI, you would see exact the same problem if you try to compile > > i386 world on amd64-CURRENT with clang: > > ... > > /src/lib/csu/i386-elf/crt1_s.S: Assembler messages: > > /src/lib/csu/i386-elf/crt1_s.S:34: Error: suffix or operands > > invalid for `push' /src/lib/csu/i386-elf/crt1_s.S:37: Error: `8(% > > ebp)' is not a valid 64 bit base/index > > expression /src/lib/csu/i386-elf/crt1_s.S:38: Error: suffix or > > operands invalid for `push' /src/lib/csu/i386-elf/crt1_s.S:39: > > Error: `4(%ebp)' is not a valid 64 bit base/index > > expression /src/lib/csu/i386-elf/crt1_s.S:40: Error: suffix or > > operands invalid for `push' clang: error: assembler command failed > > with exit code 1 (use -v to see invocation) *** Error code 1 ... > > > > As far as I understand this, there is no clang cross-compiler > > support at the moment. So compiler generates (somehow) i386 > > assembler code which amd64 assembler does not like. Looks like > > something similar happens here too... > > Have you read http://wiki.freebsd.org/BuildingFreeBSDWithClang, which > suggests to put: > > .if !defined(CC) || ${CC} == "cc" > CC=clang > .endif > .if !defined(CXX) || ${CXX} == "c++" > CXX=clang++ > .endif > # Don't die on warnings > NO_WERROR= > WERROR= > > in your /etc/src.conf (or make.conf, depending on your preference)? > > If you use that, it should work, at least for the build32 stage of > buildworld on amd64. This workaround is only needed on amd64, not for > i386. You must have misunderstood the issue. This thread is entirely about ccache. I'm having no problems building w/o ccache. Emanuel From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 18:50:02 2010 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 BA5C5106566B; Mon, 8 Nov 2010 18:50:02 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from mx.critical.ch (cl-8.zrh-02.ch.sixxs.net [IPv6:2001:1620:f00:7::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2A8B48FC15; Mon, 8 Nov 2010 18:50:01 +0000 (UTC) Received: from beaver.home.critical.ch (80-218-148-45.dclient.hispeed.ch [80.218.148.45]) (authenticated bits=0) by mx.critical.ch (8.14.3/8.14.3/critical-1.0) with ESMTP id oA8Io0wY067343; Mon, 8 Nov 2010 19:50:01 +0100 (CET) (envelope-from ehaupt@FreeBSD.org) Date: Mon, 8 Nov 2010 19:50:00 +0100 From: Emanuel Haupt To: Emanuel Haupt Message-Id: <20101108195000.8d24b018.ehaupt@FreeBSD.org> In-Reply-To: <20101108194222.78551048.ehaupt@FreeBSD.org> References: <20101108144811.4a737a7a.ehaupt@FreeBSD.org> <20101108153434.GC17517@wep4035.physik.uni-wuerzburg.de> <4CD83AF3.9090507@FreeBSD.org> <20101108194222.78551048.ehaupt@FreeBSD.org> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.20.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Alexey Shuvaev , hackers@FreeBSD.org, Dimitry Andric Subject: Re: ccache pausing in buildworld 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, 08 Nov 2010 18:50:02 -0000 Emanuel Haupt wrote: > Dimitry Andric wrote: > > On 2010-11-08 16:34, Alexey Shuvaev wrote: > > > Just FYI, you would see exact the same problem if you try to > > > compile i386 world on amd64-CURRENT with clang: > > > ... > > > /src/lib/csu/i386-elf/crt1_s.S: Assembler messages: > > > /src/lib/csu/i386-elf/crt1_s.S:34: Error: suffix or operands > > > invalid for `push' /src/lib/csu/i386-elf/crt1_s.S:37: Error: `8(% > > > ebp)' is not a valid 64 bit base/index > > > expression /src/lib/csu/i386-elf/crt1_s.S:38: Error: suffix or > > > operands invalid for `push' /src/lib/csu/i386-elf/crt1_s.S:39: > > > Error: `4(%ebp)' is not a valid 64 bit base/index > > > expression /src/lib/csu/i386-elf/crt1_s.S:40: Error: suffix or > > > operands invalid for `push' clang: error: assembler command failed > > > with exit code 1 (use -v to see invocation) *** Error code 1 ... > > > > > > As far as I understand this, there is no clang cross-compiler > > > support at the moment. So compiler generates (somehow) i386 > > > assembler code which amd64 assembler does not like. Looks like > > > something similar happens here too... > > > > Have you read http://wiki.freebsd.org/BuildingFreeBSDWithClang, > > which suggests to put: > > > > .if !defined(CC) || ${CC} == "cc" > > CC=clang > > .endif > > .if !defined(CXX) || ${CXX} == "c++" > > CXX=clang++ > > .endif > > # Don't die on warnings > > NO_WERROR= > > WERROR= > > > > in your /etc/src.conf (or make.conf, depending on your preference)? > > > > If you use that, it should work, at least for the build32 stage of > > buildworld on amd64. This workaround is only needed on amd64, not > > for i386. > > You must have misunderstood the issue. This thread is entirely about > ccache. I'm having no problems building w/o ccache. Sorry, I just noticed the discussion has advanced to a clang issue. My bad. Emanuel From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 19:04:25 2010 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 CC3471065673; Mon, 8 Nov 2010 19:04:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6EB168FC27; Mon, 8 Nov 2010 19:04:25 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:a408:958e:5aa:3734] (unknown [IPv6:2001:7b8:3a7:0:a408:958e:5aa:3734]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A98495C43; Mon, 8 Nov 2010 20:04:24 +0100 (CET) Message-ID: <4CD849C1.7040106@FreeBSD.org> Date: Mon, 08 Nov 2010 20:04:33 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13pre) Gecko/20101104 Lanikai/3.1.7pre MIME-Version: 1.0 To: Emanuel Haupt References: <20101108144811.4a737a7a.ehaupt@FreeBSD.org> In-Reply-To: <20101108144811.4a737a7a.ehaupt@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org Subject: Re: ccache pausing in buildworld 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, 08 Nov 2010 19:04:26 -0000 On 2010-11-08 14:48, Emanuel Haupt wrote: > After updating and zeroing the cache files the a build of RELENG_8_1 fails with: > > CC='/usr/local/libexec/ccache/world-cc' mkdep -f .depend -a -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include /usr/src/lib/csu/i386-elf/crti.S /usr/src/lib/csu/i386-elf/crtn.S > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crti.S > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crtn.S > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -DGCRT -c -o gcrt1_c.o /usr/src/lib/csu/i386-elf/crt1_c.c > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crt1_s.S > /usr/src/lib/csu/i386-elf/crt1_s.S: Assembler messages: > /usr/src/lib/csu/i386-elf/crt1_s.S:34: Error: suffix or operands invalid for `push' > /usr/src/lib/csu/i386-elf/crt1_s.S:37: Error: `8(%ebp)' is not a valid 64 bit base/index expression > /usr/src/lib/csu/i386-elf/crt1_s.S:38: Error: suffix or operands invalid for `push' > /usr/src/lib/csu/i386-elf/crt1_s.S:39: Error: `4(%ebp)' is not a valid 64 bit base/index expression > /usr/src/lib/csu/i386-elf/crt1_s.S:40: Error: suffix or operands invalid for `push' > *** Error code 1 This is during the 32-bit build stage on amd64? If so, what will happen, depends on how you defined CC. Makefile.inc1 defines CC as an environment variable for a sub-make, using something like: CC="${CC} -m32 ${LIB32CPUFLAGS} -DCOMPAT_32BIT \ -isystem ${LIB32TMP}/usr/include/ \ -L${LIB32TMP}/usr/lib32 \ -B${LIB32TMP}/usr/lib32" However, if you either put CC=/usr/local/libexec/ccache/world-cc on the make command line, or in /etc/src.conf or /etc/make.conf as an unconditional assignment, it will *always* override the above setting through the environment, causing the 32-bit build stage to fail. If this is the case, you could use the same construction I have been using to get clang to build the 32-bit stage properly, e.g. put: .if !defined(CC) || ${CC} == "cc" CC=/usr/local/libexec/ccache/world-cc .endif .if !defined(CXX) || ${CXX} == "c++" CXX=/usr/local/libexec/ccache/world-cc .endif in your src.conf or make.conf, as a workaround. Really fixing this issue requires rather ugly hackery in Makefile.inc1, bsd.*.mk and so on, though... :-/ From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 9 00:10:28 2010 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 C85EB1065670; Tue, 9 Nov 2010 00:10:28 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 7FBBC8FC4B; Tue, 9 Nov 2010 00:10:28 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.4/8.14.4) with ESMTP id oA90ARJR078932; Mon, 8 Nov 2010 17:10:27 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.4/8.14.4/Submit) with ESMTP id oA90ARZ1078929; Mon, 8 Nov 2010 17:10:27 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Mon, 8 Nov 2010 17:10:27 -0700 (MST) From: Warren Block To: Emanuel Haupt In-Reply-To: <20101108144811.4a737a7a.ehaupt@FreeBSD.org> Message-ID: References: <20101108144811.4a737a7a.ehaupt@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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (wonkity.com [127.0.0.1]); Mon, 08 Nov 2010 17:10:27 -0700 (MST) Cc: hackers@FreeBSD.org Subject: Re: ccache pausing in buildworld 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, 09 Nov 2010 00:10:29 -0000 On Mon, 8 Nov 2010, Emanuel Haupt wrote: > I've just updated the ccache port to 3.1.1. > ... > > After updating and zeroing the cache files the a build of RELENG_8_1 fails with: > > CC='/usr/local/libexec/ccache/world-cc' mkdep -f .depend -a -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include /usr/src/lib/csu/i386-elf/crti.S /usr/src/lib/csu/i386-elf/crtn.S > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crti.S > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crtn.S > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -DGCRT -c -o gcrt1_c.o /usr/src/lib/csu/i386-elf/crt1_c.c > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crt1_s.S > /usr/src/lib/csu/i386-elf/crt1_s.S: Assembler messages: > /usr/src/lib/csu/i386-elf/crt1_s.S:34: Error: suffix or operands invalid for `push' > /usr/src/lib/csu/i386-elf/crt1_s.S:37: Error: `8(%ebp)' is not a valid 64 bit base/index expression > /usr/src/lib/csu/i386-elf/crt1_s.S:38: Error: suffix or operands invalid for `push' > /usr/src/lib/csu/i386-elf/crt1_s.S:39: Error: `4(%ebp)' is not a valid 64 bit base/index expression > /usr/src/lib/csu/i386-elf/crt1_s.S:40: Error: suffix or operands invalid for `push' > *** Error code 1 buildworld on my i386 system paused in the same place as before... until I remembered to clear the cache. After that, buildworld went fine and completed. From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 9 00:43:16 2010 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 8FE41106566C; Tue, 9 Nov 2010 00:43:16 +0000 (UTC) (envelope-from erob@gthcfoundation.org) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 6CBCE8FC17; Tue, 9 Nov 2010 00:43:16 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [192.168.0.101] ([74.58.70.113]) by VL-MR-MRZ20.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTP id <0LBL00DM7B7VF130@VL-MR-MRZ20.ip.videotron.ca>; Mon, 08 Nov 2010 18:43:08 -0500 (EST) Message-id: <4CD889C0.6050203@gthcfoundation.org> Date: Mon, 08 Nov 2010 18:37:36 -0500 From: Etienne Robillard User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.15) Gecko/20101102 Thunderbird/3.0.10 To: freebsd-current@freebsd.org, freebsd-hackers@freebsd.org X-Mailman-Approved-At: Tue, 09 Nov 2010 00:49:31 +0000 Cc: Subject: Error: stack overflow on boot 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, 09 Nov 2010 00:43:16 -0000 Hi, why is this message happening with 8.1 and sometimes CURRENT ? I tried recompiling the bootloader but the error still happens, forcing user to hit Enter to enter manual boot. Any takes ? :) Many thanks, Etienne From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 9 06:10:30 2010 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 DE0471065672; Tue, 9 Nov 2010 06:10:30 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 99D938FC16; Tue, 9 Nov 2010 06:10:30 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id oA962a7T017539; Mon, 8 Nov 2010 23:02:36 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4CD8E3FC.2080504@bsdimp.com> Date: Mon, 08 Nov 2010 23:02:36 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100918 Thunderbird/3.1.4 MIME-Version: 1.0 To: Nathan Whitehorn References: <201011052316.27839.jpaetzel@freebsd.org> <20101105.230617.74669306.imp@bsdimp.com> <4CD58136.6070509@freebsd.org> In-Reply-To: <4CD58136.6070509@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: jpaetzel@FreeBSD.org, freebsd-hackers@FreeBSD.org, Garrett Cooper Subject: Re: txt-sysinstall scrapped 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, 09 Nov 2010 06:10:31 -0000 On 11/06/2010 10:24, Nathan Whitehorn wrote: > On 11/06/10 01:04, Garrett Cooper wrote: >> On Fri, Nov 5, 2010 at 10:06 PM, Warner Losh wrote: >>>> Just to add to that (because I do find it a novel idea), 1) how >>>> are you going to properly prevent man in the middle attacks (SSL, TLS, >>>> etc?), and 2) what webserver would you use? >>> https or ssh. >>> >>> We're also toying with the idea of having a partition that you could >>> 'dd' your certs and keys to (so any system can customize the image >>> with keys to make sure you were talking to who you think you are). >>> We'd just reserve 1MB of space on partition s3. We'd then check to >>> see if there was a tar ball. If so, we'd extract it and do the >>> intelligent thing with the keys we find there. >> Wouldn't it be better just to go with a read-write media solution >> (USB) like Matt Dillon was suggesting at today then? Then again, >> determining the root device to date is still a bit kludgy isn't it? > But this breaks badly for people who don't own USB sticks of sufficient > size, are installing on machines without USB ports, can't boot from USB, > want to install from a shared medium like PXE, are installing on blades > with convenient shared CD drives but not USB etc. etc. Everything in the > world can boot from CD, and we have to ensure that continues working. Yes. We won't break that, although you might have more functionality if you do have a USB stick. > I also have mixed feelings about needing to use a web browser to > instruct a web app inside a bundled web server to write a config file to > be interpreted by shell scripts just in order to run gpart, newfs, and > tar. But if you get it working, it's better than sysinstall no matter > how baroque. We'll see how it all plays out? Warner > -Nathan > > > From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 9 09:48:41 2010 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 44A211065673; Tue, 9 Nov 2010 09:48:41 +0000 (UTC) (envelope-from erob@gthcfoundation.org) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC688FC21; Tue, 9 Nov 2010 09:48:40 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [192.168.0.100] ([74.58.70.113]) by VL-MR-MRZ22.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTP id <0LBM00F2N393AD80@VL-MR-MRZ22.ip.videotron.ca>; Tue, 09 Nov 2010 04:48:40 -0500 (EST) Message-id: <4CD91B27.4080602@gthcfoundation.org> Date: Tue, 09 Nov 2010 04:57:59 -0500 From: Etienne Robillard Organization: Green Tea Hackers Club User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.14) Gecko/20101026 Icedove/3.0.9 To: freebsd-current@freebsd.org, freebsd-hackers@freebsd.org References: <4CD889C0.6050203@gthcfoundation.org> In-reply-to: <4CD889C0.6050203@gthcfoundation.org> X-Mailman-Approved-At: Tue, 09 Nov 2010 13:51:38 +0000 Cc: Subject: Re: Error: stack overflow on boot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: erob@gthcfoundation.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2010 09:48:41 -0000 On 08/11/10 06:37 PM, Etienne Robillard wrote: > Hi, why is this message happening with 8.1 and sometimes CURRENT ? > > I tried recompiling the bootloader but the error still happens, > forcing user to hit Enter to enter manual boot. > > Any takes ? :) > > Many thanks, > > Etienne > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org" forgot telling this is happening on amd64 architecture! I don't think its happens on i386 machines types! -- Etienne Robillard Company: Green Tea Hackers Club Occupation: Software Developer E-mail: erob@gthcfoundation.org Work phone: +1 514-962-7703 Website (Company): https://www.gthc.org/ Website (Blog): https://www.gthc.org/blog/ PGP public key fingerprint: F2A9 32EA 8E7C 460F 1728 A1A7 649C 7F17 A086 DDEC During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 9 16:43:18 2010 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 C7F39106566B; Tue, 9 Nov 2010 16:43:18 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6E0C48FC15; Tue, 9 Nov 2010 16:43:18 +0000 (UTC) Received: by iwn39 with SMTP id 39so7821114iwn.13 for ; Tue, 09 Nov 2010 08:43:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=CxWAqCkywN3nF/ZZPkHFn+Ognr6wsh+CTcLBxt+ruwg=; b=YUI6ZIhLz346kgzvqRwOSQVqO9WOmFHzSiyeWUemhE/d2H3fqDo2Ox20Uu0aL+ZKgX Im4uJ/AS05gvpyNoOJYEh0g+A0mK6v/n+P3igekXxV8gLwSWoBcnmHPSlx4m1IZeF9Bb X+24ZgoH1PuCZviBuGZsjEnUR9W9zh7Mx0oG4= 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; b=NoFTdGUGHv9z2Z0CdX/hBzLEly0Xlgqpe/bdmT6Y1VrN9RrKAko/VU8lOCC2AfICID s+CRTz1g9Vp30Zu9H5s7AIz7nbH0MxqUJShXHFpE41r2LngHtYN5YiYKS8mg7b4eHxS8 fJW7QAkrsPgvriUswBUTiaIUaSsM3sSCsFx2w= MIME-Version: 1.0 Received: by 10.231.169.135 with SMTP id z7mr5441867iby.28.1289320996760; Tue, 09 Nov 2010 08:43:16 -0800 (PST) Sender: baptiste.daroussin@gmail.com Received: by 10.231.180.164 with HTTP; Tue, 9 Nov 2010 08:43:16 -0800 (PST) In-Reply-To: References: <20101106120752.001e92c0@ernst.jennejohn.org> <86vd4ao5o4.fsf@gmail.com> Date: Tue, 9 Nov 2010 17:43:16 +0100 X-Google-Sender-Auth: EQ6vT3m8V_urCIJEbYahgPOlLiY Message-ID: From: Baptiste Daroussin To: Ade Lovett Content-Type: text/plain; charset=ISO-8859-1 Cc: Anonymous , freebsd-hackers@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [PATCH] update to the latest libedit version and remove libreadline deps 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, 09 Nov 2010 16:43:18 -0000 Yet another version of the patch, I hope the last one http://people.freebsd.org/~bapt/update-libedit.patch Everything should be working as it used to do before. Now gdbtui is almost working. why almost because everything works except Ctrl-D (EOF), I know where the bug is (lib/libedit/read.c : function: FUN(el,gets)(EditLine *el, int *nread), the read pb is in readchar I guess) but I can't find a way to fix it and it seems to me a really minor regression. I think we can live with this as this bug appear only when libedit doesn't directly gets its input but get is through a third party interface (ncurses in that case) and gdbtui is the only program in base working like this. Also thanks for the information about exp-run, if anyone is about to accept this patch and wanted to commit it, I'll follow those informations. regards, Bapt From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 9 20:03:49 2010 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 C07DA106566B; Tue, 9 Nov 2010 20:03:49 +0000 (UTC) (envelope-from dnaeon@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2DC788FC12; Tue, 9 Nov 2010 20:03:48 +0000 (UTC) Received: by ewy28 with SMTP id 28so3957325ewy.13 for ; Tue, 09 Nov 2010 12:03:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=h/UNcrSLPd4dT9/uuqWfX8lbFoJE60T8PoQyBc8yC58=; b=Q9w+3+LVhZv3OjdMssTUUCRn/LVsTdBxKSFyOP1l9ztCpUizooeb0LDaqqYkmi+eVs vR9bTAgLWrUWIYN9r4m+q8KnfestVHvKAYcEIYV4/7FZFPVi+C5O9/mn3mjajVZ7Br8b sNgFnrtCnLFmXgcPAvN/M2XOJlJl1ymmpcnNU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=OAw90rDB+NbEmI6UAvrCCN/cO+HXlBeZk//09jakaC78p00e85Pcubw6mSykXiDYZv hwA1arWILQpHesYOuoi8Qm1pX/UIKIubsO5VHELAYybV4+AzipM/9uT2zc4YT1zW06+N 4EPFO0yMACcapjLlZX5nTKeqlEdWSZUxiAeqI= MIME-Version: 1.0 Received: by 10.213.13.81 with SMTP id b17mr3824568eba.85.1289331135342; Tue, 09 Nov 2010 11:32:15 -0800 (PST) Received: by 10.213.16.193 with HTTP; Tue, 9 Nov 2010 11:32:15 -0800 (PST) Date: Tue, 9 Nov 2010 21:32:15 +0200 Message-ID: From: Marin Atanasov Nikolov To: freebsd-ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Interactive tool for installing packages 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, 09 Nov 2010 20:03:49 -0000 Hello, Some time ago I've started a thread on freebsd-ports@ regarding an interactive tool for installing packages under FreeBSD - pkg_add_it. Now that I got some time to work on the program, I have added a few additional features to it, which I think someone might find useful like: - dependencies tree view of packages (useful to find out package dependencies) - a similar tool that does this already exists - pkg_tree, but it only works for installed ports, while pkg_add_it can show you every package from INDEX - regex support - displays categories and packages from each of them found in INDEX - some code improvements, etc... The code can be found here [1] and in order to install the program, you need to: # git clone git://git.unix-heaven.org/public/pkg_add_it # cd pkg_add_it && make install clean I still haven't updated the manual pages yet, but you can read something about the program on the web page [2]. Screenshots can be seen as well. [3] Would be nice if someone can test it, and provide some feedback - what can be removed, improved, added, etc.. Surely, there's room for improvement, but that's a start.. :) Thanks, Marin [1] git.unix-heaven.org [2] www.unix-heaven.org/index.php?page=pkg_add_it [3] http://www.unix-heaven.org/pkg_add_it-new-gfx/ -- Marin Atanasov Nikolov dnaeon AT gmail DOT com daemon AT unix-heaven DOT org http://www.unix-heaven.org/ From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 9 21:00:25 2010 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 A711C10656AC for ; Tue, 9 Nov 2010 21:00:25 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5BDD98FC12 for ; Tue, 9 Nov 2010 21:00:24 +0000 (UTC) Received: by ywj3 with SMTP id 3so368951ywj.13 for ; Tue, 09 Nov 2010 13:00:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=QgE2zgfI+s+o/tq83ig0qE90jJsYhxLTxHGaCClP9PM=; b=TjpEouqBLrtwVxoYhVyfRip6f2F5cY74bDRYVpW1qinQ8vqzdp1xZDu7nE4qo8jn47 2FbH20Jh0Kohwjz2xWS7+cDfkpXTXuLgsjieLNmQynZ+ZclYJ74lVE2Uk2MuCHGiMG80 lPAKYW4szlbf4ZCf2+ji9pKA6eWr4miC43Ohg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=BcZ/iDz3T9G6Wl6j+bW3ODDsThP4h5MAeZ5b3hbfywCizc7EhDOMIXJSYFdzpTW8Oj UhHXCoWEf0QZhqSsj1jz8f5cA0GeWYNINs6Lv0wt3ghGOLfkd2NCwxFLoUCZMv+zcEea t0JIITYZhFabBKVsMT2+d5uilfw8yp4b3U+RE= Received: by 10.150.11.19 with SMTP id 19mr11431225ybk.330.1289336424214; Tue, 09 Nov 2010 13:00:24 -0800 (PST) Received: from mark-laptop-bsd.mark-home (Mail1.sandvine.com [64.7.137.162]) by mx.google.com with ESMTPS id q4sm926290yba.14.2010.11.09.13.00.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 09 Nov 2010 13:00:23 -0800 (PST) Date: Tue, 9 Nov 2010 15:59:55 -0500 From: Mark Johnston To: Marin Atanasov Nikolov Message-ID: <20101109205955.GB10842@mark-laptop-bsd.mark-home> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Interactive tool for installing packages 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, 09 Nov 2010 21:00:25 -0000 On Tue, Nov 09, 2010 at 09:32:15PM +0200, Marin Atanasov Nikolov wrote: > Hello, > > Some time ago I've started a thread on freebsd-ports@ regarding an > interactive tool for installing packages under FreeBSD - pkg_add_it. > > Now that I got some time to work on the program, I have added a few > additional features to it, which I think someone might find useful > like: > > - dependencies tree view of packages (useful to find out package dependencies) > - a similar tool that does this already exists - pkg_tree, but it > only works for installed ports, while pkg_add_it can show you every > package from INDEX > - regex support > - displays categories and packages from each of them found in INDEX > - some code improvements, etc... > > The code can be found here [1] and in order to install the program, you need to: > > # git clone git://git.unix-heaven.org/public/pkg_add_it > # cd pkg_add_it && make install clean > > I still haven't updated the manual pages yet, but you can read > something about the program on the web page [2]. > > Screenshots can be seen as well. [3] > > Would be nice if someone can test it, and provide some feedback - what > can be removed, improved, added, etc.. > > Surely, there's room for improvement, but that's a start.. :) > > Thanks, > Marin > > [1] git.unix-heaven.org > [2] www.unix-heaven.org/index.php?page=pkg_add_it > [3] http://www.unix-heaven.org/pkg_add_it-new-gfx/ > > -- > Marin Atanasov Nikolov > > dnaeon AT gmail DOT com > daemon AT unix-heaven DOT org > http://www.unix-heaven.org/ It looks pretty neat. I spent a minute or two trying it out, and my only suggestion at this point is to check errno for common errors instead of immediately calling ERRX to report non-zero returns from system calls. It's kind of annoying to see a message like pkg_add_it: Error in config_read_file() from config.c at line 179: No such file or directory when it's my fault that pkg_add_it can't find its config file. =) Ditto for things like permissions errors and getenv(3). sudo doesn't bring in my environment unless I use -E, so I get the following message when a 'getenv("PAGER")' fails: pkg_add_it: Error in pkg_display_found() from pkg.c at line 418: No such file or directory -Mark From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 9 21:08:09 2010 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 9B008106564A; Tue, 9 Nov 2010 21:08:09 +0000 (UTC) (envelope-from dnaeon@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 02C428FC13; Tue, 9 Nov 2010 21:08:08 +0000 (UTC) Received: by eyb7 with SMTP id 7so4040473eyb.13 for ; Tue, 09 Nov 2010 13:08:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=45uTsW6/wQrx1QpzFdEtEtcXVuOl4MaiRlUQwi9UDRw=; b=jT3qO71CBykZjUG6VlQE3suPE5KREmF6YoGB4MK76wbMQdTrGuiSRX2aNLgG2zWPje 3yrGzsmrqn1SIrcg8ofHjS/d2U8rTy8QqTSH8oq6aHbDBKA2ssimHBxjNN29R1bC7/WF ReXwTOld3p6+YATOr+p0bHR/qHZ/dLjvxNdMs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=c1ZXX6+bz/aOXaSIn5YGK367Ic/9ObDgzpJ0yi47TscuwLqceQ99gDYXH3gkR1a6mk 0aXf524+GneqqK4HnJZIoOMzWBrxDOwxlcDa0ooHrHgzHBhE18W5rEPOa/IkNelQOPk4 bED9okOyzUzjiejdbOijy2Q/UrtCcwlQgSQpk= MIME-Version: 1.0 Received: by 10.213.104.131 with SMTP id p3mr5675008ebo.59.1289336887626; Tue, 09 Nov 2010 13:08:07 -0800 (PST) Received: by 10.213.16.193 with HTTP; Tue, 9 Nov 2010 13:08:07 -0800 (PST) In-Reply-To: <20101109205955.GB10842@mark-laptop-bsd.mark-home> References: <20101109205955.GB10842@mark-laptop-bsd.mark-home> Date: Tue, 9 Nov 2010 23:08:07 +0200 Message-ID: From: Marin Atanasov Nikolov To: Mark Johnston Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Interactive tool for installing packages 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, 09 Nov 2010 21:08:09 -0000 On Tue, Nov 9, 2010 at 10:59 PM, Mark Johnston wrote: > On Tue, Nov 09, 2010 at 09:32:15PM +0200, Marin Atanasov Nikolov wrote: >> Hello, >> >> Some time ago I've started a thread on freebsd-ports@ regarding an >> interactive tool for installing packages under FreeBSD - pkg_add_it. >> >> Now that I got some time to work on the program, I have added a few >> additional features to it, which I think someone might find useful >> like: >> >> =A0- dependencies tree view of packages (useful to find out package depe= ndencies) >> =A0- a similar tool that does this already exists - pkg_tree, but it >> only works for installed ports, while pkg_add_it can show you every >> package from INDEX >> =A0- regex support >> =A0- displays categories and packages from each of them found in INDEX >> =A0- some code improvements, etc... >> >> The code can be found here [1] and in order to install the program, you = need to: >> >> # git clone git://git.unix-heaven.org/public/pkg_add_it >> # cd pkg_add_it && make install clean >> >> I still haven't updated the manual pages yet, but you can read >> something about the program on the web page [2]. >> >> Screenshots can be seen as well. [3] >> >> Would be nice if someone can test it, and provide some feedback - what >> can be removed, improved, added, etc.. >> >> Surely, there's room for improvement, but that's a start.. :) >> >> Thanks, >> Marin >> >> [1] git.unix-heaven.org >> [2] www.unix-heaven.org/index.php?page=3Dpkg_add_it >> [3] http://www.unix-heaven.org/pkg_add_it-new-gfx/ >> >> -- >> Marin Atanasov Nikolov >> >> dnaeon AT gmail DOT com >> daemon AT unix-heaven DOT org >> http://www.unix-heaven.org/ > Hello Mark, > It looks pretty neat. I spent a minute or two trying it out, and my only > suggestion at this point is to check errno for common errors instead of > immediately calling ERRX to report non-zero returns from system calls. > It's kind of annoying to see a message like > > pkg_add_it: Error in config_read_file() from config.c at line 179: No > such file or directory Yep, my fault, the port does not install the config file in /usr/local/etc/pkg_add_it.conf I'll take care of adding it to the port :) > > when it's my fault that pkg_add_it can't find its config file. =3D) > Ditto for things like permissions errors and getenv(3). sudo doesn't > bring in my environment unless I use -E, so I get the following message > when a 'getenv("PAGER")' fails: > > pkg_add_it: Error in pkg_display_found() from pkg.c at line 418: No such > file or directory > Thanks for the feedback, I need to fix that one too :) Regards, Marin > -Mark > > > > > --=20 Marin Atanasov Nikolov dnaeon AT gmail DOT com daemon AT unix-heaven DOT org http://www.unix-heaven.org/ From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 9 21:15:12 2010 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 178651065672; Tue, 9 Nov 2010 21:15:12 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id AAF6F8FC1C; Tue, 9 Nov 2010 21:15:11 +0000 (UTC) Received: by ywj3 with SMTP id 3so384236ywj.13 for ; Tue, 09 Nov 2010 13:15:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=eK6qEzXHct49WkvQYdjGwGn5ra+U3daxNfKyc3PNbQw=; b=s4UTCPaklN8WGca7zeWGZIbvkMFzdNpXuklmVcnOANEJGnkpaqMuiQM5gQ6jfYHrC1 KsIviB7HpC1mgXAr0uW7KrJE215sq8HvAXH6gjfnO+RGfn42onqlu12EgAk+NG96Vxg4 IyVWGMXzlDH22UzyAO+bqnp1XqH4iJqUy99vg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=bpNqJ8MqQGJsdT364jtkSUOgmUpiCdJynPoWVBsMCt+k36k3FSdh3ggVIku894eKMe 6Mi7PEniGjNfGY7WEbh7U0rniS0KiD4nrUmqQFqChcg61bAAc5HnN/lj5+eaeBFODr7P yC+Ut6+rTFPnqIEXvb83FGvOP++8BpTG4eIMg= Received: by 10.151.102.12 with SMTP id e12mr4258795ybm.311.1289337310159; Tue, 09 Nov 2010 13:15:10 -0800 (PST) Received: from mark-laptop-bsd.mark-home (Mail1.sandvine.com [64.7.137.162]) by mx.google.com with ESMTPS id m12sm1239052ybn.0.2010.11.09.13.15.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 09 Nov 2010 13:15:08 -0800 (PST) Date: Tue, 9 Nov 2010 16:14:39 -0500 From: Mark Johnston To: Marin Atanasov Nikolov Message-ID: <20101109211439.GC10842@mark-laptop-bsd.mark-home> References: <20101109205955.GB10842@mark-laptop-bsd.mark-home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Interactive tool for installing packages 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, 09 Nov 2010 21:15:12 -0000 On Tue, Nov 09, 2010 at 11:08:07PM +0200, Marin Atanasov Nikolov wrote: > On Tue, Nov 9, 2010 at 10:59 PM, Mark Johnston wrote: > > On Tue, Nov 09, 2010 at 09:32:15PM +0200, Marin Atanasov Nikolov wrote: > >> Hello, > >> > >> Some time ago I've started a thread on freebsd-ports@ regarding an > >> interactive tool for installing packages under FreeBSD - pkg_add_it. > >> > >> Now that I got some time to work on the program, I have added a few > >> additional features to it, which I think someone might find useful > >> like: > >> > >> ?- dependencies tree view of packages (useful to find out package dependencies) > >> ?- a similar tool that does this already exists - pkg_tree, but it > >> only works for installed ports, while pkg_add_it can show you every > >> package from INDEX > >> ?- regex support > >> ?- displays categories and packages from each of them found in INDEX > >> ?- some code improvements, etc... > >> > >> The code can be found here [1] and in order to install the program, you need to: > >> > >> # git clone git://git.unix-heaven.org/public/pkg_add_it > >> # cd pkg_add_it && make install clean > >> > >> I still haven't updated the manual pages yet, but you can read > >> something about the program on the web page [2]. > >> > >> Screenshots can be seen as well. [3] > >> > >> Would be nice if someone can test it, and provide some feedback - what > >> can be removed, improved, added, etc.. > >> > >> Surely, there's room for improvement, but that's a start.. :) > >> > >> Thanks, > >> Marin > >> > >> [1] git.unix-heaven.org > >> [2] www.unix-heaven.org/index.php?page=pkg_add_it > >> [3] http://www.unix-heaven.org/pkg_add_it-new-gfx/ > >> > >> -- > >> Marin Atanasov Nikolov > >> > >> dnaeon AT gmail DOT com > >> daemon AT unix-heaven DOT org > >> http://www.unix-heaven.org/ > > > > Hello Mark, > > > It looks pretty neat. I spent a minute or two trying it out, and my only > > suggestion at this point is to check errno for common errors instead of > > immediately calling ERRX to report non-zero returns from system calls. > > It's kind of annoying to see a message like > > > > pkg_add_it: Error in config_read_file() from config.c at line 179: No > > such file or directory > > Yep, my fault, the port does not install the config file in > /usr/local/etc/pkg_add_it.conf > > I'll take care of adding it to the port :) Well, it was more of a general suggestion. I didn't even install the program - I just compiled and ran it. Nevertheless, I had to look at the source to figure out what the actual problem was. -Mark From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 07:30:39 2010 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 0D96A1065672; Wed, 10 Nov 2010 07:30:39 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout023.mac.com (asmtpout023.mac.com [17.148.16.98]) by mx1.freebsd.org (Postfix) with ESMTP id E86298FC2A; Wed, 10 Nov 2010 07:30:38 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from sa-nc-common-155.static.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp023.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0LBN00AWYOPILN20@asmtp023.mac.com>; Tue, 09 Nov 2010 22:29:44 -0800 (PST) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1004200000 definitions=main-1011090236 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15,1.0.148,0.0.0000 definitions=2010-11-10_03:2010-11-10, 2010-11-09, 1970-01-01 signatures=0 From: Marcel Moolenaar In-reply-to: Date: Tue, 09 Nov 2010 22:29:41 -0800 Message-id: <478E6244-00B4-4D96-93FE-CBD546C27A6E@mac.com> References: To: Garrett Cooper X-Mailer: Apple Mail (2.1081) Cc: hackers@freebsd.org Subject: Re: [PATCH] Simplify uart_bus_pci_probe 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, 10 Nov 2010 07:30:39 -0000 On Nov 6, 2010, at 11:22 AM, Garrett Cooper wrote: > Some of the logic could have been simplified in the probe. The > proposed patch makes the detection process a tad bit more > straightforward. > Comments, review (and maybe a commit :P) are more than welcome :). The patch is logically wrong for non-ns8250 based UARTs. Leave the code as is. Thanks, -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 08:11:50 2010 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 AC849106566C for ; Wed, 10 Nov 2010 08:11:50 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 88F808FC12 for ; Wed, 10 Nov 2010 08:11:50 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id oAA8Bd4M031607 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 10 Nov 2010 00:11:40 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id oAA8BdB7031606; Wed, 10 Nov 2010 00:11:39 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA04594; Wed, 10 Nov 10 00:02:00 PST Date: Wed, 10 Nov 2010 00:01:51 -0800 From: perryh@pluto.rain.com To: dnaeon@gmail.com Message-Id: <4cda516f.CsCJyXi6dA77aINL%perryh@pluto.rain.com> References: In-Reply-To: User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Interactive tool for installing packages 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, 10 Nov 2010 08:11:50 -0000 Marin Atanasov Nikolov wrote: > in order to install the program, you need to: > > # git clone git://git.unix-heaven.org/public/pkg_add_it ... > Surely, there's room for improvement, but that's a start.. :) Dunno about anyone else, but from my standpoint it would be a _big_ improvement to provide a more recent snapshot than the 6-month-old pkg_add_it-1.2.tar.gz on ftp.freebsd.org so one doesn't have to install git, with its boatload of dependencies*, to see the recent improvements. * The amount of stuff downloaded by cd /usr/ports/devel/git ; make fetch-recursive is, shall we say, impressive. From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 08:44:43 2010 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 BC09B106564A for ; Wed, 10 Nov 2010 08:44:43 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4DAD98FC13 for ; Wed, 10 Nov 2010 08:44:42 +0000 (UTC) Received: by wwi17 with SMTP id 17so3248wwi.1 for ; Wed, 10 Nov 2010 00:44:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=XLDtMMoCRR+wW420CFey/s0K4j4gYG5pHfJYeo9XdXY=; b=N4JriP68L9tgMeYYswcL0QAo/FnpfvbuKzzdC1+onllxYho0fIUKotXUprlI8Jellt cVOGvZ/C9VAbB5TGH9kHp06ccgycK71eHgJl6T/soB/iIlhaUImrRE/V3NtzvgceCCK6 yrr2e9dGO2K6mlgAc4ygJ1RqsIQmvtg+iLooY= 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=w8SaoycRh1gr7EeLJh7Bepgu/CZovsCuUPR2nJePb/TqCPwmpp9j2jO5WA/JQ2KaCy /HFYSCGHa24Rs5MBpTyRFv+rDcyZshk7yamcGoXgdvS/Izj+j9VbNAL/Nv+jwWiILjRZ pnLu6BLRVSDA/1oFOf5qfsD2AguI99sYzRD7E= MIME-Version: 1.0 Received: by 10.216.46.200 with SMTP id r50mr786359web.45.1289378681216; Wed, 10 Nov 2010 00:44:41 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Wed, 10 Nov 2010 00:44:41 -0800 (PST) In-Reply-To: <478E6244-00B4-4D96-93FE-CBD546C27A6E@mac.com> References: <478E6244-00B4-4D96-93FE-CBD546C27A6E@mac.com> Date: Wed, 10 Nov 2010 00:44:41 -0800 X-Google-Sender-Auth: EvvRBMtkMDDeeDMLmfgxBT2VluY Message-ID: From: Garrett Cooper To: Marcel Moolenaar Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: [PATCH] Simplify uart_bus_pci_probe 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, 10 Nov 2010 08:44:43 -0000 On Tue, Nov 9, 2010 at 10:29 PM, Marcel Moolenaar wrote: > > On Nov 6, 2010, at 11:22 AM, Garrett Cooper wrote: > >> =A0 =A0Some of the logic could have been simplified in the probe. The >> proposed patch makes the detection process a tad bit more >> straightforward. >> =A0 =A0Comments, review (and maybe a commit :P) are more than welcome :)= . > > The patch is logically wrong for non-ns8250 based UARTs. > Leave the code as is. Hi Marcel, Is the layout of the pci_ns8250_ids PCI ID table correct then, as there are a large number of ns16550 chips and other non-ns8250 chips in the table? Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 09:26:30 2010 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 AE6971065694; Wed, 10 Nov 2010 09:26:30 +0000 (UTC) (envelope-from dnaeon@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id D2F928FC13; Wed, 10 Nov 2010 09:26:29 +0000 (UTC) Received: by eyb7 with SMTP id 7so161688eyb.13 for ; Wed, 10 Nov 2010 01:26:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ZNurXvcY+Br8lkESAWj5XwCOBxLCq4hxcHFkEnTR9lo=; b=Bya1f5tTPKL82gd7VNhvlsW07OwA1ErU7SgF+mc8BztvtRaTtCr5kamGxZSyYooyhW wqYgnZ5OFlie8A45Kiv66MEzl1hJkHHWtf2rbR/bDcA8FTgjwSB97utRky2K1s4MGPJU mEhG1r5Mb6rKvZF3GX+FWYlWxRDKflgVYuKzI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=bTl0ti70YcjB/kGc5T8ox3Aols9s9GNsWPT1410wMaXvbOsDCz8ShUIzd1sUtKDg5a KsohGwbp7dKixURSdkPlF3zDLKaJbQbVpVfK0mIRsnacnZH8OPVn4nOaKoEfN9E2Pq/D C2NiDya33XfgJSFxr+sS4iYWmW91XaDmLK62k= MIME-Version: 1.0 Received: by 10.213.8.147 with SMTP id h19mr6161041ebh.85.1289381187764; Wed, 10 Nov 2010 01:26:27 -0800 (PST) Received: by 10.213.16.193 with HTTP; Wed, 10 Nov 2010 01:26:27 -0800 (PST) In-Reply-To: <4cda516f.CsCJyXi6dA77aINL%perryh@pluto.rain.com> References: <4cda516f.CsCJyXi6dA77aINL%perryh@pluto.rain.com> Date: Wed, 10 Nov 2010 11:26:27 +0200 Message-ID: From: Marin Atanasov Nikolov To: perryh@pluto.rain.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Interactive tool for installing packages 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, 10 Nov 2010 09:26:30 -0000 On Wed, Nov 10, 2010 at 10:01 AM, wrote: > Marin Atanasov Nikolov wrote: > >> in order to install the program, you need to: >> >> # git clone git://git.unix-heaven.org/public/pkg_add_it > ... >> Surely, there's room for improvement, but that's a start.. :) > > Dunno about anyone else, but from my standpoint it would be a _big_ > improvement to provide a more recent snapshot than the 6-month-old > pkg_add_it-1.2.tar.gz on ftp.freebsd.org so one doesn't have to > install git, with its boatload of dependencies*, to see the recent > improvements. If you do not have git installed, you could still get the latest snapshot of pkg_add_it via the Cgit repo. [1] Currently the latest version of the program is tagged as RELEASE_1_3, so just go to [1] and get a compressed snapshot of the program, then extract and compile it. I'm planning to submit a PR to update the port soon, but before that I still need to finish a few things. Regards, Marin [1] http://git.unix-heaven.org/cgit.cgi/pkg_add_it/ > > * The amount of stuff downloaded by > =A0 =A0cd /usr/ports/devel/git ; make fetch-recursive > =A0is, shall we say, impressive. > --=20 Marin Atanasov Nikolov dnaeon AT gmail DOT com daemon AT unix-heaven DOT org http://www.unix-heaven.org/ From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 10:56:33 2010 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 BCA5E1065694 for ; Wed, 10 Nov 2010 10:56:33 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from fsm1.ukr.net (fsm1.ukr.net [195.214.192.23]) by mx1.freebsd.org (Postfix) with ESMTP id 7CCE28FC24 for ; Wed, 10 Nov 2010 10:56:33 +0000 (UTC) Received: from 84-73-132-95.pool.ukrtel.net ([95.132.73.84] helo=localhost) by fsm1.ukr.net with esmtps ID 1PG8Lw-0009TN-8x ; Wed, 10 Nov 2010 12:56:32 +0200 Date: Wed, 10 Nov 2010 12:56:30 +0200 From: Ivan Klymenko To: freebsd-smp@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20101110125630.00548b45@ukr.net> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Subject: kern.smp.topology 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, 10 Nov 2010 10:56:33 -0000 Hello! People. Who can explain the purpose of sysctl variable kern.smp.topology? What does it affect? It may take such values: 1 -Dual core with no sharing. 2 -No topology, all cpus are equal. 3 -Dual core with shared L2. 4 -quad core, shared l3 among each package, private l2. 5 -quad core, 2 dualcore parts on each package share l2. 6 -Single-core 2xHTT 7 -quad core with a shared l3, 8 threads sharing L2. default-Default, ask the system what it wants. Does it make sense to set its value manually, if I know that my CPU Core2Duo? How to do this, select a value? I not found this explanation in any of the official guides ... Thanks! From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 11:21:03 2010 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 3E4CA1065670 for ; Wed, 10 Nov 2010 11:21:03 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id E92548FC0A for ; Wed, 10 Nov 2010 11:21:02 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PG8jY-0005f1-NM for freebsd-hackers@freebsd.org; Wed, 10 Nov 2010 12:20:56 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Nov 2010 12:20:56 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Nov 2010 12:20:56 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Wed, 10 Nov 2010 12:20:45 +0100 Lines: 27 Message-ID: References: <20101110125630.00548b45@ukr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101102 Thunderbird/3.1.6 In-Reply-To: <20101110125630.00548b45@ukr.net> X-Enigmail-Version: 1.1.2 Cc: freebsd-smp@freebsd.org Subject: Re: kern.smp.topology 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, 10 Nov 2010 11:21:03 -0000 On 11/10/10 11:56, Ivan Klymenko wrote: > Hello! People. > > Who can explain the purpose of sysctl variable kern.smp.topology? > What does it affect? > > It may take such values: > 1 -Dual core with no sharing. > 2 -No topology, all cpus are equal. > 3 -Dual core with shared L2. > 4 -quad core, shared l3 among each package, private l2. > 5 -quad core, 2 dualcore parts on each package share l2. > 6 -Single-core 2xHTT > 7 -quad core with a shared l3, 8 threads sharing L2. > default-Default, ask the system what it wants. > > Does it make sense to set its value manually, if I know that my CPU Core2Duo? > How to do this, select a value? > > I not found this explanation in any of the official guides ... Short answer is: you should not have to touch it, ever. Long answer: it's used mostly for testing ULE and debugging topology-related problems. It's even less relevant in recent kernels (9, 8-stable) where a better topology parser has been committed. From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 11:35:07 2010 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 390221065673; Wed, 10 Nov 2010 11:35:07 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from fsm1.ukr.net (fsm1.ukr.net [195.214.192.23]) by mx1.freebsd.org (Postfix) with ESMTP id 881D98FC0A; Wed, 10 Nov 2010 11:35:04 +0000 (UTC) Received: from 84-73-132-95.pool.ukrtel.net ([95.132.73.84] helo=localhost) by fsm1.ukr.net with esmtps ID 1PG8xD-000MO4-54 ; Wed, 10 Nov 2010 13:35:03 +0200 Date: Wed, 10 Nov 2010 13:35:02 +0200 From: Ivan Klymenko To: Ivan Voras Message-ID: <20101110133502.32dddcdd@ukr.net> In-Reply-To: References: <20101110125630.00548b45@ukr.net> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, freebsd-smp@freebsd.org Subject: Re: kern.smp.topology 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, 10 Nov 2010 11:35:07 -0000 =D0=92 Wed, 10 Nov 2010 12:20:45 +0100 Ivan Voras =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > On 11/10/10 11:56, Ivan Klymenko wrote: > > Hello! People. > >=20 > > Who can explain the purpose of sysctl variable kern.smp.topology? > > What does it affect? > >=20 > > It may take such values: > > 1 -Dual core with no sharing. > > 2 -No topology, all cpus are equal. > > 3 -Dual core with shared L2. > > 4 -quad core, shared l3 among each package, private l2. > > 5 -quad core, 2 dualcore parts on each package share l2. > > 6 -Single-core 2xHTT > > 7 -quad core with a shared l3, 8 threads sharing L2. > > default-Default, ask the system what it wants. > >=20 > > Does it make sense to set its value manually, if I know that my CPU > > Core2Duo? How to do this, select a value? > >=20 > > I not found this explanation in any of the official guides ... >=20 > Short answer is: you should not have to touch it, ever. >=20 > Long answer: it's used mostly for testing ULE and debugging > topology-related problems. It's even less relevant in recent kernels > (9, 8-stable) where a better topology parser has been committed. >=20 Thank you! I understood. :) From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 15:09:31 2010 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 91E401065670; Wed, 10 Nov 2010 15:09:31 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout028.mac.com (asmtpout028.mac.com [17.148.16.103]) by mx1.freebsd.org (Postfix) with ESMTP id 768C38FC08; Wed, 10 Nov 2010 15:09:31 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp028.mac.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 64bit)) with ESMTPSA id <0LBO00ASUCRAOQ70@asmtp028.mac.com>; Wed, 10 Nov 2010 07:09:11 -0800 (PST) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1004200000 definitions=main-1011100074 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15,1.0.148,0.0.0000 definitions=2010-11-10_05:2010-11-10, 2010-11-10, 1970-01-01 signatures=0 From: Marcel Moolenaar In-reply-to: Date: Wed, 10 Nov 2010 07:09:10 -0800 Message-id: <899E1FB8-C763-4DBC-90FB-83D0725F757A@mac.com> References: <478E6244-00B4-4D96-93FE-CBD546C27A6E@mac.com> To: Garrett Cooper X-Mailer: Apple Mail (2.1081) Cc: hackers@freebsd.org Subject: Re: [PATCH] Simplify uart_bus_pci_probe 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, 10 Nov 2010 15:09:31 -0000 On Nov 10, 2010, at 12:44 AM, Garrett Cooper wrote: > On Tue, Nov 9, 2010 at 10:29 PM, Marcel Moolenaar wrote: >> >> On Nov 6, 2010, at 11:22 AM, Garrett Cooper wrote: >> >>> Some of the logic could have been simplified in the probe. The >>> proposed patch makes the detection process a tad bit more >>> straightforward. >>> Comments, review (and maybe a commit :P) are more than welcome :). >> >> The patch is logically wrong for non-ns8250 based UARTs. >> Leave the code as is. > > Hi Marcel, > Is the layout of the pci_ns8250_ids PCI ID table correct then, as > there are a large number of ns16550 chips and other non-ns8250 chips > in the table? ns16550 is a ns8250 class UART. They are in the same family. Non-ns8250 UARTs include Zilog Z8530, Siemens SAB 82532, Freescale's PowerQUICC SCC, and even SGI's firmware based serial console of you like. FYI, -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 16:34:01 2010 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 97547106566B for ; Wed, 10 Nov 2010 16:34:01 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) by mx1.freebsd.org (Postfix) with ESMTP id 400B48FC08 for ; Wed, 10 Nov 2010 16:34:00 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email2.allantgroup.com (8.14.4/8.14.4) with ESMTP id oAAFws0T092176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 10 Nov 2010 09:58:54 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.4) with ESMTP id oAAFwres090795 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 10 Nov 2010 09:58:53 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.4/Submit) id oAAFjBwJ053528; Wed, 10 Nov 2010 09:45:11 -0600 (CST) (envelope-from dan) Date: Wed, 10 Nov 2010 09:45:11 -0600 From: Dan Nelson To: perryh@pluto.rain.com Message-ID: <20101110154511.GC46822@dan.emsphone.com> References: <4cda516f.CsCJyXi6dA77aINL%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4cda516f.CsCJyXi6dA77aINL%perryh@pluto.rain.com> X-OS: FreeBSD 8.1-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.96.4 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [199.67.51.78]); Wed, 10 Nov 2010 09:58:54 -0600 (CST) X-Scanned-By: MIMEDefang 2.68 on 199.67.51.78 Cc: freebsd-hackers@freebsd.org, dnaeon@gmail.com, freebsd-ports@freebsd.org Subject: Re: Interactive tool for installing packages 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, 10 Nov 2010 16:34:01 -0000 In the last episode (Nov 10), perryh@pluto.rain.com said: > Marin Atanasov Nikolov wrote: > > in order to install the program, you need to: > > > > # git clone git://git.unix-heaven.org/public/pkg_add_it > ... > > Surely, there's room for improvement, but that's a start.. :) > > Dunno about anyone else, but from my standpoint it would be a _big_ > improvement to provide a more recent snapshot than the 6-month-old > pkg_add_it-1.2.tar.gz on ftp.freebsd.org so one doesn't have to install > git, with its boatload of dependencies*, to see the recent improvements. > > * The amount of stuff downloaded by > cd /usr/ports/devel/git ; make fetch-recursive > is, shall we say, impressive. I use the devel/hg-git port to pull all the git trees I need to access using mercurial. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 20:41:54 2010 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 185A6106566B for ; Wed, 10 Nov 2010 20:41:54 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1]) by mx1.freebsd.org (Postfix) with ESMTP id A41F28FC08 for ; Wed, 10 Nov 2010 20:41:53 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id oAAKfqdq087249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 10 Nov 2010 21:41:52 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1289421712; bh=xVl8tCxsXX+E/y09Z4Si+cgLw/8WG1o/zWiYiJhCQy8=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=EEWWuGjmqPMlKSmFvCukMRrtWOKvKmM299K3c4ZTJRcV4MWT6+mFeAsGZS5G1xuCA NruMJuzalgI7K2hA6kMMdAgZglnSsi1KhcLzYv2WqkE4G4prrr7yv95V3A0Yo42n2J WbSXW1uT59zm/y5te7vjuuAdz+XrxQCLJJENqcDM= Received: (from uqs@localhost) by acme.spoerlein.net (8.14.4/8.14.4/Submit) id oAAKfqGe087248 for hackers@freebsd.org; Wed, 10 Nov 2010 21:41:52 +0100 (CET) (envelope-from uqs@spoerlein.net) Date: Wed, 10 Nov 2010 21:41:52 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: hackers@freebsd.org Message-ID: <20101110204152.GF85693@acme.spoerlein.net> Mail-Followup-To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: libkvm: consumers of kvm_getprocs for non-live kernels? 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, 10 Nov 2010 20:41:54 -0000 Hi, I have this cleanup of libkvm sitting in my tree and it needs a little bit of testing, especially the function kvm_proclist, which is only called from kvm_deadprocs which is only called from kvm_getprocs when kd is not ALIVE. The only consumer in our tree that I can make out is *probably* kgdb, as ps(1), top(1), w(1), pkill(1), fstat(1), systat(1), pmcstat(8) and bsnmpd don't really work on coredumps But, the kgdb file gnu/usr.bin/binutils/gdb/kvm-fbsd.c, where kvm_getprocs is probably called on a dead kernel is not even used during build! So I guess I'm staring at dead code here, any kvm people around that can clue me in? Thanks, Uli From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 20:50:04 2010 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 EE7891065670 for ; Wed, 10 Nov 2010 20:50:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id A3B908FC19 for ; Wed, 10 Nov 2010 20:50:04 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:8099:b971:aeff:346d] (unknown [IPv6:2001:7b8:3a7:0:8099:b971:aeff:346d]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id EAED35C43 for ; Wed, 10 Nov 2010 21:50:03 +0100 (CET) Message-ID: <4CDB057C.9090804@FreeBSD.org> Date: Wed, 10 Nov 2010 21:50:04 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13pre) Gecko/20101104 Lanikai/3.1.7pre MIME-Version: 1.0 To: hackers@freebsd.org References: <20101110204152.GF85693@acme.spoerlein.net> In-Reply-To: <20101110204152.GF85693@acme.spoerlein.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? 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, 10 Nov 2010 20:50:05 -0000 On 2010-11-10 21:41, Ulrich Sp=F6rlein wrote: > But, the kgdb file gnu/usr.bin/binutils/gdb/kvm-fbsd.c, where > kvm_getprocs is probably called on a dead kernel is not even used durin= g > build! > > So I guess I'm staring at dead code here, any kvm people around that ca= n > clue me in? In gnu/usr.bin/binutils, the gasp, gdb and gdbreplay directories have been disconnected from the build for years now. I plan on garbage collecting them when merging the binutils-2.17 project branch (where they are already removed). From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 21:16:06 2010 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 CBA151065675 for ; Wed, 10 Nov 2010 21:16:06 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from out-0.mx.aerioconnect.net (out-0-23.mx.aerioconnect.net [216.240.47.83]) by mx1.freebsd.org (Postfix) with ESMTP id AE8EB8FC15 for ; Wed, 10 Nov 2010 21:16:06 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id oAALG5ii024241 for ; Wed, 10 Nov 2010 13:16:05 -0800 X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id D77EC2D601A for ; Wed, 10 Nov 2010 13:16:04 -0800 (PST) Message-ID: <4CDB0B97.3060209@freebsd.org> Date: Wed, 10 Nov 2010 13:16:07 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: hackers@freebsd.org References: <20101110204152.GF85693@acme.spoerlein.net> In-Reply-To: <20101110204152.GF85693@acme.spoerlein.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? 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, 10 Nov 2010 21:16:06 -0000 On 11/10/10 12:41 PM, Ulrich Spörlein wrote: > Hi, > > I have this cleanup of libkvm sitting in my tree and it needs a little > bit of testing, especially the function kvm_proclist, which is only > called from kvm_deadprocs which is only called from kvm_getprocs when kd > is not ALIVE. > > The only consumer in our tree that I can make out is *probably* kgdb, as > ps(1), top(1), w(1), pkill(1), fstat(1), systat(1), pmcstat(8) and > bsnmpd don't really work on coredumps they used to. you should ask on -current because more people who know hang out there. > But, the kgdb file gnu/usr.bin/binutils/gdb/kvm-fbsd.c, where > kvm_getprocs is probably called on a dead kernel is not even used during > build! > > So I guess I'm staring at dead code here, any kvm people around that can > clue me in? > > Thanks, > Uli > _______________________________________________ > 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 Nov 10 21:17:36 2010 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 2AF0F106566C for ; Wed, 10 Nov 2010 21:17:36 +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 260088FC1C for ; Wed, 10 Nov 2010 21:17:35 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 55DC335A837 for ; Wed, 10 Nov 2010 22:17:33 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 4B0751732E; Wed, 10 Nov 2010 22:17:33 +0100 (CET) Date: Wed, 10 Nov 2010 22:17:33 +0100 From: Jilles Tjoelker To: hackers@freebsd.org Message-ID: <20101110211733.GB17871@stack.nl> References: <20101110204152.GF85693@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20101110204152.GF85693@acme.spoerlein.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? 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, 10 Nov 2010 21:17:36 -0000 On Wed, Nov 10, 2010 at 09:41:52PM +0100, Ulrich Spörlein wrote: > I have this cleanup of libkvm sitting in my tree and it needs a little > bit of testing, especially the function kvm_proclist, which is only > called from kvm_deadprocs which is only called from kvm_getprocs when kd > is not ALIVE. > The only consumer in our tree that I can make out is *probably* kgdb, as > ps(1), top(1), w(1), pkill(1), fstat(1), systat(1), pmcstat(8) and > bsnmpd don't really work on coredumps > But, the kgdb file gnu/usr.bin/binutils/gdb/kvm-fbsd.c, where > kvm_getprocs is probably called on a dead kernel is not even used during > build! > So I guess I'm staring at dead code here, any kvm people around that can > clue me in? It is a while ago that I last used this, but ps and fstat definitely worked on crashdumps, to some extent. /usr/sbin/crashinfo uses this. -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 21:51:02 2010 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 CF8D6106566B for ; Wed, 10 Nov 2010 21:51:02 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5E1678FC13 for ; Wed, 10 Nov 2010 21:51:01 +0000 (UTC) Received: by wya21 with SMTP id 21so1307782wya.13 for ; Wed, 10 Nov 2010 13:51:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:mime-version:content-type:content-transfer-encoding :message-id; bh=YdM0jchA4kzZ0dPpjuYuc+aUa5hTkMZ8SbBjf0lWUHc=; b=kVlqP5CZaWYvwL5VyZmwLKWMXZjNaIrGOpOeyNaiMUjlyppGnZktGogV1mhlWxz9Am OUi86lBE9PB1zV1vMwo4ygC0soHmNiyYqgZdBgW1ai4D0edLsIdBUcZPr4Yzb0zPY0tg P1Ism+gldQMlXk+vvuh0fnIAkSLB/0sGeVWzA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:message-id; b=gdH7NGiEz1jLQpOv72+uRG/tlEnMn0Ca28PHUu9VS/3r8vbl3ZhW1xL/4GstcJ40Ua cd4QjQPq5JsLg2jdaokTSftYwOIDVUceLqhBaAsEuLC2SVbgyUweajXnCY8osdrpoanp PqLODf5HoZwD7snPnH6DKMKJfl3Ngi88J2eCs= Received: by 10.216.235.211 with SMTP id u61mr8103686weq.91.1289424093933; Wed, 10 Nov 2010 13:21:33 -0800 (PST) Received: from dragon.dg (41-132-133-189.dsl.mweb.co.za [41.132.133.189]) by mx.google.com with ESMTPS id p4sm771458wej.28.2010.11.10.13.21.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Nov 2010 13:21:33 -0800 (PST) From: David Naylor To: freebsd-hackers@freebsd.org Date: Wed, 10 Nov 2010 23:21:17 +0200 User-Agent: KMail/1.13.5 (FreeBSD/9.0-CURRENT; KDE/4.5.1; amd64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2403325.53z0r8NQuq"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201011102321.23883.naylor.b.david@gmail.com> Subject: python + build ports = failure (threading problem) 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, 10 Nov 2010 21:51:03 -0000 --nextPart2403325.53z0r8NQuq Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I've found a problem in FreeBSD's implementation for threads, pth does not= =20 have this problem. =20 The following test case consistantly reproduces the problem: =2D-- start --- #! /usr/bin/env python from subprocess import Popen, PIPE from threading import Lock, Thread def runner(): process =3D Popen(("make", "-C", "/usr/ports/graphics/kdegraphics4", "cle= an",=20 "all"), close_fds=3DTrue) process.wait() # If runner called directly then port compiles correctly, otherwise it stal= ls Thread(target=3Drunner).start() =2D-- end --- The port stalls with=20 grep: writing output: Broken pipe grep: writing output: Broken pipe grep: writing output: Broken pipe - found =3D=3D=3D> Configuring for kdegraphics-4.5.3 /bin/mkdir -p /usr/ports/graphics/kdegraphics4/work/kdegraphics-4.5.3/build The grep errors appear to be mostly harmless, `ps` shows: 17648 4 D 0:00.03 python test.py 17649 4 D 0:00.08 make -C /usr/ports/graphics/kdegraphics4 clean all 17974 4 D 0:00.03 [cmake] 17978 4 Z 0:00.03 I suspect any port using cmake will have this problem (unconfirmed) and if= =20 memory serves me correct then building lang/perl causes the same problem=20 (although the stall happens much later on in the build). =20 Using WITH_PTH when building python fixes the problem so I suspect libthr a= s=20 the cause of the problem. =20 I hope someone finds this information useful. =20 David P.S. Should a PR be filed for this? P.S.S. It is possible that one of pythons test cases can reproduce this... --nextPart2403325.53z0r8NQuq Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEABECAAYFAkzbDNMACgkQUaaFgP9pFrIGyQCePFdi2mt7W4v1lJdmc4iuHWed gEgAnjz6MKiKNgOwBITvBRPa7Xzx/Kt5 =/PkM -----END PGP SIGNATURE----- --nextPart2403325.53z0r8NQuq-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 11 06:13:07 2010 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 9D9D1106566B; Thu, 11 Nov 2010 06:13:07 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 796698FC0A; Thu, 11 Nov 2010 06:13:07 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id oAB6CuMp096152 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 10 Nov 2010 22:12:57 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id oAB6CuRZ096151; Wed, 10 Nov 2010 22:12:56 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA08182; Wed, 10 Nov 10 22:01:24 PST Date: Wed, 10 Nov 2010 22:01:13 -0800 From: perryh@pluto.rain.com To: dnaeon@gmail.com Message-Id: <4cdb86a9.Y2mKBlO3rm15wF2D%perryh@pluto.rain.com> References: <4cda516f.CsCJyXi6dA77aINL%perryh@pluto.rain.com> In-Reply-To: User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Interactive tool for installing packages 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, 11 Nov 2010 06:13:07 -0000 Marin Atanasov Nikolov wrote: > If you do not have git installed, you could still get the > latest snapshot of pkg_add_it via the Cgit repo. [1] > [1] http://git.unix-heaven.org/cgit.cgi/pkg_add_it/ Aha! I'm sure I looked at that page before posting, but did not see how to pull down a snapshot (vs browsing individual files) the first time. It seems to have been reorganized since 1.2, as well as having grown quite a bit :) From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 11 07:08:49 2010 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 8AF67106564A; Thu, 11 Nov 2010 07:08:49 +0000 (UTC) (envelope-from dnaeon@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id E2E8F8FC23; Thu, 11 Nov 2010 07:08:48 +0000 (UTC) Received: by eyb7 with SMTP id 7so924817eyb.13 for ; Wed, 10 Nov 2010 23:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=uIx1dv1qFbW+kOfOhvG0eEZQzQt5i5mE5+sa51tLqvo=; b=oyyGUshXnyTgwqkuYDd3I1RiuQgLQGkXQPi+pk+pY0rpi3OJtSoz9wJxwmvCh2Mvt9 HyhQu1R0wWBuAlZt4RStJCG1QMPA8YTQq4auRlorrqjakn+n84ly7uUKp4cVx9ksrIt3 NoUzHhhk2xHmDnav2MzdtVOZqigGAASGGYm7I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=FPzJxoiFbXMlTx/AWUoGmCMTZKsKO7R1fxRJ+GeOAailKnoANl4gUjoQs9qSdFYiSg jDyvgIQ7pZbmPYczSBGkpbyeTKavg1n+e0dY6yq4nfGQpNcHSOkc1xiHkXconsIkYDpc a3nJ37D0g/R6oYWi7YzojG8E+HweeyoiPPOEs= MIME-Version: 1.0 Received: by 10.213.104.134 with SMTP id p6mr470480ebo.98.1289459326789; Wed, 10 Nov 2010 23:08:46 -0800 (PST) Received: by 10.213.16.193 with HTTP; Wed, 10 Nov 2010 23:08:46 -0800 (PST) In-Reply-To: <4cdb86a9.Y2mKBlO3rm15wF2D%perryh@pluto.rain.com> References: <4cda516f.CsCJyXi6dA77aINL%perryh@pluto.rain.com> <4cdb86a9.Y2mKBlO3rm15wF2D%perryh@pluto.rain.com> Date: Thu, 11 Nov 2010 09:08:46 +0200 Message-ID: From: Marin Atanasov Nikolov To: perryh@pluto.rain.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Interactive tool for installing packages 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, 11 Nov 2010 07:08:49 -0000 On Thu, Nov 11, 2010 at 8:01 AM, wrote: > Marin Atanasov Nikolov wrote: > >> If you do not have git installed, you could still get the >> latest snapshot of pkg_add_it via the Cgit repo. [1] >> [1] http://git.unix-heaven.org/cgit.cgi/pkg_add_it/ > > Aha! =A0I'm sure I looked at that page before posting, but did not see > how to pull down a snapshot (vs browsing individual files) the first > time. =A0It seems to have been reorganized since 1.2, as well as having > grown quite a bit :) > Yep, quite a lot of changes went to 1.3, the program was completely rewritten and introduced a lot of new features :) Most significant changes were: - own-styled lists were replaced by queue(3) macros, so generally now everything is dynamic and memory leak-free. - a lot of new functions dealing with packages, added a configuration modu= le - etc... :) One thing that can be improved is the recursion introduced by DEPS_FULL_TREE=3Dtrue, so that dependencies can be found easier and faster from INDEX, but I'm looking into this already, since I think that feature is very useful when you need to know the dependencies of a package in a tree-view. Regards, Marin --=20 Marin Atanasov Nikolov dnaeon AT gmail DOT com daemon AT unix-heaven DOT org http://www.unix-heaven.org/ From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 11 13:16:40 2010 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 58959106566B for ; Thu, 11 Nov 2010 13:16:40 +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 324BE8FC15 for ; Thu, 11 Nov 2010 13:16:40 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id B50A646B09; Thu, 11 Nov 2010 08:16:39 -0500 (EST) Date: Thu, 11 Nov 2010 13:16:39 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: =?ISO-8859-15?Q?Ulrich_Sp=F6rlein?= In-Reply-To: <20101110204152.GF85693@acme.spoerlein.net> Message-ID: References: <20101110204152.GF85693@acme.spoerlein.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="621616949-2061383708-1289481399=:30414" Cc: hackers@freebsd.org Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? 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, 11 Nov 2010 13:16:40 -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. --621616949-2061383708-1289481399=:30414 Content-Type: TEXT/PLAIN; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8BIT On Wed, 10 Nov 2010, Ulrich Spörlein wrote: > I have this cleanup of libkvm sitting in my tree and it needs a little bit > of testing, especially the function kvm_proclist, which is only called from > kvm_deadprocs which is only called from kvm_getprocs when kd is not ALIVE. > > The only consumer in our tree that I can make out is *probably* kgdb, as > ps(1), top(1), w(1), pkill(1), fstat(1), systat(1), pmcstat(8) and bsnmpd > don't really work on coredumps > > But, the kgdb file gnu/usr.bin/binutils/gdb/kvm-fbsd.c, where kvm_getprocs > is probably called on a dead kernel is not even used during build! > > So I guess I'm staring at dead code here, any kvm people around that can > clue me in? Even if those tools aren't using kvm properly, they should be. ps(1) at least used to work quite well on coredumps, and perhaps still does? Stas has ongoing work on a libprocstat, you might want to give him a ping. I'm not sure if he plans to refactor some of those existing tools to use that library or not, but crashdump support is a key goal of it. Robert --621616949-2061383708-1289481399=:30414-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 11 14:28:10 2010 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 BE1FD106566C for ; Thu, 11 Nov 2010 14:28:10 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 51ED48FC0A for ; Thu, 11 Nov 2010 14:28:10 +0000 (UTC) Received: by wya21 with SMTP id 21so2195333wya.13 for ; Thu, 11 Nov 2010 06:28:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :message-id:user-agent:mime-version:content-type; bh=r7KDiq4SmRfn+oXCl9YzsP0jT9e/21XTttSurYzefnQ=; b=CI1HkOINP+YUngivFcRyJ7BnCC2yacJYYaQDKiE5ZtTfcjvztOGagy+CEd3uPlAn2N cW7JwnrVluPFALBDdJaxGC5SUL8KV6k0NdDDd7wMCfVj9dvrOPgq855CYp7OH0EnW1fH ix3JSlUvsG86JQCJY0JP2Ncu1tPohIALpiwds= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; b=lboaIFNV8UkGT7YF/rJRxKy0lUciwVAVHCc+I7Ut/+nOAKorYd38Pij+m9P8lOXyaf SCmmbAtbeTeoJqP+q1XizKgf1LW5FvKwDomR4K+7Dh+sbIcAiEvTcCbaUfkP9lr3PO9J rWcsFkMLnys1O88mkbwusVZhU+acup06ecQas= Received: by 10.216.233.161 with SMTP id p33mr726320weq.95.1289485688867; Thu, 11 Nov 2010 06:28:08 -0800 (PST) Received: from localhost ([81.218.219.122]) by mx.google.com with ESMTPS id x28sm1323650weq.40.2010.11.11.06.28.05 (version=SSLv3 cipher=RC4-MD5); Thu, 11 Nov 2010 06:28:07 -0800 (PST) From: Anonymous To: freebsd-hackers@freebsd.org Date: Thu, 11 Nov 2010 17:27:56 +0300 Message-ID: <86sjz8lytv.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Subject: rtld + gold linker, cannot find entry symbol lf; defaulting to 00000000000034d0 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, 11 Nov 2010 14:28:10 -0000 I'm trying to compile dynamic linker with `gold' linker. During build with normal ld(1) there is a warning cc [...] -elf -o ld-elf.so.1 LOCALBASE/bin/ld: warning: cannot find entry symbol lf; defaulting to 00000000000034d0 While it doesn't seem to affect `ld' it does for `gold'. The binary produced by `gold' segfaults, e.g. # from /head@215110 Core was generated by `sh'. Program terminated with signal 11, Segmentation fault. #0 .rtld_start () at /usr/src/libexec/rtld-elf/amd64/rtld_start.S:33 33 xorq %rbp,%rbp # Clear frame pointer for good form (gdb) bt #0 .rtld_start () at /usr/src/libexec/rtld-elf/amd64/rtld_start.S:33 #1 0x0000000000000001 in ?? () #2 0x00007fffffff0fe0 in ?? () #3 0x0000000000000000 in ?? () So, is `-elf' intended or it can be removed? %% diff --git a/libexec/rtld-elf/amd64/Makefile.inc b/libexec/rtld-elf/amd64/Makefile.inc index b265a9d..4ecf82f 100644 --- a/libexec/rtld-elf/amd64/Makefile.inc +++ b/libexec/rtld-elf/amd64/Makefile.inc @@ -1,7 +1,5 @@ # $FreeBSD$ -CFLAGS+= -elf -LDFLAGS+= -elf # Uncomment this to build the dynamic linker as an executable instead # of a shared library: #LDSCRIPT= ${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x diff --git a/libexec/rtld-elf/i386/Makefile.inc b/libexec/rtld-elf/i386/Makefile.inc index b265a9d..4ecf82f 100644 --- a/libexec/rtld-elf/i386/Makefile.inc +++ b/libexec/rtld-elf/i386/Makefile.inc @@ -1,7 +1,5 @@ # $FreeBSD$ -CFLAGS+= -elf -LDFLAGS+= -elf # Uncomment this to build the dynamic linker as an executable instead # of a shared library: #LDSCRIPT= ${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x %% From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 11 14:55:46 2010 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 C452A1065693; Thu, 11 Nov 2010 14:55:46 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1]) by mx1.freebsd.org (Postfix) with ESMTP id 3943F8FC18; Thu, 11 Nov 2010 14:55:46 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id oABEtjdb011098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Nov 2010 15:55:45 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1289487345; bh=7kj28phus/I5vTf2/rkXdOJHPqJRoLtEflOvvellItI=; h=Date:From:To:Cc:Subject:Message-ID:Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To; b=Xmh/fMEchnTBmmy+6Id3yuEbCAU5ZdbqEyK9ndpHi+0h9wihJrNAQuO3niLwLVgeq aAQ75nUGW8WXmioi4H+I+Jnstp3MB0RaLwgLFLIFq1g4fqLbqW0WUCNQZva5gsP6Lj 1wa3MTi4Qo4UG6bH4gb87YwqapCiDtqtvgxKfHJw= Received: (from uqs@localhost) by acme.spoerlein.net (8.14.4/8.14.4/Submit) id oABEtjDF011097; Thu, 11 Nov 2010 15:55:45 +0100 (CET) (envelope-from uqs@spoerlein.net) Date: Thu, 11 Nov 2010 15:55:45 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Robert Watson Message-ID: <20101111145544.GH85693@acme.spoerlein.net> Mail-Followup-To: Robert Watson , hackers@FreeBSD.org, stas@FreeBSD.org References: <20101110204152.GF85693@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: stas@FreeBSD.org, hackers@FreeBSD.org Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: uqs@spoerlein.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2010 14:55:46 -0000 On Thu, 11.11.2010 at 13:16:39 +0000, Robert Watson wrote: > On Wed, 10 Nov 2010, Ulrich Spörlein wrote: > > > I have this cleanup of libkvm sitting in my tree and it needs a little bit > > of testing, especially the function kvm_proclist, which is only called from > > kvm_deadprocs which is only called from kvm_getprocs when kd is not ALIVE. > > > > The only consumer in our tree that I can make out is *probably* kgdb, as > > ps(1), top(1), w(1), pkill(1), fstat(1), systat(1), pmcstat(8) and bsnmpd > > don't really work on coredumps > > > > But, the kgdb file gnu/usr.bin/binutils/gdb/kvm-fbsd.c, where kvm_getprocs > > is probably called on a dead kernel is not even used during build! > > > > So I guess I'm staring at dead code here, any kvm people around that can > > clue me in? > > Even if those tools aren't using kvm properly, they should be. ps(1) at least > used to work quite well on coredumps, and perhaps still does? Oh man, looks like I need some glasses soon. When did that -M flag to ps(1) suddenly appear? Sadly, testing will have to wait till next week. > Stas has ongoing work on a libprocstat, you might want to give him a ping. > I'm not sure if he plans to refactor some of those existing tools to use that > library or not, but crashdump support is a key goal of it. Thanks for the hint, stas CC'ed and reply-to set. Over and out Uli From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 11 15:15:09 2010 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 42DC0106566C; Thu, 11 Nov 2010 15:15:09 +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 0E37B8FC20; Thu, 11 Nov 2010 15:15:09 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9CF4A46B17; Thu, 11 Nov 2010 10:15:08 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 92D6A8A009; Thu, 11 Nov 2010 10:15:07 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 11 Nov 2010 08:45:36 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <20101110204152.GF85693@acme.spoerlein.net> In-Reply-To: <20101110204152.GF85693@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201011110845.36896.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 11 Nov 2010 10:15:07 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Ulrich =?iso-8859-1?q?Sp=F6rlein?= , hackers@freebsd.org Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? 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, 11 Nov 2010 15:15:09 -0000 On Wednesday, November 10, 2010 3:41:52 pm Ulrich Sp=F6rlein wrote: > Hi, >=20 > I have this cleanup of libkvm sitting in my tree and it needs a little > bit of testing, especially the function kvm_proclist, which is only > called from kvm_deadprocs which is only called from kvm_getprocs when kd > is not ALIVE. >=20 > The only consumer in our tree that I can make out is *probably* kgdb, as > ps(1), top(1), w(1), pkill(1), fstat(1), systat(1), pmcstat(8) and > bsnmpd don't really work on coredumps ps and fstat certainly work fine on crashdumps. w did before devfs (it=20 doesn't have a good way to map the device entries from the crashed kernel t= o=20 the entries in wtmp IIRC). kvm_getprocs() is certainly actively used by=20 various programs on crashdumps and works. =2D-=20 John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 11 15:15:09 2010 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 42DC0106566C; Thu, 11 Nov 2010 15:15:09 +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 0E37B8FC20; Thu, 11 Nov 2010 15:15:09 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9CF4A46B17; Thu, 11 Nov 2010 10:15:08 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 92D6A8A009; Thu, 11 Nov 2010 10:15:07 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 11 Nov 2010 08:45:36 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <20101110204152.GF85693@acme.spoerlein.net> In-Reply-To: <20101110204152.GF85693@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201011110845.36896.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 11 Nov 2010 10:15:07 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Ulrich =?iso-8859-1?q?Sp=F6rlein?= , hackers@freebsd.org Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? 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, 11 Nov 2010 15:15:09 -0000 On Wednesday, November 10, 2010 3:41:52 pm Ulrich Sp=F6rlein wrote: > Hi, >=20 > I have this cleanup of libkvm sitting in my tree and it needs a little > bit of testing, especially the function kvm_proclist, which is only > called from kvm_deadprocs which is only called from kvm_getprocs when kd > is not ALIVE. >=20 > The only consumer in our tree that I can make out is *probably* kgdb, as > ps(1), top(1), w(1), pkill(1), fstat(1), systat(1), pmcstat(8) and > bsnmpd don't really work on coredumps ps and fstat certainly work fine on crashdumps. w did before devfs (it=20 doesn't have a good way to map the device entries from the crashed kernel t= o=20 the entries in wtmp IIRC). kvm_getprocs() is certainly actively used by=20 various programs on crashdumps and works. =2D-=20 John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 11 20:12:47 2010 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 2CA1B106564A for ; Thu, 11 Nov 2010 20:12:47 +0000 (UTC) (envelope-from dteske@vicor.com) Received: from postoffice.vicor.com (postoffice.vicor.com [69.26.56.53]) by mx1.freebsd.org (Postfix) with ESMTP id 198218FC14 for ; Thu, 11 Nov 2010 20:12:46 +0000 (UTC) Received: from [208.206.78.30] (port=48146 helo=dt.vicor.com) by postoffice.vicor.com with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.71) (envelope-from ) id 1PGdVj-0002VY-BI; Thu, 11 Nov 2010 12:12:46 -0800 From: Devin Teske To: freebsd-hackers@freebsd.org Content-Type: text/plain Organization: Vicor, Inc Date: Thu, 11 Nov 2010 12:12:43 -0800 Message-Id: <1289506363.30235.113.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-41.el4) Content-Transfer-Encoding: 7bit X-Scan-Signature: aa29f6d353b94a26a562ba4182b8c731 X-Scan-Host: postoffice.vicor.com Cc: Devin Teske Subject: Spinner Function for Shell Scripts 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, 11 Nov 2010 20:12:47 -0000 Hi fellow hackers... I come with baring gifts! So, just as the subject-line says, ... here's an efficient and robust spinner function compatible with many shells. But, before I get into the code, let me first explain that going to Google and searching for "spinner shell script" results in 100+ different types of "FAIL" either because: a. the proposed solution doesn't properly handle signals (like Ctrl+C) b. doesn't escape the commands being executed, which leads to syntax errors in the eval statement c. the proposed solution is not efficient enough (for example, executing a simple command like "true" -- which returns immediately -- should result in no spinner being displayed and return very fast) d. stdout/stderr is not properly masked from output while displaying the spinner e. the command exit-status is not preserved f. or the proposed solution attempts to use background job-control (e.g. w/ &/pidwait/wait/bg/fg/kill/etc.) which can have nasty side-effects. A special note about that last one: Solutions involving background job- control are especially annoying because if signals are not properly trapped, the spinner could potentially be left running (that is, if the spinner is the thing in the background versus vice-versa). Doubly annoying is that in stress-testing these implementations, it appears that using kill(1) to kill the process can occasionally (~1-in-50) produce an errant unmaskable "Terminated" or "Killed" or "Hangup" message (depending on which signal is used to do your killing of the spinner). For example (from testing), sending any one of these signals can cause premature termination if not trapped: SIGINT SIGTERM SIGPIPE SIGXCPU SIGXFSZ SIGFPE SIGTRAP SIGABRT SIGSEGV SIGALRM SIGPROF SIGUSR1 SIGUSR2 SIGHUP SIGVTALRM (NOTE: we're talking about shell scripts here). I feel that I've perhaps finally developed the end-all be-all spinner function (BSD Licensing applies): #!/bin/sh # -*- tab-width: 4 -*- ;; Emacs # vi: set tabstop=4 :: Vi/ViM # ############################################################ COPYRIGHT # # Devin Teske (c)2006-2010. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ############################################################ GLOBALS # Global exit status variables export SUCCESS=0 export FAILURE=1 ############################################################ FUNCTIONS # eval_spin $command [ $args ... ] # # Execute a command while displaying a rotating spinner. # eval_spin() { local commands= if [ $# -gt 0 ]; then # Take commands from positional arguments while [ $# -gt 0 ]; do commands="$commands${commands:+ }'$1'" shift 1 done else # Take commands from standard input while read -r LINE; do commands="$commands $LINE" done fi [ "$commands" ] || return $SUCCESS # # Execute the command w/ spinner # ( eval "$commands" > /dev/null 2>&1 echo $? ) | ( n=1 spin="/-\\|" DONE= echo -n " " while [ ! "$DONE" ]; do DONE=$( /bin/sh -c 'read -t 0 DONE; echo $DONE' ) printf "\b%s" $( echo "$spin" | sed -e \ "s/.\{0,$(( $n % ${#spin} ))\}\(.\).*/\1/" ) n=$(( $n + 1 )) done printf "\b \b" exit $DONE ) } ############################################################ MAIN SOURCE eval_spin "$@" ################################################################################ # END ################################################################################ And now... for some quick examples of usage... ... show-off that we can handle both arguments and stdin ... eval_spin sleep 3 # spins for 3 seconds eval_spin << EOF sleep 3 EOF # spins for 3 seconds echo sleep 3 | eval_spin # spins for 3 seconds ... show-off that -- since we don't fork -- we can do functions ... myfunc(){ sleep 3; } eval_spin myfunc # spins for 3 seconds ... show-off that we preserve the exit status ... eval_spin true # immediately returns, exit status is zero eval_spin false # immediately returns, exit status is one eval_spin 1 # immediately returns, exit status is 127 (syntax error) ... show-off that we support user-generated interrupt signal ... eval_spin sleep 100 # press Ctrl-C... exit status is 130 (interrupted) ... show-off our efficiency ... time sleep 5 # Takes 5.003s time eval_spin sleep 5 # Takes 5.059s ... show that efficiency is retained in ramping-up ... time sleep 10 # Takes 10.004s time eval_spin sleep 10 # Takes 10.041s ... show that efficiency is key ... time eval_spin true # Takes 0.029s ... and you can already see from the code, I don't use kill(1), I don't use `&', and I don't use background job-control features of the shell. The only odd-ball thing you'll find in the code is that I invoke /bin/sh to use bourne-shell's `read' built-in so that in the event that we are sourced into another shell (such as bash), we don't end up using that shells `read' built-in (testing shows that bash's `read' doesn't function the same with respect to our `-t 0' syntax). Removing the direct-invocation of /bin/sh does not buy you any significant efficiency gains (so the portability that the statement gives us was favored). We've generalized this function into a central include that we include into our shell scripts using the `.' built-in. However, if you want to adapt this for boot-scripts, I can rewrite it to: a. Not-use sed(1) (which lives in /usr/bin so isn't available at boot- time). b. Not redirect output to /dev/null c. Replace printf with echo Both of which are trivial,... To get rid of sed(1), we just need to implement a substr function (BSD Licensing applies -- same copyright as above)... # substr $string $start [ $length ] # # Obtain a substring. The starting position may be negative (relative to end) # or positive (relative to beginning). The length is in bytes to the right of # the starting position. Returns with failure status on error. # substr() { local string="$1" start="${2:-0}" len="${3:-0}" # Check arguments [ "$string" ] || return $FAILURE [ $start -gt ${#string} ] && return $SUCCESS # Advance to the starting position [ ${start} -lt 0 ] && start=$((${#string} + $start)) [ ${start} -lt 0 ] && start=0 while [ $start -gt 0 ]; do string="${string#?}" start=$(($start - 1)) done # Truncate to the proper length [ $len -le 0 ] && len=${#string} while [ ${#string} -gt $len ]; do string="${string%?}" done echo -n "$string" } In which case, the following sed(1) usage (from above): printf "\b%s" $( echo "$spin" | sed -e \ "s/.\{0,$(( $n % ${#spin} ))\}\(.\).*/\1/" ) Becomes instead (also taking care to get rid of printf): echo "^H$( substr "$spin" $(($n % ${#spin})) 1 )" ... Writing a version of eval_spin that is entirely free of all external dependencies (safe for one exception: /bin/sh) for the purpose of inclusion into /etc/rc.subr is something that intrigues me. I could imagine rewriting all of the rc.d scripts to use it... with other fundamentals to beautify the boot-process. -- Cheers, Devin Teske -> CONTACT INFORMATION <- Business Solutions Consultant II FIS - fisglobal.com 510-735-5650 Mobile 510-621-2038 Office 510-621-2020 Office Fax 909-477-4578 Home/Fax devin.teske@fisglobal.com -> LEGAL DISCLAIMER <- This message contains confidential and proprietary information of the sender, and is intended only for the person(s) to whom it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you have received this message in error, please notify the e-mail sender immediately, and delete the original message without making a copy. -> FUN STUFF <- -----BEGIN GEEK CODE BLOCK----- Version 3.1 GAT/CS d(+) s: a- C++(++++) UB++++$ P++(++++) L++(++++) !E--- W++ N? o? K- w O M+ V- PS+ PE Y+ PGP- t(+) 5? X+(++) R>++ tv(+) b+(++) DI+(++) D(+) G+>++ e>+ h r>++ y+ ------END GEEK CODE BLOCK------ http://www.geekcode.com/ -> END TRANSMISSION <- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 11 23:07:59 2010 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 6F095106566B; Thu, 11 Nov 2010 23:07:59 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (cl-414.sto-01.se.sixxs.net [IPv6:2001:16d8:ff00:19d::2]) by mx1.freebsd.org (Postfix) with ESMTP id 14C8C8FC15; Thu, 11 Nov 2010 23:07:59 +0000 (UTC) Received: from sputnik.SpringDaemons.com (static-64-61-167-75.isp.broadviewnet.net [64.61.167.75]) by mx0.deglitch.com (Postfix) with ESMTPA id 81EEF8FC27; Fri, 12 Nov 2010 02:07:55 +0300 (MSK) Received: from sputnik.SpringDaemons.com (localhost [127.0.0.1]) by sputnik.SpringDaemons.com (Postfix) with SMTP id 14203D2B9; Thu, 11 Nov 2010 15:08:03 -0800 (PST) Date: Thu, 11 Nov 2010 15:08:01 -0800 From: Stanislav Sedov To: uqs@spoerlein.net Message-Id: <20101111150801.33afa33b.stas@FreeBSD.org> In-Reply-To: <20101111145544.GH85693@acme.spoerlein.net> References: <20101110204152.GF85693@acme.spoerlein.net> <20101111145544.GH85693@acme.spoerlein.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprin: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: hackers@FreeBSD.org, Robert Watson Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? 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, 11 Nov 2010 23:07:59 -0000 On Thu, 11 Nov 2010 15:55:45 +0100 Ulrich Sp=C3=B6rlein mentioned: >=20 > > Stas has ongoing work on a libprocstat, you might want to give him a pi= ng.=20 > > I'm not sure if he plans to refactor some of those existing tools to us= e that=20 > > library or not, but crashdump support is a key goal of it. >=20 > Thanks for the hint, stas CC'ed and reply-to set. >=20 Yes, the idea was to refactor all base tools to use libprocstat as well. So far only procstat(8), fuser and fstat have been converted to use new functionality, = so they are able to operate both on coredumps and on the live system. We still need to commit the libprocstat itself, though. --=20 Stanislav Sedov ST4096-RIPE From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 01:26:34 2010 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 4652D1065672 for ; Fri, 12 Nov 2010 01:26:34 +0000 (UTC) (envelope-from dteske@vicor.com) Received: from postoffice.vicor.com (postoffice.vicor.com [69.26.56.53]) by mx1.freebsd.org (Postfix) with ESMTP id 1A9E88FC29 for ; Fri, 12 Nov 2010 01:26:33 +0000 (UTC) Received: from [208.206.78.30] (port=48741 helo=dt.vicor.com) by postoffice.vicor.com with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.71) (envelope-from ) id 1PGiPP-0002pI-Bc for freebsd-hackers@freebsd.org; Thu, 11 Nov 2010 17:26:33 -0800 From: Devin Teske To: freebsd-hackers@freebsd.org In-Reply-To: <1289506363.30235.113.camel@localhost.localdomain> References: <1289506363.30235.113.camel@localhost.localdomain> Content-Type: text/plain Organization: Vicor, Inc Date: Thu, 11 Nov 2010 17:26:31 -0800 Message-Id: <1289525191.30235.117.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-41.el4) Content-Transfer-Encoding: 7bit X-Scan-Signature: 83be3b23014bddc0a2b81e211cffcda6 X-Scan-Host: postoffice.vicor.com Subject: Re: Spinner Function for Shell Scripts 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, 12 Nov 2010 01:26:34 -0000 One-line fix for a small bug (see below). On Thu, 2010-11-11 at 12:12 -0800, Devin Teske wrote: > Hi fellow hackers... I come with baring gifts! > > So, just as the subject-line says, ... here's an efficient and robust > spinner function compatible with many shells. > > But, before I get into the code, > > [snip] > > eval_spin() > { > local commands= > if [ $# -gt 0 ]; then > # Take commands from positional arguments > while [ $# -gt 0 ]; do > commands="$commands${commands:+ }'$1'" > shift 1 > done > else > # Take commands from standard input > while read -r LINE; do > commands="$commands > $LINE" > done > fi > [ "$commands" ] || return $SUCCESS > > # > # Execute the command w/ spinner > # > ( > eval "$commands" > /dev/null 2>&1 The above line should instead be: ( eval "$commands" ) > /dev/null 2>&1 To protect from things such as: eval_spin exit > echo $? > ) | ( > n=1 > spin="/-\\|" > DONE= > > echo -n " " > while [ ! "$DONE" ]; do > DONE=$( /bin/sh -c 'read -t 0 DONE; echo $DONE' ) > printf "\b%s" $( echo "$spin" | sed -e \ > "s/.\{0,$(( $n % ${#spin} ))\}\(.\).*/\1/" ) > n=$(( $n + 1 )) > done > printf "\b \b" > exit $DONE > ) > } > > [snip] -- Cheers, Devin Teske -> CONTACT INFORMATION <- Business Solutions Consultant II FIS - fisglobal.com 510-735-5650 Mobile 510-621-2038 Office 510-621-2020 Office Fax 909-477-4578 Home/Fax devin.teske@fisglobal.com -> LEGAL DISCLAIMER <- This message contains confidential and proprietary information of the sender, and is intended only for the person(s) to whom it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you have received this message in error, please notify the e-mail sender immediately, and delete the original message without making a copy. -> END TRANSMISSION <- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 02:28:14 2010 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 B4230106566C for ; Fri, 12 Nov 2010 02:28:14 +0000 (UTC) (envelope-from dteske@vicor.com) Received: from postoffice.vicor.com (postoffice.vicor.com [69.26.56.53]) by mx1.freebsd.org (Postfix) with ESMTP id 9E2E68FC1A for ; Fri, 12 Nov 2010 02:28:14 +0000 (UTC) Received: from [208.206.78.30] (port=48859 helo=dt.vicor.com) by postoffice.vicor.com with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.71) (envelope-from ) id 1PGjN5-0004jr-Dh for freebsd-hackers@freebsd.org; Thu, 11 Nov 2010 18:28:13 -0800 From: Devin Teske To: freebsd-hackers@freebsd.org In-Reply-To: <1289506363.30235.113.camel@localhost.localdomain> References: <1289506363.30235.113.camel@localhost.localdomain> Content-Type: text/plain Organization: Vicor, Inc Date: Thu, 11 Nov 2010 18:28:11 -0800 Message-Id: <1289528891.30235.130.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-41.el4) Content-Transfer-Encoding: 7bit X-Scan-Signature: aa29f6d353b94a26a562ba4182b8c731 X-Scan-Host: postoffice.vicor.com Subject: Re: Spinner Function for Shell Scripts 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, 12 Nov 2010 02:28:14 -0000 On Thu, 2010-11-11 at 12:12 -0800, Devin Teske wrote: > Hi fellow hackers... I come with baring gifts! > > So, just as the subject-line says, ... here's an efficient and robust > spinner function compatible with many shells. > > But, before I get into the code, let me first explain that going to > Google and searching for "spinner shell script" results in 100+ > different types of "FAIL" either because: > > a. the proposed solution doesn't properly handle signals (like Ctrl+C) > b. doesn't escape the commands being executed, which leads to syntax > errors in the eval statement > c. the proposed solution is not efficient enough (for example, executing > a simple command like "true" -- which returns immediately -- should > result in no spinner being displayed and return very fast) > d. stdout/stderr is not properly masked from output while displaying the > spinner > e. the command exit-status is not preserved > f. or the proposed solution attempts to use background job-control (e.g. > w/ &/pidwait/wait/bg/fg/kill/etc.) which can have nasty side-effects. > > A special note about that last one: Solutions involving background job- > control are especially annoying because if signals are not properly > trapped, the spinner could potentially be left running (that is, if the > spinner is the thing in the background versus vice-versa). Doubly > annoying is that in stress-testing these implementations, it appears > that using kill(1) to kill the process can occasionally (~1-in-50) > produce an errant unmaskable "Terminated" or "Killed" or "Hangup" > message (depending on which signal is used to do your killing of the > spinner). For example (from testing), sending any one of these signals > can cause premature termination if not trapped: SIGINT SIGTERM SIGPIPE > SIGXCPU SIGXFSZ SIGFPE SIGTRAP SIGABRT SIGSEGV SIGALRM SIGPROF SIGUSR1 > SIGUSR2 SIGHUP SIGVTALRM (NOTE: we're talking about shell scripts here). > > I feel that I've perhaps finally developed the end-all be-all spinner > function (BSD Licensing applies): > > #!/bin/sh > # -*- tab-width: 4 -*- ;; Emacs > # vi: set tabstop=4 :: Vi/ViM > # > ############################################################ COPYRIGHT > # > # Devin Teske (c)2006-2010. All Rights Reserved. > # > # Redistribution and use in source and binary forms, with or without > # modification, are permitted provided that the following conditions > # are met: > # 1. Redistributions of source code must retain the above copyright > # notice, this list of conditions and the following disclaimer. > # 2. Redistributions in binary form must reproduce the above copyright > # notice, this list of conditions and the following disclaimer in the > # documentation and/or other materials provided with the distribution. > # > # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, THE > # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > # DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > # SUCH DAMAGE. > # > ############################################################ GLOBALS > > # Global exit status variables > export SUCCESS=0 > export FAILURE=1 > > ############################################################ FUNCTIONS > > # eval_spin $command [ $args ... ] > # > # Execute a command while displaying a rotating spinner. > # I've been refining this... UPDATE: Fix `eval_spin ...' to work with compound statements, such as `eval_spin "sleep 1; sleep 2; sleep 3"' UPDATE: Fix `eval_spin < /dev/null 2>&1 echo $? else # Take commands from standard input ( eval "$( cat )" ) > /dev/null 2>&1 echo $? fi ) | ( n=1 spin="/-\\|" DONE= printf " " while [ ! "$DONE" ]; do DONE=$( /bin/sh -c 'read -t 0 DONE; echo $DONE' ) printf "\b%s" $( echo "$spin" | sed -e \ "s/.\{0,$(( $n % ${#spin} ))\}\(.\).*/\1/" ) n=$(( $n + 1 )) done printf "\b \b" exit $DONE ) } > > ############################################################ MAIN SOURCE > > eval_spin "$@" > > ################################################################################ > # END > ################################################################################ > > And now... for some quick examples of usage... > > ... show-off that we can handle both arguments and stdin ... > > eval_spin sleep 3 > # spins for 3 seconds > > eval_spin << EOF > sleep 3 > EOF > # spins for 3 seconds > > echo sleep 3 | eval_spin > # spins for 3 seconds > > ... show-off that -- since we don't fork -- we can do functions ... > > myfunc(){ sleep 3; } > eval_spin myfunc > # spins for 3 seconds > > ... show-off that we preserve the exit status ... > > eval_spin true > # immediately returns, exit status is zero > > eval_spin false > # immediately returns, exit status is one > > eval_spin 1 > # immediately returns, exit status is 127 (syntax error) > > ... show-off that we support user-generated interrupt signal ... > > eval_spin sleep 100 > # press Ctrl-C... exit status is 130 (interrupted) > > ... show-off our efficiency ... > > time sleep 5 > # Takes 5.003s > time eval_spin sleep 5 > # Takes 5.059s > > ... show that efficiency is retained in ramping-up ... > > time sleep 10 > # Takes 10.004s > time eval_spin sleep 10 > # Takes 10.041s > > ... show that efficiency is key ... > > time eval_spin true > # Takes 0.029s > > ... and you can already see from the code, I don't use kill(1), I don't > use `&', and I don't use background job-control features of the shell. > > The only odd-ball thing you'll find in the code is that I invoke /bin/sh > to use bourne-shell's `read' built-in so that in the event that we are > sourced into another shell (such as bash), we don't end up using that > shells `read' built-in (testing shows that bash's `read' doesn't > function the same with respect to our `-t 0' syntax). Removing the > direct-invocation of /bin/sh does not buy you any significant efficiency > gains (so the portability that the statement gives us was favored). > > We've generalized this function into a central include that we include > into our shell scripts using the `.' built-in. However, if you want to > adapt this for boot-scripts, I can rewrite it to: > > a. Not-use sed(1) (which lives in /usr/bin so isn't available at boot- > time). > b. Not redirect output to /dev/null > c. Replace printf with echo > > Both of which are trivial,... > > To get rid of sed(1), we just need to implement a substr function (BSD > Licensing applies -- same copyright as above)... > > # substr $string $start [ $length ] > # > # Obtain a substring. The starting position may be negative (relative to end) > # or positive (relative to beginning). The length is in bytes to the right of > # the starting position. Returns with failure status on error. > # > substr() > { > local string="$1" start="${2:-0}" len="${3:-0}" > > # Check arguments > [ "$string" ] || return $FAILURE > [ $start -gt ${#string} ] && return $SUCCESS > > # Advance to the starting position > [ ${start} -lt 0 ] && start=$((${#string} + $start)) > [ ${start} -lt 0 ] && start=0 > while [ $start -gt 0 ]; do > string="${string#?}" > start=$(($start - 1)) > done > > # Truncate to the proper length > [ $len -le 0 ] && len=${#string} > while [ ${#string} -gt $len ]; do > string="${string%?}" > done > > echo -n "$string" > } > > In which case, the following sed(1) usage (from above): > > printf "\b%s" $( echo "$spin" | sed -e \ > "s/.\{0,$(( $n % ${#spin} ))\}\(.\).*/\1/" ) > > Becomes instead (also taking care to get rid of printf): > > echo "^H$( substr "$spin" $(($n % ${#spin})) 1 )" > > ... > > Writing a version of eval_spin that is entirely free of all external > dependencies (safe for one exception: /bin/sh) for the purpose of > inclusion into /etc/rc.subr is something that intrigues me. I could > imagine rewriting all of the rc.d scripts to use it... with other > fundamentals to beautify the boot-process. -- Cheers, Devin Teske -> CONTACT INFORMATION <- Business Solutions Consultant II FIS - fisglobal.com 510-735-5650 Mobile 510-621-2038 Office 510-621-2020 Office Fax 909-477-4578 Home/Fax devin.teske@fisglobal.com -> LEGAL DISCLAIMER <- This message contains confidential and proprietary information of the sender, and is intended only for the person(s) to whom it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you have received this message in error, please notify the e-mail sender immediately, and delete the original message without making a copy. -> END TRANSMISSION <- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 12:14:50 2010 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 A3C5F1065674; Fri, 12 Nov 2010 12:14:50 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 894148FC0C; Fri, 12 Nov 2010 12:14:49 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA28444; Fri, 12 Nov 2010 14:14:47 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4CDD2FB7.3000401@freebsd.org> Date: Fri, 12 Nov 2010 14:14:47 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Stanislav Sedov References: <20101110204152.GF85693@acme.spoerlein.net> <20101111145544.GH85693@acme.spoerlein.net> <20101111150801.33afa33b.stas@FreeBSD.org> In-Reply-To: <20101111150801.33afa33b.stas@FreeBSD.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: uqs@spoerlein.net, hackers@freebsd.org, Robert Watson Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? 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, 12 Nov 2010 12:14:50 -0000 on 12/11/2010 01:08 Stanislav Sedov said the following: > On Thu, 11 Nov 2010 15:55:45 +0100 > Ulrich Spörlein mentioned: >> >>> Stas has ongoing work on a libprocstat, you might want to give him a ping. >>> I'm not sure if he plans to refactor some of those existing tools to use that >>> library or not, but crashdump support is a key goal of it. >> >> Thanks for the hint, stas CC'ed and reply-to set. >> > > Yes, the idea was to refactor all base tools > to use libprocstat as well. So far only > procstat(8), fuser and fstat have been converted to use new functionality, so they are able to operate both on coredumps and on the live system. > We still need to commit the libprocstat itself, > though. > Just to let you know that I am eagerly awaiting for that to happen. Perhaps even could help with something if you'd need that. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 13:58:03 2010 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 E01A5106566C; Fri, 12 Nov 2010 13:58:03 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (cl-414.sto-01.se.sixxs.net [IPv6:2001:16d8:ff00:19d::2]) by mx1.freebsd.org (Postfix) with ESMTP id 816908FC2B; Fri, 12 Nov 2010 13:58:03 +0000 (UTC) Received: from sputnik.SpringDaemons.com (static-64-61-167-75.isp.broadviewnet.net [64.61.167.75]) by mx0.deglitch.com (Postfix) with ESMTPA id 1C6338FC53; Fri, 12 Nov 2010 16:58:02 +0300 (MSK) Received: from sputnik.SpringDaemons.com (localhost [127.0.0.1]) by sputnik.SpringDaemons.com (Postfix) with SMTP id 66E63D2B9; Fri, 12 Nov 2010 05:58:12 -0800 (PST) Date: Fri, 12 Nov 2010 05:58:10 -0800 From: Stanislav Sedov To: Andriy Gapon Message-Id: <20101112055810.87e0772a.stas@FreeBSD.org> In-Reply-To: <4CDD2FB7.3000401@freebsd.org> References: <20101110204152.GF85693@acme.spoerlein.net> <20101111145544.GH85693@acme.spoerlein.net> <20101111150801.33afa33b.stas@FreeBSD.org> <4CDD2FB7.3000401@freebsd.org> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprin: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Stanislav Sedov , uqs@spoerlein.net, hackers@freebsd.org, Robert Watson Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? 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, 12 Nov 2010 13:58:04 -0000 On Fri, 12 Nov 2010 14:14:47 +0200 Andriy Gapon mentioned: > Just to let you know that I am eagerly awaiting for that to happen. > Perhaps even could help with something if you'd need that. > Review can certainly help.:-) Can I send you the patch? Thanks! -- Stanislav Sedov ST4096-RIPE From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 14:01:19 2010 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 E56721065672; Fri, 12 Nov 2010 14:01:19 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id BD6B38FC36; Fri, 12 Nov 2010 14:01:18 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA29882; Fri, 12 Nov 2010 16:01:16 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4CDD48AC.9020502@freebsd.org> Date: Fri, 12 Nov 2010 16:01:16 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Stanislav Sedov References: <20101110204152.GF85693@acme.spoerlein.net> <20101111145544.GH85693@acme.spoerlein.net> <20101111150801.33afa33b.stas@FreeBSD.org> <4CDD2FB7.3000401@freebsd.org> <20101112055810.87e0772a.stas@FreeBSD.org> In-Reply-To: <20101112055810.87e0772a.stas@FreeBSD.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: uqs@spoerlein.net, hackers@freebsd.org, Robert Watson Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? 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, 12 Nov 2010 14:01:20 -0000 on 12/11/2010 15:58 Stanislav Sedov said the following: > On Fri, 12 Nov 2010 14:14:47 +0200 > Andriy Gapon mentioned: > >> Just to let you know that I am eagerly awaiting for that to happen. >> Perhaps even could help with something if you'd need that. >> > > Review can certainly help.:-) > > Can I send you the patch? Definitely! -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 14:13:39 2010 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 F3B331065670 for ; Fri, 12 Nov 2010 14:13:38 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp1.one.com (csmtp1.one.com [195.47.247.21]) by mx1.freebsd.org (Postfix) with ESMTP id 899D78FC1C for ; Fri, 12 Nov 2010 14:13:38 +0000 (UTC) Received: from [192.168.0.22] (0x573fa596.cpe.ge-1-1-0-1109.ronqu1.customer.tele.dk [87.63.165.150]) by csmtp1.one.com (Postfix) with ESMTP id F0E5A1BC00AF9; Fri, 12 Nov 2010 14:13:36 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/signed; boundary=Apple-Mail-2047--121112209; protocol="application/pkcs7-signature"; micalg=sha1 From: Erik Cederstrand In-Reply-To: <20101022100134.GL19295@acme.spoerlein.net> Date: Fri, 12 Nov 2010 15:13:36 +0100 Message-Id: <8B6E3E35-68AF-42ED-98CF-E2A4448DAA11@cederstrand.dk> References: <718D8E86-EA2E-4D07-BAFF-5D8D093FD296@cederstrand.dk> <20101011084733.GM2392@deviant.kiev.zoral.com.ua> <95F3B27C-42E6-4267-9965-AC3219310C35@cederstrand.dk> <20101021175748.GD19295@acme.spoerlein.net> <20101022100134.GL19295@acme.spoerlein.net> To: =?iso-8859-1?Q?Ulrich_Sp=F6rlein?= X-Mailer: Apple Mail (2.1081) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Hackers Subject: Re: Deterministic builds? 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, 12 Nov 2010 14:13:39 -0000 --Apple-Mail-2047--121112209 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Den 22/10/2010 kl. 12.01 skrev Ulrich Sp=F6rlein: > Why do you make this a requirement? Of course it's usually easier to > build different releases from different source directories, but I = think > requiring the following conditions are fine: >=20 > 1. If you build a specific svn revision, > 2. sitting in /usr/src with > 3. the default make.conf (ie., no special flags, no frobbing of = OBJDIR) > 4. at different times >=20 > then you get the same binaries. >=20 > Let's start with an achievable, not-so-intrusive goal, right? :) Ok, here's a new attempt with SRCDIR and OBJDIR constant between the two = builds. This time, /boot/kernel/kernel, /boot/loader, /boot/pxeboot and = /boot/zfsloader differ. According to strings(1), the only difference is = the timestamp. E.g. the kernel: < @(#)FreeBSD 9.0-CURRENT #0 r215143: Thu Nov 11 22:58:34 CET 2010 < FreeBSD 9.0-CURRENT #0 r215143: Thu Nov 11 22:58:34 CET 2010 --- > @(#)FreeBSD 9.0-CURRENT #0 r215143: Thu Nov 11 23:29:17 CET 2010 > FreeBSD 9.0-CURRENT #0 r215143: Thu Nov 11 23:29:17 CET 2010 Since the SVN rev. is recorded, I think a timestamp is redundant. Any = ideas where I can disable the timestamps in the source? Also, /usr/bin/[clang|clang++|tblgen] differ, i.e.: 248735,248736c248735,248736 < = N135_GLOBAL__N__usr_home_erik_freebsd_head_src_lib_clang_libllvmcore_.._..= _.._contrib_llvm_lib_VMCore_PrintModulePass.cpp_00000000_E8B12D4D15PrintMo= dulePassE < = N135_GLOBAL__N__usr_home_erik_freebsd_head_src_lib_clang_libllvmcore_.._..= _.._contrib_llvm_lib_VMCore_PrintModulePass.cpp_00000000_E8B12D4D17PrintFu= nctionPassE --- > = N135_GLOBAL__N__usr_home_erik_freebsd_head_src_lib_clang_libllvmcore_.._..= _.._contrib_llvm_lib_VMCore_PrintModulePass.cpp_00000000_BDCFB9C615PrintMo= dulePassE > = N135_GLOBAL__N__usr_home_erik_freebsd_head_src_lib_clang_libllvmcore_.._..= _.._contrib_llvm_lib_VMCore_PrintModulePass.cpp_00000000_BDCFB9C617PrintFu= nctionPassE I'm not sure what to do with this except pass it on to the LLVM lists. Erik= --Apple-Mail-2047--121112209-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 17:59:21 2010 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 001F31065672 for ; Fri, 12 Nov 2010 17:59:20 +0000 (UTC) (envelope-from g.veniamin@googlemail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 81AD38FC15 for ; Fri, 12 Nov 2010 17:59:20 +0000 (UTC) Received: by eyb7 with SMTP id 7so2023915eyb.13 for ; Fri, 12 Nov 2010 09:59:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=F8p2lZP3wxdGoTwuP+0vrs6G/4Am/LTBdwpObXOjALo=; b=P0DwtO/vkNxKb2DFarrK9O/Qi0bYk94gw8TCUbIFLHrlMcJmjeWkJpX0rfjLOdH/U4 7EtmtUzXDEMKXdeC+6931FXnQWa7THaT1RXkgdg1eazV570ucMpigjk37yMr53KuEgiy 8RRv/oOhtdjBI4VbZjdszZ6ssNMge9xl1OxkQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=hilcMs5Dxdn1MxQQ59ijBvvyjKMRiqja0SuZN2CD8yUBoVSvJpvecmxUyFr7o9NQzX nvI5/6TMjtKSjkV45DvvZIEnkMzIp8EW0AMq7szsSphd/YkdA0bdfC4fsCVKHS9/5mac wNJzFhQjPkFNl8vlAT+Dinhp2EyZTQlnlMoMc= Received: by 10.14.53.66 with SMTP id f42mr36647eec.46.1289582894748; Fri, 12 Nov 2010 09:28:14 -0800 (PST) Received: from zlobook.local (zlonet.ru [94.78.205.21]) by mx.google.com with ESMTPS id v56sm3415026eeh.2.2010.11.12.09.28.12 (version=SSLv3 cipher=RC4-MD5); Fri, 12 Nov 2010 09:28:13 -0800 (PST) Message-ID: <4CDD7922.1060105@googlemail.com> Date: Sat, 13 Nov 2010 00:28:02 +0700 From: Veniamin Gvozdikov User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; ru; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: MacBookPro7,1 and FreeBSD 8.1 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, 12 Nov 2010 17:59:21 -0000 Hi everybody. I have the macbook and I tryed install FreeBSD 8.1. But I have froze loading. I have it's: with acpi (default loading) http://img203.imageshack.us/img203/2556/dscn2822u.jpg disable acpi http://img152.imageshack.us/img152/1796/dscn2823.jpg verbose mode (option 5 at the boot menu) http://img822.imageshack.us/img822/8069/dscn2825gm.jpg From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 19:45:12 2010 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 AD28C1065674 for ; Fri, 12 Nov 2010 19:45:12 +0000 (UTC) (envelope-from leonerd@leonerd.org.uk) Received: from cel.leonerd.org.uk (cel.leonerd.org.uk [81.187.167.226]) by mx1.freebsd.org (Postfix) with ESMTP id 335CB8FC25 for ; Fri, 12 Nov 2010 19:45:11 +0000 (UTC) Received: by cel.leo (Postfix, from userid 1000) id 00B7140AA; Fri, 12 Nov 2010 18:40:00 +0000 (GMT) Date: Fri, 12 Nov 2010 18:40:00 +0000 From: Paul LeoNerd Evans To: freebsd-hackers@freebsd.org Message-ID: <20101112184000.GS11110@cel.leo> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IGH6DwWgOn9XAAl6" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Managing userland data pointers in kqueue/kevent 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, 12 Nov 2010 19:45:12 -0000 --IGH6DwWgOn9XAAl6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm trying to build a high-level language wrapper around kqueue/kevent, specifically, a Perl wrapper. (In fact I am trying to fix this bug: http://rt.cpan.org/Public/Bug/Display.html?id=3D61481 ) My plan is to use the void *udata field of a kevent watcher to store a pointer to some user-provided Perl data structure (an SV*), to associate with the event. Typically this could be a code reference for an event callback or similar, but the exact nature doesn't matter. It's a pointer to a reference-counted data structure. SvREFCNT_dec(sv) is the function used to decrement the reference counter. To account for the fact that the kernel stores a pointer here, I'm artificially increasing the reference count on the object, so that it still remains alive even if the rest of the Perl code drops it, to rely on getting it back out of the kernel in an individual kevent. At some point when the kernel has finished looking after the event, this count needs to be decreased again, so the structure can be freed. I am having trouble trying to work out how to do this, or rather, when. I have the following problems: * If the event was registered using EV_ONESHOT, when it gets fired the flags that come back in the event stucture do not include EV_ONESHOT. * Some events can only happen once, such as watching for EVFILT_PROC NOTE_EXIT events. * The kernel can silently drop watches, such as when the process calls close() on a filehandl with an EVFILT_READ or EVFILT_WRITE watch. * There doesn't seem to be a way to query that pointer back out of the kernel, in case the user code wants to EV_DELETE the watch. These problems all mean that I never quite know when I ought to call SvREFCNT_dec() on that pointer. My current best-attack plan looks like the following: a) Store a structure in the void *udata that contains the actual SV* pointer and a flag to remember if the event had been installed as EV_ONESHOT (or remember if it was one of the event types that is oneshot anyway) b) Store an entire mapping in userland from filter+identity to pointer, so that if userland wants to EV_DELETE the watch early, it has the pointer to be able to drop it. I can't think of a solution to the close() problem at all, though. Part a of my solution seems OK (though I'd wonder why the flags back =66rom the kernel don't contain EV_ONESHOT), but part b confuses me. I had thought the point of kqueue/kevent is the O(1) nature of it, which is among why the kernel is storing that void *udata pointer in the first place. If I have to store a mapping from every filter+identity back to my data pointer, why does the kernel store one at all? I could just ignore the udata field and use my mapping for my own purposes. Have I missed something here, then? I was hoping there'd be a nice way for kernel to give me back those pointers so I can just decrement a refcount on it, and have it reclaimed.=20 ----- I have an idea on a small addition to the kernel API that would make this issue much simpler to manage, if there is nothing else. By the addition of a new event flag, called something like EV_FREEWATCH, the kernel can be told "tell userland whenever I am about to drop this event watcher". So now, after a EV_ONESHOT or any of the single events are fired, or when it gets EV_DELETEed, or when the kernel itself drops because of a close() on a filehandle, it can fire an event back up to userland with this flag, passing up the pointer. Now, all userland has to do to correctly manage the memory is to always set that flag on EV_ADD, and if the flag ever comes back in an event out of the kernel, it can SvREFCNT_dec(ev->udata); --=20 Paul "LeoNerd" Evans leonerd@leonerd.org.uk ICQ# 4135350 | Registered Linux# 179460 http://www.leonerd.org.uk/ --IGH6DwWgOn9XAAl6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFM3YoAvLS2TC8cBo0RAm+DAJ9oNPFVkflWdC9klRPPCbiZpLFojQCdGI47 mORHURNKRpQp/6fGEtXrFPM= =uQQJ -----END PGP SIGNATURE----- --IGH6DwWgOn9XAAl6-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 20:30:49 2010 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 7293A1065674 for ; Fri, 12 Nov 2010 20:30:49 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id DE9BC8FC24 for ; Fri, 12 Nov 2010 20:30:48 +0000 (UTC) X-Spam-Status: No X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.5, required 5, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_05 -0.50) X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-ID: oACKKGoV031818 Received: from gkeramidas-glaptop.linux.gr (217-162-216-74.dclient.hispeed.ch [217.162.216.74]) (authenticated bits=0) by igloo.linux.gr (8.14.3/8.14.3/Debian-9.4) with ESMTP id oACKKGoV031818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 12 Nov 2010 22:20:23 +0200 From: Giorgos Keramidas To: Erik Cederstrand In-Reply-To: <8B6E3E35-68AF-42ED-98CF-E2A4448DAA11@cederstrand.dk> (Erik Cederstrand's message of "Fri, 12 Nov 2010 15:13:36 +0100") References: <718D8E86-EA2E-4D07-BAFF-5D8D093FD296@cederstrand.dk> <20101011084733.GM2392@deviant.kiev.zoral.com.ua> <95F3B27C-42E6-4267-9965-AC3219310C35@cederstrand.dk> <20101021175748.GD19295@acme.spoerlein.net> <20101022100134.GL19295@acme.spoerlein.net> <8B6E3E35-68AF-42ED-98CF-E2A4448DAA11@cederstrand.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Date: Fri, 12 Nov 2010 21:20:10 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Ulrich =?iso-8859-1?Q?Sp=F6rlein?= , FreeBSD Hackers Subject: Re: Deterministic builds? 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, 12 Nov 2010 20:30:49 -0000 On Fri, 12 Nov 2010 15:13:36 +0100, Erik Cederstrand = wrote: > Den 22/10/2010 kl. 12.01 skrev Ulrich Sp=F6rlein: >> Why do you make this a requirement? Of course it's usually easier to >> build different releases from different source directories, but I think >> requiring the following conditions are fine: >> >> 1. If you build a specific svn revision, >> 2. sitting in /usr/src with >> 3. the default make.conf (ie., no special flags, no frobbing of OBJDIR) >> 4. at different times >> >> then you get the same binaries. >> >> Let's start with an achievable, not-so-intrusive goal, right? :) > > > Ok, here's a new attempt with SRCDIR and OBJDIR constant between the two = builds. > > This time, /boot/kernel/kernel, /boot/loader, /boot/pxeboot and > /boot/zfsloader differ. According to strings(1), the only difference > is the timestamp. E.g. the kernel: > > < @(#)FreeBSD 9.0-CURRENT #0 r215143: Thu Nov 11 22:58:34 CET 2010 > < FreeBSD 9.0-CURRENT #0 r215143: Thu Nov 11 22:58:34 CET 2010 > --- >> @(#)FreeBSD 9.0-CURRENT #0 r215143: Thu Nov 11 23:29:17 CET 2010 >> FreeBSD 9.0-CURRENT #0 r215143: Thu Nov 11 23:29:17 CET 2010 > > Since the SVN rev. is recorded, I think a timestamp is redundant. Any > ideas where I can disable the timestamps in the source? The timestamp is not 'redundant'. It records _when_ you compiled the sources of the kernel, which in itself is a useful bit of information. We could probably get away with making it an option though, e.g. in src.conf(5) something that defaults to 'yes': WITH_KERNEL_TIMESTAMP=3D'yes' Then if it's the only remaining bit of information that changes between two subsequent builds of precisely the same tree one can set it to 'no' or overload it under WITH_REPEATABLE_BUILDS=3D'yes' or similar. FYI, have a look at "src/conf/newvers.sh" for the place where this information is gathered at kernel-build time. From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 20:35:47 2010 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 1089C106566C; Fri, 12 Nov 2010 20:35:47 +0000 (UTC) (envelope-from dnaeon@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6B3008FC0C; Fri, 12 Nov 2010 20:35:45 +0000 (UTC) Received: by ewy3 with SMTP id 3so603065ewy.13 for ; Fri, 12 Nov 2010 12:35:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=i8W1kRitiisVFnbbUgxEPks5oZB1DcBtdPhrbPik3k8=; b=bk7iE4uH6zRRN116bzf1GMNInWF6xaCEcTpFjrKFXTtMaRfUxdv95tDaRlLN2AKmzX qqe/tiOF0dqwc9v0ZZB/0EEZp2wsKNb0cFjRKy/bzPRj4I6OicvxODu/kTJfpKemPdFm jqvg3cV0C23D38DppKszgb965iQq0+9mL1Pxs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=jb0R2NIWPtbyT4pMkXWby95z/OKpasUXSAp7no5I++DXSjaoeLXgOlcs1pFpEXTfVh MJgKp7v130hxFgkWfrVGroK1sSQS5v3ynUTWg7iFnEkN7RtIoz0CDJDfyBnsMzy+O6mG uRq1m9q8uOaVfyUGbGmWllZA8c7BhwRjJ0M04= MIME-Version: 1.0 Received: by 10.213.114.83 with SMTP id d19mr599677ebq.98.1289594141860; Fri, 12 Nov 2010 12:35:41 -0800 (PST) Received: by 10.213.16.193 with HTTP; Fri, 12 Nov 2010 12:35:41 -0800 (PST) In-Reply-To: References: <4cda516f.CsCJyXi6dA77aINL%perryh@pluto.rain.com> <4cdb86a9.Y2mKBlO3rm15wF2D%perryh@pluto.rain.com> Date: Fri, 12 Nov 2010 22:35:41 +0200 Message-ID: From: Marin Atanasov Nikolov To: perryh@pluto.rain.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Interactive tool for installing packages 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, 12 Nov 2010 20:35:47 -0000 On Thu, Nov 11, 2010 at 9:08 AM, Marin Atanasov Nikolov wrote: > On Thu, Nov 11, 2010 at 8:01 AM, =A0 wrote: >> Marin Atanasov Nikolov wrote: >> >>> If you do not have git installed, you could still get the >>> latest snapshot of pkg_add_it via the Cgit repo. [1] >>> [1] http://git.unix-heaven.org/cgit.cgi/pkg_add_it/ >> >> Aha! =A0I'm sure I looked at that page before posting, but did not see >> how to pull down a snapshot (vs browsing individual files) the first >> time. =A0It seems to have been reorganized since 1.2, as well as having >> grown quite a bit :) >> > > Yep, quite a lot of changes went to 1.3, the program was completely > rewritten and introduced a lot of new features :) > > Most significant changes were: > =A0- own-styled lists were replaced by queue(3) macros, so generally now > everything is dynamic and memory leak-free. > =A0- a lot of new functions dealing with packages, added a configuration = module > =A0- etc... :) > Hello again :) > One thing that can be improved is the recursion introduced by > DEPS_FULL_TREE=3Dtrue, so that dependencies can be found easier and > faster from INDEX, but I'm looking into this already, since I think > that feature is very useful when you need to know the dependencies of > a package in a tree-view. > I spent some time today working on the algorithm for finding package dependencies from INDEX and managed to improve it a lot, so now dependencies are being found in times faster than before (!!) The previous algorithm was recursing over the INDEX file in order to find all dependencies to build a tree-view of the package dependencies, and now only 1 iteration is needed to accomplish this :) Now, only if there was a libpkg ready, then pkg_add_it(1) could be transformed into a standalone install tool, which does not need pkg_add(1) for it's job :) Regards, Marin > Regards, > Marin > > -- > Marin Atanasov Nikolov > > dnaeon AT gmail DOT com > daemon AT unix-heaven DOT org > http://www.unix-heaven.org/ > --=20 Marin Atanasov Nikolov dnaeon AT gmail DOT com daemon AT unix-heaven DOT org http://www.unix-heaven.org/ From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 20:40:59 2010 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 8DBB5106566B for ; Fri, 12 Nov 2010 20:40:59 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id 16AF88FC1B for ; Fri, 12 Nov 2010 20:40:58 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=iBCGAMPDYtSF9sDXX85uHY3wcnYctfVT8vFpe3qPflY= c=1 sm=1 a=CSu41JAXLW0A:10 a=IkcTkHD0fZMA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=p6EGUZYCAAAA:20 a=B_LHE_dpAAAA:20 a=1Yw9oJTAAAAA:20 a=TYkW9fTRee4fKu3c0VoA:9 a=7EJkcC6tYPXxahRc74QA:7 a=z8NL5oJKDiKBUeZyOvGof1HDzvQA:4 a=QEXdDO2ut3YA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 48543063; Fri, 12 Nov 2010 21:30:56 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Fri, 12 Nov 2010 21:31:57 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <4CDD7922.1060105@googlemail.com> In-Reply-To: <4CDD7922.1060105@googlemail.com> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201011122131.57554.hselasky@c2i.net> Cc: Veniamin Gvozdikov Subject: Re: MacBookPro7,1 and FreeBSD 8.1 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, 12 Nov 2010 20:40:59 -0000 On Friday 12 November 2010 18:28:02 Veniamin Gvozdikov wrote: > Hi everybody. > I have the macbook and I tryed install FreeBSD 8.1. But I have froze > loading. > > I have it's: > with acpi (default loading) > http://img203.imageshack.us/img203/2556/dscn2822u.jpg > > disable acpi > http://img152.imageshack.us/img152/1796/dscn2823.jpg > > verbose mode (option 5 at the boot menu) > http://img822.imageshack.us/img822/8069/dscn2825gm.jpg This might be because your model is not listed in a quirk-table: grep -ri macbook /usr/src/sys/amd64 /usr/src/sys/amd64/amd64/machdep.c --HPS From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 22:05:15 2010 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 B1939106566B for ; Fri, 12 Nov 2010 22:05:15 +0000 (UTC) (envelope-from handrix@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6E5BC8FC16 for ; Fri, 12 Nov 2010 22:05:15 +0000 (UTC) Received: by yxe1 with SMTP id 1so170406yxe.13 for ; Fri, 12 Nov 2010 14:05:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=h4WStFzUrDmgeDZ6FiEGxCUOPaixHcRWwkV1V7Llt1Y=; b=NTmG5MYxsQ9LdkdMzaTETA6T/RWtlvBt6ipay8rUzCCnWANMf4aJedJ5knRnLl68mG 18HbgdBMHvOsweJmQHXJeyF9Rnxdt6q6upHADhktLqBY6TBzyRk/yyt+iB3SE+ZZKBgA qzesIX+qIPYoReF91WnJiJrwbkWOr0gwNSaXA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=w7lTrLGKPvOLeIP1Yg/PBEFrPpCoizE7R1BnCGMdt4wLyk2pCcjS6uJMqp/5R32e5N 5/KvsSX4I0aofN4lKQRFcVz2xfCJfQPNNTTpVCPwC81MVu2IPvhqN6lmkv6Vv+eQfvng cqVpMJiMlblr2f/wg/7WjOfUkH2gqNvLyw7og= MIME-Version: 1.0 Received: by 10.100.119.5 with SMTP id r5mr1918289anc.88.1289598110619; Fri, 12 Nov 2010 13:41:50 -0800 (PST) Received: by 10.100.37.6 with HTTP; Fri, 12 Nov 2010 13:41:50 -0800 (PST) Date: Fri, 12 Nov 2010 21:41:50 +0000 Message-ID: From: mezgani ali To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Kernel panic 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, 12 Nov 2010 22:05:15 -0000 Hello, I compiled a custom kernel, and i got this error message : Root mount waiting for: usbbus3 uhub3: 8ports with 8 removable, self powered Trying to mount root from ufs:/dev/ad0s1a ROOT MOUNT ERROR: If you have invalid mount, reboot, and first try i think that i've missed a device in my config file, can you help me with this -- Ali MEZGANI Network Engineering/Security http://securfox.wordpress.com/ From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 23:20:39 2010 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 B29DA106564A for ; Fri, 12 Nov 2010 23:20:39 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 61C218FC13 for ; Fri, 12 Nov 2010 23:20:35 +0000 (UTC) Received: by qyk2 with SMTP id 2so104300qyk.13 for ; Fri, 12 Nov 2010 15:20:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :organization:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=COPpZVegp+BTeAFiOlimiUxYF1hdZ/o5tsgDFwMi/b0=; b=dEH6SVdUyb51U6TIlURBmUh/rd0ZqHdQALPZXbkaWm+nzzgkxYTefVV5j8Jj7AQ0un mOUG2XTNlyug3p3F9z8QS/kcVNTSNKO+kiSD9GFNW2xw6Be8IKcHJhsS8/A5STIg7W+9 RwXck3uyZDD7zywGgfWKCQ4AwLsEinXl02GKg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:organization:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=whPXSped3foGAzkbgD7jLmLU9p0wAR9TRm2f/bOKIxJhosLDlB291tu6yFG45n+s+M CcNAHNrGqkEjr47ywk1ASX9DxTLCZyQ6bAjtSCMEYu3Q8XEO0M8W2v67cbcQcoG1nMG2 U9HAVv8OJGsO6i9AL/vCeY4RuK8oVfnIoaRtk= Received: by 10.224.207.71 with SMTP id fx7mr2690548qab.346.1289604034485; Fri, 12 Nov 2010 15:20:34 -0800 (PST) Received: from centel.dataix.local ([99.181.128.23]) by mx.google.com with ESMTPS id t35sm3445701qco.6.2010.11.12.15.20.31 (version=SSLv3 cipher=RC4-MD5); Fri, 12 Nov 2010 15:20:32 -0800 (PST) Sender: "J. Hellenthal" Message-ID: <4CDDCBB8.6000803@DataIX.net> Date: Fri, 12 Nov 2010 18:20:24 -0500 From: jhell Organization: http://www.DataIX.net User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.12) Gecko/20101028 Lightning/1.0b1 Thunderbird MIME-Version: 1.0 To: mezgani ali References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel panic 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, 12 Nov 2010 23:20:39 -0000 On 11/12/2010 16:41, mezgani ali wrote: > Hello, > > I compiled a custom kernel, and i got this error message : > > Root mount waiting for: usbbus3 > uhub3: 8ports with 8 removable, self powered > Trying to mount root from ufs:/dev/ad0s1a > ROOT MOUNT ERROR: > If you have invalid mount, reboot, and first try > > > i think that i've missed a device in my config file, can you help me with > this > >From the boot prompt you should be able to 'boot kernel.old' and run your old kernel until you figure it out. Good Luck -- jhell,v From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 23:28:15 2010 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 19E28106566B for ; Fri, 12 Nov 2010 23:28:15 +0000 (UTC) (envelope-from handrix@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id C6A6C8FC16 for ; Fri, 12 Nov 2010 23:28:12 +0000 (UTC) Received: by gwj20 with SMTP id 20so1817179gwj.13 for ; Fri, 12 Nov 2010 15:28:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=cuLB0TeihZ6bLwMfbpTcSkgq8hrb/WVkkjxYZE1eUwY=; b=azk+29Gji9jvaHb9/IifJgLk/bFtF4zEuVMx/LXW61qa8ythrdIPc3bIF1wwo0OmdL sBgcOt9rmp/6U+r3+vDJHLG/HruLGUn5Eh3cF0C/L+z/69bZlZB4273gn8HtbPdUhSA/ CeNwUsgwZQscyfyDjaLbiVN0rTEER59zcNMbs= 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=kCr28FYPNkPmZPdLDVUH9QhhEyqDsz++EfU0QUM9sXmpRuJmBXljw+hY1LCIOir8nA sMMw4QhBO7mA7gKqaZPyKsN4UHSf4NVa+egEOuqn075ruj7bnM+e2g4rlvbljdTNBAw6 fbajnEpGUc/se1NxAF3qZaZZBT1c4/aVnLrlo= MIME-Version: 1.0 Received: by 10.100.206.7 with SMTP id d7mr2079235ang.122.1289604492088; Fri, 12 Nov 2010 15:28:12 -0800 (PST) Received: by 10.100.37.6 with HTTP; Fri, 12 Nov 2010 15:28:12 -0800 (PST) In-Reply-To: <4CDDCBB8.6000803@DataIX.net> References: <4CDDCBB8.6000803@DataIX.net> Date: Fri, 12 Nov 2010 23:28:12 +0000 Message-ID: From: mezgani ali To: jhell Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel panic 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, 12 Nov 2010 23:28:15 -0000 Can you tell me on which module depend usbbus and uhub ? On Fri, Nov 12, 2010 at 11:20 PM, jhell wrote: > On 11/12/2010 16:41, mezgani ali wrote: > > Hello, > > > > I compiled a custom kernel, and i got this error message : > > > > Root mount waiting for: usbbus3 > > uhub3: 8ports with 8 removable, self powered > > Trying to mount root from ufs:/dev/ad0s1a > > ROOT MOUNT ERROR: > > If you have invalid mount, reboot, and first try > > > > > > i think that i've missed a device in my config file, can you help me with > > this > > > > From the boot prompt you should be able to 'boot kernel.old' and run > your old kernel until you figure it out. > > Good Luck > > -- > > jhell,v > -- Ali MEZGANI Network Engineering/Security http://securfox.wordpress.com/ From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 13 00:04:29 2010 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 5C88F106564A for ; Sat, 13 Nov 2010 00:04:29 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0C3F28FC12 for ; Sat, 13 Nov 2010 00:04:28 +0000 (UTC) Received: by gyg13 with SMTP id 13so1051184gyg.13 for ; Fri, 12 Nov 2010 16:04:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :organization:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=a0daBrWlz/whFW7qsZ+D85lFF2HCF+9GZcdkTj4Xi58=; b=IwhdXdWcAPSTKfNhafuaHKKKdN9poEhj1U/iR70cHT1kwjSFdeZbHCDK+kY4e0NtIX 3u5HqRAqQIxi3R4NBc/Aecb2Y//qqQlgHS5bW1lQAop/R/Uo4klJSTs/+OdMehErgf2J WftxOxKLs7fVfWdWI906nvaAhduyPvzBmVBrQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:organization:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=gdNBJMkvod2S9VlELY49wW6MF/JGzfvMTXu3Ce8hkF7de83d5gZpdBsptBaoYDzMqK 1WJIIpDh1aK9+4z35RY3CTARTeM6qnJ2kpie4jZFPfNeRYLSivPRrytqwuKN/N4N2vAY z26HHlmoD3xIGEHNX5KTJ931PgM8LSsuHUbMY= Received: by 10.151.142.4 with SMTP id u4mr4820866ybn.266.1289606667400; Fri, 12 Nov 2010 16:04:27 -0800 (PST) Received: from centel.dataix.local (adsl-99-181-128-23.dsl.klmzmi.sbcglobal.net [99.181.128.23]) by mx.google.com with ESMTPS id t9sm1250109ybe.21.2010.11.12.16.04.25 (version=SSLv3 cipher=RC4-MD5); Fri, 12 Nov 2010 16:04:26 -0800 (PST) Sender: "J. Hellenthal" Message-ID: <4CDDD608.9050007@DataIX.net> Date: Fri, 12 Nov 2010 19:04:24 -0500 From: jhell Organization: http://www.DataIX.net User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.12) Gecko/20101028 Lightning/1.0b1 Thunderbird MIME-Version: 1.0 To: mezgani ali References: <4CDDCBB8.6000803@DataIX.net> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel panic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2010 00:04:29 -0000 On 11/12/2010 18:28, mezgani ali wrote: > Can you tell me on which module depend usbbus and uhub ? > > On Fri, Nov 12, 2010 at 11:20 PM, jhell wrote: > >> On 11/12/2010 16:41, mezgani ali wrote: >>> Hello, >>> >>> I compiled a custom kernel, and i got this error message : >>> >>> Root mount waiting for: usbbus3 >>> uhub3: 8ports with 8 removable, self powered >>> Trying to mount root from ufs:/dev/ad0s1a >>> ROOT MOUNT ERROR: >>> If you have invalid mount, reboot, and first try >>> >>> >>> i think that i've missed a device in my config file, can you help me with >>> this >>> >> >> From the boot prompt you should be able to 'boot kernel.old' and run >> your old kernel until you figure it out. >> >> Good Luck >> >> -- >> >> jhell,v >> > > > da, umass, scbus... There in the manual pages. -- jhell,v From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 13 01:19:57 2010 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 55D581065670 for ; Sat, 13 Nov 2010 01:19:57 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id DD2AF8FC08 for ; Sat, 13 Nov 2010 01:19:56 +0000 (UTC) Received: by wyb36 with SMTP id 36so576646wyb.13 for ; Fri, 12 Nov 2010 17:19:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=AcCSQOcKzCK0pfz/Jpkpx9Qk9qch3/BeI2Z2ibKtPgY=; b=KCHFfn3OFFp0aqTeqmCPQTxCUODTAXZM7+PUrQcyze2jWchV5rYvEW8QQmGEvA2dzL YnNiPkMcNs8ZswCyApaNgWqwbVRACoI4eFNxOlv9sF7fDhI2EuX9leQx+N5VPf6gYcPF V8YTd6ZGx2lOQVyPvt0kaqAtVU+GvR1nfuyms= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Zd7SvDXb5oSrD7sCQ/XzLhfs3c246UVBmrhgThKz6sX/O53VprCcDh7DNKikUCXI0i rN1Lc7ukpsn0LdySUCDN3fuMI7amKktMTiCbgU7pkHhZlx+UUUog6jEyFBJv/UOLDG+3 WVQuoAOOI0qOh41bPpwEjEugv5/lBDcXDKWdA= MIME-Version: 1.0 Received: by 10.216.50.134 with SMTP id z6mr3288988web.15.1289611195062; Fri, 12 Nov 2010 17:19:55 -0800 (PST) Received: by 10.216.198.27 with HTTP; Fri, 12 Nov 2010 17:19:55 -0800 (PST) Date: Fri, 12 Nov 2010 17:19:55 -0800 Message-ID: From: Garrett Cooper To: freebsd-hackers@freebsd.org Content-Type: multipart/mixed; boundary=0016e6dd96c72e1bfb0494e501aa Subject: [PATCH] Remove references to ramdisk* in rc.conf(5) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2010 01:19:57 -0000 --0016e6dd96c72e1bfb0494e501aa Content-Type: text/plain; charset=ISO-8859-1 Hi, ramdisk* hasn't been in place for quite a while now (I think since the 5.x days when the mdconfig scripts were created). Could someone please review and potentially commit this manpage update to remove the ramdisk* references from rc.conf(5)? Thanks! -Garrett --0016e6dd96c72e1bfb0494e501aa Content-Type: text/x-patch; charset=US-ASCII; name="remove-ramdisk-references-rc.conf.5.patch" Content-Disposition: attachment; filename="remove-ramdisk-references-rc.conf.5.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ggft4mq11 SW5kZXg6IHNoYXJlL21hbi9tYW41L3JjLmNvbmYuNQo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzaGFyZS9tYW4v bWFuNS9yYy5jb25mLjUJKHJldmlzaW9uIDIxNTE2NikKKysrIHNoYXJlL21hbi9tYW41L3JjLmNv bmYuNQkod29ya2luZyBjb3B5KQpAQCAtNDA4Miw2NSArNDA4Miw2IEBACiAuQmQgLWxpdGVyYWwK IG1kY29uZmlnX21kMF9jbWQ9InRhciB4ZnpDIC92YXIvZmlsZS50Z3ogXGUke19tcH0iCiAuRWQK LS5JdCBWYSByYW1kaXNrX3VuaXRzCi0uUHEgVnQgc3RyCi1BIGxpc3Qgb2Ygb25lIG9yIG1vcmUg cmFtZGlzayB1bml0cyB0byBjb25maWd1cmUgd2l0aAotLlhyIG1kY29uZml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gKLWhhcyBiZWVu IG1vdW50ZWQuCi1Cb3RoIHRoZQotLlhyIG1kIDQKLWRldmljZSBhbmQgdGhlIG1vdW50IHBvaW50 IHdpbGwgYmUgY2hhbmdlZC4KLS5JdCBWYSByYW1kaXNrXyBOcyBBbyBBciBYIEFjIE5zIFZhIF9w ZXJtcwotLlBxIFZ0IHN0cgotQSBtb2RlIHN0cmluZyBwYXNzZWQgdG8KLS5YciBjaG1vZCAxCi1h ZnRlciB0aGUgc3BlY2lmaWVkIHJhbWRpc2sgdW5pdAotLkFyIFgKLWhhcyBiZWVuIG1vdW50ZWQu Ci1Cb3RoIHRoZQotLlhyIG1kIDQKLWRldmljZSBhbmQgdGhlIG1vdW50IHBvaW50IHdpbGwgYmUg Y2hhbmdlZC4KIC5JdCBWYSBhdXRvYnJpZGdlX2ludGVyZmFjZXMKIC5QcSBWdCBzdHIKIFNldCB0 byB0aGUgbGlzdCBvZiBicmlkZ2UgaW50ZXJmYWNlcyB0aGF0IHdpbGwgaGF2ZSBuZXdseSBhcnJp dmluZyBpbnRlcmZhY2VzCg== --0016e6dd96c72e1bfb0494e501aa-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 13 01:52:48 2010 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 AA202106564A for ; Sat, 13 Nov 2010 01:52:48 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.freebsd.org (Postfix) with ESMTP id 382DB8FC0A for ; Sat, 13 Nov 2010 01:52:47 +0000 (UTC) Received: (qmail 24331 invoked by uid 399); 13 Nov 2010 01:52:47 -0000 Received: from localhost (HELO doug-optiplex.ka9q.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 13 Nov 2010 01:52:47 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4CDDEF6C.40401@FreeBSD.org> Date: Fri, 12 Nov 2010 17:52:44 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101028 Thunderbird/3.1.6 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: In-Reply-To: X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] Remove references to ramdisk* in rc.conf(5) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2010 01:52:48 -0000 If you want review for rc.d related stuff freebsd-rc@ is your best bet. Meanwhile, this patch is fine, thanks for taking the time to look at it. AFAICS neither 8 nor 7 has this feature either, so feel free to MFC. Doug On 11/12/2010 17:19, Garrett Cooper wrote: > Hi, > ramdisk* hasn't been in place for quite a while now (I think since > the 5.x days when the mdconfig scripts were created). Could someone > please review and potentially commit this manpage update to remove the > ramdisk* references from rc.conf(5)? > Thanks! > -Garrett -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 13 12:42:56 2010 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 0AE3E10656B1 for ; Sat, 13 Nov 2010 12:42:56 +0000 (UTC) (envelope-from mwjpiero@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id D0FAB8FC25 for ; Sat, 13 Nov 2010 12:42:55 +0000 (UTC) Received: by pxi1 with SMTP id 1so805246pxi.13 for ; Sat, 13 Nov 2010 04:42:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:mime-version:subject:date:x-mailer; bh=FL+emCR2SN7tejLiGygBYJ3gzaJZaGxXkgwGrwr+Rt4=; b=x2YzoXpdsVetQQk2P5U4SW9ZXMCLRzNJrt5qs0zQQUU9TavAEg/Uybd7MP89Baq0TV +wFU7ukoURestj9CQ67N8EQm3Ge6E0wfZBG72/Tm0kXFUf6Rf+2PC3Iz/mX8S3TymMhp rdR+pqdSrrZYbo9H4J9qbEz58SNmULOgV5Pqo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:mime-version:subject:date:x-mailer; b=mJhH6Jw2xU9FR3BU+SoEu0RDcIWthg41mmgFogh4FuxoOAPd2F9pCkRrpjQeBZ61SB ymL6arO0bwcE+PgcigHQAg3FF+espVfJzbDfsYanmncdPzDbC8YTCAeQOxQxKNigVVJK +uYOjdGu0J7cSQ1CebF3k9SVP8ojvnCj+8Btk= Received: by 10.142.224.15 with SMTP id w15mr3020267wfg.53.1289650397430; Sat, 13 Nov 2010 04:13:17 -0800 (PST) Received: from [192.168.1.6] ([180.156.173.33]) by mx.google.com with ESMTPS id e14sm5376229wfg.20.2010.11.13.04.13.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 13 Nov 2010 04:13:16 -0800 (PST) Message-Id: From: weijie mao To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v936) Date: Sat, 13 Nov 2010 20:12:55 +0800 X-Mailer: Apple Mail (2.936) Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Hi, about opera error on freebsd8.1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2010 12:42:56 -0000 it occurs the error when the opera exits. The error message is : Can't read kernel memory: :/dev/mem: Permission =20= denied i need help, thanks =E9=9D=9E=E6=B7=A1=E8=96=84=E6=97=A0=E4=BB=A5=E6=98=8E=E5=BF=97=EF=BC=8C=E9= =9D=9E=E5=AE=81=E9=9D=99=E6=97=A0=E4=BB=A5=E8=87=B4=E8=BF=9C From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 13 21:47:47 2010 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 1DCE5106566B for ; Sat, 13 Nov 2010 21:47:47 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id C386F8FC0A for ; Sat, 13 Nov 2010 21:47:46 +0000 (UTC) Received: by qyk2 with SMTP id 2so732887qyk.13 for ; Sat, 13 Nov 2010 13:47:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=SkZggJ+eyjklaPNptRTbIPZC4KsSwzhQnQyuoNSZr5Q=; b=ljUE9jxl3wE4A5fMjTu6SD3zhwi2L4EbKElYN+qUXnAVlknX62Do/CLQ0Q8NIJK/yD zRgZeRUsbNhXAWvIB2wBjtjb+gNPKsYNgCVr/jS5g8WrFLH/mAHlMFMwe1xKBZuBLWvU GptjKVqgKX0s8V9kXye/Jc5+DVFNh926FIRQk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AsRDQp2svCyISA4T/bV27n2ELbgbnG3z+DkDJdrWD+OIETUoVYd9fmIWBdMGoZrCXS tzAt6gvN4ehaeQn+zcc0rHZGfh7CMmjm6/IZEkMM/fdJFDdGPdGPNQ6cvTW619I1FFJb rL7CmKe+FOyzDpgzgEsj2g1ieA6y9OZsRfzvk= MIME-Version: 1.0 Received: by 10.229.91.194 with SMTP id o2mr3434636qcm.250.1289683174378; Sat, 13 Nov 2010 13:19:34 -0800 (PST) Received: by 10.229.229.134 with HTTP; Sat, 13 Nov 2010 13:19:34 -0800 (PST) In-Reply-To: <1289506363.30235.113.camel@localhost.localdomain> References: <1289506363.30235.113.camel@localhost.localdomain> Date: Sat, 13 Nov 2010 19:19:34 -0200 Message-ID: From: "Carlos A. M. dos Santos" To: FreeBSD Hackers Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Devin Teske Subject: Re: Spinner Function for Shell Scripts X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2010 21:47:47 -0000 On Thu, Nov 11, 2010 at 6:12 PM, Devin Teske wrote: > Hi fellow hackers... I come with baring gifts! > > So, just as the subject-line says, ... here's an efficient and robust > spinner function compatible with many shells. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0DONE=3D$( /bin/sh -c 'read= -t 0 DONE; echo $DONE' ) Is this expected to be portable to other operating systems? The dash shell, used as /bin/bash in Ubuntu, does not acept the "-t" argument to the read builtin command. Using /bin/bash solves the problem. From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 13 23:03:30 2010 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 65FD81065672 for ; Sat, 13 Nov 2010 23:03:30 +0000 (UTC) (envelope-from dteske@vicor.com) Received: from postoffice.vicor.com (postoffice.vicor.com [69.26.56.53]) by mx1.freebsd.org (Postfix) with ESMTP id 121168FC14 for ; Sat, 13 Nov 2010 23:03:29 +0000 (UTC) Received: from [71.202.142.31] (port=55485 helo=[192.168.1.93]) by postoffice.vicor.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) (envelope-from ) id 1PHP7x-0002Bf-9c; Sat, 13 Nov 2010 15:03:29 -0800 Mime-Version: 1.0 (Apple Message framework v1081) From: Devin Teske In-Reply-To: Date: Sat, 13 Nov 2010 15:03:18 -0800 Message-Id: <2CCA101F-22FA-4CE2-8F4C-117824CEA104@vicor.com> References: <1289506363.30235.113.camel@localhost.localdomain> To: "Carlos A. M. dos Santos" X-Mailer: Apple Mail (2.1081) X-Scan-Signature: a8ccddc25a85d58455f56c80af70d292 X-Scan-Host: postoffice.vicor.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Hackers Subject: Re: Spinner Function for Shell Scripts X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2010 23:03:30 -0000 On Nov 13, 2010, at 1:19 PM, Carlos A. M. dos Santos wrote: > On Thu, Nov 11, 2010 at 6:12 PM, Devin Teske wrote: >> Hi fellow hackers... I come with baring gifts! >>=20 >> So, just as the subject-line says, ... here's an efficient and robust >> spinner function compatible with many shells. >> DONE=3D$( /bin/sh -c 'read -t 0 DONE; echo = $DONE' ) >=20 > Is this expected to be portable to other operating systems? The dash > shell, used as /bin/bash in Ubuntu, does not acept the "-t" argument > to the read builtin command. Using /bin/bash solves the problem. I was shooting for bourne-shell, but later realized that bash's read = statement functions fundamentally different than bourne's (hence the = direct invocation of /bin/sh). On FreeBSD: $ echo 'Hello' | /bin/sh -c 'read -t 0 DONE; echo $DONE' Hello $ echo 'Hello' | /bin/bash -c 'read -t 0 DONE; echo $DONE' $ echo 'Hello' | /bin/bash -c 'read -t 1 DONE; echo $DONE' Hello $ /bin/bash -c 'read -t 0.5 DONE; echo $DONE' /bin/bash: line 0: read: 0.5: invalid timeout specification As you can see from the above, passing a timeout specification of zero = to bourne-shell has the desired effect... if the stdin file descriptor = has something to offer the read-statement, input will be read up-to the = ending newline. Whereas, you can see that bash's implementation returns = nothing from the read despite data being available. Naturally, one can = get the data into bash's read by using a timeout of one, but that would = be unacceptable to our spinner to rotate the spinner one-quarter spin = each second. Last, the potential work-around of using finer measurements = of time is not allowed. However, this shouldn't be considered a bug, given the following = description of the timeout option in bash's InfoTex manual: `-t TIMEOUT' Cause `read' to time out and return failure if a complete line of input is not read within TIMEOUT seconds. This option has no effect if `read' is not reading input from the terminal or a pipe. Now, compare that with the description from bourne-shell's man-page = (sh(1)): If the -t option is specified and the timeout elapses = before any input is supplied, the read command will return without = assigning any values. The timeout value may optionally be followed = by one of ``s'', ``m'' or ``h'' to explicitly specify seconds, = minutes or hours. If none is supplied, ``s'' is assumed. So, as you can see, bash will timeout if a full line is not received in = the duration specified as the timeout, while bourne-shell will timeout = only if no input is supplied for the same duration. For our purposes, we want bourne-shell's implementation, not bash's (at = least on FreeBSD). I also tested Mac OS X 10.6.1, FreeBSD-8.1, CentOS 4.7, RedHat = Enterprise Linux (RHEL) 4 Nahant Update 4 (U4), and also RHEL4U8. Here's the breakdown for the test of ``read -t 0 LINE; echo $LINE'': Mac OS X 10.6.1: sh: FAIL bash: FAIL RedHat Enterprise Linux (RHEL) 4 Update 4 (U4): sh: FAIL bash: FAIL RedHat Enterprise Linux (RHEL) 4 Update 8 (U8): sh: FAIL bash: FAIL CentOS 4.7: sh: FAIL bash: FAIL FreeBSD-4.8: sh: SUCCEED bash: FAIL FreeBSD-4.11: sh: SUCCEED bash: FAIL FreeBSD-8.1: sh: SUCCEED bash: FAIL This is not so surprising... On all of the above-tested Linux OSes, = /bin/sh is a symbolic link to bash(1). On Mac OS X, /bin/sh is simply a = bash binary (try /bin/sh --version). It's rather unfortunate that bourne-shell has what we need but is not = available on all operating systems since many OSes have started swapping = out bourne-shell for it's younger cousin. Does anyone else happen to know of a portable way to quickly check if = data is available on a given file descriptor? -- Cheers, Devin Teske -> CONTACT INFORMATION <- Business Solutions Consultant II FIS - fisglobal.com 510-735-5650 Mobile 510-621-2038 Office 510-621-2020 Office Fax 909-477-4578 Home/Fax devin.teske@fisglobal.com -> LEGAL DISCLAIMER <- This message contains confidential and proprietary information of the sender, and is intended only for the person(s) to whom it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you have received this message in error, please notify the e-mail sender immediately, and delete the original message without making a copy. -> END TRANSMISSION <-