From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 19 00:03:04 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB5DB1065699 for ; Sun, 19 Oct 2008 00:03:04 +0000 (UTC) (envelope-from richard.robert@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.235]) by mx1.freebsd.org (Postfix) with ESMTP id 7FA398FC0A for ; Sun, 19 Oct 2008 00:03:04 +0000 (UTC) (envelope-from richard.robert@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so1050271rvf.43 for ; Sat, 18 Oct 2008 17:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=/XFafyylMKqpXOuIwEAqwrL7fT/eegyqMErPtgBfafY=; b=aJJHsr9ZLo2t+aJhVRm6InJVwZ8HuGyE1MjdUo8lBNsPmujs96+vRAhD1ohEYYuBs3 9jI34LXpjp05LryVsaoPjHUx4/HXHKAol1WiaJVoOkelyZPCeL0yU091vEGuPSv2gCzV cxvDIlUxyWmswHbRWXmAtNCegTYJ3dIbF31Jc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=An5+Xoe7hZ1Lui8SfMgupW3PBy+AefXbZnpbJKnz9szFIkB2d8oLxSMruVrG8bNRDC A1LBE6nWofu9tdVLKn3m02dx6QExiB/oVLRoltcbBxnXKBOjez2DRx1wELCfkwQlDXzU 6z6Nfkd/bxy+/jVgll06ru7kdTF6uUAMfkUdI= Received: by 10.143.4.16 with SMTP id g16mr2232154wfi.289.1224372913606; Sat, 18 Oct 2008 16:35:13 -0700 (PDT) Received: by 10.142.225.3 with HTTP; Sat, 18 Oct 2008 16:35:13 -0700 (PDT) Message-ID: <43c4e0a0810181635w58e2c4a6tf8d1e9e6563ede7f@mail.gmail.com> Date: Sat, 18 Oct 2008 19:35:13 -0400 From: "Robert Richards" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: gprocessor Error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 19 Oct 2008 00:03:04 -0000 Hi: I have been trying to upgrade to the latest gnash on my W/S running: FreeBSD 6.3-RELEASE-p5 #3. First, I upgraded the kernel and base to the latest patch level, then I executed a portupgrade -R gnash, and after all the pre-requisite packages were upgraded successfully gnash itself began to compile. Then this: =========================== ../libcore/.libs/libgnashcore.so: undefined reference to `std::basic_ostream >& std::basic_ostream >::_M_insert(bool)' /usr/ports/graphics/gnash/work/gnash-0.8.4/libbase/.libs/libgnashbase.so: undefined reference to `std::basic_istream >& std::basic_istream >::_M_extract(unsigned int&)' collect2: ld returned 1 exit status gmake[2]: *** [gprocessor] Error 1 gmake[2]: Leaving directory `/usr/ports/graphics/gnash/work/gnash-0.8.4/utilities' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/ports/graphics/gnash/work/gnash-0.8.4' gmake: *** [all] Error 2 *** Error code 2 Stop in /usr/ports/graphics/gnash. *** Error code 1 Stop in /usr/ports/graphics/gnash. ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade.43253.1 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=gnash-0.8.2_2 UPGRADE_PORT_VER=0.8.2_2 make ** Fix the problem and try again. ** Listing the failed packages (-:ignored / *:skipped / !:failed) ! graphics/gnash (gnash-0.8.2_2) (new compiler error) =========================== What do I need to do to get this accomplished? I am struggling with limited flash support, and have been doing fairly well with gnash/firefox. I would like to upgrade my gnash-0.8.2_2 to the latest version gnash-0.8.4. and possibly get a bit more functionality. Oh, one more possible clue. The first time I attempted this, I issued a portupgrade gnash without recursion. At about the same point of failure, the system powered down. I mean I saw an LD error, and then POOF, laptop went power-down! I didn't believe that was the cause, so after cleaning the file systems, I tried again, and again it powered down. So I pretty much upgraded everything and after the -R attempt, gnash simply failed. TIA Bob From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 19 00:19:29 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0692E10656A3 for ; Sun, 19 Oct 2008 00:19:29 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.224]) by mx1.freebsd.org (Postfix) with ESMTP id CA2908FC1E for ; Sun, 19 Oct 2008 00:19:28 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so1053442rvf.43 for ; Sat, 18 Oct 2008 17:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=WXSYCadypVWBjHSChaODv/GtlxPbpWLNr8xezPz6M1k=; b=HbQzeKxWLae17agolonW2MIJA+UlSUyUTqRuEiy7OdZziGWtofnRS9kg+/AqC40nXj kHsl7HD6lLbHzNGxyq7MH4v1tc5oHD562mebSyFxsn/EsQmE2okB5Ne8lzXED2DcNhbn dP60VuTBGqpHizXvxZamYlDDigcAWRiEHcO6k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=NjO/u5lRw6upWSUR2kq8tJFKSMn7fK2bTiaZz3hqaV9VJVU24PRhQWCEuAtFZZwQGu djSjjHBvXINQf1Ws27uG/qeQxVkZZOnuLg+1C+Jqf9nnmgiKhH5NlEG7fDz6T67nXu48 oEaIn45vRGDE70DKoSgOTHQwJvVV+KGUieYe4= Received: by 10.141.151.18 with SMTP id d18mr3659849rvo.75.1224375568133; Sat, 18 Oct 2008 17:19:28 -0700 (PDT) Received: by 10.141.153.13 with HTTP; Sat, 18 Oct 2008 17:19:28 -0700 (PDT) Message-ID: <9bbcef730810181719x4387a14yec74bdb6893d1a2a@mail.gmail.com> Date: Sun, 19 Oct 2008 02:19:28 +0200 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Dan Nelson" In-Reply-To: <20081018231201.GM99270@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081018213502.GL99270@dan.emsphone.com> <20081018231201.GM99270@dan.emsphone.com> X-Google-Sender-Auth: e8934d3392509a56 Cc: freebsd-hackers@freebsd.org Subject: Re: Pipes, cat buffer size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 19 Oct 2008 00:19:29 -0000 2008/10/19 Dan Nelson : > In the last episode (Oct 19), Ivan Voras said: >> Of course. But that's not the point :) From what I see (didn't look at >> the code), Linux for example does some kind of internal buffering that >> decouples how the reader and the writer interact. I think that with >> FreeBSD's current behaviour the writer could write 1-byte buffers and >> the reader will be forced to read each byte individually. I don't know >> if there's some ulterior reason for this. > > No; take a look at /sys/kern/sys_pipe.c . Depending on how much data > is in the pipe, it switches between async in-kernel buffering (<8192 > bytes), and direct page wiring between sender and receiver (basically > zero-copy). Ok, maybe it's just not behaving as I thought it should. See this test program: ---- #include #include #include #define BSIZE (1024*1024) void main() { int r; char buf[BSIZE]; while (1) { r = read(0, buf, BSIZE); fprintf(stderr, "read %d bytes\n", r); if (r <= 0) break; } } ---- and this command line: > dd bs=1 if=/dev/zero| ./reader The output of this on RELENG_7 is: read 8764 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes read 1 bytes ... The first value puzzles me - so it actually is doing some kind of buffering. Linux isn't actually much better, but the intention is there: $ dd if=/dev/zero bs=1 | ./bla read 1 bytes read 38 bytes read 8 bytes read 2 bytes read 2 bytes read 2 bytes read 2 bytes read 4 bytes read 3 bytes read 2 bytes read 2 bytes read 2 bytes read 2 bytes read 2 bytes read 2 bytes read 3 bytes read 3 bytes read 112 bytes read 2 bytes read 2 bytes ... Maybe FreeBSD switches between the writer and the reader too soon so the buffer doesn't get filled? Using cat (which started all this), FreeBSD consistently processes 4096 byte buffers, while Linux's sizes are all over the place - from 4 kB to 1 MB, randomly fluctuating. My goal would be (if it's possible - it might not be) to maximize coalescing in an environment where the reader does something with the data (e.g. compression) so there should be a reasonable amount of backlogged input data. But if it works in general, it may simply be that it isn't really applicable to my purpose (and I should modify the reader to read multiple blocks). Though it won't help me, I still think that modifying cat is worth it :) From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 19 00:50:24 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD05E1065696 for ; Sun, 19 Oct 2008 00:50:24 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 79C598FC0C for ; Sun, 19 Oct 2008 00:50:24 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id m9J0oN7m057169 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 18 Oct 2008 19:50:23 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id m9J0oMi2057167; Sat, 18 Oct 2008 19:50:22 -0500 (CDT) (envelope-from dan) Date: Sat, 18 Oct 2008 19:50:22 -0500 From: Dan Nelson To: Ivan Voras Message-ID: <20081019005021.GN99270@dan.emsphone.com> References: <20081018213502.GL99270@dan.emsphone.com> <20081018231201.GM99270@dan.emsphone.com> <9bbcef730810181719x4387a14yec74bdb6893d1a2a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9bbcef730810181719x4387a14yec74bdb6893d1a2a@mail.gmail.com> X-OS: FreeBSD 7.1-PRERELEASE User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: Pipes, cat buffer size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 19 Oct 2008 00:50:24 -0000 In the last episode (Oct 19), Ivan Voras said: > 2008/10/19 Dan Nelson : > > In the last episode (Oct 19), Ivan Voras said: > >> Of course. But that's not the point :) From what I see (didn't > >> look at the code), Linux for example does some kind of internal > >> buffering that decouples how the reader and the writer interact. I > >> think that with FreeBSD's current behaviour the writer could write > >> 1-byte buffers and the reader will be forced to read each byte > >> individually. I don't know if there's some ulterior reason for > >> this. > > > > No; take a look at /sys/kern/sys_pipe.c . Depending on how much > > data is in the pipe, it switches between async in-kernel buffering > > (<8192 bytes), and direct page wiring between sender and receiver > > (basically zero-copy). > > Ok, maybe it's just not behaving as I thought it should. See this > test program: [ program that prints the amount of data in each read() ] > and this command line: > > > dd bs=1 if=/dev/zero| ./reader > > The output of this on RELENG_7 is: > > read 8764 bytes > read 1 bytes [..] > read 1 bytes > read 1 bytes > ... > > The first value puzzles me - so it actually is doing some kind of > buffering. Linux isn't actually much better, but the intention is > there: > > $ dd if=/dev/zero bs=1 | ./bla > read 1 bytes > read 38 bytes > read 8 bytes > read 2 bytes [..] > read 2 bytes > read 3 bytes > read 3 bytes > read 112 bytes > read 2 bytes > read 2 bytes > ... > > Maybe FreeBSD switches between the writer and the reader too soon so > the buffer doesn't get filled? If your reader isn't doing any real work between reads, it is always reading, so the pipe will never fill up. The delay in FreeBSD was probably due to the shell spawning the writer first, so it buffered up 8k of data before the reader was ready. After that, the reader was able to pull data as fast as the writer pushed. > Using cat (which started all this), FreeBSD consistently processes > 4096 byte buffers, while Linux's sizes are all over the place - from > 4 kB to 1 MB, randomly fluctuating. My goal would be (if it's > possible - it might not be) to maximize coalescing in an environment > where the reader does something with the data (e.g. compression) so > there should be a reasonable amount of backlogged input data. Remember that increasing coelescing also increases latency and decreases the parallelism between reader and writer (since if you coalesce you cause the reader to wait for data that's already been writen, in the hopes that the writer will write again soon). > But if it works in general, it may simply be that it isn't really > applicable to my purpose (and I should modify the reader to read > multiple blocks). That's my suggestion, yes. That way your program would also work when passed data from an internet socket (where you will get varying read() sizes too). It wouldn't add more than 10 lines to wrap your read in a loop that exits when your preferred size has been reached. > Though it won't help me, I still think that modifying cat is worth it :) -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 19 01:05:52 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA571106568A; Sun, 19 Oct 2008 01:05:52 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id BFF0D8FC08; Sun, 19 Oct 2008 01:05:52 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.205] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id m9J0f3tv075039; Sat, 18 Oct 2008 17:41:03 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <48FA821A.8070200@freebsd.org> Date: Sat, 18 Oct 2008 17:40:58 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ivan Voras References: <20081018213502.GL99270@dan.emsphone.com> <20081018231201.GM99270@dan.emsphone.com> <9bbcef730810181719x4387a14yec74bdb6893d1a2a@mail.gmail.com> In-Reply-To: <9bbcef730810181719x4387a14yec74bdb6893d1a2a@mail.gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Dan Nelson Subject: Re: Pipes, cat buffer size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 19 Oct 2008 01:05:53 -0000 >>>... the writer could write 1-byte buffers and >>>the reader will be forced to read each byte individually. >> >>No; take a look at /sys/kern/sys_pipe.c . Depending on how much data >>is in the pipe, it switches between async in-kernel buffering (<8192 >>bytes), and direct page wiring between sender and receiver (basically >>zero-copy). > > Ok, maybe it's just not behaving as I thought it should. See this test program: However, when I add "sleep(1)" to your test program, I see the following output: $ dd bs=1 if=/dev/zero | ./reader read 2282 bytes read 65536 bytes read 65536 bytes read 65536 bytes read 65536 bytes read 65536 bytes read 65536 bytes read 65536 bytes read 65536 bytes read 65536 bytes read 65536 bytes In your original example, because your sample reader does nothing, it sees each write separately. If the reader was actually doing some work then the pipe would buffer up data while your reader was busy. This looks like exactly the right behavior: The reader will only block if there is no data in the pipe at all; the writer will only block if it gets "too far ahead" of the reader. Except in those cases, each program gets to do I/O as fast as it can. If your program needs larger blocks, it should keep reading until it gets enough data. (The -B option of GNU tar is an example of this sort of behavior.) Tim From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 20 14:13:28 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0549A1065674 for ; Mon, 20 Oct 2008 14:13:28 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id C4C888FC1F for ; Mon, 20 Oct 2008 14:13:27 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id DEB3BAFBC01; Mon, 20 Oct 2008 06:13:26 -0800 (AKDT) From: Mel To: freebsd-hackers@freebsd.org Date: Mon, 20 Oct 2008 16:13:25 +0200 User-Agent: KMail/1.9.7 References: <9bbcef730810181719x4387a14yec74bdb6893d1a2a@mail.gmail.com> <20081019005021.GN99270@dan.emsphone.com> In-Reply-To: <20081019005021.GN99270@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810201613.25864.fbsd.hackers@rachie.is-a-geek.net> Cc: Dan Nelson , Ivan Voras Subject: Re: Pipes, cat buffer size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 20 Oct 2008 14:13:28 -0000 On Sunday 19 October 2008 02:50:22 Dan Nelson wrote: > > But if it works in general, it may simply be that it isn't really > > applicable to my purpose (and I should modify the reader to read > > multiple blocks). > > That's my suggestion, yes. That way your program would also work when > passed data from an internet socket (where you will get varying read() > sizes too). It wouldn't add more than 10 lines to wrap your read in a > loop that exits when your preferred size has been reached. Since you mention a socket, would this patch be a good idea and use kqueue to read from the pipe? I would think that having the kernel fill the buffer, rather then a busy loop kernel/userland would improve speed, but I'm not too familiar with the code to know if this causes any problems. diff -u -r1.191.2.3 sys_pipe.c --- sys_pipe.c 6 Jun 2008 12:17:28 -0000 1.191.2.3 +++ sys_pipe.c 20 Oct 2008 14:04:18 -0000 @@ -1594,7 +1609,10 @@ PIPE_UNLOCK(rpipe); return (1); } - ret = kn->kn_data > 0; + if ( kn->kn_sfflags & NOTE_LOWAT) + ret = kn->kn_data >= kn->kn_sdata; + else + ret = kn->kn_data > 0; PIPE_UNLOCK(rpipe); return ret; } -- Mel From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 21 08:13:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6C451065679; Tue, 21 Oct 2008 08:13:49 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from www61.your-server.de (www61.your-server.de [213.133.104.61]) by mx1.freebsd.org (Postfix) with ESMTP id A4B1C8FC08; Tue, 21 Oct 2008 08:13:49 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from [217.7.243.216] (helo=firewall.demig.intra) by www61.your-server.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1KsBvE-0001sL-Mo; Tue, 21 Oct 2008 09:44:56 +0200 Received: from [192.168.148.72] (ws-pr-3.demig.intra [192.168.148.72]) by firewall.demig.intra (8.14.3/8.14.0) with ESMTP id m9L7i6sg042719; Tue, 21 Oct 2008 09:44:06 +0200 (CEST) (envelope-from nkoch@demig.de) Message-ID: <48FD88B1.3050106@demig.de> Date: Tue, 21 Oct 2008 07:45:53 +0000 From: Norbert Koch Organization: demig Prozessautomatisierung GmbH User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 192.168.148.235 X-Authenticated-Sender: webmaster@demig.de X-Virus-Scanned: Clear (ClamAV 0.94/8457/Tue Oct 21 05:05:55 2008) Cc: Subject: 'libc_r: enter/leave_cancellation_point() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 21 Oct 2008 08:13:50 -0000 Hello, I was just inspecting libc_r for trying to understand some things and found this: <------------------------- --- src/lib/libc_r/uthread/uthread_cond.c 2002/05/24 04:32:28 1.33 +++ src/lib/libc_r/uthread/uthread_cond.c 2002/11/13 18:13:26 1.34 ... int -_pthread_cond_signal(pthread_cond_t * cond) +__pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, + const struct timespec *abstime) +{ + int ret; + + _thread_enter_cancellation_point(); + ret = _pthread_cond_timedwait(cond, mutex, abstime); + _thread_enter_cancellation_point(); + return (ret); +} ----------------------------> Shouldn't that be _thread_leave_cancellation_point() after calling _pthread_cond_timedwait() ? What effect should I see if this is wrong? Best regards, Norbert Koch From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 21 21:04:44 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E496B106567D; Tue, 21 Oct 2008 21:04:44 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id D4A798FC16; Tue, 21 Oct 2008 21:04:44 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 825271A3C3C; Tue, 21 Oct 2008 14:04:44 -0700 (PDT) Date: Tue, 21 Oct 2008 14:04:44 -0700 From: Alfred Perlstein To: Norbert Koch Message-ID: <20081021210444.GB22503@elvis.mu.org> References: <48FD88B1.3050106@demig.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48FD88B1.3050106@demig.de> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, freebsd-threads@freebsd.org Subject: Re: 'libc_r: enter/leave_cancellation_point() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 21 Oct 2008 21:04:45 -0000 Hey Norbert, this is probably a bug, but might not be addressed because libc_r is not really supported any longer. Someone may pick it up, but I'm uncertain of that. * Norbert Koch [081021 01:32] wrote: > Hello, > > I was just inspecting libc_r for trying to understand > some things and found this: > > <------------------------- > > --- src/lib/libc_r/uthread/uthread_cond.c 2002/05/24 04:32:28 1.33 > +++ src/lib/libc_r/uthread/uthread_cond.c 2002/11/13 18:13:26 1.34 > > ... > > int > -_pthread_cond_signal(pthread_cond_t * cond) > +__pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, > + const struct timespec *abstime) > +{ > + int ret; > + > + _thread_enter_cancellation_point(); > + ret = _pthread_cond_timedwait(cond, mutex, abstime); > + _thread_enter_cancellation_point(); > + return (ret); > +} > > > ----------------------------> > > Shouldn't that be _thread_leave_cancellation_point() after > calling _pthread_cond_timedwait() ? > What effect should I see if this is wrong? > > Best regards, > > Norbert Koch > > _______________________________________________ > 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" > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org" -- - Alfred Perlstein From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 21 22:25:11 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40A691065672 for ; Tue, 21 Oct 2008 22:25:11 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id C3D248FC1E for ; Tue, 21 Oct 2008 22:25:10 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1KsPew-0002aS-OZ for freebsd-hackers@freebsd.org; Tue, 21 Oct 2008 22:25:02 +0000 Received: from 200.41.broadband11.iol.cz ([90.178.41.200]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Oct 2008 22:25:02 +0000 Received: from gamato by 200.41.broadband11.iol.cz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Oct 2008 22:25:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: martinko Date: Tue, 21 Oct 2008 23:49:09 +0200 Lines: 59 Message-ID: References: <1216910072.2251.8.camel@jill.exit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 200.41.broadband11.iol.cz User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.17) Gecko/20081009 SeaMonkey/1.1.12 In-Reply-To: Sender: news Cc: freebsd-mobile@freebsd.org Subject: Re: Laptop suggestions? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 21 Oct 2008 22:25:11 -0000 Matt Olander wrote: > On Jul 25, 2008, at 3:23 PM, Jeremy Messenger wrote: > >> On Thu, 24 Jul 2008 09:34:32 -0500, Frank Mayhar wrote: >> >>> My old Dell Inspiron 5160 has developed problems that I can't fix, sigh, >>> so it's time to replace it. I'm hoping for some good suggestions from >>> this list (cc'd to hackers for the exposure, I know everyone doesn't >>> read -mobile). >>> >>> My criteria: >>> * 3D acceleration. >>> * MiniPCI wireless (don't care which card, I'll replace it >>> anyway). >>> * At least 15" screen. >>> * Decent power consumption. >>> * Plays well with FreeBSD 7-stable. >>> >>> Nice to have: >>> * Dual core. >>> * >4GB memory. >>> * Working suspend/hibernate mode (and no, I'm not holding my >>> breath). >>> >>> So, suggestions? BTW, if I get a decent response I'll summarize it for >>> the list, along with the one I chose and my experience after >>> ordering/installing it. >> >> Maybe you can wait for this: >> >> http://www.ixsystems.com/products/bsd-laptop.html > > Hi everyone! I actually had our prototype of this laptop up at the OSCON > show in Portland and it was pretty well received. > Everything works for the most part although we're still tweaking some > things for ACPI. > > I'll have one at the FreeBSD booth at LinuxWorld in San Francisco next > week, August 5-7. We'll announce as soon as this thing is 100% and we're > comfortable bringing the product line up as an item that we're > comfortable supporting long term. Most likely, available to the general > public in September. > > best, > -matt > Hi, I have always thought that Fn key in left most bottom corner of the keyboard is, especially for programmers, a very bad idea. :-( Otherwise it looks very promising although DVI or HDMI video output would be very welcome these days as would be built-in Bluetooth. (Btw thanks for RS232!:)) Cheers, Martin From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 22 11:06:30 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E68C4106566B for ; Wed, 22 Oct 2008 11:06:30 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id A371F8FC0A for ; Wed, 22 Oct 2008 11:06:30 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 9018C6D434; Wed, 22 Oct 2008 11:06:29 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 751CB844A6; Wed, 22 Oct 2008 13:06:29 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: martinko References: <1216910072.2251.8.camel@jill.exit.com> Date: Wed, 22 Oct 2008 13:06:29 +0200 In-Reply-To: (martinko's message of "Tue, 21 Oct 2008 23:49:09 +0200") Message-ID: <86fxmox51m.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: Laptop suggestions? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 22 Oct 2008 11:06:31 -0000 martinko writes: > I have always thought that Fn key in left most bottom corner of the > keyboard is, especially for programmers, a very bad idea. :-( Seconded. Worse still, on my Lenovo T60, if the Fn key is held down longer than a fraction of a second, it generates an input event which just happens to correspond to Gnome's default key binding for the "next track" function in media players... DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 22 17:57:40 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19F491065679 for ; Wed, 22 Oct 2008 17:57:40 +0000 (UTC) (envelope-from kline@thought.org) Received: from aristotle.thought.org (ns1.thought.org [209.180.213.210]) by mx1.freebsd.org (Postfix) with ESMTP id C41E28FC1B for ; Wed, 22 Oct 2008 17:57:39 +0000 (UTC) (envelope-from kline@thought.org) Received: from thought.org (tao.thought.org [10.47.0.250]) (authenticated bits=0) by aristotle.thought.org (8.14.2/8.14.2) with ESMTP id m9MHat5P054203; Wed, 22 Oct 2008 10:36:56 -0700 (PDT) (envelope-from kline@thought.org) Received: by thought.org (nbSMTP-1.00) for uid 1002 kline@thought.org; Wed, 22 Oct 2008 10:36:35 -0700 (PDT) Date: Wed, 22 Oct 2008 10:36:34 -0700 From: Gary Kline To: Dag-Erling =?iso-8859-15?Q?Sm=F8rgrav?= Message-ID: <20081022173634.GA57706@thought.org> References: <1216910072.2251.8.camel@jill.exit.com> <86fxmox51m.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86fxmox51m.fsf@ds4.des.no> User-Agent: Mutt/1.4.2.3i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 22 years of service to the Unix community. X-Spam-Status: No, score=-4.4 required=3.6 tests=ALL_TRUSTED,BAYES_00, DNS_FROM_SECURITYSAGE autolearn=no version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on aristotle.thought.org X-Mailman-Approved-At: Wed, 22 Oct 2008 19:43:02 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: Laptop suggestions? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 22 Oct 2008 17:57:40 -0000 On Wed, Oct 22, 2008 at 01:06:29PM +0200, Dag-Erling Sm?rgrav wrote: > martinko writes: > > I have always thought that Fn key in left most bottom corner of the > > keyboard is, especially for programmers, a very bad idea. :-( > > Seconded. Worse still, on my Lenovo T60, if the Fn key is held down > longer than a fraction of a second, it generates an input event which > just happens to correspond to Gnome's default key binding for the "next > track" function in media players... > I've seen that Fn key, but don't know what it is for. What? you press it, then follow with the integers [ 1, 2, 3 ... ]? At any rate, maybe you can remap the key with ~/.xmodmaprc. -g > DES > -- > Dag-Erling Smørgrav - des@des.no > _______________________________________________ > freebsd-mobile@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mobile > To unsubscribe, send any mail to "freebsd-mobile-unsubscribe@freebsd.org" -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 22 20:06:36 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8C1A106567C for ; Wed, 22 Oct 2008 20:06:36 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id 81B208FC13 for ; Wed, 22 Oct 2008 20:06:36 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m9MK6Z624743; Wed, 22 Oct 2008 13:06:35 -0700 (PDT) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m9MK6KO04273; Wed, 22 Oct 2008 13:06:30 -0700 (PDT) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Wed, 22 Oct 2008 13:06:20 -0700 (PDT) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Gary Kline In-Reply-To: <20081022173634.GA57706@thought.org> Message-ID: References: <1216910072.2251.8.camel@jill.exit.com> <86fxmox51m.fsf@ds4.des.no> <20081022173634.GA57706@thought.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Dag-Erling =?iso-8859-15?Q?Sm=F8rgrav?= , freebsd-mobile@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Laptop suggestions? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 22 Oct 2008 20:06:36 -0000 On Wed, 22 Oct 2008, Gary Kline wrote: > On Wed, Oct 22, 2008 at 01:06:29PM +0200, Dag-Erling Sm?rgrav wrote: >> martinko writes: >>> I have always thought that Fn key in left most bottom corner of the >>> keyboard is, especially for programmers, a very bad idea. :-( >> >> Seconded. Worse still, on my Lenovo T60, if the Fn key is held down >> longer than a fraction of a second, it generates an input event which >> just happens to correspond to Gnome's default key binding for the "next >> track" function in media players... >> > > > I've seen that Fn key, but don't know what it is for. What? you press > it, then follow with the integers [ 1, 2, 3 ... ]? At any rate, maybe > you can remap the key with ~/.xmodmaprc. Fn is usually used on laptop keyboards to allow two logical keys to share a single physical key. For example, see the keyboard pictured at http://www.notebookreview.com/assets/3415.jpg . On the extreme lower right is a key with "->" in white and "End" in blue. Pressing it by itself sends the keycode corresponding to an ordinary keyboard's "->" key. Holding Fn and pressing that key sends the keycode corresponding to an ordinary keyboard's "End" key. On many keyboards, pressing Fn by itself sends no keycode at all, so it cannot be remapped. It is also sometimes used to control hardware features which on a desktop machine might have a different interface. For instance, on the laptop pictured, holding Fn and pressing F6 would increase the screen brightness, probably without sending a keycode. A desktop machine would probably have a button on the monitor itself to do this. -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 22 20:31:46 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AACDC1065671 for ; Wed, 22 Oct 2008 20:31:46 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA08.westchester.pa.mail.comcast.net (qmta08.westchester.pa.mail.comcast.net [76.96.62.80]) by mx1.freebsd.org (Postfix) with ESMTP id 4B7BE8FC19 for ; Wed, 22 Oct 2008 20:31:45 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA12.westchester.pa.mail.comcast.net ([76.96.62.44]) by QMTA08.westchester.pa.mail.comcast.net with comcast id VuVt1a0070xGWP858wXY90; Wed, 22 Oct 2008 20:31:32 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA12.westchester.pa.mail.comcast.net with comcast id VwXj1a00Y2P6wsM3YwXkR9; Wed, 22 Oct 2008 20:31:45 +0000 X-Authority-Analysis: v=1.0 c=1 a=PaapGWNKAAAA:8 a=QycZ5dHgAAAA:8 a=E4h5yzWqICjFJYN03vEA:9 a=1wRA5eh2oMDTXiNzr8YA:7 a=nInNPE0s5XMM8y9498rLfY_-8VYA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id A78D0C9432; Wed, 22 Oct 2008 13:31:43 -0700 (PDT) Date: Wed, 22 Oct 2008 13:31:43 -0700 From: Jeremy Chadwick To: Nate Eldredge Message-ID: <20081022203143.GA67740@icarus.home.lan> References: <1216910072.2251.8.camel@jill.exit.com> <86fxmox51m.fsf@ds4.des.no> <20081022173634.GA57706@thought.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , Gary Kline , freebsd-hackers@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: Laptop suggestions? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 22 Oct 2008 20:31:46 -0000 On Wed, Oct 22, 2008 at 01:06:20PM -0700, Nate Eldredge wrote: > On Wed, 22 Oct 2008, Gary Kline wrote: > >> On Wed, Oct 22, 2008 at 01:06:29PM +0200, Dag-Erling Sm?rgrav wrote: >>> martinko writes: >>>> I have always thought that Fn key in left most bottom corner of the >>>> keyboard is, especially for programmers, a very bad idea. :-( >>> >>> Seconded. Worse still, on my Lenovo T60, if the Fn key is held down >>> longer than a fraction of a second, it generates an input event which >>> just happens to correspond to Gnome's default key binding for the "next >>> track" function in media players... >> >> I've seen that Fn key, but don't know what it is for. What? you press >> it, then follow with the integers [ 1, 2, 3 ... ]? At any rate, maybe >> you can remap the key with ~/.xmodmaprc. > > Fn is usually used on laptop keyboards to allow two logical keys to share > a single physical key. For example, see the keyboard pictured at > http://www.notebookreview.com/assets/3415.jpg . On the extreme lower > right is a key with "->" in white and "End" in blue. Pressing it by > itself sends the keycode corresponding to an ordinary keyboard's "->" > key. Holding Fn and pressing that key sends the keycode corresponding to > an ordinary keyboard's "End" key. On many keyboards, pressing Fn by > itself sends no keycode at all, so it cannot be remapped. > > It is also sometimes used to control hardware features which on a desktop > machine might have a different interface. For instance, on the laptop > pictured, holding Fn and pressing F6 would increase the screen > brightness, probably without sending a keycode. A desktop machine would > probably have a button on the monitor itself to do this. I always figured "Fn" was a good name for the key, given that it resembles the expletive that comes forth from my mouth when intending to hit Control. http://www.notebookreview.com/assets/9328.jpg ;-) -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 22 22:59:50 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E46FB1065671; Wed, 22 Oct 2008 22:59:50 +0000 (UTC) (envelope-from kline@thought.org) Received: from aristotle.thought.org (aristotle.thought.org [209.180.213.210]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2328FC20; Wed, 22 Oct 2008 22:59:50 +0000 (UTC) (envelope-from kline@thought.org) Received: from [10.47.0.250] (tao.thought.org [10.47.0.250]) (authenticated bits=0) by aristotle.thought.org (8.14.2/8.14.2) with ESMTP id m9MN01mO056548; Wed, 22 Oct 2008 16:00:01 -0700 (PDT) (envelope-from kline@thought.org) From: Gary Kline To: Jeremy Chadwick In-Reply-To: <20081022203143.GA67740@icarus.home.lan> References: <1216910072.2251.8.camel@jill.exit.com> <86fxmox51m.fsf@ds4.des.no> <20081022173634.GA57706@thought.org> <20081022203143.GA67740@icarus.home.lan> Content-Type: text/plain Organization: Thought Unlimited Date: Wed, 22 Oct 2008 15:59:40 -0700 Message-Id: <1224716380.58305.44.camel@tao.thought.org> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.6 tests=ALL_TRUSTED,BAYES_00, DNS_FROM_SECURITYSAGE autolearn=no version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on aristotle.thought.org X-Mailman-Approved-At: Wed, 22 Oct 2008 23:20:13 +0000 Cc: Nate Eldredge , Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= , freebsd-mobile@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Laptop suggestions? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kline@thought.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2008 22:59:51 -0000 On Wed, 2008-10-22 at 13:31 -0700, Jeremy Chadwick wrote: > On Wed, Oct 22, 2008 at 01:06:20PM -0700, Nate Eldredge wrote: > > On Wed, 22 Oct 2008, Gary Kline wrote: > > > >> On Wed, Oct 22, 2008 at 01:06:29PM +0200, Dag-Erling Sm?rgrav wrote: > >>> martinko writes: > >>>> I have always thought that Fn key in left most bottom corner of the > >>>> keyboard is, especially for programmers, a very bad idea. :-( > >>> > >>> Seconded. Worse still, on my Lenovo T60, if the Fn key is held down > >>> longer than a fraction of a second, it generates an input event which > >>> just happens to correspond to Gnome's default key binding for the "next > >>> track" function in media players... > >> > >> I've seen that Fn key, but don't know what it is for. What? you press > >> it, then follow with the integers [ 1, 2, 3 ... ]? At any rate, maybe > >> you can remap the key with ~/.xmodmaprc. > > > > Fn is usually used on laptop keyboards to allow two logical keys to share > > a single physical key. For example, see the keyboard pictured at > > http://www.notebookreview.com/assets/3415.jpg . On the extreme lower > > right is a key with "->" in white and "End" in blue. Pressing it by > > itself sends the keycode corresponding to an ordinary keyboard's "->" > > key. Holding Fn and pressing that key sends the keycode corresponding to > > an ordinary keyboard's "End" key. On many keyboards, pressing Fn by > > itself sends no keycode at all, so it cannot be remapped. > > > > It is also sometimes used to control hardware features which on a desktop > > machine might have a different interface. For instance, on the laptop > > pictured, holding Fn and pressing F6 would increase the screen > > brightness, probably without sending a keycode. A desktop machine would > > probably have a button on the monitor itself to do this. Thanks for clearing up a back-of-mind mystery since I bought my 600E in 2003; I kept hitting the "Fn" for the ^ key, and *nothing happened* so I had to re-type the control sequence. It is an ill-planned layout and I'm sure that 'BM has heard about it from us hacker types. --Why this is the best list in the (known) universe. Seriously. > > I always figured "Fn" was a good name for the key, given that it > resembles the expletive that comes forth from my mouth when intending to > hit Control. That ain't that much of a joke, Jeremy. unless I'm at my desk with wrist-rest I can barely reach the back keys. [shoulder problems]. So far I've invented around 7--maybe 8--new profanities. BTW, if that jpeg is a Lenovo, is that a scratch-and-sniff pad below the mouse buttons? (The TPad's *did* need a redesign, but for me, the trakmouse/trakstick/<> was perfect. My left paw went right there.) ...FWIW, I just bought a G41 (3.06GHz) pre-Lenovo. gary > > http://www.notebookreview.com/assets/9328.jpg > > ;-) > From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 23 11:41:36 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EAD11065675; Thu, 23 Oct 2008 11:41:36 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id F1EF68FC1D; Thu, 23 Oct 2008 11:41:35 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id E44AC6D444; Thu, 23 Oct 2008 11:41:34 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id C940E844BA; Thu, 23 Oct 2008 13:41:34 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Gary Kline References: <1216910072.2251.8.camel@jill.exit.com> <86fxmox51m.fsf@ds4.des.no> <20081022173634.GA57706@thought.org> Date: Thu, 23 Oct 2008 13:41:34 +0200 In-Reply-To: <20081022173634.GA57706@thought.org> (Gary Kline's message of "Wed, 22 Oct 2008 10:36:34 -0700") Message-ID: <86fxmn35e9.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: Laptop suggestions? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 23 Oct 2008 11:41:36 -0000 Gary Kline writes: > I've seen that Fn key, but don't know what it is for. What? you press > it, then follow with the integers [ 1, 2, 3 ... ]? At any rate, maybe > you can remap the key with ~/.xmodmaprc. They're used to access keys which won't physically fit on a laptop keyboard, such as the numeric keypad, NumLock, ScrollLock etc., and (along with function keys) to control hardware-specific functions like switching between internal and external display, turning bluetooth and wlan on and off, adjusting the backlight brightness, etc. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 23 13:23:36 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFB791065680; Thu, 23 Oct 2008 13:23:36 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6D7438FC20; Thu, 23 Oct 2008 13:23:36 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 734F36D449; Thu, 23 Oct 2008 13:23:35 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 46923844BA; Thu, 23 Oct 2008 15:23:35 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ian Smith References: <1216910072.2251.8.camel@jill.exit.com> <86fxmox51m.fsf@ds4.des.no> <20081022173634.GA57706@thought.org> <86fxmn35e9.fsf@ds4.des.no> <20081023235822.I4254@sola.nimnet.asn.au> Date: Thu, 23 Oct 2008 15:23:35 +0200 In-Reply-To: <20081023235822.I4254@sola.nimnet.asn.au> (Ian Smith's message of "Fri, 24 Oct 2008 00:08:59 +1100 (EST)") Message-ID: <86od1b1m3s.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Gary Kline , freebsd-mobile@freebsd.org Subject: Re: Laptop suggestions? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 23 Oct 2008 13:23:36 -0000 Ian Smith writes: > Re your original issue, can you get any mileage out of using acpi_ibm,=20 > devd and this post and/or the other one it references: The laptop in question does not run FreeBSD. I gave up running FreeBSD on any sort of desktop or laptop computer years ago. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 23 18:21:57 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 757071065675 for ; Thu, 23 Oct 2008 18:21:57 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx1.freebsd.org (Postfix) with ESMTP id 281608FC16 for ; Thu, 23 Oct 2008 18:21:56 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 23 Oct 2008 11:16:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.33,471,1220252400"; d="scan'208,217";a="395328117" Received: from azsmsx602.amr.corp.intel.com ([10.2.121.201]) by fmsmga002.fm.intel.com with ESMTP; 23 Oct 2008 11:18:16 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.226.211) by azsmsx602.amr.corp.intel.com (10.2.121.201) with Microsoft SMTP Server (TLS) id 8.1.311.2; Thu, 23 Oct 2008 11:21:56 -0700 Received: from orsmsx506.amr.corp.intel.com ([10.22.226.44]) by orsmsx602.amr.corp.intel.com ([10.22.226.211]) with mapi; Thu, 23 Oct 2008 11:21:52 -0700 From: "Murty, Ravi" To: "freebsd-hackers@freebsd.org" Date: Thu, 23 Oct 2008 11:21:49 -0700 Thread-Topic: sched_thread_priority in ULE 8.0 Thread-Index: Ack1PDdG8OBeEr2cQUqIbVyUy7bM2w== Message-ID: <6D5D25EA3941074EB7734E51B166870401DDFA1D@orsmsx506.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: sched_thread_priority in ULE 8.0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 23 Oct 2008 18:21:57 -0000 Hello All, This is something I've been trying to figure out in the last couple of hour= s, but can't seem to understand. Sched_thread_priority() updates a threads priority to "prio". If the thread= is on the RUNQ, we have to pull it out and put it back at a different spot= on the same queue. However, if the thread is currently running, I am missi= ng something. If it is running shouldn't tdq->tdq_lowpri basically be same = as the threads current priority (aka oldpri).. I can't seem to figure out w= hy we need the else if check and a call to tdq_lowpri. If the thread is run= ning and we've boosted the thread's priority, then simply changing tdq_lowp= ri should do it right? I've included part of the sched_thread_priority code below. Thanks Ravi The code is as follows: ... If (prio < tdq->tdq_lowpri) tdq->tdq_lowpri else if (tdq->tdq_lowpri =3D=3D oldpri) tdq_setlowpri(tdq, td); From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 00:52:08 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC1DF106566C for ; Fri, 24 Oct 2008 00:52:08 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id B09358FC0A for ; Fri, 24 Oct 2008 00:52:08 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so564327rvf.43 for ; Thu, 23 Oct 2008 17:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:mime-version:content-type:content-transfer-encoding :content-disposition; bh=Wk8aKVHIT6khd1hZv3rf0FVv14ACMOTvPFJkDtxWyKI=; b=KERq/yjuM1Y4UNuDG5uSu6RfdNwXvvsZVwOggkFOJ/WHB2Z6Mr3udv8ZKHNOAbDTyU pCqwyviLrO/Gol0MxneO/mb5uryu4rOkPBR9vQOTkT2f0jqLrDCFs9azEGiUAJap/CFa FIV5eBwr65+sgK/BE0ZuK1WNTyTIKRyKwpGo8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:mime-version:content-type :content-transfer-encoding:content-disposition; b=Ydr9QUYLGnGy+cL9qrPlpV1EmyICgh3zl63D6knQGUdUyY7HZdz/DD2oORe4GAwBCw ODa/Mltrv5Trdnjh9nJPjxxGjfh7z2bi/jt7hzo/B+ta7Y2Hr4UJfW/ujnc4jSNc613B 5znS49fNyKkFCj2BJmjQv2qH1NrK9pA631wlo= Received: by 10.140.172.20 with SMTP id u20mr782729rve.16.1224808266032; Thu, 23 Oct 2008 17:31:06 -0700 (PDT) Received: by 10.141.43.14 with HTTP; Thu, 23 Oct 2008 17:31:05 -0700 (PDT) Message-ID: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> Date: Thu, 23 Oct 2008 20:31:05 -0400 From: "Alexander Sack" To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: FreeBSD Hackers Subject: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 00:52:08 -0000 Hello: I have some weird behavior I'm trying to figure out and was wondering if someone can point me in the right direction. I'm running a FreeBSD 6.1-RELEASE-amd64 machine. If I add /usr/lib32 to my LD_LIBRARY_PATH it breaks all of my binaries on my 64-bit machine. For example: [root@hagen ~]# file /bin/ls /bin/ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), stripped [root@hagen ~]# ldd /bin/ls /bin/ls: libutil.so.5 => /lib/libutil.so.5 (0x800630000) libncurses.so.6 => /lib/libncurses.so.6 (0x80073d000) libc.so.6 => /lib/libc.so.6 (0x800896000) [root@hagen ~]# ls -l /libexec/ total 306 -r-xr-xr-x 1 root wheel 163864 Aug 21 2007 ld-elf.so.1 -r-xr-xr-x 1 root wheel 146420 Aug 21 2007 ld-elf32.so.1 [root@hagen ~]# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/bin:/usr/lib:/usr/lib32:/usr/lib64 [root@hagen ~]# ls /libexec/ld-elf.so.1: /usr/lib32/libutil.so.5: unsupported file layout [root@hagen ~]# unset LD_LIBRARY_PATH [root@hagen ~]# ls (normal ls output) [root@hagen ~]# ls -l /usr/lib/libut* -r--r--r-- 1 root wheel 100518 Aug 21 2007 /usr/lib/libutil.a lrwxrwxrwx 1 root wheel 17 Sep 11 11:44 /usr/lib/libutil.so -> /lib/libutil.so.5 -r--r--r-- 1 root wheel 103846 Aug 21 2007 /usr/lib/libutil_p.a [root@hagen ~]# file /lib/libutil.so.5 /lib/libutil.so.5: ELF 64-bit LSB shared object, AMD x86-64, version 1 (FreeBSD), stripped I would ASSUME that rtld would look at my LD_LIBRARY_PATH and use /usr/lib to find libraries, not /usr/lib32. Why does it insist on picking /usr/lib32 when "/bin/ls" is CLEARLY a 64-bit binary? This doesn't make complete sense to me just yet. Someone I'm sure is going "don't do that" and I agree. The issue is I'm porting a library/framework (boost) and it creates a runtime LD_LIBRARY_PATH for its gcc toolchain with the above which breaks the build ROYALLY on FreeBSD 64-bit machine. I'm trying to come up with the right heuristic here. Any help would be much appreciated! Thanks! -aps From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 01:05:39 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84C0C1065671 for ; Fri, 24 Oct 2008 01:05:39 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 4112F8FC26 for ; Fri, 24 Oct 2008 01:05:39 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 4B0E56D44C; Fri, 24 Oct 2008 01:05:38 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 394EF844A8; Fri, 24 Oct 2008 03:05:38 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Alexander Sack" References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> Date: Fri, 24 Oct 2008 03:05:38 +0200 In-Reply-To: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> (Alexander Sack's message of "Thu, 23 Oct 2008 20:31:05 -0400") Message-ID: <86hc72x0nx.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers , freebsd-questions@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 01:05:39 -0000 "Alexander Sack" writes: > I have some weird behavior I'm trying to figure out and was wondering > if someone can point me in the right direction. I'm running a FreeBSD > 6.1-RELEASE-amd64 machine. If I add /usr/lib32 to my LD_LIBRARY_PATH > it breaks all of my binaries on my 64-bit machine. > [...] > LD_LIBRARY_PATH=3D$LD_LIBRARY_PATH:/usr/bin:/usr/lib:/usr/lib32:/usr/lib64 I'm surprised you have /usr/bin in there... > I would ASSUME that rtld would look at my LD_LIBRARY_PATH and use > /usr/lib to find libraries, not /usr/lib32. Why does it insist on > picking /usr/lib32 when "/bin/ls" is CLEARLY a 64-bit binary? This > doesn't make complete sense to me just yet. If you look at the rtld(1) man page, there are a number of environment variables you can set to debug the loader. I'm not sure how helpful they are, though. > Someone I'm sure is going "don't do that" and I agree. Well, yeah, but it should (at the very least) fail in a more graceful manner. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 01:23:10 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C3311065670; Fri, 24 Oct 2008 01:23:10 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 2AAAB8FC0C; Fri, 24 Oct 2008 01:23:09 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 015F46D44E; Fri, 24 Oct 2008 01:23:08 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id E5A8A844BA; Fri, 24 Oct 2008 03:23:08 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Alexander Sack" References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <86hc72x0nx.fsf@ds4.des.no> Date: Fri, 24 Oct 2008 03:23:08 +0200 In-Reply-To: <86hc72x0nx.fsf@ds4.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rg?= =?utf-8?Q?rav=22's?= message of "Fri, 24 Oct 2008 03:05:38 +0200") Message-ID: <86d4hqwzur.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers , freebsd-questions@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 01:23:10 -0000 Dag-Erling Sm=C3=B8rgrav writes: > If you look at the rtld(1) man page, there are a number of environment > variables you can set to debug the loader. I'm not sure how helpful > they are, though. You can rebuild rtld(1) with debugging enabled: % cd /usr/src/libexec/rtld-elf % make clean % make DEBUG_FLAGS=3D-DDEBUG % make install % echo $LD_LIBRARY_PATH=20 /home/des/lib:/opt/varnish/lib:/usr/local/lib % LD_DEBUG=3D1 /usr/bin/true /libexec/ld-elf.so.1 is initialized, base address =3D 0x800500000 RTLD dynamic =3D 0x8006305b0 RTLD pltgot =3D 0x0 processing main program's program header Filling in DT_DEBUG entry lm_init("(null)") loading LD_PRELOAD libraries loading needed objects Searching for "libc.so.7" Trying "/home/des/lib/libc.so.7" Trying "/opt/varnish/lib/libc.so.7" Trying "/usr/local/lib/libc.so.7" Trying "/lib/libc.so.7" loading "/lib/libc.so.7" Ignoring d_tag 1879048185 =3D 0x6ffffff9 0x80063b000 .. 0x80085efff: /lib/libc.so.7 checking for required versions initializing initial thread local storage relocating "/usr/bin/true" relocating "/lib/libc.so.7" doing copy relocations initializing key program variables "__progname": *0x5005e8 <-- 0x7fffffffebc1 "environ": *0x500878 <-- 0x7fffffffe9a8 initializing thread locks calling init function for /lib/libc.so.7 at 0x800664da8 "__sysctl" in "libc.so.7" =3D=3D> 0x80071ae00 in "libc.so.7" reloc_jmpslot: *0x800845c78 =3D 0x80071ae00 transferring control to program entry point =3D 0x400420 "atexit" in "true" =3D=3D> 0x8006fac3e in "libc.so.7" reloc_jmpslot: *0x500868 =3D 0x8006fac3e "exit" in "true" =3D=3D> 0x8006af118 in "libc.so.7" reloc_jmpslot: *0x500860 =3D 0x8006af118 "__cxa_finalize" in "libc.so.7" =3D=3D> 0x8006fa940 in "libc.so.7" reloc_jmpslot: *0x800846140 =3D 0x8006fa940 rtld_exit() calling fini function for /lib/libc.so.7 at 0x80071ae60 "_exit" in "libc.so.7" =3D=3D> 0x8006cfff0 in "libc.so.7" reloc_jmpslot: *0x8008471d8 =3D 0x8006cfff0 DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 01:48:48 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88338106567A for ; Fri, 24 Oct 2008 01:48:48 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.226]) by mx1.freebsd.org (Postfix) with ESMTP id 54B5D8FC0C for ; Fri, 24 Oct 2008 01:48:48 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so583096rvf.43 for ; Thu, 23 Oct 2008 18:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=SMMVLKEc+XRyEOupMmcta1KpSbjw85U+8lO/Vov6WwM=; b=f5QyguVF14hJdAmYuOG1sQ1m2UGFIRggGMXJdk5ydOoxVRXQNhKlTXLFRAbxNKpmZ+ 8dMMmlT4hhiAQTsVVjKCRD72BbvOq1aE1s/dLqMChOvcyypGXx7kDG1MTyY52OfVyDz1 QOElnnpWWbE/Dw0noJHxdCkDLX+AkEC28fY6w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=FrFQCX8UQvlWAIx2vfGM/iLzWtugLoTLo678YuboCgGBh3MtsN51v+Rlc8t4FUI9Iy nt9GdnQ4LSo3b8QVPvIwsHOfNbpdasMRKXiPlmh2rZSkyoxaDb7fu6GPUCmGcaN+SpNu kppbhY105LrSROIdyKRmZVHyM1ny6S0ETluYs= Received: by 10.141.88.3 with SMTP id q3mr814602rvl.46.1224812927543; Thu, 23 Oct 2008 18:48:47 -0700 (PDT) Received: by 10.141.43.14 with HTTP; Thu, 23 Oct 2008 18:48:47 -0700 (PDT) Message-ID: <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> Date: Thu, 23 Oct 2008 21:48:47 -0400 From: "Alexander Sack" To: "=?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?=" In-Reply-To: <86d4hqwzur.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <86hc72x0nx.fsf@ds4.des.no> <86d4hqwzur.fsf@ds4.des.no> Cc: FreeBSD Hackers , freebsd-questions@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 01:48:48 -0000 On Thu, Oct 23, 2008 at 9:23 PM, Dag-Erling Sm=F8rgrav wrote: > Dag-Erling Sm=F8rgrav writes: >> If you look at the rtld(1) man page, there are a number of environment >> variables you can set to debug the loader. I'm not sure how helpful >> they are, though. > > You can rebuild rtld(1) with debugging enabled: > > % cd /usr/src/libexec/rtld-elf > % make clean > % make DEBUG_FLAGS=3D-DDEBUG > % make install > % echo $LD_LIBRARY_PATH > /home/des/lib:/opt/varnish/lib:/usr/local/lib > % LD_DEBUG=3D1 /usr/bin/true > /libexec/ld-elf.so.1 is initialized, base address =3D 0x800500000 > RTLD dynamic =3D 0x8006305b0 > RTLD pltgot =3D 0x0 > processing main program's program header > Filling in DT_DEBUG entry > lm_init("(null)") > loading LD_PRELOAD libraries > loading needed objects > Searching for "libc.so.7" > Trying "/home/des/lib/libc.so.7" > Trying "/opt/varnish/lib/libc.so.7" > Trying "/usr/local/lib/libc.so.7" > Trying "/lib/libc.so.7" > loading "/lib/libc.so.7" > Ignoring d_tag 1879048185 =3D 0x6ffffff9 > 0x80063b000 .. 0x80085efff: /lib/libc.so.7 > checking for required versions > initializing initial thread local storage > relocating "/usr/bin/true" > relocating "/lib/libc.so.7" > doing copy relocations > initializing key program variables > "__progname": *0x5005e8 <-- 0x7fffffffebc1 > "environ": *0x500878 <-- 0x7fffffffe9a8 > initializing thread locks > calling init function for /lib/libc.so.7 at 0x800664da8 > "__sysctl" in "libc.so.7" =3D=3D> 0x80071ae00 in "libc.so.7" > reloc_jmpslot: *0x800845c78 =3D 0x80071ae00 > transferring control to program entry point =3D 0x400420 > "atexit" in "true" =3D=3D> 0x8006fac3e in "libc.so.7" > reloc_jmpslot: *0x500868 =3D 0x8006fac3e > "exit" in "true" =3D=3D> 0x8006af118 in "libc.so.7" > reloc_jmpslot: *0x500860 =3D 0x8006af118 > "__cxa_finalize" in "libc.so.7" =3D=3D> 0x8006fa940 in "libc.so.7" > reloc_jmpslot: *0x800846140 =3D 0x8006fa940 > rtld_exit() > calling fini function for /lib/libc.so.7 at 0x80071ae60 > "_exit" in "libc.so.7" =3D=3D> 0x8006cfff0 in "libc.so.7" > reloc_jmpslot: *0x8008471d8 =3D 0x8006cfff0 > > DES > -- > Dag-Erling Sm=F8rgrav - des@des.no Thanks, comments most appreciated. Damn, I was looking for someone to go "a ha, you can't do this because...." Alright, let me see why rtld on 6.1-amd64 is picking up /usr/lib32 stuff for a native 64-bit binary via debugging techniques. This seems very very wrong to me. I mean if /usr/lib is in my LD_LIBRARY_PATH and it comes before /usr/lib the /usr/lib32 *should* be innocuous, right? Feel free to use that last statement on my epitaph! :D -aps From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 02:10:42 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F03CB1065671 for ; Fri, 24 Oct 2008 02:10:42 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id A6A198FC1B for ; Fri, 24 Oct 2008 02:10:42 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so590462rvf.43 for ; Thu, 23 Oct 2008 19:10:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=l+QcWZdOnhI+DWem+pykPzisXowHsouuP3b7HJJRpws=; b=NWkvNYPq9uvnzG8V4fpDuCsIU1T64h0ZbZPGjHo3QBv+C1zymfnnnh8At+pU7ET+Wg +xflOGs8UiS3MCB8ekFdT22qzKZZ1aHltwoDy8E7XA2doBXviikgKFdHrD+EbLie7L+n iJj+S8ydC+9q+Rxbj7TIksl3dK2Uo7EkddtCk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=I3k1Y3m+yFBr+RDrvEqfYEKOc71NZkzlVZuBALakCAug36cSOkB3fzb7yQzwvG+B4w E3NKRYMLlFIuAV/awhqmQI0gPcXRS3l1MxUDjjFpL+YAWDdgnp5ewZ4QuF6XBie26912 upAHARC7qrKSMZe8S4bL4bnS7NtukMzOuPvJQ= Received: by 10.140.139.3 with SMTP id m3mr828088rvd.44.1224814242116; Thu, 23 Oct 2008 19:10:42 -0700 (PDT) Received: by 10.141.43.14 with HTTP; Thu, 23 Oct 2008 19:10:42 -0700 (PDT) Message-ID: <3c0b01820810231910u59f97cecg8b01f391a9b353f3@mail.gmail.com> Date: Thu, 23 Oct 2008 22:10:42 -0400 From: "Alexander Sack" To: "=?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?=" In-Reply-To: <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <86hc72x0nx.fsf@ds4.des.no> <86d4hqwzur.fsf@ds4.des.no> <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> Cc: FreeBSD Hackers , freebsd-questions@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 02:10:43 -0000 Alright, well I found some weirdness: [root@hagen ~]# export LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64 [root@hagen ~]# LD_DEBUG=1 ls /libexec/ld-elf.so.1 is initialized, base address = 0x800506000 RTLD dynamic = 0x80062ad78 RTLD pltgot = 0x0 processing main program's program header Filling in DT_DEBUG entry lm_init("(null)") loading LD_PRELOAD libraries loading needed objects Searching for "libutil.so.5" Trying "/usr/bin/libutil.so.5" Trying "/usr/lib/libutil.so.5" Trying "/usr/lib32/libutil.so.5" loading "/usr/lib32/libutil.so.5" /libexec/ld-elf.so.1: /usr/lib32/libutil.so.5: unsupported file layout That's because libutil.so.5 does not exist in /usr/lib only in /lib. The /usr/lib directory has: [root@hagen ~]# ls -l /usr/lib/libutil* -r--r--r-- 1 root wheel 100518 Aug 21 2007 /usr/lib/libutil.a lrwxrwxrwx 1 root wheel 17 Sep 11 11:44 /usr/lib/libutil.so -> /lib/libutil.so.5 -r--r--r-- 1 root wheel 103846 Aug 21 2007 /usr/lib/libutil_p.a So rtld is looking for major number 5 of libutil, without the standard /lib in my LD_LIBRARY_PATH it searches /usr/lib, doesn't find it but: [root@hagen ~]# ls -l /usr/lib32/libutil* -r--r--r-- 1 root wheel 65274 Aug 21 2007 /usr/lib32/libutil.a lrwxrwxrwx 1 root wheel 12 Sep 11 11:45 /usr/lib32/libutil.so -> libutil.so.5 -r--r--r-- 1 root wheel 46872 Aug 21 2007 /usr/lib32/libutil.so.5 -r--r--r-- 1 root wheel 66918 Aug 21 2007 /usr/lib32/libutil_p.a And whalah, I'm broke since there is a libutil.so.5 in there. So my question to anyone out there, WHY does /usr/lib32 contain major numbers but /usr/lib does not? This seems like a bug to me (FreeBSD 7.0-RELEASE is the same) or at least a dubious design decision. Thanks! -aps From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 02:31:41 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D634A1065699 for ; Fri, 24 Oct 2008 02:31:41 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.232]) by mx1.freebsd.org (Postfix) with ESMTP id A53C98FC1D for ; Fri, 24 Oct 2008 02:31:41 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so597956rvf.43 for ; Thu, 23 Oct 2008 19:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=5Z1PDB75nctmP/Wk6mjmQ56TY4BzeuAJ8fxl/My/hJw=; b=ayl2eley3aLGgrYQ5Fo6kPZd7P7qwJ6uONUz1+zXHLuPX6Gy7z2Ee/RDnT8M7iTIAv PKLadv33RRb8unhL0acfYbr8v56pWtQC1z637iIbuPiO7HnzloU8iXmU8yoYxjKglBsW di0/xaP63arjq0vziKOItQKZ8eN52hGHCtWTg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=ZEqOz+fIycrX9rt/jVPmd4H/gyys5ZC/AtezlMvTDSJ/6mqeKzbESrSCS36XX1eBlS XeZl8PUGm+P4iBKzQPIit4nr6Dxi8z2/IdfMdwCHBKWfqFYJPSDs4k8/TM+1HeJfY1Ab D0wN0cy6p/EC7nUPgksQueBBKcSjx2pdDVDqM= Received: by 10.141.28.4 with SMTP id f4mr834288rvj.66.1224815500641; Thu, 23 Oct 2008 19:31:40 -0700 (PDT) Received: by 10.141.43.14 with HTTP; Thu, 23 Oct 2008 19:31:40 -0700 (PDT) Message-ID: <3c0b01820810231931p2acbf426m7f1b94b73b466e5d@mail.gmail.com> Date: Thu, 23 Oct 2008 22:31:40 -0400 From: "Alexander Sack" To: "Alexander Kabaev" In-Reply-To: <20081023220949.7f304bbb@kan.dnsalias.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <86hc72x0nx.fsf@ds4.des.no> <86d4hqwzur.fsf@ds4.des.no> <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> <20081023220949.7f304bbb@kan.dnsalias.net> Cc: FreeBSD Hackers , freebsd-questions@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 02:31:42 -0000 On Thu, Oct 23, 2008 at 10:09 PM, Alexander Kabaev wrote: > On Thu, 23 Oct 2008 21:48:47 -0400 > "Alexander Sack" wrote: > >> Thanks, comments most appreciated. Damn, I was looking for someone to >> go "a ha, you can't do this because...." Alright, let me see why rtld >> on 6.1-amd64 is picking up /usr/lib32 stuff for a native 64-bit binary >> via debugging techniques. This seems very very wrong to me. I mean if >> /usr/lib is in my LD_LIBRARY_PATH and it comes before /usr/lib the >> /usr/lib32 *should* be innocuous, right? >> >> Feel free to use that last statement on my epitaph! :D >> > LD_LIBRARY_PATH is for native 64bit rtld. If you want a specific path > added for use by 32-bit ld-elf.so.1 only, use LD_32_LIBRARY_PATH. > > Said that, your problem is likely caused by the fact that there is > no /lib32, only /usr/lib32. So if 64-bit library lives in /lib, > your LD_LIBRARY_PATH will cause loader to find its 32-bit equivalent > in /usr/lib32 first. > > Try LD_LIBRARY_PATH=/lib:/usr/lib:/usr/lib32:/usr/lib64 for better > results. Yes I figured that out on my own but my question still exists, why isn't /usr/lib similar in format to /usr/lib32 though with respect to major numbers? Actually now that I re-read your paragraph I suppose this isn't such a bad idea but for some reason I believe that if you have /usr/lib before /usr/lib32 it should *just* work. -aps From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 02:41:42 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0768D1065672 for ; Fri, 24 Oct 2008 02:41:42 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.231]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8BB8FC1D for ; Fri, 24 Oct 2008 02:41:41 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by wx-out-0506.google.com with SMTP id s17so316532wxc.7 for ; Thu, 23 Oct 2008 19:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=sUrlXDL3Tg1S1uwk5aD4DSEXKbqXPHzwn/hKfylmZ2k=; b=gBBmjM4KEw+H6YZHj1YQDR8zQHtJx8Mhgx99WMJRLvLkSoill6+Z+ynnQpZBU0ij4D BqEfqUK5ytVCbD+GZDnWq7G2FcMDJQXHK2FbsHNPs1mZkAZlImsMvYEin4E/jyYGWHMk X9V5Dx6q7sTMykA4UqNAKW3AehWI8qrL3P4GE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=PXayllkePVi/Ev9+07C32jHX3BPltPvegHRQkIiLQFMutndZKyM55cJBFcyj58cqG+ jCohFLYjywmBaIN5EBCc8x6HFKIHIH162+NfHwznOzk6/raNoPiny4vyRshrBxvCbW8H Mo8Gq5lQJ3LdTOXXMd7U+DEF25+Fbk32jGugQ= Received: by 10.100.225.19 with SMTP id x19mr1696689ang.122.1224814195034; Thu, 23 Oct 2008 19:09:55 -0700 (PDT) Received: from kan.dnsalias.net (c-24-62-106-68.hsd1.ma.comcast.net [24.62.106.68]) by mx.google.com with ESMTPS id 3sm16109651wrh.28.2008.10.23.19.09.53 (version=SSLv3 cipher=RC4-MD5); Thu, 23 Oct 2008 19:09:54 -0700 (PDT) Date: Thu, 23 Oct 2008 22:09:49 -0400 From: Alexander Kabaev To: "Alexander Sack" Message-ID: <20081023220949.7f304bbb@kan.dnsalias.net> In-Reply-To: <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <86hc72x0nx.fsf@ds4.des.no> <86d4hqwzur.fsf@ds4.des.no> <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/EFRs6CU3QFz3aSwJJ.mTct7"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= , freebsd-questions@freebsd.org, FreeBSD Hackers Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 02:41:42 -0000 --Sig_/EFRs6CU3QFz3aSwJJ.mTct7 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 23 Oct 2008 21:48:47 -0400 "Alexander Sack" wrote: > Thanks, comments most appreciated. Damn, I was looking for someone to > go "a ha, you can't do this because...." Alright, let me see why rtld > on 6.1-amd64 is picking up /usr/lib32 stuff for a native 64-bit binary > via debugging techniques. This seems very very wrong to me. I mean if > /usr/lib is in my LD_LIBRARY_PATH and it comes before /usr/lib the > /usr/lib32 *should* be innocuous, right? >=20 > Feel free to use that last statement on my epitaph! :D >=20 LD_LIBRARY_PATH is for native 64bit rtld. If you want a specific path added for use by 32-bit ld-elf.so.1 only, use LD_32_LIBRARY_PATH. Said that, your problem is likely caused by the fact that there is no /lib32, only /usr/lib32. So if 64-bit library lives in /lib, your LD_LIBRARY_PATH will cause loader to find its 32-bit equivalent in /usr/lib32 first. Try LD_LIBRARY_PATH=3D/lib:/usr/lib:/usr/lib32:/usr/lib64 for better results. --=20 Alexander Kabaev --Sig_/EFRs6CU3QFz3aSwJJ.mTct7 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFJAS5tQ6z1jMm+XZYRArJFAKCLkEhe+8rvhDJNde+5gEWQ9C69HACgrAb5 H58IX88GLZ5wBNRljWD/XEQ= =zTke -----END PGP SIGNATURE----- --Sig_/EFRs6CU3QFz3aSwJJ.mTct7-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 02:49:03 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B45F11065672 for ; Fri, 24 Oct 2008 02:49:03 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id 819318FC12 for ; Fri, 24 Oct 2008 02:49:03 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m9O2n1611021; Thu, 23 Oct 2008 19:49:01 -0700 (PDT) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m9O2n1o12185; Thu, 23 Oct 2008 19:49:01 -0700 (PDT) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Thu, 23 Oct 2008 19:49:01 -0700 (PDT) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Alexander Sack In-Reply-To: <3c0b01820810231910u59f97cecg8b01f391a9b353f3@mail.gmail.com> Message-ID: References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <86hc72x0nx.fsf@ds4.des.no> <86d4hqwzur.fsf@ds4.des.no> <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> <3c0b01820810231910u59f97cecg8b01f391a9b353f3@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , freebsd-questions@freebsd.org, FreeBSD Hackers Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 02:49:03 -0000 On Thu, 23 Oct 2008, Alexander Sack wrote: > Alright, well I found some weirdness: > > [root@hagen ~]# export LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64 > [root@hagen ~]# LD_DEBUG=1 ls > /libexec/ld-elf.so.1 is initialized, base address = 0x800506000 > RTLD dynamic = 0x80062ad78 > RTLD pltgot = 0x0 > processing main program's program header > Filling in DT_DEBUG entry > lm_init("(null)") > loading LD_PRELOAD libraries > loading needed objects > Searching for "libutil.so.5" > Trying "/usr/bin/libutil.so.5" > Trying "/usr/lib/libutil.so.5" > Trying "/usr/lib32/libutil.so.5" > loading "/usr/lib32/libutil.so.5" > /libexec/ld-elf.so.1: /usr/lib32/libutil.so.5: unsupported file layout > > That's because libutil.so.5 does not exist in /usr/lib only in /lib. > The /usr/lib directory has: > > [root@hagen ~]# ls -l /usr/lib/libutil* > -r--r--r-- 1 root wheel 100518 Aug 21 2007 /usr/lib/libutil.a > lrwxrwxrwx 1 root wheel 17 Sep 11 11:44 /usr/lib/libutil.so -> > /lib/libutil.so.5 > -r--r--r-- 1 root wheel 103846 Aug 21 2007 /usr/lib/libutil_p.a > > So rtld is looking for major number 5 of libutil, without the standard > /lib in my LD_LIBRARY_PATH it searches /usr/lib, doesn't find it but: > > [root@hagen ~]# ls -l /usr/lib32/libutil* > -r--r--r-- 1 root wheel 65274 Aug 21 2007 /usr/lib32/libutil.a > lrwxrwxrwx 1 root wheel 12 Sep 11 11:45 /usr/lib32/libutil.so -> > libutil.so.5 > -r--r--r-- 1 root wheel 46872 Aug 21 2007 /usr/lib32/libutil.so.5 > -r--r--r-- 1 root wheel 66918 Aug 21 2007 /usr/lib32/libutil_p.a > > And whalah, I'm broke since there is a libutil.so.5 in there. > > So my question to anyone out there, WHY does /usr/lib32 contain major > numbers but /usr/lib does not? This seems like a bug to me (FreeBSD > 7.0-RELEASE is the same) or at least a dubious design decision. I think the distinction is this. rtld is looking for libutil.so.5 (with version number). This file has to be in /lib, in the root filesystem, so that programs can run before /usr is mounted. libutil.so on the other hand is not searched for by rtld, but by ld (driven by cc), when the program is built. /usr/lib is the traditional place for it to search; I'm not sure if it searches /lib at all. In the case of static libraries, /usr/lib is certainly the right place for libutil.a to go, so having libutil.so there makes sense in my mind. I think your best bet is to dig into whatever is setting LD_LIBRARY_PATH and get it set correctly. Remove /usr/lib32 or at least ensure that /lib is searched first. Trying to change rtld's behavior is not the right approach, IMHO. -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 03:07:41 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D721E1065672 for ; Fri, 24 Oct 2008 03:07:41 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 9866F8FC12 for ; Fri, 24 Oct 2008 03:07:41 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id m9O37e6k057623 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 23 Oct 2008 22:07:41 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id m9O33tdm046833; Thu, 23 Oct 2008 22:03:55 -0500 (CDT) (envelope-from dan) Date: Thu, 23 Oct 2008 22:03:54 -0500 From: Dan Nelson To: Alexander Sack Message-ID: <20081024030354.GA41283@dan.emsphone.com> References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <86hc72x0nx.fsf@ds4.des.no> <86d4hqwzur.fsf@ds4.des.no> <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> <20081023220949.7f304bbb@kan.dnsalias.net> <3c0b01820810231931p2acbf426m7f1b94b73b466e5d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3c0b01820810231931p2acbf426m7f1b94b73b466e5d@mail.gmail.com> X-OS: FreeBSD 7.1-PRERELEASE User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Hackers , freebsd-questions@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 03:07:41 -0000 In the last episode (Oct 23), Alexander Sack said: > On Thu, Oct 23, 2008 at 10:09 PM, Alexander Kabaev wrote: > > LD_LIBRARY_PATH is for native 64bit rtld. If you want a specific > > path added for use by 32-bit ld-elf.so.1 only, use > > LD_32_LIBRARY_PATH. > > > > Said that, your problem is likely caused by the fact that there is > > no /lib32, only /usr/lib32. So if 64-bit library lives in /lib, > > your LD_LIBRARY_PATH will cause loader to find its 32-bit > > equivalent in /usr/lib32 first. > > > > Try LD_LIBRARY_PATH=/lib:/usr/lib:/usr/lib32:/usr/lib64 for better > > results. > > Yes I figured that out on my own but my question still exists, why > isn't /usr/lib similar in format to /usr/lib32 though with respect to > major numbers? Ever since the switch from static to dynamic-linked /bin and /sbin, some shared libraries are needed during the boot process. Those libraries live in /lib, and since there are no 32-bit binaries required to boot a 64-bit system, there is no need for a /lib32. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 09:05:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E7091065682 for ; Fri, 24 Oct 2008 09:05:35 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.freebsd.org (Postfix) with ESMTP id 1C10E8FC12 for ; Fri, 24 Oct 2008 09:05:34 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1KtIbt-000PhA-HW for freebsd-hackers@freebsd.org; Fri, 24 Oct 2008 11:05:33 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: FreeBSD Hackers Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 24 Oct 2008 11:05:33 +0200 From: Danny Braniss Message-ID: Subject: zfs & waiting on zio->io_cv X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 09:05:35 -0000 there is a big delay (probably more than 1 sec.) when doing simple tasks on this zfs, like ls(1), or 'zfs list', long enough to hit ^T and get the same [zio->io_cv)], any hints? store-01# zfs list (hitting ^T)load: 0.00 cmd: zfs 88376 [zio->io_cv)] 0.00u 0.00s 0% 1672k (hitting ^T)load: 0.00 cmd: zfs 88376 [zio->io_cv)] 0.00u 0.00s 0% 1684k NAME USED AVAIL REFER MOUNTPOINT h 472G 11.2T 23K /h h/home 466G 11.2T 466G /h/home h/home@23-10-08 54K - 466G - h/root 18K 11.2T 18K /h/root h/src 18K 11.2T 18K /h/src h/system 5.64G 11.2T 5.64G /h/system cheers, danny From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 08:43:14 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80F8A1065673; Fri, 24 Oct 2008 08:43:14 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id A53378FC20; Fri, 24 Oct 2008 08:43:13 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.2) with ESMTP id m9O8h5uh021616; Fri, 24 Oct 2008 10:43:05 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.2/Submit) with ESMTP id m9O8h4J2021613; Fri, 24 Oct 2008 10:43:05 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Fri, 24 Oct 2008 10:43:04 +0200 (CEST) From: Wojciech Puchar To: Alexander Sack In-Reply-To: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> Message-ID: <20081024104232.X21603@wojtek.tensor.gdynia.pl> References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Fri, 24 Oct 2008 11:19:47 +0000 Cc: FreeBSD Hackers , freebsd-questions@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 08:43:14 -0000 > 6.1-RELEASE-amd64 machine. If I add /usr/lib32 to my LD_LIBRARY_PATH > it breaks all of my binaries on my 64-bit machine. what do you expect else? this will make system trying to bind 32-bit libs to 64-bit program. it can't work From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 12:51:06 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7D2B10656A5; Fri, 24 Oct 2008 12:51:06 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by mx1.freebsd.org (Postfix) with ESMTP id BD0E48FC1C; Fri, 24 Oct 2008 12:51:05 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c122-106-215-175.belrs3.nsw.optusnet.com.au [122.106.215.175]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m9OCp03M017017 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 24 Oct 2008 23:51:03 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id m9OCoxSS073179; Fri, 24 Oct 2008 23:50:59 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id m9OCoxiX073178; Fri, 24 Oct 2008 23:50:59 +1100 (EST) (envelope-from peter) Date: Fri, 24 Oct 2008 23:50:59 +1100 From: Peter Jeremy To: Wojciech Puchar Message-ID: <20081024125059.GE1137@server.vk2pj.dyndns.org> References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <20081024104232.X21603@wojtek.tensor.gdynia.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZfOjI3PrQbgiZnxM" Content-Disposition: inline In-Reply-To: <20081024104232.X21603@wojtek.tensor.gdynia.pl> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Alexander Sack , FreeBSD Hackers , freebsd-questions@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 12:51:06 -0000 --ZfOjI3PrQbgiZnxM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2008-Oct-24 10:43:04 +0200, Wojciech Puchar wrote: >> 6.1-RELEASE-amd64 machine. If I add /usr/lib32 to my LD_LIBRARY_PATH >> it breaks all of my binaries on my 64-bit machine. > >what do you expect else? Well, the rtld should be smart enough to recognize 32-bit .so's and skip them when binding a 64-bit executable. Whilst having /usr/lib32 in LD_LIBRARY_PATH doesn't make sense from a solely FreeBSD perspective, I have done similar things when writing cross-platform scripts (to avoid having to use platform-dependent code). >this will make system trying to bind 32-bit libs to 64-bit program. it=20 >can't work rtld shouldn't attempt to bind 32-bit libs to 64-bit programs. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --ZfOjI3PrQbgiZnxM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkBxLMACgkQ/opHv/APuIfQ5wCfZ63ktz3M4mKAUvDQU7LgYV7T 3pgAnRVr96FniAD8AqwK5Ov4JhN45qvH =t3f0 -----END PGP SIGNATURE----- --ZfOjI3PrQbgiZnxM-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 14:05:27 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03FA5106567D for ; Fri, 24 Oct 2008 14:05:27 +0000 (UTC) (envelope-from george@m5p.com) Received: from mailhost.m5p.com (unknown [IPv6:2001:418:3fd::2]) by mx1.freebsd.org (Postfix) with ESMTP id CD6608FC2E for ; Fri, 24 Oct 2008 14:05:26 +0000 (UTC) (envelope-from george@m5p.com) Received: from m5p.com (mailhost.m5p.com [IPv6:2001:418:3fd::f7]) by mailhost.m5p.com (8.13.8/8.13.8) with ESMTP id m9OE5Kgr026038 for ; Fri, 24 Oct 2008 10:05:25 -0400 (EDT) Received: (from george@localhost) by m5p.com (8.13.8/8.13.7/Submit) id m9OE4oYl026020; Fri, 24 Oct 2008 10:04:50 -0400 (EDT) Date: Fri, 24 Oct 2008 10:04:50 -0400 (EDT) Message-Id: <200810241404.m9OE4oYl026020@m5p.com> From: george+freebsd@m5p.com To: freebsd-hackers@freebsd.org X-Spam-Score: -0.001 () NO_RELAYS X-Scanned-By: MIMEDefang 2.57 on IPv6:2001:418:3fd::f7 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (mailhost.m5p.com [IPv6:2001:418:3fd::f7]); Fri, 24 Oct 2008 10:05:25 -0400 (EDT) Subject: Severe DNS Problems, 6.2-RELEASE, BIND 9.5.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2008 14:05:27 -0000 I'm having severe DNS problems. I'm running 6.2-RELEASE, and I upgraded to the bind9 port (after cvsup) on July 14. Starting yesterday morning, DNS became very, very slow. If I repeated a "dig" command three or four times, I could get an answer after 20-30 seconds. This morning I cvsupped again and installed the bind95 port. Still very, very slow. I will probably shift my server to a FreeBSD 7.0 system this weekend, but I would like very much to understand what's going on. -- George Mitchell From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 15:09:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69D581065679 for ; Fri, 24 Oct 2008 15:09:19 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 2F9598FC1B for ; Fri, 24 Oct 2008 15:09:19 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id m9OF9IfI054288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 24 Oct 2008 10:09:18 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id m9OF9HT7054248; Fri, 24 Oct 2008 10:09:17 -0500 (CDT) (envelope-from dan) Date: Fri, 24 Oct 2008 10:09:16 -0500 From: Dan Nelson To: Danny Braniss Message-ID: <20081024150916.GB41283@dan.emsphone.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 7.1-PRERELEASE User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Hackers Subject: Re: zfs & waiting on zio->io_cv X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 15:09:19 -0000 In the last episode (Oct 24), Danny Braniss said: > there is a big delay (probably more than 1 sec.) when doing simple tasks > on this zfs, like ls(1), or 'zfs list', long enough to hit ^T > and get the same [zio->io_cv)], any hints? > > store-01# zfs list > (hitting ^T)load: 0.00 cmd: zfs 88376 [zio->io_cv)] 0.00u 0.00s 0% 1672k > (hitting ^T)load: 0.00 cmd: zfs 88376 [zio->io_cv)] 0.00u 0.00s 0% 1684k > NAME USED AVAIL REFER MOUNTPOINT > h 472G 11.2T 23K /h > h/home 466G 11.2T 466G /h/home > h/home@23-10-08 54K - 466G - > h/root 18K 11.2T 18K /h/root > h/src 18K 11.2T 18K /h/src > h/system 5.64G 11.2T 5.64G /h/system That's sort of the equivalent to waiting in "biord" on a UFS filesystem, I think. ZFS is just waiting for the disk to return a block. If you happen to do something during the window where ZFS is commiting its transaction group, it has to wait until the sync finishes. If some other process is doing a lot of writes, or you only have one disk in your zpool, or your pool is close to full, it may take a couple seconds to sync. There's a couple of things you can try to improve interactive performance. Raising zfs's arc_max is the easiest to do, and will let ZFS cache more stuff, increasing the likelyhood that an "ls" will be able to read from cache instead of having to go to disk. Setting it at 1/4 your physical RAM is probably as high as you can go without causing panics. Raising txg_time ( in /sys/cddl/.../zfs/txg.c ) from 5 to say 30 will tell zfs to sync less often, which can be a win if you don't actually do that much writing. With a single spindle, it may take a substantial fraction of a second just to sync a tiny txg due to the number of copies of metadata ZFS writes for redundancy. If you do a lot of writing, lowering zfs_vdev_max_pending ( in /sys/cddl/.../zfs/vdev_queue.c ) from 35 down to 16 or less will reduce the number of simultaneous I/Os ZFS will try to send to each disk, which will let your reads compete a little better with other I/O. On ATA or SATA disks, you might want to set it to 2. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 16:36:59 2008 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 88FBC1065685; Fri, 24 Oct 2008 16:36:59 +0000 (UTC) (envelope-from thierry@herbelot.com) Received: from postfix2-g20.free.fr (postfix2-g20.free.fr [212.27.60.43]) by mx1.freebsd.org (Postfix) with ESMTP id 409748FC08; Fri, 24 Oct 2008 16:36:59 +0000 (UTC) (envelope-from thierry@herbelot.com) Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by postfix2-g20.free.fr (Postfix) with ESMTP id A88572C108F2; Fri, 24 Oct 2008 16:18:59 +0200 (CEST) Received: from smtp6-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp6-g19.free.fr (Postfix) with ESMTP id 8968217EB7; Fri, 24 Oct 2008 18:19:13 +0200 (CEST) Received: from mail.herbelot.nom (bne75-4-82-227-159-103.fbx.proxad.net [82.227.159.103]) by smtp6-g19.free.fr (Postfix) with ESMTP id 4BF3A17824; Fri, 24 Oct 2008 18:19:02 +0200 (CEST) Received: from diversion.herbelot.nom (diversion.herbelot.nom [192.168.2.6]) by mail.herbelot.nom (8.14.1/8.14.1) with ESMTP id m9OGIhoU028626; Fri, 24 Oct 2008 18:18:44 +0200 (CEST) From: Thierry Herbelot To: hackers@freebsd.org Date: Fri, 24 Oct 2008 18:18:36 +0200 User-Agent: KMail/1.9.10 X-Warning: Windows can lose your files X-Op-Sys: Le FriBi de la mort qui tue X-Org: TfH&Co X-MailScanner: Found to be clean MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810241818.37262.thierry@herbelot.com> X-Mailman-Approved-At: Fri, 24 Oct 2008 16:42:48 +0000 Cc: freebsd-fs@freebsd.org Subject: question about sb->st_blksize in src/sys/kern/vfs_vnops.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: thierry@herbelot.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2008 16:36:59 -0000 Hello, the [SUBJ] file contains the following extract (around line 705) : * Default to PAGE_SIZE after much discussion. * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct. */ sb->st_blksize = PAGE_SIZE; which arrived around four years ago, with revision 1.211 (see http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/vfs_vnops.c.diff?r1=1.210;r2=1.211;f=h) the net effect of this change is to decrease the block buffer size used in libc/stdio from 16 kbytes (derived from the underlying ufs partition) to PAGE_SIZE ==4 kbytes (fixed value), and consequently the I/O bandwidth is lowered (this is on a slow Flash). I have patched the kernel with a larger, fixed value (simply 4*PAGE_SIZE, to revert to the block size previoulsly used), and the kernel and world seem to be running fine. Seeing the XXX coment above, I'm a bit worried about keeping this new st_blksize value. are there any drawbacks with running with this bigger buffer size value ? TfH From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 17:05:37 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10DBF1065679 for ; Fri, 24 Oct 2008 17:05:37 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 754278FC1C for ; Fri, 24 Oct 2008 17:05:36 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id m9OH5TiR034274; Fri, 24 Oct 2008 18:05:30 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.7.2 smtp.infracaninophile.co.uk m9OH5TiR034274 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1224867930; bh=iXlSGeVfSGoeBq Yz+F7p91FOwnbWdW69xhHpJ6Zkeog=; h=Message-ID:Date:From:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Mes sage-ID:=20<4902004F.4010002@infracaninophile.co.uk>|Date:=20Fri,=2 024=20Oct=202008=2018:05:19=20+0100|From:=20Matthew=20Seaman=20|Organization:=20Infracaninophile|User -Agent:=20Thunderbird=202.0.0.17=20(X11/20080929)|MIME-Version:=201 .0|To:=20george+freebsd@m5p.com|CC:=20freebsd-hackers@freebsd.org|S ubject:=20Re:=20Severe=20DNS=20Problems,=206.2-RELEASE,=20BIND=209. 5.2|References:=20<200810241404.m9OE4oYl026020@m5p.com>|In-Reply-To :=20<200810241404.m9OE4oYl026020@m5p.com>|X-Enigmail-Version:=200.9 5.6|Content-Type:=20multipart/signed=3B=20micalg=3Dpgp-sha256=3B=0D =0A=20protocol=3D"application/pgp-signature"=3B=0D=0A=20boundary=3D "------------enig0D2F2FA47B06F88E76F5B3DD"; b=cax96D6DPf7CgzC5SOwld uCHoaggD77QdAnwaTAOXBnn5wGKCccywmoO908H1dJL13gFEkS+1BzPxGJ/ypt/rWXt +o2uwWz1WxlHTSWr/r4U8XLTLr3nGyyQR3E1xPhxI9ccBTM3pNOmR5u9IJw07bahwH5 TrOwx+N0C2cyx+O0= Message-ID: <4902004F.4010002@infracaninophile.co.uk> Date: Fri, 24 Oct 2008 18:05:19 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: george+freebsd@m5p.com References: <200810241404.m9OE4oYl026020@m5p.com> In-Reply-To: <200810241404.m9OE4oYl026020@m5p.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig0D2F2FA47B06F88E76F5B3DD" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (smtp.infracaninophile.co.uk [IPv6:::1]); Fri, 24 Oct 2008 18:05:30 +0100 (BST) X-Virus-Scanned: ClamAV 0.94/8485/Fri Oct 24 14:38:51 2008 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-hackers@freebsd.org Subject: Re: Severe DNS Problems, 6.2-RELEASE, BIND 9.5.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2008 17:05:37 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0D2F2FA47B06F88E76F5B3DD Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable george+freebsd@m5p.com wrote: > I'm having severe DNS problems. I'm running 6.2-RELEASE, and I upgrade= d > to the bind9 port (after cvsup) on July 14. Starting yesterday morning= , > DNS became very, very slow. If I repeated a "dig" command three or fou= r > times, I could get an answer after 20-30 seconds. This morning I cvsup= ped > again and installed the bind95 port. Still very, very slow. I will > probably shift my server to a FreeBSD 7.0 system this weekend, but I > would like very much to understand what's going on. Did you configure DLV (DNSSEC Look-aside Validation)? If so, you were=20 probably bitten by the ISC key timing out. Key roll-over was scheduled=20 for the month leading up to Tuesday 21st. Get the new key from: https://secure.isc.org/ops/dlv/index.php#dlv_key Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig0D2F2FA47B06F88E76F5B3DD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkkCAFkACgkQ8Mjk52CukIzmlQCfSiz9czDG0e4zd2sQk/rNkRcC 5MwAniYPC98hgbfdRPov+r15qgb0lhsa =n394 -----END PGP SIGNATURE----- --------------enig0D2F2FA47B06F88E76F5B3DD-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 17:11:28 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F44A1065683 for ; Fri, 24 Oct 2008 17:11:28 +0000 (UTC) (envelope-from martin.laabs@mailbox.tu-dresden.de) Received: from mailout1.zih.tu-dresden.de (mailout1.zih.tu-dresden.de [141.30.67.72]) by mx1.freebsd.org (Postfix) with ESMTP id BEFAF8FC18 for ; Fri, 24 Oct 2008 17:11:27 +0000 (UTC) (envelope-from martin.laabs@mailbox.tu-dresden.de) Received: from rmc67-31.zih.tu-dresden.de ([141.30.67.31] helo=server-n) by mailout1.zih.tu-dresden.de with esmtp (Exim 4.63) (envelope-from ) id 1KtPjZ-0000D5-9Q for freebsd-hackers@freebsd.org; Fri, 24 Oct 2008 18:41:59 +0200 Received: from localhost (p5B0ECAA7.dip.t-dialin.net [91.14.202.167]) by server-n (Postfix) with ESMTP id C2155100A093 for ; Fri, 24 Oct 2008 18:41:56 +0200 (CEST) Date: Fri, 24 Oct 2008 18:41:55 +0200 To: freebsd-hackers@freebsd.org. From: "Martin Laabs" Content-Type: text/plain; charset=iso-8859-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: User-Agent: Opera Mail/9.51 (Linux) X-TUD-Virus-Scanned: mailout1.zih.tu-dresden.de Cc: Subject: libusb for linux-emulation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 17:11:28 -0000 Hi, I'd like to run a program in linux-emulation (closed source ...) which uses the libusb. Is the structure (ioctls on devices and so on) sufficient compatible to use a linux libusb? Or is there any way to build a simple wrapper library to use the nativ libusb? (IMHO this is not possible.) Do you have any other idea? Thank you, Martin L. From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 18:49:29 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A476106570A for ; Fri, 24 Oct 2008 18:49:29 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe11.swip.net [212.247.155.65]) by mx1.freebsd.org (Postfix) with ESMTP id 03BE78FC17 for ; Fri, 24 Oct 2008 18:49:28 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=28xkXgGu3H-kGy-BUN4A:9 a=K1j1wJLRbIiny6PYE1gIyGz4-NAA:4 a=LY0hPdMaydYA:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe11.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 953883487; Fri, 24 Oct 2008 19:49:25 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Fri, 24 Oct 2008 19:51:31 +0200 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810241951.32135.hselasky@c2i.net> Cc: Martin Laabs Subject: Re: libusb for linux-emulation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 18:49:29 -0000 On Friday 24 October 2008, Martin Laabs wrote: > Hi, > > I'd like to run a program in linux-emulation (closed source ...) > which uses the libusb. Is the structure (ioctls on devices and so on) > sufficient compatible to use a linux libusb? > Or is there any way to build a simple wrapper library to use the > nativ libusb? (IMHO this is not possible.) > Do you have any other idea? > No, you cannot use the linux libusb on FreeBSD. You need to use the FreeBSD compiled libusb. The USB kernel interfaces are quite different. --HPS From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 18:53:31 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FF04106566B for ; Fri, 24 Oct 2008 18:53:31 +0000 (UTC) (envelope-from martin.laabs@mailbox.tu-dresden.de) Received: from mailout1.zih.tu-dresden.de (mailout1.zih.tu-dresden.de [141.30.67.72]) by mx1.freebsd.org (Postfix) with ESMTP id CC5458FC20 for ; Fri, 24 Oct 2008 18:53:30 +0000 (UTC) (envelope-from martin.laabs@mailbox.tu-dresden.de) Received: from rmc67-31.zih.tu-dresden.de ([141.30.67.31] helo=server-n) by mailout1.zih.tu-dresden.de with esmtp (Exim 4.63) (envelope-from ) id 1KtRmq-0004GW-Py for freebsd-hackers@freebsd.org; Fri, 24 Oct 2008 20:53:29 +0200 Received: from localhost (p5B0ECAA7.dip.t-dialin.net [91.14.202.167]) by server-n (Postfix) with ESMTP id 90B3E100A08E for ; Fri, 24 Oct 2008 20:53:28 +0200 (CEST) Date: Fri, 24 Oct 2008 20:53:27 +0200 To: "freebsd-hackers@freebsd.org" From: "Martin Laabs" Content-Type: text/plain; charset=iso-8859-1 MIME-Version: 1.0 References: <200810241951.32135.hselasky@c2i.net> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <200810241951.32135.hselasky@c2i.net> User-Agent: Opera Mail/9.51 (Linux) X-TUD-Virus-Scanned: mailout1.zih.tu-dresden.de Subject: Re: libusb for linux-emulation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 18:53:31 -0000 Hi, On Fri, 24 Oct 2008 19:51:31 +0200, Hans Petter Selasky wrote: > > No, you cannot use the linux libusb on FreeBSD. You need to use the FreeBSD > compiled libusb. The USB kernel interfaces are quite different. OK - I see. I'm just trying to build a "hermaphrodite" library. Compile with linux but using the BSD ioctls. Is there a crosscompiler to compile linux binarys from freebsd? This would make the job much easier. Thank you, Martin L. From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 19:25:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1085710656A7 for ; Fri, 24 Oct 2008 19:25:35 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 983EA8FC1F for ; Fri, 24 Oct 2008 19:25:34 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=TKDmchfAZczgelm5W4cA:9 a=2S26oCYpd30BUgXJ7Tv5sxPV6ywA:4 a=9aOQ2cSd83gA:10 a=50e4U0PicR4A:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1125596304; Fri, 24 Oct 2008 21:25:32 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Fri, 24 Oct 2008 21:27:36 +0200 User-Agent: KMail/1.9.7 References: <200810241951.32135.hselasky@c2i.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810242127.37997.hselasky@c2i.net> Cc: Martin Laabs Subject: Re: libusb for linux-emulation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 19:25:35 -0000 Hi Martin, Why can't you use and install: /usr/ports/devel/libusb ? --HPS On Friday 24 October 2008, Martin Laabs wrote: > Hi, > > On Fri, 24 Oct 2008 19:51:31 +0200, Hans Petter Selasky wrote: > > No, you cannot use the linux libusb on FreeBSD. You need to use the > > FreeBSD compiled libusb. The USB kernel interfaces are quite different. > > OK - I see. I'm just trying to build a "hermaphrodite" library. Compile > with linux but using the BSD ioctls. > Is there a crosscompiler to compile linux binarys from freebsd? This would > make the job much easier. > From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 22:34:32 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A7441065674 for ; Fri, 24 Oct 2008 22:34:32 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.173]) by mx1.freebsd.org (Postfix) with ESMTP id 5E2DE8FC16 for ; Fri, 24 Oct 2008 22:34:32 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so1051915wfg.7 for ; Fri, 24 Oct 2008 15:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; bh=Mn1sKcXjL5xvgjHyn3q9k0NacsO8wXgNj+K+3Hk9WHA=; b=nGfbHoO3BqVSnbyxbMUf4ZFlOqwU2A2ngPdlGU1uB5uCiQmrRhswMeBYy8yk8dgW2p MBbGp355TxgDkA1W95kVybXw5u3gJhGzIakR6hnWkdybPLkNXmpGEBOF+CeY553YdP60 Up5pQpLEXr7WBFB/3ntF0Y0uoYusMixEApJnk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:mime-version :content-type:content-transfer-encoding:content-disposition :x-google-sender-auth; b=WumRbxmzx1jsZhfjsAGLUn4fQso1wpMRepUnYOVBosCtiqkswqzoQPUGCQhANbMIlA qawwHj0lZE5J8oH0dTwvLIStuMHHBAQd4Jx+5kmwuf5clmrtD6bjM2nhKJB4chNTBJc3 dPY2vFJXPgIFfdckC015jaoeN77j949Y8t8k0= Received: by 10.142.217.17 with SMTP id p17mr1270687wfg.23.1224887672002; Fri, 24 Oct 2008 15:34:32 -0700 (PDT) Received: by 10.142.141.5 with HTTP; Fri, 24 Oct 2008 15:34:31 -0700 (PDT) Message-ID: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> Date: Fri, 24 Oct 2008 15:34:31 -0700 From: "Steve Franks" Sender: bahamasfranks@gmail.com To: freebsd-hackers MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: d77fa5f6759c6fac Subject: neophyte: tcsetattr() gives 22 error in i386, not in amd64? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: stevefranks@ieee.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2008 22:34:32 -0000 Hi, I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which was working under 7-STABLE amd64. Serial device is a ucom (silabs cp2103). Permissions on /dev/cuaU0 look fine. Cutecom/Minicom appears to open the port without error... Ideas? Thanks, Steve if(cfsetspeed(&IspEnvironment->newtio,(speed_t) strtol(IspEnvironment->baud_rate,NULL,10))) { DebugPrintf(1, "baudrate %s not supported\n", IspEnvironment->baud_rate); exit(3); }; switch (atol(IspEnvironment->baud_rate)) { case 1152000: NEWTERMIOS_SETBAUDARTE(B1152000); break; default: { DebugPrintf(1, "unknown baudrate %s\n", IspEnvironment->baud_rate); exit(3); } } IspEnvironment->newtio.c_iflag = IGNPAR | IGNBRK | IXON | IXOFF; IspEnvironment->newtio.c_oflag = 0; /* set input mode (non-canonical, no echo,...) */ IspEnvironment->newtio.c_lflag = 0; cfmakeraw(&IspEnvironment->newtio); IspEnvironment->newtio.c_cc[VTIME] = 1; /* inter-character timer used */ IspEnvironment->newtio.c_cc[VMIN] = 0; /* blocking read until 0 chars received */ tcflush(IspEnvironment->fdCom, TCIFLUSH); int err = tcsetattr(IspEnvironment->fdCom, TCSANOW, &IspEnvironment->newtio); From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 23:30:36 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44A2F1065684 for ; Fri, 24 Oct 2008 23:30:36 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id 2629A8FC13 for ; Fri, 24 Oct 2008 23:30:35 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m9ONUZ619136; Fri, 24 Oct 2008 16:30:35 -0700 (PDT) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m9ONUZS18273; Fri, 24 Oct 2008 16:30:35 -0700 (PDT) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Fri, 24 Oct 2008 16:30:35 -0700 (PDT) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Steve Franks In-Reply-To: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> Message-ID: References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers Subject: Re: neophyte: tcsetattr() gives 22 error in i386, not in amd64? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 23:30:36 -0000 On Fri, 24 Oct 2008, Steve Franks wrote: > Hi, > > I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which > was working under 7-STABLE amd64. Serial device is a ucom (silabs > cp2103). Permissions on /dev/cuaU0 look fine. Cutecom/Minicom > appears to open the port without error... I don't see anything obviously wrong, but I'd bet a bug related to 32/64-bit types. Can you post a complete piece of code that can be compiled and run and demonstrates the problem? Also, try compiling with -Wall -W and investigate any warnings that are produced. By the way, errno 22 is EINVAL, "Invalid argument". perror() is your friend. [snip code] -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 23:33:44 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 081B91065673 for ; Fri, 24 Oct 2008 23:33:44 +0000 (UTC) (envelope-from george@m5p.com) Received: from mailhost.m5p.com (unknown [IPv6:2001:418:3fd::2]) by mx1.freebsd.org (Postfix) with ESMTP id CEC328FC19 for ; Fri, 24 Oct 2008 23:33:43 +0000 (UTC) (envelope-from george@m5p.com) Received: from m5p.com (mailhost.m5p.com [IPv6:2001:418:3fd::f7]) by mailhost.m5p.com (8.13.8/8.13.8) with ESMTP id m9ONWTYe032383 for ; Fri, 24 Oct 2008 19:32:34 -0400 (EDT) Received: (from george@localhost) by m5p.com (8.13.8/8.13.7/Submit) id m9ONWT8S032380; Fri, 24 Oct 2008 19:32:29 -0400 (EDT) Date: Fri, 24 Oct 2008 19:32:29 -0400 (EDT) Message-Id: <200810242332.m9ONWT8S032380@m5p.com> From: george+freebsd@m5p.com To: freebsd-hackers@freebsd.org X-Spam-Score: -0.001 () NO_RELAYS X-Scanned-By: MIMEDefang 2.57 on IPv6:2001:418:3fd::f7 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (mailhost.m5p.com [IPv6:2001:418:3fd::f7]); Fri, 24 Oct 2008 19:32:35 -0400 (EDT) Subject: Re: Severe DNS Problems, 6.2-RELEASE, BIND 9.5.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2008 23:33:44 -0000 > From: Matthew Seaman > george+freebsd@m5p.com wrote: > > I'm having severe DNS problems. I'm running 6.2-RELEASE, and I upgrade= > d > > to the bind9 port (after cvsup) on July 14. Starting yesterday morning= > , > > DNS became very, very slow. If I repeated a "dig" command three or fou= > r > > times, I could get an answer after 20-30 seconds. This morning I cvsup= > ped > > again and installed the bind95 port. Still very, very slow. I will > > probably shift my server to a FreeBSD 7.0 system this weekend, but I > > would like very much to understand what's going on. > > Did you configure DLV (DNSSEC Look-aside Validation)? If so, you were=20 > probably bitten by the ISC key timing out. Key roll-over was scheduled=20 > for the month leading up to Tuesday 21st. > > Get the new key from: https://secure.isc.org/ops/dlv/index.php#dlv_key > > Cheers, > > Matthew No, I'm not using DLV, but thanks for the hint anyway. > From: Mike Meyer > X-Spam-Score: 0 () > X-Scanned-By: MIMEDefang 2.57 on 10.100.0.247 > X-Greylist: Delayed for 00:52:50 by milter-greylist-2.0.2 (mailhost.m5p.com [10.100.0.247]); Fri, 24 Oct 2008 13:41:31 -0400 (EDT) > Status: R > > On Fri, 24 Oct 2008 10:04:50 -0400 (EDT) > george+freebsd@m5p.com wrote: > > > I'm having severe DNS problems. I'm running 6.2-RELEASE, and I upgraded > > to the bind9 port (after cvsup) on July 14. Starting yesterday morning, > > DNS became very, very slow. If I repeated a "dig" command three or four > > times, I could get an answer after 20-30 seconds. This morning I cvsupped > > again and installed the bind95 port. Still very, very slow. I will > > probably shift my server to a FreeBSD 7.0 system this weekend, but I > > would like very much to understand what's going on. > > Could this be a downstream server timing out? > > Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6C3C1065671 for ; Fri, 24 Oct 2008 23:50:36 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from ipmail05.adl2.internode.on.net (ipmail05.adl2.internode.on.net [203.16.214.145]) by mx1.freebsd.org (Postfix) with ESMTP id 517D38FC0A for ; Fri, 24 Oct 2008 23:50:35 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAM/4AUl5LaeE/2dsb2JhbACBdsAvg08 X-IronPort-AV: E=Sophos;i="4.33,481,1220193000"; d="asc'?scan'208";a="239427360" Received: from ppp121-45-167-132.lns11.adl2.internode.on.net (HELO midget.dons.net.au) ([121.45.167.132]) by ipmail05.adl2.internode.on.net with ESMTP; 25 Oct 2008 10:05:26 +1030 Received: from inchoate.dons.net.au (Inchoate.dons.net.au [10.0.2.99]) (authenticated bits=0) by midget.dons.net.au (8.14.3/8.14.3) with ESMTP id m9ONZI5m018075 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Oct 2008 10:05:25 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Sat, 25 Oct 2008 10:03:12 +1030 User-Agent: KMail/1.9.10 References: <200810242127.37997.hselasky@c2i.net> In-Reply-To: <200810242127.37997.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1324468.s0dtroCZj4"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200810251003.12882.doconnor@gsoft.com.au> X-Spam-Score: -1.906 () BAYES_00,SPF_FAIL X-Scanned-By: MIMEDefang 2.64 on 10.0.2.7 Cc: Martin Laabs , Hans Petter Selasky Subject: Re: libusb for linux-emulation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 23:50:36 -0000 --nextPart1324468.s0dtroCZj4 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 25 October 2008 05:57:36 Hans Petter Selasky wrote: > Why can't you use and install: > > /usr/ports/devel/libusb > > ? Because that gives you a FreeBSD libusb and he needs to have a Linux progra= m=20 talk to a USB device. I'd like this too but it's beyond by ken :( (It would be handy for Xilinx Webpack FPGA programming tools) =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1324468.s0dtroCZj4 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBJAls45ZPcIHs/zowRAk8EAJ0ePSKiRVLD3Y54EcheGhgF/RupmACeOLhi Kx+fTbMuycKaZztIOwzujqQ= =qDHR -----END PGP SIGNATURE----- --nextPart1324468.s0dtroCZj4-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 23:50:40 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CD05106566B; Fri, 24 Oct 2008 23:50:40 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from ipmail05.adl2.internode.on.net (ipmail05.adl2.internode.on.net [203.16.214.145]) by mx1.freebsd.org (Postfix) with ESMTP id 453728FC0C; Fri, 24 Oct 2008 23:50:39 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAM/4AUl5LaeE/2dsb2JhbACBdsAvg08 X-IronPort-AV: E=Sophos;i="4.33,481,1220193000"; d="asc'?scan'208";a="239427316" Received: from ppp121-45-167-132.lns11.adl2.internode.on.net (HELO midget.dons.net.au) ([121.45.167.132]) by ipmail05.adl2.internode.on.net with ESMTP; 25 Oct 2008 10:05:21 +1030 Received: from inchoate.dons.net.au (Inchoate.dons.net.au [10.0.2.99]) (authenticated bits=0) by midget.dons.net.au (8.14.3/8.14.3) with ESMTP id m9ONZI5l018075 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Oct 2008 10:05:18 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Sat, 25 Oct 2008 09:58:04 +1030 User-Agent: KMail/1.9.10 References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <20081024104232.X21603@wojtek.tensor.gdynia.pl> <20081024125059.GE1137@server.vk2pj.dyndns.org> In-Reply-To: <20081024125059.GE1137@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6130417.c3uBpPzu6d"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200810250958.15130.doconnor@gsoft.com.au> X-Spam-Score: -1.906 () BAYES_00,SPF_FAIL X-Scanned-By: MIMEDefang 2.64 on 10.0.2.7 Cc: Alexander Sack , freebsd-questions@freebsd.org, Wojciech Puchar Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Oct 2008 23:50:40 -0000 --nextPart6130417.c3uBpPzu6d Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 24 October 2008 23:20:59 Peter Jeremy wrote: > >this will make system trying to bind 32-bit libs to 64-bit program. it > >can't work > > rtld shouldn't attempt to bind 32-bit libs to 64-bit programs. The same problem happens with the Linux run time linker - it merrily tries = to=20 link FreeBSD libraries to Linux binaries with predictable results.. One trick I use for that is to put a symlink in /compat/linux in the place = the=20 problematic FreeBSD library is.. That said it would be really nice if it ignored incompatible libraries :) =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart6130417.c3uBpPzu6d Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBJAloP5ZPcIHs/zowRAisRAJ9jgqSxkyHKIbBfaT9ljWoFizmR5gCgo5lt +1NM25mggxvIOlXthJmB+h4= =Akc8 -----END PGP SIGNATURE----- --nextPart6130417.c3uBpPzu6d-- From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 07:48:17 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 610C6106566C for ; Sat, 25 Oct 2008 07:48:17 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.freebsd.org (Postfix) with ESMTP id 16ED18FC1F for ; Sat, 25 Oct 2008 07:48:17 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from sunfire.cs.huji.ac.il ([132.65.16.80]) by cs1.cs.huji.ac.il with esmtp id 1Ktdsd-000B7U-5M; Sat, 25 Oct 2008 09:48:15 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Dan Nelson In-reply-to: <20081024150916.GB41283@dan.emsphone.com> References: <20081024150916.GB41283@dan.emsphone.com> Comments: In-reply-to Dan Nelson message dated "Fri, 24 Oct 2008 10:09:16 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 25 Oct 2008 09:48:15 +0200 From: Danny Braniss Message-ID: Cc: FreeBSD Hackers Subject: Re: zfs & waiting on zio->io_cv X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 07:48:17 -0000 > In the last episode (Oct 24), Danny Braniss said: > > there is a big delay (probably more than 1 sec.) when doing simple tasks > > on this zfs, like ls(1), or 'zfs list', long enough to hit ^T > > and get the same [zio->io_cv)], any hints? > > > > store-01# zfs list > > (hitting ^T)load: 0.00 cmd: zfs 88376 [zio->io_cv)] 0.00u 0.00s 0% 1672k > > (hitting ^T)load: 0.00 cmd: zfs 88376 [zio->io_cv)] 0.00u 0.00s 0% 1684k > > NAME USED AVAIL REFER MOUNTPOINT > > h 472G 11.2T 23K /h > > h/home 466G 11.2T 466G /h/home > > h/home@23-10-08 54K - 466G - > > h/root 18K 11.2T 18K /h/root > > h/src 18K 11.2T 18K /h/src > > h/system 5.64G 11.2T 5.64G /h/system > > That's sort of the equivalent to waiting in "biord" on a UFS > filesystem, I think. ZFS is just waiting for the disk to return a > block. If you happen to do something during the window where ZFS is > commiting its transaction group, it has to wait until the sync > finishes. If some other process is doing a lot of writes, or you only > have one disk in your zpool, or your pool is close to full, it may take > a couple seconds to sync. > > There's a couple of things you can try to improve interactive > performance. Raising zfs's arc_max is the easiest to do, and will let > ZFS cache more stuff, increasing the likelyhood that an "ls" will be > able to read from cache instead of having to go to disk. Setting it at > 1/4 your physical RAM is probably as high as you can go without causing > panics. > > Raising txg_time ( in /sys/cddl/.../zfs/txg.c ) from 5 to > say 30 will tell zfs to sync less often, which can be a win if you > don't actually do that much writing. With a single spindle, it may > take a substantial fraction of a second just to sync a tiny txg due to > the number of copies of metadata ZFS writes for redundancy. > > If you do a lot of writing, lowering zfs_vdev_max_pending ( in > /sys/cddl/.../zfs/vdev_queue.c ) from 35 down to 16 or less will reduce > the number of simultaneous I/Os ZFS will try to send to each disk, > which will let your reads compete a little better with other I/O. On > ATA or SATA disks, you might want to set it to 2. > ok, forgot to mention a small detail, the machine is a cuad core, with 8gb of main memory, the disks are 14x1tb connected via a perc/raid5 tests show that disk access is quiet fast, over 200Mg/s. the 'delays' are seen when the machine is totaly idle. (it's not production yet) and been up for some time. btw, I can't reproduce the 'delay', so I think it has to do with caching. I guess this beast needs some tunning, are there any tools out there to monitor/tune ZFS? thanks, danny > -- > Dan Nelson > dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 07:54:32 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B59731065676 for ; Sat, 25 Oct 2008 07:54:32 +0000 (UTC) (envelope-from en0f@bokey.mine.nu) Received: from mine.nu (60-242-68-238.static.tpgi.com.au [60.242.68.238]) by mx1.freebsd.org (Postfix) with ESMTP id 6AFBC8FC18 for ; Sat, 25 Oct 2008 07:54:32 +0000 (UTC) (envelope-from en0f@bokey.mine.nu) Received: by mine.nu (Postfix, from userid 1007) id 30B10EBBB4; Sat, 25 Oct 2008 18:06:50 +1030 (CST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on machapuchre.volcano.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=2.0 tests=ALL_TRUSTED autolearn=ham version=3.2.5 Received: from machapuchre.volcano.com (localhost.localdomain [127.0.0.1]) by mine.nu (Postfix) with ESMTPSA id 95E43EBBAE for ; Sat, 25 Oct 2008 18:06:39 +1030 (CST) Message-ID: <4902CC86.8030408@bokey.mine.nu> Date: Sat, 25 Oct 2008 18:06:38 +1030 From: en0f User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: freebsd-hackers References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: neophyte: tcsetattr() gives 22 error in i386, not in amd64? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 07:54:32 -0000 Nate Eldredge wrote: > On Fri, 24 Oct 2008, Steve Franks wrote: > >> Hi, >> >> I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which >> was working under 7-STABLE amd64. Serial device is a ucom (silabs >> cp2103). Permissions on /dev/cuaU0 look fine. Cutecom/Minicom >> appears to open the port without error... > > I don't see anything obviously wrong, but I'd bet a bug related to > 32/64-bit types. Can you post a complete piece of code that can be > compiled and run and demonstrates the problem? Also, try compiling with > -Wall -W and investigate any warnings that are produced. > > By the way, errno 22 is EINVAL, "Invalid argument". perror() is your > friend. Strange freebsd doesnt document error numbers. On POSIX, errno 22 is EINVAL as well (documented in errno(3)). Is this applicable to freebsd? -- en0f From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 07:56:50 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A15EA106566B for ; Sat, 25 Oct 2008 07:56:50 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA09.westchester.pa.mail.comcast.net (qmta09.westchester.pa.mail.comcast.net [76.96.62.96]) by mx1.freebsd.org (Postfix) with ESMTP id 4AD4A8FC1F for ; Sat, 25 Oct 2008 07:56:50 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA05.westchester.pa.mail.comcast.net ([76.96.62.43]) by QMTA09.westchester.pa.mail.comcast.net with comcast id WvuE1a0040vyq2s59vwpKC; Sat, 25 Oct 2008 07:56:49 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA05.westchester.pa.mail.comcast.net with comcast id Wvwo1a0052P6wsM3RvwpFS; Sat, 25 Oct 2008 07:56:49 +0000 X-Authority-Analysis: v=1.0 c=1 a=Gia_n1T2EukA:10 a=q0bofQMocTIA:10 a=QycZ5dHgAAAA:8 a=MWtmk4XHxJ4B1my8Sb4A:9 a=LqBKpdnBXI4WWRPt1gXpMVAiBDAA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 9E5D6C9420; Sat, 25 Oct 2008 00:56:48 -0700 (PDT) Date: Sat, 25 Oct 2008 00:56:48 -0700 From: Jeremy Chadwick To: en0f Message-ID: <20081025075648.GB55339@icarus.home.lan> References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> <4902CC86.8030408@bokey.mine.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4902CC86.8030408@bokey.mine.nu> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers Subject: Re: neophyte: tcsetattr() gives 22 error in i386, not in amd64? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 07:56:50 -0000 On Sat, Oct 25, 2008 at 06:06:38PM +1030, en0f wrote: > Nate Eldredge wrote: > > On Fri, 24 Oct 2008, Steve Franks wrote: > > > >> Hi, > >> > >> I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which > >> was working under 7-STABLE amd64. Serial device is a ucom (silabs > >> cp2103). Permissions on /dev/cuaU0 look fine. Cutecom/Minicom > >> appears to open the port without error... > > > > I don't see anything obviously wrong, but I'd bet a bug related to > > 32/64-bit types. Can you post a complete piece of code that can be > > compiled and run and demonstrates the problem? Also, try compiling with > > -Wall -W and investigate any warnings that are produced. > > > > By the way, errno 22 is EINVAL, "Invalid argument". perror() is your > > friend. > > Strange freebsd doesnt document error numbers. On POSIX, errno 22 is > EINVAL as well (documented in errno(3)). Is this applicable to freebsd? /usr/include/errno.h isn't documentation of error numbers? -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 08:00:00 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5894106566C for ; Sat, 25 Oct 2008 08:00:00 +0000 (UTC) (envelope-from en0f@bokey.mine.nu) Received: from mine.nu (60-242-68-238.static.tpgi.com.au [60.242.68.238]) by mx1.freebsd.org (Postfix) with ESMTP id 4F7198FC14 for ; Sat, 25 Oct 2008 08:00:00 +0000 (UTC) (envelope-from en0f@bokey.mine.nu) Received: by mine.nu (Postfix, from userid 1007) id 1CD4BEBBB4; Sat, 25 Oct 2008 18:29:56 +1030 (CST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on machapuchre.volcano.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=2.0 tests=ALL_TRUSTED, AWL autolearn=ham version=3.2.5 Received: from machapuchre.volcano.com (localhost.localdomain [127.0.0.1]) by mine.nu (Postfix) with ESMTPSA id 6A469EBBAE; Sat, 25 Oct 2008 18:29:55 +1030 (CST) Message-ID: <4902D1FA.3070003@bokey.mine.nu> Date: Sat, 25 Oct 2008 18:29:54 +1030 From: en0f User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: Jeremy Chadwick References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> <4902CC86.8030408@bokey.mine.nu> <20081025075648.GB55339@icarus.home.lan> In-Reply-To: <20081025075648.GB55339@icarus.home.lan> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers Subject: Re: neophyte: tcsetattr() gives 22 error in i386, not in amd64? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 08:00:00 -0000 Jeremy Chadwick wrote: > On Sat, Oct 25, 2008 at 06:06:38PM +1030, en0f wrote: >> Nate Eldredge wrote: >>> On Fri, 24 Oct 2008, Steve Franks wrote: >>> >>>> Hi, >>>> >>>> I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which >>>> was working under 7-STABLE amd64. Serial device is a ucom (silabs >>>> cp2103). Permissions on /dev/cuaU0 look fine. Cutecom/Minicom >>>> appears to open the port without error... >>> I don't see anything obviously wrong, but I'd bet a bug related to >>> 32/64-bit types. Can you post a complete piece of code that can be >>> compiled and run and demonstrates the problem? Also, try compiling with >>> -Wall -W and investigate any warnings that are produced. >>> >>> By the way, errno 22 is EINVAL, "Invalid argument". perror() is your >>> friend. >> Strange freebsd doesnt document error numbers. On POSIX, errno 22 is >> EINVAL as well (documented in errno(3)). Is this applicable to freebsd? > > /usr/include/errno.h isn't documentation of error numbers? Gahhhhh! But Jeremy, I dont have magic brains to work me way out of source code :) -- en0f From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 08:02:01 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3B011065672 for ; Sat, 25 Oct 2008 08:02:01 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA09.westchester.pa.mail.comcast.net (qmta09.westchester.pa.mail.comcast.net [76.96.62.96]) by mx1.freebsd.org (Postfix) with ESMTP id D9F398FC13 for ; Sat, 25 Oct 2008 08:02:00 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA03.westchester.pa.mail.comcast.net ([76.96.62.27]) by QMTA09.westchester.pa.mail.comcast.net with comcast id Ww0R1a0060bG4ec59w1zQo; Sat, 25 Oct 2008 08:01:59 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA03.westchester.pa.mail.comcast.net with comcast id Ww1y1a01X2P6wsM3Pw1zPc; Sat, 25 Oct 2008 08:01:59 +0000 X-Authority-Analysis: v=1.0 c=1 a=QycZ5dHgAAAA:8 a=tQ9rm8fwbuQ4hyOsMbAA:9 a=p8GA1uGYW3cPqib4-f0A:7 a=2YpFDbIIgmTrhgGCxGe-fFlL-skA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 31D90C9419; Sat, 25 Oct 2008 00:55:43 -0700 (PDT) Date: Sat, 25 Oct 2008 00:55:43 -0700 From: Jeremy Chadwick To: Danny Braniss Message-ID: <20081025075543.GA55339@icarus.home.lan> References: <20081024150916.GB41283@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.18 (2008-05-17) Cc: FreeBSD Hackers , Dan Nelson Subject: Re: zfs & waiting on zio->io_cv X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 08:02:01 -0000 On Sat, Oct 25, 2008 at 09:48:15AM +0200, Danny Braniss wrote: > > In the last episode (Oct 24), Danny Braniss said: > > > there is a big delay (probably more than 1 sec.) when doing simple tasks > > > on this zfs, like ls(1), or 'zfs list', long enough to hit ^T > > > and get the same [zio->io_cv)], any hints? > > > > > > store-01# zfs list > > > (hitting ^T)load: 0.00 cmd: zfs 88376 [zio->io_cv)] 0.00u 0.00s 0% 1672k > > > (hitting ^T)load: 0.00 cmd: zfs 88376 [zio->io_cv)] 0.00u 0.00s 0% 1684k > > > NAME USED AVAIL REFER MOUNTPOINT > > > h 472G 11.2T 23K /h > > > h/home 466G 11.2T 466G /h/home > > > h/home@23-10-08 54K - 466G - > > > h/root 18K 11.2T 18K /h/root > > > h/src 18K 11.2T 18K /h/src > > > h/system 5.64G 11.2T 5.64G /h/system > > > > That's sort of the equivalent to waiting in "biord" on a UFS > > filesystem, I think. ZFS is just waiting for the disk to return a > > block. If you happen to do something during the window where ZFS is > > commiting its transaction group, it has to wait until the sync > > finishes. If some other process is doing a lot of writes, or you only > > have one disk in your zpool, or your pool is close to full, it may take > > a couple seconds to sync. > > > > There's a couple of things you can try to improve interactive > > performance. Raising zfs's arc_max is the easiest to do, and will let > > ZFS cache more stuff, increasing the likelyhood that an "ls" will be > > able to read from cache instead of having to go to disk. Setting it at > > 1/4 your physical RAM is probably as high as you can go without causing > > panics. > > > > Raising txg_time ( in /sys/cddl/.../zfs/txg.c ) from 5 to > > say 30 will tell zfs to sync less often, which can be a win if you > > don't actually do that much writing. With a single spindle, it may > > take a substantial fraction of a second just to sync a tiny txg due to > > the number of copies of metadata ZFS writes for redundancy. > > > > If you do a lot of writing, lowering zfs_vdev_max_pending ( in > > /sys/cddl/.../zfs/vdev_queue.c ) from 35 down to 16 or less will reduce > > the number of simultaneous I/Os ZFS will try to send to each disk, > > which will let your reads compete a little better with other I/O. On > > ATA or SATA disks, you might want to set it to 2. > > > ok, forgot to mention a small detail, the machine is a cuad core, with 8gb > of main memory, the disks are 14x1tb connected via a perc/raid5 > tests show that disk access is quiet fast, over 200Mg/s. > > the 'delays' are seen when the machine is totaly idle. (it's not production > yet) > and been up for some time. btw, I can't reproduce the 'delay', so I think > it has to do with caching. > > I guess this beast needs some tunning, are there any tools out there > to monitor/tune ZFS? Monitor ZFS: sysctl Tune ZFS: vi /boot/loader.conf or sysctl I'm not sure what you're looking for. :-) -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 08:13:07 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 615421065682 for ; Sat, 25 Oct 2008 08:13:07 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA06.emeryville.ca.mail.comcast.net (qmta06.emeryville.ca.mail.comcast.net [76.96.30.56]) by mx1.freebsd.org (Postfix) with ESMTP id 430368FC14 for ; Sat, 25 Oct 2008 08:13:07 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA07.emeryville.ca.mail.comcast.net ([76.96.30.59]) by QMTA06.emeryville.ca.mail.comcast.net with comcast id WwAA1a0051GXsucA6wD6pd; Sat, 25 Oct 2008 08:13:06 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA07.emeryville.ca.mail.comcast.net with comcast id WwD51a0052P6wsM8TwD6gC; Sat, 25 Oct 2008 08:13:06 +0000 X-Authority-Analysis: v=1.0 c=1 a=Gia_n1T2EukA:10 a=q0bofQMocTIA:10 a=QycZ5dHgAAAA:8 a=Ji1h3VfYJHYNj2sNrvwA:9 a=Nr8YgLJMuuMBNKjT8jRQhoHBDCcA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id A1EFDC9419; Sat, 25 Oct 2008 01:13:05 -0700 (PDT) Date: Sat, 25 Oct 2008 01:13:05 -0700 From: Jeremy Chadwick To: en0f Message-ID: <20081025081305.GA55683@icarus.home.lan> References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> <4902CC86.8030408@bokey.mine.nu> <20081025075648.GB55339@icarus.home.lan> <4902D1FA.3070003@bokey.mine.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4902D1FA.3070003@bokey.mine.nu> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers Subject: Re: neophyte: tcsetattr() gives 22 error in i386, not in amd64? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 08:13:07 -0000 On Sat, Oct 25, 2008 at 06:29:54PM +1030, en0f wrote: > Jeremy Chadwick wrote: > > On Sat, Oct 25, 2008 at 06:06:38PM +1030, en0f wrote: > >> Nate Eldredge wrote: > >>> On Fri, 24 Oct 2008, Steve Franks wrote: > >>> > >>>> Hi, > >>>> > >>>> I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which > >>>> was working under 7-STABLE amd64. Serial device is a ucom (silabs > >>>> cp2103). Permissions on /dev/cuaU0 look fine. Cutecom/Minicom > >>>> appears to open the port without error... > >>> I don't see anything obviously wrong, but I'd bet a bug related to > >>> 32/64-bit types. Can you post a complete piece of code that can be > >>> compiled and run and demonstrates the problem? Also, try compiling with > >>> -Wall -W and investigate any warnings that are produced. > >>> > >>> By the way, errno 22 is EINVAL, "Invalid argument". perror() is your > >>> friend. > >> Strange freebsd doesnt document error numbers. On POSIX, errno 22 is > >> EINVAL as well (documented in errno(3)). Is this applicable to freebsd? > > > > /usr/include/errno.h isn't documentation of error numbers? > > Gahhhhh! But Jeremy, I dont have magic brains to work me way out of > source code :) You're confusing me. :P The errors in errno.h are commented, and it's quite readable. Of course, it matches what's in errno(3). If you're wanting to track down how/why tcsetattr(3) results in EINVAL, using truss or ktrace might come in handy. Otherwise, you literally will have to throw some debugging code into the ucom(4) driver to try and figure out what function is kicking out code 22. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 09:18:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 546411065676; Sat, 25 Oct 2008 09:18:38 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.freebsd.org (Postfix) with ESMTP id 082538FC14; Sat, 25 Oct 2008 09:18:37 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from sunfire.cs.huji.ac.il ([132.65.16.80]) by cs1.cs.huji.ac.il with esmtp id 1KtfI4-000BoP-Dn; Sat, 25 Oct 2008 11:18:36 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Jeremy Chadwick In-reply-to: <20081025075543.GA55339@icarus.home.lan> References: <20081024150916.GB41283@dan.emsphone.com> <20081025075543.GA55339@icarus.home.lan> Comments: In-reply-to Jeremy Chadwick message dated "Sat, 25 Oct 2008 00:55:43 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 25 Oct 2008 11:18:36 +0200 From: Danny Braniss Message-ID: Cc: FreeBSD Hackers , Dan Nelson Subject: Re: zfs & waiting on zio->io_cv X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 09:18:38 -0000 [...] > > I guess this beast needs some tunning, are there any tools out there > > to monitor/tune ZFS? > > Monitor ZFS: sysctl > Tune ZFS: vi /boot/loader.conf or sysctl > > I'm not sure what you're looking for. :-) the magic wand :-) /OT there's an old saying, numbers don't lie, only _____. [you can fill the _____ with whatever, I like 'salesperson'] update: ____ should be wall-street-analysts /OT/ there are too many tunables, and I really don't want to spend all my waking hours tunning, but once in a while, I do check performance, and running top, iostat, nfsstat, etc, sometimes show a 'congestion'. the problem I encounter very often, is that what is a great solution for one, might be disastrous for another. ZFS is the new kid in town, and so far I am quiet happy - have 2 in production, and the new one will be very soon, it's being used to train/learn/play but will go online very soon, then it will be hammered by several projects, and it would-be-nice to have some tool to watch performance and be able to do some tunning, to quote tunefs: 'You can tune a file system, but you cannot tune a fish.' babbling on a rainy day, danny From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 09:31:37 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2A07106566B for ; Sat, 25 Oct 2008 09:31:37 +0000 (UTC) (envelope-from njm@njm.f2s.com) Received: from mk-outboundfilter-6-a-2.mail.uk.tiscali.com (mk-outboundfilter-6-a-2.mail.uk.tiscali.com [212.74.114.16]) by mx1.freebsd.org (Postfix) with ESMTP id 52F948FC19 for ; Sat, 25 Oct 2008 09:31:36 +0000 (UTC) (envelope-from njm@njm.f2s.com) X-Trace: 42854037/mk-outboundfilter-6.mail.uk.tiscali.com/F2S/$F2S-ACCEPTED/f2s-freedom2Surf-customers/195.137.21.170 X-SBRS: None X-RemoteIP: 195.137.21.170 X-IP-MAIL-FROM: njm@njm.f2s.com X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAJ6BAknDiRWq/2dsb2JhbACBdr5ag08 X-IronPort-AV: E=Sophos;i="4.33,482,1220223600"; d="scan'208";a="42854037" X-IP-Direction: IN Received: from i-195-137-21-170.freedom2surf.net (HELO oberon.njm.f2s.com) ([195.137.21.170]) by smtp.f2s.tiscali.co.uk with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Oct 2008 10:21:58 +0100 Received: from oberon.njm.f2s.com (localhost.njm.f2s.com [127.0.0.1]) by oberon.njm.f2s.com (8.14.3/8.14.3) with ESMTP id m9P9LvIL087114; Sat, 25 Oct 2008 10:21:57 +0100 (BST) (envelope-from njm@oberon.njm.f2s.com) Received: (from njm@localhost) by oberon.njm.f2s.com (8.14.3/8.14.3/Submit) id m9P9Lv65087113; Sat, 25 Oct 2008 10:21:57 +0100 (BST) (envelope-from njm) Date: Sat, 25 Oct 2008 10:21:57 +0100 From: "N.J. Mann" To: Jeremy Chadwick Message-ID: <20081025092157.GB86967@oberon.njm.f2s.com> Mail-Followup-To: Jeremy Chadwick , en0f , freebsd-hackers References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> <4902CC86.8030408@bokey.mine.nu> <20081025075648.GB55339@icarus.home.lan> <4902D1FA.3070003@bokey.mine.nu> <20081025081305.GA55683@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081025081305.GA55683@icarus.home.lan> X-Operating-System: FreeBSD 7.1-PRERELEASE User-Agent: Mutt/1.5.18cvs (2008-07-02) Cc: freebsd-hackers , en0f Subject: Re: neophyte: tcsetattr() gives 22 error in i386, not in amd64? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 09:31:37 -0000 In message <20081025081305.GA55683@icarus.home.lan>, Jeremy Chadwick (koitsu@FreeBSD.org) wrote: > On Sat, Oct 25, 2008 at 06:29:54PM +1030, en0f wrote: > > Jeremy Chadwick wrote: > > > On Sat, Oct 25, 2008 at 06:06:38PM +1030, en0f wrote: > > >> Nate Eldredge wrote: > > >>> On Fri, 24 Oct 2008, Steve Franks wrote: > > >>> > > >>>> Hi, > > >>>> > > >>>> I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which > > >>>> was working under 7-STABLE amd64. Serial device is a ucom (silabs > > >>>> cp2103). Permissions on /dev/cuaU0 look fine. Cutecom/Minicom > > >>>> appears to open the port without error... > > >>> I don't see anything obviously wrong, but I'd bet a bug related to > > >>> 32/64-bit types. Can you post a complete piece of code that can be > > >>> compiled and run and demonstrates the problem? Also, try compiling with > > >>> -Wall -W and investigate any warnings that are produced. > > >>> > > >>> By the way, errno 22 is EINVAL, "Invalid argument". perror() is your > > >>> friend. > > >> Strange freebsd doesnt document error numbers. On POSIX, errno 22 is > > >> EINVAL as well (documented in errno(3)). Is this applicable to freebsd? > > > > > > /usr/include/errno.h isn't documentation of error numbers? > > > > Gahhhhh! But Jeremy, I dont have magic brains to work me way out of > > source code :) > > You're confusing me. :P The errors in errno.h are commented, and it's > quite readable. Of course, it matches what's in errno(3). Just in case someone actually goes looking for errno(3)... It is actually errno(2), but I'm sure you knew that. :-) Cheers, Nick. -- From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 09:46:43 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD042106566C for ; Sat, 25 Oct 2008 09:46:43 +0000 (UTC) (envelope-from njm@njm.f2s.com) Received: from mk-outboundfilter-6-a-2.mail.uk.tiscali.com (mk-outboundfilter-6-a-2.mail.uk.tiscali.com [212.74.114.16]) by mx1.freebsd.org (Postfix) with ESMTP id 5F30F8FC17 for ; Sat, 25 Oct 2008 09:46:43 +0000 (UTC) (envelope-from njm@njm.f2s.com) X-Trace: 42852877/mk-outboundfilter-6.mail.uk.tiscali.com/F2S/$F2S-ACCEPTED/f2s-freedom2Surf-customers/195.137.21.170 X-SBRS: None X-RemoteIP: 195.137.21.170 X-IP-MAIL-FROM: njm@njm.f2s.com X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAHSAAknDiRWq/2dsb2JhbACBdr5ug08 X-IronPort-AV: E=Sophos;i="4.33,482,1220223600"; d="scan'208";a="42852877" X-IP-Direction: IN Received: from i-195-137-21-170.freedom2surf.net (HELO oberon.njm.f2s.com) ([195.137.21.170]) by smtp.f2s.tiscali.co.uk with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Oct 2008 10:17:22 +0100 Received: from oberon.njm.f2s.com (localhost.njm.f2s.com [127.0.0.1]) by oberon.njm.f2s.com (8.14.3/8.14.3) with ESMTP id m9P9HMYt087034; Sat, 25 Oct 2008 10:17:22 +0100 (BST) (envelope-from njm@oberon.njm.f2s.com) Received: (from njm@localhost) by oberon.njm.f2s.com (8.14.3/8.14.3/Submit) id m9P9HLpg087033; Sat, 25 Oct 2008 10:17:21 +0100 (BST) (envelope-from njm) Date: Sat, 25 Oct 2008 10:17:21 +0100 From: "N.J. Mann" To: en0f Message-ID: <20081025091721.GA86967@oberon.njm.f2s.com> Mail-Followup-To: en0f , freebsd-hackers References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> <4902CC86.8030408@bokey.mine.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4902CC86.8030408@bokey.mine.nu> X-Operating-System: FreeBSD 7.1-PRERELEASE User-Agent: Mutt/1.5.18cvs (2008-07-02) Cc: freebsd-hackers Subject: Re: neophyte: tcsetattr() gives 22 error in i386, not in amd64? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 09:46:43 -0000 In message <4902CC86.8030408@bokey.mine.nu>, en0f (en0f@bokey.mine.nu) wrote: > Nate Eldredge wrote: > > On Fri, 24 Oct 2008, Steve Franks wrote: > > > >> Hi, > >> > >> I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which > >> was working under 7-STABLE amd64. Serial device is a ucom (silabs > >> cp2103). Permissions on /dev/cuaU0 look fine. Cutecom/Minicom > >> appears to open the port without error... > > > > I don't see anything obviously wrong, but I'd bet a bug related to > > 32/64-bit types. Can you post a complete piece of code that can be > > compiled and run and demonstrates the problem? Also, try compiling with > > -Wall -W and investigate any warnings that are produced. > > > > By the way, errno 22 is EINVAL, "Invalid argument". perror() is your > > friend. > > Strange freebsd doesnt document error numbers. man errno Cheers, Nick. -- From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 12:49:20 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A38B106566B for ; Sat, 25 Oct 2008 12:49:20 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id 196CE8FC17 for ; Sat, 25 Oct 2008 12:49:20 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so1209062rvf.43 for ; Sat, 25 Oct 2008 05:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=VPe+rlOZGq2i9S1qfcLKXVqKNlUJLQ8r+0PMc7BL5VM=; b=AdYDrbnxPLd2Nmom24YY5dlPovsUEOabpERGKTnQBnYABy9wHu9EQDBvwE9l0vLfDz 3EadR/+jkcuseOMkX9JADcZuy9s2BoY3WE3G6Rs9afiJQw8s1ryqd+PApK5iWXcHf7Th RZoToU2EgvPpoO9mAZvihcRkDmHcdbIzg20ak= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=I+gSyaKrM3d8QzEl40tSFoDEc9WjOGYbeA+NagZ8Wr79o68y22t5FJPL1ZFxXFGZwX 26bKQqo6ipQ3na/yu+iidVVnkEaGSpaefW7jAzeI4YcTNstOnc6QikRcZARNNiswyP8F bfML+y4l8qyQW1y2TbZkOxDrBd8JiQOqhbVUI= Received: by 10.141.122.1 with SMTP id z1mr1885517rvm.197.1224938959720; Sat, 25 Oct 2008 05:49:19 -0700 (PDT) Received: by 10.141.43.14 with HTTP; Sat, 25 Oct 2008 05:49:19 -0700 (PDT) Message-ID: <3c0b01820810250549r6c1f5614i27709c09d73a2018@mail.gmail.com> Date: Sat, 25 Oct 2008 08:49:19 -0400 From: "Alexander Sack" To: "Daniel O'Connor" In-Reply-To: <200810250958.15130.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <20081024104232.X21603@wojtek.tensor.gdynia.pl> <20081024125059.GE1137@server.vk2pj.dyndns.org> <200810250958.15130.doconnor@gsoft.com.au> Cc: freebsd-hackers@freebsd.org, Wojciech Puchar , freebsd-questions@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 12:49:20 -0000 On Fri, Oct 24, 2008 at 7:28 PM, Daniel O'Connor wrote: > On Friday 24 October 2008 23:20:59 Peter Jeremy wrote: >> >this will make system trying to bind 32-bit libs to 64-bit program. it >> >can't work >> >> rtld shouldn't attempt to bind 32-bit libs to 64-bit programs. > > The same problem happens with the Linux run time linker - it merrily tries to > link FreeBSD libraries to Linux binaries with predictable results.. > > One trick I use for that is to put a symlink in /compat/linux in the place the > problematic FreeBSD library is.. > > That said it would be really nice if it ignored incompatible libraries :) Yea. Also you go tot realize that if it didn't pick up /usr/lib32 shared objects then /lib would be searched as a last resort I believe since its the default path. As a result, things again would have just worked. Is this a bug or not in FreeBSD's rtld? -aps From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 13:57:14 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F132D106566C for ; Sat, 25 Oct 2008 13:57:14 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-gx0-f15.google.com (mail-gx0-f15.google.com [209.85.217.15]) by mx1.freebsd.org (Postfix) with ESMTP id 9003D8FC3B for ; Sat, 25 Oct 2008 13:57:14 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by gxk8 with SMTP id 8so757679gxk.19 for ; Sat, 25 Oct 2008 06:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=ixg4PlkT2Cf1H/PxB9KPUnpPlfT8Bi5i4mymm2qSnug=; b=RQLA0AKojqdyHEFxS5FQsGQBhvJy7w4/HWSj/KmRoAlzFOLK+girS44h47ZHhdtc7n BZTSMVIIF79X7xVxC/JRzosFT8W70bLLjFnrf/0EFw3S+UdN7D8lvEeV2ivWoxxdnHoq HOgRQAv3ojp7/43cFPfL+dodOEcXz/UYO5nK0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=GEuKaycXjN0POuOLA15vOjBtM2kIX1IAy6WMAeC8ZH6Yg7Ae7zXVYaaFnwrYpnNSRy mUvGjSVVve/USQgO4c5GvowbnKPapC/lww7bXkDj7DtQrW0H0YJHlSdU0mb4/egkCm42 m1OI4aY3NmdFvKy+jvgQoTk9/kRCqOMUiCk04= Received: by 10.150.220.19 with SMTP id s19mr2044890ybg.217.1224943033585; Sat, 25 Oct 2008 06:57:13 -0700 (PDT) Received: from kan.dnsalias.net (c-24-62-106-68.hsd1.ma.comcast.net [24.62.106.68]) by mx.google.com with ESMTPS id o29sm2152415elf.3.2008.10.25.06.57.12 (version=SSLv3 cipher=RC4-MD5); Sat, 25 Oct 2008 06:57:12 -0700 (PDT) Date: Sat, 25 Oct 2008 09:57:07 -0400 From: Alexander Kabaev To: "Alexander Sack" Message-ID: <20081025095707.5226d663@kan.dnsalias.net> In-Reply-To: <3c0b01820810250549r6c1f5614i27709c09d73a2018@mail.gmail.com> References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <20081024104232.X21603@wojtek.tensor.gdynia.pl> <20081024125059.GE1137@server.vk2pj.dyndns.org> <200810250958.15130.doconnor@gsoft.com.au> <3c0b01820810250549r6c1f5614i27709c09d73a2018@mail.gmail.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/2CvL_Ijs54QK/nIFimt1iHp"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Wojciech Puchar , freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 13:57:15 -0000 --Sig_/2CvL_Ijs54QK/nIFimt1iHp Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 25 Oct 2008 08:49:19 -0400 "Alexander Sack" wrote: >=20 > Is this a bug or not in FreeBSD's rtld? >=20 > -aps It is not. In case it was not clear before, I maintain that you _ask_ rtld for wrong behaviour and you get back what you asked for, down to the letter. 'Tasting' libraries just because someone somewhere want to screw up their configuration does not seem right to me at all. --=20 Alexander Kabaev --Sig_/2CvL_Ijs54QK/nIFimt1iHp Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFJAyWzQ6z1jMm+XZYRAsLcAJ94HFDpsdXLEFu6tM1HTaehE2etPACgiZ79 qRODaSlnqzoO4FYfPJNwoQQ= =ADcG -----END PGP SIGNATURE----- --Sig_/2CvL_Ijs54QK/nIFimt1iHp-- From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 15:00:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65AB41065679 for ; Sat, 25 Oct 2008 15:00:38 +0000 (UTC) (envelope-from en0f@bokey.mine.nu) Received: from mine.nu (60-242-68-238.static.tpgi.com.au [60.242.68.238]) by mx1.freebsd.org (Postfix) with ESMTP id 14BA68FC12 for ; Sat, 25 Oct 2008 15:00:37 +0000 (UTC) (envelope-from en0f@bokey.mine.nu) Received: by mine.nu (Postfix, from userid 1007) id 65FE4EBBB4; Sun, 26 Oct 2008 01:30:33 +1030 (CST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on machapuchre.volcano.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=2.0 tests=ALL_TRUSTED autolearn=ham version=3.2.5 Received: from machapuchre.volcano.com (localhost.localdomain [127.0.0.1]) by mine.nu (Postfix) with ESMTPSA id AA1E5EBBB3 for ; Sun, 26 Oct 2008 01:30:21 +1030 (CST) Message-ID: <49033485.5000105@bokey.mine.nu> Date: Sun, 26 Oct 2008 01:30:21 +1030 From: en0f User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: freebsd-hackers References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> <4902CC86.8030408@bokey.mine.nu> <20081025075648.GB55339@icarus.home.lan> <4902D1FA.3070003@bokey.mine.nu> <20081025081305.GA55683@icarus.home.lan> <20081025092157.GB86967@oberon.njm.f2s.com> In-Reply-To: <20081025092157.GB86967@oberon.njm.f2s.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: neophyte: tcsetattr() gives 22 error in i386, not in amd64? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 15:00:38 -0000 N.J. Mann wrote: > In message <20081025081305.GA55683@icarus.home.lan>, > Jeremy Chadwick (koitsu@FreeBSD.org) wrote: >> On Sat, Oct 25, 2008 at 06:29:54PM +1030, en0f wrote: >>> Jeremy Chadwick wrote: >>>> On Sat, Oct 25, 2008 at 06:06:38PM +1030, en0f wrote: >>>>> Nate Eldredge wrote: >>>>>> On Fri, 24 Oct 2008, Steve Franks wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which >>>>>>> was working under 7-STABLE amd64. Serial device is a ucom (silabs >>>>>>> cp2103). Permissions on /dev/cuaU0 look fine. Cutecom/Minicom >>>>>>> appears to open the port without error... >>>>>> I don't see anything obviously wrong, but I'd bet a bug related to >>>>>> 32/64-bit types. Can you post a complete piece of code that can be >>>>>> compiled and run and demonstrates the problem? Also, try compiling with >>>>>> -Wall -W and investigate any warnings that are produced. >>>>>> >>>>>> By the way, errno 22 is EINVAL, "Invalid argument". perror() is your >>>>>> friend. >>>>> Strange freebsd doesnt document error numbers. On POSIX, errno 22 is >>>>> EINVAL as well (documented in errno(3)). Is this applicable to freebsd? >>>> /usr/include/errno.h isn't documentation of error numbers? >>> Gahhhhh! But Jeremy, I dont have magic brains to work me way out of >>> source code :) >> You're confusing me. :P The errors in errno.h are commented, and it's >> quite readable. Of course, it matches what's in errno(3). > > Just in case someone actually goes looking for errno(3)... It is > actually errno(2), but I'm sure you knew that. :-) Was a good discussion :) Jeremy, not everyone's going to madly grep the fbsd source are they? :P Nick, I was actually reading some non-authoritative manpage online[1] so did not find one so got quite a bit excited! Found it now ;) Thanks for the pointer. I mainly subscribe to fbsd-hackers because of the pool of knowledge people have & share on the list. :) [1] !http://www.freebsd.org/cgi/man.cgi -- en0f From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 15:05:45 2008 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 4D9C9106567F; Sat, 25 Oct 2008 15:05:45 +0000 (UTC) (envelope-from thierry.herbelot@laposte.net) Received: from postfix1-g20.free.fr (postfix1-g20.free.fr [212.27.60.42]) by mx1.freebsd.org (Postfix) with ESMTP id D207A8FC0A; Sat, 25 Oct 2008 15:05:44 +0000 (UTC) (envelope-from thierry.herbelot@laposte.net) Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by postfix1-g20.free.fr (Postfix) with ESMTP id 34AF22D0A870; Sat, 25 Oct 2008 16:39:38 +0200 (CEST) Received: from smtp6-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp6-g19.free.fr (Postfix) with ESMTP id BF37E19799; Sat, 25 Oct 2008 16:39:36 +0200 (CEST) Received: from mail.herbelot.nom (bne75-4-82-227-159-103.fbx.proxad.net [82.227.159.103]) by smtp6-g19.free.fr (Postfix) with ESMTP id 58A6D1977D; Sat, 25 Oct 2008 16:39:35 +0200 (CEST) Received: from diversion.herbelot.nom (diversion.herbelot.nom [192.168.2.6]) by mail.herbelot.nom (8.14.1/8.14.1) with ESMTP id m9PEdNh2028982; Sat, 25 Oct 2008 16:39:25 +0200 (CEST) From: Thierry Herbelot To: Bruce Evans Date: Sat, 25 Oct 2008 16:39:17 +0200 User-Agent: KMail/1.9.10 References: <200810241818.37262.thierry@herbelot.com> <20081025203549.C76165@delplex.bde.org> In-Reply-To: <20081025203549.C76165@delplex.bde.org> X-Warning: Windows can lose your files X-Op-Sys: Le FriBi de la mort qui tue X-Org: TfH&Co X-MailScanner: Found to be clean MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200810251639.17586.thierry.herbelot@laposte.net> Cc: freebsd-fs@freebsd.org, hackers@freebsd.org Subject: Re: question about sb->st_blksize in src/sys/kern/vfs_vnops.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2008 15:05:45 -0000 Le Saturday 25 October 2008, Bruce Evans a écrit : > On Fri, 24 Oct 2008, Thierry Herbelot wrote: > > the [SUBJ] file contains the following extract (around line 705) : > > > > * Default to PAGE_SIZE after much discussion. > > * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct. > > */ > > > > sb->st_blksize = PAGE_SIZE; > > > > which arrived around four years ago, with revision 1.211 (see > > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/vfs_vnops.c.diff?r1=1. > >210;r2=1.211;f=h) > > Indeed, this was completely broken long ago (in 1.211). Before then, and > after 1.128, some cases worked as intended if not perfectly: > - regular files: file systems still set va_blksize to their idea of the > best i/o size (normally to the file system block size, which is > normally larger than PAGE_SIZE and probably better in all cases) and > this was used here. However, for regular files, the fs block size > and the application's i/o size are almost irrelevant in most cases > due to vfs clustering. Most large i/o's are done physically with > the cluster size (which due to a related bug suite ends up being > hard-coded to MAXPHYS (128K) at a minor cost when this is different > from the best size). > - disk files: non-broken device drivers set si_iosize_best to their idea > of the best i/o size (normally to the max i/o size, which is normally > better than PAGE_SIZE) and this was used here. The bogus default > of BLKDEV_IOSIZE was used for broken drivers (this is bogus because it > was for the buffer cache implementation for block devices which no > longer exist and was too small for them anyway). > - non-disk character-special files: the default of PAGE_SIZE was used. > The comment about defaulting to PAGE_SIZE was added in 1.128 and is > mainly for this case. Now the comment is nonsense since the value is > fixed, not a default. > - other file types (fifos, pipes, sockets, ...): these got the default of > PAGE_SIZE too. > > In rev.1.1, st_blksize was set to va_blksize in all cases. So file systems > were supposed to set va_blksize reasonably in all cases, but this is not > easy and they did nothing good except for regular files. agreed, anyway the comment by phk about using ioctl(DIOCGSECTORSIZE) applies. > > Versions between 1.2 and 1.127 did weird things like defaulting to DFLTPHYS > (64K) for most cdevs but using a small size like BLKDEV_IOSIZE (2K) for > disks. This gave nonsense like 64K buffers for slow tty devices (keyboards) > and 2K buffers for fast disks. At least for programs that trust st_blksize > o be reasonable. Fortunately, st_blsize is rarely used... > > > the net effect of this change is to decrease the block buffer size used > > in libc/stdio from 16 kbytes (derived from the underlying ufs partition) > > to PAGE_SIZE ==4 kbytes (fixed value), and consequently the I/O bandwidth > > is lowered (this is on a slow Flash). > > ... except it is used by stdio. (Another mess here is that stdio mostly > doesn't use its own BUFSIZ. It trusts st_blksize if fstat() to determine This is indeed what I saw, meandering between the libc and the vfs part of the kernel. In fact, I was essentially wondering if st_blksize was used *elsewhere*, and bumping the value could break some memory allocation ... > st_blksize works. Of course, the existence of BUFSIZ is a related > historical mistake -- no fixed size can work best for all cases. But > when BUFSIZ is used, it is an even worse default than PAGE_SIZE.) (as it is even smaller ?) > > It's interesting that you can see the difference. Clustering is especially > good for hiding slowness on slow devices. Maybe you are using a > configuration that makes clustering ineffective. Mounting the file system > with -o sync or equivalently, doing a sync after every (too-small) write > would do it. Otherwise, writes are normally delated until the next cluster > boundary. My use case is for small (buffered) writes to a file between 4 kbytes and 16 16 kbytes. For example, writing a 16-kbyte file with a st_blksize of 4k is twice as slow as with 16k (220 ms compared to 110). The penalty is less for 8k-byte (105 ms vs 66). > > > I have patched the kernel with a larger, fixed value (simply 4*PAGE_SIZE, > > to revert to the block size previoulsly used), and the kernel and world > > seem to be running fine. > > > > Seeing the XXX coment above, I'm a bit worried about keeping this new > > st_blksize value. > > > > are there any drawbacks with running with this bigger buffer size value ? > > Mostly it doesn't matter, since buffering (clustering) hides the > differences. (as seen before, mostly) > Without clustering, 16K is a much better default for disks > than 4K, though not as good as the non-default va_blksize for regular > files. Newer disks might prefer 32K or 64k, but then the fs block size > should also be increased from 16K. Otherwise, increasing the block size > usually reduces performance, by thrashing caches or increasing latencies. > With modern cache sizes and disk speeds, you won't see these effects for a > block size of 64K, so defaulting to 64K would be reasonable for disks. It > would be silly for keyboards, but with modern memory sizes you would notice > this even less than when it was that in old versions. OK, thanks for the answer : I will submit the change to more stress tests and hope to shake it all before putting it to production. TfH > > Bruce From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 16:39:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F327106566B for ; Sat, 25 Oct 2008 16:39:19 +0000 (UTC) (envelope-from george@m5p.com) Received: from mailhost.m5p.com (unknown [IPv6:2001:418:3fd::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1B1368FC12 for ; Sat, 25 Oct 2008 16:39:19 +0000 (UTC) (envelope-from george@m5p.com) Received: from m5p.com (parkstreet.m5p.com [IPv6:2001:418:3fd::1]) by mailhost.m5p.com (8.13.8/8.13.8) with ESMTP id m9PGdCfh044965 for ; Sat, 25 Oct 2008 12:39:17 -0400 (EDT) Received: (from george@localhost) by m5p.com (8.14.2/8.13.7/Submit) id m9PGdCsY082807; Sat, 25 Oct 2008 12:39:12 -0400 (EDT) Date: Sat, 25 Oct 2008 12:39:12 -0400 (EDT) Message-Id: <200810251639.m9PGdCsY082807@m5p.com> From: george+freebsd@m5p.com To: freebsd-hackers@freebsd.org X-Spam-Score: -0.001 () NO_RELAYS X-Scanned-By: MIMEDefang 2.57 on IPv6:2001:418:3fd::f7 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (mailhost.m5p.com [IPv6:2001:418:3fd::f7]); Sat, 25 Oct 2008 12:39:17 -0400 (EDT) Subject: Re: Severe DNS Problems, 6.2-RELEASE, BIND 9.5.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2008 16:39:19 -0000 Stupid configuration error on my part. I still had my old ISP's name servers configured in my named.conf forwarders statement, and they have apparently been responding to me for eighteen months -- until two days ago. Sorry for the noise! -- George Mitchell From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 17:10:54 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EE5D1065674 for ; Sat, 25 Oct 2008 17:10:54 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.232]) by mx1.freebsd.org (Postfix) with ESMTP id 599168FC0C for ; Sat, 25 Oct 2008 17:10:54 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so1280721rvf.43 for ; Sat, 25 Oct 2008 10:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=7LUgUgCHiqDxo3oJpCF7ZMoRovKReVdW6+G4S7Wq2Vk=; b=VImlslBKuakAjiQ9ceEIipUtHR/f+wMb4npSiTZ0fjGiWeIJETiBULmJe0ZEi7/aTF Ezq4OWvZK6liT4loPZQoc8LigWM76czRXD5VPF1yyhUsyvE6IrLQRgijXmWa2A5nYQll firXGThA9ZaZDmuQImVBBqgBG6OLFht+JFasA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=oL+fg1yFhsrcHjEBL2V7BNa/McxOrBXIteB8v+MlvyFv2vZp1alg4o7o8SfqQ4fgbb dCpgpkQsk2ALlQCMOFXesLlNY/4wTZG5DYN6YKIASo9jBCMJX6JVOLwo4NjHvbBdr4Rr xxfiV4z9yONnjDN59ErWdrLdlS32FVepF7fbc= Received: by 10.141.87.13 with SMTP id p13mr2024899rvl.93.1224954654008; Sat, 25 Oct 2008 10:10:54 -0700 (PDT) Received: by 10.141.43.14 with HTTP; Sat, 25 Oct 2008 10:10:53 -0700 (PDT) Message-ID: <3c0b01820810251010n17ba274dsf0a543b8287e8e65@mail.gmail.com> Date: Sat, 25 Oct 2008 13:10:53 -0400 From: "Alexander Sack" To: "Alexander Kabaev" In-Reply-To: <20081025095707.5226d663@kan.dnsalias.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <20081024104232.X21603@wojtek.tensor.gdynia.pl> <20081024125059.GE1137@server.vk2pj.dyndns.org> <200810250958.15130.doconnor@gsoft.com.au> <3c0b01820810250549r6c1f5614i27709c09d73a2018@mail.gmail.com> <20081025095707.5226d663@kan.dnsalias.net> Cc: Wojciech Puchar , freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 17:10:54 -0000 On Sat, Oct 25, 2008 at 9:57 AM, Alexander Kabaev wrote: > On Sat, 25 Oct 2008 08:49:19 -0400 > "Alexander Sack" wrote: > >> >> Is this a bug or not in FreeBSD's rtld? >> >> -aps > > It is not. In case it was not clear before, I maintain that you _ask_ > rtld for wrong behaviour and you get back what you asked for, down to > the letter. 'Tasting' libraries just because someone somewhere want to > screw up their configuration does not seem right to me at all. I maintain that rtld should not load 32-bit libraries for a 64-bit binary. That is WRONG anyway you look at it. And again, if it checked the arch type and skipped libutil.so.5 in /usr/lib32 it would fall back to checking /lib and things would work. Moreover, if /usr/lib had major number links just like /usr/lib32 has, this would again have worked without issue. I believe this will be fixed on the other side of the fence (not setting LD_LIBRARY_PATH to include /usr/lib32 to begin wtih) but still, my point still stands. -aps From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 18:55:53 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 870401065699 for ; Sat, 25 Oct 2008 18:55:53 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id 2D9D68FC08 for ; Sat, 25 Oct 2008 18:55:52 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so421988ywe.13 for ; Sat, 25 Oct 2008 11:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=9J3c9cogwvTOSTNbfckBcSeaQZ4NAjPn5wlC3LNLikg=; b=rUz/7jnd32jtMx7/8Vlm1K3f3JCRa+xZtPwlpUoT+N0D4h/EUO8kJyBI4u6K2AJmts eEszIPOtIB7sbS85fKEGO5AMedS51OxT/wWM+mxB+n2m/cpvqMwkJ3FguAi61Tpok5QB 106uxv7C8zadRPzEF4N5TFh6DtwPvMx1w6zO4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=LxMsnTgrn1b4K8flUx0kXrDBmmINlhNp6m+Ns5Q+DoKyLgEOPrB2tph/zqUIFoclYA ptMrWyIPplNsoWvFDd6BENPTV+KQQjF9Tx9x1BdNGu+QUt53B/RtvurCe0EUjVOolXdC KopJ7XQIQtMAyfRNlnCrTLihn+n2zEAefwJPI= Received: by 10.100.138.10 with SMTP id l10mr4560317and.25.1224960952021; Sat, 25 Oct 2008 11:55:52 -0700 (PDT) Received: from kan.dnsalias.net (c-24-62-106-68.hsd1.ma.comcast.net [24.62.106.68]) by mx.google.com with ESMTPS id c27sm7766946ana.37.2008.10.25.11.55.50 (version=SSLv3 cipher=RC4-MD5); Sat, 25 Oct 2008 11:55:51 -0700 (PDT) Date: Sat, 25 Oct 2008 14:55:45 -0400 From: Alexander Kabaev To: "Alexander Sack" Message-ID: <20081025145545.52db2d8a@kan.dnsalias.net> In-Reply-To: <3c0b01820810251010n17ba274dsf0a543b8287e8e65@mail.gmail.com> References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <20081024104232.X21603@wojtek.tensor.gdynia.pl> <20081024125059.GE1137@server.vk2pj.dyndns.org> <200810250958.15130.doconnor@gsoft.com.au> <3c0b01820810250549r6c1f5614i27709c09d73a2018@mail.gmail.com> <20081025095707.5226d663@kan.dnsalias.net> <3c0b01820810251010n17ba274dsf0a543b8287e8e65@mail.gmail.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/Z+.yhe2Ce2Xi21EF9z+UlZD"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Wojciech Puchar , freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Oct 2008 18:55:53 -0000 --Sig_/Z+.yhe2Ce2Xi21EF9z+UlZD Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 25 Oct 2008 13:10:53 -0400 "Alexander Sack" wrote: > On Sat, Oct 25, 2008 at 9:57 AM, Alexander Kabaev > wrote: > > On Sat, 25 Oct 2008 08:49:19 -0400 > > "Alexander Sack" wrote: > > > >> > >> Is this a bug or not in FreeBSD's rtld? > >> > >> -aps > > > > It is not. In case it was not clear before, I maintain that you > > _ask_ rtld for wrong behaviour and you get back what you asked for, > > down to the letter. 'Tasting' libraries just because someone > > somewhere want to screw up their configuration does not seem right > > to me at all. >=20 > I maintain that rtld should not load 32-bit libraries for a 64-bit > binary. That is WRONG anyway you look at it. And again, if it checked > the arch type and skipped libutil.so.5 in /usr/lib32 it would fall > back to checking /lib and things would work. Moreover, if /usr/lib > had major number links just like /usr/lib32 has, this would again have > worked without issue. >=20 > I believe this will be fixed on the other side of the fence (not > setting LD_LIBRARY_PATH to include /usr/lib32 to begin wtih) but > still, my point still stands. >=20 > -aps It doesn't. Stop feeding 32 bit libraries and it won't try to load them. It is as simple as that. For complex scenarious we do provide LD_32_ family of environment variables and if you refuse using them and insist on sticking with clearly broken configuration, it your problem, not rtld's. --=20 Alexander Kabaev --Sig_/Z+.yhe2Ce2Xi21EF9z+UlZD Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFJA2uyQ6z1jMm+XZYRAik6AJ9w8pbI1Y4uSXD8ujbzRlEQWvRhhwCg1qmk xwQnSb9dFlrSBiroH4pgF0Q= =OZK3 -----END PGP SIGNATURE----- --Sig_/Z+.yhe2Ce2Xi21EF9z+UlZD-- From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 19:46:24 2008 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 C018C1065671; Sat, 25 Oct 2008 19:46:24 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx10.syd.optusnet.com.au (fallbackmx10.syd.optusnet.com.au [211.29.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id 66B8A8FC22; Sat, 25 Oct 2008 19:46:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by fallbackmx10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m9PB9NuK027440; Sat, 25 Oct 2008 22:09:23 +1100 Received: from c122-106-151-199.carlnfd1.nsw.optusnet.com.au (c122-106-151-199.carlnfd1.nsw.optusnet.com.au [122.106.151.199]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m9PB9HtJ029625 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Oct 2008 22:09:20 +1100 Date: Sat, 25 Oct 2008 22:09:17 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Thierry Herbelot In-Reply-To: <200810241818.37262.thierry@herbelot.com> Message-ID: <20081025203549.C76165@delplex.bde.org> References: <200810241818.37262.thierry@herbelot.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Sat, 25 Oct 2008 19:57:06 +0000 Cc: freebsd-fs@FreeBSD.org, hackers@FreeBSD.org Subject: Re: question about sb->st_blksize in src/sys/kern/vfs_vnops.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2008 19:46:24 -0000 On Fri, 24 Oct 2008, Thierry Herbelot wrote: > the [SUBJ] file contains the following extract (around line 705) : > > * Default to PAGE_SIZE after much discussion. > * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct. > */ > > sb->st_blksize = PAGE_SIZE; > > which arrived around four years ago, with revision 1.211 (see > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/vfs_vnops.c.diff?r1=1.210;r2=1.211;f=h) Indeed, this was completely broken long ago (in 1.211). Before then, and after 1.128, some cases worked as intended if not perfectly: - regular files: file systems still set va_blksize to their idea of the best i/o size (normally to the file system block size, which is normally larger than PAGE_SIZE and probably better in all cases) and this was used here. However, for regular files, the fs block size and the application's i/o size are almost irrelevant in most cases due to vfs clustering. Most large i/o's are done physically with the cluster size (which due to a related bug suite ends up being hard-coded to MAXPHYS (128K) at a minor cost when this is different from the best size). - disk files: non-broken device drivers set si_iosize_best to their idea of the best i/o size (normally to the max i/o size, which is normally better than PAGE_SIZE) and this was used here. The bogus default of BLKDEV_IOSIZE was used for broken drivers (this is bogus because it was for the buffer cache implementation for block devices which no longer exist and was too small for them anyway). - non-disk character-special files: the default of PAGE_SIZE was used. The comment about defaulting to PAGE_SIZE was added in 1.128 and is mainly for this case. Now the comment is nonsense since the value is fixed, not a default. - other file types (fifos, pipes, sockets, ...): these got the default of PAGE_SIZE too. In rev.1.1, st_blksize was set to va_blksize in all cases. So file systems were supposed to set va_blksize reasonably in all cases, but this is not easy and they did nothing good except for regular files. Versions between 1.2 and 1.127 did weird things like defaulting to DFLTPHYS (64K) for most cdevs but using a small size like BLKDEV_IOSIZE (2K) for disks. This gave nonsense like 64K buffers for slow tty devices (keyboards) and 2K buffers for fast disks. At least for programs that trust st_blksize o be reasonable. Fortunately, st_blsize is rarely used... > the net effect of this change is to decrease the block buffer size used in > libc/stdio from 16 kbytes (derived from the underlying ufs partition) to > PAGE_SIZE ==4 kbytes (fixed value), and consequently the I/O bandwidth is > lowered (this is on a slow Flash). ... except it is used by stdio. (Another mess here is that stdio mostly doesn't use its own BUFSIZ. It trusts st_blksize if fstat() to determine st_blksize works. Of course, the existence of BUFSIZ is a related historical mistake -- no fixed size can work best for all cases. But when BUFSIZ is used, it is an even worse default than PAGE_SIZE.) It's interesting that you can see the difference. Clustering is especially good for hiding slowness on slow devices. Maybe you are using a configuration that makes clustering ineffective. Mounting the file system with -o sync or equivalently, doing a sync after every (too-small) write would do it. Otherwise, writes are normally delated until the next cluster boundary. > I have patched the kernel with a larger, fixed value (simply 4*PAGE_SIZE, to > revert to the block size previoulsly used), and the kernel and world seem to > be running fine. > > Seeing the XXX coment above, I'm a bit worried about keeping this new > st_blksize value. > > are there any drawbacks with running with this bigger buffer size value ? Mostly it doesn't matter, since buffering (clustering) hides the differences. Without clustering, 16K is a much better default for disks than 4K, though not as good as the non-default va_blksize for regular files. Newer disks might prefer 32K or 64k, but then the fs block size should also be increased from 16K. Otherwise, increasing the block size usually reduces performance, by thrashing caches or increasing latencies. With modern cache sizes and disk speeds, you won't see these effects for a block size of 64K, so defaulting to 64K would be reasonable for disks. It would be silly for keyboards, but with modern memory sizes you would notice this even less than when it was that in old versions. Bruce