From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 7 16:43: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 DF3BB106566B for ; Sun, 7 Feb 2010 16:43:42 +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 A0DAE8FC12 for ; Sun, 7 Feb 2010 16:43:42 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 3A39F35A82F; Sun, 7 Feb 2010 17:43:40 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 1FC45228A3; Sun, 7 Feb 2010 17:43:40 +0100 (CET) Date: Sun, 7 Feb 2010 17:43:40 +0100 From: Jilles Tjoelker To: Linda Messerschmidt Message-ID: <20100207164339.GA62016@stack.nl> References: <237c27101002050857r78003779mb41eae44f850829b@mail.gmail.com> <20100205212837.GA43582@dan.emsphone.com> <237c27101002051445m3392115bhf8ed2ae61d56e0fa@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <237c27101002051445m3392115bhf8ed2ae61d56e0fa@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org, Dan Nelson Subject: Re: ps "time" field jumps backward 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 Feb 2010 16:43:43 -0000 On Fri, Feb 05, 2010 at 05:45:01PM -0500, Linda Messerschmidt wrote: > On Fri, Feb 5, 2010 at 4:28 PM, Dan Nelson wrote: > > Ideally, top and ps would total up all > > the per-thread CPU counts when displaying the per-process numbers, but it > > doesn't seem to. > It does seem to total them: > $ ps axHo pid,lwp,time,wchan,comm | awk '$1 == 1647' > 1647 100401 0:00.63 select mysqld > 1647 100466 0:11.08 sigwai mysqld > 1647 100521 0:00.00 ucond mysqld > $ ps axo pid,lwp,time,wchan,comm | awk '$1 == 1647' > 1647 100521 0:11.71 ucond mysqld > But you put me on the right track. I ran both side by side for > awhile, and found that ps/top only sums up those threads that haven't > already exited. I.e., once a thread has exited, it's as if its usage > never happened from the perspective of ps and top's total calculation. > That seems like undesirable behavior, particularly if it conceals > CPU-churning behavior by short-lived threads, but possibly very hard > to change. :( > I wonder if the system accounting records are more accurate? It should not be "very hard" to fix the time field, because the rusage struct is correct. This can be seen in the ^T status line and, after the process has terminated, time, times, ps S. In the kernel code, sys/kern/kern_proc.c, it seems that fill_kinfo_proc_only() puts in the correct ki_runtime using p->p_rux.rux_runtime, but fill_kinfo_aggregate() later overwrites this using the sum of all threads' td->td_runtime. Removing the bogus calculation from fill_kinfo_aggregate() fixes ps(1)'s time field, but not the %cpu field, nor anything in top(1). The latter is because top(1) always requests information about threads and does the same wrong calculation as fill_kinfo_aggregate() internally. Fixing the %cpu field needs changes to the scheduler. The schedulers have functions to propagate CPU usage from terminating child processes and threads, but this seems to affect scheduling decisions only and not the %cpu field. Note that the CPU usage is always charged to the most recently created thread in the process, not necessarily the thread that called or will call fork(), pthread_create(), waitpid() or pthread_join(). If the thread charged to could be selected better, it could be useful to add in the cpu time as well. Index: sys/kern/kern_proc.c =================================================================== --- sys/kern/kern_proc.c (revision 203549) +++ sys/kern/kern_proc.c (working copy) @@ -676,11 +676,9 @@ kp->ki_estcpu = 0; kp->ki_pctcpu = 0; - kp->ki_runtime = 0; FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); kp->ki_pctcpu += sched_pctcpu(td); - kp->ki_runtime += cputick2usec(td->td_runtime); kp->ki_estcpu += td->td_estcpu; thread_unlock(td); } Test program that starts threads that waste about 1 second of cpu time each. #include #include #include #include void * threadfunc(void *unused) { int error; error = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); if (error) errc(1, error, "pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS)"); for (;;) ; } int main(int argc, char *argv[]) { int error; pthread_t td; for (;;) { error = pthread_create(&td, NULL, threadfunc, NULL); if (error != 0) errc(1, error, "pthread_create"); sleep(1); error = pthread_cancel(td); if (error != 0) errc(1, error, "pthread_cancel"); error = pthread_join(td, NULL); if (error != 0) errc(1, error, "pthread_join"); } return 0; } -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 6 16:11:46 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 695E91065670; Sat, 6 Feb 2010 16:11:46 +0000 (UTC) (envelope-from spry@anarchy.in.the.ph) Received: from mail-pz0-f202.google.com (mail-pz0-f202.google.com [209.85.222.202]) by mx1.freebsd.org (Postfix) with ESMTP id 3DD078FC0A; Sat, 6 Feb 2010 16:11:45 +0000 (UTC) Received: by pzk40 with SMTP id 40so5247234pzk.7 for ; Sat, 06 Feb 2010 08:11:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.6.31 with SMTP id 31mr2823826waf.46.1265472705295; Sat, 06 Feb 2010 08:11:45 -0800 (PST) In-Reply-To: <201001130851.42443.jhb@freebsd.org> References: <20100113022149.GF63408@citylink.fud.org.nz> <201001130851.42443.jhb@freebsd.org> Date: Sun, 7 Feb 2010 00:11:45 +0800 Message-ID: From: Mars G Miro To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Mon, 08 Feb 2010 01:25:56 +0000 Cc: freebsd-hackers@freebsd.org, Andrew Thompson Subject: Re: Cross-building amd64->i386 fails at RESCUE 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, 06 Feb 2010 16:11:46 -0000 On Wed, Jan 13, 2010 at 9:51 PM, John Baldwin wrote: > On Tuesday 12 January 2010 9:52:02 pm Mars G Miro wrote: >> On Wed, Jan 13, 2010 at 10:21 AM, Andrew Thompson > wrote: >> > On Wed, Jan 13, 2010 at 09:35:53AM +0800, Mars G Miro wrote: >> >> Hi List! >> >> >> >> =A0 =A0 Has anyone successfully cross-built amd64->i386 in 8.0? I tri= ed >> >> but got these: >> >> http://pastebin.com/f1cafe40d . >> > >> > All the time. You didnt mention how you are doing the build, I use >> > >> > =A0% make buildworld buildkernel TARGET=3Di386 >> > >> >> I did: >> >> setenv =A0MAKEOBJDIRPREFIX /usr/obj-i386 >> setenv =A0TARGET =A0i386 >> setenv =A0TARGET_ARCH =A0 =A0 i386 >> >> then 'make buildworld' in /usr/src > > Can you verify that 'make buildworld TARGET=3Di386' works? =A0If so, can = you > try just setting MAKEOBJDIRPREFIX via setenv (or setting it as an argumen= t to > make)? > I took a stab at this again, and it seems I messed up something before. Apologies for the noise (and the very late reply) > -- > John Baldwin > --=20 cheers mars ----- Stephen Leacock - "I detest life-insurance agents: they always argue that I shall some day die, which is not so." - http://www.brainyquote.com/quotes/authors/s/stephen_leacock.html From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 6 17:24:08 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 0302D106566B for ; Sat, 6 Feb 2010 17:24:08 +0000 (UTC) (envelope-from mail25@bzerk.org) Received: from ei.bzerk.org (tunnel490.ipv6.xs4all.nl [IPv6:2001:888:10:1ea::2]) by mx1.freebsd.org (Postfix) with ESMTP id 87F978FC1C for ; Sat, 6 Feb 2010 17:24:07 +0000 (UTC) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.14.3/8.14.3) with ESMTP id o16HNvtD036591; Sat, 6 Feb 2010 18:23:57 +0100 (CET) (envelope-from mail25@bzerk.org) Received: (from bulk@localhost) by ei.bzerk.org (8.14.3/8.14.3/Submit) id o16HNupI036590; Sat, 6 Feb 2010 18:23:56 +0100 (CET) (envelope-from mail25@bzerk.org) Date: Sat, 6 Feb 2010 18:23:56 +0100 From: Ruben de Groot To: "Julian H. Stacey" Message-ID: <20100206172356.GA36538@ei.bzerk.org> Mail-Followup-To: Ruben de Groot , "Julian H. Stacey" , Kirk McKusick , Christoph Kukulies , freebsd-hackers@freebsd.org References: <201002051905.o15J5A2Z093692@fire.js.berklix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002051905.o15J5A2Z093692@fire.js.berklix.net> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on ei.bzerk.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (ei.bzerk.org [127.0.0.1]); Sat, 06 Feb 2010 18:24:00 +0100 (CET) X-Mailman-Approved-At: Mon, 08 Feb 2010 01:37:42 +0000 Cc: Kirk McKusick , freebsd-hackers@freebsd.org, Christoph Kukulies Subject: Re: our little daemon abused as symbol of the evil 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, 06 Feb 2010 17:24:08 -0000 On Fri, Feb 05, 2010 at 08:05:10PM +0100, Julian H. Stacey typed: > > PS an undefended trade mark loses its right to further defence or some such, > (I'm not a lawyer). It's not a trade mark, is it? It's copyrighted. That's a whole other set of laws. Ruben From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 8 01:43:35 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 0BF7C1065672; Mon, 8 Feb 2010 01:43:35 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id 66E938FC08; Mon, 8 Feb 2010 01:43:34 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,424,1262559600"; d="txt'?scan'208";a="25346414" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 08 Feb 2010 02:43:33 +0100 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id 80EF81B07C0; Mon, 8 Feb 2010 02:43:33 +0100 (CET) Date: Mon, 08 Feb 2010 02:43:27 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=+permail-2010020801432780e26a0b00001d84-a_best01+ Cc: freebsd-hackers@FreeBSD.org Subject: Re: sysutils/cdrkit update 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 Feb 2010 01:43:35 -0000 This is a MIME encoded multipart message. --+permail-2010020801432780e26a0b00001d84-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit oops. should've looked at the Makefile of cdrtools-cjk. it's indeed called cjk-cdrtools. ;) attached is the proper diff. sorry for the extra noise. alex --+permail-2010020801432780e26a0b00001d84-a_best01+ Content-Type: text/plain Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="sysutilscdrkitupdate.patch.txt" LS0tIE1ha2VmaWxlLm5ldwkyMDEwLTAyLTA4IDAyOjM5OjI5LjAwMDAwMDAwMCArMDEwMAorKysg TWFrZWZpbGUJMjAxMC0wMi0wOCAwMjo0MDoyNy4wMDAwMDAwMDAgKzAxMDAKQEAgLTcsNiArNyw3 IEBACiAKIFBPUlROQU1FPQljZHJraXQKIFBPUlRWRVJTSU9OPQkxLjEuOQorUE9SVFJFVklTSU9O PQkxCiBDQVRFR09SSUVTPQlzeXN1dGlscwogTUFTVEVSX1NJVEVTPQlodHRwOi8vY2Rya2l0Lm9y Zy9yZWxlYXNlcy8gXAogCQlodHRwOi8vZGViYnVybi5hbGlvdGguZGViaWFuLm9yZy8KQEAgLTIz LDcgKzI0LDcgQEAKIAkJcGl0Y2hwbGF5LjEgcmVhZG11bHQuMSByZWFkb20uMSB3b2RpbS4xCiBN QU41PQkJZ2VuaXNvaW1hZ2VyYy41CiAKLUNPTkZMSUNUUz0JY2RydG9vbHMtWzAtOV0qIGNqay1j ZHJ0b29scy1bMC05XSoKK0NPTkZMSUNUUz0JY2RydG9vbHMtWzAtOV0qIGNqay1jZHJ0b29scy1b MC05XSogY2RydG9vbHMtZGV2ZWwtWzAtOV0qCiAKIC5pbmNsdWRlIDxic2QucG9ydC5wcmUubWs+ CiAK --+permail-2010020801432780e26a0b00001d84-a_best01+-- From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 8 06:21:20 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 C6B191065676; Mon, 8 Feb 2010 06:21:20 +0000 (UTC) (envelope-from eric@bsded.com) Received: from mail-yw0-f191.google.com (mail-yw0-f191.google.com [209.85.211.191]) by mx1.freebsd.org (Postfix) with ESMTP id 2AD448FC14; Mon, 8 Feb 2010 06:21:20 +0000 (UTC) Received: by ywh29 with SMTP id 29so144213ywh.13 for ; Sun, 07 Feb 2010 22:21:19 -0800 (PST) Received: by 10.100.54.5 with SMTP id c5mr1302121ana.188.1265608469855; Sun, 07 Feb 2010 21:54:29 -0800 (PST) Received: from ?192.168.10.84? (59-125-13-44.HINET-IP.hinet.net [59.125.13.44]) by mx.google.com with ESMTPS id 15sm2664952gxk.4.2010.02.07.21.54.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 07 Feb 2010 21:54:29 -0800 (PST) From: "Eric L. Chen" To: Mars G Miro In-Reply-To: References: <20100113022149.GF63408@citylink.fud.org.nz> <201001130851.42443.jhb@freebsd.org> Content-Type: text/plain; charset="UTF-8" Date: Mon, 08 Feb 2010 13:53:42 +0800 Message-ID: <1265608422.50235.5.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Andrew Thompson Subject: Re: Cross-building amd64->i386 fails at RESCUE 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 Feb 2010 06:21:20 -0000 On Sun, 2010-02-07 at 00:11 +0800, Mars G Miro wrote: > On Wed, Jan 13, 2010 at 9:51 PM, John Baldwin wrote: > > On Tuesday 12 January 2010 9:52:02 pm Mars G Miro wrote: > >> On Wed, Jan 13, 2010 at 10:21 AM, Andrew Thompson > > wrote: > >> > On Wed, Jan 13, 2010 at 09:35:53AM +0800, Mars G Miro wrote: > >> >> Hi List! > >> >> > >> >> Has anyone successfully cross-built amd64->i386 in 8.0? I tried > >> >> but got these: > >> >> http://pastebin.com/f1cafe40d . > >> > > >> > All the time. You didnt mention how you are doing the build, I use > >> > > >> > % make buildworld buildkernel TARGET=i386 > >> > > >> > >> I did: > >> > >> setenv MAKEOBJDIRPREFIX /usr/obj-i386 > >> setenv TARGET i386 > >> setenv TARGET_ARCH i386 > >> > >> then 'make buildworld' in /usr/src > > > > Can you verify that 'make buildworld TARGET=i386' works? If so, can you > > try just setting MAKEOBJDIRPREFIX via setenv (or setting it as an argument to > > make)? > > >From http://wiki.freebsd.org/Wine Set these environment variables may help! # setenv MACHINE i386 # setenv UNAME_p i386 # setenv UNAME_m i386 Eric From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 8 06:55:54 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 65811106566B for ; Mon, 8 Feb 2010 06:55:54 +0000 (UTC) (envelope-from shrivatsan_v@yahoo.com) Received: from web112015.mail.gq1.yahoo.com (web112015.mail.gq1.yahoo.com [67.195.22.82]) by mx1.freebsd.org (Postfix) with SMTP id 37B828FC08 for ; Mon, 8 Feb 2010 06:55:54 +0000 (UTC) Received: (qmail 92657 invoked by uid 60001); 8 Feb 2010 06:55:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1265612153; bh=EDg52Z8S1yVJFP2Xz/i4HzGJkz75lXDME+2jyfKmt0k=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=ylwsY6Kw+v4qJe6dE+zXELjsRAGEiZQb1zBET5VYEeXKzdkGtL7p7MPwpoqK5V8NMUj4aJwUo/o80VWG6QKUy9Iuj84pgxm2Mo03WrWCjYDn6ZZCaBjRvrbyBWVAKXSjyU1Vs7f3lmjSMCGIP/E83wk45Dhm51KHULBoHtu27UM= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=186iugY3CQe7RToXtzk8YWJRys45HP6IuD00YUPTIgaOrRJ4WmKR5wmWvluMJwLEkJydl/CjRxi1m1f/RWUAK3txwHk+ERsa8ccpOYxNvkvkFFGal8iIAxl1ma/wS7N8dAMjSf+SyfFVg2zoe70UPKonK1GSIIIFVExYpx3L3X4=; Message-ID: <780520.92654.qm@web112015.mail.gq1.yahoo.com> X-YMail-OSG: RkK4NsEVM1nmWvxAt2lLVwsxjsO_uIoHoIVw7BsD4xnjFgYFmiaA5h9m0C1STzbxuYWaEwG3jNRXVhFj5YKnAP3ZWs7fbBiM7w6fc9.rcn5b2BVvmDqpXiWDAL8or3KnaPOL6JilxxA.NPh5ZKz2nTjbQl_AxGUNOXOTTcqKEA0_4fv2jCZeu1jbNBqHdd5.cqh2yd3RFwB0PSHyJRecNTMR7Eqn0aA9qdcx75antsr7GyogDc5SFeGTxpPDG710Pu3PkApACx4mBto2kpYbgTvk94tCXajx9e3g0iOuZ5hLWC4Vkxn7wvtZDw-- Received: from [66.129.224.36] by web112015.mail.gq1.yahoo.com via HTTP; Sun, 07 Feb 2010 22:55:53 PST X-Mailer: YahooMailClassic/9.1.10 YahooMailWebService/0.8.100.260964 Date: Sun, 7 Feb 2010 22:55:53 -0800 (PST) From: Shrivats To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Invoking a signal handler 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 Feb 2010 06:55:54 -0000 Hi,=0A =0AI am trying to understand how the kernel invokes the signal handler for = a process, to deliver an asynchronous signal posted by another process.=0A =0AI was looking at the sendsig() function which saves the current user con= text. My question is, when and how does the transition from the kernel mode= to the user mode take place so that the signal handler is invoked?=A0=0A =0A =0AThanks,=0A-shrivatsan=A0=0A=0A=0A From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 8 11:38:11 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 D197B1065672 for ; Mon, 8 Feb 2010 11:38:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2C4E08FC0C for ; Mon, 8 Feb 2010 11:38:10 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o18Bc6qq095493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Feb 2010 13:38:06 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o18Bc63o071460; Mon, 8 Feb 2010 13:38:06 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o18Bc6nL071459; Mon, 8 Feb 2010 13:38:06 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 8 Feb 2010 13:38:06 +0200 From: Kostik Belousov To: Shrivats Message-ID: <20100208113806.GI9991@deviant.kiev.zoral.com.ua> References: <780520.92654.qm@web112015.mail.gq1.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zqjkMoGlbUJ91oFe" Content-Disposition: inline In-Reply-To: <780520.92654.qm@web112015.mail.gq1.yahoo.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org Subject: Re: Invoking a signal handler 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 Feb 2010 11:38:11 -0000 --zqjkMoGlbUJ91oFe Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 07, 2010 at 10:55:53PM -0800, Shrivats wrote: > Hi, >=20 >=20 > I am trying to understand how the kernel invokes the signal handler for a process, to deliver an asynchronous signal posted by another process. > I was looking at the sendsig() function which saves the current user > context. My question is, when and how does the transition from the > kernel mode to the user mode take place so that the signal handler is > invoked?=9A The sendsig() does two things. First, it copies out the currently saved user context to the user stack. Then, it modifies the current context to arrange the call to the signal handler when return to user mode is done. After that, when the thread does usual return from the kernel to user mode, be it return from the interrupt, or syscall, the modified context causes execution to jump to signal trampoline code implanted to the user mode stack by image activator. Trampoline is supplied required data by sendsig() to call signal handler with the right arguments. More, upon return from the signal handler, the trampoline on the stack gets the control again, and calls sigreturn(2) syscall that restores the old, pre-signal context saved by sendsig(). This is the model used on i386/amd64 FreeBSD, and I think that other architectures are quite similar. --zqjkMoGlbUJ91oFe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktv954ACgkQC3+MBN1Mb4hPigCgotuDK/8qFah4QQev0MMIfLHr E8YAn1zUwVqk1cFJAJExMa/QqlttBvsB =6chm -----END PGP SIGNATURE----- --zqjkMoGlbUJ91oFe-- From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 8 12:20:53 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 3D398106566B for ; Mon, 8 Feb 2010 12:20:53 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id BADE88FC0A for ; Mon, 8 Feb 2010 12:20:52 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o18CKXLk035626; Mon, 8 Feb 2010 13:20:49 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o18CKXfL035625; Mon, 8 Feb 2010 13:20:33 +0100 (CET) (envelope-from olli) Date: Mon, 8 Feb 2010 13:20:33 +0100 (CET) Message-Id: <201002081220.o18CKXfL035625@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, mail25@bzerk.org In-Reply-To: <20100206172356.GA36538@ei.bzerk.org> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 08 Feb 2010 13:20:49 +0100 (CET) Cc: Subject: Re: our little daemon abused as symbol of the evil X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, mail25@bzerk.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Feb 2010 12:20:53 -0000 Ruben de Groot wrote: > On Fri, Feb 05, 2010 at 08:05:10PM +0100, Julian H. Stacey typed: > > PS an undefended trade mark loses its right to further defence or some such, > > (I'm not a lawyer). > > It's not a trade mark, is it? It's copyrighted. That's a whole other set of laws. On the bottom of this page ... http://www.freebsd.org/art.html .. the text states that Marshall Kirk McKusick is the trademark holder for the BSD Daemon image. However, on another page (I don't have the URL right now) it says that Kirk owns the copyright of the daemon. I guess one of the web pages needs to be corrected, but I don't know which one. :-) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "A language that doesn't have everything is actually easier to program in than some that do." -- Dennis M. Ritchie From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 8 16:25: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 8F6191065670 for ; Mon, 8 Feb 2010 16:25:57 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from server505.appriver.com (server505b.appriver.com [98.129.35.5]) by mx1.freebsd.org (Postfix) with ESMTP id 57A388FC1F for ; Mon, 8 Feb 2010 16:25:56 +0000 (UTC) X-Policy: GLOBAL - maxiscale.com X-Primary: psteele@maxiscale.com X-Note: This Email was scanned by AppRiver SecureTide X-ALLOW: psteele@maxiscale.com ALLOWED X-Virus-Scan: V- X-Note: Spam Tests Failed: X-Country-Path: UNITED STATES->UNITED STATES->UNITED STATES X-Note-Sending-IP: 98.129.23.15 X-Note-Reverse-DNS: ht02.exg5.exghost.com X-Note-WHTLIST: psteele@maxiscale.com X-Note: User Rule Hits: X-Note: Global Rule Hits: G173 G174 G175 G176 G180 G181 G192 G279 X-Note: Encrypt Rule Hits: X-Note: Mail Class: ALLOWEDSENDER X-Note: Headers Injected Received: from [98.129.23.15] (HELO ht02.exg5.exghost.com) by server505.appriver.com (CommuniGate Pro SMTP 5.3.2) with ESMTPS id 22977067 for freebsd-hackers@freebsd.org; Mon, 08 Feb 2010 10:25:55 -0600 Received: from mbx03.exg5.exghost.com ([169.254.1.200]) by ht02.exg5.exghost.com ([98.129.23.15]) with mapi; Mon, 8 Feb 2010 10:25:55 -0600 From: Peter Steele To: "freebsd-hackers@freebsd.org" Date: Mon, 8 Feb 2010 10:25:54 -0600 Thread-Topic: How can I force boot from alternate drive with boot.config? Thread-Index: Acqo22L7q5/YRyUHSNqycmP3yXxeJA== Message-ID: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2699@MBX03.exg5.exghost.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: How can I force boot from alternate drive with boot.config? 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 Feb 2010 16:25:57 -0000 I've asked this on the -questions list but haven't had any feedback. I have= a system configured with multiple identical drives each loaded with FreeBS= D. When I was using MBR partitioning, I could create a boot.config to force= the system to boot from a specific drive. For example, if I wanted to boot= from the second drive, I'd create a boot.config with: 1:ad(1,a)/boot/loader We've switched to GPT partitioning and I can't seem to find a way to do thi= s same trick. The boot loader only seems to recognize MBR partitions when i= t comes to this feature. I looked at the boot.c source code and there doesn= 't seem to be anything specifically related to GPT partitioning. I cannot f= or example say something like: 1:ad(1,p3)/boot/loader where p3 is the root partition in my GPT partitioned drives. So I'm puzzled= : If I have a two drive system with BSD loaded on both drives and the drive= s are configured with GPT partitions, how can I force the system to boot fr= om the second drive using boot.config? From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 8 17:56:26 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 5411E1065670 for ; Mon, 8 Feb 2010 17:56:26 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [IPv6:2001:4200:7000:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 82F908FC08 for ; Mon, 8 Feb 2010 17:56:25 +0000 (UTC) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id B50DE3982D; Mon, 8 Feb 2010 19:56:21 +0200 (SAST) Date: Mon, 8 Feb 2010 19:56:21 +0200 From: John Hay To: Peter Steele Message-ID: <20100208175621.GA43054@zibbi.meraka.csir.co.za> References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2699@MBX03.exg5.exghost.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2699@MBX03.exg5.exghost.com> User-Agent: Mutt/1.4.2.3i Cc: "freebsd-hackers@freebsd.org" Subject: Re: How can I force boot from alternate drive with boot.config? 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 Feb 2010 17:56:26 -0000 On Mon, Feb 08, 2010 at 10:25:54AM -0600, Peter Steele wrote: > I've asked this on the -questions list but haven't had any feedback. I have a system configured with multiple identical drives each loaded with FreeBSD. When I was using MBR partitioning, I could create a boot.config to force the system to boot from a specific drive. For example, if I wanted to boot from the second drive, I'd create a boot.config with: > > > > 1:ad(1,a)/boot/loader > > > > We've switched to GPT partitioning and I can't seem to find a way to do this same trick. The boot loader only seems to recognize MBR partitions when it comes to this feature. I looked at the boot.c source code and there doesn't seem to be anything specifically related to GPT partitioning. I cannot for example say something like: > > > > 1:ad(1,p3)/boot/loader > > > > where p3 is the root partition in my GPT partitioned drives. So I'm puzzled: If I have a two drive system with BSD loaded on both drives and the drives are configured with GPT partitions, how can I force the system to boot from the second drive using boot.config? > I use: ad(0p3)/boot/loader John -- John Hay -- jhay@meraka.csir.co.za / jhay@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 8 18:13:23 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 235DA1065697 for ; Mon, 8 Feb 2010 18:13:23 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from server505.appriver.com (server505b.appriver.com [98.129.35.5]) by mx1.freebsd.org (Postfix) with ESMTP id DF69C8FC2A for ; Mon, 8 Feb 2010 18:13:22 +0000 (UTC) X-Policy: GLOBAL - maxiscale.com X-Policy: GLOBAL - maxiscale.com X-Primary: psteele@maxiscale.com X-Note: This Email was scanned by AppRiver SecureTide X-ALLOW: psteele@maxiscale.com ALLOWED X-Virus-Scan: V- X-Note: Spam Tests Failed: X-Country-Path: UNITED STATES->UNITED STATES->UNITED STATES X-Note-Sending-IP: 98.129.23.14 X-Note-Reverse-DNS: ht01.exg5.exghost.com X-Note-WHTLIST: psteele@maxiscale.com X-Note: User Rule Hits: X-Note: Global Rule Hits: G173 G174 G175 G176 G180 G181 G192 G279 X-Note: Encrypt Rule Hits: X-Note: Mail Class: ALLOWEDSENDER X-Note: Headers Injected Received: from [98.129.23.14] (HELO ht01.exg5.exghost.com) by server505.appriver.com (CommuniGate Pro SMTP 5.3.2) with ESMTPS id 23008555; Mon, 08 Feb 2010 12:13:28 -0600 Received: from mbx03.exg5.exghost.com ([169.254.1.200]) by ht01.exg5.exghost.com ([98.129.23.14]) with mapi; Mon, 8 Feb 2010 12:13:21 -0600 From: Peter Steele To: John Hay Date: Mon, 8 Feb 2010 12:13:20 -0600 Thread-Topic: How can I force boot from alternate drive with boot.config? Thread-Index: Acqo6Ap+k6JqDrDTSvOH0vhjTbZCCwAAi/DA Message-ID: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2775@MBX03.exg5.exghost.com> References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2699@MBX03.exg5.exghost.com> <20100208175621.GA43054@zibbi.meraka.csir.co.za> In-Reply-To: <20100208175621.GA43054@zibbi.meraka.csir.co.za> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "freebsd-hackers@freebsd.org" Subject: RE: How can I force boot from alternate drive with boot.config? 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 Feb 2010 18:13:23 -0000 > I use: ad(0p3)/boot/loader So, more precisely, if I wanted to boot from drive 1, I'd use this? 1:ad(1p3)/boot/loader From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 8 19:35: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 D051A1065679 for ; Mon, 8 Feb 2010 19:35:42 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [IPv6:2001:4200:7000:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 644108FC17 for ; Mon, 8 Feb 2010 19:35:42 +0000 (UTC) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id AF0F43982B; Mon, 8 Feb 2010 21:35:40 +0200 (SAST) Date: Mon, 8 Feb 2010 21:35:40 +0200 From: John Hay To: Peter Steele Message-ID: <20100208193540.GA53234@zibbi.meraka.csir.co.za> References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2699@MBX03.exg5.exghost.com> <20100208175621.GA43054@zibbi.meraka.csir.co.za> <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2775@MBX03.exg5.exghost.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2775@MBX03.exg5.exghost.com> User-Agent: Mutt/1.4.2.3i Cc: "freebsd-hackers@freebsd.org" Subject: Re: How can I force boot from alternate drive with boot.config? 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 Feb 2010 19:35:42 -0000 On Mon, Feb 08, 2010 at 12:13:20PM -0600, Peter Steele wrote: > > I use: ad(0p3)/boot/loader > > So, more precisely, if I wanted to boot from drive 1, I'd use this? > > 1:ad(1p3)/boot/loader Yes, unless there are more bugs hiding. :-) I fixed a few in August last year. John -- John Hay -- jhay@meraka.csir.co.za / jhay@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 8 22:16: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 B07F71065676 for ; Mon, 8 Feb 2010 22:16:21 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id 205528FC23 for ; Mon, 8 Feb 2010 22:16:20 +0000 (UTC) Received: from park.js.berklix.net (p549A69E7.dip.t-dialin.net [84.154.105.231]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id o18MGEiS085669; Mon, 8 Feb 2010 22:16:15 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id o18MG6va006455; Mon, 8 Feb 2010 23:16:06 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id o18MFtQN009973; Mon, 8 Feb 2010 23:16:05 +0100 (CET) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201002082216.o18MFtQN009973@fire.js.berklix.net> To: freebsd-hackers@freebsd.org, mail25@bzerk.org From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Mon, 08 Feb 2010 13:20:33 +0100." <201002081220.o18CKXfL035625@lurza.secnetix.de> Date: Mon, 08 Feb 2010 23:15:55 +0100 Sender: jhs@berklix.com Cc: Subject: Re: our little daemon abused as symbol of the evil 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 Feb 2010 22:16:21 -0000 Oliver Fromme wrote: > Ruben de Groot wrote: > > On Fri, Feb 05, 2010 at 08:05:10PM +0100, Julian H. Stacey typed: > > > PS an undefended trade mark loses its right to further defence or some such, > > > (I'm not a lawyer). > > > > It's not a trade mark, is it? It's copyrighted. That's a whole other set of laws. > > On the bottom of this page ... > > http://www.freebsd.org/art.html Nice page :-) > . the text states that Marshall Kirk McKusick is the > trademark holder for the BSD Daemon image. > However, on another page (I don't have the URL right > now) it says that Kirk owns the copyright of the daemon. > > I guess one of the web pages needs to be corrected, > but I don't know which one. :-) > > Best regards > Oliver I asked someone who registers trademarks as part of her job: One can apply to register a trademark in {(my (Julian) brackets) at least all of} Germany Britain America {etc}. She spoke of an international form where one ticks the countries one wants {to apply to}. I recall there's initial & recuring fees (& admin) on getting & renewing trademarks. So questions could be: Has Kirk (or A.N.Other) registered it [which, what] as a trademark ? In which countries ? When ? URLs please. Have they already/ when will they expire Whose crontab file reminder who Kirk ? to pay renewal fees [to which countries] ? I guess if Kirk didn't/ doesn't want that [future] bother, it's the sort of thing [Free]BSD Foundation might handle ? (Assuming that [Free] bit doesn't provoke Net Open Dragon PC etc BSD who also use the BSD daemon. Occasionaly (eg with Disney graphics ?) one sees some mark under the graphic. Might it be wise to have a tiny C. symbol or other text under the graphic's feet ? (A question for a trademark specialist, Bcc'd :-) Editing an ASCII readable copyright string into eg a .gif image is probably not a bad idea too. Kirk wrote Fri, 05 Feb 2010 11:19:39 -0800 (20:19 CET) > I have gotten word from the authors that they are aware of the > problem and are correcting it (e.g., taking out the daemon). Mon Feb 8 20:48:01 CET 2010 (TZ=GMT+01:00) http://www.iseclab.org/papers/sonda-TR.pdf Page 4 BSD graphic is no longer present, replaced by word "Attacker". Firefox graphic is no longer present, replaced by word "Victim" Cheers, Julian -- Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail plain text not quoted-printable, HTML or Base64 http://www.asciiribbon.org From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 07:17: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 61A981065670 for ; Tue, 9 Feb 2010 07:17:16 +0000 (UTC) (envelope-from shrivatsan_v@yahoo.com) Received: from web112012.mail.gq1.yahoo.com (web112012.mail.gq1.yahoo.com [67.195.22.79]) by mx1.freebsd.org (Postfix) with SMTP id 343F88FC21 for ; Tue, 9 Feb 2010 07:17:15 +0000 (UTC) Received: (qmail 94020 invoked by uid 60001); 9 Feb 2010 07:17:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1265699835; bh=yrDxiTXu1PZok6DrrKLsxVqevCz6mR+vBcwsrDTbsbQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=nt6DEIfCXv1FVcf2skFB8TIx2d5SGS5YYlBYcE3U+NgHDcyoLySBAQ0QhXLHFFckCIp9+9o13W8wD5vxbJClOvYwHxMOl3u0jWJJyZwz0dNd6JFrFjY1Hew7NQqhXmCI6ZsJoTnUDhiLhn7eWlRCWsgSQhxZA9KaqUlHD2+/Or4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=blLuZHNLRaB0MOsmTKaKvbRgEbnupqPLcAQ7r/XdIfQRbAlkklo5jZXcXs1eCl83RXrsMaOL9Q6BPEy4Y/OE3X8vZPYiPfN3ktJXpH8yfZcgv7cwdgrC1T2iJusfSR5clXgTd7pP2MWeuAqRxKMtK4JPMV6o44M8rpl+hPnWkO8=; Message-ID: <769391.93146.qm@web112012.mail.gq1.yahoo.com> X-YMail-OSG: GvpB94oVM1nnsC1Xf7VLIoYqqZZHeUlTFoSF9zxY1oI9b4l8Hw7qWNnJEw0pK8exWbviGcpj47wT9dMwQFktgw.63tXJCCPibzbbOAjsQzvw75XAYErvwm5tahb6RNiZQgKA6rbYAvi_7YYzvl53FRWa3VKynVFXBkvAkb7jDUhoLtXArEet0HYzWz9YBJWzSthpFOavTIu6rbzuoV1nLqtn3iH02mzZMma4CNrEjHL5HwuOCQidcorQgzyOgKjU.RIfOY44jvRAIJb4c3VC Received: from [66.129.224.36] by web112012.mail.gq1.yahoo.com via HTTP; Mon, 08 Feb 2010 23:17:15 PST X-Mailer: YahooMailClassic/9.1.10 YahooMailWebService/0.8.100.260964 Date: Mon, 8 Feb 2010 23:17:15 -0800 (PST) From: Shrivats To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Invoking a signal handler 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 Feb 2010 07:17:16 -0000 Hi, I am trying to understanding how the kernel invokes a signal handler for a = currently executing process, to deliver an asynchronous signal posted by an= other process. I was looking at the sendsig() function which saves the=A0=0A=0A=0A From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 08:26: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 7A720106568B for ; Tue, 9 Feb 2010 08:26:48 +0000 (UTC) (envelope-from shrivatsan_v@yahoo.com) Received: from web112020.mail.gq1.yahoo.com (web112020.mail.gq1.yahoo.com [67.195.22.87]) by mx1.freebsd.org (Postfix) with SMTP id 502AD8FC0A for ; Tue, 9 Feb 2010 08:26:48 +0000 (UTC) Received: (qmail 26495 invoked by uid 60001); 9 Feb 2010 08:26:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1265704007; bh=omd1uu4WyVudNfVYlvRZ1gzowsPxBTO7Iqq4R8fCo8s=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=kR+StaZm6rT8sS3ogvHkVk71aENUr84fTUFA6AmVcZICUOzhnPBk2q6KnDCdP2vTgW36+iRGhu63CA72+7HSSeRnv8pkFagY51PndVD220G4E0sHFGlXMZZ++KD9l+r44eVtP6qG/UhRt4I3QCKrT9/MC+D+iULLyVFOmhwzG3g= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=cItn3Hhotg5DRCBHJss9m7R1UbQbBLNVDM2jU6SFQMphW7q0TQ3EJ6/vzZ63TXLS3Fmv6HbYIcvb5TgthYe6oSWHe9FyzdwsWFFCZp0hBwv1d2as0G8FJegYqFBvO8Ky7eDUnBC029yYX1KXUquCYDSgCBYNxGnPTFDOoIkVoRw=; Message-ID: <737187.21385.qm@web112020.mail.gq1.yahoo.com> X-YMail-OSG: kEDHNqwVM1lmAUthUmcOVNKFvkjIPcNkFQ_7Oo3ObITk7Y.CZ0SzP2L7KdKkTjLRyD68XcsWZlYkF3D2nm07Fp.uwpWK4MeIe4AHvLuWx1aX9sMl_BvZKHeI08v6EPMCD03333UqxIc_2IW59PE9rlD4s82l1_3vtCCEhFCFMA9bGik1zUMjc6kTu0.KVuA7f_cWO0RchzUBGKjU8LlMsTr9j4_9M6Fg439_wfIHGSjcEi5W2wUiBZzsTZN0LpZBRhZqzI6FCorDLE9AuwuvlQVYQR5NL7f2livud07Oel1bqCgGDCQdghv33FHlueQM5Tyg_CaVjZ3bD1ooxIhcxGhU.A-- Received: from [66.129.224.36] by web112020.mail.gq1.yahoo.com via HTTP; Tue, 09 Feb 2010 00:26:47 PST X-Mailer: YahooMailClassic/9.1.10 YahooMailWebService/0.8.100.260964 Date: Tue, 9 Feb 2010 00:26:47 -0800 (PST) From: Shrivats To: freebsd-hackers@freebsd.org In-Reply-To: <769391.93146.qm@web112012.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Invoking a signal handler 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 Feb 2010 08:26:48 -0000 This wasn't meant to be sent, not sure what the problem was. Please ignore = this e-mail.=A0Kostik had answered my question yesterday.=A0 Thanks,-shrivatsan --- On=A0=A0Tue, 2/9/10, Shrivats wrote: From: Shrivats Subject: Invoking a signal handler To: freebsd-hackers@freebsd.org Date: Tuesday, February 9, 2010, 2:17 AM Hi, I am trying to understanding how the kernel invokes a signal handler for a = currently executing process, to deliver an asynchronous signal posted by an= other process. I was looking at the sendsig() function which saves the=A0 _______________________________________________ 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" =0A=0A=0A From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 12:27: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 08C0A1065672 for ; Tue, 9 Feb 2010 12:27:18 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id BEE1A8FC12 for ; Tue, 9 Feb 2010 12:27:17 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 8C28A1FFC22; Tue, 9 Feb 2010 12:27:16 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 602F1844A6; Tue, 9 Feb 2010 13:27:16 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Julian H. Stacey" References: <201002082216.o18MFtQN009973@fire.js.berklix.net> Date: Tue, 09 Feb 2010 13:27:16 +0100 In-Reply-To: <201002082216.o18MFtQN009973@fire.js.berklix.net> (Julian H. Stacey's message of "Mon, 08 Feb 2010 23:15:55 +0100") Message-ID: <86eikuk317.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, mail25@bzerk.org Subject: Re: our little daemon abused as symbol of the evil 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 Feb 2010 12:27:18 -0000 "Julian H. Stacey" writes: > I asked someone who registers trademarks as part of her job: > One can apply to register a trademark in {(my (Julian) brackets) at > least all of} Germany Britain America {etc}. She spoke of > an international form where one ticks the countries one > wants {to apply to}. > > I recall there's initial & recuring fees (& admin) on getting & > renewing trademarks. So questions could be: > Has Kirk (or A.N.Other) registered it [which, what] as a > trademark ? In which countries ? When ? URLs please. > Have they already/ when will they expire=20 > Whose crontab file reminder who Kirk ? to pay renewal > fees [to which countries] ? There is no need to register a trademark. Kirk owns the *copyright* to the image, which is valid world-wide at no cost. As the copyright holder, Kirk gets to decide who is and isn't allowed to use the image and for what purpose. I'm tempted to say that those researchers' use of the daemon is a shocking display of lack of respect for intellectual property, if I didn't already know far too well that most scientists are not only completely clueless about IP but do not even understand it when you explain it to them. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 13:57:26 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 5BF87106568B for ; Tue, 9 Feb 2010 13:57:26 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id F0FDC8FC13 for ; Tue, 9 Feb 2010 13:57:25 +0000 (UTC) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o19DvLDe045711 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 9 Feb 2010 14:57:21 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by cicely5.cicely.de (8.14.2/8.14.2) with ESMTP id o19DvFlE025308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Feb 2010 14:57:15 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o19DvFfO087459; Tue, 9 Feb 2010 14:57:15 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o19DvDup087458; Tue, 9 Feb 2010 14:57:13 +0100 (CET) (envelope-from ticso) Date: Tue, 9 Feb 2010 14:57:13 +0100 From: Bernd Walter To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20100209135713.GI81255@cicely7.cicely.de> References: <201002082216.o18MFtQN009973@fire.js.berklix.net> <86eikuk317.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86eikuk317.fsf@ds4.des.no> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-hackers@freebsd.org, "Julian H. Stacey" , mail25@bzerk.org Subject: Re: our little daemon abused as symbol of the evil X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2010 13:57:26 -0000 On Tue, Feb 09, 2010 at 01:27:16PM +0100, Dag-Erling Smørgrav wrote: > "Julian H. Stacey" writes: > > I asked someone who registers trademarks as part of her job: > > One can apply to register a trademark in {(my (Julian) brackets) at > > least all of} Germany Britain America {etc}. She spoke of > > an international form where one ticks the countries one > > wants {to apply to}. > > > > I recall there's initial & recuring fees (& admin) on getting & > > renewing trademarks. So questions could be: > > Has Kirk (or A.N.Other) registered it [which, what] as a > > trademark ? In which countries ? When ? URLs please. > > Have they already/ when will they expire > > Whose crontab file reminder who Kirk ? to pay renewal > > fees [to which countries] ? > > There is no need to register a trademark. Kirk owns the *copyright* to > the image, which is valid world-wide at no cost. As the copyright > holder, Kirk gets to decide who is and isn't allowed to use the image > and for what purpose. There is no copyright in Germany. But there is a protection for the author of arts (called Urheberrecht) for simmilar purpose. I'm not a lawyer, but there are many differences to copyright and I think the main one is that the German system automatically protects without the need to explicitly declare copyright. E.g. there is not need to add copyright lines in sourcecode to prohibit others to republish your code in Germany. Many German authors use copyright only for international purpose or just because they don't know better. Another difference (to my knowledge) is that the author never looses his right (though there are a few rules about age and inheritage) - no matter how much it is spread. The author can't even sell it, all he can do is sell the right to use it. > I'm tempted to say that those researchers' use of the daemon is a > shocking display of lack of respect for intellectual property, if I > didn't already know far too well that most scientists are not only > completely clueless about IP but do not even understand it when you > explain it to them. This is one thing. The other thing is that people use it as avatar pictures or other completely unrelated purpose. You can easily loose copyright and trademarks if you don't care about it, but you don't loose your author rights. Since this is a german magazine it doesn't matter if there is a copyright stamp on it or not and it doesn't matter if it is widespread used or not. They always need to get an agreement from the author - at least if they publish the full art, which they did. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 14:00:55 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 7282E106568B for ; Tue, 9 Feb 2010 14:00:55 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id 06C1F8FC1B for ; Tue, 9 Feb 2010 14:00:54 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,436,1262559600"; d="scan'208";a="295920500" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER05.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 09 Feb 2010 15:00:54 +0100 Received: by ZIVMAILUSER05.UNI-MUENSTER.DE (Postfix, from userid 149459) id E30671B07E7; Tue, 9 Feb 2010 15:00:53 +0100 (CET) Date: Tue, 09 Feb 2010 15:00:53 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: [patch] extending/completing brandelf's OS knowledge 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 Feb 2010 14:00:55 -0000 please note: i've submitted a pr including the patch and a reference to this thread. the pr is bin/143699. cheers. alex From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 14:30: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 810BD1065672 for ; Tue, 9 Feb 2010 14:30:39 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 3D9FF8FC0C for ; Tue, 9 Feb 2010 14:30:38 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 623471FFC51; Tue, 9 Feb 2010 14:30:37 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 278FA844A6; Tue, 9 Feb 2010 15:30:37 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: ticso@cicely.de References: <201002082216.o18MFtQN009973@fire.js.berklix.net> <86eikuk317.fsf@ds4.des.no> <20100209135713.GI81255@cicely7.cicely.de> Date: Tue, 09 Feb 2010 15:30:37 +0100 In-Reply-To: <20100209135713.GI81255@cicely7.cicely.de> (Bernd Walter's message of "Tue, 9 Feb 2010 14:57:13 +0100") Message-ID: <866366jxbm.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, "Julian H. Stacey" , mail25@bzerk.org Subject: Re: our little daemon abused as symbol of the evil 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 Feb 2010 14:30:39 -0000 Bernd Walter writes: > There is no copyright in Germany. Yes, there is. Germany is signatory to the Berne convention. > I'm not a lawyer, but there are many differences to copyright and I > think the main one is that the German system automatically protects > without the need to explicitly declare copyright. So does copyright. > E.g. there is not need to add copyright lines in sourcecode to prohibit > others to republish your code in Germany. It is not necessary anywhere in the world. It is still a good idea, just like it's a good idea to mark your laptop with indelible ink, even though stealing it is just as illegal if you don't. > Another difference (to my knowledge) is that the author never looses his > right (though there are a few rules about age and inheritage) - no > matter how much it is spread. The same goes for copyright (author's lifetime + 70 years) > The author can't even sell it, all he can do is sell the right to use it. I'm pretty sure there are provisions for "work for hire". > You can easily loose copyright and trademarks if you don't care about > it, but you don't loose your author rights. You can *not* lose copyright through dilution, only trademarks. At worst, you might lose an infringement suit if the defendant can show that you knew about *that particular case* long before you filed suit, but it would not invalidate your copyright, nor would it diminish your standing in other suits against other infringers. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 15:23: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 CBC9D1065670 for ; Tue, 9 Feb 2010 15:23:04 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 593758FC14 for ; Tue, 9 Feb 2010 15:23:03 +0000 (UTC) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o19FMuLd050857 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 9 Feb 2010 16:22:56 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by cicely5.cicely.de (8.14.2/8.14.2) with ESMTP id o19FMi0d028271 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Feb 2010 16:22:44 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o19FMivU088275; Tue, 9 Feb 2010 16:22:44 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o19FMiG3088274; Tue, 9 Feb 2010 16:22:44 +0100 (CET) (envelope-from ticso) Date: Tue, 9 Feb 2010 16:22:44 +0100 From: Bernd Walter To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20100209152244.GA88115@cicely7.cicely.de> References: <201002082216.o18MFtQN009973@fire.js.berklix.net> <86eikuk317.fsf@ds4.des.no> <20100209135713.GI81255@cicely7.cicely.de> <866366jxbm.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <866366jxbm.fsf@ds4.des.no> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: mail25@bzerk.org, freebsd-hackers@freebsd.org, "Julian H. Stacey" , ticso@cicely.de Subject: Re: our little daemon abused as symbol of the evil X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2010 15:23:05 -0000 On Tue, Feb 09, 2010 at 03:30:37PM +0100, Dag-Erling Smørgrav wrote: > Bernd Walter writes: > > There is no copyright in Germany. > > Yes, there is. Germany is signatory to the Berne convention. Ah - I was misslead by a lawyer, but I think he wasn't refering to copyright as such, but was just making clear about the old US copyright, which is still in the head of many people. Thanks for clearification. > > I'm not a lawyer, but there are many differences to copyright and I > > think the main one is that the German system automatically protects > > without the need to explicitly declare copyright. > > So does copyright. > > > E.g. there is not need to add copyright lines in sourcecode to prohibit > > others to republish your code in Germany. > > It is not necessary anywhere in the world. It is still a good idea, > just like it's a good idea to mark your laptop with indelible ink, even > though stealing it is just as illegal if you don't. > > > Another difference (to my knowledge) is that the author never looses his > > right (though there are a few rules about age and inheritage) - no > > matter how much it is spread. > > The same goes for copyright (author's lifetime + 70 years) > > > The author can't even sell it, all he can do is sell the right to use it. > > I'm pretty sure there are provisions for "work for hire". > > > You can easily loose copyright and trademarks if you don't care about > > it, but you don't loose your author rights. > > You can *not* lose copyright through dilution, only trademarks. > > At worst, you might lose an infringement suit if the defendant can show > that you knew about *that particular case* long before you filed suit, > but it would not invalidate your copyright, nor would it diminish your > standing in other suits against other infringers. > > DES > -- > Dag-Erling Smørgrav - des@des.no > _______________________________________________ > 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" -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 16:05: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 CAD1E1065676 for ; Tue, 9 Feb 2010 16:05:25 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4FD0A8FC12 for ; Tue, 9 Feb 2010 16:05:25 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o19G56Pt006703; Tue, 9 Feb 2010 17:05:21 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o19G55Mg006702; Tue, 9 Feb 2010 17:05:05 +0100 (CET) (envelope-from olli) Date: Tue, 9 Feb 2010 17:05:05 +0100 (CET) Message-Id: <201002091605.o19G55Mg006702@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, des@des.no, ticso@cicely.de In-Reply-To: <866366jxbm.fsf@ds4.des.no> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 09 Feb 2010 17:05:21 +0100 (CET) Cc: Subject: Re: our little daemon abused as symbol of the evil X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, des@des.no, ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2010 16:05:25 -0000 Dag-Erling Smørgrav wrote: > Bernd Walter writes: > > There is no copyright in Germany. > > Yes, there is. Germany is signatory to the Berne convention. That's correct, of course. I think what Bernd actually meant is that Copyright is not the same as the German "Urheberrecht". They have a lot in common, but there are also a few differences. > > The author can't even sell it, all he can do is sell the right to use it. > > I'm pretty sure there are provisions for "work for hire". That's true. When you work as an employee, the "Urheber- recht" is assigned to the employer (the work is created on behalf of the company). When doing contract work, it depends on the type and wording of the contract. Commonly the author retains the "Urheberrecht" but grants exclusive all-encompassing rights to the client. But Bernd is right that you cannot sell your "Urheberrecht" in Germany. You can't even give it away for free. That's why "public domain software" doesn't exist in Germany. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "That's what I love about GUIs: They make simple tasks easier, and complex tasks impossible." -- John William Chambless From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 19:22: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 1F2CA106568B for ; Tue, 9 Feb 2010 19:22:57 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from server505.appriver.com (server505a.appriver.com [98.129.35.4]) by mx1.freebsd.org (Postfix) with ESMTP id D87898FC0A for ; Tue, 9 Feb 2010 19:22:56 +0000 (UTC) X-Policy: GLOBAL - maxiscale.com X-Primary: psteele@maxiscale.com X-Note: This Email was scanned by AppRiver SecureTide X-ALLOW: psteele@maxiscale.com ALLOWED X-Virus-Scan: V- X-Note: Spam Tests Failed: X-Country-Path: UNITED STATES->UNITED STATES->UNITED STATES X-Note-Sending-IP: 98.129.23.45 X-Note-Reverse-DNS: ht03.exg5.exghost.com X-Note-WHTLIST: psteele@maxiscale.com X-Note: User Rule Hits: X-Note: Global Rule Hits: G173 G174 G175 G176 G180 G181 G192 G279 X-Note: Encrypt Rule Hits: X-Note: Mail Class: ALLOWEDSENDER X-Note: Headers Injected Received: from [98.129.23.45] (HELO HT03.exg5.exghost.com) by server505.appriver.com (CommuniGate Pro SMTP 5.3.2) with ESMTPS id 26965310 for freebsd-hackers@freebsd.org; Tue, 09 Feb 2010 13:22:59 -0600 Received: from mbx03.exg5.exghost.com ([169.254.1.200]) by HT03.exg5.exghost.com ([10.242.228.75]) with mapi; Tue, 9 Feb 2010 13:22:55 -0600 From: Peter Steele To: "freebsd-hackers@freebsd.org" Date: Tue, 9 Feb 2010 13:22:53 -0600 Thread-Topic: How can I force boot from alternate drive with boot.config? Thread-Index: Acqo9ezeDVbqj27rRfGZ4C8AIsEEhwACsuJAAC6tTdA= Message-ID: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3849F770@MBX03.exg5.exghost.com> References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2699@MBX03.exg5.exghost.com> <20100208175621.GA43054@zibbi.meraka.csir.co.za> <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2775@MBX03.exg5.exghost.com> <20100208193540.GA53234@zibbi.meraka.csir.co.za> <23F2E2B0457F4046AD8350DAFB86C41130D434E7@MBX03.exg5.exghost.com> In-Reply-To: <23F2E2B0457F4046AD8350DAFB86C41130D434E7@MBX03.exg5.exghost.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: How can I force boot from alternate drive with boot.config? 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 Feb 2010 19:22:57 -0000 >>> So, more precisely, if I wanted to boot from drive 1, I'd use this? >>>=20 >>> 1:ad(1p3)/boot/loader >> >>Yes, unless there are more bugs hiding. :-) I fixed a few in August last = year. > >Well, I'll give it a try and let you know if I find new bugs... :-) I just tried this and it works as advertised--thanks. One question though: = Why does this string list the device number twice? The man page describes i= t as bios_drive:interface(unit,[slice,]part)filename where bios_drive is the "drive number as recognized by the BIOS. 0 for the= first drive, 1 for the second drive, etc.", and unit is the "unit number = of the drive on the interface being used. 0 for the first drive, 1 for the = second drive, etc." This sounds like it's describing the same thing, but not exactly, but I've = always used the same value in both fields and it's always worked. Is there = a case where these values might be different? In the test I just did I boot= ed from the fourth drive of a four drive system using 3:ad(3p4)/boot/loader I know my hardware and knew ad10 mapped to the fourth drive and would be re= ferenced as drive 3 in this context. But how would I determine this generic= ally? For example, given something like /dev/adN, how do I know what number= I'd use for this drive in boot.config? From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 19:58: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 DE9871065692 for ; Tue, 9 Feb 2010 19:58:14 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id 4C7B48FC19 for ; Tue, 9 Feb 2010 19:58:13 +0000 (UTC) Received: from park.js.berklix.net (p549A7B47.dip.t-dialin.net [84.154.123.71]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id o19Jw5Pi006627; Tue, 9 Feb 2010 19:58:06 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id o19Jw2UJ013114; Tue, 9 Feb 2010 20:58:02 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id o19JvlcV028882; Tue, 9 Feb 2010 20:57:52 +0100 (CET) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201002091957.o19JvlcV028882@fire.js.berklix.net> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Tue, 09 Feb 2010 13:27:16 +0100." <86eikuk317.fsf@ds4.des.no> Date: Tue, 09 Feb 2010 20:57:47 +0100 Sender: jhs@berklix.com Cc: freebsd-hackers@freebsd.org, mail25@bzerk.org Subject: Re: our little daemon abused as symbol of the evil 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 Feb 2010 19:58:15 -0000 Hi, Reference: > From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= > Date: Tue, 09 Feb 2010 13:27:16 +0100 > Message-id: <86eikuk317.fsf@ds4.des.no> =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= wrote: > "Julian H. Stacey" writes: > > I asked someone who registers trademarks as part of her job: > > One can apply to register a trademark in {(my (Julian) brackets) at > > least all of} Germany Britain America {etc}. She spoke of > > an international form where one ticks the countries one > > wants {to apply to}. > > > > I recall there's initial & recuring fees (& admin) on getting & > > renewing trademarks. So questions could be: > > Has Kirk (or A.N.Other) registered it [which, what] as a > > trademark ? In which countries ? When ? URLs please. > > Have they already/ when will they expire > > Whose crontab file reminder who Kirk ? to pay renewal > > fees [to which countries] ? > > There is no need to register a trademark. Kirk owns the *copyright* to > the image, which is valid world-wide at no cost. As the copyright > holder, Kirk gets to decide who is and isn't allowed to use the image > and for what purpose. > > I'm tempted to say that those researchers' use of the daemon is a > shocking display of lack of respect for intellectual property, if I > didn't already know far too well that most scientists are not only > completely clueless about IP but do not even understand it when you > explain it to them. > > DES > -- > Dag-Erling Smørgrav - des@des.no > _______________________________________________ > 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" > > Cheers, Julian -- Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail plain text not quoted-printable, HTML or Base64 http://www.asciiribbon.org From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 20:30: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 7102A10656A3 for ; Tue, 9 Feb 2010 20:30:42 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id D30128FC2A for ; Tue, 9 Feb 2010 20:30:41 +0000 (UTC) Received: from park.js.berklix.net (p549A7B47.dip.t-dialin.net [84.154.123.71]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id o19KUZw3006927; Tue, 9 Feb 2010 20:30:36 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id o19KUWvY013297; Tue, 9 Feb 2010 21:30:32 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id o19KUH6Q029299; Tue, 9 Feb 2010 21:30:22 +0100 (CET) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201002092030.o19KUH6Q029299@fire.js.berklix.net> From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Tue, 09 Feb 2010 20:57:47 +0100." <201002091957.o19JvlcV028882@fire.js.berklix.net> Date: Tue, 09 Feb 2010 21:30:17 +0100 Sender: jhs@berklix.com Cc: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= , mail25@bzerk.org, freebsd-hackers@freebsd.org Subject: Re: our little daemon abused as symbol of the evil 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 Feb 2010 20:30:42 -0000 Hi, Sorry, for my last post, editing error jhs@ ------ =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= wrote: > There is no need to register a trademark. Agreed, probably no Need, but there might be some benefit to some commercial interests. > Kirk owns the *copyright* to > the image, which is valid world-wide at no cost. As the copyright > holder, Kirk gets to decide who is and isn't allowed to use the image > and for what purpose. Yes. I assume copyright could preempt a trade mark (& free & avoids renewal hastle ) ... (but if image re-rendered / similar ? ) There's Linux trademarks in Germany (so prob. in others countries), Aktenzeichen/__Wiedergabe____Markenform__Klassen_Aktenzustand_Anmelder Registernummer_der_Marke______________________________________/Inhaber 2050271________Deutsch_______Wort________9,_42___Akte_________Haaga,___ _______________Linux_________Bildmarke___________Vernichtet___Dirk_____ _______________Distribution___________________________________73434____ _______________-_DLD__________________________________________Aalen____ 2088936________LINUX_________Wortmarke___9_______Marke________Torvalds, _________________________________________________eingetragen__Linus,___ ______________________________________________________________Santa____ ______________________________________________________________Clara____ ______________________________________________________________Calif.,US 395190185______SUSE__________Wort/_______9,_42___Marke________SUSE_____ _______________Green_________Bildmarke___________eingetragen__Linux____ _______________Chameleon______________________________________products_ _______________Graphic________________________________________GmbH_____ ______________________________________________________________90409____ ______________________________________________________________Nuernberg Maybe its a statistical thing ? More Linux people & companies, willing to pay for a badging/ marketing angle. Cheers, Julian -- Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail plain text not quoted-printable, HTML or Base64 http://www.asciiribbon.org From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 20:38: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 6F171106566B for ; Tue, 9 Feb 2010 20:38:48 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 3275E8FC0A for ; Tue, 9 Feb 2010 20:38:47 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id ED07F1FFC51; Tue, 9 Feb 2010 20:38:46 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id BAC97844A6; Tue, 9 Feb 2010 21:38:46 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Julian H. Stacey" References: <201002092030.o19KUH6Q029299@fire.js.berklix.net> Date: Tue, 09 Feb 2010 21:38:46 +0100 In-Reply-To: <201002092030.o19KUH6Q029299@fire.js.berklix.net> (Julian H. Stacey's message of "Tue, 09 Feb 2010 21:30:17 +0100") Message-ID: <863a1axhyh.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, mail25@bzerk.org Subject: Re: our little daemon abused as symbol of the evil 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 Feb 2010 20:38:48 -0000 "Julian H. Stacey" writes: > "Dag-Erling Sm=C3=B8rgrav" writes: > > There is no need to register a trademark. > Agreed, probably no Need,=20 > but there might be some benefit to some commercial interests. In this particular case? I'd say it's just a waste of money. > There's Linux trademarks in Germany (so prob. in others countries), > [SUSE chameleon] SUSE is a German company - or was, before they were acquired by Novell, but they still have offices in Germany and do business there. I imagine Novell have registered their various trademarks in all countries in which they do business; I also imagine it costs them millions of dollars a year. Besides, there is a huge difference between a logo for a specific *commercial* product from a specific company on the one hand, and a mascot for a whole family of free-as-in-beer-and-speech systems with no single identifiable owner on the other. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 21:08:23 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 EB903106566C for ; Tue, 9 Feb 2010 21:08:23 +0000 (UTC) (envelope-from brampton@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id 82A788FC17 for ; Tue, 9 Feb 2010 21:08:23 +0000 (UTC) Received: by fxm24 with SMTP id 24so1213983fxm.3 for ; Tue, 09 Feb 2010 13:08:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=p9ETipxjKaYUP72QOYr0Z4MVtLkbcTYFs1vEOswUBAM=; b=i88n1R7i6+xSsi1k/GjPW20jRe10h0c5Na8l3mHcEQwYGJrPGEAUOwD1mT4iyFnk9f gIoVWNotufeSBDTYpFux4Mgl+xCz0QsfslWA0fln3fUOCGWX9EPR/aG7mauQufqPJuIj ZzSVOACidkqW7OkZM+dmx2BiJTjNMC+eHSOHo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=grNMN0VFCTFhbkRwd8E66/zgcMr/hiaaZUNGu3lZ7RAU6dKyuuJgWwDW0r0oe/v2NK ZkvjXcjjw5whjyZwU+hSMA3OS4MPTXeSRh9GaHNrihLnRlBdVpXmuGjzBgEVI0BwTlDM RhICXMjwJLV73oL2K9HTAcvN/3dbor2aufT1Y= MIME-Version: 1.0 Sender: brampton@gmail.com Received: by 10.223.94.204 with SMTP id a12mr836368fan.75.1265749702222; Tue, 09 Feb 2010 13:08:22 -0800 (PST) Date: Tue, 9 Feb 2010 21:08:22 +0000 X-Google-Sender-Auth: 75f370ed1dba2acc Message-ID: From: Andrew Brampton To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Tue, 09 Feb 2010 22:29:15 +0000 Subject: sysctl with regex? 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 Feb 2010 21:08:24 -0000 Today I was writing a script to read all the dev.cpu.?.temperature sysctl OIDs. I was parsing them using a simple grep, but it occurred to me it might be better if sysctl supported some form of regexp. For example instead of typing: sysctl -a | grep dev.cpu.*.temperature I could write: sysctl dev.cpu.*.temperature which would display all the OIDs that match dev.cpu.*.temperature. This is better than grep because when I issue a "sysctl -a" the program retrieves many variables that I am not interested in (which later get filtered by grep). This would in a way be similar to: sysctl dev.cpu which lists all the OIDs under dev.cpu. Is this a feature people would find useful? Or would I be optimising a problem that doesn't exist? Thanks for any input Andrew From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 23:05: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 91F421065701 for ; Tue, 9 Feb 2010 23:05:50 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 55C0C8FC17 for ; Tue, 9 Feb 2010 23:05:50 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 834D21FFC22; Tue, 9 Feb 2010 23:05:49 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 566758449F; Wed, 10 Feb 2010 00:05:49 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Andrew Brampton References: Date: Wed, 10 Feb 2010 00:05:49 +0100 In-Reply-To: (Andrew Brampton's message of "Tue, 9 Feb 2010 21:08:22 +0000") Message-ID: <86tytqvwky.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 23:05:50 -0000 Andrew Brampton writes: > Today I was writing a script to read all the dev.cpu.?.temperature > sysctl OIDs. I was parsing them using a simple grep, but it occurred > to me it might be better if sysctl supported some form of regexp. You mean glob, not regexp... > For example instead of typing: > sysctl -a | grep dev.cpu.*.temperature > > I could write: > sysctl dev.cpu.*.temperature Sounds like a good idea. Shouldn't be too hard to implement either. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 23:28:58 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 611EE106566C for ; Tue, 9 Feb 2010 23:28:58 +0000 (UTC) (envelope-from brampton@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id E767D8FC13 for ; Tue, 9 Feb 2010 23:28:57 +0000 (UTC) Received: by fxm24 with SMTP id 24so60120fxm.3 for ; Tue, 09 Feb 2010 15:28:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=2s4DL1+aLY535z9DvtMz3gNSr5PwrgmV/ImLTX8CSvQ=; b=boTvSr5Elfevqi6o4NetR2SWbhMR04o90Ui9F2DAaPFW1lvazxSeNFX4FN4fYuha4D 8ajLo3G/8XVX+lNTKGNi4t+CNO72NkE0MKKb+RmSI22FpbrGTAbufqjiWbXMAIuA8TGt ew7EjPc2CiwrnlbfeooW1Wmw1kiiasQq/mfpY= 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=NpbxegZRB6jWnAGpziPgOIDL++vndAB6BuXKu7GVpCADa+LPqwf303CaMlB2B+ILoX Q0Nc33WdWxmoY5bQD2yS3tLDL9830hjnxaa7A6wu1rh6oCmt9qO70VaA5d42lyFYtzyH nWAmshohU7a0PRpy/4dIPwxHO3daCn0lXC49g= MIME-Version: 1.0 Sender: brampton@gmail.com Received: by 10.223.64.84 with SMTP id d20mr897701fai.76.1265758133319; Tue, 09 Feb 2010 15:28:53 -0800 (PST) In-Reply-To: <86tytqvwky.fsf@ds4.des.no> References: <86tytqvwky.fsf@ds4.des.no> Date: Tue, 9 Feb 2010 23:28:53 +0000 X-Google-Sender-Auth: eeff3e5638ab58da Message-ID: From: Andrew Brampton To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Tue, 09 Feb 2010 23:34:55 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 23:28:58 -0000 2010/2/9 Dag-Erling Sm=C3=B8rgrav : > Andrew Brampton writes: >> Today I was writing a script to read all the dev.cpu.?.temperature >> sysctl OIDs. I was parsing them using a simple grep, but it occurred >> to me it might be better if sysctl supported some form of regexp. > > You mean glob, not regexp... Could you explain why do I mean glob instead or regexp? Is glob simple matches, ie * and ? and regexp more complex like [a-z]* >> For example instead of typing: >> sysctl -a | grep dev.cpu.*.temperature >> >> I could write: >> sysctl dev.cpu.*.temperature > > Sounds like a good idea. =C2=A0Shouldn't be too hard to implement either. If I get time I might submit a patch. Thanks Andrew From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 00:14: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 8A7E710656D7 for ; Wed, 10 Feb 2010 00:14:16 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.210.172]) by mx1.freebsd.org (Postfix) with ESMTP id 3E4BA8FC08 for ; Wed, 10 Feb 2010 00:14:16 +0000 (UTC) Received: by yxe2 with SMTP id 2so7136948yxe.7 for ; Tue, 09 Feb 2010 16:14:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=XO5a11/sDyKfvypOJj8IO4P2HOXvR/pAMMmn7T430As=; b=xFea3kCPc+lBEzIg+NR+k/uNaEkao21iSFGrvyEmgrIi10+FfLzzqwoRvjWtNKCGQv juRY4tSl0toqHCTKNm3Hc8faICfSsDsn/ku54W0dnomfK+tDVmOF7Hz7VCuhXH4ljBS3 VRg39u0OE/ZmuDkFUHm9pzB/d6Evc0c5CeaIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=hCRy+EW1BHgGArg9q0taSrbmBzRovgQ5eNuclWDvCYZZ5N9zITk4TCIXsKF+NcypLD kWlO7Qt9c1W8vJjeVQLTCA85T/p2O+6MpC/W3sh7TQsdLn4BNXMe/Fw+XBLXOEF63S3n ACR4jGXqNIyRqAZMYaNShfbeVAwo/q0qjJB+Y= Received: by 10.100.1.10 with SMTP id 10mr5317720ana.242.1265760855468; Tue, 09 Feb 2010 16:14:15 -0800 (PST) Received: from dhcp-173-37-1-138.cisco.com (nat.ironport.com [63.251.108.100]) by mx.google.com with ESMTPS id 16sm396296gxk.7.2010.02.09.16.14.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 09 Feb 2010 16:14:14 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=iso-8859-1 From: Garrett Cooper In-Reply-To: Date: Tue, 9 Feb 2010 16:14:12 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> References: <86tytqvwky.fsf@ds4.des.no> To: Andrew Brampton X-Mailer: Apple Mail (2.1077) Cc: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 00:14:16 -0000 On Feb 9, 2010, at 3:28 PM, Andrew Brampton wrote: > 2010/2/9 Dag-Erling Sm=F8rgrav : >> Andrew Brampton writes: >>> Today I was writing a script to read all the dev.cpu.?.temperature >>> sysctl OIDs. I was parsing them using a simple grep, but it occurred >>> to me it might be better if sysctl supported some form of regexp. >>=20 >> You mean glob, not regexp... >=20 > Could you explain why do I mean glob instead or regexp? > Is glob simple matches, ie * and ? > and regexp more complex like [a-z]* C-shell globs as some programming languages referring to it as, i.e. = perl (which this is a subset of the globs concept) allow for expansion = via `*' to be `anything'. Regexp style globs for what you're looking for = would be either .* (greedy) or .+ (non-greedy), with it being most = likely the latter case. >>> For example instead of typing: >>> sysctl -a | grep dev.cpu.*.temperature >>>=20 >>> I could write: >>> sysctl dev.cpu.*.temperature >>=20 >> Sounds like a good idea. Shouldn't be too hard to implement either. >=20 > If I get time I might submit a patch. I'll see if I can whip up a quick patch in the next day or so -- = but before I do that, does it make more sense to do globs or regular = expressions? There are pluses and minuses to each version and would = require some degree of parsing (and potentially escaping). Thanks, -Garrett= From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 00:45:32 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 4DF91106566C for ; Wed, 10 Feb 2010 00:45:32 +0000 (UTC) (envelope-from brampton@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id D12768FC13 for ; Wed, 10 Feb 2010 00:45:31 +0000 (UTC) Received: by fxm24 with SMTP id 24so105871fxm.3 for ; Tue, 09 Feb 2010 16:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=CnUVma0xuVgD2f4jTv2uyw1YIg2wxlI6++Ppw1v9SUk=; b=gvpl8OqcBDdDYHfcQJtEXwo7NrF5JznPFL48302GXXKCqRHPKQ4rNMSYiEQVvRKNqL yuj1mmTRslsveLsYfjtqZ3Z+7hDgCbAGvdqTRlyDN4cUSDzGU4imRnmrvmjf3I1dBV8d ha9B3qAjjUpywVj3Oh456YFx932m1UF9BP2lY= 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=fWmlmLZ7tY7/XVV5arEPB2oh5ZSDE6V4YYo3X33lV55575AFvDBhxnCf76RMBlsePi kc9bCyrkduKnn5QW90m5HOn449dhktNeKJ8QKQXUBcA9JpHNL2Ma2RRmyhH8r8FvTqNY xm+Q2NennTcvQa3IoCvfS6YgOtabCbZWkAp6c= MIME-Version: 1.0 Sender: brampton@gmail.com Received: by 10.223.5.81 with SMTP id 17mr5004802fau.3.1265762730635; Tue, 09 Feb 2010 16:45:30 -0800 (PST) In-Reply-To: <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> Date: Wed, 10 Feb 2010 00:45:30 +0000 X-Google-Sender-Auth: 17827099671df849 Message-ID: From: Andrew Brampton To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= , freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 00:45:32 -0000 On Wed, Feb 10, 2010 at 12:14 AM, Garrett Cooper wrote= : > C-shell globs as some programming languages referring to it as, i.e. perl= (which this is a subset of the globs concept) allow for expansion via `*' = to be `anything'. Regexp style globs for what you're looking for would be e= ither .* (greedy) or .+ (non-greedy), with it being most likely the latter = case. > Ah I understand the difference now. Thanks. > =C2=A0 =C2=A0 =C2=A0 =C2=A0I'll see if I can whip up a quick patch in the= next day or so -- but before I do that, does it make more sense to do glob= s or regular expressions? There are pluses and minuses to each version and = would require some degree of parsing (and potentially escaping). I think going for the simpler glob option might be best. In my earlier example a regex would have problems with all the periods, would it not? Also if I want to match anything I would always forget to write .* instead of just * I was just having a quick look at how to implement this, would it be best to use the fnmatch function? Having a quick browse of the FreeBSD source I found csh_match in /usr.sbin/pkg_install/lib/match.c:L456 which seems to do something similar to what we want. BTW Feel free to implement this, I was going to have a go but I doubt I'd actually get around to it :( Andrew From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 00:48:00 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 BBABA1065670 for ; Wed, 10 Feb 2010 00:48:00 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-yw0-f184.google.com (mail-yw0-f184.google.com [209.85.211.184]) by mx1.freebsd.org (Postfix) with ESMTP id 7099E8FC1D for ; Wed, 10 Feb 2010 00:48:00 +0000 (UTC) Received: by ywh14 with SMTP id 14so812366ywh.28 for ; Tue, 09 Feb 2010 16:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=gobZMM8twj17hqn4N8JfeUVQfnhnXnE+OZ4XTFFnnlM=; b=C2/mnhTbmo5rNfcCQ7/hXrcOnVF9pdKMU6z9o7BRCrOtp+SAuLMNj+/f8J7v4IHizB 055zDhleVUGiVWebKqwb388u5TtUXP8v3/+ihLZBxmJoTjGGM5h2Eh1zDp+lakAMsMnZ ib5hwuRa/t4YrIz9GPMwsojJBMzihlAU2X0zE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=Kr3w5EhVHW82ozFVA3JCg/nAtrVTpxAPAYr3bRKCgsIq/W2wAUML1h6PiSJUr8ydjQ JSCboIV1LyWqn4rQX9hj0RBq5GgWKJrrEpeYNMUCBidwoV5kSuLCFYWhAKhlHt+vLi58 dMLjcurdXMSxu8OrJeTQ4S9oY/htsyq3x2S1c= Received: by 10.150.169.1 with SMTP id r1mr1228412ybe.216.1265762879640; Tue, 09 Feb 2010 16:47:59 -0800 (PST) Received: from dhcp-173-37-1-138.cisco.com (nat.ironport.com [63.251.108.100]) by mx.google.com with ESMTPS id 5sm236784yxg.46.2010.02.09.16.47.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 09 Feb 2010 16:47:58 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Garrett Cooper In-Reply-To: <20100210001937.GU391@bunrab.catwhisker.org> Date: Tue, 9 Feb 2010 16:47:56 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <6A6276EA-27D4-4BC2-A4A9-EFF190D3EB10@gmail.com> References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> <20100210001937.GU391@bunrab.catwhisker.org> To: David Wolfskill X-Mailer: Apple Mail (2.1077) Cc: hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 00:48:00 -0000 On Feb 9, 2010, at 4:19 PM, David Wolfskill wrote: > On Tue, Feb 09, 2010 at 04:14:12PM -0800, Garrett Cooper wrote: >> ... >> I'll see if I can whip up a quick patch in the next day or so -- = but before I do that, does it make more sense to do globs or regular = expressions? There are pluses and minuses to each version and would = require some degree of parsing (and potentially escaping). >> ... >=20 > I believe it's easier to be precise about exactly what is wanted with = a > regex (vs. a glob). >=20 > On the other hand, globs tend to be "quick & dirty" (in my = experience). ;-} Your doppleganger's Andrew :o? Regexps have a certain degree of ambiguity with them, as the = following is a valid regexp: sysctl dev\.cpu\..*\.temperature Assuming the correct periods are escaped, this would be a minor = bug-prone task to complete. Whereas this form will return different results from what you = want most likely (note the subtle difference with the extra period): sysctl dev\.cpu.*\.temperature Globs in this case don't buy you that much difference for what = you want, and (IMO) add unnecessary complexity to the problem as you can = still apply basic character classes, et all. Thanks, -Garrett= From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 00:51: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 C7752106566C for ; Wed, 10 Feb 2010 00:51:14 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-yw0-f184.google.com (mail-yw0-f184.google.com [209.85.211.184]) by mx1.freebsd.org (Postfix) with ESMTP id 7B8BE8FC15 for ; Wed, 10 Feb 2010 00:51:14 +0000 (UTC) Received: by ywh14 with SMTP id 14so814635ywh.28 for ; Tue, 09 Feb 2010 16:51:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=l90Ak3+M5FArLjR+K9NMJqUhPZqx3tae6lV8mYNXJoc=; b=DK8LX8rcREFmxYTrBXbgrxzd+gc2wk9l+kHbQDiKVjZwQ+Kyq9vdUMndjKg7lCSPN4 i4XKMi0fgPHfz1/a6zCcxmY3CpTbKy5lNR+r6Oy5NEakN4Ip6hDQUCIt47bnEEiC7fau AFhn8LDRmadkoovX/1/GGGUjMv3hWqJ0H94xs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=wBoZaa0YQrSUH9VmeAesZpjWyY5OWkOJRyDaiWY0CkC3QozM3rGY7baPepA8UhcCNF CsUuNHpn/ekXWocW94Vs/tN/ckWB52+NTFuHMKM4ZviLrZJf64mY/gmAA6ARse43T4ow Rid0KDY+WUUtzaH8Bc//aBH6ZEN504q5qIVxk= Received: by 10.101.2.4 with SMTP id e4mr9617201ani.49.1265763073389; Tue, 09 Feb 2010 16:51:13 -0800 (PST) Received: from dhcp-173-37-1-138.cisco.com (nat.ironport.com [63.251.108.100]) by mx.google.com with ESMTPS id 16sm421170gxk.3.2010.02.09.16.51.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 09 Feb 2010 16:51:12 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Garrett Cooper In-Reply-To: Date: Tue, 9 Feb 2010 16:51:09 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <7BE25339-9614-4E64-BA14-85291B5DE356@gmail.com> References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> To: Andrew Brampton X-Mailer: Apple Mail (2.1077) Cc: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 00:51:15 -0000 On Feb 9, 2010, at 4:45 PM, Andrew Brampton wrote: > On Wed, Feb 10, 2010 at 12:14 AM, Garrett Cooper = wrote: >> C-shell globs as some programming languages referring to it as, i.e. = perl (which this is a subset of the globs concept) allow for expansion = via `*' to be `anything'. Regexp style globs for what you're looking for = would be either .* (greedy) or .+ (non-greedy), with it being most = likely the latter case. >>=20 >=20 > Ah I understand the difference now. Thanks. >=20 >> I'll see if I can whip up a quick patch in the next day or so = -- but before I do that, does it make more sense to do globs or regular = expressions? There are pluses and minuses to each version and would = require some degree of parsing (and potentially escaping). >=20 > I think going for the simpler glob option might be best. In my earlier > example a regex would have problems with all the periods, would it > not? Also if I want to match anything I would always forget to write > .* instead of just * Yes -- that's a part of the ambiguity in standard regular = expressions that I was implying... > I was just having a quick look at how to implement this, would it be > best to use the fnmatch function? Having a quick browse of the FreeBSD > source I found csh_match in /usr.sbin/pkg_install/lib/match.c:L456 > which seems to do something similar to what we want. fnmatch is for matching filenames... I think there's a better = way to do it with globs, but I'll have to take a quick peek at python's = glob module so I don't reinvent the wheel (using fnmatch(3) // glob(3) = to string match seems kind of stupid to do...). > BTW Feel free to implement this, I was going to have a go but I doubt > I'd actually get around to it :( Ok.. Thanks, -Garrett= From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 00:58: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 174131065670 for ; Wed, 10 Feb 2010 00:58:50 +0000 (UTC) (envelope-from brampton@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id 993608FC17 for ; Wed, 10 Feb 2010 00:58:49 +0000 (UTC) Received: by fxm24 with SMTP id 24so113591fxm.3 for ; Tue, 09 Feb 2010 16:58:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=ESNswRvgIkxDiBDQ/LM+veD2KXH1bYW8vlR/5luqm6E=; b=ByzU2RW5GWOR4hZ4ImS5MoT3H+JyEmR7SToK+JTsYt0VBYUpX41IbN6mKGZ6mUCaH0 6Dy/zo8lFy4bGUW6ZCp+7UZ4iLu1uVHhwQPIEJuA4h90PQVSt4kGehhNa5JMAkF2qTrT q7jFVeQB0t3c9ewrcb2Bd4LWzIwP4hgawdWAI= 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=Xzk4rHLXHdEfAcell13B+dctH4rA3Pr9sUzHbP2wPRwSGuAy09dnZiXefoZzGee+R6 HoLeN9H9EcO5+3RZykloK3JTmbiW1iBZGzAeHClPOuvAJDCpuBxtS6Ek1UYl/q7ijwRR NdDIM8K8eY+kWxD+ju2c9WTZyxixbrKWwMTV4= MIME-Version: 1.0 Sender: brampton@gmail.com Received: by 10.223.3.135 with SMTP id 7mr8807419fan.21.1265763528528; Tue, 09 Feb 2010 16:58:48 -0800 (PST) In-Reply-To: <7BE25339-9614-4E64-BA14-85291B5DE356@gmail.com> References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> <7BE25339-9614-4E64-BA14-85291B5DE356@gmail.com> Date: Wed, 10 Feb 2010 00:58:48 +0000 X-Google-Sender-Auth: 7ac291aeda927e3f Message-ID: From: Andrew Brampton To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 00:58:50 -0000 On Wed, Feb 10, 2010 at 12:51 AM, Garrett Cooper wrote= : > =C2=A0 =C2=A0 =C2=A0 =C2=A0fnmatch is for matching filenames... I think t= here's a better way to do it with globs, but I'll have to take a quick peek= at python's glob module so I don't reinvent the wheel (using fnmatch(3) //= glob(3) to string match seems kind of stupid to do...). > I think fnmatch() is used to match filenames but reading its documentation I don't see why it has to be used only for filenames. It takes a pattern and a string and returns true if they match. Having a quick look in the FreeBSD source it is used in a few non-filesystem places, for example, contrib/binutils/ld/ldlang.c to match section names, sys/netinet/ipfw/ip_fw2.c to match interface names. I'm sure there are other examples. However, if you can find a better suited function then sure, I just don't like reinventing the wheel, even if this wheel is the wrong colour ;) Andrew From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 01:08: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 62F821065672 for ; Wed, 10 Feb 2010 01:08:10 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.210.172]) by mx1.freebsd.org (Postfix) with ESMTP id 158F98FC17 for ; Wed, 10 Feb 2010 01:08:09 +0000 (UTC) Received: by yxe2 with SMTP id 2so7173077yxe.7 for ; Tue, 09 Feb 2010 17:08:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=4EN4oA1NhU5+kwvH9DOrQp/ZaKdWhYSuS4K3JVLP6fo=; b=hbxpbAPUXkm091m/2K80KjjudRSw2pov4yRJsrllEOj4Z1Ni2ItotBXb60COdS9gOO 7BPQK5fT3XzqWa5DQMiZHYMUOUJcp5/zY1+SrCAjTt8i5Vwj3uYh1hh+XfYVtoTVDxWu brrF0OJeHNo9BBC/wacylxykhcUJ5kZn+fhGw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=tDLkU4hhwH2p48DcOrzbXojEw2FCWPq6skOM95lBBt4cCp4qr3EDIC42Uad4zLIB/V ogY4qW1JxSRMzuHWu1nR+ySegTBJ6ywR8nY06ba3XsxBmSJFvjYQkCi/u/bFvG8n9OXS Xm08y9j73+uzLOO9sC9/ve/BDBzzPNqgT1fDo= Received: by 10.90.40.17 with SMTP id n17mr964890agn.3.1265764089434; Tue, 09 Feb 2010 17:08:09 -0800 (PST) Received: from dhcp-173-37-1-138.cisco.com (nat.ironport.com [63.251.108.100]) by mx.google.com with ESMTPS id 14sm430867gxk.6.2010.02.09.17.08.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 09 Feb 2010 17:08:08 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Garrett Cooper In-Reply-To: Date: Tue, 9 Feb 2010 17:08:06 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <6267ADA5-1E7A-492C-8ED2-3A1EDA4CF92C@gmail.com> References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> <7BE25339-9614-4E64-BA14-85291B5DE356@gmail.com> To: Andrew Brampton X-Mailer: Apple Mail (2.1077) Cc: freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 01:08:10 -0000 On Feb 9, 2010, at 4:58 PM, Andrew Brampton wrote: > On Wed, Feb 10, 2010 at 12:51 AM, Garrett Cooper = wrote: >> fnmatch is for matching filenames... I think there's a better = way to do it with globs, but I'll have to take a quick peek at python's = glob module so I don't reinvent the wheel (using fnmatch(3) // glob(3) = to string match seems kind of stupid to do...). >>=20 >=20 > I think fnmatch() is used to match filenames but reading its > documentation I don't see why it has to be used only for filenames. It > takes a pattern and a string and returns true if they match. Having a > quick look in the FreeBSD source it is used in a few non-filesystem > places, for example, contrib/binutils/ld/ldlang.c to match section > names, sys/netinet/ipfw/ip_fw2.c to match interface names. I'm sure > there are other examples. However, if you can find a better suited > function then sure, I just don't like reinventing the wheel, even if > this wheel is the wrong colour ;) Ok.. is it the preferred bicycle wheel to equip our motorcycle with then = :]? If so I'll whip up the change in a few hours after $JOB is done. Thanks! -Garrett= From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 02:30:38 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 F14BE1065676 for ; Wed, 10 Feb 2010 02:30:38 +0000 (UTC) (envelope-from kayve@sfsu.edu) Received: from iron3-mailrl.sfsu.edu (iron3-mailrl.sfsu.edu [130.212.10.122]) by mx1.freebsd.org (Postfix) with ESMTP id C1D648FC14 for ; Wed, 10 Feb 2010 02:30:38 +0000 (UTC) X-Inbound-SFSU: False X-onepass: IPPSC X-From-SFSU: True X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EANmjcUuC1B9b/2dsb2JhbACDCZdcdK10gi8BCQWFHYhUgl6BG1sEhDCBWoUR Received: from edg04.sfsu.edu ([130.212.31.91]) by iron3.sfsu.edu with ESMTP; 09 Feb 2010 18:30:32 -0800 Received: from EHB04.ad.sfsu.edu (130.212.31.28) by edg04.sfsu.edu (130.212.31.91) with Microsoft SMTP Server (TLS) id 14.0.682.1; Tue, 9 Feb 2010 18:30:31 -0800 Received: from smtp01.sfsu.edu (130.212.10.100) by ehb.ad.sfsu.edu (130.212.31.28) with Microsoft SMTP Server id 14.0.682.1; Tue, 9 Feb 2010 18:30:29 -0800 Received: from libra.sfsu.edu ([130.212.10.238]) by mail05a.sfsu.edu (Lotus Domino Release 7.0.4HF59) with ESMTP id 2010020918302785-418 ; Tue, 9 Feb 2010 18:30:27 -0800 Date: Tue, 9 Feb 2010 18:30:27 -0800 From: KAYVEN RIESE To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <866366jxbm.fsf@ds4.des.no> Message-ID: References: <201002082216.o18MFtQN009973@fire.js.berklix.net> <86eikuk317.fsf@ds4.des.no> <20100209135713.GI81255@cicely7.cicely.de> <866366jxbm.fsf@ds4.des.no> MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on MAIL05a/SERVERS/SFSU(Release 7.0.4HF59 | August 11, 2009) at 02/09/2010 18:30:28, Serialize by Router on SMTP01/SERVERS/SFSU(Release 7.0.4|March 23, 2009) at 02/09/2010 18:30:29, Serialize complete at 02/09/2010 18:30:29 Content-Type: multipart/mixed; boundary="-559023410-851401618-1265769027=:21613" Cc: mail25@bzerk.org, freebsd-hackers@freebsd.org, "Julian H. Stacey" , ticso@cicely.de Subject: Re: our little daemon abused as symbol of the evil 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 Feb 2010 02:30:39 -0000 ---559023410-851401618-1265769027=:21613 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-Type: text/plain; charset="utf-8"; format=flowed On Tue, 9 Feb 2010, Dag-Erling Sm=C3=B8rgrav wrote: > Bernd Walter writes: > > You can *not* lose copyright through dilution, only trademarks. > > At worst, you might lose an infringement suit if the defendant can show > that you knew about *that particular case* long before you filed suit, > but it would not invalidate your copyright, nor would it diminish your > standing in other suits against other infringers. Isn't what we are looking at here defamation of character?? Our beloved=20 Daemon is being accused of browser history stealing! > > DES > --=20 > Dag-Erling Sm=C3=B8rgrav - des@des.no > _______________________________________________ > 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= " > *----------------------------------------------------------* Kayven Riese, BSCS, MS (Physiology and Biophysics) (415) 902 5513 cellular http://kayve.net Webmaster http://ChessYoga.org *----------------------------------------------------------* ---559023410-851401618-1265769027=:21613-- From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 07:40:05 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 427FB106566B for ; Wed, 10 Feb 2010 07:40:05 +0000 (UTC) (envelope-from gujjenaveen@gmail.com) Received: from mail-px0-f203.google.com (mail-px0-f203.google.com [209.85.216.203]) by mx1.freebsd.org (Postfix) with ESMTP id 18AC38FC1A for ; Wed, 10 Feb 2010 07:40:04 +0000 (UTC) Received: by pxi41 with SMTP id 41so8403124pxi.27 for ; Tue, 09 Feb 2010 23:40:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=u013c/zeNRHM+sTMueAzZzh1fc0K3sNO+wo3RKwV4mE=; b=oTmy0tF9KB6/XPCOux3kCErxGPHWvivvuSkzSq+7ipYbkuFvZ+83si2JYeNrLBSwG0 5UTAEDMT/TVodqfeMi1nyhyzT6za4hRcrtWKdFbRjFRFnRiFjFn07ZJ35apj9hPonsCj MWb3jBh6kYpXNC/YVS2HATooQ2pPHLNvevmK4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=FqiS6UvI1XDJkojbWkn33cgYXW4m8/fc4uUzbFITJQ9U8729fZPk7/M80G8ZKy9Y61 hQfK5/p43zuoyFdSsk9CVOT7U5Pjplnp9XO65tHOPhWAUtDrLYBZmzrexcA9a23v2c3R oB686NGN9RjWwau/83CsAw9i0ceOAHv/LClPc= MIME-Version: 1.0 Received: by 10.141.89.2 with SMTP id r2mr6340088rvl.277.1265786097979; Tue, 09 Feb 2010 23:14:57 -0800 (PST) Date: Wed, 10 Feb 2010 12:44:57 +0530 Message-ID: <39c945731002092314u4a8fd100q69c0735a11e9063a@mail.gmail.com> From: Naveen Gujje To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: System() returning ECHILD error on FreeBSD 7.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 07:40:05 -0000 Hi, We have a web proxy (running on FreeBSD 7.2-RELEASE-p2), where we register the SIGCHLD handler as follows: signal(SIGCHLD, SigChildHandler); void SigChildHandler(int sig) { pid_t pid; /* get status of all dead procs */ do { int procstat; pid = waitpid(-1, &procstat, WNOHANG); if (pid < 0) { if (errno == EINTR) continue; /* ignore it */ else { if (errno != ECHILD) perror("getting waitpid"); pid = 0; /* break out */ } } else if (pid != 0) syslog(LOG_INFO, "child process %d completed", (int) pid); } while (pid); signal(SIGCHLD, SigChildHandler); } And, in some other part of the code, we call system() to add an ethernet interface. This system() call is returning -1 with errno set to ECHILD, though the passed command is executed successfully. I have noticed that, the problem is observed only after we register SigChildHandler. If I have a simple statement like system("ls") before and after the call to signal(SIGCHLD, SigChildHandler), the call before setting signal handler succeeds without errors and the call after setting signal handler returns -1 with errno set to ECHILD. Here, I believe that within the system() call, the child exited before the parent got a chance to call _wait4 and thus resulted in ECHILD error. But, for the child to exit without notifying the parent, SIGCHLD has to be set to SIG_IGN in the parent and this is not the case, because we are already setting it to SigChildHandler. If I set SIGCHLD to SIG_DFL before calling system() then i don't see this problem. I would like to know how setting SIGCHLD to SIG_DFL or SigChildHanlder is making the difference. Can someone please help me out? [Note: Replacing signal() with sigaction() doesn't help either.] Following is the code for system() call cat /usr/src/lib/libc/stdlib/system.c int __system(command) const char *command; { pid_t pid, savedpid; int pstat; struct sigaction ign, intact, quitact; sigset_t newsigblock, oldsigblock; if (!command) /* just checking... */ return(1); /* * Ignore SIGINT and SIGQUIT, block SIGCHLD. Remember to save * existing signal dispositions. */ ign.sa_handler = SIG_IGN; (void)sigemptyset(&ign.sa_mask); ign.sa_flags = 0; (void)_sigaction(SIGINT, &ign, &intact); (void)_sigaction(SIGQUIT, &ign, &quitact); (void)sigemptyset(&newsigblock); (void)sigaddset(&newsigblock, SIGCHLD); (void)_sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock); switch(pid = fork()) { case -1: /* error */ break; case 0: /* child */ /* * Restore original signal dispositions and exec the command. */ (void)_sigaction(SIGINT, &intact, NULL); (void)_sigaction(SIGQUIT, &quitact, NULL); (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); execl(_PATH_BSHELL, "sh", "-c", command, (char *)NULL); _exit(127); default: /* parent */ savedpid = pid; do { pid = _wait4(savedpid, &pstat, 0, (struct rusage *)0); } while (pid == -1 && errno == EINTR); break; } (void)_sigaction(SIGINT, &intact, NULL); (void)_sigaction(SIGQUIT, &quitact, NULL); (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); return(pid == -1 ? -1 : pstat); } Thanks, Naveen From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 10:51:58 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 3E7571065670 for ; Wed, 10 Feb 2010 10:51:58 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id B97F08FC14 for ; Wed, 10 Feb 2010 10:51:57 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o1AApfj0055652; Wed, 10 Feb 2010 11:51:56 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o1AApf85055651; Wed, 10 Feb 2010 11:51:41 +0100 (CET) (envelope-from olli) Date: Wed, 10 Feb 2010 11:51:41 +0100 (CET) Message-Id: <201002101051.o1AApf85055651@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, brampton+freebsd@gmail.com In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 10 Feb 2010 11:51:56 +0100 (CET) Cc: Subject: Re: sysctl with regex? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, brampton+freebsd@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 10:51:58 -0000 Andrew Brampton wrote: > Today I was writing a script to read all the dev.cpu.?.temperature > sysctl OIDs. I was parsing them using a simple grep, but it occurred > to me it might be better if sysctl supported some form of regexp. For > example instead of typing: > sysctl -a | grep dev.cpu.*.temperature > > I could write: > sysctl dev.cpu.*.temperature > > which would display all the OIDs that match dev.cpu.*.temperature. > This is better than grep because when I issue a "sysctl -a" the > program retrieves many variables that I am not interested in (which > later get filtered by grep). I'm not sure such a feature is really necessary. What's wrong with this approach? $ sysctl dev.cpu | grep temperature When you need that in a script, there's an even more elegant way to do it: NCPU=`sysctl -n hw.ncpu` OIDS=`jot -w dev.cpu.%d.temperature $NCPU 0` sysctl $OIDS There's no need to use "sysctl -a". After all, the "UNIX way" of doing things is to combine the existing tools instead of duplicate features in many tools. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Documentation is like sex; when it's good, it's very, very good, and when it's bad, it's better than nothing." -- Dick Brandon From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 11:24:58 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 891F4106568D for ; Wed, 10 Feb 2010 11:24:58 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 494138FC28 for ; Wed, 10 Feb 2010 11:24:58 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 4C4E91FFC22; Wed, 10 Feb 2010 11:24:57 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 2F8A3844C4; Wed, 10 Feb 2010 12:24:57 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> Date: Wed, 10 Feb 2010 12:24:57 +0100 In-Reply-To: <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> (Garrett Cooper's message of "Tue, 9 Feb 2010 16:14:12 -0800") Message-ID: <86fx59jpti.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Andrew Brampton , freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 11:24:58 -0000 Garrett Cooper writes: > C-shell globs as some programming languages referring to it as, > i.e. perl (which this is a subset of the globs concept) allow for > expansion via `*' to be `anything'. Regexp style globs for what you're > looking for would be either .* (greedy) or .+ (non-greedy), with it > being most likely the latter case. Uh, not quite. Formally, a regular expression is a textual representation of a finite state machine that describes a context-free grammar. A glob pattern can be trivially translated to a regular expression, but not the other way around. Basically, * in a glob pattern corresponds to [^/]*, ? corresponds to ., and [abcd] and [^abcd] have the same meaning as in a regular expression. The glob pattern syntax has no equivalent for +, ?, {m,n}, (foo|bar), etc. Some shells implement something that resembles alternations, where {foo,bar} corresponds to (foo|bar), but these are expanded before the glob pattern. For instance, /tmp/{*,*} is expanded to /tmp/* /tmp/*, which is then expanded to two complete copies of the list of files and directories in /tmp. There is no such thing as a "regexp style glob", and I have no idea what you mean by "a subset of the globs concept" or where Perl fits into the discussion. Finally, .* and .+ are *both* greedy. Perl's regular expression syntax includes non-greedy variants for both (.*? and .+? respectively). Note that the [], +, ? and {m,n} notations are merely shorthand for expressions which can be expressed using only concatenation, alternation and the kleene star, which are the only operations available in formal regular expressions. > I'll see if I can whip up a quick patch in the next day or so -- but > before I do that, does it make more sense to do globs or regular > expressions? There are pluses and minuses to each version and would > require some degree of parsing (and potentially escaping). I think you'll find that, at least in this particular case, regular expressions are an order of magnitude harder to implement than glob patterns. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 12:10: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 B3C391065672 for ; Wed, 10 Feb 2010 12:10:37 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 35F098FC14 for ; Wed, 10 Feb 2010 12:10:37 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o1ACAKgs058857; Wed, 10 Feb 2010 13:10:36 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o1ACAKdQ058856; Wed, 10 Feb 2010 13:10:20 +0100 (CET) (envelope-from olli) Date: Wed, 10 Feb 2010 13:10:20 +0100 (CET) Message-Id: <201002101210.o1ACAKdQ058856@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, gujjenaveen@gmail.com In-Reply-To: <39c945731002092314u4a8fd100q69c0735a11e9063a@mail.gmail.com> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 10 Feb 2010 13:10:36 +0100 (CET) Cc: Subject: Re: System() returning ECHILD error on FreeBSD 7.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, gujjenaveen@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 12:10:37 -0000 Naveen Gujje wrote: > signal(SIGCHLD, SigChildHandler); > > void > SigChildHandler(int sig) > { > pid_t pid; > > /* get status of all dead procs */ > do { > int procstat; > pid = waitpid(-1, &procstat, WNOHANG); > if (pid < 0) { > if (errno == EINTR) > continue; /* ignore it */ > else { > if (errno != ECHILD) > perror("getting waitpid"); > pid = 0; /* break out */ > } > } > else if (pid != 0) > syslog(LOG_INFO, "child process %d completed", (int) pid); > } while (pid); > > signal(SIGCHLD, SigChildHandler); > } There are several problems with your signal handler. First, the perror() and syslog() functions are not re-entrant, so they should not be used inside signal handlers. This can lead to undefined behaviour. Please refer to the sigaction(2) manual page for a list of functions that are considered safe to be used inside signal handlers. Second, you are using functions that may change the value of the global errno variable. Therefore you must save its value at the beginning of the signal handler, and restore it at the end. Third (not a problem in this particular case, AFAICT, but still good to know): Unlike SysV systems, BSD systems do _not_ automatically reset the signal action when the handler is called. Therefore you do not have to call signal() again in the handler (but it shouldn't hurt either). Because of the semantic difference of the signal() function on different systems, it is preferable to use sigaction(2) instead in portable code. > And, in some other part of the code, we call system() to add an ethernet > interface. This system() call is returning -1 with errno set to ECHILD, > though the passed command is executed successfully. I have noticed that, > the problem is observed only after we register SigChildHandler. If I have a > simple statement like system("ls") before and after the call to > signal(SIGCHLD, SigChildHandler), the call before setting signal handler > succeeds without errors and the call after setting signal handler returns -1 > with errno set to ECHILD. > > Here, I believe that within the system() call, the child exited before the > parent got a chance to call _wait4 and thus resulted in ECHILD error. I don't think that can happen. > But, for the child to exit without notifying the parent, SIGCHLD has to be > set to SIG_IGN in the parent and this is not the case, because we are already > setting it to SigChildHandler. If I set SIGCHLD to SIG_DFL before calling > system() then i don't see this problem. > > I would like to know how setting SIGCHLD to SIG_DFL or SigChildHanlder is > making the difference. The system() function temporarily blocks SIGCHLD (i.e. it adds the signal to the process' signal mask). However, blocking is different from ignoring: The signal is held as long as it is blocked, and as soon as it is removed from the mask, it is delivered, i.e. your signal handler is called right before the system() function returns. And since you don't save the errno value, your signal handler overwrites the value returned from the system() function. So you get ECHILD. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "What is this talk of 'release'? We do not make software 'releases'. Our software 'escapes', leaving a bloody trail of designers and quality assurance people in its wake." From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 12:14: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 C712E106566B for ; Wed, 10 Feb 2010 12:14:37 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 7FB058FC15 for ; Wed, 10 Feb 2010 12:14:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 6B29D9CB080; Wed, 10 Feb 2010 13:14:03 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hLlAkX5At+0B; Wed, 10 Feb 2010 13:14:01 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 2875F9CB0D3; Wed, 10 Feb 2010 13:14:01 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id o1ACE1o4081530; Wed, 10 Feb 2010 13:14:01 +0100 (CET) (envelope-from rdivacky) Date: Wed, 10 Feb 2010 13:14:01 +0100 From: Roman Divacky To: Dag-Erling Sm??rgrav Message-ID: <20100210121401.GA81144@freebsd.org> References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> <86fx59jpti.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86fx59jpti.fsf@ds4.des.no> User-Agent: Mutt/1.4.2.3i Cc: Andrew Brampton , Garrett Cooper , freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 12:14:37 -0000 On Wed, Feb 10, 2010 at 12:24:57PM +0100, Dag-Erling Sm??rgrav wrote: > Garrett Cooper writes: > > C-shell globs as some programming languages referring to it as, > > i.e. perl (which this is a subset of the globs concept) allow for > > expansion via `*' to be `anything'. Regexp style globs for what you're > > looking for would be either .* (greedy) or .+ (non-greedy), with it > > being most likely the latter case. > > Uh, not quite. > > Formally, a regular expression is a textual representation of a finite > state machine that describes a context-free grammar. I dont think so.... regular expressions describe regular languages which are a strict subset of context free languages. the practical difference is that you cannot describe for example expressions with parenthesis with a regular expression while you can with a context free grammar... for more info see: http://en.wikipedia.org/wiki/Chomsky_hierarchy From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 12:23: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 F33BB1065676; Wed, 10 Feb 2010 12:23:21 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id B0BB88FC0C; Wed, 10 Feb 2010 12:23:21 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id B72241FFC22; Wed, 10 Feb 2010 12:23:20 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 8258D844C4; Wed, 10 Feb 2010 13:23:20 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Roman Divacky References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> <86fx59jpti.fsf@ds4.des.no> <20100210121401.GA81144@freebsd.org> Date: Wed, 10 Feb 2010 13:23:20 +0100 In-Reply-To: <20100210121401.GA81144@freebsd.org> (Roman Divacky's message of "Wed, 10 Feb 2010 13:14:01 +0100") Message-ID: <86ocjxi8jr.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Andrew Brampton , Garrett Cooper , freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 12:23:22 -0000 Roman Divacky writes: > "Dag-Erling Sm=C3=B8rgrav" writes: > > Formally, a regular expression is a textual representation of a > > finite state machine that describes a context-free grammar. > I dont think so.... regular expressions describe regular languages > which are a strict subset of context free languages. The practical > difference is that you cannot describe for example expressions with > parenthesis with a regular expression while you can with a context > free grammar... You mean nested parentheses? You're right, I didn't think of that. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 12:28: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 78EB41065670 for ; Wed, 10 Feb 2010 12:28:18 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.sonnenberger.org [92.79.50.50]) by mx1.freebsd.org (Postfix) with ESMTP id 2152B8FC13 for ; Wed, 10 Feb 2010 12:28:17 +0000 (UTC) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id 6B9A1667F7 for ; Wed, 10 Feb 2010 13:28:14 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id CA59615C6D; Wed, 10 Feb 2010 13:27:54 +0100 (CET) Date: Wed, 10 Feb 2010 13:27:54 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20100210122754.GA27174@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> <86fx59jpti.fsf@ds4.des.no> <20100210121401.GA81144@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100210121401.GA81144@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: sysctl with regex? 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 Feb 2010 12:28:18 -0000 On Wed, Feb 10, 2010 at 01:14:01PM +0100, Roman Divacky wrote: > > Formally, a regular expression is a textual representation of a finite > > state machine that describes a context-free grammar. > > I dont think so.... regular expressions describe regular languages which are > a strict subset of context free languages. The sentence is still correct, strictly speaking :) Not all context-free grammars can be represented by a FSM, those that can be are the regular languages. Joerg From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 12:54:45 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 4F8AC106566B for ; Wed, 10 Feb 2010 12:54:45 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id CADE28FC14 for ; Wed, 10 Feb 2010 12:54:44 +0000 (UTC) Received: from park.js.berklix.net (p549A5C47.dip.t-dialin.net [84.154.92.71]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id o1ACsgBJ027512; Wed, 10 Feb 2010 12:54:42 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id o1ACsVhM017775; Wed, 10 Feb 2010 13:54:32 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id o1ACrerT040988; Wed, 10 Feb 2010 13:53:45 +0100 (CET) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201002101253.o1ACrerT040988@fire.js.berklix.net> To: KAYVEN RIESE From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Tue, 09 Feb 2010 18:30:27 PST." Date: Wed, 10 Feb 2010 13:53:40 +0100 Sender: jhs@berklix.com Cc: Oliver Fromme , freebsd-hackers@freebsd.org, mail25@bzerk.org, Kirk McKusick , =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= , ticso@cicely.de Subject: Re: our little daemon abused as symbol of the evil 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 Feb 2010 12:54:45 -0000 KAYVEN RIESE wrote: > Isn't what we are looking at here defamation of character?? Our beloved=20 > Daemon is being accused of browser history stealing! Yes, an abuse. Interesting skimming the article though, if heavy on the math. Earlier, ref: > From: Oliver Fromme > Message-id: <201002081220.o18CKXfL035625@lurza.secnetix.de> > On the bottom of this page ... > http://www.freebsd.org/art.html > . the text states that Marshall Kirk McKusick is the > trademark holder for the BSD Daemon image. > However, on another page (I don't have the URL right > now) it says that Kirk owns the copyright of the daemon. > I guess one of the web pages needs to be corrected, > but I don't know which one. :-) I sent a send-pr cc'd Kirk & Oliver so hopefully someone can correct. http://www.freebsd.org/cgi/query-pr.cgi?pr=143724 Cheers, Julian -- Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail plain text not quoted-printable, HTML or Base64 http://www.asciiribbon.org From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 13:54: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 50FF010656C7 for ; Wed, 10 Feb 2010 13:54: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 1565B8FC17 for ; Wed, 10 Feb 2010 13:54: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 A1F4846B52; Wed, 10 Feb 2010 08:54:02 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id E01948A024; Wed, 10 Feb 2010 08:54:01 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 10 Feb 2010 08:38:11 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2699@MBX03.exg5.exghost.com> <23F2E2B0457F4046AD8350DAFB86C41130D434E7@MBX03.exg5.exghost.com> <7B9397B189EB6E46A5EE7B4C8A4BB7CB3849F770@MBX03.exg5.exghost.com> In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3849F770@MBX03.exg5.exghost.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201002100838.11381.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 10 Feb 2010 08:54:01 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Peter Steele Subject: Re: How can I force boot from alternate drive with boot.config? 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 Feb 2010 13:54:03 -0000 On Tuesday 09 February 2010 2:22:53 pm Peter Steele wrote: > >>> So, more precisely, if I wanted to boot from drive 1, I'd use this? > >>> > >>> 1:ad(1p3)/boot/loader > >> > >>Yes, unless there are more bugs hiding. :-) I fixed a few in August last year. > > > >Well, I'll give it a try and let you know if I find new bugs... :-) > > I just tried this and it works as advertised--thanks. One question though: Why does this string list the device number twice? The man page describes it as > > bios_drive:interface(unit,[slice,]part)filename > > where bios_drive is the "drive number as recognized by the BIOS. 0 for the first drive, 1 for the second drive, etc.", and unit is the "unit number of the drive on the interface being used. 0 for the first drive, 1 for the second drive, etc." I think the unit number is largely ignored now. The kernel used to believe it for finding /, but the loader now reads /etc/fstab and sets a variable in kenv to tell the kernel where to find /. > This sounds like it's describing the same thing, but not exactly, but I've always used the same value in both fields and it's always worked. Is there a case where these values might be different? In the test I just did I booted from the fourth drive of a four drive system using The BIOS drive number is based on however the BIOS works, and the code "knows" that "ad" and "da" are hard drives, so it adds 0x80 to the BIOS drive number to obtain the real BIOS drive number, but for "fd" it just uses the drive number as-is. > 3:ad(3p4)/boot/loader > > I know my hardware and knew ad10 mapped to the fourth drive and would be referenced as drive 3 in this context. But how would I determine this generically? For example, given something like /dev/adN, how do I know what number I'd use for this drive in boot.config? It's not generically mappable really. It depends on any option ROMs you may have among other things. Typically if all you have is ATA device (adX), then the lowest numbered adX device would be 0, the next adX device would be 1, etc. However, if you have drives attached to multiple storage controllers then it depends on the order the controllers register their option ROMs with the BIOS. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 16:03:40 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 579BF106566B; Wed, 10 Feb 2010 16:03:40 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f0f:20:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id 206DC8FC25; Wed, 10 Feb 2010 16:03:40 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f0f:20:1::5]) by mail.farley.org (8.14.4/8.14.4) with ESMTP id o1AG3dLP018677; Wed, 10 Feb 2010 10:03:39 -0600 (CST) (envelope-from scf@FreeBSD.org) Date: Wed, 10 Feb 2010 10:03:20 -0600 (CST) From: "Sean C. Farley" To: Ivan Voras In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-2.6 required=4.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail.farley.org Cc: freebsd-hackers@FreeBSD.org, freebsd-stable@FreeBSD.org Subject: Re: Strange problem with 8-stable, VMWare vSphere 4 & AMD CPUs (unexpected shutdowns) 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 Feb 2010 16:03:40 -0000 On Wed, 10 Feb 2010, Ivan Voras wrote: > It looks like I've stumbled upon a bug in vSphere 4 (recent update) > with FreeBSD/amd64 8.0/8-stable (but not 7.x) guests on Opteron(s). In > this combination, everything works fine until a moderate load is > started - a buildworld is enough. About five minutes after the load > starts, the vSphere client starts getting timeouts while talking with > the host and soon after the guest VM is forcibly shut down without any > trace of a reason in various logs. The same VM runs fine on hosts > with Xeon CPUs. The shutdown happens regardless if there is a vSphere > client connected. > > This is very repeatable, on Sun Fire X4140 hosts. > > With 7.x/7.stable guests everything works fine. > > I'm posting this for future reference and to see if anyone has > encountered something like that, or has an idea why this happens. Is it related to this thread: http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/054755.html I have been fighting other issues (mainly countless "Command WRITE(10) took X.XYZ seconds" in the VM's vmware.log file under moderate I/O) with VMware Workstation 7 on a Linux host with an AMD Phenom(tm) II X4 945 Processor, but I still have more testing to see if I can work through it. I also do not want to take over this thread. Sean -- scf@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 16:05: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 358DD1065693; Wed, 10 Feb 2010 16:05:34 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 10E868FC1F; Wed, 10 Feb 2010 16:05:32 +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 SAA05558; Wed, 10 Feb 2010 18:05:31 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4B72D94A.8030509@icyb.net.ua> Date: Wed, 10 Feb 2010 18:05:30 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Ivan Voras References: In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Strange problem with 8-stable, VMWare vSphere 4 & AMD CPUs (unexpected shutdowns) 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 Feb 2010 16:05:34 -0000 on 10/02/2010 17:36 Ivan Voras said the following: > It looks like I've stumbled upon a bug in vSphere 4 (recent update) with > FreeBSD/amd64 8.0/8-stable (but not 7.x) guests on Opteron(s). In this > combination, everything works fine until a moderate load is started - a > buildworld is enough. About five minutes after the load starts, the > vSphere client starts getting timeouts while talking with the host and > soon after the guest VM is forcibly shut down without any trace of a > reason in various logs. The same VM runs fine on hosts with Xeon CPUs. > The shutdown happens regardless if there is a vSphere client connected. > > This is very repeatable, on Sun Fire X4140 hosts. > > With 7.x/7.stable guests everything works fine. > > I'm posting this for future reference and to see if anyone has > encountered something like that, or has an idea why this happens. Wild guess - try disabling superpages in the guests. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 17:09:46 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 3377D106566B for ; Wed, 10 Feb 2010 17:09:46 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f189.google.com (mail-qy0-f189.google.com [209.85.221.189]) by mx1.freebsd.org (Postfix) with ESMTP id DCEDA8FC1C for ; Wed, 10 Feb 2010 17:09:45 +0000 (UTC) Received: by qyk27 with SMTP id 27so209962qyk.3 for ; Wed, 10 Feb 2010 09:09:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=jr+7ukGaEJyibXfoxz1U8Uo+CTq2GJSjwySY4pRXMBM=; b=OkM02YlosqAYU6EWwzip6gOhPLa7yyyJNSefI9lYS6wUjtAZBNP0hqPBL6gMFFsmQd oZhJ2QZ2I9VWpznJ+4UKwTAkeNWEqne3DIaUiKTBuyd7KBCCFMRWSWwyQed22/DibWpC bqy2qV0VuPEzoCH5UqZNL6R4uQtagy98k0RrA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=BgrXoelPd75goerMeCbTIaC4DUEGaqcRrE/g7Mqm+gG03eUzKhqcDMLWGZtQRTITsg nJgkoiiHYHFMlJLITVtlawkrtR6aj9Sn1ekR4Lc4UYXaz7UBVYfiBi3WBXXXHY+Nlw/P YBeCREoMU7YTDQ8KQX/CYhS7XTvuS5VUoQBnA= MIME-Version: 1.0 Received: by 10.142.61.40 with SMTP id j40mr321473wfa.115.1265821784331; Wed, 10 Feb 2010 09:09:44 -0800 (PST) In-Reply-To: <201002101051.o1AApf85055651@lurza.secnetix.de> References: <201002101051.o1AApf85055651@lurza.secnetix.de> Date: Wed, 10 Feb 2010 09:09:44 -0800 Message-ID: <7d6fde3d1002100909g4b2817bamcd4542601494cc8d@mail.gmail.com> From: Garrett Cooper To: freebsd-hackers@freebsd.org, brampton+freebsd@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: sysctl with regex? 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 Feb 2010 17:09:46 -0000 On Wed, Feb 10, 2010 at 2:51 AM, Oliver Fromme wro= te: > Andrew Brampton wrote: > =A0> Today I was writing a script to read all the dev.cpu.?.temperature > =A0> sysctl OIDs. I was parsing them using a simple grep, but it occurred > =A0> to me it might be better if sysctl supported some form of regexp. Fo= r > =A0> example instead of typing: > =A0> sysctl -a | grep dev.cpu.*.temperature > =A0> > =A0> I could write: > =A0> sysctl dev.cpu.*.temperature > =A0> > =A0> which would display all the OIDs that match dev.cpu.*.temperature. > =A0> This is better than grep because when I issue a "sysctl -a" the > =A0> program retrieves many variables that I am not interested in (which > =A0> later get filtered by grep). > > I'm not sure such a feature is really necessary. > What's wrong with this approach? > > $ sysctl dev.cpu | grep temperature > > When you need that in a script, there's an even more > elegant way to do it: > > NCPU=3D`sysctl -n hw.ncpu` > OIDS=3D`jot -w dev.cpu.%d.temperature $NCPU 0` > sysctl $OIDS > > There's no need to use "sysctl -a". =A0After all, the > "UNIX way" of doing things is to combine the existing > tools instead of duplicate features in many tools. True... while I was looking at where to insert the expression matcher, I couldn't see a single *good* location where to put it because all of the APIs in sysctl(1) are print or return an OID integer without thoroughly hacking up the source (even though it is largely hacked up today from the looks of it). Ugh. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 17:13:36 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 7A02A106566B; Wed, 10 Feb 2010 17:13:36 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 54FF08FC13; Wed, 10 Feb 2010 17:13:34 +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 TAA06644; Wed, 10 Feb 2010 19:13:33 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4B72E93C.80102@icyb.net.ua> Date: Wed, 10 Feb 2010 19:13:32 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Ivan Voras References: <4B72D94A.8030509@icyb.net.ua> In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Strange problem with 8-stable, VMWare vSphere 4 & AMD CPUs (unexpected shutdowns) 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 Feb 2010 17:13:36 -0000 on 10/02/2010 19:05 Ivan Voras said the following: > On 02/10/10 17:05, Andriy Gapon wrote: >> on 10/02/2010 17:36 Ivan Voras said the following: >>> It looks like I've stumbled upon a bug in vSphere 4 (recent update) with >>> FreeBSD/amd64 8.0/8-stable (but not 7.x) guests on Opteron(s). In this >>> combination, everything works fine until a moderate load is started - a >>> buildworld is enough. About five minutes after the load starts, the >>> vSphere client starts getting timeouts while talking with the host and >>> soon after the guest VM is forcibly shut down without any trace of a >>> reason in various logs. The same VM runs fine on hosts with Xeon CPUs. >>> The shutdown happens regardless if there is a vSphere client connected. >>> >>> This is very repeatable, on Sun Fire X4140 hosts. >>> >>> With 7.x/7.stable guests everything works fine. >>> >>> I'm posting this for future reference and to see if anyone has >>> encountered something like that, or has an idea why this happens. >> >> Wild guess - try disabling superpages in the guests. > > It looks like your guess is perfectly correct :) The guest has been > doing buildworlds for an hour and it works fine. Thanks! > > It's strange how this doesn't affect the Xeons... I really can not tell more but there seems to be an issue between our implementation of superpages (very unique) and AMD processors from 10h family. I'd recommend not using superpages feature with those processors for time being. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 17:23: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 BA52A106566B for ; Wed, 10 Feb 2010 17:23:02 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pz0-f202.google.com (mail-pz0-f202.google.com [209.85.222.202]) by mx1.freebsd.org (Postfix) with ESMTP id 8DA8A8FC15 for ; Wed, 10 Feb 2010 17:23:02 +0000 (UTC) Received: by pzk40 with SMTP id 40so236505pzk.7 for ; Wed, 10 Feb 2010 09:23:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=NVQaIXgm8UKvQEOP+xkaq1cIAnHIrq3tqkCU3nGoafQ=; b=OCLfmTz/GfigjdHYvVCgR7Hb6Wew5nkaj8G4IoNnL/gP0IWrwn22R1MIiBywLwb0gl ako/uqM+00WsI+yisDSKyw6b2WpAnWvrPIz8bldm5FLqF+dWZy5CLVs+QDnT5Tv7dMiS TYCWcLbTJRHqHF5+5he1ix7SMECmdotkMfaHw= 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=c1wxiprWHlPOOi2Al7hNk39zureqoDmeFVtHxrQdihz05I+WRcBOCKrTDBybYKo59v WLjQc8UuHw+LtyxvWUQ+q+E2S057WdjQKHeN91ZlHgntmGGJTCJM5f5UY3VU3iJFNU/q FZiyIYnv/cViTgOFNbju2YWiOgjC1UwlqnwjM= MIME-Version: 1.0 Received: by 10.142.60.2 with SMTP id i2mr328611wfa.143.1265822581970; Wed, 10 Feb 2010 09:23:01 -0800 (PST) In-Reply-To: <86fx59jpti.fsf@ds4.des.no> References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> <86fx59jpti.fsf@ds4.des.no> Date: Wed, 10 Feb 2010 09:23:01 -0800 Message-ID: <7d6fde3d1002100923i6bbc24a7ocaf408f4d78ec59f@mail.gmail.com> From: Garrett Cooper To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Andrew Brampton , freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 17:23:02 -0000 2010/2/10 Dag-Erling Sm=F8rgrav : > Garrett Cooper writes: >> C-shell globs as some programming languages referring to it as, >> i.e. perl (which this is a subset of the globs concept) allow for >> expansion via `*' to be `anything'. Regexp style globs for what you're >> looking for would be either .* (greedy) or .+ (non-greedy), with it >> being most likely the latter case. > > Uh, not quite. > > Formally, a regular expression is a textual representation of a finite > state machine that describes a context-free grammar. > > A glob pattern can be trivially translated to a regular expression, but > not the other way around. =A0Basically, * in a glob pattern corresponds t= o > [^/]*, ? corresponds to ., and [abcd] and [^abcd] have the same meaning ^^^^ ???? ^^^^ The former is a positive assertion, where the latter is a negative assertion -- how can they have the same meaning? > as in a regular expression. =A0The glob pattern syntax has no equivalent > for +, ?, {m,n}, (foo|bar), etc. +, {}, and () -- no... that's typically an extension to shell expanded values (IIRC). ? however, is a supported glob quantifier [from glob(3)]: The argument pattern is a pointer to a pathname pattern to be expanded= . The glob() argument matches all accessible pathnames against the patte= rn and creates a list of the pathnames that match. In order to have acce= ss to a pathname, glob() requires search permission on every component of= a path except the last and read permission on each directory of any file= - name component of pattern that contains any of the special characters `*', `?' or `['. > Some shells implement something that resembles alternations, where > {foo,bar} corresponds to (foo|bar), but these are expanded before the > glob pattern. =A0For instance, /tmp/{*,*} is expanded to /tmp/* /tmp/*, > which is then expanded to two complete copies of the list of files and > directories in /tmp. > > There is no such thing as a "regexp style glob", and I have no idea what > you mean by "a subset of the globs concept" or where Perl fits into the > discussion. This is what I'm referring to: http://perldoc.perl.org/functions/glob.html . Semantically I was wrong in areas in my original statement, but I was trying to hand wave from a basic `I don't know how globs vs regexps work', without the technical lexigram discussion. > Finally, .* and .+ are *both* greedy. =A0Perl's regular expression syntax > includes non-greedy variants for both (.*? and .+? respectively). Yes, but I didn't explicitly note those forms. > Note that the [], +, ? and {m,n} notations are merely shorthand for > expressions which can be expressed using only concatenation, alternation > and the kleene star, which are the only operations available in formal > regular expressions. > >> I'll see if I can whip up a quick patch in the next day or so -- but >> before I do that, does it make more sense to do globs or regular >> expressions? There are pluses and minuses to each version and would >> require some degree of parsing (and potentially escaping). > > I think you'll find that, at least in this particular case, regular > expressions are an order of magnitude harder to implement than glob > patterns. Yes... I wholeheartedly agree... Thanks :), -Garrett From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 17:25:28 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 B67E010656C2 for ; Wed, 10 Feb 2010 17:25:28 +0000 (UTC) (envelope-from gujjenaveen@gmail.com) Received: from mail-pz0-f202.google.com (mail-pz0-f202.google.com [209.85.222.202]) by mx1.freebsd.org (Postfix) with ESMTP id 8E1A08FC0C for ; Wed, 10 Feb 2010 17:25:28 +0000 (UTC) Received: by pzk40 with SMTP id 40so238930pzk.7 for ; Wed, 10 Feb 2010 09:25:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=el6A3eG0R+XGirSPbDYV9pfy37jgG5MKI7bk3Sn9UfE=; b=eSu25133cmkIlRf1Zx9jqbBPl1VVTjHNvaXLJCzSZ8uFkIwjQXm70MXpuiP2o/bb2q iyPskd75+zkx6p4ieCqTBoq2h4IJAy6G72c8pfkc4/G169UU3QAkwV/EHMhVWi4DwC3l tLnqihPLhtkpmz94sl08VVvmUiNFh9ILnVCDo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=bdYeTvS4wmnV1dO+ecY8XuVYO1xk/elIIbnrOt6HUsbu01dyFCPSYXjHC7VihwSLZf cbTyppn5H/YmyiCu548aMDbf64RTXNdQTUbL5/9OzDe9umq4lUp+q/w6kAMpQYC7KAeV W24qJAfvEB1wf1e9pBGNkan1YiTA4VRtKS5js= MIME-Version: 1.0 Received: by 10.141.106.6 with SMTP id i6mr350394rvm.11.1265822728008; Wed, 10 Feb 2010 09:25:28 -0800 (PST) Date: Wed, 10 Feb 2010 22:55:27 +0530 Message-ID: <39c945731002100925i2e466768peac89cdef15463f2@mail.gmail.com> From: Naveen Gujje To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: System() returning ECHILD error on FreeBSD 7.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 17:25:28 -0000 Naveen Gujje > wrote: >> signal(SIGCHLD, SigChildHandler); >> >> void >> SigChildHandler(int sig) >> { >> pid_t pid; >> >> /* get status of all dead procs */ >> do { >> int procstat; >> pid = waitpid(-1, &procstat, WNOHANG); >> if (pid < 0) { >> if (errno == EINTR) >> continue; /* ignore it */ >> else { >> if (errno != ECHILD) >> perror("getting waitpid"); >> pid = 0; /* break out */ >> } >> } >> else if (pid != 0) >> syslog(LOG_INFO, "child process %d completed", (int) pid); >> } while (pid); >> >> signal(SIGCHLD, SigChildHandler); >> } >There are several problems with your signal handler. >First, the perror() and syslog() functions are not re-entrant, >so they should not be used inside signal handlers. This can >lead to undefined behaviour. Please refer to the sigaction(2) >manual page for a list of functions that are considered safe >to be used inside signal handlers. >Second, you are using functions that may change the value of >the global errno variable. Therefore you must save its value >at the beginning of the signal handler, and restore it at the >end. >Third (not a problem in this particular case, AFAICT, but >still good to know): Unlike SysV systems, BSD systems do >_not_ automatically reset the signal action when the handler >is called. Therefore you do not have to call signal() again >in the handler (but it shouldn't hurt either). Because of >the semantic difference of the signal() function on different >systems, it is preferable to use sigaction(2) instead in >portable code. Okay, I followed your suggestion and changed my SigChildHandler to void SigChildHandler(int sig) { pid_t pid; int status; int saved_errno = errno; while (((pid = waitpid( (pid_t) -1, &status, WNOHANG)) > 0) || ((-1 == pid) && (EINTR == errno))) ; errno = saved_errno; } and used sigaction(2) to register this handler. Still, system(3) returns -1 with errno set to ECHILD. >> And, in some other part of the code, we call system() to add an ethernet >> interface. This system() call is returning -1 with errno set to ECHILD, >> though the passed command is executed successfully. I have noticed that, >> the problem is observed only after we register SigChildHandler. If I have a >> simple statement like system("ls") before and after the call to >> signal(SIGCHLD, SigChildHandler), the call before setting signal handler >> succeeds without errors and the call after setting signal handler returns -1 >> with errno set to ECHILD. >> >> Here, I believe that within the system() call, the child exited before the >> parent got a chance to call _wait4 and thus resulted in ECHILD error. >I don't think that can happen. >> But, for the child to exit without notifying the parent, SIGCHLD has to be >> set to SIG_IGN in the parent and this is not the case, because we are already >> setting it to SigChildHandler. If I set SIGCHLD to SIG_DFL before calling >> system() then i don't see this problem. >> >> I would like to know how setting SIGCHLD to SIG_DFL or SigChildHanlder is >> making the difference. >The system() function temporarily blocks SIGCHLD (i.e. it >adds the signal to the process' signal mask). However, >blocking is different from ignoring: The signal is held >as long as it is blocked, and as soon as it is removed >from the mask, it is delivered, i.e. your signal handler >is called right before the system() function returns. Yes, I agree with you. Here, I believe, the point in blocking SIGCHLD is to give preference to wait4() of system() over any other waitXXX() in parent process. But I still cant get the reason for wait4() to return -1. >And since you don't save the errno value, your signal >handler overwrites the value returned from the system() >function. So you get ECHILD. I had a debug print just after wait4() in system() and before we unblock SIGCHLD. And it's clear that wait4() is returning -1 with errno as ECHILD. >Best regards > Oliver -- From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 17:52: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 5F1FE106566B for ; Wed, 10 Feb 2010 17:52:07 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-px0-f203.google.com (mail-px0-f203.google.com [209.85.216.203]) by mx1.freebsd.org (Postfix) with ESMTP id 3441B8FC1D for ; Wed, 10 Feb 2010 17:52:06 +0000 (UTC) Received: by pxi41 with SMTP id 41so130151pxi.27 for ; Wed, 10 Feb 2010 09:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=oxoLDdQC2iGMnanURbuBwoCka4d/5XSfg5w2f4ey34A=; b=c7DsQkFOQ4zjMuAde211mhCdMMh2nlW+Oh5/2s862yIq83nWhMv+sApPgvJ0yqDm5Z 5hWpm8QlPmbm/4arfYXh+WSuKlsHHnbIXMc6FpnvOtQi51KLTmqX4Dp0WsptyoDUdOwd Q5igmfj3pq1GnF8OkVzkRdizzF7s/N8nFyfwk= 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=R/Gbp2kegERv9k+QOxvOgmdf71Egc8+CtmnMpQ6D07YG2/8gaiCTHJrjzlTwQa2sff yX7ENMo5/DACTPGFfUhB5JlfS+v9Ab7GnW4DqjB2b+rnorAHasMO9UvU82nt3PtMXsnz mccDaF65vZarfDvaQH7vXGcYHTRytpsxepwHE= MIME-Version: 1.0 Received: by 10.142.62.35 with SMTP id k35mr343922wfa.197.1265824326618; Wed, 10 Feb 2010 09:52:06 -0800 (PST) In-Reply-To: <39c945731002100925i2e466768peac89cdef15463f2@mail.gmail.com> References: <39c945731002100925i2e466768peac89cdef15463f2@mail.gmail.com> Date: Wed, 10 Feb 2010 09:52:06 -0800 Message-ID: <7d6fde3d1002100952g1518bc36r371020260e81a8c3@mail.gmail.com> From: Garrett Cooper To: Naveen Gujje Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: System() returning ECHILD error on FreeBSD 7.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 17:52:07 -0000 On Wed, Feb 10, 2010 at 9:25 AM, Naveen Gujje wrote= : > Naveen Gujje > wrote: > =A0>> signal(SIGCHLD, SigChildHandler); > =A0>> > =A0>> void > =A0>> SigChildHandler(int sig) > > =A0>> { > =A0>> =A0 pid_t pid; > =A0>> > =A0>> =A0 /* get status of all dead procs */ > =A0>> =A0 do { > =A0>> =A0 =A0 int procstat; > =A0>> =A0 =A0 pid =3D waitpid(-1, &procstat, WNOHANG); > =A0>> =A0 =A0 if (pid < 0) { > > =A0>> =A0 =A0 =A0 if (errno =3D=3D EINTR) > =A0>> =A0 =A0 =A0 =A0 continue; =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* ignore it = */ > =A0>> =A0 =A0 =A0 else { > =A0>> =A0 =A0 =A0 =A0 if (errno !=3D ECHILD) > =A0>> =A0 =A0 =A0 =A0 =A0 perror("getting waitpid"); > > =A0>> =A0 =A0 =A0 =A0 pid =3D 0; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* break = out */ > =A0>> =A0 =A0 =A0 } > =A0>> =A0 =A0 } > =A0>> =A0 =A0 else if (pid !=3D 0) > =A0>> =A0 =A0 =A0 syslog(LOG_INFO, "child process %d completed", (int) pi= d); > > =A0>> =A0 } while (pid); > =A0>> > =A0>> =A0 signal(SIGCHLD, SigChildHandler); > =A0>> } > >>There are several problems with your signal handler. > >>First, the perror() and syslog() functions are not re-entrant, > >>so they should not be used inside signal handlers. =A0This can >>lead to undefined behaviour. =A0Please refer to the sigaction(2) >>manual page for a list of functions that are considered safe >>to be used inside signal handlers. > >>Second, you are using functions that may change the value of >>the global errno variable. =A0Therefore you must save its value >>at the beginning of the signal handler, and restore it at the >>end. > >>Third (not a problem in this particular case, AFAICT, but >>still good to know): =A0Unlike SysV systems, BSD systems do >>_not_ automatically reset the signal action when the handler >>is called. =A0Therefore you do not have to call signal() again > >>in the handler (but it shouldn't hurt either). =A0Because of >>the semantic difference of the signal() function on different >>systems, it is preferable to use sigaction(2) instead in >>portable code. > > Okay, I followed your suggestion and changed my SigChildHandler to > > void > SigChildHandler(int sig) > { > =A0pid_t pid; > =A0int status; > =A0int saved_errno =3D errno; > > =A0while (((pid =3D waitpid( (pid_t) -1, &status, WNOHANG)) > 0) || > > =A0 =A0 =A0 =A0 ((-1 =3D=3D pid) && (EINTR =3D=3D errno))) > =A0 =A0; > > =A0errno =3D saved_errno; > } > > and used sigaction(2) to register this handler. Still, system(3) returns > -1 with errno set to ECHILD. > > =A0>> And, in some other part of the code, we call system() to add an eth= ernet > > =A0>> interface. This system() call is returning -1 with errno set to ECH= ILD, > =A0>> though the passed command is executed successfully. =A0I have notic= ed that, > =A0>> the problem is observed only after we register SigChildHandler. If = I have a > > =A0>> simple statement like system("ls") before and after the call to > =A0>> signal(SIGCHLD, SigChildHandler), the call before setting signal ha= ndler > =A0>> succeeds without errors and the call after setting signal handler r= eturns -1 > > =A0>> with errno set to ECHILD. > =A0>> > =A0>> Here, I believe that within the system() call, the child exited bef= ore the > =A0>> parent got a chance to call _wait4 and thus resulted in ECHILD erro= r. > >>I don't think that can happen. > > =A0>> But, for the child to exit without notifying the parent, SIGCHLD ha= s to be > =A0>> set to SIG_IGN in the parent and this is not the case, because we > are already > > =A0>> setting it to SigChildHandler. If I set SIGCHLD to SIG_DFL before c= alling > =A0>> system() then i don't see this problem. > =A0>> > =A0>> I would like to know how setting SIGCHLD to SIG_DFL or SigChildHanl= der is > > =A0>> making the difference. > >>The system() function temporarily blocks SIGCHLD (i.e. it >>adds the signal to the process' signal mask). =A0However, >>blocking is different from ignoring: =A0The signal is held > >>as long as it is blocked, and as soon as it is removed >>from the mask, it is delivered, i.e. your signal handler >>is called right before the system() function returns. > > Yes, I agree with you. Here, I believe, the point in blocking SIGCHLD > is to give preference to wait4() of system() over any other waitXXX() in > parent process. But I still cant get the reason for wait4() to return -1. > >>And since you don't save the errno value, your signal >>handler overwrites the value returned from the system() >>function. =A0So you get ECHILD. > > I had a debug print just after wait4() in system() and before we unblock > SIGCHLD. And it's clear that wait4() is returning -1 with errno as ECHILD= . Isn't this section of the system(3) libcall essentially doing what you want, s.t. you'll never be able to get the process status when you call waitpid(2)? do { pid =3D _wait4(savedpid, &pstat, 0, (struct rusage *)0); } while (pid =3D=3D -1 && errno =3D=3D EINTR); break; You typically get status via wait*(2) when using exec*(2) or via the return codes from system(3), not system(3) with wait*(2)... Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 17:58: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 BD9DE1065679 for ; Wed, 10 Feb 2010 17:58:37 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id F31DB8FC0A for ; Wed, 10 Feb 2010 17:58:36 +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 TAA07096; Wed, 10 Feb 2010 19:58:32 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4B72F3C7.7060004@icyb.net.ua> Date: Wed, 10 Feb 2010 19:58:31 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Garrett Cooper , Naveen Gujje References: <39c945731002100925i2e466768peac89cdef15463f2@mail.gmail.com> <7d6fde3d1002100952g1518bc36r371020260e81a8c3@mail.gmail.com> In-Reply-To: <7d6fde3d1002100952g1518bc36r371020260e81a8c3@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: System() returning ECHILD error on FreeBSD 7.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 17:58:37 -0000 on 10/02/2010 19:52 Garrett Cooper said the following: > Isn't this section of the system(3) libcall essentially doing what > you want, s.t. you'll never be able to get the process status when you > call waitpid(2)? > > do { > pid = _wait4(savedpid, &pstat, 0, (struct rusage *)0); > } while (pid == -1 && errno == EINTR); > break; > > You typically get status via wait*(2) when using exec*(2) or via > the return codes from system(3), not system(3) with wait*(2)... Exactly. I think that SIGCHLD handler would effectively 'reap' the child and thus wait*() in system would rightfully return ECHILD (perhaps after doing EINTR iteration of the loop). -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 18:03:27 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 7D2F11065670; Wed, 10 Feb 2010 18:03:27 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id D7D638FC1A; Wed, 10 Feb 2010 18:03:26 +0000 (UTC) Received: by fxm24 with SMTP id 24so293360fxm.3 for ; Wed, 10 Feb 2010 10:03:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=ILeZE0pAcZgN1NuEZ9f1xxhqFECs0jwRUlHpY3gSQE8=; b=S2ak9MnlOeEaGJ2sB5lpyE6IDGoj3iwLjYkb7ShYjonLqs8MMYnYbTAwew5qtyeQVD fqtxI9IBcGPobep4zng1ejB889sKeEzdxsJSGSVrO+EYeQtXuoCSHHLAtQ/HVdl8R6fq RJ3b5HT0UOfvG2lW0ZQ0LwmXyzWo7AJCy4vGQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=NvkfdzDy1OY6GFjBJNeH34yj9y207q0ZtvtlgSJ6Ndb3dbogtZC/n7witZjzpzHd3W mcJt2HnvbtGIDOfIkNcXAzZ6eBp0zJQ2YQeZjS4NCbFwh4YV3hEWd0CLXzpoXMoxnEOm hEbCLLqA/uxN5gMhvVnvOIrS2buvVx9HKGolQ= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.87.194 with SMTP id y44mr311778wee.157.1265825005201; Wed, 10 Feb 2010 10:03:25 -0800 (PST) In-Reply-To: <4B72E93C.80102@icyb.net.ua> References: <4B72D94A.8030509@icyb.net.ua> <4B72E93C.80102@icyb.net.ua> From: Ivan Voras Date: Wed, 10 Feb 2010 19:03:05 +0100 X-Google-Sender-Auth: e40ea41441270bf6 Message-ID: <9bbcef731002101003r203f5189xf139700a0d48afa0@mail.gmail.com> To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Strange problem with 8-stable, VMWare vSphere 4 & AMD CPUs (unexpected shutdowns) 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 Feb 2010 18:03:27 -0000 On 10 February 2010 18:13, Andriy Gapon wrote: > on 10/02/2010 19:05 Ivan Voras said the following: >> On 02/10/10 17:05, Andriy Gapon wrote: >>> Wild guess - try disabling superpages in the guests. >> >> It looks like your guess is perfectly correct :) The guest has been >> doing buildworlds for an hour and it works fine. Thanks! >> >> It's strange how this doesn't affect the Xeons... > > I really can not tell more but there seems to be an issue between our > implementation of superpages (very unique) and AMD processors from 10h family. > I'd recommend not using superpages feature with those processors for time being. When you say "very unique" is it in the "it is not Linux or Windows" sense or do we do something nonstandard? From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 18:05:45 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 AC21D10656B6; Wed, 10 Feb 2010 18:05:45 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.116.15]) by mx1.freebsd.org (Postfix) with ESMTP id 634FC8FC08; Wed, 10 Feb 2010 18:05:45 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NfGb3-0007xC-NF; Wed, 10 Feb 2010 20:43:29 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 3FC12B860; Wed, 10 Feb 2010 20:43:38 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 2DCC5B829; Wed, 10 Feb 2010 20:43:38 +0300 (MSK) Date: Wed, 10 Feb 2010 20:43:38 +0300 From: Dmitry Marakasov To: freebsd-stable@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20100210174338.GC39752@hades.panopticon> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: NFS write corruption on 8.0-RELEASE 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 Feb 2010 18:05:46 -0000 Hi! I think I've reported that before, the I thought it's been fixed, however I still get data corruptions when writing on NFS volumes. Now I wonder - is nobody really using NFS, or do I have that much of uncommon setup, or this is some kind of local problem? Client: 8.0-RELEASE i386 Server: 8.0-RELEASE amd64 mount options: nfs rw,nosuid,noexec,nfsv3,intr,soft,tcp,bg,nolockd Server has ZFS, but the same thing happens when sharing UFS placed on md(4). I've prepared a special 1GB file to determine the details of corruption: it's filled with 32-bit numbers each equal to it's own offset in the file. That is, like that: 00000000 00 00 00 00 04 00 00 00 08 00 00 00 0c 00 00 00 |................| 00000010 10 00 00 00 14 00 00 00 18 00 00 00 1c 00 00 00 |................| 00000020 20 00 00 00 24 00 00 00 28 00 00 00 2c 00 00 00 | ...$...(...,...| 00000030 30 00 00 00 34 00 00 00 38 00 00 00 3c 00 00 00 |0...4...8...<...| I've copied that file over NFS from client to server around 50 times, and got 3 corruptions on 8th, 28th and 36th copies. Case1: single currupted block 3779CF88-3779FFFF (12408 bytes). Data in block is shifted 68 bytes up, loosing first 68 bytes are filling last 68 bytes with garbage. Interestingly, among that garbage is my hostname. Case2: single currupted block 2615CFA0-2615FFFF (12384 bytes). Data is shifted by 44 bytes in the same way. Case3: single currepted block 3AA947A8-3AA97FFF (14424 bytes). Data is shifted by 36 bytes in the same way. Any ideas? PS. Diffs of corrupted blocks in a text format are here: http://people.freebsd.org/~amdmi3/diff.1.txt http://people.freebsd.org/~amdmi3/diff.2.txt http://people.freebsd.org/~amdmi3/diff.3.txt -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 18:10: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 CC201106568D; Wed, 10 Feb 2010 18:10:10 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8C9EB8FC2A; Wed, 10 Feb 2010 18:10:09 +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 UAA07270; Wed, 10 Feb 2010 20:10:08 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4B72F67F.4000209@icyb.net.ua> Date: Wed, 10 Feb 2010 20:10:07 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Ivan Voras References: <4B72D94A.8030509@icyb.net.ua> <4B72E93C.80102@icyb.net.ua> <9bbcef731002101003r203f5189xf139700a0d48afa0@mail.gmail.com> In-Reply-To: <9bbcef731002101003r203f5189xf139700a0d48afa0@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Strange problem with 8-stable, VMWare vSphere 4 & AMD CPUs (unexpected shutdowns) 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 Feb 2010 18:10:10 -0000 on 10/02/2010 20:03 Ivan Voras said the following: > When you say "very unique" is it in the "it is not Linux or Windows" > sense or do we do something nonstandard? The former - neither Linux, Windows or OpenSolaris seem to have what we have. So we might be the first testers for certain processor features. We don't do anything that strays from specifications. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 18:26:40 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 33C45106568B; Wed, 10 Feb 2010 18:26:40 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id 8FA158FC1A; Wed, 10 Feb 2010 18:26:39 +0000 (UTC) Received: by fxm24 with SMTP id 24so318932fxm.3 for ; Wed, 10 Feb 2010 10:26:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=rLOFHoifHpdEEeWqb6h/k7yInCX7qxnyE586LhymT5A=; b=TKxM9FY9vZCvzhftzXU3wn+bvAZ7wm0L8MGhdI4/ddlvwZ8xWoEKPFB4UaVjLYX0xK DlN3+uq4r4y8KaqjhDL2/rNxhve2dOEFtNlXQg8cCpSTUuIZUgE5RYW33y1i+OA53VHQ o9/LqoHcidmJdYmKEUF6YWICdh6vWfULKHnqU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=dpNt442dYb/6ifrIVEDEf++5mmEzL2o8Hd4JwLMRm82nQDVIXoZd5eqZ+Kp3uL7IUC 3raK3d5bKeiW1LKAnl1/L6cZnb9aPHZVsTWGGR/pYhKeiIqeo0I2nOda+nOAApypW89M VOdCWCs3yO6M/0jS4d259pXwVIuSSItxVJD6s= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.89.70 with SMTP id b48mr354877wef.160.1265826398257; Wed, 10 Feb 2010 10:26:38 -0800 (PST) In-Reply-To: <4B72F67F.4000209@icyb.net.ua> References: <4B72D94A.8030509@icyb.net.ua> <4B72E93C.80102@icyb.net.ua> <9bbcef731002101003r203f5189xf139700a0d48afa0@mail.gmail.com> <4B72F67F.4000209@icyb.net.ua> From: Ivan Voras Date: Wed, 10 Feb 2010 19:26:18 +0100 X-Google-Sender-Auth: 87b0762993d2470b Message-ID: <9bbcef731002101026k5007075cqf97fc80404ac3fa7@mail.gmail.com> To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Strange problem with 8-stable, VMWare vSphere 4 & AMD CPUs (unexpected shutdowns) 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 Feb 2010 18:26:40 -0000 On 10 February 2010 19:10, Andriy Gapon wrote: > on 10/02/2010 20:03 Ivan Voras said the following: >> When you say "very unique" is it in the "it is not Linux or Windows" >> sense or do we do something nonstandard? > > The former - neither Linux, Windows or OpenSolaris seem to have what we have. I can't find the exact documents but I think both Windows MegaUltimateServer (the highest priced version of Windows Server, whatever it's called today) and Linux (though disabled and marked Experimental) have it, or have some kind of support for large pages that might not be as pervasive (maybe they use it for kernel only?). I have no idea about (Open)Solaris. From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 18:31: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 BD91B1065679; Wed, 10 Feb 2010 18:31:07 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id 247508FC15; Wed, 10 Feb 2010 18:31:06 +0000 (UTC) Received: by ewy1 with SMTP id 1so40398ewy.34 for ; Wed, 10 Feb 2010 10:31:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=uDhNx/O1tZqi0L7fdSzVm1mCJTJVcOuA+OOpgo3hr14=; b=NgECo+iOYLigLPXm//snbCw4MqmGUhyUPIh6SJys35E0xVgxPwWo5hgQT3SX0br2H6 3wXEPvZX0iJPftR7ZAi7ntyO3rowxD5ZqCRSegNyaVYyuARMfGBD9KeLNAmRx2QIYNEQ AOW4bPv2m9AYaxZVjTkbJefryH1oJtZZMNTAM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=l/ddtKm1Fpg5q4TMSYeeBDSAQx7NCD4om/PYc/uha06zUbu7VFGMPyadLonrOHfvxh /owmlLPIZzKqqHTa3jlrPBv8vWbGpUoqBz8nlpjxDo7Q1r/Xtb0jC5GHAebQ08ykCzgH mEN4GXUePwCMytUsrJ0lnTq/04wxHig5gVxd4= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.87.134 with SMTP id y6mr411421wee.20.1265826665135; Wed, 10 Feb 2010 10:31:05 -0800 (PST) In-Reply-To: <9bbcef731002101026k5007075cqf97fc80404ac3fa7@mail.gmail.com> References: <4B72D94A.8030509@icyb.net.ua> <4B72E93C.80102@icyb.net.ua> <9bbcef731002101003r203f5189xf139700a0d48afa0@mail.gmail.com> <4B72F67F.4000209@icyb.net.ua> <9bbcef731002101026k5007075cqf97fc80404ac3fa7@mail.gmail.com> From: Ivan Voras Date: Wed, 10 Feb 2010 19:30:45 +0100 X-Google-Sender-Auth: d5a55f1ef4576fe8 Message-ID: <9bbcef731002101030s119afcb6ndc9f5c9af649528c@mail.gmail.com> To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Strange problem with 8-stable, VMWare vSphere 4 & AMD CPUs (unexpected shutdowns) 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 Feb 2010 18:31:07 -0000 On 10 February 2010 19:26, Ivan Voras wrote: > On 10 February 2010 19:10, Andriy Gapon wrote: >> on 10/02/2010 20:03 Ivan Voras said the following: >>> When you say "very unique" is it in the "it is not Linux or Windows" >>> sense or do we do something nonstandard? >> >> The former - neither Linux, Windows or OpenSolaris seem to have what we have. > > I can't find the exact documents but I think both Windows > MegaUltimateServer (the highest priced version of Windows Server, > whatever it's called today) and Linux (though disabled and marked > Experimental) have it, or have some kind of support for large pages > that might not be as pervasive (maybe they use it for kernel only?). I > have no idea about (Open)Solaris. VMWare documentation about large pages: http://www.vmware.com/files/pdf/large_pg_performance.pdf I think I remember reading that on Windows, the application must use a special syscall to allocate an area with large pages, but I can't find the document. From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 18:35:05 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 32341106568D; Wed, 10 Feb 2010 18:35:05 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0B6808FC17; Wed, 10 Feb 2010 18:35:03 +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 UAA07753; Wed, 10 Feb 2010 20:35:02 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4B72FC55.2090508@icyb.net.ua> Date: Wed, 10 Feb 2010 20:35:01 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Ivan Voras References: <4B72D94A.8030509@icyb.net.ua> <4B72E93C.80102@icyb.net.ua> <9bbcef731002101003r203f5189xf139700a0d48afa0@mail.gmail.com> <4B72F67F.4000209@icyb.net.ua> <9bbcef731002101026k5007075cqf97fc80404ac3fa7@mail.gmail.com> In-Reply-To: <9bbcef731002101026k5007075cqf97fc80404ac3fa7@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Strange problem with 8-stable, VMWare vSphere 4 & AMD CPUs (unexpected shutdowns) 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 Feb 2010 18:35:05 -0000 on 10/02/2010 20:26 Ivan Voras said the following: > On 10 February 2010 19:10, Andriy Gapon wrote: >> on 10/02/2010 20:03 Ivan Voras said the following: >>> When you say "very unique" is it in the "it is not Linux or Windows" >>> sense or do we do something nonstandard? >> The former - neither Linux, Windows or OpenSolaris seem to have what we have. > > I can't find the exact documents but I think both Windows > MegaUltimateServer (the highest priced version of Windows Server, > whatever it's called today) and Linux (though disabled and marked > Experimental) have it, or have some kind of support for large pages > that might not be as pervasive (maybe they use it for kernel only?). I > have no idea about (Open)Solaris. I haven't said that those OSes do not use large pages. I've said what I've said :-) -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 18:39:00 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 A1B6110656A4; Wed, 10 Feb 2010 18:39:00 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ew0-f211.google.com (mail-ew0-f211.google.com [209.85.219.211]) by mx1.freebsd.org (Postfix) with ESMTP id 0B0AB8FC1E; Wed, 10 Feb 2010 18:38:59 +0000 (UTC) Received: by ewy3 with SMTP id 3so336281ewy.13 for ; Wed, 10 Feb 2010 10:38:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=X8BktFnjK8Ic+WUIGymsiGKbzIIzBAFfqLH9T5J8yNA=; b=Pqg0lg1fu6085cZ6gP7qqKZC1Jc49Nf9zElQnbVCZS7no/Hg4opgqj7Kmmzb8fJ+4b uQca3WoYkLzw1+HvnP6aygNyqDcGZAYByPC2Fp4VpSF9HgnxA3jWcMfUwQN7tLfwK+Py oyRejcKdTlwZKkK+GlmBBbeATSWFyeLUZo5Wg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=qVqi5TkFwFztGAqDN246FtnfRoDzqUmg9f5GOm9QfjcCVbHb0t59J6QkcMUS6c3YtL 1/UvVUGN7FKSckuR/iDio+UuVuhzdfOQSYckCCwZGeOdYx1JyoM+f4lNwO3O+lZG7gqH emQQBxudVzD947ddwx9UbQvB7dgZ7cZs2dPrQ= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.88.85 with SMTP id z63mr376883wee.129.1265827138285; Wed, 10 Feb 2010 10:38:58 -0800 (PST) In-Reply-To: <4B72FC55.2090508@icyb.net.ua> References: <4B72D94A.8030509@icyb.net.ua> <4B72E93C.80102@icyb.net.ua> <9bbcef731002101003r203f5189xf139700a0d48afa0@mail.gmail.com> <4B72F67F.4000209@icyb.net.ua> <9bbcef731002101026k5007075cqf97fc80404ac3fa7@mail.gmail.com> <4B72FC55.2090508@icyb.net.ua> From: Ivan Voras Date: Wed, 10 Feb 2010 19:38:37 +0100 X-Google-Sender-Auth: c2a6d550cb8d3f7c Message-ID: <9bbcef731002101038r1ac04141t505216816489376f@mail.gmail.com> To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Strange problem with 8-stable, VMWare vSphere 4 & AMD CPUs (unexpected shutdowns) 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 Feb 2010 18:39:00 -0000 On 10 February 2010 19:35, Andriy Gapon wrote: > on 10/02/2010 20:26 Ivan Voras said the following: >> On 10 February 2010 19:10, Andriy Gapon wrote: >>> on 10/02/2010 20:03 Ivan Voras said the following: >>>> When you say "very unique" is it in the "it is not Linux or Windows" >>>> sense or do we do something nonstandard? >>> The former - neither Linux, Windows or OpenSolaris seem to have what we have. >> >> I can't find the exact documents but I think both Windows >> MegaUltimateServer (the highest priced version of Windows Server, >> whatever it's called today) and Linux (though disabled and marked >> Experimental) have it, or have some kind of support for large pages >> that might not be as pervasive (maybe they use it for kernel only?). I >> have no idea about (Open)Solaris. > > I haven't said that those OSes do not use large pages. > I've said what I've said :-) Ok :) Is there a difference between "large pages" as they are commonly known and "superpages" as in FreeBSD ? In other words - are you referencing some specific mechanism, like automatic promotion / demotion of the large pages or maybe something else? From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 18:42: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 592CF1065679 for ; Wed, 10 Feb 2010 18:42:33 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 193508FC18 for ; Wed, 10 Feb 2010 18:42:32 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id E31291FFC22; Wed, 10 Feb 2010 18:42:31 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id B23B3844A1; Wed, 10 Feb 2010 19:42:31 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> <86fx59jpti.fsf@ds4.des.no> <7d6fde3d1002100923i6bbc24a7ocaf408f4d78ec59f@mail.gmail.com> Date: Wed, 10 Feb 2010 19:42:31 +0100 In-Reply-To: <7d6fde3d1002100923i6bbc24a7ocaf408f4d78ec59f@mail.gmail.com> (Garrett Cooper's message of "Wed, 10 Feb 2010 09:23:01 -0800") Message-ID: <868wb1hqzs.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Andrew Brampton , freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 18:42:33 -0000 Garrett Cooper writes: > Dag-Erling Sm=C3=B8rgrav writes: > > A glob pattern can be trivially translated to a regular expression, but > > not the other way around. =C2=A0Basically, * in a glob pattern correspo= nds to > > [^/]*, ? corresponds to ., and [abcd] and [^abcd] have the same meaning > ^^^^ ???? ^^^^ > The former is a positive assertion, where the latter is a negative > assertion -- how can they have the same meaning? Read the entire sentence. BTW, neither of these are assertions, and neither of these is negative in any sense, they are just different ways of selecting characters from the alphabet (in the extended sense). > > as in a regular expression. =C2=A0The glob pattern syntax has no equiva= lent > > for +, ?, {m,n}, (foo|bar), etc. > > +, {}, and () -- no... that's typically an extension to shell expanded > values (IIRC). ? I can't make sense of this - I'm not sure whether you misunderstood what I wrote, or just failed to express yourself clearly... > > Finally, .* and .+ are *both* greedy. =C2=A0Perl's regular expression s= yntax > > includes non-greedy variants for both (.*? and .+? respectively). > Yes, but I didn't explicitly note those forms. No, but you claimed that .+ is not non-greedy, which is incorrect. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 18:52:44 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 A3F3C1065670 for ; Wed, 10 Feb 2010 18:52:44 +0000 (UTC) (envelope-from gujjenaveen@gmail.com) Received: from mail-px0-f203.google.com (mail-px0-f203.google.com [209.85.216.203]) by mx1.freebsd.org (Postfix) with ESMTP id 771C38FC14 for ; Wed, 10 Feb 2010 18:52:44 +0000 (UTC) Received: by pxi41 with SMTP id 41so164470pxi.27 for ; Wed, 10 Feb 2010 10:52:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=Hz6XQPGBNw5JPhjKnRtTNLR7J/qdEbRvZw69TJ2+i+A=; b=Oj/VxvFreB/rtmegoL+SLzC3Ma8jau4wSZbu043lqL9G6nyK7zXZCFxZWjs23YP+EX s1x1z430nGR8yhIR8Uil9l4Akrq9MTxqwM2YIGX0SjyufsWFyC1sipAXRw2Y4Pncgf0H 0cbFsbrcU/AkcyPJF3L2nkltmdmwu6WP8GgLk= 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=uLS8hqsMivdGkpDiLz4GW+MYcijBv04R3wTRyGOpzaMF0dCZqdEnpUiHYlGVgmGklB 4VbDf/Sl471sZm4ywbURsHb2OiiB9Mks0UVEJwkRxXiUfrzup2jlEls8bBtspi+oFdSq msj2iCZFL/Tr2kONmo8nqLGOtYLIzKrz2UQGk= MIME-Version: 1.0 Received: by 10.141.23.19 with SMTP id a19mr424128rvj.22.1265827963894; Wed, 10 Feb 2010 10:52:43 -0800 (PST) In-Reply-To: <4B72F3C7.7060004@icyb.net.ua> References: <39c945731002100925i2e466768peac89cdef15463f2@mail.gmail.com> <7d6fde3d1002100952g1518bc36r371020260e81a8c3@mail.gmail.com> <4B72F3C7.7060004@icyb.net.ua> Date: Thu, 11 Feb 2010 00:22:43 +0530 Message-ID: <39c945731002101052l16f390e4q95e82d12b5b5fde4@mail.gmail.com> From: Naveen Gujje To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Garrett Cooper , freebsd-hackers@freebsd.org Subject: Re: System() returning ECHILD error on FreeBSD 7.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 18:52:44 -0000 On Wed, Feb 10, 2010 at 11:28 PM, Andriy Gapon wrote: > on 10/02/2010 19:52 Garrett Cooper said the following: > > Isn't this section of the system(3) libcall essentially doing what > > you want, s.t. you'll never be able to get the process status when you > > call waitpid(2)? > > > > do { > > pid = _wait4(savedpid, &pstat, 0, (struct rusage *)0); > > } while (pid == -1 && errno == EINTR); > > break; > > > > You typically get status via wait*(2) when using exec*(2) or via > > the return codes from system(3), not system(3) with wait*(2)... > > Exactly. I think that SIGCHLD handler would effectively 'reap' the child > and thus > wait*() in system would rightfully return ECHILD (perhaps after doing EINTR > iteration of the loop). > > Since we block SIGCHLD signal in system(3) till we return from wait4(), i think there is no way in which SIGCHLD handler gets invoked? Am I correct or Am I missing something? If I do the following then I don't see any problem oldsa = signal(SIGCHLD, SIG_DFL); if (0 != system(command)) exit(1); signal(SIGCHLD, oldsa); Thanks, Naveen Gujje -- > Andriy Gapon > From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 20:47: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 425DE1065676; Wed, 10 Feb 2010 20:47:12 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id B9BFB8FC18; Wed, 10 Feb 2010 20:47:11 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o1AKkru2085174; Wed, 10 Feb 2010 21:47:08 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o1AKkrvj085173; Wed, 10 Feb 2010 21:46:53 +0100 (CET) (envelope-from olli) Date: Wed, 10 Feb 2010 21:46:53 +0100 (CET) Message-Id: <201002102046.o1AKkrvj085173@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, amdmi3@amdmi3.ru In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 10 Feb 2010 21:47:08 +0100 (CET) Cc: Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 20:47:12 -0000 Dmitry Marakasov wrote: > I think I've reported that before, the I thought it's been fixed, > however I still get data corruptions when writing on NFS volumes. > Now I wonder - is nobody really using NFS, or do I have that much > of uncommon setup, or this is some kind of local problem? NFS works fine for me. I'm using -stable, not -release, though. > Client: 8.0-RELEASE i386 > Server: 8.0-RELEASE amd64 > > mount options: > nfs rw,nosuid,noexec,nfsv3,intr,soft,tcp,bg,nolockd I recommend not using the "soft" option. This is an excerpt from Solaris' mount_nfs(1M) manpage: File systems that are mounted read-write or that con- tain executable files should always be mounted with the hard option. Applications using soft mounted file systems may incur unexpected I/O errors, file corrup- tion, and unexpected program core dumps. The soft option is not recommended. FreeBSD's manual page doesn't contain such a warning, but maybe it should. (It contains a warning not to use "soft" with NFSv4, though, for different reasons.) Also note that the "nolockd" option means that processes on different clients won't see each other's locks. That means that you will get corruption if they rely on locking. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Perl will consistently give you what you want, unless what you want is consistency." -- Larry Wall From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 21:36:22 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 0644F1065696 for ; Wed, 10 Feb 2010 21:36:22 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id A855E8FC20 for ; Wed, 10 Feb 2010 21:36:21 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id A82C91DD416; Wed, 10 Feb 2010 22:36:20 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 948F9228BE; Wed, 10 Feb 2010 22:36:20 +0100 (CET) Date: Wed, 10 Feb 2010 22:36:20 +0100 From: Jilles Tjoelker To: Naveen Gujje Message-ID: <20100210213620.GA94346@stack.nl> References: <39c945731002092314u4a8fd100q69c0735a11e9063a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <39c945731002092314u4a8fd100q69c0735a11e9063a@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: System() returning ECHILD error on FreeBSD 7.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 21:36:22 -0000 On Wed, Feb 10, 2010 at 12:44:57PM +0530, Naveen Gujje wrote: > [SIGCHLD handler that calls waitpid()] > And, in some other part of the code, we call system() to add an ethernet > interface. This system() call is returning -1 with errno set to ECHILD, > though the passed command is executed successfully. I have noticed that, > the problem is observed only after we register SigChildHandler. If I have a > simple statement like system("ls") before and after the call to > signal(SIGCHLD, SigChildHandler), the call before setting signal handler > succeeds without errors and the call after setting signal handler returns -1 > with errno set to ECHILD. > Here, I believe that within the system() call, the child exited before the > parent got a chance to call _wait4 and thus resulted in ECHILD error. But, > for the child to exit without notifying the parent, SIGCHLD has to be set to > SIG_IGN in the parent and this is not the case, because we are already > setting it to SigChildHandler. If I set SIGCHLD to SIG_DFL before calling > system() then i don't see this problem. > I would like to know how setting SIGCHLD to SIG_DFL or SigChildHanlder is > making the difference. I think your process is multi-threaded. In a single-threaded process, system()'s signal masking will ensure it will reap the zombie, leaving the signal handler with nothing (in fact, as of FreeBSD 7.0 it will not be called at all unless there are other child processes). In a multi-threaded process, each thread has its own signal mask and system() can only affect its own thread's signal mask. If another thread has SIGCHLD unblocked, the signal handler will race with system() trying to call waitpid() first. Possible fixes are using siginfo_t information to only waitpid() child processes you know about, setting up the signal masks so the bad situation does not occur (note that the signal mask is inherited across pthread_create()) and calling fork/execve and managing the child process exit yourself. Note that POSIX does not require system() to be thread-safe. -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 23: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 633A01065731 for ; Wed, 10 Feb 2010 23:40:59 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.210.172]) by mx1.freebsd.org (Postfix) with ESMTP id E12768FC14 for ; Wed, 10 Feb 2010 23:40:58 +0000 (UTC) Received: by yxe2 with SMTP id 2so453147yxe.7 for ; Wed, 10 Feb 2010 15:40:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=CLOEuhbWpgrpVlF6/BZ8hpw1AF36MZyGXjDhwvnE5OU=; b=i1HPsAEMotUSNZ/K3j6byjZe8b1gm8TAt9K/+mdn4ledVWjjWzbjZEp5NpX6RXG+vd lGCWU3RBUoKMb8sgSkXy8Np93k3bYApbdbSR37kZuOlswc0aHXORLj1n6Nz0ZJ/9tVpv dVcmuWnDFb7ZPdu0OIFYjNhk3hVPKyPn1jh/E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=XAKH1zcnQOSJfwbGKrgjHGUMvrDMKfycWopnPrlqX7o+YD9C998j7zY+jR4i4VcvxQ 7rMAWE16n+inOkdcOr9SqOo1ptG5YzvxM5ViDeYO+bj9dmDm/ZyS23FNAwLk+MLNpEvd r2ueQN7Pv2lgC4zEZXplL/5GWPPEvo1/drz60= Received: by 10.100.54.5 with SMTP id c5mr1348706ana.188.1265845257835; Wed, 10 Feb 2010 15:40:57 -0800 (PST) Received: from dhcp-173-37-1-163.cisco.com (nat.ironport.com [63.251.108.100]) by mx.google.com with ESMTPS id 15sm1192562gxk.8.2010.02.10.15.40.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Feb 2010 15:40:56 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=iso-8859-1 From: Garrett Cooper In-Reply-To: <868wb1hqzs.fsf@ds4.des.no> Date: Wed, 10 Feb 2010 15:40:54 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <44741B44-5EDA-4DDE-8C92-B74465BCA670@gmail.com> References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> <86fx59jpti.fsf@ds4.des.no> <7d6fde3d1002100923i6bbc24a7ocaf408f4d78ec59f@mail.gmail.com> <868wb1hqzs.fsf@ds4.des.no> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1077) Cc: Andrew Brampton , freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 23:40:59 -0000 On Feb 10, 2010, at 10:42 AM, Dag-Erling Sm=F8rgrav wrote: > Garrett Cooper writes: >> Dag-Erling Sm=F8rgrav writes: >>> A glob pattern can be trivially translated to a regular expression, = but >>> not the other way around. Basically, * in a glob pattern = corresponds to >>> [^/]*, ? corresponds to ., and [abcd] and [^abcd] have the same = meaning >> ^^^^ ???? ^^^^ >> The former is a positive assertion, where the latter is a negative >> assertion -- how can they have the same meaning? >=20 > Read the entire sentence. BTW, neither of these are assertions, and > neither of these is negative in any sense, they are just different = ways > of selecting characters from the alphabet (in the extended sense). Yes, I mentally omitted the second half because of the sentence = construction. Sorry ><. >>> as in a regular expression. The glob pattern syntax has no = equivalent >>> for +, ?, {m,n}, (foo|bar), etc. >>=20 >> +, {}, and () -- no... that's typically an extension to shell = expanded >> values (IIRC). ? >=20 > I can't make sense of this - I'm not sure whether you misunderstood = what > I wrote, or just failed to express yourself clearly... Ok -- redo: +, {} and () aren't typical shell glob operators. They're = typically extensions in certain shells (bash for instance). >>> Finally, .* and .+ are *both* greedy. Perl's regular expression = syntax >>> includes non-greedy variants for both (.*? and .+? respectively). >> Yes, but I didn't explicitly note those forms. >=20 > No, but you claimed that .+ is not non-greedy, which is incorrect. Yes. My previous understanding was incorrect. Thanks for the = clarification :). Cheers, -Garrett= From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 02:25:46 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 66F38106566C for ; Thu, 11 Feb 2010 02:25:46 +0000 (UTC) (envelope-from nil@opensesame.st) Received: from mail-px0-f199.google.com (mail-px0-f199.google.com [209.85.216.199]) by mx1.freebsd.org (Postfix) with ESMTP id 4DC318FC12 for ; Thu, 11 Feb 2010 02:25:45 +0000 (UTC) Received: by pxi37 with SMTP id 37so446201pxi.9 for ; Wed, 10 Feb 2010 18:25:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.249.21 with SMTP id w21mr708296wfh.302.1265855145278; Wed, 10 Feb 2010 18:25:45 -0800 (PST) X-Originating-IP: [149.106.192.131] From: james toy Date: Wed, 10 Feb 2010 21:25:25 -0500 Message-ID: <11dbd75e1002101825u78d90ef0ufe6015045ecf788a@mail.gmail.com> To: freebsd-hackers , David Hemmendinger Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: KLD hello.ko: depends on kernel - not available or version mismatch 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 Feb 2010 02:25:46 -0000 Hello Hackers, I am working on learning to write FreeBSD drivers; however, I have some practice writing IOKit drivers for MacOSX (they are entirely different I know!). The code I am working with can be found here: http://pastebin.com/m2bbb393c and I am getting the error: dontpanic# kldload ./hello.ko kldload: can't load ./hello.ko: Exec format error dmesg reads: dontpanic# kldload ./hello.ko kldload: can't load ./hello.ko: Exec format error and finally uname -a: FreeBSD dontpanic.union.edu 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r198859: Wed Feb 10 09:59:54 EST 2010 james@dontpanic.union.edu:/usr/obj/usr/src_klog/sys/DONTPANIC amd64 any information pointing me to being able to load this driver would be greatly appreciated. respectfully, james toy From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 05:15:11 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 95084106566B for ; Thu, 11 Feb 2010 05:15:11 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward14.mail.yandex.net (forward14.mail.yandex.net [95.108.130.92]) by mx1.freebsd.org (Postfix) with ESMTP id 439AF8FC08 for ; Thu, 11 Feb 2010 05:15:11 +0000 (UTC) Received: from smtp3.mail.yandex.net (smtp3.mail.yandex.net [77.88.46.103]) by forward14.mail.yandex.net (Yandex) with ESMTP id 3139F26819F8; Thu, 11 Feb 2010 08:04:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1265864646; bh=fqevP1+NUxG9jgWh0QSe/Ji7NuN7K8VWZSwgHwSUB5k=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=w1VGMUoAkw28vwQuBdmHBLAiw59zoeSyTdNfAVB0CjsDn2wjiIT3U9kDsLSB9SjY8 QRxxhE3yTW2nBOkM5q8zg9EgbvYzp0nL6SnwCV3ODmwb1KzNc20wkeVG09skXpI1SM OqaiN+P86XfGpw4K1I86VEjPyrmGfWmauE3qgwbc= Received: from [127.0.0.1] (ns.kirov.so-ups.ru [77.72.136.145]) by smtp3.mail.yandex.net (Yandex) with ESMTPSA id D29A18B8155; Thu, 11 Feb 2010 08:04:05 +0300 (MSK) Message-ID: <4B738FC5.7020807@yandex.ru> Date: Thu, 11 Feb 2010 08:04:05 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: james toy References: <11dbd75e1002101825u78d90ef0ufe6015045ecf788a@mail.gmail.com> In-Reply-To: <11dbd75e1002101825u78d90ef0ufe6015045ecf788a@mail.gmail.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-TimeMark: 1265864646 X-Yandex-Spam: 1 X-Yandex-Front: smtp3.mail.yandex.net Cc: freebsd-hackers , David Hemmendinger Subject: Re: KLD hello.ko: depends on kernel - not available or version mismatch 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 Feb 2010 05:15:11 -0000 On 11.02.2010 5:25, james toy wrote: > any information pointing me to being able to load this driver would be > greatly appreciated. Probably you have source code with different __FreeBSD_version. Check output of these commands: > grep __FreeBSD_version /usr/src/sys/param.h > sysctl kern.osreldate -- WBR, Andrey V. Elsukov From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 07: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 B42B0106566B for ; Thu, 11 Feb 2010 07:04:29 +0000 (UTC) (envelope-from julian@elischer.org) Received: from nlpi101.prodigy.net (nlpi101.prodigy.net [207.115.36.117]) by mx1.freebsd.org (Postfix) with ESMTP id 669AA8FC16 for ; Thu, 11 Feb 2010 07:04:29 +0000 (UTC) X-ORBL: [75.5.243.60] Received: from julian-mac.elischer.org (adsl-75-5-243-60.dsl.scrm01.sbcglobal.net [75.5.243.60]) by nlpi101.prodigy.net (8.13.8 out.ldap.dk.spool/8.13.8) with ESMTP id o1B74RrT003553; Thu, 11 Feb 2010 01:04:28 -0600 Message-ID: <4B73AC28.2000402@elischer.org> Date: Wed, 10 Feb 2010 23:05:12 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: John Baldwin References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2699@MBX03.exg5.exghost.com> <23F2E2B0457F4046AD8350DAFB86C41130D434E7@MBX03.exg5.exghost.com> <7B9397B189EB6E46A5EE7B4C8A4BB7CB3849F770@MBX03.exg5.exghost.com> <201002100838.11381.jhb@freebsd.org> In-Reply-To: <201002100838.11381.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Peter Steele Subject: Re: How can I force boot from alternate drive with boot.config? 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 Feb 2010 07:04:29 -0000 John Baldwin wrote: > I think the unit number is largely ignored now. The kernel used to believe it > for finding /, but the loader now reads /etc/fstab and sets a variable in kenv > to tell the kernel where to find /. One of the most annoying "improvements" for the decade from my perspective.. because if / is not going to be where the loader thinks / is (because that is a different F with a different /etc/fstab) then you need to do lots of fancy footwork to undo the damage. Oh and it's not terribly well documented how to get around it. (that I've found) From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 07:04: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 5CDFE106566B for ; Thu, 11 Feb 2010 07:04:56 +0000 (UTC) (envelope-from julian@elischer.org) Received: from nlpi101.prodigy.net (nlpi101.prodigy.net [207.115.36.117]) by mx1.freebsd.org (Postfix) with ESMTP id 14A168FC19 for ; Thu, 11 Feb 2010 07:04:56 +0000 (UTC) X-ORBL: [75.5.243.60] Received: from julian-mac.elischer.org (adsl-75-5-243-60.dsl.scrm01.sbcglobal.net [75.5.243.60]) by nlpi101.prodigy.net (8.13.8 out.ldap.dk.spool/8.13.8) with ESMTP id o1B74ApC003498; Thu, 11 Feb 2010 01:04:11 -0600 Message-ID: <4B73AC11.7070809@elischer.org> Date: Wed, 10 Feb 2010 23:04:49 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: james toy References: <11dbd75e1002101825u78d90ef0ufe6015045ecf788a@mail.gmail.com> In-Reply-To: <11dbd75e1002101825u78d90ef0ufe6015045ecf788a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers , David Hemmendinger Subject: Re: KLD hello.ko: depends on kernel - not available or version mismatch 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 Feb 2010 07:04:56 -0000 james toy wrote: > Hello Hackers, > > I am working on learning to write FreeBSD drivers; however, I have > some practice writing IOKit drivers for MacOSX (they are entirely > different I know!). The code I am working with can be found here: > > http://pastebin.com/m2bbb393c > > and I am getting the error: > > dontpanic# kldload ./hello.ko > kldload: can't load ./hello.ko: Exec format error > > dmesg reads: > > dontpanic# kldload ./hello.ko > kldload: can't load ./hello.ko: Exec format error > > and finally uname -a: > > FreeBSD dontpanic.union.edu 9.0-CURRENT FreeBSD 9.0-CURRENT #1 > r198859: Wed Feb 10 09:59:54 EST 2010 > james@dontpanic.union.edu:/usr/obj/usr/src_klog/sys/DONTPANIC amd64 > > any information pointing me to being able to load this driver would be > greatly appreciated. > That error is a sort of catch-all. But the kernel linker should put some more specific information out in the kernel console/dmseg. so 'dmesg' may help you if you have something like a bad symbol. > respectfully, > > james toy > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 09:36:23 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 6701B106566B for ; Thu, 11 Feb 2010 09:36:23 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 241458FC14 for ; Thu, 11 Feb 2010 09:36:22 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 19F821FFC22; Thu, 11 Feb 2010 09:36:22 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id DE471844A6; Thu, 11 Feb 2010 10:36:21 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> <86fx59jpti.fsf@ds4.des.no> <7d6fde3d1002100923i6bbc24a7ocaf408f4d78ec59f@mail.gmail.com> <868wb1hqzs.fsf@ds4.des.no> <44741B44-5EDA-4DDE-8C92-B74465BCA670@gmail.com> Date: Thu, 11 Feb 2010 10:36:21 +0100 In-Reply-To: <44741B44-5EDA-4DDE-8C92-B74465BCA670@gmail.com> (Garrett Cooper's message of "Wed, 10 Feb 2010 15:40:54 -0800") Message-ID: <86wrykglm2.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Andrew Brampton , freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? 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 Feb 2010 09:36:23 -0000 Garrett Cooper writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Garrett Cooper writes: > > > Dag-Erling Sm=C3=B8rgrav writes: > > > > The glob pattern syntax has no equivalent for +, ?, {m,n}, > > > > (foo|bar), etc. > > > +, {}, and () -- no... that's typically an extension to shell expanded > > > values (IIRC). ? > > I can't make sense of this - I'm not sure whether you misunderstood what > > I wrote, or just failed to express yourself clearly... > Ok -- redo: +, {} and () aren't typical shell glob operators. I never said they were... > They're typically extensions in certain shells (bash for instance). I don't know of any shell where {} has the same meaning as in regular expressions; it's usually an alternation that's evaluated before globbing. For instance, in both bash and zsh, the following will create foo.txt, bar.txt and baz.txt: touch {foo,bar,baz}.txt whereas if {} were evaluated during globbing, the glob pattern wouldn't match anything, and the command would either fail or create the file "{foo,bar,baz}.txt". Zsh has # for +, for {m,n} and (foo|bar) for (foo|bar) (it treats the pipe character differently when it's inside parentheses). Bash has neither of these. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 13:06:13 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 2635B106566B for ; Thu, 11 Feb 2010 13:06:13 +0000 (UTC) (envelope-from brampton@gmail.com) Received: from mail-fx0-f226.google.com (mail-fx0-f226.google.com [209.85.220.226]) by mx1.freebsd.org (Postfix) with ESMTP id AA5028FC14 for ; Thu, 11 Feb 2010 13:06:12 +0000 (UTC) Received: by fxm26 with SMTP id 26so1246110fxm.13 for ; Thu, 11 Feb 2010 05:06:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=Nao+qt1TkqKMQ9wxx8BVi2o7kyc31QVDNgc0NvyVWDY=; b=SSXDU9jva2ctyoglrytcnbSZiezUCodxapD1SXX+OROoa34PWnrmiRxG3E7R82NKbC nhR2UODoi/bG1wpzTALaSxzw8LbVOFQQNIwIbAper6mpm6PyYr2LXoWkPDJLvjpAemU/ jM4knMNBOwfzFEBOkoDakgaCsCvnYBrmdMXck= 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=XwAYPG0QAN39lrV3W6MUzF2XBVxXC/h7Mj3qmT/2iy2yHMy9ecTc99GjimFi9o8xCy D3atflmcwJYtZrpNadlE0kySkULsBvj27i42T+IiGnduf9MWRtWZjhBT34/RYUL7fs6A lQ9Nts8w3YTewbZ1wagOIjE+TQC4GyW7Mpz8U= MIME-Version: 1.0 Sender: brampton@gmail.com Received: by 10.223.65.12 with SMTP id g12mr2188687fai.69.1265893567741; Thu, 11 Feb 2010 05:06:07 -0800 (PST) In-Reply-To: <11dbd75e1002101825u78d90ef0ufe6015045ecf788a@mail.gmail.com> References: <11dbd75e1002101825u78d90ef0ufe6015045ecf788a@mail.gmail.com> Date: Thu, 11 Feb 2010 13:06:07 +0000 X-Google-Sender-Auth: 8ddd07daf4d4c63f Message-ID: From: Andrew Brampton To: james toy Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers , David Hemmendinger Subject: Re: KLD hello.ko: depends on kernel - not available or version mismatch 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 Feb 2010 13:06:13 -0000 On Thu, Feb 11, 2010 at 2:25 AM, james toy wrote: > Hello Hackers, > > =C2=A0 =C2=A0I am working on learning to write FreeBSD drivers; however, = I have > some practice writing IOKit drivers for MacOSX (they are entirely > different I know!). =C2=A0The code I am working with can be found here: > > http://pastebin.com/m2bbb393c > > and I am getting the error: > > dontpanic# kldload ./hello.ko > kldload: can't load ./hello.ko: Exec format error > > dmesg reads: > > dontpanic# kldload ./hello.ko > kldload: can't load ./hello.ko: Exec format error > > and finally uname -a: > > FreeBSD dontpanic.union.edu 9.0-CURRENT FreeBSD 9.0-CURRENT #1 > r198859: Wed Feb 10 09:59:54 EST 2010 > james@dontpanic.union.edu:/usr/obj/usr/src_klog/sys/DONTPANIC =C2=A0amd64 > > any information pointing me to being able to load this driver would be > greatly appreciated. > > respectfully, > > james toy I just built your code on my FreeBSD 8 box and it compiles and loads fine. How are you compiling your code? I used this makefile http://pastebin.com/f3ab71917 and all I typed was this: make sudo make install sudo make load and I get the "hello, fail" message, and then I typed sudo make unload and I got the "unload fail" message. Andrew From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 13:57:23 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 6B03A1065672; Thu, 11 Feb 2010 13:57:23 +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 3AFD48FC0A; Thu, 11 Feb 2010 13:57:23 +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 E183C46B51; Thu, 11 Feb 2010 08:57:22 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 2A8728A021; Thu, 11 Feb 2010 08:57:22 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 11 Feb 2010 08:13:25 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <4B72FC55.2090508@icyb.net.ua> <9bbcef731002101038r1ac04141t505216816489376f@mail.gmail.com> In-Reply-To: <9bbcef731002101038r1ac04141t505216816489376f@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201002110813.26005.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 11 Feb 2010 08:57:22 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-stable@freebsd.org, Ivan Voras , Andriy Gapon Subject: Re: Strange problem with 8-stable, VMWare vSphere 4 & AMD CPUs (unexpected shutdowns) 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 Feb 2010 13:57:23 -0000 On Wednesday 10 February 2010 1:38:37 pm Ivan Voras wrote: > On 10 February 2010 19:35, Andriy Gapon wrote: > > on 10/02/2010 20:26 Ivan Voras said the following: > >> On 10 February 2010 19:10, Andriy Gapon wrote: > >>> on 10/02/2010 20:03 Ivan Voras said the following: > >>>> When you say "very unique" is it in the "it is not Linux or Windows" > >>>> sense or do we do something nonstandard? > >>> The former - neither Linux, Windows or OpenSolaris seem to have what we have. > >> > >> I can't find the exact documents but I think both Windows > >> MegaUltimateServer (the highest priced version of Windows Server, > >> whatever it's called today) and Linux (though disabled and marked > >> Experimental) have it, or have some kind of support for large pages > >> that might not be as pervasive (maybe they use it for kernel only?). I > >> have no idea about (Open)Solaris. > > > > I haven't said that those OSes do not use large pages. > > I've said what I've said :-) > > Ok :) > > Is there a difference between "large pages" as they are commonly known > and "superpages" as in FreeBSD ? In other words - are you referencing > some specific mechanism, like automatic promotion / demotion of the > large pages or maybe something else? Yes, the automatic promotion / demotion. That is a far-less common feature. FreeBSD/i386 has used large pages for the kernel text as far back as at least 4.x, but that is not the same as superpages. Linux does not have automatic promotion / demotion to my knowledge. I do not know about other OS's. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 13:57: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 5BAC0106566B for ; Thu, 11 Feb 2010 13:57:25 +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 2C1348FC12 for ; Thu, 11 Feb 2010 13:57:25 +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 CE68A46B2C; Thu, 11 Feb 2010 08:57:24 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 572F58A024; Thu, 11 Feb 2010 08:57:23 -0500 (EST) From: John Baldwin To: Julian Elischer Date: Thu, 11 Feb 2010 08:34:05 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2699@MBX03.exg5.exghost.com> <201002100838.11381.jhb@freebsd.org> <4B73AC28.2000402@elischer.org> In-Reply-To: <4B73AC28.2000402@elischer.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201002110834.05651.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 11 Feb 2010 08:57:23 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, Peter Steele Subject: Re: How can I force boot from alternate drive with boot.config? 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 Feb 2010 13:57:25 -0000 On Thursday 11 February 2010 2:05:12 am Julian Elischer wrote: > John Baldwin wrote: > > > I think the unit number is largely ignored now. The kernel used to believe it > > for finding /, but the loader now reads /etc/fstab and sets a variable in kenv > > to tell the kernel where to find /. > > One of the most annoying "improvements" for the decade from my > perspective.. You can't communicate anything non-trivial like using a gmirror or software-RAID for / otherwise. The boothowto structure is very limited in the root device hinting it can provide. > because if / is not going to be where the loader thinks / is (because > that is a different F with a different /etc/fstab) then you need to > do lots of fancy footwork to undo the damage. Generally the fix for that is to boot to the right partition in the first place so that the loader reads the right /etc/fstab. You are already using the wrong kernel and modules if you are reading the wrong /etc/fstab. > Oh and it's not terribly well documented how to get around it. > (that I've found) Just set vfs.mountroot.from to the device you want to use for / in loader.conf. The loader doesn't set the variable if it is already set. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 18:13: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 322481065679; Thu, 11 Feb 2010 18:13:59 +0000 (UTC) (envelope-from alan.l.cox@gmail.com) Received: from mail-pz0-f201.google.com (mail-pz0-f201.google.com [209.85.222.201]) by mx1.freebsd.org (Postfix) with ESMTP id E19498FC08; Thu, 11 Feb 2010 18:13:58 +0000 (UTC) Received: by pzk39 with SMTP id 39so1792550pzk.15 for ; Thu, 11 Feb 2010 10:13:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=tCuSMuEenGP4x8rPYtsz1iYb4QT2suWSUVTxtIOCkP0=; b=XTtGm1uwVKy7LMDs084Y8qiSK6tP1pFLvMD42xrXoX2GLKHBpCCrIXvFwLcEcpU0qr YtIo8Bgr1vfO4GjFxZ/9WiXpo+sS4Llp2rZ6QRUnHZR2wzq/D7dzpWc9cVh1V5Yo1wQw kNtbLerU5EHj+YJfsbTpNNN5GJPz921YF/MxI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=L+9R1dNGYDTI7/t3B8Kb5XRCZu4c4Z9SfHRdeL6NtAy1a3MWLYkW13eo19VyBSZiFk +gUMU7GEujtozGFCr7Ggs3MQnnkTsKAThAFJVl9xe01udLHAOsP/1D+SnoN7oODgKaVJ 945hjrL4ILKl7I0MHo1FJQwqPKReecOcOL2ck= MIME-Version: 1.0 Received: by 10.143.21.14 with SMTP id y14mr154051wfi.67.1265912036403; Thu, 11 Feb 2010 10:13:56 -0800 (PST) In-Reply-To: <201002110813.26005.jhb@freebsd.org> References: <4B72FC55.2090508@icyb.net.ua> <9bbcef731002101038r1ac04141t505216816489376f@mail.gmail.com> <201002110813.26005.jhb@freebsd.org> Date: Thu, 11 Feb 2010 12:13:56 -0600 Message-ID: From: Alan Cox To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org, Ivan Voras , Andriy Gapon Subject: Re: Strange problem with 8-stable, VMWare vSphere 4 & AMD CPUs (unexpected shutdowns) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: alc@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2010 18:13:59 -0000 On Thu, Feb 11, 2010 at 7:13 AM, John Baldwin wrote: > On Wednesday 10 February 2010 1:38:37 pm Ivan Voras wrote: > > On 10 February 2010 19:35, Andriy Gapon wrote: > > > on 10/02/2010 20:26 Ivan Voras said the following: > > >> On 10 February 2010 19:10, Andriy Gapon wrote: > > >>> on 10/02/2010 20:03 Ivan Voras said the following: > > >>>> When you say "very unique" is it in the "it is not Linux or Windows" > > >>>> sense or do we do something nonstandard? > > >>> The former - neither Linux, Windows or OpenSolaris seem to have what > we > have. > > >> > > >> I can't find the exact documents but I think both Windows > > >> MegaUltimateServer (the highest priced version of Windows Server, > > >> whatever it's called today) and Linux (though disabled and marked > > >> Experimental) have it, or have some kind of support for large pages > > >> that might not be as pervasive (maybe they use it for kernel only?). I > > >> have no idea about (Open)Solaris. > > > > > > I haven't said that those OSes do not use large pages. > > > I've said what I've said :-) > > > > Ok :) > > > > Is there a difference between "large pages" as they are commonly known > > and "superpages" as in FreeBSD ? In other words - are you referencing > > some specific mechanism, like automatic promotion / demotion of the > > large pages or maybe something else? > > Yes, the automatic promotion / demotion. That is a far-less common > feature. > FreeBSD/i386 has used large pages for the kernel text as far back as at > least > 4.x, but that is not the same as superpages. Linux does not have automatic > promotion / demotion to my knowledge. I do not know about other OS's. > > A comparison of current large page support among Unix-like and Windows operating systems has two dimensions: (1) whether or not the creation of large pages for applications is automatic and (2) whether or not the machine administrator has to statically partition the machine's physical memory between large and small pages at boot time. For FreeBSD, large pages are created automatically and there is not a static partitioning of physical memory. In contrast, Linux does not create large pages automatically and does require a static partitioning. Specifically, Linux requires the administrator to explicitly and statically partition the machine's physical memory at boot time into two parts, one that is dedicated to large pages and another for general use. To utilize large pages an application has to explicitly request memory from the dedicated large pages pool. However, to make this somewhat easier, but not automatic, there do exist re-implementations of malloc that you can explicitly link with your application. In Solaris, the application has to explicitly request the use of large pages, either via explicit kernel calls in the program or from the command line with support from a library. However, there is not a static partitioning of physical memory. So, for example, when you run the Sun jdk on Solaris, it explicitly requests large pages for much of its data, and this works without administrator having to configure the machine for large page usage. To the best of my knowledge, Windows is just like Solaris. Alan From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 18:30:52 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 6441D106566C; Thu, 11 Feb 2010 18:30:52 +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 35DEB8FC1A; Thu, 11 Feb 2010 18:30:52 +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 D777646B09; Thu, 11 Feb 2010 13:30:51 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 371E48A01F; Thu, 11 Feb 2010 13:30:51 -0500 (EST) From: John Baldwin To: freebsd-stable@freebsd.org Date: Thu, 11 Feb 2010 12:55:46 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <20100210174338.GC39752@hades.panopticon> In-Reply-To: <20100210174338.GC39752@hades.panopticon> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201002111255.46256.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 11 Feb 2010 13:30:51 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, Dmitry Marakasov Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 18:30:52 -0000 On Wednesday 10 February 2010 12:43:38 pm Dmitry Marakasov wrote: > Hi! > > I think I've reported that before, the I thought it's been fixed, > however I still get data corruptions when writing on NFS volumes. > Now I wonder - is nobody really using NFS, or do I have that much > of uncommon setup, or this is some kind of local problem? > > Client: 8.0-RELEASE i386 > Server: 8.0-RELEASE amd64 > > mount options: > nfs rw,nosuid,noexec,nfsv3,intr,soft,tcp,bg,nolockd > > Server has ZFS, but the same thing happens when sharing UFS placed on > md(4). > > I've prepared a special 1GB file to determine the details of corruption: > it's filled with 32-bit numbers each equal to it's own offset in the > file. That is, like that: > > 00000000 00 00 00 00 04 00 00 00 08 00 00 00 0c 00 00 00 |................| > 00000010 10 00 00 00 14 00 00 00 18 00 00 00 1c 00 00 00 |................| > 00000020 20 00 00 00 24 00 00 00 28 00 00 00 2c 00 00 00 | ...$...(...,...| > 00000030 30 00 00 00 34 00 00 00 38 00 00 00 3c 00 00 00 |0...4...8...<...| > > I've copied that file over NFS from client to server around 50 > times, and got 3 corruptions on 8th, 28th and 36th copies. > > Case1: single currupted block 3779CF88-3779FFFF (12408 bytes). > Data in block is shifted 68 bytes up, loosing first 68 bytes are > filling last 68 bytes with garbage. Interestingly, among that garbage > is my hostname. Is it the hostname of the server or the client? > Case2: single currupted block 2615CFA0-2615FFFF (12384 bytes). > Data is shifted by 44 bytes in the same way. > > Case3: single currepted block 3AA947A8-3AA97FFF (14424 bytes). > Data is shifted by 36 bytes in the same way. > > Any ideas? > > PS. Diffs of corrupted blocks in a text format are here: > http://people.freebsd.org/~amdmi3/diff.1.txt > http://people.freebsd.org/~amdmi3/diff.2.txt > http://people.freebsd.org/~amdmi3/diff.3.txt Can you reproduce this using a non-FreeBSD server with a FreeBSD client or a non-FreeBSD client with a FreeBSD server? That would narrow down the breakage to either the client or the server. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 18:59: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 85BDF1065693 for ; Thu, 11 Feb 2010 18:59:59 +0000 (UTC) (envelope-from gujjenaveen@gmail.com) Received: from mail-pz0-f189.google.com (mail-pz0-f189.google.com [209.85.222.189]) by mx1.freebsd.org (Postfix) with ESMTP id 592EF8FC0C for ; Thu, 11 Feb 2010 18:59:59 +0000 (UTC) Received: by pzk27 with SMTP id 27so172182pzk.27 for ; Thu, 11 Feb 2010 10:59:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=21a1V4qO2A4msMCo7nQq1+RQJEBwrAHg/OdJfQx1IzE=; b=IbY5ZQI6ZEOrWJyj8WrVYtDN/upWy1+qbmUejy07gPQ41OvVynohT4rUgoSMbYDw40 BQMSYQ2Qbfn0dqGhmWxRt0wk1J0ucNpbx7TVkeQi9s96T3ln4jtkL3Vvx89GjLZ8+Nrw L3mVah6/iNhaoWYrCLRAOP6JXBcNcN1f++PbY= 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=NpMLTGcNWHGLlTssSBhmCrbLaYX4MQpk+8PWI+ie/0xfoxBc0wv2TPAH6zmpPEP6tg VVKiQ/1Kz+16JlWxXkzv3Wy+dQeefgJC5xjDUNjum2xEto7um/g2ImU61jkcesr9mRgN fzkzf7nxf8zObEcwzeJDm6ulGTtycGOegG25E= MIME-Version: 1.0 Received: by 10.141.13.3 with SMTP id q3mr169744rvi.204.1265914791085; Thu, 11 Feb 2010 10:59:51 -0800 (PST) In-Reply-To: <20100210213620.GA94346@stack.nl> References: <39c945731002092314u4a8fd100q69c0735a11e9063a@mail.gmail.com> <20100210213620.GA94346@stack.nl> Date: Fri, 12 Feb 2010 00:29:51 +0530 Message-ID: <39c945731002111059g1d8994c4ia3adc3813715ab07@mail.gmail.com> From: Naveen Gujje To: Jilles Tjoelker Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: System() returning ECHILD error on FreeBSD 7.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2010 18:59:59 -0000 On Thu, Feb 11, 2010 at 3:06 AM, Jilles Tjoelker wrote: > On Wed, Feb 10, 2010 at 12:44:57PM +0530, Naveen Gujje wrote: > > [SIGCHLD handler that calls waitpid()] > > > And, in some other part of the code, we call system() to add an ethernet > > interface. This system() call is returning -1 with errno set to ECHILD, > > though the passed command is executed successfully. I have noticed that, > > the problem is observed only after we register SigChildHandler. If I have > a > > simple statement like system("ls") before and after the call to > > signal(SIGCHLD, SigChildHandler), the call before setting signal handler > > succeeds without errors and the call after setting signal handler returns > -1 > > with errno set to ECHILD. > > > Here, I believe that within the system() call, the child exited before > the > > parent got a chance to call _wait4 and thus resulted in ECHILD error. > But, > > for the child to exit without notifying the parent, SIGCHLD has to be set > to > > SIG_IGN in the parent and this is not the case, because we are already > > setting it to SigChildHandler. If I set SIGCHLD to SIG_DFL before calling > > system() then i don't see this problem. > > > I would like to know how setting SIGCHLD to SIG_DFL or SigChildHanlder is > > making the difference. > > I think your process is multi-threaded. In a single-threaded process, > system()'s signal masking will ensure it will reap the zombie, leaving > the signal handler with nothing (in fact, as of FreeBSD 7.0 it will not > be called at all unless there are other child processes). > > In a multi-threaded process, each thread has its own signal mask and > system() can only affect its own thread's signal mask. If another thread > has SIGCHLD unblocked, the signal handler will race with system() trying > to call waitpid() first. > > This makes sense. Bear with my ignorance, but will the signal handlers be common for all or will each thread has its own signal handler? Suppose, initially I set SIGCHLD to SIG_DFL, and created some pthreads, and from the main process, I set SIGCHLD to my_handler, will it result in invoking my_handler for signals generated from within pthreads? And, can a pthread generate a SIGCHLD signal on termination? If not, what other possibilities are there for a pthread to generate SIGCHLD signal? > Possible fixes are using siginfo_t information to only waitpid() child > processes you know about, setting up the signal masks so the bad > situation does not occur (note that the signal mask is inherited across > pthread_create()) and calling fork/execve and managing the child process > exit yourself. > > Note that POSIX does not require system() to be thread-safe. > > -- > Jilles Tjoelker > From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 19:23:00 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 3EEF1106568F for ; Thu, 11 Feb 2010 19:23:00 +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 E97398FC15 for ; Thu, 11 Feb 2010 19:22:59 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Nfecm-00056E-DG for freebsd-hackers@freebsd.org; Thu, 11 Feb 2010 20:22:52 +0100 Received: from 93-141-37-217.adsl.net.t-com.hr ([93.141.37.217]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Feb 2010 20:22:52 +0100 Received: from ivoras by 93-141-37-217.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Feb 2010 20:22:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Thu, 11 Feb 2010 20:18:04 +0100 Lines: 6 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 93-141-37-217.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) X-Enigmail-Version: 0.96.0 Sender: news Subject: Future CPUs - 128 threads 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 Feb 2010 19:23:00 -0000 Recent news: Niagara 3 - 128 hardware threads Power 7 - 32 hardware threads http://tinyurl.com/yznbtqd From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 20:01: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 B345F1065692; Thu, 11 Feb 2010 20:01:25 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-iw0-f203.google.com (mail-iw0-f203.google.com [209.85.223.203]) by mx1.freebsd.org (Postfix) with ESMTP id 6B8428FC18; Thu, 11 Feb 2010 20:01:25 +0000 (UTC) Received: by iwn41 with SMTP id 41so1692101iwn.9 for ; Thu, 11 Feb 2010 12:01:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=fu7f62YxSJ+YY6DlPUuzaNq+qb/6YVN07SFcTTVYDLM=; b=X+oiL6YwsG5miz0kv7Y7qOw5DSpMX+IU07MrVAf+scE40KcB4jytLg/O/mtqovSZO8 Kc5oeP7M8Iu8dS83QXcGgwqyI1W3NwG7sWftgbk78Ory51lab/SWBWNZmJ1UhkA4fpAE oG++drRBylLxOGAE0ESs7qjelxIqrOyo4ZcGU= 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=DANvPCjeyv8beSyqM1sB0iHhaj1iBrPPb2GyISNiqt8DFSMCDn7/ZEQU/ZEhJUoSK9 acCqNDbkvA6YkFMhoUHk5JVVdWe1WQAiuID/4iiBki3YYeCG5rbrh1b17O4HqHSxoOql dqDssl85lWjJsGXqF4bnOBSC67JxKBTgXzKwE= MIME-Version: 1.0 Sender: artemb@gmail.com Received: by 10.231.145.196 with SMTP id e4mr281763ibv.54.1265918484476; Thu, 11 Feb 2010 12:01:24 -0800 (PST) In-Reply-To: References: Date: Thu, 11 Feb 2010 12:01:24 -0800 X-Google-Sender-Auth: a556dd871046310a Message-ID: From: Artem Belevich To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: Future CPUs - 128 threads 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 Feb 2010 20:01:25 -0000 MIPS variants with many cores/threads have been in production for quite a while, though for some reason that happened without too much PR noise. http://www.rmicorp.com/products/XLR_732.htm http://www.caviumnetworks.com/OCTEON_MIPS64.html --Artem On Thu, Feb 11, 2010 at 11:18 AM, Ivan Voras wrote: > Recent news: > > Niagara 3 - 128 hardware threads > Power 7 - 32 hardware threads > > http://tinyurl.com/yznbtqd > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 20:13:38 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 EEE4C1065695 for ; Thu, 11 Feb 2010 20:13:38 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ew0-f211.google.com (mail-ew0-f211.google.com [209.85.219.211]) by mx1.freebsd.org (Postfix) with ESMTP id 843CF8FC1A for ; Thu, 11 Feb 2010 20:13:38 +0000 (UTC) Received: by ewy3 with SMTP id 3so1709054ewy.13 for ; Thu, 11 Feb 2010 12:13:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=8f+0hxrsuFCIvi+snvTZ2ShfmpZEg+iL1DtQgRiG5Is=; b=tENsyrWEv5ldhv0C4WvgWxmmn5IMvIjUtP1cqMN0X6m/v1T5kEEb6Ybsyz3MnrFnNO xiG+W3r+nM62+ecofKS1U+WCbPeun4wvTiVzu9+ci3NuWxK2287qTf82zl1z7sk1lbL7 z4tgYq5KTRDDPtjqIXIlLKXLvVmTn84Cj5d/U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=YgZyidhplluSBw6B+KCW3+gh8lO6oS9PadT4+irzibCDNaA2uJTDAjV+0noPPnMBo+ jOaJz4SKqBjr/DNVSIiuJ1A5KGOwQabp5FeDbnec9YVzBJgpLMm4iSyuiYJCC2eQjrgb dn8gHL4t43iysLqwmjk4OsewrWrmg1pd3fVhI= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.165.85 with SMTP id d63mr193389wel.123.1265919216764; Thu, 11 Feb 2010 12:13:36 -0800 (PST) In-Reply-To: References: From: Ivan Voras Date: Thu, 11 Feb 2010 21:13:16 +0100 X-Google-Sender-Auth: d4b9bbba664f52fe Message-ID: <9bbcef731002111213q18d5d6b4pa6aea824eb9bb6ff@mail.gmail.com> To: Artem Belevich Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org Subject: Re: Future CPUs - 128 threads 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 Feb 2010 20:13:39 -0000 On 11 February 2010 21:01, Artem Belevich wrote: > MIPS variants with many cores/threads have been in production for > quite a while, though for some reason that happened without too much > PR noise. > > http://www.rmicorp.com/products/XLR_732.htm > http://www.caviumnetworks.com/OCTEON_MIPS64.html Probably because you cannot buy a ready made server machine with such a CPU and 4-8 disk drives practically by mail order :) Seriously, simply because of curiosity - are MIPS CPUs used in any kind of "general purpose" machines? From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 21:55: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 B1522106566C; Thu, 11 Feb 2010 21:55:30 +0000 (UTC) (envelope-from raysonlogin@gmail.com) Received: from mail-fx0-f226.google.com (mail-fx0-f226.google.com [209.85.220.226]) by mx1.freebsd.org (Postfix) with ESMTP id 16BD08FC0A; Thu, 11 Feb 2010 21:55:29 +0000 (UTC) Received: by fxm26 with SMTP id 26so1820868fxm.13 for ; Thu, 11 Feb 2010 13:55:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=fc0UKs7BE0Qwisz2AFPJLPf7Cx7LTIP0fuSD6gGjql0=; b=wkGlfg/CacRdJGOe3bZeJ77/SVvFbGzTBVUg2vDmPynmdhwSxx9+TmLPYrD6YkITXa VizPfhdnaqO4pSqW0SrB6mxLElEff58bMffhjHDW8d++IveujcoYZW5DQht3AD8nVKgN bfQvRvmRY/3jHmI3LBlwPSVJlliNHSyGbZBSg= 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=O09lGxycuO7DU/uKN935Xc9BvkUAmjOFze+N+ydC2R1ReD5OX68smuaZPiKu7EvYxa soWtFeLHUuZARdZdFjs4SOjYMss4FUKIB/Dl+U0/Y2EV9jW4ttlSjFU7OqHHRIwOYtwc jCSQy4TuFFuCgJI6RBqCD9bkcCQ4l+RompmZA= MIME-Version: 1.0 Received: by 10.239.183.147 with SMTP id u19mr50691hbg.106.1265923481587; Thu, 11 Feb 2010 13:24:41 -0800 (PST) In-Reply-To: <9bbcef731002111213q18d5d6b4pa6aea824eb9bb6ff@mail.gmail.com> References: <9bbcef731002111213q18d5d6b4pa6aea824eb9bb6ff@mail.gmail.com> Date: Thu, 11 Feb 2010 16:24:41 -0500 Message-ID: <73a01bf21002111324t360c3aa5nf8232675873b65d8@mail.gmail.com> From: Rayson Ho To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Artem Belevich Subject: Re: Future CPUs - 128 threads 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 Feb 2010 21:55:30 -0000 On Thu, Feb 11, 2010 at 3:13 PM, Ivan Voras wrote: > Seriously, simply because of curiosity - are MIPS CPUs used in any > kind of "general purpose" machines? Loongson is a MIPS implementation that is used in some nettops and netbooks: http://en.wikipedia.org/wiki/Loongson Rayson > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 11 22:18:51 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 252BC1065670; Thu, 11 Feb 2010 22:18:51 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-iw0-f203.google.com (mail-iw0-f203.google.com [209.85.223.203]) by mx1.freebsd.org (Postfix) with ESMTP id D182A8FC12; Thu, 11 Feb 2010 22:18:50 +0000 (UTC) Received: by iwn41 with SMTP id 41so1868388iwn.9 for ; Thu, 11 Feb 2010 14:18:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=ZNky2jStnpHZmqTo/3SQZDgKe16QkjITkwR7kaS3Amg=; b=CtTDUCX0pMlbcVqKj6wXKx4SrzLdysXQJL9hLNhtlZTuwQxVR3ScLYzKUWyXN9uJ8/ JRzJqReIYjZGTDj6W5ftgnqfjzE6C2mVkNboS2u6m/5x1c2lFOc8dHfbnn+bPu1K12ex Lsceg6D3sanxrNbO/R3eSb7t6bK6BjS+SdI7w= 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=US3ET5eX9KEiejBiz16OXBgE8h2ww5Qmz0Cm2hIUxvg4TzuoYwQ4Cjr0lpflqUZPqT QXlJWItRnNzEQYwT9ea5GJzR3x7JGzspCVSn/8htY/IoVTh7NX8rcJQUbA0bslDmaPMr 0lNp+0Nyhsh+Y7W/DSiJeordbsxTIgP8kO9bg= MIME-Version: 1.0 Sender: artemb@gmail.com Received: by 10.231.159.207 with SMTP id k15mr279297ibx.52.1265926730066; Thu, 11 Feb 2010 14:18:50 -0800 (PST) In-Reply-To: <9bbcef731002111213q18d5d6b4pa6aea824eb9bb6ff@mail.gmail.com> References: <9bbcef731002111213q18d5d6b4pa6aea824eb9bb6ff@mail.gmail.com> Date: Thu, 11 Feb 2010 14:18:49 -0800 X-Google-Sender-Auth: fcf774d65f201f8e Message-ID: From: Artem Belevich To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: Future CPUs - 128 threads 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 Feb 2010 22:18:51 -0000 > Seriously, simply because of curiosity - are MIPS CPUs used in any > kind of "general purpose" machines? I'm not aware of any multi-core general-purpose MIPS box. Low-end MIPS CPUs are ubiquitous in low-end networking gear. High-end multicore MIPS chips are mostly going into mid-to-high end networking gear like firewalls. They are probably not a very good fit for general purpose computing. --Artem From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 01:27:51 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 A89DF1065670 for ; Fri, 12 Feb 2010 01:27:51 +0000 (UTC) (envelope-from julian@elischer.org) Received: from nlpi087.prodigy.net (nlpi087.sbcis.sbc.com [207.115.36.103]) by mx1.freebsd.org (Postfix) with ESMTP id 5E0F38FC1A for ; Fri, 12 Feb 2010 01:27:51 +0000 (UTC) X-ORBL: [75.5.243.60] Received: from julian-mac.elischer.org (adsl-75-5-243-60.dsl.scrm01.sbcglobal.net [75.5.243.60]) by nlpi087.prodigy.net (8.13.8 out.ldap.dk.spool/8.13.8) with ESMTP id o1C1RlWC017034; Thu, 11 Feb 2010 19:27:50 -0600 Message-ID: <4B74AEBB.6070001@elischer.org> Date: Thu, 11 Feb 2010 17:28:27 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Artem Belevich References: <9bbcef731002111213q18d5d6b4pa6aea824eb9bb6ff@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: Future CPUs - 128 threads 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 Feb 2010 01:27:51 -0000 Artem Belevich wrote: >> Seriously, simply because of curiosity - are MIPS CPUs used in any >> kind of "general purpose" machines? > > I'm not aware of any multi-core general-purpose MIPS box. > Low-end MIPS CPUs are ubiquitous in low-end networking gear. > High-end multicore MIPS chips are mostly going into mid-to-high end > networking gear like firewalls. However several companies are using FreeBSD as a base kernel for their appliance, based on these chips. So they are of direct interest to us. > > They are probably not a very good fit for general purpose computing. > > --Artem > _______________________________________________ > 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 Fri Feb 12 07:16:45 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 D28461065676 for ; Fri, 12 Feb 2010 07:16:45 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail36.syd.optusnet.com.au (mail36.syd.optusnet.com.au [211.29.133.76]) by mx1.freebsd.org (Postfix) with ESMTP id 4B64F8FC0A for ; Fri, 12 Feb 2010 07:16:44 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-232-148.belrs3.nsw.optusnet.com.au [122.106.232.148]) by mail36.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o1C7GfWo021601 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Feb 2010 18:16:42 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o1C7Gfbd093202; Fri, 12 Feb 2010 18:16:41 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o1C7GfUO093201; Fri, 12 Feb 2010 18:16:41 +1100 (EST) (envelope-from peter) Date: Fri, 12 Feb 2010 18:16:41 +1100 From: Peter Jeremy To: Ivan Voras Message-ID: <20100212071640.GA93045@server.vk2pj.dyndns.org> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Qxx1br4bt0+wmkIi" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org Subject: Re: Future CPUs - 128 threads 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 Feb 2010 07:16:45 -0000 --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Feb-11 20:18:04 +0100, Ivan Voras wrote: >Recent news: > >Niagara 3 - 128 hardware threads >Power 7 - 32 hardware threads I'm not sure how far off real Niagara-3 based products are but you can buy dual-socket T-2 systems (128 h/w threads) off the shelf. Sun announced some years ago that they would be doubling the number of threads per CPU socket every 2 years or so. --=20 Peter Jeremy --Qxx1br4bt0+wmkIi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEUEARECAAYFAkt1AFgACgkQ/opHv/APuIfpkgCghsODrwBLXKb55hP3psx0bS+5 aOYAmM1xPk38abf/tAaVyeaA45mqXhU= =FsUF -----END PGP SIGNATURE----- --Qxx1br4bt0+wmkIi-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 13:33: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 83F1F106566C for ; Fri, 12 Feb 2010 13:33:04 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id 13EF58FC19 for ; Fri, 12 Feb 2010 13:33:02 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,460,1262559600"; d="txt'?scan'208";a="296234249" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 12 Feb 2010 14:32:51 +0100 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 04C9D1B0751; Fri, 12 Feb 2010 14:32:50 +0100 (CET) Date: Fri, 12 Feb 2010 14:32:44 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=+permail-201002121332441e86ffa800001ee8-a_best01+ Cc: Subject: [patch] usr.bin/elf2aout/elf2aout.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 Feb 2010 13:33:04 -0000 This is a MIME encoded multipart message. --+permail-201002121332441e86ffa800001ee8-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit hi there, just a small format correction. cheers. alex --+permail-201002121332441e86ffa800001ee8-a_best01+ Content-Type: text/plain Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="elf2aout.patch.txt" SW5kZXg6IHVzci5iaW4vZWxmMmFvdXQvZWxmMmFvdXQuMQo9PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSB1c3IuYmlu L2VsZjJhb3V0L2VsZjJhb3V0LjEJKHJldmlzaW9uIDIwMzc4NikKKysrIHVzci5iaW4vZWxmMmFv dXQvZWxmMmFvdXQuMQkod29ya2luZyBjb3B5KQpAQCAtMjQsNyArMjQsNyBAQAogLlwiCiAuXCIg JEZyZWVCU0QkCiAuXCIKLS5EZCBEZWNlbWJlciAyMywgMjAwOAorLkRkIEZlYnJ1YXJ5IDEwLCAy MDEwCiAuRHQgRUxGMkFPVVQgMQogLk9zCiAuU2ggTkFNRQpAQCAtMzIsNyArMzIsNyBAQAogLk5k ICJDb252ZXJ0IEVMRiBiaW5hcnkgdG8gYS5vdXQgZm9ybWF0IgogLlNoIFNZTk9QU0lTCiAuTm0K LS5PcCBGbCBvIG91dGZpbGUKKy5PcCBGbCBvIEFyIG91dGZpbGUKIC5BciBpbmZpbGUKIC5TaCBE RVNDUklQVElPTgogVGhlCg== --+permail-201002121332441e86ffa800001ee8-a_best01+-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 14:13:23 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 0AA63106566B for ; Fri, 12 Feb 2010 14:13:23 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og121.obsmtp.com (exprod7og121.obsmtp.com [64.18.2.20]) by mx1.freebsd.org (Postfix) with ESMTP id C6EFA8FC0C for ; Fri, 12 Feb 2010 14:13:20 +0000 (UTC) Received: from source ([66.129.224.36]) (using TLSv1) by exprod7ob121.postini.com ([64.18.6.12]) with SMTP ID DSNKS3ViAEWPjIPNAysuAHUeGkMNkMce+/za@postini.com; Fri, 12 Feb 2010 06:13:22 PST Received: from p-emfe02-wf.jnpr.net (172.28.145.25) by P-EMHUB01-HQ.jnpr.net (172.24.192.35) with Microsoft SMTP Server (TLS) id 8.1.393.1; Fri, 12 Feb 2010 06:10:24 -0800 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe02-wf.jnpr.net ([fe80::c126:c633:d2dc:8090%11]) with mapi; Fri, 12 Feb 2010 09:10:24 -0500 From: Andrew Duane To: Julian Elischer , Artem Belevich Date: Fri, 12 Feb 2010 09:10:33 -0500 Thread-Topic: Future CPUs - 128 threads Thread-Index: Acqrgrn0E2x2H6VtS0KXno9HE5SIwAAalRng Message-ID: References: <9bbcef731002111213q18d5d6b4pa6aea824eb9bb6ff@mail.gmail.com> <4B74AEBB.6070001@elischer.org> In-Reply-To: <4B74AEBB.6070001@elischer.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "freebsd-hackers@freebsd.org" , Ivan Voras Subject: RE: Future CPUs - 128 threads 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 Feb 2010 14:13:23 -0000 owner-freebsd-hackers@freebsd.org wrote: > Artem Belevich wrote: >>> Seriously, simply because of curiosity - are MIPS CPUs used in any >>> kind of "general purpose" machines? >>=20 >> I'm not aware of any multi-core general-purpose MIPS box. >> Low-end MIPS CPUs are ubiquitous in low-end networking gear. >> High-end multicore MIPS chips are mostly going into mid-to-high end >> networking gear like firewalls. >=20 >=20 > However several companies are using FreeBSD as a base kernel for their > appliance, based on these chips. So they are of direct interest to us. >>=20 >> They are probably not a very good fit for general purpose computing. >>=20 >> --Artem I believe I know of one such company....... :-) -- Andrew Duane Juniper Networks 978-589-0551 10 Technology Park Dr aduane@juniper.net Westford, MA 01886-3418 =20 From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 15:22:13 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 A272C106566B for ; Fri, 12 Feb 2010 15:22:13 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from mail.vega.ru (mail.vega.ru [90.156.167.5]) by mx1.freebsd.org (Postfix) with ESMTP id 5EC4B8FC13 for ; Fri, 12 Feb 2010 15:22:13 +0000 (UTC) Received: from [10.100.124.99] (helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1Nfx7h-0007gb-LB; Fri, 12 Feb 2010 18:08:01 +0300 Date: Fri, 12 Feb 2010 18:07:59 +0300 From: Ruslan Ermilov To: Alexander Best Message-ID: <20100212150759.GA85230@edoofus.dev.vega.ru> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] usr.bin/elf2aout/elf2aout.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 Feb 2010 15:22:13 -0000 On Fri, Feb 12, 2010 at 02:32:44PM +0100, Alexander Best wrote: > hi there, > > just a small format correction. Committed to -CURRENT, except I didn't touch ".Dd" and fixed usage() as well. Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 15:39: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 539941065676 for ; Fri, 12 Feb 2010 15:39:25 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay2.uni-muenster.de (ZIVM-EXRELAY2.UNI-MUENSTER.DE [128.176.192.15]) by mx1.freebsd.org (Postfix) with ESMTP id A36478FC12 for ; Fri, 12 Feb 2010 15:39:22 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,461,1262559600"; d="scan'208";a="236426665" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay2.uni-muenster.de with ESMTP; 12 Feb 2010 16:39:09 +0100 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id 38C1B1B07C0; Fri, 12 Feb 2010 16:39:09 +0100 (CET) Date: Fri, 12 Feb 2010 16:39:08 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Ruslan Ermilov Message-ID: In-Reply-To: <20100212150759.GA85230@edoofus.dev.vega.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] usr.bin/elf2aout/elf2aout.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 Feb 2010 15:39:25 -0000 thanks. :) Ruslan Ermilov schrieb am 2010-02-12: > On Fri, Feb 12, 2010 at 02:32:44PM +0100, Alexander Best wrote: > > hi there, > > just a small format correction. > Committed to -CURRENT, except I didn't touch ".Dd" and fixed > usage() as well. > Cheers, From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 15:52: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 D319B106566B for ; Fri, 12 Feb 2010 15:52:14 +0000 (UTC) (envelope-from nil@opensesame.st) Received: from mail-px0-f176.google.com (mail-px0-f176.google.com [209.85.216.176]) by mx1.freebsd.org (Postfix) with ESMTP id B3D1B8FC16 for ; Fri, 12 Feb 2010 15:52:14 +0000 (UTC) Received: by pxi6 with SMTP id 6so2698577pxi.14 for ; Fri, 12 Feb 2010 07:52:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.152.30 with SMTP id z30mr1028563wfd.293.1265989934237; Fri, 12 Feb 2010 07:52:14 -0800 (PST) X-Originating-IP: [149.106.192.131] In-Reply-To: References: <11dbd75e1002101825u78d90ef0ufe6015045ecf788a@mail.gmail.com> From: james toy Date: Fri, 12 Feb 2010 10:51:54 -0500 Message-ID: <11dbd75e1002120751k7c7ef432m4efbe68f6fed95e8@mail.gmail.com> To: Andrew Brampton Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers Subject: Re: KLD hello.ko: depends on kernel - not available or version mismatch 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 Feb 2010 15:52:14 -0000 On Thu, Feb 11, 2010 at 08:06, Andrew Brampton wrote: > On Thu, Feb 11, 2010 at 2:25 AM, james toy wrote: >> Hello Hackers, >> >> =A0 =A0I am working on learning to write FreeBSD drivers; however, I hav= e >> some practice writing IOKit drivers for MacOSX (they are entirely >> different I know!). =A0The code I am working with can be found here: >> >> http://pastebin.com/m2bbb393c >> >> and I am getting the error: >> >> dontpanic# kldload ./hello.ko >> kldload: can't load ./hello.ko: Exec format error >> >> dmesg reads: >> >> dontpanic# kldload ./hello.ko >> kldload: can't load ./hello.ko: Exec format error >> >> and finally uname -a: >> >> FreeBSD dontpanic.union.edu 9.0-CURRENT FreeBSD 9.0-CURRENT #1 >> r198859: Wed Feb 10 09:59:54 EST 2010 >> james@dontpanic.union.edu:/usr/obj/usr/src_klog/sys/DONTPANIC =A0amd64 >> >> any information pointing me to being able to load this driver would be >> greatly appreciated. >> >> respectfully, >> >> james toy > > I just built your code on my FreeBSD 8 box and it compiles and loads > fine. How are you compiling your code? I used this makefile > http://pastebin.com/f3ab71917 and all I typed was this: > > make > sudo make install > sudo make load > > and I get the "hello, fail" message, and then I typed > sudo make unload > > and I got the "unload fail" message. > > Andrew > Andrey was correct, param.h and kern.osreldate were not the same. thanks very much for the prompt responses. =3Djt From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 16:39: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 07BC2106566C for ; Fri, 12 Feb 2010 16:39:30 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay2.uni-muenster.de (ZIVM-EXRELAY2.UNI-MUENSTER.DE [128.176.192.15]) by mx1.freebsd.org (Postfix) with ESMTP id 825F68FC12 for ; Fri, 12 Feb 2010 16:39:29 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,461,1262559600"; d="txt'?scan'208";a="236430860" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay2.uni-muenster.de with ESMTP; 12 Feb 2010 17:39:26 +0100 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 38E1A1B0751; Fri, 12 Feb 2010 17:39:26 +0100 (CET) Date: Fri, 12 Feb 2010 17:39:19 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=+permail-201002121639191e86ffa800006598-a_best01+ Cc: Subject: [patch] contrib/gdtoa/hexnan.c 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 Feb 2010 16:39:30 -0000 This is a MIME encoded multipart message. --+permail-201002121639191e86ffa800006598-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit little patch to stop gcc from complaining about the implicit declaration of isalnum(). although this file comes from vendor contributed software (gdtoa) the cause for the warning is related to local freebsd specific changes in the file which are not part of the original file shipped by the vendor. so i guess this can be fixed directly in head. cheers. alex --+permail-201002121639191e86ffa800006598-a_best01+ Content-Type: text/plain Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="hexnan.c.txt" SW5kZXg6IGNvbnRyaWIvZ2R0b2EvaGV4bmFuLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gY29udHJpYi9nZHRv YS9oZXhuYW4uYwkocmV2aXNpb24gMjAzNzg2KQorKysgY29udHJpYi9nZHRvYS9oZXhuYW4uYwko d29ya2luZyBjb3B5KQpAQCAtMzEsNiArMzEsOCBAQAogCiAvKiAkRnJlZUJTRCQgKi8KIAorI2lu Y2x1ZGUgPGN0eXBlLmg+CisKICNpbmNsdWRlICJnZHRvYWltcC5oIgogCiAgc3RhdGljIHZvaWQK --+permail-201002121639191e86ffa800006598-a_best01+-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 17:54:26 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 79256106566B; Fri, 12 Feb 2010 17:54:26 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.116.15]) by mx1.freebsd.org (Postfix) with ESMTP id 2AFCA8FC16; Fri, 12 Feb 2010 17:54:25 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NfziU-0002TW-4q; Fri, 12 Feb 2010 20:54:10 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id E0ABBB860; Fri, 12 Feb 2010 20:54:22 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id C9D4BB829; Fri, 12 Feb 2010 20:54:22 +0300 (MSK) Date: Fri, 12 Feb 2010 20:54:22 +0300 From: Dmitry Marakasov To: Rick Macklem Message-ID: <20100212175422.GB94665@hades.panopticon> References: <20100210174338.GC39752@hades.panopticon> <201002111255.46256.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 17:54:26 -0000 * Rick Macklem (rmacklem@uoguelph.ca) wrote: > > Is it the hostname of the server or the client? > > My guess is that hades.panopticon (or something like that:-) is the Yes, that is the client. > As John said, it would be nice to try and narrow it down to client or > server side, too. I'm planning a massive testing for this weekend, including removing soft mount option and trying linux client/server. Btw, I forgot to mention that I'm experiencing other NFS problems from time to time, including "death" of a mount (that is, all processes that try to access it freeze; this cures itself in some time with a message "server is alive again"). Also I've seen another strange thing - not only the mount dies but the network is flooded with NFS traffic. Last time I've seen it quite a while ago, so I don't remember the circumstances and direction of the traffic. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 18:00: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 5A634106566C; Fri, 12 Feb 2010 18:00:34 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.116.15]) by mx1.freebsd.org (Postfix) with ESMTP id 10A838FC14; Fri, 12 Feb 2010 18:00:33 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NfzoR-0003DB-BJ; Fri, 12 Feb 2010 21:00:19 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 1F0F7B862; Fri, 12 Feb 2010 21:00:32 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 1E313B829; Fri, 12 Feb 2010 21:00:32 +0300 (MSK) Date: Fri, 12 Feb 2010 21:00:32 +0300 From: Dmitry Marakasov To: Oliver Fromme Message-ID: <20100212180032.GC94665@hades.panopticon> References: <201002102046.o1AKkrvj085173@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201002102046.o1AKkrvj085173@lurza.secnetix.de> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 18:00:34 -0000 * Oliver Fromme (olli@lurza.secnetix.de) wrote: > This is an excerpt from Solaris' mount_nfs(1M) manpage: > > File systems that are mounted read-write or that con- > tain executable files should always be mounted with > the hard option. Applications using soft mounted file > systems may incur unexpected I/O errors, file corrup- > tion, and unexpected program core dumps. The soft > option is not recommended. > > FreeBSD's manual page doesn't contain such a warning, but > maybe it should. (It contains a warning not to use "soft" > with NFSv4, though, for different reasons.) Interesting, I'll try disabling it. However now I really wonder why is such dangerous option available (given it's the cause) at all, especially without a notice. Silent data corruption is possibly the worst thing to happen ever. However, without soft option NFS would be a strange thing to use - network problems is kinda inevitable thing, and having all processes locked in a unkillable state (with hard mounts) when it dies is not fun. Or am I wrong? > Also note that the "nolockd" option means that processes > on different clients won't see each other's locks. That > means that you will get corruption if they rely on > locking. I know - I have no processes that use locks on that filesystems. Also there's only a single client. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 17:55:32 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 AC0561065672 for ; Fri, 12 Feb 2010 17:55:32 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 60D2D8FC1D for ; Fri, 12 Feb 2010 17:55:32 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAPYddUuDaFvG/2dsb2JhbACbAXTAT4RYBIMT X-IronPort-AV: E=Sophos;i="4.49,462,1262581200"; d="scan'208";a="65407644" Received: from amazon.cs.uoguelph.ca ([131.104.91.198]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 12 Feb 2010 12:26:28 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by amazon.cs.uoguelph.ca (Postfix) with ESMTP id 2FFC621017A; Fri, 12 Feb 2010 12:26:28 -0500 (EST) X-Virus-Scanned: amavisd-new at amazon.cs.uoguelph.ca Received: from amazon.cs.uoguelph.ca ([127.0.0.1]) by localhost (amazon.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h8H7z1nzp9pQ; Fri, 12 Feb 2010 12:26:27 -0500 (EST) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by amazon.cs.uoguelph.ca (Postfix) with ESMTP id 4875A210174; Fri, 12 Feb 2010 12:26:27 -0500 (EST) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id o1CHblx12092; Fri, 12 Feb 2010 12:37:47 -0500 (EST) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Fri, 12 Feb 2010 12:37:47 -0500 (EST) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: John Baldwin In-Reply-To: <201002111255.46256.jhb@freebsd.org> Message-ID: References: <20100210174338.GC39752@hades.panopticon> <201002111255.46256.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Fri, 12 Feb 2010 18:17:22 +0000 Cc: freebsd-hackers@freebsd.org, Dmitry Marakasov , freebsd-stable@freebsd.org Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 17:55:32 -0000 On Thu, 11 Feb 2010, John Baldwin wrote: [good stuff snipped] >> >> Case1: single currupted block 3779CF88-3779FFFF (12408 bytes). >> Data in block is shifted 68 bytes up, loosing first 68 bytes are >> filling last 68 bytes with garbage. Interestingly, among that garbage >> is my hostname. > > Is it the hostname of the server or the client? > My guess is that hades.panopticon (or something like that:-) is the client. The garbage is 4 bytes (80 00 80 84) followed by the first part of the RPC header. (Bytes 5-8 vary because they are the xid and then the host name is part of the AUTH_SYS authenticator.) For Case2 and Case3, you see less of it, but it's the same stuff. Why? I have no idea, although it smells like some sort of corruption of the mbuf list. (It would be nice if you could switch to a different net interface/driver. Just a thought, since others don't seem to be seeing this?) As John said, it would be nice to try and narrow it down to client or server side, too. Don't know if this helps or is just noise, rick From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 18:20: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 C8995106568D for ; Fri, 12 Feb 2010 18:20:07 +0000 (UTC) (envelope-from nate@thatsmathematics.com) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id A32098FC17 for ; Fri, 12 Feb 2010 18:20:07 +0000 (UTC) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id o1CIK7Y26176; Fri, 12 Feb 2010 10:20:07 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id o1CIK7U25395; Fri, 12 Feb 2010 10:20:07 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Fri, 12 Feb 2010 10:20:06 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Dmitry Marakasov In-Reply-To: <20100212180032.GC94665@hades.panopticon> Message-ID: References: <201002102046.o1AKkrvj085173@lurza.secnetix.de> <20100212180032.GC94665@hades.panopticon> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Oliver Fromme , freebsd-stable@freebsd.org Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 18:20:07 -0000 On Fri, 12 Feb 2010, Dmitry Marakasov wrote: > * Oliver Fromme (olli@lurza.secnetix.de) wrote: > >> This is an excerpt from Solaris' mount_nfs(1M) manpage: >> >> File systems that are mounted read-write or that con- >> tain executable files should always be mounted with >> the hard option. Applications using soft mounted file >> systems may incur unexpected I/O errors, file corrup- >> tion, and unexpected program core dumps. The soft >> option is not recommended. >> >> FreeBSD's manual page doesn't contain such a warning, but >> maybe it should. (It contains a warning not to use "soft" >> with NFSv4, though, for different reasons.) > > Interesting, I'll try disabling it. However now I really wonder why > is such dangerous option available (given it's the cause) at all, > especially without a notice. Silent data corruption is possibly the > worst thing to happen ever. Tell me about it. :) But in this case I'm not sure I understand. As I understand it, the difference between soft and hard is that in the case of soft, a timeout will result in the operation failing and returning EIO or the like (hence "unexpected I/O errors"). And if the operation is being done to fault in a mapped page, you'd have to notify the process asynchronously by sending a signal like SIGBUS which it may not be expecting (hence "unexpected core dumps"). But in what scenario would you see file corruption? Unless you have a buggy program that doesn't check return values from system calls or handles signals in a stupid way, I don't see how this can happen, and I'm not sure what the Sun man page is referring to. -- Nate Eldredge nate@thatsmathematics.com From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 18:21: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 ACDA110656AC; Fri, 12 Feb 2010 18:21:09 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 32A068FC2C; Fri, 12 Feb 2010 18:21:09 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o1CIKowX019228; Fri, 12 Feb 2010 19:21:05 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o1CIKohU019226; Fri, 12 Feb 2010 19:20:50 +0100 (CET) (envelope-from olli) From: Oliver Fromme Message-Id: <201002121820.o1CIKohU019226@lurza.secnetix.de> To: amdmi3@amdmi3.ru (Dmitry Marakasov) Date: Fri, 12 Feb 2010 19:20:50 +0100 (CET) In-Reply-To: <20100212180032.GC94665@hades.panopticon> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Fri, 12 Feb 2010 19:21:05 +0100 (CET) Cc: freebsd-hackers@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 18:21:09 -0000 Dmitry Marakasov wrote: > * Oliver Fromme (olli@lurza.secnetix.de) wrote: > > This is an excerpt from Solaris' mount_nfs(1M) manpage: > > > > File systems that are mounted read-write or that con- > > tain executable files should always be mounted with > > the hard option. Applications using soft mounted file > > systems may incur unexpected I/O errors, file corrup- > > tion, and unexpected program core dumps. The soft > > option is not recommended. > > > > FreeBSD's manual page doesn't contain such a warning, but > > maybe it should. (It contains a warning not to use "soft" > > with NFSv4, though, for different reasons.) > > Interesting, I'll try disabling it. However now I really wonder why > is such dangerous option available (given it's the cause) at all, > especially without a notice. Silent data corruption is possibly the > worst thing to happen ever. I'm sorry for the confusion ... I do not think that it's the cause for your data corruption, in this particular case. I just mentioned the potential problems with "soft" mounts because it could cause additional problems for you. (And it's important to know anyhow.) > However, without soft option NFS would be a strange thing to use - > network problems is kinda inevitable thing, and having all processes > locked in a unkillable state (with hard mounts) when it dies is not > fun. Or am I wrong? Well, this is what happens if the network hangs: 1. With "hard" mounts (the default), processes that access NFS shares are locked for as long as the network is down. 2. With "soft" mounts, binaries can coredump, and many programs won't notice that write access just failed which leads to file corruption. Personally I definitely prefer the first. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "I have stopped reading Stephen King novels. Now I just read C code instead." -- Richard A. O'Keefe From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 18:57:52 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 4EE8E10656EF; Fri, 12 Feb 2010 18:57:52 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id C47388FC15; Fri, 12 Feb 2010 18:57:51 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAJEzdUuDaFvH/2dsb2JhbACbAXS/foRYBIMT X-IronPort-AV: E=Sophos;i="4.49,462,1262581200"; d="scan'208";a="65258207" Received: from danube.cs.uoguelph.ca ([131.104.91.199]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 12 Feb 2010 13:57:50 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by danube.cs.uoguelph.ca (Postfix) with ESMTP id 07E3010842BA; Fri, 12 Feb 2010 13:57:50 -0500 (EST) X-Virus-Scanned: amavisd-new at danube.cs.uoguelph.ca Received: from danube.cs.uoguelph.ca ([127.0.0.1]) by localhost (danube.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 244JsO93KH5u; Fri, 12 Feb 2010 13:57:49 -0500 (EST) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by danube.cs.uoguelph.ca (Postfix) with ESMTP id EBFD6108408E; Fri, 12 Feb 2010 13:57:48 -0500 (EST) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id o1CJ9EA25479; Fri, 12 Feb 2010 14:09:14 -0500 (EST) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Fri, 12 Feb 2010 14:09:14 -0500 (EST) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: John Baldwin In-Reply-To: <201002111255.46256.jhb@freebsd.org> Message-ID: References: <20100210174338.GC39752@hades.panopticon> <201002111255.46256.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Fri, 12 Feb 2010 19:05:36 +0000 Cc: freebsd-hackers@freebsd.org, Dmitry Marakasov , freebsd-stable@freebsd.org Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 18:57:52 -0000 On Thu, 11 Feb 2010, John Baldwin wrote: >> >> Case1: single currupted block 3779CF88-3779FFFF (12408 bytes). >> Data in block is shifted 68 bytes up, loosing first 68 bytes are >> filling last 68 bytes with garbage. Interestingly, among that garbage >> is my hostname. > > Is it the hostname of the server or the client? > Oh, I realized the first 4 bytes of the garbage is the record mark that preceeds the RPC header for TCP, so the garbage is the first part of the RPC after the TCP/IP header. > > Can you reproduce this using a non-FreeBSD server with a FreeBSD client or a > non-FreeBSD client with a FreeBSD server? That would narrow down the breakage > to either the client or the server. > If using a non-FreeBSD client/server isn't convenient, another way would be to do a binary packet capture (something like "tcpdump -s 0 -w ") and then looking at it in wireshark for a failed case and see if the data is corrupted on the wire. rick From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 19:01:05 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 5AAE8106566B; Fri, 12 Feb 2010 19:01:05 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id D03088FC14; Fri, 12 Feb 2010 19:01:04 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEALQ0dUuDaFvJ/2dsb2JhbACbAXS/bYRYBIMT X-IronPort-AV: E=Sophos;i="4.49,462,1262581200"; d="scan'208";a="65258549" Received: from ganges.cs.uoguelph.ca ([131.104.91.201]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 12 Feb 2010 14:01:04 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by ganges.cs.uoguelph.ca (Postfix) with ESMTP id E1BC1FB80B8; Fri, 12 Feb 2010 14:01:03 -0500 (EST) X-Virus-Scanned: amavisd-new at ganges.cs.uoguelph.ca Received: from ganges.cs.uoguelph.ca ([127.0.0.1]) by localhost (ganges.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RR4JERQJAoNp; Fri, 12 Feb 2010 14:01:03 -0500 (EST) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by ganges.cs.uoguelph.ca (Postfix) with ESMTP id F27C9FB8085; Fri, 12 Feb 2010 14:01:02 -0500 (EST) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id o1CJCSI26062; Fri, 12 Feb 2010 14:12:28 -0500 (EST) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Fri, 12 Feb 2010 14:12:28 -0500 (EST) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Dmitry Marakasov In-Reply-To: <20100212175422.GB94665@hades.panopticon> Message-ID: References: <20100210174338.GC39752@hades.panopticon> <201002111255.46256.jhb@freebsd.org> <20100212175422.GB94665@hades.panopticon> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Fri, 12 Feb 2010 19:05:46 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 19:01:05 -0000 On Fri, 12 Feb 2010, Dmitry Marakasov wrote: > > I'm planning a massive testing for this weekend, including removing > soft mount option and trying linux client/server. > > Btw, I forgot to mention that I'm experiencing other NFS problems from > time to time, including "death" of a mount (that is, all processes that > try to access it freeze; this cures itself in some time with a message > "server is alive again"). Also I've seen another strange thing - not > only the mount dies but the network is flooded with NFS traffic. > Last time I've seen it quite a while ago, so I don't remember the > circumstances and direction of the traffic. > There are some patches at: http://people.freebsd.org/~rmacklem that may be relevant if you are using vanilla FreeBSD-8.0. (They're all now in stable/8, but are post-release of 8.0.) rick From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 19:09: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 1C41C1065774; Fri, 12 Feb 2010 19:09:01 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.116.15]) by mx1.freebsd.org (Postfix) with ESMTP id C801A8FC13; Fri, 12 Feb 2010 19:09:00 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Ng0sf-0002j0-Kl; Fri, 12 Feb 2010 22:08:45 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id A8898B860; Fri, 12 Feb 2010 22:08:48 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id A413CB829; Fri, 12 Feb 2010 22:08:48 +0300 (MSK) Date: Fri, 12 Feb 2010 22:08:48 +0300 From: Dmitry Marakasov To: Oliver Fromme Message-ID: <20100212190848.GF94665@hades.panopticon> References: <20100212180032.GC94665@hades.panopticon> <201002121820.o1CIKohU019226@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201002121820.o1CIKohU019226@lurza.secnetix.de> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 19:09:01 -0000 * Oliver Fromme (olli@lurza.secnetix.de) wrote: > I'm sorry for the confusion ... I do not think that it's > the cause for your data corruption, in this particular > case. I just mentioned the potential problems with "soft" > mounts because it could cause additional problems for you. > (And it's important to know anyhow.) Oh, then I really misunderstood. If the curruption implied is like when you copy a file via NFS and the net goes down, and in case of soft mount you have half of a file (read: corruption), while with hard mount the copy process will finish when the net is back up, that's definitely OK and expected. > Well, this is what happens if the network hangs: > > 1. With "hard" mounts (the default), processes that access > NFS shares are locked for as long as the network is down. > > 2. With "soft" mounts, binaries can coredump, and many > programs won't notice that write access just failed which > leads to file corruption. > > Personally I definitely prefer the first. Yeah, but I have mostly desktop<->(NAS w/torrents) setup so I prefer the second. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 19:08: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 EC983106566C; Fri, 12 Feb 2010 19:08:47 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 86BEE8FC13; Fri, 12 Feb 2010 19:08:47 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAGY2dUuDaFvI/2dsb2JhbACbAXS/b4JIghAEgxM X-IronPort-AV: E=Sophos;i="4.49,462,1262581200"; d="scan'208";a="65421611" Received: from darling.cs.uoguelph.ca ([131.104.91.200]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 12 Feb 2010 14:08:46 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by darling.cs.uoguelph.ca (Postfix) with ESMTP id B4130940025; Fri, 12 Feb 2010 14:08:46 -0500 (EST) X-Virus-Scanned: amavisd-new at darling.cs.uoguelph.ca Received: from darling.cs.uoguelph.ca ([127.0.0.1]) by localhost (darling.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wd+2klbPy29K; Fri, 12 Feb 2010 14:08:45 -0500 (EST) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by darling.cs.uoguelph.ca (Postfix) with ESMTP id AA20694010A; Fri, 12 Feb 2010 14:08:45 -0500 (EST) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id o1CJKA626707; Fri, 12 Feb 2010 14:20:11 -0500 (EST) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Fri, 12 Feb 2010 14:20:10 -0500 (EST) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Dmitry Marakasov In-Reply-To: <20100212180032.GC94665@hades.panopticon> Message-ID: References: <201002102046.o1AKkrvj085173@lurza.secnetix.de> <20100212180032.GC94665@hades.panopticon> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Fri, 12 Feb 2010 19:22:42 +0000 Cc: freebsd-hackers@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, Oliver Fromme Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 19:08:48 -0000 On Fri, 12 Feb 2010, Dmitry Marakasov wrote: > > Interesting, I'll try disabling it. However now I really wonder why > is such dangerous option available (given it's the cause) at all, > especially without a notice. Silent data corruption is possibly the > worst thing to happen ever. > I doubt that the data corruption you are seeing would be because of "soft". "soft" will cause various problems w.r.t. consistency, but in the case of a write through the buffer cache, I think it will leave the buffer dirty and eventually it will get another write attempt. > However, without soft option NFS would be a strange thing to use - > network problems is kinda inevitable thing, and having all processes > locked in a unkillable state (with hard mounts) when it dies is not > fun. Or am I wrong? > Well, using NFS over an unreliable network is going to cause grief sooner or later. The problem is that POSIX apps. don't expect I/O system calls to fail with EIO and generally don't handle that gracefully. For the future, I think "umount -F" (a forced dismount that accepts data loss) is the best compromise, since at least then a sysadmin knows that data corruption could have occurred when they do it and can choose to "wait" until the network is fixed as an alternative to the corruption? rick From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 19:27:20 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 24B3C106568F; Fri, 12 Feb 2010 19:27:20 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id A0A518FC21; Fri, 12 Feb 2010 19:27:19 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o1CJQpSI022749; Fri, 12 Feb 2010 20:27:07 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o1CJQpZr022747; Fri, 12 Feb 2010 20:26:51 +0100 (CET) (envelope-from olli) From: Oliver Fromme Message-Id: <201002121926.o1CJQpZr022747@lurza.secnetix.de> To: amdmi3@amdmi3.ru (Dmitry Marakasov) Date: Fri, 12 Feb 2010 20:26:51 +0100 (CET) In-Reply-To: <20100212190848.GF94665@hades.panopticon> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Fri, 12 Feb 2010 20:27:17 +0100 (CET) Cc: freebsd-hackers@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 19:27:20 -0000 Dmitry Marakasov wrote: > Oh, then I really misunderstood. If the curruption implied is > like when you copy a file via NFS and the net goes down, and in > case of soft mount you have half of a file (read: corruption), while > with hard mount the copy process will finish when the net is back up, > that's definitely OK and expected. Of course it depends what kinds of programs you run. If you run a database, it can become corrupted to the point that you can't start it anymore, so you have to restore it from the latest backup. Been there, done that. Another example, this happened to a friend of mine: After a network outage his Opera browser didn't work anymore. He had to remove his ~/.opera directory to get it working again (and he lost all his settings). His home directory was "soft"-mounted, but he removed the soft option after that incident. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "The last good thing written in C was Franz Schubert's Symphony number 9." -- Erwin Dieterich From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 12 19:34: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 3A185106566B; Fri, 12 Feb 2010 19:34:50 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id CC8B38FC15; Fri, 12 Feb 2010 19:34:49 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAG88dUuDaFvI/2dsb2JhbACbAXS/TYRYBIMT X-IronPort-AV: E=Sophos;i="4.49,462,1262581200"; d="scan'208";a="65424566" Received: from darling.cs.uoguelph.ca ([131.104.91.200]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 12 Feb 2010 14:34:49 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by darling.cs.uoguelph.ca (Postfix) with ESMTP id 07285940025; Fri, 12 Feb 2010 14:34:49 -0500 (EST) X-Virus-Scanned: amavisd-new at darling.cs.uoguelph.ca Received: from darling.cs.uoguelph.ca ([127.0.0.1]) by localhost (darling.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CJLWgfnY1+Aj; Fri, 12 Feb 2010 14:34:46 -0500 (EST) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by darling.cs.uoguelph.ca (Postfix) with ESMTP id C9F7B9400FD; Fri, 12 Feb 2010 14:34:45 -0500 (EST) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id o1CJkBm29568; Fri, 12 Feb 2010 14:46:11 -0500 (EST) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Fri, 12 Feb 2010 14:46:11 -0500 (EST) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Dmitry Marakasov In-Reply-To: <20100212190848.GF94665@hades.panopticon> Message-ID: References: <20100212180032.GC94665@hades.panopticon> <201002121820.o1CIKohU019226@lurza.secnetix.de> <20100212190848.GF94665@hades.panopticon> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Fri, 12 Feb 2010 19:39:48 +0000 Cc: freebsd-hackers@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, Oliver Fromme Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 19:34:50 -0000 On Fri, 12 Feb 2010, Dmitry Marakasov wrote: > * Oliver Fromme (olli@lurza.secnetix.de) wrote: > >> I'm sorry for the confusion ... I do not think that it's >> the cause for your data corruption, in this particular >> case. I just mentioned the potential problems with "soft" >> mounts because it could cause additional problems for you. >> (And it's important to know anyhow.) > > Oh, then I really misunderstood. If the curruption implied is > like when you copy a file via NFS and the net goes down, and in > case of soft mount you have half of a file (read: corruption), while > with hard mount the copy process will finish when the net is back up, > that's definitely OK and expected. > The problem is that it can't distinguish between "slow network/server" and partitioned/failed network. In your case (one client) it may work out ok. (I can't remember how long it takes to timeout and give up for "soft".) For many clients talking to an NFS server, the NFS server's response time can degrade to the point where "soft" mounted clients start timing out and that can get ugly. rick From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 13 00:35: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 A0CD01065679 for ; Sat, 13 Feb 2010 00:35:37 +0000 (UTC) (envelope-from alanbryan1234@yahoo.com) Received: from web50506.mail.re2.yahoo.com (web50506.mail.re2.yahoo.com [206.190.38.82]) by mx1.freebsd.org (Postfix) with SMTP id 429198FC0C for ; Sat, 13 Feb 2010 00:35:36 +0000 (UTC) Received: (qmail 49135 invoked by uid 60001); 13 Feb 2010 00:08:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1266019735; bh=Lv0BkxUWzPVmmMAq8FpqGQj6KOZ4moA7RZ/3l6/1Xv4=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=IeiQ0yMITvlTuMrtBRAGKnN6ANm7+wQUFwlfDHLChA0JpUaYhZiQigB+mPqktEllufVjP6XEnrxu4pUOTa8OXzg+7ThY5w+AO5O2LQK6ZALS78/1fyPTu0iJFVjlK+OLDF7qACMxkj6tFLzbSBV5Y2ffbsHWAnyO/QYm1mpeTXE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=h63O+dFjwx/0SNE6WF6HNMEEHXDCQIkRu2TD4KHdNQyoWoTk+7GZsV+pnhle5YkSYhk+dSvur0XGFq94+cF2jHO5koWSa9N2nKAb4G3nYnwtk+6YXmz6pkTIuDpYvhPOJceaT1YNvq5OzndaMOVdlF2J0ooT5PozMKb/bzq8gQM=; Message-ID: <247310.48932.qm@web50506.mail.re2.yahoo.com> X-YMail-OSG: IzzZhU8VM1ll1poyE018XtnsQVKrenAwqsG.kLObgunHImWm4Q2g93uXL2JQjMS1LKreqeazjWpyO55pfyhaqc7cZDR8Bx_9MI4svDaPuOjX5VCW2S6KloFISxT1CRtVXdePqzmka0pFA9oTVPyDCbPJGLjuE3ZkpSXMZJBImxDSIV6uBkyiRr5.iAo_ENJhfnURuqnLtr2TKNwlQtqiH6X_tGwDFIB_.L6cO572rZkEIwmfI19bkLrTXndJC7lsk_VhfeJAj.P0t8GJooB.OLFblSba5MQfYHIRvcJG8_f7YURIPa9lz_WgWNN7UDYAdnf9pauc9w0x.17sKt0- Received: from [99.24.6.121] by web50506.mail.re2.yahoo.com via HTTP; Fri, 12 Feb 2010 16:08:55 PST X-Mailer: YahooMailClassic/9.1.10 YahooMailWebService/0.8.100.260964 Date: Fri, 12 Feb 2010 16:08:55 -0800 (PST) From: alan bryan To: Dmitry Marakasov , Rick Macklem In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Sat, 13 Feb 2010 03:23:36 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: NFS write corruption on 8.0-RELEASE 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 Feb 2010 00:35:37 -0000 =0A=0A--- On Fri, 2/12/10, Rick Macklem wrote:=0A=0A= > From: Rick Macklem =0A> Subject: Re: NFS write corr= uption on 8.0-RELEASE=0A> To: "Dmitry Marakasov" =0A> Cc:= freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org, "John Baldwin" =0A> Date: Friday, February 12, 2010, 11:12 AM=0A> =0A> =0A>= On Fri, 12 Feb 2010, Dmitry Marakasov wrote:=0A> =0A> >=0A> > I'm planning= a massive testing for this weekend,=0A> including removing=0A> > soft moun= t option and trying linux client/server.=0A> >=0A> > Btw, I forgot to menti= on that I'm experiencing other=0A> NFS problems from=0A> > time to time, in= cluding "death" of a mount (that is,=0A> all processes that=0A> > try to ac= cess it freeze; this cures itself in some=0A> time with a message=0A> > "se= rver is alive again"). Also I've seen another=0A> strange thing - not=0A> >= only the mount dies but the network is flooded with=0A> NFS traffic.=0A> >= Last time I've seen it quite a while ago, so I don't=0A> remember the=0A> = > circumstances and direction of the traffic.=0A> >=0A> There are some patc= hes at:=0A> =A0=A0=A0 http://people.freebsd.org/~rmacklem=0A> that may be = relevant if you are using vanilla FreeBSD-8.0.=0A> (They're all=0A> now in = stable/8, but are post-release of 8.0.)=0A> =0A> rick=0A> =0A> ____________= ___________________________________=0A> freebsd-stable@freebsd.org=0A> mail= ing list=0A> http://lists.freebsd.org/mailman/listinfo/freebsd-stable=0A> T= o unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"=0A= > =0A=0A=0AThis is interesting:=0A=0A"I've seen another strange thing - not= only the mount dies but the network is flooded with NFS traffic."=0A=0ARic= k - this sounds very similar to the issues I was seeing (and reported in th= e thread on freebsd-stable "Zombie NFS writing from FreeBSD clients to Free= BSD 8.0 server with ZFS". =0A=0AFor the record - I updated to the latest 8= -Stable and that still didn't cure my issues. I was originally on hard mou= nts on udp, tried soft and TCP too, nothing solved it.=0A=0ASo, a few days = ago I switched to using samba and mount_smbfs instead and am now running 3 = days without a crash or any network traffic/load issues. (same machine, sam= e ZFS disks, etc...) Luckily it wasn't too painful to make the change. Wh= en I have more time I'd like to retry NFS.=0A=0A--Alan=0A=0A=0A=0A From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 13 09:31: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 C2144106568B; Sat, 13 Feb 2010 09:31:34 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 7CCAE8FC08; Sat, 13 Feb 2010 09:31:34 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1NgELc-00061N-WA; Sat, 13 Feb 2010 11:31:33 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 13 Feb 2010 11:31:32 +0200 From: Daniel Braniss Message-ID: Cc: Subject: NFS/UDP and vfs.nfs.nfs_ip_paranoia=0 does not help 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 Feb 2010 09:31:34 -0000 Hi, While trying to find out why our NSF/ZFS servers now hangs about once a week, I got hold of a similiar box, and got a bit more ambitious, I connected it via 2 NICs, to complicate things a bit, the server boots via pxeboot (ie, is datatless). After fiddling with the default gateway, adding -h to rpcbind and mountd, things seem ok, but UDP is 'problematic', I could do with TCP except that am-utils does a fsinfo via UDP when doing a /net/ and will hang the client. even with vfs.nfs.nfs_ip_paranoia=0, when the response from the server arrives with the 'wrong' ip, an ICMP destination unreachable (port unreachable) is replied. in short, on the client: this works: mount_nfs -o mntudp server-ip-vlanA:/mnt /mnt this fails: mount_nfs -o mntudp server-ip-vlanB:/mnt /mnt since the response is coming from server-ip-vlanA. Q: why does this work for TCP and fails for UDP Q: is there a workaround? danny From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 13 10:09: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 5C3901065672 for ; Sat, 13 Feb 2010 10:09:10 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id D8E5F8FC12 for ; Sat, 13 Feb 2010 10:09:09 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1DA96Rw058650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 13 Feb 2010 11:09:06 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1DA93lK052738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Feb 2010 11:09:03 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1DA93iY048987; Sat, 13 Feb 2010 11:09:03 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1DA92Jo048986; Sat, 13 Feb 2010 11:09:02 +0100 (CET) (envelope-from ticso) Date: Sat, 13 Feb 2010 11:09:02 +0100 From: Bernd Walter To: alan bryan Message-ID: <20100213100902.GH43625@cicely7.cicely.de> References: <247310.48932.qm@web50506.mail.re2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <247310.48932.qm@web50506.mail.re2.yahoo.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-hackers@freebsd.org, Dmitry Marakasov , freebsd-stable@freebsd.org, Rick Macklem Subject: Re: NFS write corruption on 8.0-RELEASE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2010 10:09:10 -0000 On Fri, Feb 12, 2010 at 04:08:55PM -0800, alan bryan wrote: > > > --- On Fri, 2/12/10, Rick Macklem wrote: > > > From: Rick Macklem > > Subject: Re: NFS write corruption on 8.0-RELEASE > > To: "Dmitry Marakasov" > > Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org, "John Baldwin" > > Date: Friday, February 12, 2010, 11:12 AM > > > > > > On Fri, 12 Feb 2010, Dmitry Marakasov wrote: > > > > > > > > I'm planning a massive testing for this weekend, > > including removing > > > soft mount option and trying linux client/server. > > > > > > Btw, I forgot to mention that I'm experiencing other > > NFS problems from > > > time to time, including "death" of a mount (that is, > > all processes that > > > try to access it freeze; this cures itself in some > > time with a message > > > "server is alive again"). Also I've seen another > > strange thing - not > > > only the mount dies but the network is flooded with > > NFS traffic. > > > Last time I've seen it quite a while ago, so I don't > > remember the > > > circumstances and direction of the traffic. > > > > > There are some patches at: > >     http://people.freebsd.org/~rmacklem > > that may be relevant if you are using vanilla FreeBSD-8.0. > > (They're all > > now in stable/8, but are post-release of 8.0.) > > > > rick > > > > _______________________________________________ > > freebsd-stable@freebsd.org > > mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > > > > > This is interesting: > > "I've seen another strange thing - not only the mount dies but the network is flooded with NFS traffic." You might be able to see NFS flooding with: Write file on client. rm the file during the write on the server. The client now gets IO-errors, but keeps trying forever. Maybe it depends on the mechanism the client application uses to write the file. I never reported because my client is an old 7.0-stable system. I originally noticed it when downloading files with seamonkey on my client and mv it on the server to another partition before it was completely downloaded. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.