From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 26 12:33:36 2011 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 33985106566B; Sun, 26 Jun 2011 12:33:36 +0000 (UTC) (envelope-from freebsd@psconsult.nl) Received: from mx1.psconsult.nl (mx1.psconsult.nl [80.89.238.138]) by mx1.freebsd.org (Postfix) with ESMTP id AB5948FC12; Sun, 26 Jun 2011 12:33:35 +0000 (UTC) Received: from mx1.psconsult.nl ([80.89.238.138]) by mx1.psconsult.nl (8.14.4/8.14.4) with ESMTP id p5QBtRhv086892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 26 Jun 2011 13:55:32 +0200 (CEST) (envelope-from freebsd@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.4/8.14.4/Submit) id p5QBtR5K086891; Sun, 26 Jun 2011 13:55:27 +0200 (CEST) (envelope-from freebsd@psconsult.nl) X-Authentication-Warning: mx1.psconsult.nl: paul set sender to freebsd@psconsult.nl using -f Date: Sun, 26 Jun 2011 13:55:27 +0200 From: Paul Schenkeveld To: freebsd-mobile@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20110626115527.GA86487@psconsult.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Automatic per-site configuration X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jun 2011 12:33:36 -0000 Hi, There must be many others like me who carry a laptop from one site to another every week. Currently I have to work at four different sites. I'd like my FreeBSD 8.2 laptop to automatically start stuff depending on where I boot it and also my personal login environment depends on where I am (PRINTER setting in .profile, clients to automatically start and DISPLAY setting in .xsession, key bindings in .ctwmrc etc.) Until recently I could look at the fully qualified hostname I got from DHCP as all DHCP servers gave me a usable hostname but now I also have to work at various sites where DHCP does not give me a hostname at all. Getting no hostname from DHCP confuses xdm which defaults to "1" requiring me to switch to another virtual console and manually set the hostname to "localhost" or something. The hostname="foo.bar.tld" in rc.conf is absolute, when set the hostname obtained from DHCP is ignored. How do other people solve this? I'd prefer to to be prompted during boot and during login for the site I want to configure for. Kind regards, Paul Schenkeveld From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 26 14:19:47 2011 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 C7302106566C for ; Sun, 26 Jun 2011 14:19:47 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8E5718FC0A for ; Sun, 26 Jun 2011 14:19:47 +0000 (UTC) Received: by iyb11 with SMTP id 11so4870163iyb.13 for ; Sun, 26 Jun 2011 07:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=OgxyGn2leLh26B/3fwH3OnfWmF9y9t9RpYLI4JlPFSw=; b=M0nhrkAMeDcJ6dMbktOcMZ54GjduNflaaz3GEqDh2b/PmKjcY2IDvOESnw4cwuGv7d gJzw3uRBg2nOSsQwX2olWEzGvcU2SG4Euj6dtZgoK7yrn9rnFU28AF+KNhO2Y4d3vQ/Q nCBM0wbP816FVRwQnrghdYomtmdQMFz5QpZ0I= 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=GcBinEwg7X/k3tgRwPkp+nfeJs61qfrFDsBVDFWF0aQEEHfYRSpDMyuaQn5GKE9lTI dpkedqcLf+5NBYvLMrKK3OaJSD7jV0oQ9IESPxFSiQdsgbwdOVzTjaCALa/KwCaa2oZX 69/fTCZdGk931PgKpHFxJ6eQRHUxwyk6Gs6K8= Received: by 10.231.116.92 with SMTP id l28mr5139349ibq.20.1309097984107; Sun, 26 Jun 2011 07:19:44 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.231.49.193 with HTTP; Sun, 26 Jun 2011 07:19:14 -0700 (PDT) In-Reply-To: <20110403211128.GB14454@hoeg.nl> References: <20110403192618.GS78089@deviant.kiev.zoral.com.ua> <20110403211128.GB14454@hoeg.nl> From: Chris Rees Date: Sun, 26 Jun 2011 15:19:14 +0100 X-Google-Sender-Auth: -4Z68eIsxOJdewO07KF910HOBnI Message-ID: To: Ed Schouten Content-Type: text/plain; charset=ISO-8859-1 Cc: Kostik Belousov , freebsd-hackers@freebsd.org Subject: Re: State of FreeBSD/xbox X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jun 2011 14:19:47 -0000 On 3 April 2011 22:11, Ed Schouten wrote: > Hi Chris, Kostik, > > * Kostik Belousov , 20110403 21:26: >> On Sun, Apr 03, 2011 at 07:40:14PM +0100, Chris Rees wrote: >> > In short-- FreeBSD/xbox is bitrotted (or so it appears!) > > Well, I did run FreeBSD HEAD on my Xbox only a couple of weeks ago and > it worked properly. I remember jhb@ made some PCI changes some time ago > that caused some breakage, but that got fixed as far as I know. > > So what kind of problems are you experiencing? > >> I wanted to remove XBOX for long time. With the introduction of Xen PV, >> i386/machdep.c became too convoluted. On the other hand, if you can >> bring it back to life, I definitely would not have an argument for removal. > > Sure. It was pretty awesome to see FreeBSD run on an Xbox, but nowadays > you can even get Android phones having better specs. Say, if the Xbox > code makes it hard to implement some kind of cool feature, I really > wouldn't mind seeing it go, as long as it's left the way it is in the > stable branches. Hey Ed, I've finally managed to dig the Xbox out; I was missing the video cable, but I gave up trying to find it and ebayed another. If you tried HEAD and it worked, I'm going to try that too; it may be that something in the 8- branch broke (not sure how, but probably not worth fixing if HEAD works OK). It was panicking on boot apparently, though kdb doesn't appear to work with the USB keyboard I was forced to use. I'll let you know how I get on with HEAD, Chris From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 26 14:28:04 2011 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 BF072106566C for ; Sun, 26 Jun 2011 14:28:04 +0000 (UTC) (envelope-from cjr@cruwe.de) Received: from cruwe.de (cruwe.de [188.40.164.98]) by mx1.freebsd.org (Postfix) with ESMTP id 779908FC12 for ; Sun, 26 Jun 2011 14:28:04 +0000 (UTC) Received: from cruwe.de (unknown [127.0.0.4]) by cruwe.de (Postfix) with ESMTP id F0A371AEBD for ; Sun, 26 Jun 2011 14:08:50 +0000 (UTC) Received: by cruwe.de (Postfix, from userid 65534) id D420F1AEBC; Sun, 26 Jun 2011 14:08:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.cruwe.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=4.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.1 Received: from dijkstra (p5B37B1DE.dip.t-dialin.net [91.55.177.222]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by cruwe.de (Postfix) with ESMTPSA id ADABF1AEB1 for ; Sun, 26 Jun 2011 14:08:48 +0000 (UTC) Date: Sun, 26 Jun 2011 16:08:45 +0200 From: "Christopher J. Ruwe" To: freebsd-hackers@freebsd.org Message-ID: <20110626160845.01de58cf@dijkstra> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.1; amd64-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV on mail.cruwe.de using ClamSMTP Subject: PR bin/157732 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jun 2011 14:28:04 -0000 In reaction to PR bin/157732 (http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/157732) I am investigating why traceroute does not trace hostnames greater in length than 64 chars. It turned out that a limit of 64 chars is coded into traceroute.c. From RFC2181 (http://tools.ietf.org/html/rfc2181#section-11) follows that a limit of 254 chars needs to be supported by software conforming to standard. traceroute calls gethostbyname(). It would be easiest (and results in a working program, I tried) to remove the part which checks against the limit of 64 chars completely. Another option would be to check against 254 chars. Now, I try to investigate whether removing the check altogether would result in any harmful effects in gethostbyname() or other functions. I have not found any possibilites of gethostbyname() buffer-overflowing. I consider my abilities readning and coding C beginner-level, so I am not sure and asking about opinions. Am I turning to the right forum with my request or should I post somewhere else? Thanks for your input, cheers -- Christopher J. Ruwe TZ GMT + 2 From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 26 15:32:45 2011 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 5984E106566C; Sun, 26 Jun 2011 15:32:45 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.c2i.net [212.247.154.226]) by mx1.freebsd.org (Postfix) with ESMTP id B105F8FC0A; Sun, 26 Jun 2011 15:32:44 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=3OyxrDLVq9sri6DuQhVzJBEiMCfYdL5zDZJFh5fE9Ak= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=OFN-utBgu9IRxVuK4ZsA:9 a=wPNLvfGTeEIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 145255988; Sun, 26 Jun 2011 17:32:42 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Sun, 26 Jun 2011 17:31:02 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <20110403211128.GB14454@hoeg.nl> In-Reply-To: X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201106261731.02465.hselasky@c2i.net> Cc: Chris Rees , Ed Schouten , Kostik Belousov Subject: Re: State of FreeBSD/xbox X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jun 2011 15:32:45 -0000 On Sunday 26 June 2011 16:19:14 Chris Rees wrote: > It was panicking on boot apparently, though kdb doesn't appear to work > with the USB keyboard I was forced to use. If you give USB some time to enumerate I should work in kdb. --HPS From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 26 15:52:21 2011 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 32527106566B for ; Sun, 26 Jun 2011 15:52:21 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id EC1688FC14 for ; Sun, 26 Jun 2011 15:52:20 +0000 (UTC) Received: by iwr19 with SMTP id 19so4909239iwr.13 for ; Sun, 26 Jun 2011 08:52:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=IGGC+kRnsaYuvuhdmYMREvYAmOISn1wlsfGqdTDRO2E=; b=Pr87foc/lc7ZkYIbiSUwPxvU8xF8VISskmVER8wxtv7Jo7o2y/PpfohaF8kO09KPZc idPED7RVm2l9g3tYsMpNz2NN1mHDifuei5y+4D5gnR3zvOpktc+/eVEeONnbZnuEeLy5 eie7VYich1paNug6SIWGp76ZmMhU/RKtlm3pw= 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=mCg4+HZmHZ2ytVDBCu0sQ/QprEvJvjMyIVQGUeRCmBqni6RL4lVGNz5SOXb1vcETI6 jM/8Ub5Lhx0q4J2MoquAbQyzZfeREtaSb0AvyrjEHsGoZnCvYdnRLa1LHhMm7/AhHk0C Yy3eFuAaqQccS3ykDZcOXtMQzhn1gVQfYkAzo= Received: by 10.231.44.65 with SMTP id z1mr5045623ibe.95.1309103537322; Sun, 26 Jun 2011 08:52:17 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.231.49.193 with HTTP; Sun, 26 Jun 2011 08:51:47 -0700 (PDT) In-Reply-To: <201106261731.02465.hselasky@c2i.net> References: <20110403211128.GB14454@hoeg.nl> <201106261731.02465.hselasky@c2i.net> From: Chris Rees Date: Sun, 26 Jun 2011 16:51:47 +0100 X-Google-Sender-Auth: jEjby3-NEQnTS8YKfitWgWhoq54 Message-ID: To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Cc: Kostik Belousov , freebsd-hackers@freebsd.org, Ed Schouten Subject: Re: State of FreeBSD/xbox X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jun 2011 15:52:21 -0000 On 26 June 2011 16:31, Hans Petter Selasky wrote: > On Sunday 26 June 2011 16:19:14 Chris Rees wrote: >> It was panicking on boot apparently, though kdb doesn't appear to work >> with the USB keyboard I was forced to use. > > If you give USB some time to enumerate I should work in kdb. > Thanks for the tip -- but I'm guessing that if it panics before usb starts (which it does) that won't help me much? Chris From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 26 19:25:17 2011 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 5F5E61065672 for ; Sun, 26 Jun 2011 19:25:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 20AFE8FC0C for ; Sun, 26 Jun 2011 19:25:17 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 4CB185C5A; Sun, 26 Jun 2011 21:06:35 +0200 (CEST) Message-ID: <4E07833A.8080803@FreeBSD.org> Date: Sun, 26 Jun 2011 21:06:34 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.19pre) Gecko/20110622 Lanikai/3.1.12pre MIME-Version: 1.0 To: "Christopher J. Ruwe" References: <20110626160845.01de58cf@dijkstra> In-Reply-To: <20110626160845.01de58cf@dijkstra> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: PR bin/157732 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jun 2011 19:25:17 -0000 On 2011-06-26 16:08, Christopher J. Ruwe wrote: > In reaction to PR bin/157732 > (http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/157732) I am > investigating why traceroute does not trace hostnames greater in length > than 64 chars. It turned out that a limit of 64 chars is coded into > traceroute.c. From RFC2181 > (http://tools.ietf.org/html/rfc2181#section-11) follows that a limit > of 254 chars needs to be supported by software conforming to standard. Fixed in r223579. This will be MFC'd in a few days. From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 26 20:58:12 2011 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 7C038106566C for ; Sun, 26 Jun 2011 20:58:12 +0000 (UTC) (envelope-from cjr@cruwe.de) Received: from cruwe.de (cruwe.de [188.40.164.98]) by mx1.freebsd.org (Postfix) with ESMTP id 297288FC08 for ; Sun, 26 Jun 2011 20:58:11 +0000 (UTC) Received: from cruwe.de (unknown [127.0.0.4]) by cruwe.de (Postfix) with ESMTP id E0FA61B571; Sun, 26 Jun 2011 20:58:10 +0000 (UTC) Received: by cruwe.de (Postfix, from userid 65534) id C2DE41B570; Sun, 26 Jun 2011 20:58:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.cruwe.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=4.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.1 Received: from dijkstra (p5B37A490.dip.t-dialin.net [91.55.164.144]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by cruwe.de (Postfix) with ESMTPSA id AC4331B566; Sun, 26 Jun 2011 20:58:08 +0000 (UTC) Date: Sun, 26 Jun 2011 22:58:06 +0200 From: "Christopher J. Ruwe" To: freebsd-hackers@freebsd.org Message-ID: <20110626225806.45fba9dd@dijkstra> In-Reply-To: <4E07833A.8080803@FreeBSD.org> References: <20110626160845.01de58cf@dijkstra> <4E07833A.8080803@FreeBSD.org> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.1; amd64-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV on mail.cruwe.de using ClamSMTP Cc: dim@freebsd.org Subject: Re: PR bin/157732 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jun 2011 20:58:12 -0000 On Sun, 26 Jun 2011 21:06:34 +0200 Dimitry Andric wrote: > On 2011-06-26 16:08, Christopher J. Ruwe wrote: > > In reaction to PR bin/157732 > > (http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/157732) I am > > investigating why traceroute does not trace hostnames greater in > > length than 64 chars. It turned out that a limit of 64 chars is > > coded into traceroute.c. From RFC2181 > > (http://tools.ietf.org/html/rfc2181#section-11) follows that a limit > > of 254 chars needs to be supported by software conforming to > > standard. > > Fixed in r223579. This will be MFC'd in a few days. > _______________________________________________ > 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" Thanks and cheers, -- Christopher J. Ruwe TZ GMT + 2 From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 26 18:40:12 2011 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 6FF71106566C for ; Sun, 26 Jun 2011 18:40:12 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2D0D18FC1B for ; Sun, 26 Jun 2011 18:40:11 +0000 (UTC) Received: by gwb15 with SMTP id 15so2188362gwb.13 for ; Sun, 26 Jun 2011 11:40:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=IFVWUdVDP5p6G+qcvQRMImvRUuvuXEsC95TIXs/fHDI=; b=CiaQWEzu/WzS2InI2se3yr04xQEi1mPrevqzrdP/HGLCgzOSh8F1jEq0P+6Otj60uh wfBS3uUZ1d1lyJ1Ovp3TwhBYtiBvpWoNqaIl0SG4zHiRlRRbDUYaddit6TDX2aiQVzzv nsMDcyAI//4zvjG11Ec9apUkye3bX/erIsxAs= 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=SptR7gpjjxepoxzQ+VSkyryawS4jYdYeJMKpZLy/pqUSf8Cttr7twLi89pXynd/61u +Pb4nXJKuUrcy3SwbDfx2B+BrgA/eRbYpFN47qQV++HonvdYSYdwoazc0QsVyK+AmZ25 PobeAfNBe3iGWTC2ZQHsTAtN0VCUDO7gQCj1c= MIME-Version: 1.0 Received: by 10.150.73.26 with SMTP id v26mr4173507yba.59.1309111822775; Sun, 26 Jun 2011 11:10:22 -0700 (PDT) Received: by 10.150.12.15 with HTTP; Sun, 26 Jun 2011 11:10:21 -0700 (PDT) In-Reply-To: <20110626115527.GA86487@psconsult.nl> References: <20110626115527.GA86487@psconsult.nl> Date: Sun, 26 Jun 2011 08:10:21 -1000 Message-ID: From: Kevin Oberman To: Paul Schenkeveld Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Sun, 26 Jun 2011 23:58:52 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: Automatic per-site configuration X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jun 2011 18:40:12 -0000 On Sun, Jun 26, 2011 at 1:55 AM, Paul Schenkeveld wr= ote: > Hi, > > There must be many others like me who carry a laptop from one site to > another every week. =A0Currently I have to work at four different sites. > > I'd like my FreeBSD 8.2 laptop to automatically start stuff depending > on where I boot it and also my personal login environment depends on > where I am (PRINTER setting in .profile, clients to automatically start > and DISPLAY setting in .xsession, key bindings in .ctwmrc etc.) > > Until recently I could look at the fully qualified hostname I got from > DHCP as all DHCP servers gave me a usable hostname but now I also have > to work at various sites where DHCP does not give me a hostname at all. > > Getting no hostname from DHCP confuses xdm which defaults to "1" > requiring me to switch to another virtual console and manually set the > hostname to "localhost" or something. > > The hostname=3D"foo.bar.tld" in rc.conf is absolute, when set the hostnam= e > obtained from DHCP is ignored. > > How do other people solve this? =A0I'd prefer to to be prompted during > boot and during login for the site I want to configure for. I have been using Tobias Roth's profile to do this for several years. It is an RC script that runs right after mountcritical and checks for known networks via several techniques. It then does a unionfs mount of a file-backed md on /etc. It contains t least a locations specific rc.conf.local and my contain whatever other files in /etc which you might want per-site, such as resolv.conf or wpa_supplicant.conf. While it has worked (with a two line tweak to /etc/rc.subr to rollback the for support for special processing of rc.d files with a .sh extension), several developers expressed concerns with its viability and I don't think Tobias has done anything with it for some time. I'm not even sure that it is still available. If it is not, I could probably make it, along with the trivial patch to /etc/rc.subr available. For a tool that supposedly would suffer from long-term viability, I have been using it for FreeBSD 5 through 8. I suspect it will work fine in 9, when I get around to trying it. --=20 R. Kevin Oberman, Network Engineer - Retired E-mail: kob6558@gmail.com From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 27 00:38:03 2011 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 B0CD91065678; Mon, 27 Jun 2011 00:38:03 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 6FDC48FC0A; Mon, 27 Jun 2011 00:38:03 +0000 (UTC) Received: from SBHFISLREXT03 ([10.132.254.62]) by SCSFISLTC02 (8.14.3/8.14.3) with ESMTP id p5R0c1tm021346; Sun, 26 Jun 2011 19:38:01 -0500 Received: from sbhfisltcgw01.FNFIS.COM (Not Verified[10.132.248.121]) by SBHFISLREXT03 with MailMarshal (v6, 5, 4, 7535) id ; Sun, 26 Jun 2011 19:38:31 -0500 Received: from sbhfisltcgw01.FNFIS.COM ([10.132.248.121]) by sbhfisltcgw01.FNFIS.COM with Microsoft SMTPSVC(6.0.3790.4675); Sun, 26 Jun 2011 19:38:00 -0500 Received: from [10.0.0.104] ([10.132.254.136]) by sbhfisltcgw01.FNFIS.COM over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sun, 26 Jun 2011 19:37:59 -0500 Mime-Version: 1.0 (Apple Message framework v1084) From: Devin Teske In-Reply-To: <20110423114253.GA5836@saltmine.radix.net> Date: Sun, 26 Jun 2011 17:37:58 -0700 Message-Id: References: <02a701cc006a$887da210$9978e630$@vicor.com> <20110422145518.GA16734@freebsd.org> <20110422154146.GA26083@freebsd.org> <20110422173509.000077ba@unknown> <039f01cc010d$b476d0f0$1d6472d0$@vicor.com> <20110423085451.00002c29@unknown> <20110423114253.GA5836@saltmine.radix.net> To: Thomas Dickey X-Mailer: Apple Mail (2.1084) X-OriginalArrivalTime: 27 Jun 2011 00:38:00.0200 (UTC) FILETIME=[776D6880:01CC3462] Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Bruce Cran , Alexander Best , Devin Teske , FreeBSD Hackers , FreeBSD Mailing List Subject: Re: [UPDATE] host-setup(1): a dialog(1)-based utility for configuring FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 Jun 2011 00:38:03 -0000 On Apr 23, 2011, at 4:42 AM, Thomas Dickey wrote: > On Sat, Apr 23, 2011 at 08:54:51AM +0100, Bruce Cran wrote: >> On Fri, 22 Apr 2011 09:52:44 -0700 >> "Devin Teske" wrote: >>=20 >>> Looks like `--hline' is not supported anymore. Thinking this should >>> either be patched or documented in ERRATA/UPGRADING. >>=20 >> I think you mean UPDATING :) >=20 > perhaps. But reporting bugs is nicer than long discussion threads. I've released a new version of my host-setup utility. Available here: http://druidbsd.sourceforge.net/download/host-setup.txt or here: http://druidbsd.sourceforge.net/ Now at version 3.2, here's the delta: - Added support for FreeBSD-9.x's new dialog(1) (which lacks `--hline' supp= ort). - Added support for /usr/ports/x11/Xdialog You can now execute this on the console or in X windows. Default is console, to execute in X windows, execute: host-setup -X --=20 Cheers, Devin Teske -> LEGAL DISCLAIMER <- This message contains confidential and proprietary information of the sender, and is intended only for the person(s) to whom it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you have received this message in error, please notify the e-mail sender immediately, and delete the original message without making a copy. -> FUN STUFF <- -----BEGIN GEEK CODE BLOCK----- Version 3.12 GAT/CS/B/CC/E/IT/MC/M/MU/P/S/TW d+(++) s: a- C+++@$ UB++++$ P++++@$ L++++$ = E- W+++ N? o? K? w@ O M++$ V- PS+>++ PE@ Y+ PGP-> t(+) 5? X(+) R(-) tv+ b+>++ = DI+ D+(++) G++ e>++++ h r+++ z+++ ------END GEEK CODE BLOCK------ http://www.geekcode.com/ -> END TRANSMISSION <- _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you. _____________ From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 26 20:03:27 2011 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 B2D05106566B; Sun, 26 Jun 2011 20:03:27 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6DFB08FC08; Sun, 26 Jun 2011 20:03:27 +0000 (UTC) Received: by iyb11 with SMTP id 11so5046992iyb.13 for ; Sun, 26 Jun 2011 13:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to:cc :content-type; bh=ZLPIx/IarlNjkooGwxEtmmX8iIt7cfJ+M6mnkQO2hh4=; b=GB18smF9ZWBL9DSuXN42O9sVWRV4EM1Ugci9UaP5uWpcgFXwwwalvqw5YqPzV8MbMO LKaecnCBi3TH0nmG+bkMxtp2T+8r9/z/ZQw/G8fltUoxC0lyvHziiTCIurtdd0pH+7fK GinJPfUpFcphKR83lm80vPSsDI2dnJ7IA9RIo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=JCbyKxHq325ufeRfMAzEA1D0L297ZfezztC4G1lAajJmTFSYSO+Es674CBkn64uF5s w+gb6MiJiogt54moKTqVSPzhXJYcOyd6Y3PfTatJd7w5athZPOyhjhnRL5L605USGHmx BL3Bo/TxvE/1qBK4lVBwvpSr2Vcp7pbiLzcXk= MIME-Version: 1.0 Received: by 10.43.43.199 with SMTP id ud7mr6122012icb.450.1309118606714; Sun, 26 Jun 2011 13:03:26 -0700 (PDT) Received: by 10.231.49.193 with HTTP; Sun, 26 Jun 2011 13:03:26 -0700 (PDT) Received: by 10.231.49.193 with HTTP; Sun, 26 Jun 2011 13:03:26 -0700 (PDT) Date: Sun, 26 Jun 2011 21:03:26 +0100 Message-ID: From: Chris Rees To: Chris Rees X-Mailman-Approved-At: Mon, 27 Jun 2011 01:06:23 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Kostik Belousov , Ed Schouten , Hans Petter Selasky , freebsd-hackers@freebsd.org Subject: Re: State of FreeBSD/xbox X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jun 2011 20:03:27 -0000 On 26 Jun 2011 16:51, "Chris Rees" wrote: > > On 26 June 2011 16:31, Hans Petter Selasky wrote: > > On Sunday 26 June 2011 16:19:14 Chris Rees wrote: > >> It was panicking on boot apparently, though kdb doesn't appear to work > >> with the USB keyboard I was forced to use. > > > > If you give USB some time to enumerate I should work in kdb. > > > > Thanks for the tip -- but I'm guessing that if it panics before usb > starts (which it does) that won't help me much? > Ok, I've installed current (as of today). The system now panics with No usable event timer found! I'm guessing the CPU doesn't have an entry in the event timer code? I believe it was rewritten recently, could that be the culprit? Chris From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 27 10:59:28 2011 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 103181065672; Mon, 27 Jun 2011 10:59:28 +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 793048FC13; Mon, 27 Jun 2011 10:59:26 +0000 (UTC) Received: from park.js.berklix.net (pD9FBE654.dip.t-dialin.net [217.251.230.84]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id p5RAxP8Q012905; Mon, 27 Jun 2011 10:59:25 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 p5RAxFKY020533; Mon, 27 Jun 2011 12:59:17 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.4/8.14.4) with ESMTP id p5RAxAsG022832; Mon, 27 Jun 2011 10:59:15 GMT (envelope-from jhs@fire.js.berklix.net) Message-Id: <201106271059.p5RAxAsG022832@fire.js.berklix.net> To: Tim Kientzle 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 "Sat, 25 Jun 2011 09:41:36 PDT." <31D907F2-1F80-40B4-BDC3-486E3F988FE7@freebsd.org> Date: Mon, 27 Jun 2011 12:59:10 +0200 Sender: jhs@berklix.com Cc: hackers@freebsd.org, portsmaster@freebsd.org Subject: Re: tar has deficient error handling. send-pr fix sent 31 Jan 2011 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 Jun 2011 10:59:28 -0000 Hi, Reference: > From: Tim Kientzle > Date: Sat, 25 Jun 2011 09:41:36 -0700 > Message-id: <31D907F2-1F80-40B4-BDC3-486E3F988FE7@freebsd.org> Tim Kientzle wrote: > Thanks for the reminder Julian. > > I've just committed a fix to trunk that I'd appreciate if you could look at. > > > Might be nice if someone else would read through tar. > > More eyes are always better! I'd especially appreciate help > improving the test suite for tar. I've put a lot of work into > the test suite for libarchive, but the tar front-end has seen > less effort in this area. > > Cheers, > > Tim > > On Jun 23, 2011, at 9:20 AM, Julian H. Stacey wrote: > > > FreeBSD tar has deficient error handling. I sent a fix 31 Jan 2011 > > http://www.freebsd.org/cgi/query-pr.cgi?pr=154407 > > Please commit the fix or write & commit a better fix. > > > > As error codes ignored, I wonder if other poor coding may lurk in tar. > > Might be nice if someone else would read through tar. > > > > ports/ : Tar allows some errors in ports pkg-list to go un-noticed. > > Using make package, tar fails to see errors, fails to return error > > to make, some pkg-list not checked properly & accumulate errors, > > A bunch of errors will probably show up when tar is fixed, the > > more the longer we do nothing. ( I can't remember which pkg-list > > are broken, I've not kept note, The solution is to read tar & > > commit a fix to tar ASAP) > > > > Cheers, > > Julian Thanks Tim, I will look & get back to you. Re test suite: Maybe you can add something to check for errors not caught by original tar + `cd ports/www/apache13 ; make package` ( Files not found, tar didn't notice. I guess a macro with pkg-plist was corrupting paths fed to tar ) Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Reply below, not above; Indent with "> "; Cumulative like a play script. Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable. From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 27 11:17:05 2011 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 E686F1065679 for ; Mon, 27 Jun 2011 11:17:05 +0000 (UTC) (envelope-from matthias.andree@gmx.de) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by mx1.freebsd.org (Postfix) with SMTP id 598C38FC13 for ; Mon, 27 Jun 2011 11:17:04 +0000 (UTC) Received: (qmail invoked by alias); 27 Jun 2011 11:17:03 -0000 Received: from g226238161.adsl.alicedsl.de (EHLO apollo.emma.line.org) [92.226.238.161] by mail.gmx.net (mp006) with SMTP; 27 Jun 2011 13:17:03 +0200 X-Authenticated: #428038 X-Provags-ID: V01U2FsdGVkX1/QRX8zmkXQoYdqE4tN/BW4Q0m0myNv4aC3wkBihN Fy3TQGTHOtVlPn Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by apollo.emma.line.org (Postfix) with ESMTP id 2217A23DAE4; Mon, 27 Jun 2011 13:17:02 +0200 (CEST) Message-ID: <4E0866AD.6010203@gmx.de> Date: Mon, 27 Jun 2011 13:17:01 +0200 From: Matthias Andree User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Mnenhy/0.8.3 Thunderbird/3.1.10 MIME-Version: 1.0 To: Steven Hartland References: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> <4E051576.7090505@gmx.de> <512CB9DD5802403BA3ACC48FE3AE63F5@multiplay.co.uk> In-Reply-To: <512CB9DD5802403BA3ACC48FE3AE63F5@multiplay.co.uk> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-net@freebsd.org, freebsd-java@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 Jun 2011 11:17:06 -0000 Am 25.06.2011 13:28, schrieb Steven Hartland: > > ----- Original Message ----- From: "Matthias Andree" > > > I'm adding back in -java as based on you comments it may well be > something in the jdk passing invalid values down to the kernel > syscall. > >>> The socket bind works fine and the packets sent to the server arrive >>> and are processed by the app but when it tries to reply using >>> send the result is:- >>> java.io.IOException: Invalid argument >>> at java.net.PlainDatagramSocketImpl.send(Native Method) >>> at java.net.DatagramSocket.send(DatagramSocket.java:629) >>> >>> using truss we see the following:- >>> socket(PF_INET6,SOCK_DGRAM,0) = 20 (0x14) >>> setsockopt(0x14,0x29,0x1b,0x7ffffedf0318,0x4,0x0) = 0 (0x0) >>> setsockopt(0x14,0xffff,0x20,0x7ffffedf031c,0x4,0x0) = 0 (0x0) >>> bind(20,{ AF_INET6 [3800::10:0:0:0]:20736 },28) = 0 (0x0) >>> .. >>> sendto(20,"\M^?\M^?\M^?\M^?I\aMultiplay :: "...,82,0x0,{ AF_INET6 >>> [3800::10:0:0:0]:20736 },0x1c) ERR#22 'Invalid argument' >> >> You're trying to send to your own address, but you're likely not using >> the loopback interface for that. Is that permitted by your firewall >> configuration and routing? > > No I'm not its replying to the sender. Yes you are, check your trace: The sendto address and port are the same as the bound address. > In the java code we have:- > socket.send( new DatagramPacket( data, data.length, > src.getSocketAddress() ) ); > Where src is the src packet. This works fine on IPv4 only machines and > when the jdk is told to use only IPv4 stack. So its not a problem with > the java code itself but could well be an issue with the What data type is it? > >> >>> sockstat shows it binding correctly >>> root java 894 21 tcp4 85.236.109.212:25675 *:* >> >> This is unrelated, as it has fd #21 not #20 as in the socket/bind/sendto >> calls. You've quoted the wrong line from sockstat output. > > Oops sorry cut and paste error (wrong line) heres the correct line. > root java 894 20 udp4 85.236.109.212:25675 *:* While a datagram socket, it does not match the socket()/bind() above. An INET6-domain datagram socket would be listed as udp6 here. Are you sure you're tracing the right VM and are looking at the right thread? If so, is the incriminated traffic actually going through socket #20? Is src.getSocketAddress() actually returning an IPv6 address? SocketAddress is an abstract class. For my lack of Java knowledge: are there any automatic type promotions on the Java side? What's the Java code for binding to the socket and fetching the query packet? > The jvm automatically sets this on all sockets for compatibility for > this exact reason. I'm not rulling out an issue with the IPv6 -> v4 > routing in the kernel though. That is prohibited, so there isn't IPv6 -> IPv4 routing. All IPv6 traffic remains in the IPv6 domain. >> Are you sure that's what you seeing? It's not a match for what you give >> above, but anyways it's an implementation artifact because the tcp code >> for v4 and v6 used to be shared and the udp code separate. > > Thats not how the jdk works, its ment to be 100% transparent but isn't. You mean the JRE. >> It is best to set up one IPv4 and one IPv6 listening socket. > > I don't believe there is any way to do this in java it either uses the > IPv4 stack only or the IPv6 stack only hence relies on the kernel > routing IPv4 packets through the IPv6 stack. > > Thats the reason the jdk explicitly enables this for all the ports it > creates, which was added as a back port of the jdk7 fixes which can > be seen here:- > http://www.freebsd.org/cgi/cvsweb.cgi/ports/java/openjdk6/files/patch-set > >> Check the URL above, perhaps that helps your understanding a bit. I >> presume 3800::10:0:0:0 is your server? > > Not that I'm aware of, here's the output from ifconfig if anyone can > tell me different, as I'm new to IPv6 and don't follow how its mapped > yet. > > ifconfig > igb0: flags=8843 metric 0 mtu 1500 > > options=1bb > > ether 00:25:90:2c:3c:b0 > inet 85.236.109.212 netmask 0xffffff00 broadcast 85.236.109.255 > inet6 fe80::225:90ff:fe2c:3cb0%igb0 prefixlen 64 scopeid 0x1 > inet6 2001:4db0:20:2::1337 prefixlen 64 nd6 The 2001:something is your local address. If you bind to 3800:: something that won't work. You couldn't bind an IPv4 address of 10.9.8.7 on this interface either. > igb1: flags=8802 metric 0 mtu 1500 > > options=1bb > > ether 00:25:90:2c:3c:b1 > media: Ethernet autoselect (1000baseSX ) > status: active This iface has no addresses at IP level at all. > lo0: flags=8049 metric 0 mtu 16384 > options=3 > inet 127.0.0.1 netmask 0xff000000 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 nd6 > options=3 Other than that, looks reasonable. There are link-local IPv6 addresses on igb0 and lo0, and there is a global IPv6 address on igb0. There is a routable IPv4 address on igb0, and the loopback address on lo0. That's OK, but an IPv6 bind could only ever use an address from 2001:4db0:20:2::/64, not 3800. Are you sure you're using the right address in bind()? It specifies the local sender address for transmitted datagrams... From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 27 11:46:34 2011 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 0C50D1065672; Mon, 27 Jun 2011 11:46:34 +0000 (UTC) (envelope-from prvs=11594ac97a=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 289708FC18; Mon, 27 Jun 2011 11:46:32 +0000 (UTC) X-MDAV-Processed: mail1.multiplay.co.uk, Mon, 27 Jun 2011 12:34:40 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Mon, 27 Jun 2011 12:34:40 +0100 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-5.0 required=6.0 tests=USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.2.5 Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50013885737.msg; Mon, 27 Jun 2011 12:34:38 +0100 X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=11594ac97a=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: <01DA6DDBE3684C3785734F16008244E4@multiplay.co.uk> From: "Steven Hartland" To: "Matthias Andree" References: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> <4E051576.7090505@gmx.de> <512CB9DD5802403BA3ACC48FE3AE63F5@multiplay.co.uk> <4E0866AD.6010203@gmx.de> Date: Mon, 27 Jun 2011 12:34:57 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Cc: freebsd-net@freebsd.org, freebsd-java@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 Jun 2011 11:46:34 -0000 ----- Original Message ----- From: "Matthias Andree" >> No I'm not its replying to the sender. > > Yes you are, check your trace: The sendto address and port are the same > as the bound address. This is a bug in truss it seems, Bjoern said he's gonna have a look at it. Doesn't matter what you bind to it always reports this value in the truss output. >> In the java code we have:- >> socket.send( new DatagramPacket( data, data.length, >> src.getSocketAddress() ) ); >> Where src is the src packet. This works fine on IPv4 only machines and >> when the jdk is told to use only IPv4 stack. So its not a problem with >> the java code itself but could well be an issue with the > > What data type is it? All mute as the Bjoern found and fixed the issue, it was a bug in the kernel fixed by:- http://svnweb.freebsd.org/base?view=revision&revision=220463 >> Oops sorry cut and paste error (wrong line) heres the correct line. >> root java 894 20 udp4 85.236.109.212:25675 *:* > > While a datagram socket, it does not match the socket()/bind() above. > > An INET6-domain datagram socket would be listed as udp6 here. Are you > sure you're tracing the right VM and are looking at the right thread? Again, truss isn't showing the correct results, confused me too ;-) Possibly another bug in sockstat / netstat as well, when the socket is a IPv6 socket bound to an IPv4 address maybe it should indicate this e.g. udp6-4 instead of either udp4 or udp6; alternatively maybe udp6 + a IPv4 address is enough to indicate this, but that could cause confusion. Thanks for looking at this, appreciated :) Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 27 12:18:10 2011 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 0EBA7106566C for ; Mon, 27 Jun 2011 12:18:10 +0000 (UTC) (envelope-from matthias.andree@gmx.de) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mx1.freebsd.org (Postfix) with SMTP id 58C8D8FC16 for ; Mon, 27 Jun 2011 12:18:08 +0000 (UTC) Received: (qmail invoked by alias); 27 Jun 2011 12:18:07 -0000 Received: from g226238161.adsl.alicedsl.de (EHLO apollo.emma.line.org) [92.226.238.161] by mail.gmx.net (mp065) with SMTP; 27 Jun 2011 14:18:07 +0200 X-Authenticated: #428038 X-Provags-ID: V01U2FsdGVkX19tTZwXKiRtqchkisXbSrjBm0z266/OPgXCaKwECv oSijh2/+i7qHtS Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by apollo.emma.line.org (Postfix) with ESMTP id EEE6123CF8A; Mon, 27 Jun 2011 14:18:05 +0200 (CEST) Message-ID: <4E0874FD.506@gmx.de> Date: Mon, 27 Jun 2011 14:18:05 +0200 From: Matthias Andree User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Mnenhy/0.8.3 Thunderbird/3.1.10 MIME-Version: 1.0 To: Steven Hartland References: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> <4E051576.7090505@gmx.de> <512CB9DD5802403BA3ACC48FE3AE63F5@multiplay.co.uk> <4E0866AD.6010203@gmx.de> <01DA6DDBE3684C3785734F16008244E4@multiplay.co.uk> In-Reply-To: <01DA6DDBE3684C3785734F16008244E4@multiplay.co.uk> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-net@freebsd.org, freebsd-java@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 Jun 2011 12:18:10 -0000 Just so we have pointers in the public archives: alternatives to truss are strace (in ports) and ktrace/kdump; and to obtain socket statistics, try lsof (from ports, too) possibly with -i and optionally -n and/or -P option. From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 15:41:42 2011 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 D2A44106566B for ; Tue, 28 Jun 2011 15:41:42 +0000 (UTC) (envelope-from ben@links.org) Received: from mail.links.org (mail.links.org [217.155.92.109]) by mx1.freebsd.org (Postfix) with ESMTP id 8E24A8FC0C for ; Tue, 28 Jun 2011 15:41:42 +0000 (UTC) Received: from [193.133.15.218] (localhost [127.0.0.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.links.org (Postfix) with ESMTPS id 6491733C1A for ; Tue, 28 Jun 2011 16:41:41 +0100 (BST) Message-ID: <4E09F633.7040203@links.org> Date: Tue, 28 Jun 2011 16:41:39 +0100 From: Ben Laurie User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: hackers@FreeBSD.org X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: tls_model in clang? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jun 2011 15:41:42 -0000 .../lib/libc/stdlib/malloc.c:1106:38: warning: unknown attribute 'tls_model' ignored [-Wattributes] static __thread arena_t *arenas_map TLS_MODEL; ^ .../lib/libc/stdlib/malloc.c:243:37: note: instantiated from: # define TLS_MODEL __attribute__((tls_model("initial-exec"))) Any thoughts on what we should do under clang? Given that things appear to work, perhaps just set TLS_MODEL to nothing? -- http://www.apache-ssl.org/ben.html http://www.links.org/ "There is no limit to what a man can do or how far he can go if he doesn't mind who gets the credit." - Robert Woodruff From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 16:47:56 2011 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 AE81E106566C for ; Tue, 28 Jun 2011 16:47:56 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7B1A08FC18 for ; Tue, 28 Jun 2011 16:47:56 +0000 (UTC) Received: by iwr19 with SMTP id 19so436440iwr.13 for ; Tue, 28 Jun 2011 09:47:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=tTfF64eAvYoPRBEDP3B7f6F1Ln2bj9raiMcvTYgWKSw=; b=Ey7pu4XiULVPv3M6ZyhQqeMNnQYJShyvy4PX96wT+GCqTpfUW5NU/kWDyG0VC2ZQZS oKQOdBLyqpgxFp35aBEP6/VQPAQq3T/W72BTEZEbHqgIP1+XbVFuONR9A67OuFXKWA5E 4V2jpXiM179wsgs53QpzTeONJO7UwJpeM2y6Y= Received: by 10.231.114.86 with SMTP id d22mr876188ibq.45.1309279674072; Tue, 28 Jun 2011 09:47:54 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.231.49.193 with HTTP; Tue, 28 Jun 2011 09:47:24 -0700 (PDT) From: Chris Rees Date: Tue, 28 Jun 2011 17:47:24 +0100 X-Google-Sender-Auth: hs5-7mpIR8zcx1II2QAAWWuAXzc Message-ID: To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Default value for UIDs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jun 2011 16:47:56 -0000 Hi all, [crees@zeus]~% tail -n 2 /usr/ports/UIDs dbxml:*:949:949::0:0:dbXML user:/nonexistent:/sbin/nologin nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin [crees@zeus]~% grep crees /etc/passwd crees:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh chris:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh [crees@zeus]~% I'm a little concerned at how close the ports UIDs are getting to the username space... A patch at [1] solves the problem for new installs, but it is definitely shutting the stable door after the horse has bolted. Other than jumping to 32001 for new ports UIDs, we should possible consider alternatives? Before people scoff at the prospect of this number being reached soon, I'm working on patching the ports tree (with bapt) to make sure that all ports that create users have a UIDs entry, and there seems to be many that don't. Can we at least get this in for new installs? I'm aware other patches will be needed (perhaps sysinstall haha), but does this look workable? We're in the minority of OSes it appears -- many others have made users from 10000 for a while. Chris [1] http://people.freebsd.org/~crees/patches/pw-default-uid.diff From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 17:16:15 2011 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 44C6A106564A for ; Tue, 28 Jun 2011 17:16:15 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) by mx1.freebsd.org (Postfix) with ESMTP id DCAEB8FC20 for ; Tue, 28 Jun 2011 17:16:14 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email2.allantgroup.com (8.14.4/8.14.4) with ESMTP id p5SGxUMk007693 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 28 Jun 2011 11:59:30 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.5/8.14.5) with ESMTP id p5SGxMwu008281 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 28 Jun 2011 11:59:22 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.5/8.14.5/Submit) id p5SGxDQA008106; Tue, 28 Jun 2011 11:59:13 -0500 (CDT) (envelope-from dan) Date: Tue, 28 Jun 2011 11:59:13 -0500 From: Dan Nelson To: Chris Rees Message-ID: <20110628165911.GC44024@dan.emsphone.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 8.2-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [199.67.51.78]); Tue, 28 Jun 2011 11:59:30 -0500 (CDT) X-Scanned-By: MIMEDefang 2.68 on 199.67.51.78 Cc: hackers@freebsd.org Subject: Re: Default value for UIDs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jun 2011 17:16:15 -0000 In the last episode (Jun 28), Chris Rees said: > Hi all, > > [crees@zeus]~% tail -n 2 /usr/ports/UIDs > dbxml:*:949:949::0:0:dbXML user:/nonexistent:/sbin/nologin > nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin > [crees@zeus]~% grep crees /etc/passwd > crees:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh > chris:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh > [crees@zeus]~% > > I'm a little concerned at how close the ports UIDs are getting to the > username space... There are only 216 entries in UIDs, though, so if people are just using "last entry + 1" when adding new ones, they should probably start filling the gaps instead. The 100s and 200s are pretty dense, but 350-399 only has 5 entries, 400-499 has 4, 600-699 has 7, 700-799 has 3, etc. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 17:30:54 2011 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 530C7106564A for ; Tue, 28 Jun 2011 17:30:54 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1A7D78FC1A for ; Tue, 28 Jun 2011 17:30:53 +0000 (UTC) Received: by iyb11 with SMTP id 11so484107iyb.13 for ; Tue, 28 Jun 2011 10:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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 :content-transfer-encoding; bh=dw9RhHss2uoVy1jmXTTTGV61j8Axgoab+9hd6VU6xkw=; b=UU/MS0DvZ+nkKLaTKjeNBQ8r5uE+xHfhqf2M/IMx2jANRQmklpOEKlfYG6gIx0+Fd8 +/euLwyJisLjKqxTn0i7ZlsKRDDHKGL1O1siyz+a2cVUnJypixyz/08cCeZlg2WWmDuN aQaE1S+98rMFZsaOD33+G/4lh8rIkxXP2L4V8= Received: by 10.43.130.134 with SMTP id hm6mr9222458icc.517.1309282253120; Tue, 28 Jun 2011 10:30:53 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.231.49.193 with HTTP; Tue, 28 Jun 2011 10:30:23 -0700 (PDT) In-Reply-To: <20110628165911.GC44024@dan.emsphone.com> References: <20110628165911.GC44024@dan.emsphone.com> From: Chris Rees Date: Tue, 28 Jun 2011 18:30:23 +0100 X-Google-Sender-Auth: dhysmugy5C_qjMPq6AoZmk2avNw Message-ID: To: Dan Nelson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: Default value for UIDs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jun 2011 17:30:54 -0000 On 28 June 2011 17:59, Dan Nelson wrote: > In the last episode (Jun 28), Chris Rees said: >> Hi all, >> >> [crees@zeus]~% tail -n 2 /usr/ports/UIDs >> dbxml:*:949:949::0:0:dbXML user:/nonexistent:/sbin/nologin >> nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nolog= in >> [crees@zeus]~% grep crees /etc/passwd >> crees:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh >> chris:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh >> [crees@zeus]~% >> >> I'm a little concerned at how close the ports UIDs are getting to the >> username space... > > There are only 216 entries in UIDs, though, so if people are just using > "last entry + 1" when adding new ones, they should probably start filling > the gaps instead. =A0The 100s and 200s are pretty dense, but 350-399 only= has > 5 entries, 400-499 has 4, 600-699 has 7, 700-799 has 3, etc. > Thank you for pointing that out (d'oh). However, perhaps we could still address the *potential* problems. To use one example, Debian has (as long as I can remember) used 10001 for the first username. When we have 65535 - 99 UIDs to play with, expansion like this isn't a problem. Could it be worth it? Think of ten years down the line. Chris From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 18:40:30 2011 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 6DC8A1065679 for ; Tue, 28 Jun 2011 18:40:30 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id 443FD8FC19 for ; Tue, 28 Jun 2011 18:40:30 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id p5SIXwS2008660 for ; Tue, 28 Jun 2011 11:33:58 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <4E0A201D.9000601@rawbw.com> Date: Tue, 28 Jun 2011 11:40:29 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.16) Gecko/20101211 Thunderbird/3.0.11 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: How can process in STOP state consume 200% CPU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jun 2011 18:40:30 -0000 I got VirtualBox process in a strange state. It has the status STOP but shows by top as consuming 200% CPU for a very long time. How is this possible and what does this mean? Process time stays at 0:00 TIME. kill -9 doesn't kill it. PID USERNAME THR PRI NICE SIZE RES STATE C TIME CPU COMMAND 9390 yuri 3 44 0 508M 246M STOP 3 0:00 200.00% VirtualBox <...> 8.2-STABLE Yuri From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 19:58:12 2011 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 31C08106564A for ; Tue, 28 Jun 2011 19:58:12 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id E60A18FC16 for ; Tue, 28 Jun 2011 19:58:11 +0000 (UTC) Received: by iwr19 with SMTP id 19so644193iwr.13 for ; Tue, 28 Jun 2011 12:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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 :content-transfer-encoding; bh=7UEF5SSyZZDxu12AX6hOALTuTACpVO68/M2oroEQVhE=; b=RKc2/6oUXFZ6hwl5BfeIhmEunrnrBGSB8c31e/j0m+4A+j51V6XuWyDYXRG2rX+KnE rz1iJmKu8EcmlUPHbPuC/TO3IlwMtU3DSGuc4U8Qftz6vS2Plcj5XRwGTBVOVAfrUyas xe2oAdcbmJZgyH8PIiTk8Bi648pkfnUezjAFQ= Received: by 10.231.114.86 with SMTP id d22mr1020519ibq.45.1309291091106; Tue, 28 Jun 2011 12:58:11 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.231.49.193 with HTTP; Tue, 28 Jun 2011 12:57:41 -0700 (PDT) In-Reply-To: References: <20110628165911.GC44024@dan.emsphone.com> From: Chris Rees Date: Tue, 28 Jun 2011 20:57:41 +0100 X-Google-Sender-Auth: MKBnejx4atjo5PYVTGPvRLbN3Ns Message-ID: To: jhell , Greg Lewis Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org, Dan Nelson Subject: Re: Default value for UIDs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jun 2011 19:58:12 -0000 On 28 June 2011 20:50, jhell wrote: > On Tue, Jun 28, 2011 at 06:30:23PM +0100, Chris Rees wrote: >> On 28 June 2011 17:59, Dan Nelson wrote: >> > In the last episode (Jun 28), Chris Rees said: >> >> Hi all, >> >> >> >> [crees@zeus]~% tail -n 2 /usr/ports/UIDs >> >> dbxml:*:949:949::0:0:dbXML user:/nonexistent:/sbin/nologin >> >> nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/no= login >> >> [crees@zeus]~% grep crees /etc/passwd >> >> crees:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh >> >> chris:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh >> >> [crees@zeus]~% >> >> >> >> I'm a little concerned at how close the ports UIDs are getting to the >> >> username space... >> > >> > There are only 216 entries in UIDs, though, so if people are just usin= g >> > "last entry + 1" when adding new ones, they should probably start fill= ing >> > the gaps instead. =A0The 100s and 200s are pretty dense, but 350-399 o= nly has >> > 5 entries, 400-499 has 4, 600-699 has 7, 700-799 has 3, etc. >> > >> >> Thank you for pointing that out (d'oh). >> >> However, perhaps we could still address the *potential* problems. To >> use one example, Debian has (as long as I can remember) used 10001 for >> the first username. When we have 65535 - 99 UIDs to play with, >> expansion like this isn't a problem. >> >> Could it be worth it? Think of ten years down the line. >> > > Best part would be to find every port that doesnt need a statically > allocated UID/GID and just dynamically allocate them after a certain > range '30000-50000' or whatever for ~20,000 ports and divide that > namespace up by category. > > > dbxml really does it really need to be static ? it just needs to run. > > Also: (stable/8) /usr/ports/UIDs > dbxml:*:945:945::0:0:& user:/nonexistent:/sbin/nologin > dbxml:*:949:949::0:0:dbXML user:/nonexistent:/sbin/nologin > > Which one of these are we planning on actually using here ? > Interesting... glewis added the second one. Greg, what did the pointyhat say? http://www.freebsd.org/cgi/cvsweb.cgi/ports/UIDs.diff?r1=3D1.156;r2=3D1.155= ;f=3Dh Chris From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 20:02:18 2011 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 98AE91065670 for ; Tue, 28 Jun 2011 20:02:18 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 748798FC14 for ; Tue, 28 Jun 2011 20:02:18 +0000 (UTC) Received: by mail-pw0-f54.google.com with SMTP id 7so539706pwi.13 for ; Tue, 28 Jun 2011 13:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=95rqL8lnsMH4e6IPGIKQSqPyfHKysvo9TiVh1rQe41g=; b=fycXMAGEsUw6BWLLjC2B/BvjemGRI+m1WtLvBU49OzTzX6Z3OJ/KGWssl1UaNxAJnd d4E/eJ2B1/CV14h9fpXg10tpWSnA6DbVisfeNtATl9oC5PvXwPiS6VRicD2IbknrkN0o V4CmBTRVB5wwGyger+Ww8jDkzYdXRdIiibz6Y= MIME-Version: 1.0 Received: by 10.68.12.71 with SMTP id w7mr1400465pbb.373.1309289839091; Tue, 28 Jun 2011 12:37:19 -0700 (PDT) Received: by 10.68.46.200 with HTTP; Tue, 28 Jun 2011 12:37:19 -0700 (PDT) In-Reply-To: <4E0A201D.9000601@rawbw.com> References: <4E0A201D.9000601@rawbw.com> Date: Tue, 28 Jun 2011 12:37:19 -0700 Message-ID: From: Josh Carroll To: Yuri Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: How can process in STOP state consume 200% CPU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2011 20:02:18 -0000 On Tue, Jun 28, 2011 at 11:40 AM, Yuri wrote: > I got VirtualBox process in a strange state. It has the status STOP but > shows by top as consuming 200% CPU for a very long time. > How is this possible and what does this mean? Process time stays at 0:00 > TIME. kill -9 doesn't kill it. > > =A0PID USERNAME =A0 =A0 =A0THR PRI NICE =A0 SIZE =A0 =A0RES STATE =A0 C = =A0 TIME =A0 =A0CPU > COMMAND > =A09390 yuri =A0 =A0 =A0 =A0 =A0 =A03 =A044 =A0 =A00 =A0 508M =A0 246M ST= OP =A0 =A03 =A0 0:00 200.00% > VirtualBox Can you send the output of these various procstat commands: procstat -kk 9390 procstat -f 9390 procstat -t 9390 procstat -i 9390 | grep -vE -- '---$' procstat -j 9390 | grep -vE -- '--$' As well as ps output for the process: ps auwwx | grep -w 9390 Also ktrace'ing the process and sending a kdump (or part of it) could be us= eful. Thanks, Josh From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 20:12:27 2011 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 7BFDE106567D for ; Tue, 28 Jun 2011 20:12:27 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 39DDE8FC15 for ; Tue, 28 Jun 2011 20:12:27 +0000 (UTC) Received: by iyb11 with SMTP id 11so655154iyb.13 for ; Tue, 28 Jun 2011 13:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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 :content-transfer-encoding; bh=YwL3wyIz4vQNI1P38DMuf8GKMvyBwjRjjUgw7QFvphg=; b=lSiAvTt6WdHJGnMVi8kWADwGZgtzBeIOM8cnhXyIdxCi4mrRw+fcHaWzcujfwR9hGk IlTuSPPjmyAVjsWDNOOZUUgNqJOG3X4O4kfhy4R6ccdMkqVQW+GMM54ZXTOMG5xT0kPs eGYE6lSwtXhVXzWHhaKKaL0+sh3G4PC7AF2t0= Received: by 10.231.114.86 with SMTP id d22mr1031267ibq.45.1309291945149; Tue, 28 Jun 2011 13:12:25 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.231.49.193 with HTTP; Tue, 28 Jun 2011 13:11:54 -0700 (PDT) In-Reply-To: References: <20110628165911.GC44024@dan.emsphone.com> From: Chris Rees Date: Tue, 28 Jun 2011 21:11:54 +0100 X-Google-Sender-Auth: Gthd97SRL8s8AXsF_TvJB95Sa5E Message-ID: To: jhell , Greg Lewis Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org, Dan Nelson Subject: Re: Default value for UIDs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jun 2011 20:12:27 -0000 On 28 June 2011 20:57, Chris Rees wrote: > On 28 June 2011 20:50, jhell wrote: >> On Tue, Jun 28, 2011 at 06:30:23PM +0100, Chris Rees wrote: >>> On 28 June 2011 17:59, Dan Nelson wrote: >>> > In the last episode (Jun 28), Chris Rees said: >>> >> Hi all, >>> >> >>> >> [crees@zeus]~% tail -n 2 /usr/ports/UIDs >>> >> dbxml:*:949:949::0:0:dbXML user:/nonexistent:/sbin/nologin >>> >> nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/n= ologin >>> >> [crees@zeus]~% grep crees /etc/passwd >>> >> crees:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh >>> >> chris:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh >>> >> [crees@zeus]~% >>> >> >>> >> I'm a little concerned at how close the ports UIDs are getting to th= e >>> >> username space... >>> > >>> > There are only 216 entries in UIDs, though, so if people are just usi= ng >>> > "last entry + 1" when adding new ones, they should probably start fil= ling >>> > the gaps instead. =A0The 100s and 200s are pretty dense, but 350-399 = only has >>> > 5 entries, 400-499 has 4, 600-699 has 7, 700-799 has 3, etc. >>> > >>> >>> Thank you for pointing that out (d'oh). >>> >>> However, perhaps we could still address the *potential* problems. To >>> use one example, Debian has (as long as I can remember) used 10001 for >>> the first username. When we have 65535 - 99 UIDs to play with, >>> expansion like this isn't a problem. >>> >>> Could it be worth it? Think of ten years down the line. >>> >> >> Best part would be to find every port that doesnt need a statically >> allocated UID/GID and just dynamically allocate them after a certain >> range '30000-50000' or whatever for ~20,000 ports and divide that >> namespace up by category. >> >> >> dbxml really does it really need to be static ? it just needs to run. >> >> Also: (stable/8) /usr/ports/UIDs >> dbxml:*:945:945::0:0:& user:/nonexistent:/sbin/nologin >> dbxml:*:949:949::0:0:dbXML user:/nonexistent:/sbin/nologin >> >> Which one of these are we planning on actually using here ? >> > > Interesting... glewis added the second one. > > Greg, what did the pointyhat say? > > http://www.freebsd.org/cgi/cvsweb.cgi/ports/UIDs.diff?r1=3D1.156;r2=3D1.1= 55;f=3Dh > Mystery solved. http://www.freebsd.org/cgi/cvsweb.cgi/ports/UIDs Chris From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 20:21:09 2011 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 5BB4F106564A for ; Tue, 28 Jun 2011 20:21:09 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 129768FC08 for ; Tue, 28 Jun 2011 20:21:08 +0000 (UTC) Received: by iwr19 with SMTP id 19so668165iwr.13 for ; Tue, 28 Jun 2011 13:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to; bh=Bs1QjnRa0xghFLHY9mqzlVU7OgjMoXYzwnymlL1Elvo=; b=CIDtQp28keaqS05iZ9UaNKlGeTQQUXZTgxnBaksSl4O6EnDZiKU1cfD5jFf1znCsZh uvmZ8/T8Y4Pgoy1/aEFvskuSAApATUy/I52xbU6OevOU+MUackt3mpeb08j9yOWYLaui ec74AELMD//q9WBGezB0+VsMS7IqtkptLg9WY= Received: by 10.42.138.199 with SMTP id d7mr9479400icu.197.1309290627089; Tue, 28 Jun 2011 12:50:27 -0700 (PDT) Received: from DataIX.net (adsl-99-190-86-179.dsl.klmzmi.sbcglobal.net [99.190.86.179]) by mx.google.com with ESMTPS id hp8sm375659icc.23.2011.06.28.12.50.21 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Jun 2011 12:50:22 -0700 (PDT) Sender: "J. Hellenthal" Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id p5SJoJd1002298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 28 Jun 2011 15:50:19 -0400 (EDT) (envelope-from jhell@DataIX.net) Received: (from jhell@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id p5SJoIo2002297; Tue, 28 Jun 2011 15:50:18 -0400 (EDT) (envelope-from jhell@DataIX.net) Date: Tue, 28 Jun 2011 15:50:18 -0400 From: jhell To: Chris Rees Message-ID: <20110628195018.GB65999@DataIX.net> References: <20110628165911.GC44024@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Cc: hackers@freebsd.org, Dan Nelson Subject: Re: Default value for UIDs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jun 2011 20:21:09 -0000 On Tue, Jun 28, 2011 at 06:30:23PM +0100, Chris Rees wrote: > On 28 June 2011 17:59, Dan Nelson wrote: > > In the last episode (Jun 28), Chris Rees said: > >> Hi all, > >> > >> [crees@zeus]~% tail -n 2 /usr/ports/UIDs > >> dbxml:*:949:949::0:0:dbXML user:/nonexistent:/sbin/nologin > >> nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin > >> [crees@zeus]~% grep crees /etc/passwd > >> crees:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh > >> chris:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh > >> [crees@zeus]~% > >> > >> I'm a little concerned at how close the ports UIDs are getting to the > >> username space... > > > > There are only 216 entries in UIDs, though, so if people are just using > > "last entry + 1" when adding new ones, they should probably start filling > > the gaps instead.  The 100s and 200s are pretty dense, but 350-399 only has > > 5 entries, 400-499 has 4, 600-699 has 7, 700-799 has 3, etc. > > > > Thank you for pointing that out (d'oh). > > However, perhaps we could still address the *potential* problems. To > use one example, Debian has (as long as I can remember) used 10001 for > the first username. When we have 65535 - 99 UIDs to play with, > expansion like this isn't a problem. > > Could it be worth it? Think of ten years down the line. > Best part would be to find every port that doesnt need a statically allocated UID/GID and just dynamically allocate them after a certain range '30000-50000' or whatever for ~20,000 ports and divide that namespace up by category. dbxml really does it really need to be static ? it just needs to run. Also: (stable/8) /usr/ports/UIDs dbxml:*:945:945::0:0:& user:/nonexistent:/sbin/nologin dbxml:*:949:949::0:0:dbXML user:/nonexistent:/sbin/nologin Which one of these are we planning on actually using here ? git, hg, undernet, vboxusers... for example. From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 20:29:17 2011 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 D090F1065670 for ; Tue, 28 Jun 2011 20:29:17 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8A5098FC08 for ; Tue, 28 Jun 2011 20:29:17 +0000 (UTC) Received: by iyb11 with SMTP id 11so670637iyb.13 for ; Tue, 28 Jun 2011 13:29:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; bh=5yfcix1obNHdHqF5p9hDhNhSmjVFwo1s/meYlrta1Gk=; b=dmeZxfMSbNLgiWNexXp7EqFPuebi3N4fOl18/TVBhps4ooZPdo85xgvbMl2v7DXs+A W8pctcbOY/VieiEQRUkLiIBTXCkHvF+56y9bItnws8/qI+Zm7Iu3ud68SsOJ6B9FsrjY Dj7X9uUJLdNu51le6GEYslgi2zvIX5NuJvxKM= Received: by 10.42.147.133 with SMTP id n5mr9459922icv.203.1309291387689; Tue, 28 Jun 2011 13:03:07 -0700 (PDT) Received: from DataIX.net (adsl-99-190-86-179.dsl.klmzmi.sbcglobal.net [99.190.86.179]) by mx.google.com with ESMTPS id s2sm231662ibe.1.2011.06.28.13.03.05 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Jun 2011 13:03:06 -0700 (PDT) Sender: "J. Hellenthal" Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id p5SK32Vt003430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 28 Jun 2011 16:03:03 -0400 (EDT) (envelope-from jhell@DataIX.net) Received: (from jhell@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id p5SK31GM003429; Tue, 28 Jun 2011 16:03:01 -0400 (EDT) (envelope-from jhell@DataIX.net) Date: Tue, 28 Jun 2011 16:03:01 -0400 From: jhell To: Yuri Message-ID: <20110628200301.GC65999@DataIX.net> References: <4E0A201D.9000601@rawbw.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E0A201D.9000601@rawbw.com> Cc: freebsd-hackers@freebsd.org Subject: Re: How can process in STOP state consume 200% CPU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jun 2011 20:29:17 -0000 On Tue, Jun 28, 2011 at 11:40:29AM -0700, Yuri wrote: > I got VirtualBox process in a strange state. It has the status STOP but > shows by top as consuming 200% CPU for a very long time. > How is this possible and what does this mean? Process time stays at 0:00 > TIME. kill -9 doesn't kill it. > kill -CONT > PID USERNAME THR PRI NICE SIZE RES STATE C TIME CPU > COMMAND > 9390 yuri 3 44 0 508M 246M STOP 3 0:00 200.00% > VirtualBox > <...> > > 8.2-STABLE > I would suppose that because you stopped the clients frontend that the backend has not been notified and is doing its best to draw to the screen causing a high CPU usage. Though you have used -STOP on the process youll still have to -CONT after the -KILL for it to actually exit since the process is effectively stopped its not going to abide by any further signals until it recieves -CONT. Anyway now you know not to use -STOP on that process ;) Is it supposed to do anything with the stop signal ? has it been documented in VB ? From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 20:49:59 2011 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 5AECC106566B for ; Tue, 28 Jun 2011 20:49:59 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.freebsd.org (Postfix) with ESMTP id 159478FC13 for ; Tue, 28 Jun 2011 20:49:58 +0000 (UTC) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.14.4/8.14.4) with ESMTP id p5SKVSZZ039062; Tue, 28 Jun 2011 13:31:28 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.14.4/8.14.4/Submit) id p5SKVRHL039061; Tue, 28 Jun 2011 13:31:27 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Tue, 28 Jun 2011 13:31:27 -0700 From: Greg Lewis To: Chris Rees Message-ID: <20110628203127.GA39023@misty.eyesbeyond.com> References: <20110628165911.GC44024@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: hackers@freebsd.org, Dan Nelson Subject: Re: Default value for UIDs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jun 2011 20:49:59 -0000 On Tue, Jun 28, 2011 at 09:11:54PM +0100, Chris Rees wrote: > On 28 June 2011 20:57, Chris Rees wrote: > > On 28 June 2011 20:50, jhell wrote: > >> On Tue, Jun 28, 2011 at 06:30:23PM +0100, Chris Rees wrote: > >>> On 28 June 2011 17:59, Dan Nelson wrote: > >>> > In the last episode (Jun 28), Chris Rees said: > >>> >> Hi all, > >>> >> > >>> >> [crees@zeus]~% tail -n 2 /usr/ports/UIDs > >>> >> dbxml:*:949:949::0:0:dbXML user:/nonexistent:/sbin/nologin > >>> >> nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin > >>> >> [crees@zeus]~% grep crees /etc/passwd > >>> >> crees:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh > >>> >> chris:*:1001:1001:Chris Rees:/home/crees:/bin/tcsh > >>> >> [crees@zeus]~% > >>> >> > >>> >> I'm a little concerned at how close the ports UIDs are getting to the > >>> >> username space... > >>> > > >>> > There are only 216 entries in UIDs, though, so if people are just using > >>> > "last entry + 1" when adding new ones, they should probably start filling > >>> > the gaps instead. ?The 100s and 200s are pretty dense, but 350-399 only has > >>> > 5 entries, 400-499 has 4, 600-699 has 7, 700-799 has 3, etc. > >>> > > >>> > >>> Thank you for pointing that out (d'oh). > >>> > >>> However, perhaps we could still address the *potential* problems. To > >>> use one example, Debian has (as long as I can remember) used 10001 for > >>> the first username. When we have 65535 - 99 UIDs to play with, > >>> expansion like this isn't a problem. > >>> > >>> Could it be worth it? Think of ten years down the line. > >>> > >> > >> Best part would be to find every port that doesnt need a statically > >> allocated UID/GID and just dynamically allocate them after a certain > >> range '30000-50000' or whatever for ~20,000 ports and divide that > >> namespace up by category. > >> > >> > >> dbxml really does it really need to be static ? it just needs to run. > >> > >> Also: (stable/8) /usr/ports/UIDs > >> dbxml:*:945:945::0:0:& user:/nonexistent:/sbin/nologin > >> dbxml:*:949:949::0:0:dbXML user:/nonexistent:/sbin/nologin > >> > >> Which one of these are we planning on actually using here ? > >> > > > > Interesting... glewis added the second one. > > > > Greg, what did the pointyhat say? > > > > http://www.freebsd.org/cgi/cvsweb.cgi/ports/UIDs.diff?r1=1.156;r2=1.155;f=h > > > > > Mystery solved. > > http://www.freebsd.org/cgi/cvsweb.cgi/ports/UIDs Yep, I forgot to commit my UIDs, GIDs changes with the update to dbXML, got the pointyhat email and then merged and committed without paying enough attention. Sorry about that. Thanks for removing the extra definition! -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 21:08:21 2011 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 025AE1065672; Tue, 28 Jun 2011 21:08:21 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9E2A18FC18; Tue, 28 Jun 2011 21:08:20 +0000 (UTC) Received: by iyb11 with SMTP id 11so706497iyb.13 for ; Tue, 28 Jun 2011 14:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=lDfHhM7pbXYvEWa/1ol/D3kajMlk0Z+VKR57HStj3wE=; b=MiqdKP65KwiWp3QuwJyV47N1/qyewNKVikEyh+wEfIynN9ebDvlsovV5i1rsPvm9hZ WLqNcc+nL1mrW/txO29q6xoWy2FTlEncmhwJkYQQNhAgYOCcLqY+XPbQrUgTK5oSTUgf tzQN/HaHrTZCR0ggK7r+sQsggrOWQ4KD4cEKE= MIME-Version: 1.0 Received: by 10.231.44.65 with SMTP id z1mr17954ibe.95.1309295299885; Tue, 28 Jun 2011 14:08:19 -0700 (PDT) Sender: utisoft@gmail.com Received: by 10.231.49.193 with HTTP; Tue, 28 Jun 2011 14:08:19 -0700 (PDT) Received: by 10.231.49.193 with HTTP; Tue, 28 Jun 2011 14:08:19 -0700 (PDT) In-Reply-To: References: <20110628165911.GC44024@dan.emsphone.com> Date: Tue, 28 Jun 2011 22:08:19 +0100 X-Google-Sender-Auth: U3HpL0hNSQS22mSMgtnA2EIaK4o Message-ID: From: Chris Rees To: Greg Lewis Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Chris Rees , hackers@freebsd.org, Dan Nelson Subject: Re: Default value for UIDs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jun 2011 21:08:21 -0000 On 28 Jun 2011 21:33, "Greg Lewis" wrote: > > On Tue, Jun 28, 2011 at 09:11:54PM +0100, Chris Rees wrote: > > On 28 June 2011 20:57, Chris Rees wrote: > > > On 28 June 2011 20:50, jhell wrote: > > >> Also: (stable/8) /usr/ports/UIDs > > >> dbxml:*:945:945::0:0:& user:/nonexistent:/sbin/nologin > > >> dbxml:*:949:949::0:0:dbXML user:/nonexistent:/sbin/nologin > > >> > > >> Which one of these are we planning on actually using here ? > > >> > > > > > > Interesting... glewis added the second one. > > > > > > Greg, what did the pointyhat say? > > > > > > http://www.freebsd.org/cgi/cvsweb.cgi/ports/UIDs.diff?r1=1.156;r2=1.155;f=h > > > > > > > > > Mystery solved. > > > > http://www.freebsd.org/cgi/cvsweb.cgi/ports/UIDs > > Yep, I forgot to commit my UIDs, GIDs changes with the update to dbXML, > got the pointyhat email and then merged and committed without paying enough > attention. Sorry about that. Thanks for removing the extra definition! > Hehe, an EHUMANRACE condition. Chris From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 28 21:50:17 2011 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 04C9F106566B for ; Tue, 28 Jun 2011 21:50:17 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id B1CFB8FC08 for ; Tue, 28 Jun 2011 21:50:16 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id p5SLoEh6043544 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 28 Jun 2011 14:50:15 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id p5SLoEnV043543; Tue, 28 Jun 2011 14:50:14 -0700 (PDT) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA20057; Tue, 28 Jun 11 14:47:36 PDT Date: Tue, 28 Jun 2011 14:54:49 -0700 From: perryh@pluto.rain.com To: yuri@rawbw.com Message-Id: <4e0a4da9.2zgU/lbkfArgyq8o%perryh@pluto.rain.com> References: <4E0A201D.9000601@rawbw.com> In-Reply-To: <4E0A201D.9000601@rawbw.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: How can process in STOP state consume 200% CPU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jun 2011 21:50:17 -0000 Yuri wrote: > kill -9 doesn't kill it. I think I've seen this before; it looks as if, since the process is STOPped, the "kill -9" remains pending rather than being acted upon. I _think_ you can make the process go away by doing a "kill -CONT" after the "kill -9". No idea how a STOPped process can continue to consume CPU, unless in an infinite loop at elevated interupt level (and in that case the "kill -CONT" may not work -- you may need to drop into kdb, try to do some debugging and/or get a dump, and then reboot). From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 29 01:48:51 2011 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 018C9106566B for ; Wed, 29 Jun 2011 01:48:51 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id E0CF38FC12 for ; Wed, 29 Jun 2011 01:48:50 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id p5T1gEMj089805; Tue, 28 Jun 2011 18:42:14 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <3C3128F5.7030303@rawbw.com> From: Yuri User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.16) Gecko/20101211 Thunderbird/3.0.11 MIME-Version: 1.0 To: Sergey Babkin References: <194213048.2218776.1309307083380.JavaMail.root@vznit170078> In-Reply-To: <194213048.2218776.1309307083380.JavaMail.root@vznit170078> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: jhell@DataIX.net, freebsd-hackers@freebsd.org Subject: Re: How can process in STOP state consume 200% CPU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Wed, 29 Jun 2011 01:48:51 -0000 X-Original-Date: Mon, 31 Dec 2001 19:11:49 -0800 X-List-Received-Date: Wed, 29 Jun 2011 01:48:51 -0000 On 06/28/2011 17:24, Sergey Babkin wrote: > > (Sorry about quoting, it doesn't always work well from the web client). > Most probably the process is running in an endless loop in the kernel > mode. > Where it got after entering the STOP state. Remember, the signals are > processed > only after the process exits from the kernel mode to the user mode, > and so are the > scheduling states. While it's in the kernel mode, you can't do anything > to it other than use the kernel debugger. How is this normally possible to make program to loop in kernel mode on -STABLE kernel? Doesn't this mean bug in kernel? Yuri From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 29 01:24:54 2011 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 BE930106564A for ; Wed, 29 Jun 2011 01:24:54 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms173009pub.verizon.net (vms173009pub.verizon.net [206.46.173.9]) by mx1.freebsd.org (Postfix) with ESMTP id A0B338FC08 for ; Wed, 29 Jun 2011 01:24:54 +0000 (UTC) Received: from vznit170078 ([unknown] [172.18.12.134]) by vms173009.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LNI00G2BZT7XR31@vms173009.mailsrvcs.net> for freebsd-hackers@freebsd.org; Tue, 28 Jun 2011 19:24:43 -0500 (CDT) Received: from 173.54.27.21 ([173.54.27.21]) by vznit170078 (Verizon Webmail) with HTTP; Tue, 28 Jun 2011 19:24:43 -0500 (CDT) Date: Tue, 28 Jun 2011 19:24:43 -0500 (CDT) From: Sergey Babkin To: jhell@DataIX.net Message-id: <194213048.2218776.1309307083380.JavaMail.root@vznit170078> Content-transfer-encoding: quoted-printable X-Originating-IP: [173.54.27.21] X-Mailman-Approved-At: Wed, 29 Jun 2011 03:55:05 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: yuri@rawbw.com, freebsd-hackers@freebsd.org Subject: Re: Re: How can process in STOP state consume 200% CPU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Jun 2011 01:24:54 -0000 Jun 28, 2011 04:29:35 PM, jhell@DataIX.net wrote: >> I got Vir= tualBox process in a strange state. It has the status STOP but >>= shows by top as consuming 200% CPU for a very long time. >> How i= s this possible and what does this mean? Process time stays at 0:00 >= ;> TIME. kill -9 doesn't kill it. > > >I would suppose= that because you stopped the clients frontend that the >backend has = not been notified and is doing its best to draw to the >screen causin= g a high CPU usage. (Sorry about quoting, it doesn't always work wel= l from the web client). Most probably the process is running in an endle= ss loop in the kernel mode. Where it got after entering the STOP state. = Remember, the signals are processed only after the process exits from th= e kernel mode to the user mode, and so are the scheduling states. While = it's in the kernel mode, you can't do anything to it other than use the = kernel debugger. -SB From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 29 05:26:16 2011 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 C6D4D106566B for ; Wed, 29 Jun 2011 05:26:16 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id 989D68FC08 for ; Wed, 29 Jun 2011 05:26:16 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id p5T5Q6gl009567 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 28 Jun 2011 22:26:07 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id p5T5Q6b1009566; Tue, 28 Jun 2011 22:26:06 -0700 (PDT) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA21126; Tue, 28 Jun 11 22:02:29 PDT Date: Tue, 28 Jun 2011 22:09:40 -0700 From: perryh@pluto.rain.com To: yuri@rawbw.com Message-Id: <4e0ab394.THjNIl1+j9sXmZ4f%perryh@pluto.rain.com> References: <194213048.2218776.1309307083380.JavaMail.root@vznit170078> <3C3128F5.7030303@rawbw.com> In-Reply-To: <3C3128F5.7030303@rawbw.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, babkin@verizon.net, jhell@DataIX.net Subject: Re: How can process in STOP state consume 200% CPU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Jun 2011 05:26:16 -0000 Yuri wrote: > On 06/28/2011 17:24, Sergey Babkin wrote: > > Most probably the process is running in an endless loop in the > > kernel mode ... While it's in the kernel mode, you can't do > > anything to it other than use the kernel debugger. > > How is this normally possible to make program to loop in kernel > mode on -STABLE kernel? Doesn't this mean bug in kernel? In kernel code, but not necessarily in the -STABLE kernel itself -- there could be a problem in a kernel module. I haven't checked, but would not be surprised if VirtualBox included one. From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 29 06:39:47 2011 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 8ECDB106566C for ; Wed, 29 Jun 2011 06:39:47 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 56EBF8FC08 for ; Wed, 29 Jun 2011 06:39:47 +0000 (UTC) Received: from sbhfislrext01.fnfis.com ([192.168.249.167]) by SCSFISLTC01 (8.14.3/8.14.3) with ESMTP id p5T6dkMj004189 for ; Wed, 29 Jun 2011 01:39:46 -0500 Received: from sbhfisltcgw01.FNFIS.COM (Not Verified[10.132.248.121]) by sbhfislrext01.fnfis.com with MailMarshal (v6, 5, 4, 7535) id ; Wed, 29 Jun 2011 01:39:43 -0500 Received: from sbhfisltcgw02.FNFIS.COM ([10.132.248.122]) by sbhfisltcgw01.FNFIS.COM with Microsoft SMTPSVC(6.0.3790.4675); Wed, 29 Jun 2011 01:39:46 -0500 Received: from [10.0.0.104] ([10.132.254.136]) by sbhfisltcgw02.FNFIS.COM over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 29 Jun 2011 01:39:45 -0500 From: Devin Teske Date: Tue, 28 Jun 2011 23:39:39 -0700 Message-Id: <649FDF09-010A-4184-9B03-E8449A584DE1@vicor.com> To: FreeBSD Hackers Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-OriginalArrivalTime: 29 Jun 2011 06:39:45.0733 (UTC) FILETIME=[55C26750:01CC3627] Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Devin Teske Subject: [RELEASE] lastdown(8) -- A utility to show you whom was logged on when a system went down X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Jun 2011 06:39:47 -0000 I've written a new script. It's called "lastdown". What it does is pretty simple, but yet oh-so valuable to us for administeri= ng large clusters. 1. Use sysctl(8) to get the ``kern.boottime'' MIB 2. Parse the `sec' value from the above 3. Make optional adjustments 4. Pass value to date(1) to format it in CCYYddmmHHMM.SS format 5. Pass formatted date string to last(8)'s `-d' argument to... wait for it.= .. List the users that were on that system during that time. At first, I just wrote this to see if last(8)'s manual was accurate. That i= s, I wanted to see what exactly it would have to say if I gave it a value. = Well, after playing with it -- and then not -- I realized one of the more p= ractical applications of it might be to list the state of the UTMP(5) log f= rom just-before the system booted. Running this on a cluster is fun. You get to see all the people that (pardo= n my [non-]French, but) got screwed when last the system took a long walk i= n the desert (looking for it's horse no doubt *chuckles*). I just wanted to clean this up, release it under the BSD License for all, a= nd then sleep on how to implement the next iteration (you'll notice it's in= ternal version in the header states it's at 2.0 -- there was an uglier pred= ecessor). If you head on over to http://druidbsd.sourceforge.net/ you'll see examples= where the UTMP(5) log (that's the wtmp file) begins on a date that is afte= r the boottime and you'll have to specific "-f /var/log/wtmp.1" for example= to query a log that knows about the state of the machine at boot time. I'm= going to dream up ways to automatically when I should go back. The code can be had at: http://druidbsd.sourceforge.net/download/lastdown.txt or http://druidbsd.sourceforge.net/ --=20 Cheers, Devin Teske -> LEGAL DISCLAIMER <- This message contains confidential and proprietary information of the sender, and is intended only for the person(s) to whom it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you have received this message in error, please notify the e-mail sender immediately, and delete the original message without making a copy. -> FUN STUFF <- -----BEGIN GEEK CODE BLOCK----- Version 3.12 GAT/CS/B/CC/E/IT/MC/M/MU/P/S/TW d+(++) s: a- C+++@$ UB++++$ P++++@$ L++++$ = E- W+++ N? o? K? w@ O M++$ V- PS+>++ PE@ Y+ PGP-> t(+) 5? X(+) R(-) tv+ b+>++ = DI+ D+(++) G++ e>++++ h r+++ z+++ ------END GEEK CODE BLOCK------ http://www.geekcode.com/ -> END TRANSMISSION <- _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you. _____________ From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 29 11:06:41 2011 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 EBE1D106566C; Wed, 29 Jun 2011 11:06:41 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from services.syscare.sk (services.syscare.sk [188.40.39.36]) by mx1.freebsd.org (Postfix) with ESMTP id A45978FC1B; Wed, 29 Jun 2011 11:06:41 +0000 (UTC) Received: from services.syscare.sk (services [188.40.39.36]) by services.syscare.sk (Postfix) with ESMTP id AA7852B481; Wed, 29 Jun 2011 12:46:52 +0200 (CEST) X-Virus-Scanned: amavisd-new at rulez.sk Received: from services.syscare.sk ([188.40.39.36]) by services.syscare.sk (services.rulez.sk [188.40.39.36]) (amavisd-new, port 10024) with ESMTP id eDjI16OhwXid; Wed, 29 Jun 2011 12:46:50 +0200 (CEST) Received: from danger-mbp.local (bband-dyn13.95-103-249.t-com.sk [95.103.249.13]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: danger@rulez.sk) by services.syscare.sk (Postfix) with ESMTPSA id 5A8EB2B473; Wed, 29 Jun 2011 12:46:50 +0200 (CEST) Message-ID: <4E0B0299.2020205@FreeBSD.org> Date: Wed, 29 Jun 2011 12:46:49 +0200 From: Daniel Gerzo Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.19pre) Gecko/20110620 Lanikai/3.1.11pre MIME-Version: 1.0 To: current@freebsd.org, hackers@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: HEADSUP: Call for FreeBSD Status Reports - 2Q/2011 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Jun 2011 11:06:42 -0000 Dear all, I would like to remind you that the next round of status reports covering the second quarter of 2011 is due on July 15th, 2011. As this initiative is very popular among our users, I would like to ask you to submit your status reports soon, so that we can compile the report on time. Do not hesitate and write us a few lines; a short description about what you are working on, what your plans and goals are, or any other information that you consider interested is always welcome. This way we can inform our community about your great work! Check out the reports from the past to get some inspiration of what your submission should look like. If you know about a project that should be included in the status report, please let us know as well, so we can poke the responsible people to provide us with something useful. Updates to submissions from the last report are welcome too. Note that the submissions are accepted from anyone involved within the FreeBSD community, you do not have to be a FreeBSD committer. Anything related to FreeBSD can be covered. Please email us the filled-in XML template which can be found at http://www.freebsd.org/news/status/report-sample.xml to monthly@FreeBSD.org, or alternatively use our web based form located at http://www.freebsd.org/cgi/monthly.cgi. For more information, please visit http://www.freebsd.org/news/status/. We are looking forward to see your submissions! -- Kind regards Daniel Gerzo From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 29 14:39:27 2011 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 921A8106566C for ; Wed, 29 Jun 2011 14:39:27 +0000 (UTC) (envelope-from kheuer2@gwdg.de) Received: from mailer-b4.gwdg.de (mailer-b4.gwdg.de [134.76.10.28]) by mx1.freebsd.org (Postfix) with ESMTP id 298788FC1C for ; Wed, 29 Jun 2011 14:39:26 +0000 (UTC) Received: from gwdu60.gwdg.de ([134.76.8.60]) by mailer.gwdg.de with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QbvTI-0005YS-3D; Wed, 29 Jun 2011 16:10:28 +0200 Date: Wed, 29 Jun 2011 16:10:27 +0200 (CEST) From: Konrad Heuer To: Devin Teske In-Reply-To: <649FDF09-010A-4184-9B03-E8449A584DE1@vicor.com> Message-ID: References: <649FDF09-010A-4184-9B03-E8449A584DE1@vicor.com> 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-Level: - X-Virus-Scanned: (clean) by exiscan+sophie Cc: FreeBSD Hackers , Devin Teske Subject: Re: [RELEASE] lastdown(8) -- A utility to show you whom was logged on when a system went down X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Jun 2011 14:39:27 -0000 Nice utility! Best regards Konrad Heuer GWDG, Am Fassberg, 37077 Goettingen, Germany, kheuer2@gwdg.de On Tue, 28 Jun 2011, Devin Teske wrote: > I've written a new script. It's called "lastdown". > > What it does is pretty simple, but yet oh-so valuable to us for administering large clusters. > > 1. Use sysctl(8) to get the ``kern.boottime'' MIB > 2. Parse the `sec' value from the above > 3. Make optional adjustments > 4. Pass value to date(1) to format it in CCYYddmmHHMM.SS format > 5. Pass formatted date string to last(8)'s `-d' argument to... wait for it... > > List the users that were on that system during that time. > > At first, I just wrote this to see if last(8)'s manual was accurate. That is, I wanted to see what exactly it would have to say if I gave it a value. Well, after playing with it -- and then not -- I realized one of the more practical applications of it might be to list the state of the UTMP(5) log from just-before the system booted. > > Running this on a cluster is fun. You get to see all the people that (pardon my [non-]French, but) got screwed when last the system took a long walk in the desert (looking for it's horse no doubt *chuckles*). > > I just wanted to clean this up, release it under the BSD License for all, and then sleep on how to implement the next iteration (you'll notice it's internal version in the header states it's at 2.0 -- there was an uglier predecessor). > > If you head on over to http://druidbsd.sourceforge.net/ you'll see examples where the UTMP(5) log (that's the wtmp file) begins on a date that is after the boottime and you'll have to specific "-f /var/log/wtmp.1" for example to query a log that knows about the state of the machine at boot time. I'm going to dream up ways to automatically when I should go back. > > The code can be had at: > > http://druidbsd.sourceforge.net/download/lastdown.txt > > or > > http://druidbsd.sourceforge.net/ > -- > Cheers, > Devin Teske > > > -> LEGAL DISCLAIMER <- > This message contains confidential and proprietary information > of the sender, and is intended only for the person(s) to whom it > is addressed. Any use, distribution, copying or disclosure by any > other person is strictly prohibited. If you have received this > message in error, please notify the e-mail sender immediately, > and delete the original message without making a copy. > > -> FUN STUFF <- > -----BEGIN GEEK CODE BLOCK----- > Version 3.12 > GAT/CS/B/CC/E/IT/MC/M/MU/P/S/TW d+(++) s: a- C+++@$ UB++++$ P++++@$ L++++$ E- > W+++ N? o? K? w@ O M++$ V- PS+>++ PE@ Y+ PGP-> t(+) 5? X(+) R(-) tv+ b+>++ DI+ > D+(++) G++ e>++++ h r+++ z+++ > ------END GEEK CODE BLOCK------ > http://www.geekcode.com/ > > -> END TRANSMISSION <- > > _____________ > > The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. > _____________ > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 30 19:44:48 2011 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 3122D106564A; Thu, 30 Jun 2011 19:44:48 +0000 (UTC) (envelope-from eng.mufic@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 069C28FC15; Thu, 30 Jun 2011 19:44:47 +0000 (UTC) Received: by pzk27 with SMTP id 27so2821142pzk.13 for ; Thu, 30 Jun 2011 12:44:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=G5rF1BNBz9Cb9v/b6ahpjSx3N3GqJ/5SPXsET6X14o8=; b=o0sOBT2cs3JEGG34Vj4R0aGHzzu9lrRvhNnRQVfWKoR3n6rBiN2Uza2IJmkqbdMimC ZdTzUSnunDg14bi+QDrqbsVY+JDUk4w7afaSpPR8LSLKsNIFvv5Rh8bhg9MyBCBZph9v ChF+hg81CvwsdOeTAUl6vmufdyeBjXFG1F90g= MIME-Version: 1.0 Received: by 10.68.42.135 with SMTP id o7mr528504pbl.190.1309463087450; Thu, 30 Jun 2011 12:44:47 -0700 (PDT) Sender: eng.mufic@gmail.com Received: by 10.68.41.36 with HTTP; Thu, 30 Jun 2011 12:44:47 -0700 (PDT) Date: Thu, 30 Jun 2011 22:44:47 +0300 X-Google-Sender-Auth: GWAGcwpNEuVzklMRPCyI301pmbs Message-ID: From: Mohammed Farrag To: freebsd-hackers@freebsd.org, freebsd-current Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: FreeBSD is a summer course in Ain Shams University X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Jun 2011 19:44:48 -0000 Hello FreeBSDers, After the starting of FreeBSD handbook translation, ArabBSD could attract Ain Shams University which is one of the most important universities in Egypt and Arab World to offer Free Summer Course for FreeBSD Administration and FreeBSD development. The course will start by the July 10th. Tutorials about the Course will be uploaded. This course will be instructed by Mohammed Farrag, ArabBSD CEO and FreeBSD Contributor Regards, -- Mohammed * * From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 1 14:29:43 2011 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 EE671106566C; Fri, 1 Jul 2011 14:29:43 +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 7E3408FC15; Fri, 1 Jul 2011 14:29:43 +0000 (UTC) Received: from park.js.berklix.net (pD9FBF4D1.dip.t-dialin.net [217.251.244.209]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id p61DvKsi086245; Fri, 1 Jul 2011 13:57:20 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 p61DvEls040095; Fri, 1 Jul 2011 15:57:14 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.4/8.14.4) with ESMTP id p61Dv9k7030819; Fri, 1 Jul 2011 13:57:14 GMT (envelope-from jhs@fire.js.berklix.net) Message-Id: <201107011357.p61Dv9k7030819@fire.js.berklix.net> To: Mohammed Farrag 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 "Thu, 30 Jun 2011 22:44:47 +0300." Date: Fri, 01 Jul 2011 15:57:09 +0200 Sender: jhs@berklix.com Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD is a summer course in Ain Shams University X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Jul 2011 14:29:44 -0000 Hi, Mohammed Farrag wrote: > Hello FreeBSDers, > > After the starting of FreeBSD handbook translation, ArabBSD could attract > Ain Shams University which is one of the most important universities in > Egypt and Arab World to offer Free Summer Course for FreeBSD Administration > and FreeBSD development. The course will start by the July 10th. Tutorials > about the Course will be uploaded. This course will be instructed by > Mohammed Farrag, ArabBSD CEO and FreeBSD Contributor You might want to send that to advocacy@ It's perhaps the sort of thing people would copy into web magazines. Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Reply below, not above; Indent with "> "; Cumulative like a play script. Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable. From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 1 15:55:38 2011 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 180D0106566C for ; Fri, 1 Jul 2011 15:55:38 +0000 (UTC) (envelope-from eng.mufic@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id E382C8FC1D for ; Fri, 1 Jul 2011 15:55:37 +0000 (UTC) Received: by pvg11 with SMTP id 11so3836344pvg.13 for ; Fri, 01 Jul 2011 08:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=dIHrHEvGfvZbcrQYgHyY4q3OtpKP/zeuH70qE1z+x2Y=; b=dzYBLgyMJJWCwHNfbXGVy7826YnYh98wMNQ6r3cMvNu/vVcoQiOnra1ChDeEnxkvm1 S5R6SVLCRq2/AmI+8w4edthS8xPz+GMAvxDkUpDxZ8XjlOus2qbdfeR7S2es2IT7Ab2E oJBktWvPIyG4H6zNdhKmDsheae5emjTxhoWJM= MIME-Version: 1.0 Received: by 10.68.44.228 with SMTP id h4mr3681489pbm.391.1309535737218; Fri, 01 Jul 2011 08:55:37 -0700 (PDT) Sender: eng.mufic@gmail.com Received: by 10.68.41.36 with HTTP; Fri, 1 Jul 2011 08:55:37 -0700 (PDT) In-Reply-To: <201107011357.p61Dv9k7030819@fire.js.berklix.net> References: <201107011357.p61Dv9k7030819@fire.js.berklix.net> Date: Fri, 1 Jul 2011 18:55:37 +0300 X-Google-Sender-Auth: 7l6nSeFQlzR_fPLtKWsH5ryp0p0 Message-ID: From: Mohammed Farrag To: "Julian H. Stacey" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD is a summer course in Ain Shams University X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Jul 2011 15:55:38 -0000 On Fri, Jul 1, 2011 at 4:57 PM, Julian H. Stacey wrote: > Hi, > Mohammed Farrag wrote: > > Hello FreeBSDers, > > > > After the starting of FreeBSD handbook translation, ArabBSD could > attract > > Ain Shams University which is one of the most important universities in > > Egypt and Arab World to offer Free Summer Course for FreeBSD > Administration > > and FreeBSD development. The course will start by the July 10th. > Tutorials > > about the Course will be uploaded. This course will be instructed by > > Mohammed Farrag, ArabBSD CEO and FreeBSD Contributor > > You might want to send that to advocacy@ > It's perhaps the sort of thing people would copy into web magazines. > > Cheers, > Julian > Done! > -- > Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich > http://berklix.com > Reply below, not above; Indent with "> "; Cumulative like a play script. > Format: Plain text. Not HTML, multipart/alternative, base64, > quoted-printable. > -- *Mohammed Farrag* *FreeBSD Contributor* From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 2 14:19:22 2011 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 BF6631065670 for ; Sat, 2 Jul 2011 14:19:22 +0000 (UTC) (envelope-from moeller.akt@googlemail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4EAE88FC0A for ; Sat, 2 Jul 2011 14:19:22 +0000 (UTC) Received: by bwa20 with SMTP id 20so4784655bwa.13 for ; Sat, 02 Jul 2011 07:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=user-agent:date:subject:from:to:message-id:thread-topic :thread-index:mime-version:content-type; bh=47NuKULXjSumGzKDF+9Uje9P3dZkP6dnVGuLDf3ucRw=; b=vy1zhcIHL9BmNV6jh0T2gNEk20QuU3oowrpAb3hfvTQy8rGJ/KBmQHy4UnvYVSllxQ dNwgSZbyNcxPDXwW4mtSXpacni3K0UEq9d1Kbafvavnl1AGqzprBQo2EtRhrLJsZA1ok r6Rz97ZyxUeIrdwLCEFJVb5DSwcs2ctpo4Kio= Received: by 10.204.84.66 with SMTP id i2mr3832550bkl.201.1309615043099; Sat, 02 Jul 2011 06:57:23 -0700 (PDT) Received: from [192.168.0.108] (p5B24DD70.dip.t-dialin.net [91.36.221.112]) by mx.google.com with ESMTPS id t9sm3889408bkn.8.2011.07.02.06.57.20 (version=SSLv3 cipher=OTHER); Sat, 02 Jul 2011 06:57:22 -0700 (PDT) User-Agent: Microsoft-Entourage/12.0.0.071130 Date: Sat, 02 Jul 2011 15:57:19 +0200 From: Martin =?ISO-8859-1?B?TfZsbGVy?= To: "freebsd-hackers@freebsd.org" Message-ID: Thread-Topic: Question about lseek/fseek Thread-Index: Acw4v/UqpMFYAZLNTEulXOpM6pbKgg== 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: Question about lseek/fseek X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jul 2011 14:19:22 -0000 Hi Hackers, why does these function allow seeking beyond the EOF of a file in O_RDONLY/=B2rb=B2 mode ? How does these function then signal the EOF correctly ? Seeking beyond the EOF makes sense for me in write-mode but not in read-onl= y mode ! With Regards, Martin From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 2 14:56:15 2011 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 4A2431065672 for ; Sat, 2 Jul 2011 14:56:15 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1DACE8FC0A for ; Sat, 2 Jul 2011 14:56:14 +0000 (UTC) Received: by pvg11 with SMTP id 11so4746577pvg.13 for ; Sat, 02 Jul 2011 07:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=dN7dds+wTC2xjgGTk4737CRMFTUeH5xAmCX2eQjp6Iw=; b=Iuv5b4y7/5otzAWiHZzH0R2SCNV/WTJgKYGjqx/6u1bTE9+WZkm+gfFWaKjdJSt6CD 0A2VMOd3bvTunfzMIH7+pLHgQXMZ8AHUzEVm65iLQifk4HBuILnTEitxxSL5Uk8N1JRC gi1ECmHDf1YI2HTM+xrstRE5UTu1gzlHN7rNA= MIME-Version: 1.0 Received: by 10.68.25.166 with SMTP id d6mr5015001pbg.136.1309618574468; Sat, 02 Jul 2011 07:56:14 -0700 (PDT) Sender: rmh.aybabtu@gmail.com Received: by 10.68.47.138 with HTTP; Sat, 2 Jul 2011 07:56:14 -0700 (PDT) Date: Sat, 2 Jul 2011 16:56:14 +0200 X-Google-Sender-Auth: GHeXNLUt1YontGz1VzuNW6AEx-U Message-ID: From: Robert Millan To: freebsd-hackers@freebsd.org, Ed Maste Content-Type: multipart/mixed; boundary=bcaec5215861ec25cc04a71755af Cc: Subject: [PATCH] build config(8) on GNU systems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jul 2011 14:56:15 -0000 --bcaec5215861ec25cc04a71755af Content-Type: text/plain; charset=UTF-8 Hi! Please consider this small patch to make config(8) buildable on GNU systems. Thanks -- Robert Millan --bcaec5215861ec25cc04a71755af Content-Type: text/plain; charset=US-ASCII; name="config_gnu.diff" Content-Disposition: attachment; filename="config_gnu.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gpmp2fd70 SW5kZXg6IHVzci5zYmluL2NvbmZpZy9tYWluLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gdXNyLnNiaW4vY29u ZmlnL21haW4uYwkocmV2aXNpb24gMjIzNzIxKQorKysgdXNyLnNiaW4vY29uZmlnL21haW4uYwko d29ya2luZyBjb3B5KQpAQCAtNTkxLDcgKzU5MSwxMSBAQAogCWlmICgoZGlycCA9IG9wZW5kaXIo cCkpID09IE5VTEwpCiAJCWVycihFWF9PU0VSUiwgIm9wZW5kaXIgJXMiLCBwKTsKIAl3aGlsZSAo KGRwID0gcmVhZGRpcihkaXJwKSkgIT0gTlVMTCkgeworI2lmZGVmIF9ESVJFTlRfSEFWRV9EX05B TUxFTgogCQlpID0gZHAtPmRfbmFtbGVuIC0gMjsKKyNlbHNlCisJCWkgPSBzdHJsZW4gKGRwLT5k X25hbWUpIC0gMjsKKyNlbmRpZgogCQkvKiBTa2lwIG5vbi1oZWFkZXJzICovCiAJCWlmIChkcC0+ ZF9uYW1lW2ldICE9ICcuJyB8fCBkcC0+ZF9uYW1lW2kgKyAxXSAhPSAnaCcpCiAJCQljb250aW51 ZTsK --bcaec5215861ec25cc04a71755af-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 2 15:11:51 2011 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 BA85E1065674; Sat, 2 Jul 2011 15:11:51 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8DBC68FC0C; Sat, 2 Jul 2011 15:11:51 +0000 (UTC) Received: by pvg11 with SMTP id 11so4756595pvg.13 for ; Sat, 02 Jul 2011 08:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=Bn10hDdtVZXluB/MC+yY0ptq3oUeKkoWIzruaMPELTU=; b=EhsE8IYXga8/5LRC/JVnjYJQyeUAKX2C2ysQRxfO03jRZ+hN9KWve+ehW0o0BDo0+m 311QhRX4eynZYo9kuYF4RSf3FB4EzDW/4iV7DRTEpJCJwGSbIjLjRIB4BT1+acWiceU9 qdL/0hqbxqP1eN6B409bzNJF6mm8Psuvfi4pY= MIME-Version: 1.0 Received: by 10.68.27.41 with SMTP id q9mr4614726pbg.337.1309619511105; Sat, 02 Jul 2011 08:11:51 -0700 (PDT) Sender: rmh.aybabtu@gmail.com Received: by 10.68.47.138 with HTTP; Sat, 2 Jul 2011 08:11:51 -0700 (PDT) Date: Sat, 2 Jul 2011 17:11:51 +0200 X-Google-Sender-Auth: rdU9THJH-oF1dmNMvGkVkLzhma8 Message-ID: From: Robert Millan To: freebsd-hackers@freebsd.org, Ed Maste , obrien@freebsd.org Content-Type: multipart/mixed; boundary=bcaec520f191c018d904a7178ddd Cc: Subject: [PATCH] Remove -nostdinc in aicasm X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jul 2011 15:11:51 -0000 --bcaec520f191c018d904a7178ddd Content-Type: text/plain; charset=UTF-8 The userland aicasm utility in sys/dev/aic7xxx/aicasm/Makefile is being built with "-nostdinc -I/usr/include" options. Unfortunately this breaks building aicasm on systems using the upstream version of GCC, where "-nostdinc" disables more search directories than are enabled by "-I/usr/include". This was introduced by obrien (CCed) in 2002, apparently to remove a warning. I've verified that removing it doesn't produce any warnings on FreeBSD 9-CURRENT environment. Please consider this patch to remove -nostdinc in that file. -- Robert Millan --bcaec520f191c018d904a7178ddd Content-Type: text/plain; charset=US-ASCII; name="aicasm_nostdinc.diff" Content-Disposition: attachment; filename="aicasm_nostdinc.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gpmpmmwb0 SW5kZXg6IHN5cy9kZXYvYWljN3h4eC9haWNhc20vTWFrZWZpbGUKPT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lz L2Rldi9haWM3eHh4L2FpY2FzbS9NYWtlZmlsZQkocmV2aXNpb24gMjIzNzIxKQorKysgc3lzL2Rl di9haWM3eHh4L2FpY2FzbS9NYWtlZmlsZQkod29ya2luZyBjb3B5KQpAQCAtMjQsOCArMjQsNyBA QAogREVQRU5ERklMRT0JLmRlcGVuZF9haWNhc20KIC5lbmRpZgogCi1OT1NURElOQz0JLW5vc3Rk aW5jCi1DRkxBR1MrPSAke05PU1RESU5DfSAtSS91c3IvaW5jbHVkZSAtSS4KK0NGTEFHUys9IC1J LgogLmlmZGVmIE1BS0VTUkNQQVRICiBDRkxBR1MrPSAtSSR7TUFLRVNSQ1BBVEh9CiAuZW5kaWYK --bcaec520f191c018d904a7178ddd-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 2 15:22:15 2011 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 EB476106566C; Sat, 2 Jul 2011 15:22:15 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id BEE618FC19; Sat, 2 Jul 2011 15:22:15 +0000 (UTC) Received: by pvg11 with SMTP id 11so4762643pvg.13 for ; Sat, 02 Jul 2011 08:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=pwbe7dtW+fTpIZSFYLKTb0k4jJ8ja0vJTql17C810GQ=; b=uF/WKo/YhtIZsgxJeiW2iYuTCeYHSeZLXeRzhL8UUIpKDJJblAoooPgfqBjvT4GIZ/ fxJpnmbaJMFa6QPsRtJHKRVPTYSn0sVLkebPqJGXKsZrm+7fTsrLpi23m5xYWNQ0zuxx TYIxRd5ccaVJv9Sorm/dVnGXIwIzo/j8DF/HA= MIME-Version: 1.0 Received: by 10.68.27.41 with SMTP id q9mr4620736pbg.337.1309620135375; Sat, 02 Jul 2011 08:22:15 -0700 (PDT) Sender: rmh.aybabtu@gmail.com Received: by 10.68.47.138 with HTTP; Sat, 2 Jul 2011 08:22:15 -0700 (PDT) Date: Sat, 2 Jul 2011 17:22:15 +0200 X-Google-Sender-Auth: 7SPmETFvKjl0iQYjbkGBVBG8PgM Message-ID: From: Robert Millan To: freebsd-hackers@freebsd.org, Ed Maste Content-Type: multipart/mixed; boundary=bcaec520f191f5b3db04a717b22c Cc: Subject: [PATCH] bogus use of __linux__ in aicasm X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jul 2011 15:22:16 -0000 --bcaec520f191f5b3db04a717b22c Content-Type: text/plain; charset=UTF-8 Code in sys/dev/aic7xxx/aicasm/ contains a few checks on the __linux__ macro that actually break build on GNU systems (including Linux-based ones but also GNU/kFreeBSD). Some of them use __linux__ to include an alternate version of that would be placed in "../queue.h". However that file isn't present, which causes build failure. However, this isn't needed anyway, because non-BSD systems can use libbsd [1] to override the GNU version of with a suitable one (Debian uses this method extensively). Hence I propose simply including . In aicasm_symbol.c the __linux__ case again tries to include a non-existant file. As solution I propose assuming that non-BSD systems have installed the 1.85 version of Sleepycat library, which attempts to provide the same API as the BSD native libdb. aicasm.c wants to include only on Linux-based systems, but actually any system with Glibc would provide this file. Proposing fix to use __GLIBC__ instead. Thanks [1] http://libbsd.freedesktop.org/wiki/ -- Robert Millan --bcaec520f191f5b3db04a717b22c Content-Type: text/plain; charset=US-ASCII; name="aicasm_linux.diff" Content-Disposition: attachment; filename="aicasm_linux.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gpmpzdq70 SW5kZXg6IHN5cy9kZXYvYWljN3h4eC9haWNhc20vYWljYXNtLmgKPT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lz L2Rldi9haWM3eHh4L2FpY2FzbS9haWNhc20uaAkocmV2aXNpb24gMjIzNzIxKQorKysgc3lzL2Rl di9haWM3eHh4L2FpY2FzbS9haWNhc20uaAkod29ya2luZyBjb3B5KQpAQCAtNDIsMTEgKzQyLDcg QEAKICAqICRGcmVlQlNEJAogICovCiAKLSNpZmRlZiBfX2xpbnV4X18KLSNpbmNsdWRlICIuLi9x dWV1ZS5oIgotI2Vsc2UKICNpbmNsdWRlIDxzeXMvcXVldWUuaD4KLSNlbmRpZgogCiAjaWZuZGVm IFRSVUUKICNkZWZpbmUgVFJVRSAxCkluZGV4OiBzeXMvZGV2L2FpYzd4eHgvYWljYXNtL2FpY2Fz bV9zeW1ib2wuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMvZGV2L2FpYzd4eHgvYWljYXNtL2FpY2FzbV9z eW1ib2wuYwkocmV2aXNpb24gMjIzNzIxKQorKysgc3lzL2Rldi9haWM3eHh4L2FpY2FzbS9haWNh c21fc3ltYm9sLmMJKHdvcmtpbmcgY29weSkKQEAgLTQ0LDEwICs0NCwxMSBAQAogCiAjaW5jbHVk ZSA8c3lzL3R5cGVzLmg+CiAKLSNpZmRlZiBfX2xpbnV4X18KLSNpbmNsdWRlICJhaWNkYi5oIgor I2luY2x1ZGUgPHN5cy9wYXJhbS5oPgkJLyogQlNEICovCisjaWZkZWYgQlNECisjaW5jbHVkZSA8 ZGIuaD4JCQkvKiBCU0QgbmF0aXZlIGxpYmRiICovCiAjZWxzZQotI2luY2x1ZGUgPGRiLmg+Cisj aW5jbHVkZSA8ZGJfMTg1Lmg+CQkvKiBTbGVlcHljYXQgMS44NSBjb21wYXQgKi8KICNlbmRpZgog I2luY2x1ZGUgPGN0eXBlLmg+CiAjaW5jbHVkZSA8ZmNudGwuaD4KSW5kZXg6IHN5cy9kZXYvYWlj N3h4eC9haWNhc20vYWljYXNtX3N5bWJvbC5oCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9kZXYvYWljN3h4 eC9haWNhc20vYWljYXNtX3N5bWJvbC5oCShyZXZpc2lvbiAyMjM3MjEpCisrKyBzeXMvZGV2L2Fp Yzd4eHgvYWljYXNtL2FpY2FzbV9zeW1ib2wuaAkod29ya2luZyBjb3B5KQpAQCAtNDIsMTEgKzQy LDcgQEAKICAqICRGcmVlQlNEJAogICovCiAKLSNpZmRlZiBfX2xpbnV4X18KLSNpbmNsdWRlICIu Li9xdWV1ZS5oIgotI2Vsc2UKICNpbmNsdWRlIDxzeXMvcXVldWUuaD4KLSNlbmRpZgogCiB0eXBl ZGVmIGVudW0gewogCVVOSU5JVElBTElaRUQsCkluZGV4OiBzeXMvZGV2L2FpYzd4eHgvYWljYXNt L2FpY2FzbV9ncmFtLnkKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2Rldi9haWM3eHh4L2FpY2FzbS9haWNh c21fZ3JhbS55CShyZXZpc2lvbiAyMjM3MjEpCisrKyBzeXMvZGV2L2FpYzd4eHgvYWljYXNtL2Fp Y2FzbV9ncmFtLnkJKHdvcmtpbmcgY29weSkKQEAgLTUxLDEyICs1MSw3IEBACiAjaW5jbHVkZSA8 c3RkbGliLmg+CiAjaW5jbHVkZSA8c3RyaW5nLmg+CiAjaW5jbHVkZSA8c3lzZXhpdHMuaD4KLQot I2lmZGVmIF9fbGludXhfXwotI2luY2x1ZGUgIi4uL3F1ZXVlLmgiCi0jZWxzZQogI2luY2x1ZGUg PHN5cy9xdWV1ZS5oPgotI2VuZGlmCiAKICNpbmNsdWRlICJhaWNhc20uaCIKICNpbmNsdWRlICJh aWNhc21fc3ltYm9sLmgiCkluZGV4OiBzeXMvZGV2L2FpYzd4eHgvYWljYXNtL2FpY2FzbV9tYWNy b19ncmFtLnkKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2Rldi9haWM3eHh4L2FpY2FzbS9haWNhc21fbWFj cm9fZ3JhbS55CShyZXZpc2lvbiAyMjM3MjEpCisrKyBzeXMvZGV2L2FpYzd4eHgvYWljYXNtL2Fp Y2FzbV9tYWNyb19ncmFtLnkJKHdvcmtpbmcgY29weSkKQEAgLTUxLDEyICs1MSw3IEBACiAjaW5j bHVkZSA8c3RkbGliLmg+CiAjaW5jbHVkZSA8c3RyaW5nLmg+CiAjaW5jbHVkZSA8c3lzZXhpdHMu aD4KLQotI2lmZGVmIF9fbGludXhfXwotI2luY2x1ZGUgIi4uL3F1ZXVlLmgiCi0jZWxzZQogI2lu Y2x1ZGUgPHN5cy9xdWV1ZS5oPgotI2VuZGlmCiAKICNpbmNsdWRlICJhaWNhc20uaCIKICNpbmNs dWRlICJhaWNhc21fc3ltYm9sLmgiCkluZGV4OiBzeXMvZGV2L2FpYzd4eHgvYWljYXNtL2FpY2Fz bV9zY2FuLmwKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2Rldi9haWM3eHh4L2FpY2FzbS9haWNhc21fc2Nh bi5sCShyZXZpc2lvbiAyMjM3MjEpCisrKyBzeXMvZGV2L2FpYzd4eHgvYWljYXNtL2FpY2FzbV9z Y2FuLmwJKHdvcmtpbmcgY29weSkKQEAgLTUxLDExICs1MSw3IEBACiAjaW5jbHVkZSA8c3RkaW8u aD4KICNpbmNsdWRlIDxzdHJpbmcuaD4KICNpbmNsdWRlIDxzeXNleGl0cy5oPgotI2lmZGVmIF9f bGludXhfXwotI2luY2x1ZGUgIi4uL3F1ZXVlLmgiCi0jZWxzZQogI2luY2x1ZGUgPHN5cy9xdWV1 ZS5oPgotI2VuZGlmCiAKICNpbmNsdWRlICJhaWNhc20uaCIKICNpbmNsdWRlICJhaWNhc21fc3lt Ym9sLmgiCkluZGV4OiBzeXMvZGV2L2FpYzd4eHgvYWljYXNtL2FpY2FzbV9tYWNyb19zY2FuLmwK PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PQotLS0gc3lzL2Rldi9haWM3eHh4L2FpY2FzbS9haWNhc21fbWFjcm9fc2Nhbi5s CShyZXZpc2lvbiAyMjM3MjEpCisrKyBzeXMvZGV2L2FpYzd4eHgvYWljYXNtL2FpY2FzbV9tYWNy b19zY2FuLmwJKHdvcmtpbmcgY29weSkKQEAgLTUxLDExICs1MSw3IEBACiAjaW5jbHVkZSA8c3Rk aW8uaD4KICNpbmNsdWRlIDxzdHJpbmcuaD4KICNpbmNsdWRlIDxzeXNleGl0cy5oPgotI2lmZGVm IF9fbGludXhfXwotI2luY2x1ZGUgIi4uL3F1ZXVlLmgiCi0jZWxzZQogI2luY2x1ZGUgPHN5cy9x dWV1ZS5oPgotI2VuZGlmCiAKICNpbmNsdWRlICJhaWNhc20uaCIKICNpbmNsdWRlICJhaWNhc21f c3ltYm9sLmgiCkluZGV4OiBzeXMvZGV2L2FpYzd4eHgvYWljYXNtL2FpY2FzbS5jCj09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT0KLS0tIHN5cy9kZXYvYWljN3h4eC9haWNhc20vYWljYXNtLmMJKHJldmlzaW9uIDIyMzcyMSkK KysrIHN5cy9kZXYvYWljN3h4eC9haWNhc20vYWljYXNtLmMJKHdvcmtpbmcgY29weSkKQEAgLTUz LDcgKzUzLDcgQEAKICNpbmNsdWRlIDxzeXNleGl0cy5oPgogI2luY2x1ZGUgPHVuaXN0ZC5oPgog Ci0jaWYgbGludXgKKyNpZmRlZiBfX0dMSUJDX18KICNpbmNsdWRlIDxlbmRpYW4uaD4KICNlbHNl CiAjaW5jbHVkZSA8bWFjaGluZS9lbmRpYW4uaD4K --bcaec520f191f5b3db04a717b22c-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 2 15:25:58 2011 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 B3F8A106566C for ; Sat, 2 Jul 2011 15:25:58 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU [18.7.68.37]) by mx1.freebsd.org (Postfix) with ESMTP id 677DC8FC08 for ; Sat, 2 Jul 2011 15:25:58 +0000 (UTC) X-AuditID: 12074425-b7b82ae000000a2a-6e-4e0f385f3b89 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP id AD.86.02602.F583F0E4; Sat, 2 Jul 2011 11:25:19 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id p62FPvhP014916; Sat, 2 Jul 2011 11:25:57 -0400 Received: from multics.mit.edu (MULTICS.MIT.EDU [18.187.1.73]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id p62FPtxE028843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 2 Jul 2011 11:25:57 -0400 (EDT) Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id p62FPtTr000154; Sat, 2 Jul 2011 11:25:55 -0400 (EDT) Date: Sat, 2 Jul 2011 11:25:55 -0400 (EDT) From: Benjamin Kaduk To: Robert Millan In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFIsWRmVeSWpSXmKPExsUixG6nrhtvwe9nsPeWnsX2zf8YLbbcn8bk wOTxq20us8eMT/NZApiiuGxSUnMyy1KL9O0SuDIunNrFWrCZq2Jn+xnWBsadHF2MnBwSAiYS X29uYYWwxSQu3FvPBmILCexjlPiwW7uLkQvIXs8oMWfpPmYIZz+TxOSnG9ghquolri2Yy9TF yMHBIqAlsfWiCkiYTUBFYuabjWCDRASUJDav2gRmMwvIS1zYfIgRpFxYQF/iciNYmFMgUOJg 5yywG3gFHCQWLzvKCjE9QGLSmklgm0QFdCRW75/CAlEjKHFy5hMWiJGWEuf+XGebwCg4C0lq FpLUAkamVYyyKblVurmJmTnFqcm6xcmJeXmpRboWermZJXqpKaWbGMFB6qK6g3HCIaVDjAIc jEo8vD+f8/oJsSaWFVfmHmKU5GBSEuWVAYa4EF9SfkplRmJxRnxRaU5q8SFGCQ5mJRHeblWg HG9KYmVValE+TEqag0VJnDfE+7+vkEB6YklqdmpqQWoRTFaGg0NJglccZKhgUWp6akVaZk4J QpqJgxNkOA/QcGGQGt7igsTc4sx0iPwpRkUpcd5X5kAJAZBERmkeXC8sibxiFAd6RZh3GkgV DzABwXW/AhrMBDQ4M58XZHBJIkJKqoFR0/rH53LtD6ueuVpGNbc/9d3PdU1FVMGs5lv37al1 WgZ8M9+n33N9y1EmF3JpmmfgiiDhV5kPp8X/mPV1dq6jkurrOSWHVA/ccIv4fct2W9ebhxby f6W770yrmtOzmyPpOHNsgtdWk6yODZ4Hcgo3NoUq5X7bfO9E5P4pS1lNbujtiTz0VeOaEktx RqKhFnNRcSIAZ01A6P0CAAA= Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] Remove -nostdinc in aicasm X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jul 2011 15:25:58 -0000 On Sat, 2 Jul 2011, Robert Millan wrote: > The userland aicasm utility in sys/dev/aic7xxx/aicasm/Makefile is being > built with "-nostdinc -I/usr/include" options. Unfortunately this breaks > building aicasm on systems using the upstream version of GCC, where > "-nostdinc" disables more search directories than are enabled by > "-I/usr/include". There is a functional difference between '-nostdinc -I/usr/include -I.' even when the standard include search path is just /usr/include -- the standard include paths are always searched last (unless -nostdinc is given), even if they are explicitly listed on the command line. If there are conflicting definitions in /usr/local/foo.h and ./foo.h, this gimmick can be necessary to pull in the correct version. (I've needed to do this when packaging software for the freebsd ports collection, though with /usr/local/include replacing '.'.) I have not checked whether this affects aicasm, though (which may or may not manifest itself as compiler warnings). -Ben Kaduk > > This was introduced by obrien (CCed) in 2002, apparently to remove a > warning. I've verified that removing it doesn't produce any warnings > on FreeBSD 9-CURRENT environment. > > Please consider this patch to remove -nostdinc in that file. > > -- > Robert Millan > From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 2 15:41:03 2011 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 EA5AA106564A; Sat, 2 Jul 2011 15:41:03 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id BE3F88FC19; Sat, 2 Jul 2011 15:41:03 +0000 (UTC) Received: by pzk27 with SMTP id 27so1580939pzk.13 for ; Sat, 02 Jul 2011 08:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=1kDCb7FDZbAm841eKFHXu299kXVfVkraU4qtMTmxCHI=; b=W7I2ci7W8I2Mh2IZstHrcZ+xhmQH8NMA1vMW+ZjVPsoqd8XXCFNxBJa12zTEEd9QTf KnkBOuaWsJkqfGffNyYVxt2U5d4SH1G+HyGaWI2j82MSMMa++9pCHnPdTYHnLENpnL0z 6EKlfkM9S4UgA8DW6BGIvUlHcYI7Xf/dfG+K8= MIME-Version: 1.0 Received: by 10.68.35.103 with SMTP id g7mr4976479pbj.471.1309621263284; Sat, 02 Jul 2011 08:41:03 -0700 (PDT) Sender: rmh.aybabtu@gmail.com Received: by 10.68.47.138 with HTTP; Sat, 2 Jul 2011 08:41:03 -0700 (PDT) Date: Sat, 2 Jul 2011 17:41:03 +0200 X-Google-Sender-Auth: 3zuN4MspsYV5Irg8xA3T-PIkx-Y Message-ID: From: Robert Millan To: freebsd-hackers@freebsd.org, Ed Maste Content-Type: multipart/mixed; boundary=bcaec51ddbf73038f704a717f60c Cc: Subject: [PATCH] __FreeBSD_kernel__ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jul 2011 15:41:04 -0000 --bcaec51ddbf73038f704a717f60c Content-Type: text/plain; charset=UTF-8 Since their inception, GNU/kFreeBSD systems had defined "__FreeBSD_kernel__" as builtin macro to indicate this is a system that uses the kernel of FreeBSD. We couldn't define "__FreeBSD__" because this implies a full FreeBSD system, and a lot of software checks for this macro when it is concerned with userland (usually libc). As a result of this, and of the considerable porting effort that followed, many 3rd party programs with kernel-specific extensions have been ported to recognize __FreeBSD_kernel__ as well. E.g.: #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) // code for FreeBSD kernel #endif My request is that FreeBSD also defines __FreeBSD_kernel__. If this happens, life would be made a bit easier on both sides, as it'd be more natural for porters of either system to support both using a single macro [1]. [1] When porting software to support FreeBSD and systems with kernel of FreeBSD myself (as I did with e.g. GRUB), I generally took care to ensure both macros are checked for, but this isn't always the case. Having a unified macro would make it easier for developers of both systems to cooperate. -- Robert Millan --bcaec51ddbf73038f704a717f60c Content-Type: text/plain; charset=US-ASCII; name="freebsd_kernel.diff" Content-Disposition: attachment; filename="freebsd_kernel.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gpmqj6e20 SW5kZXg6IGNvbnRyaWIvZ2NjL2NvbmZpZy9mcmVlYnNkLXNwZWMuaAo9PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBj b250cmliL2djYy9jb25maWcvZnJlZWJzZC1zcGVjLmgJKHJldmlzaW9uIDIyMzcyMSkKKysrIGNv bnRyaWIvZ2NjL2NvbmZpZy9mcmVlYnNkLXNwZWMuaAkod29ya2luZyBjb3B5KQpAQCAtNTQsNiAr NTQsNyBAQAogICBkbwkJCQkJCQkJCVwKICAgICB7CQkJCQkJCQkJXAogCWJ1aWx0aW5fZGVmaW5l X3dpdGhfaW50X3ZhbHVlICgiX19GcmVlQlNEX18iLCBGQlNEX01BSk9SKTsJXAorCWJ1aWx0aW5f ZGVmaW5lICgiX19GcmVlQlNEX2tlcm5lbF9fIik7CQkJCVwKIAlidWlsdGluX2RlZmluZV9zdGQg KCJ1bml4Iik7CQkJCQlcCiAJYnVpbHRpbl9kZWZpbmVfc3RkICgiX191bml4X18iKTsJCQkJXAog CWJ1aWx0aW5fZGVmaW5lICgiX19LUFJJTlRGX0FUVFJJQlVURV9fIik7CQkJXAo= --bcaec51ddbf73038f704a717f60c-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 2 16:01:47 2011 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 86AC3106564A for ; Sat, 2 Jul 2011 16:01:47 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 601478FC0C for ; Sat, 2 Jul 2011 16:01:47 +0000 (UTC) Received: by pzk27 with SMTP id 27so1593014pzk.13 for ; Sat, 02 Jul 2011 09:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=3n34APFrragK0Hvbfv3YjwCNg4A4Xi+CIDLpl69KeJE=; b=Rp/KVSSMXZnDgBojNbS9IK46W0YQUlTK7/vV6HkTBMN2zKG4VDYQDToxE1LgdzVoGm 08E9EMZYpInXx0eH0Mj27EDIMN9h3e9k0Qkv/MaIGrVYIJKv9rcU8z/vbzHv8icKsXss agMnzRUXamNY2SHuWVZpZKbnfA8o2/VBGn4DY= MIME-Version: 1.0 Received: by 10.68.27.41 with SMTP id q9mr4644690pbg.337.1309622506729; Sat, 02 Jul 2011 09:01:46 -0700 (PDT) Sender: rmh.aybabtu@gmail.com Received: by 10.68.47.138 with HTTP; Sat, 2 Jul 2011 09:01:46 -0700 (PDT) In-Reply-To: References: Date: Sat, 2 Jul 2011 18:01:46 +0200 X-Google-Sender-Auth: VpChHHhosZgX1kNP2HDcJorXBfk Message-ID: From: Robert Millan To: Benjamin Kaduk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] Remove -nostdinc in aicasm X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jul 2011 16:01:47 -0000 2011/7/2 Benjamin Kaduk : > There is a functional difference between '-nostdinc -I/usr/include -I.' e= ven > when the standard include search path is just /usr/include -- the standar= d > include paths are always searched last (unless -nostdinc is given), even = if > they are explicitly listed on the command line. =C2=A0If there are confli= cting > definitions in /usr/local/foo.h and ./foo.h, this gimmick can be necessar= y > to pull in the correct version. =C2=A0(I've needed to do this when packag= ing > software for the freebsd ports collection, though with /usr/local/include > replacing '.'.) In this case I'd rather be safe than sorry and use -iwithprefix or -isystem `gcc --print-file-name=3D` on GCC only. What is the recommended way to check the compiler flavour and version from FreeBSD Makefiles? --=20 Robert Millan From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 2 18:04:21 2011 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 41EDC106566B for ; Sat, 2 Jul 2011 18:04:21 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id B9B758FC17 for ; Sat, 2 Jul 2011 18:04:20 +0000 (UTC) Received: by wwe6 with SMTP id 6so3960064wwe.31 for ; Sat, 02 Jul 2011 11:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=oGcVPVDlKdIkj8zxVUW/EnCwAO7kKqVah/KgZGJ6mC4=; b=Aph1xoAJv+XEQ7kp5QG+8uUn+RJ0mFVWS7buqd966WGlahpegM+1lhB/84JCU1asqR FRmR+nHaJ7BidQESr7nPSIlFAB8ecEGj45lxcmxH1dlNN/SHmTokqgkMxarSXS2yd9Lb PcVzcJgt45gtktktYFmSAmiPsNhBdm5jrzMtA= MIME-Version: 1.0 Received: by 10.216.63.2 with SMTP id z2mr2183857wec.11.1309629859555; Sat, 02 Jul 2011 11:04:19 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.216.135.169 with HTTP; Sat, 2 Jul 2011 11:04:19 -0700 (PDT) In-Reply-To: References: Date: Sat, 2 Jul 2011 11:04:19 -0700 X-Google-Sender-Auth: ANNBD5-wxBLvsts_qzlygMnwn6w Message-ID: From: Artem Belevich To: =?ISO-8859-1?Q?Martin_M=F6ller?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-hackers@freebsd.org" Subject: Re: Question about lseek/fseek X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jul 2011 18:04:21 -0000 On Sat, Jul 2, 2011 at 6:57 AM, Martin M=F6ller wrote: > Hi Hackers, > > why does these function allow seeking beyond the EOF of a file in > O_RDONLY/=B2rb=B2 mode ? Perhaps because the standard explicitly says that it's allowed: http://pubs.opengroup.org/onlinepubs/009695399/functions/lseek.html > How does these function then signal the EOF correctly ? It does not. It only sets offset for a given file descriptor. It's read's job to signal EOF. > Seeking beyond the EOF makes sense for me in write-mode but not in read-o= nly > mode ! Given that lseek does not change file size (I.e. it does not ever modify the file), there's no reason to prohibit seek beyond end of file even in read-only mode. Now, if you would try to read after seeking beyond EOF, then the read() should complain that there's no data. --Artem > > With Regards, > Martin > _______________________________________________ > 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 Sat Jul 2 22:06:08 2011 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 6DC5F106566B for ; Sat, 2 Jul 2011 22:06:08 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU [18.7.68.34]) by mx1.freebsd.org (Postfix) with ESMTP id 2012F8FC0C for ; Sat, 2 Jul 2011 22:06:07 +0000 (UTC) X-AuditID: 12074422-b7b19ae000000a1c-1a-4e0f9645dbaa Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP id 18.C0.02588.5469F0E4; Sat, 2 Jul 2011 18:05:57 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id p62M662w001909; Sat, 2 Jul 2011 18:06:07 -0400 Received: from multics.mit.edu (MULTICS.MIT.EDU [18.187.1.73]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id p62M64pQ027884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 2 Jul 2011 18:06:05 -0400 (EDT) Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id p62M636r003764; Sat, 2 Jul 2011 18:06:03 -0400 (EDT) Date: Sat, 2 Jul 2011 18:06:03 -0400 (EDT) From: Benjamin Kaduk To: Robert Millan In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrIIsWRmVeSWpSXmKPExsUixG6nrus6jd/P4MdybYtFNw4zW2zf/I/R Ysv9aUwOzB6/2uYye8z4NJ8lgCmKyyYlNSezLLVI3y6BK2P+vkvMBS/YKl5u+87WwLiFtYuR g0NCwERiXWtWFyMnkCkmceHeerYuRi4OIYF9jBLbV5xihXDWM0rs2/aMEcLZzyQx/9FLRpAW IYF6iU+nHrOD2CwCWhKn3jSygdhsAioSM99sBLNFBJQkNq/aBGYzC9hJrL33mgnEFhZQl3hw bBULiM0pECix9OAXZhCbV8BBouHuNhaI+QES70+9ZQWxRQV0JFbvn8ICUSMocXLmExaImZYS /9b+Yp3AKDgLSWoWktQCRqZVjLIpuVW6uYmZOcWpybrFyYl5ealFuqZ6uZkleqkppZsYwSHr orSD8edBpUOMAhyMSjy8Dzz5/YRYE8uKK3MPMUpyMCmJ8sZPBgrxJeWnVGYkFmfEF5XmpBYf YpTgYFYS4X3rD5TjTUmsrEotyodJSXOwKInzlnj/9xUSSE8sSc1OTS1ILYLJynBwKEnwNk8F ahQsSk1PrUjLzClBSDNxcIIM5wEaXg5Sw1tckJhbnJkOkT/FqCglzusLkhAASWSU5sH1wlLK K0ZxoFeEeUNB7uYBpiO47ldAg5mABmfm84IMLklESEk1MCrw7sl/9bZVhivDu6Un87L7HD2N xjV3e60XLOIuzz1YU8rgvj+Gc2HIpiTP0C0bhB79mi2pm7DKwHqT9He995PbHtzz7GtId3Zb kCLZk/HS6Vfdo/kP1+5yqjA5eaxm3ZSIMv57k+KvHPtZyL8x/qqIQ7Bv0sKtBiqfBTW7Sxxj MpMdtrE+UmIpzkg01GIuKk4EAEfTbgMEAwAA Cc: freebsd-hackers@freebsd.org, Ed Maste Subject: Re: [PATCH] __FreeBSD_kernel__ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jul 2011 22:06:08 -0000 On Sat, 2 Jul 2011, Robert Millan wrote: > My request is that FreeBSD also defines __FreeBSD_kernel__. If this > happens, life would be made a bit easier on both sides, as it'd be % Index: contrib/gcc/config/freebsd-spec.h % =================================================================== % --- contrib/gcc/config/freebsd-spec.h (revision 223721) % +++ contrib/gcc/config/freebsd-spec.h (working copy) % @@ -54,6 +54,7 @@ % do \ % { \ % builtin_define_with_int_value ("__FreeBSD__", FBSD_MAJOR); \ % + builtin_define ("__FreeBSD_kernel__"); \ Is there a reason to prefer just defining the symbol to also including the major version number as is done for __FreeBSD__? -Ben Kaduk % builtin_define_std ("unix"); \ % builtin_define_std ("__unix__"); \ % builtin_define ("__KPRINTF_ATTRIBUTE__"); \ From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 2 22:09:48 2011 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 DC176106566B for ; Sat, 2 Jul 2011 22:09:48 +0000 (UTC) (envelope-from matthias.andree@gmx.de) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mx1.freebsd.org (Postfix) with SMTP id 318E58FC18 for ; Sat, 2 Jul 2011 22:09:47 +0000 (UTC) Received: (qmail invoked by alias); 02 Jul 2011 22:09:46 -0000 Received: from f055106141.adsl.alicedsl.de (EHLO apollo.emma.line.org) [78.55.106.141] by mail.gmx.net (mp065) with SMTP; 03 Jul 2011 00:09:46 +0200 X-Authenticated: #428038 X-Provags-ID: V01U2FsdGVkX1+OEucSkeCOGjGUygV5VXpyx0R/V9jBJdJy3HZ7Fe IkUiRzGhAz8fdJ Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by apollo.emma.line.org (Postfix) with ESMTP id D74BE23D164 for ; Sun, 3 Jul 2011 00:09:45 +0200 (CEST) Message-ID: <4E0F9729.9080002@gmx.de> Date: Sun, 03 Jul 2011 00:09:45 +0200 From: Matthias Andree User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Mnenhy/0.8.3 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: Re: [PATCH] Remove -nostdinc in aicasm X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jul 2011 22:09:48 -0000 Am 02.07.2011 17:25, schrieb Benjamin Kaduk: > On Sat, 2 Jul 2011, Robert Millan wrote: > >> The userland aicasm utility in sys/dev/aic7xxx/aicasm/Makefile is being >> built with "-nostdinc -I/usr/include" options. Unfortunately this breaks >> building aicasm on systems using the upstream version of GCC, where >> "-nostdinc" disables more search directories than are enabled by >> "-I/usr/include". > > There is a functional difference between '-nostdinc -I/usr/include -I.' > even when the standard include search path is just /usr/include -- the > standard include paths are always searched last (unless -nostdinc is > given), even if they are explicitly listed on the command line. If > there are conflicting definitions in /usr/local/foo.h and ./foo.h, this > gimmick can be necessary to pull in the correct version. (I've needed > to do this when packaging software for the freebsd ports collection, > though with /usr/local/include replacing '.'.) Note that there are GCC-version-specific directories for the more intricate details such as stdarg.h and compiler-specific builtins -- you don't get those with -I/usr/include either. From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 2 23:37:33 2011 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 BB6561065674 for ; Sat, 2 Jul 2011 23:37:33 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 714218FC12 for ; Sat, 2 Jul 2011 23:37:33 +0000 (UTC) Received: by qwc9 with SMTP id 9so2802636qwc.13 for ; Sat, 02 Jul 2011 16:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=mWOuVUVDd3sQqaOpfww+VYuKkMLEhFrxfUSt4x+t+bg=; b=ma0YhNaOpQ89gX2z067hvS8doIzf4ZOMWUxOhjMU9973S2nxe9JS1F1ed6v/Wm14sI Pu6EPS93OnxwKl5ca94+TTX/CLSMdXYtbI2YsTMgj0hl9Psp0d9EslCci4DbWrqMtXFT QwGrzMfe57439PwMGgiNdyLJfrcdkE+j6GUoM= Received: by 10.224.2.130 with SMTP id 2mr707717qaj.145.1309649852773; Sat, 02 Jul 2011 16:37:32 -0700 (PDT) Received: from kan.dnsalias.net (c-24-63-226-98.hsd1.ma.comcast.net [24.63.226.98]) by mx.google.com with ESMTPS id i7sm2132180qcb.22.2011.07.02.16.37.30 (version=SSLv3 cipher=OTHER); Sat, 02 Jul 2011 16:37:31 -0700 (PDT) Date: Sat, 2 Jul 2011 19:37:24 -0400 From: Alexander Kabaev To: Robert Millan Message-ID: <20110702193724.5c55a6c9@kan.dnsalias.net> In-Reply-To: References: X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/3HvI1cYopZiG0sWUe_I2/=u"; protocol="application/pgp-signature" Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] __FreeBSD_kernel__ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jul 2011 23:37:33 -0000 --Sig_/3HvI1cYopZiG0sWUe_I2/=u Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 2 Jul 2011 17:41:03 +0200 Robert Millan wrote: > Since their inception, GNU/kFreeBSD systems had defined > "__FreeBSD_kernel__" as builtin macro to indicate this is a system > that uses the kernel of FreeBSD. We couldn't define "__FreeBSD__" > because this implies a full FreeBSD system, and a lot of software > checks for this macro when it is concerned with userland (usually > libc). >=20 > As a result of this, and of the considerable porting effort that > followed, many 3rd party programs with kernel-specific extensions have > been ported to recognize __FreeBSD_kernel__ as well. E.g.: >=20 > #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) > // code for FreeBSD kernel > #endif >=20 > My request is that FreeBSD also defines __FreeBSD_kernel__. If this > happens, life would be made a bit easier on both sides, as it'd be > more natural for porters of either system to support both using a > single macro [1]. >=20 > [1] When porting software to support FreeBSD and systems with kernel > of FreeBSD myself (as I did with e.g. GRUB), I generally took care to > ensure both macros are checked for, but this isn't always the case. > Having a unified macro would make it easier for developers of both > systems to cooperate. >=20 > --=20 > Robert Millan I do not think this belongs in GCC at all. You should already have a defined symbol to identify your OS and that should be used in cases where it matters. Alternatively, you should provide the symbol in similar way in which we provide __FreeBSD_version, through well-known header like sys/param.h and not pollute GCC. GCC is on the way to be pushed out into ports in FreeBSD and it will not the the only usable compiler before long. Your proposal will force similar changes in Clang, Path64 and PCC, , to be really universal which is not practical. All IMHO. --=20 Alexander Kabaev --Sig_/3HvI1cYopZiG0sWUe_I2/=u Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iD8DBQFOD6u5Q6z1jMm+XZYRAnvBAKDOKiLssa0qHDhU5vtPs1yIBfopDQCfaCjc D0u+O7Ox/7CyStJHv4D7okY= =AaJt -----END PGP SIGNATURE----- --Sig_/3HvI1cYopZiG0sWUe_I2/=u--