From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 4 18:34:35 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD54216A4CF for ; Sun, 4 Apr 2004 18:34:35 -0700 (PDT) Received: from smtp.dkm.cz (smtp.dkm.cz [62.24.64.34]) by mx1.FreeBSD.org (Postfix) with SMTP id 5249543D58 for ; Sun, 4 Apr 2004 18:34:34 -0700 (PDT) (envelope-from neuhauser@chello.cz) Received: (qmail 14234 invoked by uid 0); 5 Apr 2004 01:34:30 -0000 Received: from r3al16.mistral.cz (HELO isis.wad.cz) (213.220.229.16) by smtp.dkm.cz with SMTP; 5 Apr 2004 01:34:30 -0000 Received: by isis.wad.cz (Postfix, from userid 1001) id CE16F2FDA01; Mon, 5 Apr 2004 02:35:53 +0200 (CEST) Date: Mon, 5 Apr 2004 02:35:53 +0200 From: Roman Neuhauser To: freebsd-hackers Message-ID: <20040405003553.GG27087@isis.wad.cz> Mail-Followup-To: freebsd-hackers , markm@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: panic: random.ko X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2004 01:34:35 -0000 Booting a kernel with random compiled in, and load_random=YES in loader.conf causes a panic very similar to the one described here: http://lists.freebsd.org/pipermail/freebsd-alpha/2003-August/000656.html "Hi Mark, please fix random.ko" :-) If a backtrace would be useful, I can retype it in an email. On a related note, how do I make loader(8) ignore loader.conf? -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 4 19:02:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5137B16A4CE; Sun, 4 Apr 2004 19:02:10 -0700 (PDT) Received: from mtaw4.prodigy.net (mtaw4.prodigy.net [64.164.98.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 405A543D1D; Sun, 4 Apr 2004 19:02:10 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (c7c4ccc97540fa614c0a847c180280f4@adsl-67-115-73-128.dsl.lsan03.pacbell.net [67.115.73.128]) by mtaw4.prodigy.net (8.12.10/8.12.10) with ESMTP id i35228qW008038; Sun, 4 Apr 2004 19:02:08 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id E51A051C12; Sun, 4 Apr 2004 19:02:07 -0700 (PDT) Date: Sun, 4 Apr 2004 19:02:07 -0700 From: Kris Kennaway To: freebsd-hackers , markm@freebsd.org Message-ID: <20040405020207.GA44906@xor.obsecurity.org> References: <20040405003553.GG27087@isis.wad.cz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: <20040405003553.GG27087@isis.wad.cz> User-Agent: Mutt/1.4.2.1i Subject: Re: panic: random.ko X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2004 02:02:10 -0000 --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 05, 2004 at 02:35:53AM +0200, Roman Neuhauser wrote: > Booting a kernel with random compiled in, and load_random=3DYES in > loader.conf causes a panic very similar to the one described here: > http://lists.freebsd.org/pipermail/freebsd-alpha/2003-August/000656.html >=20 > "Hi Mark, please fix random.ko" :-) Sounds like a generic module problem that is known to exist on FreeBSD. "Don't do that" is the solution. You can unload the preloaded kernel and/or modules from the loader to prevent it from panicking at boot, then modify loader.conf. Kris --gKMricLos+KVdGMg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAcL4fWry0BWjoQKURAmI8AJ9ALVVV4VodoCYXAfdApXbz6zxWpQCfapvX FpHyHQ2eIGyTZup61hodTZ0= =2ctw -----END PGP SIGNATURE----- --gKMricLos+KVdGMg-- From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 5 05:08:41 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C8D116A4CF for ; Mon, 5 Apr 2004 05:08:41 -0700 (PDT) Received: from saci.ensmp.fr (saci.ensmp.fr [194.214.158.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id D221443D1D for ; Mon, 5 Apr 2004 05:08:40 -0700 (PDT) (envelope-from Jose-Marcio.Martins@ensmp.fr) Received: from ensmp.fr ([194.214.158.176]) by saci.ensmp.fr (sendmail 9.0.0.PreAlpha11) with ESMTP id S00000000406943D401; Mon, 5 Apr 2004 14:08:39 +0200 Message-ID: <40714C47.20802@ensmp.fr> Date: Mon, 05 Apr 2004 14:08:39 +0200 From: Jose Marcio Martins da Cruz Organization: Ecole des Mines de Paris User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0 X-Accept-Language: fr, en MIME-Version: 1.0 To: Dan Nelson References: <406D6CEF.9030501@ensmp.fr> <20040402205301.GD6724@dan.emsphone.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Pointers about CPU load measuring X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2004 12:08:41 -0000 Hello, Thanks Dan. This is the best. I also tried using kvm, but code is longer and the program shall run as root. I'm working on a daemon which shall evaluate CPU load and SHALL not run as root. Best regards, Jose-Marcio Dan Nelson wrote: > In the last episode (Apr 02), Dag-Erling Smorgrav said: > >>Jose Marcio Martins da Cruz writes: >> >>>Someone can send some pointers on how to measure global CPU load under >>>FreeBSD from a C program ? I'm looking for values for >>>idle/kernel/user, in a similar way as does top. Is there any pointer >>>or doc ?. I'd like to avoir browsing top code. >> >>Use sysctlbyname(3) to retrieve vm.loadavg, which is a struct loadavg >>(defined in ) > > > Actually the kern.cp_time variable might be better if you want > idle/kernel/user values. It returns a long cp_time[CPUSTATES]; the > states are listed in . Top calculates percentages by > keeping the previous interval values, calculating diffs, totaling up > the diffs, and setting percentage[cpustate] = diff[cpustate]/totaldiff. > -- --------------------------------------------------------------- Jose Marcio MARTINS DA CRUZ Tel. :(33) 01.40.51.93.41 Ecole des Mines de Paris http://j-chkmail.ensmp.fr 60, bd Saint Michel http://www.ensmp.fr/~martins 75272 - PARIS CEDEX 06 mailto:Jose-Marcio.Martins@ensmp.fr From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 5 11:50:16 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC01116A4CF for ; Mon, 5 Apr 2004 11:50:16 -0700 (PDT) Received: from smtp.distributel.net (cns2.distributel.NET [66.38.181.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B1F843D54 for ; Mon, 5 Apr 2004 11:50:16 -0700 (PDT) (envelope-from paul@colba.net) Received: from nat.mtl.distributel.net (OUT.NAT01.MTNDODS.distributel.NET [66.38.181.24]) by smtp.distributel.net (8.12.6/8.12.6) with ESMTP id i35IoFLs022257 for ; Mon, 5 Apr 2004 14:50:15 -0400 (EDT) Received: from colba.net (paul@[10.14.61.42])i35Hsa7w096289 for ; Mon, 5 Apr 2004 13:54:36 -0400 (EDT) (envelope-from paul@colba.net) Sender: paul@nat.mtl.distributel.net Message-ID: <4071AA46.84FB1731@colba.net> Date: Mon, 05 Apr 2004 14:49:42 -0400 From: Paul Khavkine Organization: DISTRIBUTEL X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.36 Subject: File system full X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2004 18:50:16 -0000 Hi folks. Today for i have noticed that the /tmp partition on one of our mail servers was reported as full. I have checked if there's any files in /tmp but found that it wasn't true. du reports that /tmp is only using 50K. After a few minutes the size changed from 100% to 66%. Even that makes no sense: %df -h .. /dev/amrd0s1f 492M 298M 155M 66% /tmp %du -skh /tmp/ 16K /tmp/ Any clues to why it behaves that way ? Thanx Paul From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 5 12:05:56 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3999B16A4CE for ; Mon, 5 Apr 2004 12:05:56 -0700 (PDT) Received: from asarian-host.net (mail.asarian-host.net [194.109.160.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D90043D31 for ; Mon, 5 Apr 2004 12:05:55 -0700 (PDT) SRS0=xikWNeB+=HB=asarian-host.net=admin@asarian-host.net) Comments: To protect the identity of the sender, certain header fields are either not shown, or masked. Anonymous email accounts can be requested by filling in the appropriate form at: https://asarian-host.net/cgi-bin/signup.cgi Received: (from root@localhost) by mail.asarian-host.net (8.12.11/8.12.11) id i35J5LQF032812 for freebsd-hackers@freebsd.org; Mon, 5 Apr 2004 21:05:21 +0200 (CEST) (envelope-from admin@asarian-host.net) From: Mark Received-SPF: pass (asarian-host.net: domain of admin@asarian-host.net designates sender IP as SASL permitted sender) Message-Id: <200404051905.I35J5KNN032792@asarian-host.net> Date: Mon, 05 Apr 2004 19:05:21 GMT X-Authenticated-Sender: admin@asarian-host.net X-Trace: LJ1ZUaobKvwXlXjNCcXfT5mRJe/fwCs2zTRIApoLgEKX9iPZr0UEmEtx9TGjQ8PPMprM6Q1w0MInSUIAFiP+jg== X-Complaints-To: abuse@asarian-host.net X-Abuse-Info: Please be sure to forward a copy of ALL headers, otherwise we are unable to process your complaint Organization: Asarian-host To: "Paul Khavkine" , References: <4071AA46.84FB1731@colba.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Auth: Asarian-host PGP signature iQEVAwUAQHGt8TFqW1BleBN9AQEyJAf6A+XFxrPTyFqFifyE8VglignrsqBxJ74f WBKEOUGB4sAorTP/OqtpGgLAoeogLGcoO4GVlRboNCsKzpDcESVMOOJgaSPIbu9h 075GD8IaWMQCeA7FG01KtTSjZq4gfOCLizVnOUrClKKNGNcv2KgSjpPjq7bkbObv OwEpkPwPQhnI5wFyypHTXQqmXegjd6ktFDelB+IPH95/eDYMu9XoqIT0G2reNAG4 dpGSZT6/MVbZ4OmSCXfdqIjMjbbsekzP2SDSq+aDcvQevqV5ePWGSOJ5GihMzAHv kM0eqIpUnjiPy3Q5Tx0aT+3ZaOLRantKAelApGQMUiaaf5bsxKuybQ== =+3/P Subject: Re: File system full X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2004 19:05:56 -0000 Paul Khavkine wrote: > Today for i have noticed that the /tmp partition on one of our mail > servers was reported as > full. I have checked if there's any files in /tmp but found that it > wasn't true. > > > du reports that /tmp is only using 50K. > > After a few minutes the size changed from 100% to 66%. > > Even that makes no sense: That would probably be the 'softupdates' effect. It was full, then whatever filled it got deleted; and, due to the softupdates delay, you see it gradually be freed again. - Mark From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 5 12:08:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ACF5C16A4CE for ; Mon, 5 Apr 2004 12:08:29 -0700 (PDT) Received: from smtp.distributel.net (cns2.distributel.NET [66.38.181.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 626D343D45 for ; Mon, 5 Apr 2004 12:08:29 -0700 (PDT) (envelope-from paul@colba.net) Received: from nat.mtl.distributel.net (OUT.NAT01.MTNDODS.distributel.NET [66.38.181.24]) by smtp.distributel.net (8.12.6/8.12.6) with ESMTP id i35J8QLs025239; Mon, 5 Apr 2004 15:08:26 -0400 (EDT) Received: from colba.net (paul@[10.14.61.42])i35ICl7w096347; Mon, 5 Apr 2004 14:12:47 -0400 (EDT) (envelope-from paul@colba.net) Sender: paul@nat.mtl.distributel.net Message-ID: <4071AE8A.FB1C582B@colba.net> Date: Mon, 05 Apr 2004 15:07:54 -0400 From: Paul Khavkine Organization: DISTRIBUTEL X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: Mark References: <4071AA46.84FB1731@colba.net> <200404051905.I35J5KNN032792@asarian-host.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.36 cc: freebsd-hackers@freebsd.org Subject: Re: File system full X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2004 19:08:29 -0000 Well it did go down to 63% now but the partition is COMPLETELY empty, 16K used. Even 63% doesn't make sense. How long for softupdates to flush all deleted data usually ? The box is 4.6-STABLE BTW. Thanx Paul Mark wrote: > Paul Khavkine wrote: > > > Today for i have noticed that the /tmp partition on one of our mail > > servers was reported as > > full. I have checked if there's any files in /tmp but found that it > > wasn't true. > > > > > > du reports that /tmp is only using 50K. > > > > After a few minutes the size changed from 100% to 66%. > > > > Even that makes no sense: > > That would probably be the 'softupdates' effect. It was full, then whatever > filled it got deleted; and, due to the softupdates delay, you see it > gradually be freed again. > > - Mark From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 5 12:10:44 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78D0416A4CE for ; Mon, 5 Apr 2004 12:10:44 -0700 (PDT) Received: from malasada.lava.net (malasada.lava.net [64.65.64.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EA2F43D2D for ; Mon, 5 Apr 2004 12:10:44 -0700 (PDT) (envelope-from cliftonr@lava.net) Received: by malasada.lava.net (Postfix, from userid 102) id 41E16153882; Mon, 5 Apr 2004 09:10:38 -1000 (HST) Date: Mon, 5 Apr 2004 09:10:37 -1000 From: Clifton Royston To: Paul Khavkine Message-ID: <20040405191037.GA17961@lava.net> Mail-Followup-To: Paul Khavkine , freebsd-hackers@freebsd.org References: <20040405190053.8145D16A4D1@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040405190053.8145D16A4D1@hub.freebsd.org> User-Agent: Mutt/1.4.2i cc: freebsd-hackers@freebsd.org Subject: Re: File system full X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2004 19:10:44 -0000 On Mon, Apr 05, 2004 at 12:00:53PM -0700, freebsd-hackers-request@freebsd.org wrote: > Date: Mon, 05 Apr 2004 14:49:42 -0400 > From: Paul Khavkine > Subject: File system full > To: freebsd-hackers@freebsd.org ... > > Today for i have noticed that the /tmp partition on one of our mail > servers was reported as > full. I have checked if there's any files in /tmp but found that it > wasn't true. > > du reports that /tmp is only using 50K. > > After a few minutes the size changed from 100% to 66%. > > Even that makes no sense: > > %df -h > .. > /dev/amrd0s1f 492M 298M 155M 66% /tmp > > %du -skh /tmp/ > 16K /tmp/ > > > Any clues to why it behaves that way ? Almost certainly a classic all-Un*x problem: There are long-lived running processes holding already-deleted files open in /tmp. Such files have already removed from the directories, and hence are not visible to ls or du, but can not be freed by the operating system until the process which opened them terminates, hence their space shows up in df and is not free for allocation. This can be a form of local DOS, but it's more likely a coding/design error. I've particularly run into this with Apache + mod_perl on a high-load website. Apache keeps processes around for a relatively long time, and in the persistent perl environment, if files are not explicitly closed they remain open by the interpreter - so a Perl script which creates temp files and doesn't explicitly close them at the end of each execution pass can really rack up the disk space with "invisible" files. -- Clifton -- Clifton Royston -- cliftonr@tikitechnologies.com Tiki Technologies Lead Programmer/Software Architect Did you ever fly a kite in bed? Did you ever walk with ten cats on your head? Did you ever milk this kind of cow? Well we can do it. We know how. If you never did, you should. These things are fun, and fun is good. -- Dr. Seuss From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 5 12:14:27 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B84BB16A4CE for ; Mon, 5 Apr 2004 12:14:27 -0700 (PDT) Received: from smtp.distributel.net (cns2.distributel.NET [66.38.181.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52D3443D1D for ; Mon, 5 Apr 2004 12:14:27 -0700 (PDT) (envelope-from paul@colba.net) Received: from nat.mtl.distributel.net (OUT.NAT01.MTNDODS.distributel.NET [66.38.181.24]) by smtp.distributel.net (8.12.6/8.12.6) with ESMTP id i35JEQLs026296; Mon, 5 Apr 2004 15:14:26 -0400 (EDT) Received: from colba.net (paul@[10.14.61.42])i35IIl7w096364; Mon, 5 Apr 2004 14:18:48 -0400 (EDT) (envelope-from paul@colba.net) Sender: paul@nat.mtl.distributel.net Message-ID: <4071AFF2.50790D48@colba.net> Date: Mon, 05 Apr 2004 15:13:54 -0400 From: Paul Khavkine Organization: DISTRIBUTEL X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: Clifton Royston References: <20040405190053.8145D16A4D1@hub.freebsd.org> <20040405191037.GA17961@lava.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.36 cc: freebsd-hackers@freebsd.org Subject: Re: File system full X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2004 19:14:27 -0000 I see. Any way to find out what process is doing it ? I doubt it's a local DoS since noone has shell access to the machine. Thanx Paul Clifton Royston wrote: > On Mon, Apr 05, 2004 at 12:00:53PM -0700, freebsd-hackers-request@freebsd.org wrote: > > Date: Mon, 05 Apr 2004 14:49:42 -0400 > > From: Paul Khavkine > > Subject: File system full > > To: freebsd-hackers@freebsd.org > ... > > > > Today for i have noticed that the /tmp partition on one of our mail > > servers was reported as > > full. I have checked if there's any files in /tmp but found that it > > wasn't true. > > > > du reports that /tmp is only using 50K. > > > > After a few minutes the size changed from 100% to 66%. > > > > Even that makes no sense: > > > > %df -h > > .. > > /dev/amrd0s1f 492M 298M 155M 66% /tmp > > > > %du -skh /tmp/ > > 16K /tmp/ > > > > > > Any clues to why it behaves that way ? > > Almost certainly a classic all-Un*x problem: > > There are long-lived running processes holding already-deleted files > open in /tmp. Such files have already removed from the directories, > and hence are not visible to ls or du, but can not be freed by the > operating system until the process which opened them terminates, hence > their space shows up in df and is not free for allocation. This can be > a form of local DOS, but it's more likely a coding/design error. > > I've particularly run into this with Apache + mod_perl on a high-load > website. Apache keeps processes around for a relatively long time, and > in the persistent perl environment, if files are not explicitly closed > they remain open by the interpreter - so a Perl script which creates > temp files and doesn't explicitly close them at the end of each > execution pass can really rack up the disk space with "invisible" > files. > > -- Clifton > > -- > Clifton Royston -- cliftonr@tikitechnologies.com > Tiki Technologies Lead Programmer/Software Architect > Did you ever fly a kite in bed? Did you ever walk with ten cats on your head? > Did you ever milk this kind of cow? Well we can do it. We know how. > If you never did, you should. These things are fun, and fun is good. > -- Dr. Seuss From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 5 12:20:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BBEC16A4CE for ; Mon, 5 Apr 2004 12:20:55 -0700 (PDT) Received: from malasada.lava.net (malasada.lava.net [64.65.64.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A63843D3F for ; Mon, 5 Apr 2004 12:20:53 -0700 (PDT) (envelope-from cliftonr@lava.net) Received: by malasada.lava.net (Postfix, from userid 102) id D9502153882; Mon, 5 Apr 2004 09:20:52 -1000 (HST) Date: Mon, 5 Apr 2004 09:20:52 -1000 From: Clifton Royston To: Paul Khavkine Message-ID: <20040405192052.GC17961@lava.net> Mail-Followup-To: Paul Khavkine , freebsd-hackers@freebsd.org References: <20040405190053.8145D16A4D1@hub.freebsd.org> <20040405191037.GA17961@lava.net> <4071AFF2.50790D48@colba.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4071AFF2.50790D48@colba.net> User-Agent: Mutt/1.4.2i cc: freebsd-hackers@freebsd.org Subject: Re: File system full X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2004 19:20:55 -0000 On Mon, Apr 05, 2004 at 03:13:54PM -0400, Paul Khavkine wrote: > I see. > > Any way to find out what process is doing it ? > > I doubt it's a local DoS since noone has shell access to the machine. > > Thanx > Paul You should be able to use fstat (or lsof, if you have it installed) to find what files are currently open by running processes, and look through the output for files in /tmp. man fstat, and look at the -f option. -- Clifton -- Clifton Royston -- cliftonr@tikitechnologies.com Tiki Technologies Lead Programmer/Software Architect Did you ever fly a kite in bed? Did you ever walk with ten cats on your head? Did you ever milk this kind of cow? Well we can do it. We know how. If you never did, you should. These things are fun, and fun is good. -- Dr. Seuss From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 6 01:15:45 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94ED216A4CE for ; Tue, 6 Apr 2004 01:15:45 -0700 (PDT) Received: from smtp.noos.fr (nan-smtp-17.noos.net [212.198.2.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3806943D2D for ; Tue, 6 Apr 2004 01:15:44 -0700 (PDT) (envelope-from spe@selectbourse.net) Received: (qmail 7733 invoked by uid 0); 6 Apr 2004 08:15:21 -0000 Received: from unknown (HELO a91821794s3ti7g) ([81.64.25.123]) (envelope-sender ) by 212.198.2.117 (qmail-ldap-1.03) with SMTP ; 6 Apr 2004 08:15:21 -0000 Message-ID: <003001c41baf$5316dad0$6400a8c0@a91821794s3ti7g> From: "Sebastien Petit" To: <"JINMEI Tatuya/ $B?@L"@C#:"H".FreeBSD.ORG (B )> References: <003b01c41b0f$b1e4fc90$bc0a270a@bum.sub.fr.hsbc> Date: Tue, 6 Apr 2004 10:15:29 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: freebsd-net@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Re: SOCK_RAW sockets and IPPROTO_AH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2004 08:15:45 -0000 Unfortunatly, I can't use bpf/pcap solution because I must do some setsockopts (like IP_MULTICAST_IF, IP_MULTICAST_TTL, IP_MULTICAST_ADD_MEMBER etc.) and this can't be done on bpf/pcap. When I'm using IPPROTO_VRRP (ip proto 112), All work fine (and other ip proto type I think). What is the reason that SOCK_RAW don't work with IPPROTO_AH (ip proto 51). For me, it's an IP packet in two cases. Is there a good way for making a patch with SOCK_RAW, IPPROTO_AH ? I've found another strange thing in SOCK_RAW with IPPROTO_VRRP (112) and IP_HDRINCL setted on it. All received packet contains an IP Header with a bad ip_len. If the packet is 60 bytes long, the ip->ip_len contains 40 bytes. When the packet is 100 bytes long, the ip->ip_len contains 80 bytes. So there is a difference of 20 bytes. I think that the ip header size is substract from ip_len by error on the kernel. What are you think about it ? Regards, Sebastien. -- spetit@selectbourse.com spe@selectbourse.net FreeVRRPd project http://www.b0l.org/ ----- Original Message ----- From: )> To: "Sebastien Petit" Cc: Sent: Tuesday, April 06, 2004 4:38 AM Subject: Re: SOCK_RAW sockets and IPPROTO_AH > >>>>> On Mon, 5 Apr 2004 15:12:49 +0200, > >>>>> "Sebastien Petit" said: > > > Hi, > > Is there a way to receive AH packets in userland with a SOCK_RAW socket ? > > ie: socket(AF_INET, SOCK_RAW, IPPROTO_AH) ? > > I found that this socket call doesn't work under FreeBSD. On OpenBSD, it works but a recvfrom/read doesn't return any AH packets when it was received on an interface. > > > Is there another proper way to receive AH packets in Userland under FreeBSD ? (bpf/pcap is not a solution because I want to have a socket opened for multicast join) > > Unfortunately, bpf/pcap is the only solution. > > JINMEI, Tatuya > Communication Platform Lab. > Corporate R&D Center, Toshiba Corp. > jinmei@isl.rdc.toshiba.co.jp > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 6 06:22:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4C1016A4CE for ; Tue, 6 Apr 2004 06:22:29 -0700 (PDT) Received: from gwdu60.gwdg.de (gwdu60.gwdg.de [134.76.8.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22F8743D49 for ; Tue, 6 Apr 2004 06:22:29 -0700 (PDT) (envelope-from kheuer2@gwdg.de) Received: from gwdu60.gwdg.de (localhost [127.0.0.1]) by gwdu60.gwdg.de (8.12.9p2/8.12.8) with ESMTP id i36DLCrB039184 for ; Tue, 6 Apr 2004 15:21:12 +0200 (CEST) (envelope-from kheuer2@gwdg.de) Received: from localhost (kheuer2@localhost)i36DLBNk039181 for ; Tue, 6 Apr 2004 15:21:12 +0200 (CEST) X-Authentication-Warning: gwdu60.gwdg.de: kheuer2 owned process doing -bs Date: Tue, 6 Apr 2004 15:21:11 +0200 (CEST) From: Konrad Heuer To: freebsd-hackers@freebsd.org Message-ID: <20040406152018.G30924@gwdu60.gwdg.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Critical mmap failure? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2004 13:22:30 -0000 I've a couple of systems running FreeBSD 4.9; they all share /usr and anything below by nfs. There are (at less) two applications that do not run or do not run correctly on one distinguished system, but correctly on each other machine. One application is mozilla; it stops shortly after invocation with the following error message: INTERNAL ERROR on Browser End: JavaPluginFactory5 init - no agent? System error?:: Cannot allocate memory Analyzing the problem with "truss" shows an error while mozilla calls "mmap": mmap(0xbfaef000,65536,0x3,0x400,-1,0x0) ERR#12 'Cannot allocate memory' mmap(0xbfade000,65536,0x3,0x400,-1,0x0) ERR#12 'Cannot allocate memory' On the other systems, there are no errors: mmap(0xbfaef000,65536,0x3,0x400,-1,0x0) = -1079054336 (0xbfaef000) mmap(0xbfade000,65536,0x3,0x400,-1,0x0) = -1079123968 (0xbfade000) * Other "mmap" calls that do not require MAP_STACK (0x400) do not lead to errors anywhere. * All kernels are compiled with -DVM_STACK since this is default on i386. * The value of the variable vm.max_proc_mmap is not higher on any of the systems which do well than on the problematic one. * The same holds for resource limits. * The machines in question are all DELL PowerEdge 2650, three with RAID controllers, one without. The main difference in hardware is that the system on wich the error occurs has 4 GB of memory, the others 2 GB. There are no significant differences in the kernel configuration files except driver entries for RAID or not. Any idea that may help is very welcome, since the other application that fails is a commercial linux binary calling "linux mmap" frequently and producing wrong data (possibly the return code of "mmap" isn't checked). This application is very important for us, and does not do anything than reading and writing data and calling "mmap". Best regards Konrad Heuer (kheuer2@gwdg.de) ____ ___ _______ GWDG / __/______ ___ / _ )/ __/ _ \ Am Fassberg / _// __/ -_) -_) _ |\ \/ // / 37077 Goettingen /_/ /_/ \__/\__/____/___/____/ Germany From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 6 11:27:45 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9262816A4CE for ; Tue, 6 Apr 2004 11:27:45 -0700 (PDT) Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0514243D31 for ; Tue, 6 Apr 2004 11:27:45 -0700 (PDT) (envelope-from schweikh@schweikhardt.net) Received: by bremen.shuttle.de (Postfix, from userid 10) id 717E63BEE3; Tue, 6 Apr 2004 20:26:05 +0200 (CEST) Received: from hal9000.schweikhardt.net (localhost [127.0.0.1]) i36IQ0xL017334 for ; Tue, 6 Apr 2004 20:26:00 +0200 (CEST) (envelope-from schweikh@hal9000.schweikhardt.net) Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.12.11/8.12.11/Submit) id i36IQ0JT017333 for hackers@FreeBSD.org; Tue, 6 Apr 2004 20:26:00 +0200 (CEST) (envelope-from schweikh) Date: Tue, 6 Apr 2004 20:26:00 +0200 From: Jens Schweikhardt To: hackers@FreeBSD.org Message-ID: <20040406182600.GA3907@schweikhardt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: make(1) guru question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2004 18:27:45 -0000 Fellow hackers, suppose you have a long list of files in a make variable V, exceeding kern.argmax. This means there is no way you can write a rule where $(V) is a command argument in any way shape or form. There is also no way to pass the value of V to xargs that I know of. For example with this Makefile: # Make V exceed kern.argmax (64K). V != jot 12440 all: @ echo $(V) This fails with echo:Argument list too long *** Error code 1 Furthermore the workaround of creating a process for each file in V with V != jot 12440 all: .for v in $(V) @ echo $(v) .endfor is not acceptable because it creates too much overhead for process creation (think of echo being an expensive command.) Question: is there any other way (short of increasing kern.argmax) to maybe divide and conquer the V contents by use of substitution magic? I'm thinking of something along repeatedly cramming N items in some variable and then calling echo less often. The original problem can be found in http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/52765 Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped) From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 6 12:30:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5984616A4CE for ; Tue, 6 Apr 2004 12:30:03 -0700 (PDT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4369643D48 for ; Tue, 6 Apr 2004 12:30:03 -0700 (PDT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.8) with ESMTP id i36JBZgd003022; Tue, 6 Apr 2004 12:11:35 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id i36JBZ6a003021; Tue, 6 Apr 2004 12:11:35 -0700 (PDT) (envelope-from rizzo) Date: Tue, 6 Apr 2004 12:11:35 -0700 From: Luigi Rizzo To: Jens Schweikhardt Message-ID: <20040406121135.A98012@xorpc.icir.org> References: <20040406182600.GA3907@schweikhardt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040406182600.GA3907@schweikhardt.net>; from schweikh@schweikhardt.net on Tue, Apr 06, 2004 at 08:26:00PM +0200 cc: hackers@freebsd.org Subject: Re: make(1) guru question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2004 19:30:03 -0000 On Tue, Apr 06, 2004 at 08:26:00PM +0200, Jens Schweikhardt wrote: > Fellow hackers, > > suppose you have a long list of files in a make variable V, exceeding > kern.argmax. This means there is no way you can write a rule where $(V) > is a command argument in any way shape or form. There is also no way to > pass the value of V to xargs that I know of. For example with this depending on the use, you might use something like make -V variable_name | xargs ... within the makefile. I got the suggestion from someone long ago when I had this problem with src/sys/conf/Makefile.i386 cheers luigi > Makefile: > > # Make V exceed kern.argmax (64K). > V != jot 12440 > all: > @ echo $(V) > > This fails with > > echo:Argument list too long > *** Error code 1 > > Furthermore the workaround of creating a process for each file in V with > > V != jot 12440 > all: > .for v in $(V) > @ echo $(v) > .endfor > > is not acceptable because it creates too much overhead for process > creation (think of echo being an expensive command.) Question: is there > any other way (short of increasing kern.argmax) to maybe divide and > conquer the V contents by use of substitution magic? I'm thinking of > something along repeatedly cramming N items in some variable and then > calling echo less often. > > The original problem can be found in > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/52765 > > Regards, > > Jens > -- > Jens Schweikhardt http://www.schweikhardt.net/ > SIGSIG -- signature too long (core dumped) > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 6 13:44:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8B7C16A4CE for ; Tue, 6 Apr 2004 13:44:06 -0700 (PDT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DBB143D54 for ; Tue, 6 Apr 2004 13:44:06 -0700 (PDT) (envelope-from ru@ip.net.ua) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i36KlmGD020651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Apr 2004 23:47:50 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.12.11/8.12.11) id i36KhXLu000601; Tue, 6 Apr 2004 23:43:33 +0300 (EEST) (envelope-from ru) Date: Tue, 6 Apr 2004 23:43:33 +0300 From: Ruslan Ermilov To: Luigi Rizzo Message-ID: <20040406204333.GD272@ip.net.ua> References: <20040406182600.GA3907@schweikhardt.net> <20040406121135.A98012@xorpc.icir.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0lnxQi9hkpPO77W3" Content-Disposition: inline In-Reply-To: <20040406121135.A98012@xorpc.icir.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: hackers@freebsd.org cc: Jens Schweikhardt Subject: Re: make(1) guru question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2004 20:44:07 -0000 --0lnxQi9hkpPO77W3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 06, 2004 at 12:11:35PM -0700, Luigi Rizzo wrote: > On Tue, Apr 06, 2004 at 08:26:00PM +0200, Jens Schweikhardt wrote: > > Fellow hackers, > >=20 > > suppose you have a long list of files in a make variable V, exceeding > > kern.argmax. This means there is no way you can write a rule where $(V) > > is a command argument in any way shape or form. There is also no way to > > pass the value of V to xargs that I know of. For example with this >=20 > depending on the use, you might use something like >=20 > make -V variable_name | xargs ... >=20 > within the makefile. I got the suggestion from someone long ago > when I had this problem with src/sys/conf/Makefile.i386 >=20 I can only confirm that this is the only known solution so far. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --0lnxQi9hkpPO77W3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAcxZ1Ukv4P6juNwoRAvcBAJ9qgrw8ReNI1+qRqqfPdglesuRMJwCeKvIj 1uNlIukSJwmnDu2q6/3hysw= =5fcZ -----END PGP SIGNATURE----- --0lnxQi9hkpPO77W3-- From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 6 15:50:32 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2199B16A4CF for ; Tue, 6 Apr 2004 15:50:32 -0700 (PDT) Received: from pony2pub.arc.nasa.gov (pony2pub.arc.nasa.gov [128.102.31.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0011943D2F for ; Tue, 6 Apr 2004 15:50:29 -0700 (PDT) (envelope-from jtoung@arc.nasa.gov) Received: from nren-194.arc.nasa.gov ([128.102.196.194] verified) by pony2pub.arc.nasa.gov (CommuniGate Pro SMTP 4.1.8) with ESMTP id 9301058 for freebsd-hackers@freebsd.org; Tue, 06 Apr 2004 15:48:39 -0700 Content-Type: text/plain; charset="us-ascii" From: Jerry Toung To: hackers Date: Tue, 6 Apr 2004 15:47:56 -0700 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200404061547.56145.jtoung@arc.nasa.gov> Subject: 5.2 & ipintrq X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jtoung@arc.nasa.gov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2004 22:50:32 -0000 Hello list, I am trying to port some code that I wrote from 5.0 to 5.2. What is the=20 equivalent of the code below for 5.2. 5.0: ifq =3D &ipintrq; s =3D splnet(); if (_IF_QFULL(ifq)) { _IF_DROP(ifq); m_freem(m); } else { IF_ENQUEUE(ifq,m); } splx(s); 5.2: ?????? if (!netisr_queue(NETISR_IP, m)) { printf("%s: queue full", __FUNCTION__) return ENOBUFS; } =20 Thank you, Jerry From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 6 21:27:56 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C376516A4CE; Tue, 6 Apr 2004 21:27:56 -0700 (PDT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 707F143D41; Tue, 6 Apr 2004 21:27:56 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (sccrmhc13) with ESMTP id <20040407042629016003hfgfe>; Wed, 7 Apr 2004 04:26:30 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id VAA41048; Tue, 6 Apr 2004 21:26:29 -0700 (PDT) Date: Tue, 6 Apr 2004 21:26:28 -0700 (PDT) From: Julian Elischer To: Barry Bouwsma In-Reply-To: <200404070340.i373exE00357@NOSPAM.spam.NOSPAM.spam.NOSPAM.dyndns.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: stable@freebsd.org cc: hackers@freebsd.org Subject: Re: HEADSUP!!! USB MFC committed.. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 04:27:56 -0000 let me have your patches.. 4.10 goes into code freeze tomorrow so I need them asap. I can get a pass from release engineering to put in fixes pas teh freeze if it's soon. On Wed, 7 Apr 2004, Barry Bouwsma wrote: > [sorry for the late followup. also, my address is ipv6-only; drop it and > I'll catch up from the archives after some time] > > > > On Sun, 29 Feb 2004, Julian Elischer wrote: > > > > The USB code in RELENG_4 has been updated to match that in -current. > > > Please test any USB devices that are critical to you BEFORE we release > > > 4.10 :-) > > > p.s. there are some more MFCs to come but they are minor > > (except for what looks like a major rewrite of parts of umass) > > Would it be possible to merge in the umass parts of -current that > enable all slots of a 6/8/whetever-in-1 USB card reader/writer > thingies to be detected? > > In source updated around 30.mar, building the umass -stable kernel > module only finds the CF slot. > > I've added a few dozen lines to the -current umass code and built > a module from that which appears to work as needed (meaning, I have > not had major problems, but I haven't stress-tested it) with the > -stable usb code and kernel I'm using. This gives me all sorts of > da* devices (see below). Unfortunately, adding EHCI support to the > usb.ko module causes panics with such a umass.ko module; adding an > EBUSY line to match -stable seems to make things better, but not > perfect (from what I can remember). The below result is with only > uhci/ohci support. > > My added-lines hack is not based on knowing what I'm doing, but rather > based on what appears superficially to work and is probably horribly > wrong. I believe the code to add support for the card readers was > added to -current something like a year ago, and may possibly be > found in a patch mentioned around that time by Bernd Walter -- as I > have not been online, I haven't been able to download it and check. > The -current diff appears to be between 1.79 and 1.80, but when > massaged into -stable, I don't get all the devices (can be my fault). > > My world/kernel/modules on the machine in question are a horrible > mongrel mix spanning the last couple of years and originate from > both -stable and adopted out of -current, so I hesitate to make a > fool of myself by publicly posting the added lines to umass.c from > -current to make it operate with my mostly-stable. > > (Actually, it looks like all I did was to un-re-implement > cam_calc_geometry() back to what was in -stable, and to say that > I don't have a ZIP_100 so I could junk that portion of the code > just to get it to compile quietly, rather than to make it work.) > > > thanks > barry bouwsma > > Preloaded elf module "usb_NEW.ko" at 0xc042f600. > Preloaded elf module "ums_NEW.ko" at 0xc042f6a0. > Preloaded elf module "ugen_NEW.ko" at 0xc042f740. > Preloaded elf module "umass_CURRENT.ko" at 0xc042f7e0. > [...] > umass1: OTi USB 7-in-1 Card Reader, rev 2.00/2.00, addr 4 > umass1:1:1:-1: Attached to scbus1 > [...] > umass2: SMSC 223 USB97C223, rev 2.00/1.95, addr 7 > umass2:2:2:-1: Attached to scbus2 > [...] > Creating DISK da0 > Creating DISK da1 > Creating DISK da2 > Creating DISK da3 > Creating DISK da4 > Creating DISK da5 > Creating DISK da6 > Creating DISK da7 > Creating DISK da8 > [snipping for brevity] > da0 at umass-sim0 bus 0 target 0 lun 0 > da0: Fixed Direct Access SCSI-0 device > da0: Serial Number A80A06AE > da0: 1.000MB/s transfers > da0: 239371MB (490232832 512 byte sectors: 255H 63S/T 30515C) > > da1 at umass-sim1 bus 1 target 0 lun 0 > da1: Removable Direct Access SCSI-0 device > [Serial Number lines from this umass device are a control-underscore] > da1: 1.000MB/s transfers > > da5 at umass-sim2 bus 2 target 0 lun 0 > da5: Removable Direct Access SCSI-0 device > da5: Serial Number > da5: 1.000MB/s transfers > > da2 at umass-sim1 bus 1 target 0 lun 1 > da2: Removable Direct Access SCSI-0 device > da2: 1.000MB/s transfers > > da3 at umass-sim1 bus 1 target 0 lun 2 > da3: Removable Direct Access SCSI-0 device > da3: 1.000MB/s transfers > da3: 60MB (124160 512 byte sectors: 64H 32S/T 60C) > > da6 at umass-sim2 bus 2 target 0 lun 1 > da6: Removable Direct Access SCSI-0 device > da6: Serial Number > da6: 1.000MB/s transfers > > da4 at umass-sim1 bus 1 target 0 lun 3 > da4: Removable Direct Access SCSI-0 device > da4: 1.000MB/s transfers > > da7 at umass-sim2 bus 2 target 0 lun 2 > da7: Removable Direct Access SCSI-0 device > da7: Serial Number > da7: 1.000MB/s transfers > > da8 at umass-sim2 bus 2 target 0 lun 3 > da8: Removable Direct Access SCSI-0 device > da8: Serial Number > da8: 1.000MB/s transfers > da8: 243MB (498176 512 byte sectors: 64H 32S/T 243C) > > From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 6 20:44:09 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F11C16A4CE; Tue, 6 Apr 2004 20:44:09 -0700 (PDT) Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NOSPAM.dyndns.dk (does-d9b9190c.pool.mediaWays.net [217.185.25.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC56743D5A; Tue, 6 Apr 2004 20:43:22 -0700 (PDT) (envelope-from bounce@NOSPAM.dyndns.dk) Received: from NOSPAM.spam.NOSPAM.spam.NOSPAM.dyndns.dk (NOSPAM.spam.NOSPAM.spam.NOSPAM.dyndns.dk [2002:d9b9:190c:0:200:c0ff:fefc:19aa]) (8.11.6/8.11.6-SPAMMERS-DeLiGHt) with ESMTP id i373fMY01015 verified NO); Wed, 7 Apr 2004 05:41:23 +0200 (CEST) (envelope-from bounce@NOSPAM.dyndns.dk) Received: (from beer@localhost)i373exE00357; Wed, 7 Apr 2004 05:40:59 +0200 (CEST) (envelope-from bounce@NOSPAM.dyndns.dk) Date: Wed, 7 Apr 2004 05:40:59 +0200 (CEST) Message-Id: <200404070340.i373exE00357@NOSPAM.spam.NOSPAM.spam.NOSPAM.dyndns.dk> X-Authentication-Warning: NOSPAM.spam.NOSPAM.spam.NOSPAM.dyndns.dk: beer set sender to bounce@NOSPAM.dyndns.dk using -f From: Barry Bouwsma To: hackers@freebsd.org, stable@freebsd.org References: X-Mailman-Approved-At: Wed, 07 Apr 2004 05:02:25 -0700 cc: Julian Elischer Subject: Re: HEADSUP!!! USB MFC committed.. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 03:44:09 -0000 [sorry for the late followup. also, my address is ipv6-only; drop it and I'll catch up from the archives after some time] > On Sun, 29 Feb 2004, Julian Elischer wrote: > > The USB code in RELENG_4 has been updated to match that in -current. > > Please test any USB devices that are critical to you BEFORE we release > > 4.10 :-) > p.s. there are some more MFCs to come but they are minor > (except for what looks like a major rewrite of parts of umass) Would it be possible to merge in the umass parts of -current that enable all slots of a 6/8/whetever-in-1 USB card reader/writer thingies to be detected? In source updated around 30.mar, building the umass -stable kernel module only finds the CF slot. I've added a few dozen lines to the -current umass code and built a module from that which appears to work as needed (meaning, I have not had major problems, but I haven't stress-tested it) with the -stable usb code and kernel I'm using. This gives me all sorts of da* devices (see below). Unfortunately, adding EHCI support to the usb.ko module causes panics with such a umass.ko module; adding an EBUSY line to match -stable seems to make things better, but not perfect (from what I can remember). The below result is with only uhci/ohci support. My added-lines hack is not based on knowing what I'm doing, but rather based on what appears superficially to work and is probably horribly wrong. I believe the code to add support for the card readers was added to -current something like a year ago, and may possibly be found in a patch mentioned around that time by Bernd Walter -- as I have not been online, I haven't been able to download it and check. The -current diff appears to be between 1.79 and 1.80, but when massaged into -stable, I don't get all the devices (can be my fault). My world/kernel/modules on the machine in question are a horrible mongrel mix spanning the last couple of years and originate from both -stable and adopted out of -current, so I hesitate to make a fool of myself by publicly posting the added lines to umass.c from -current to make it operate with my mostly-stable. (Actually, it looks like all I did was to un-re-implement cam_calc_geometry() back to what was in -stable, and to say that I don't have a ZIP_100 so I could junk that portion of the code just to get it to compile quietly, rather than to make it work.) thanks barry bouwsma Preloaded elf module "usb_NEW.ko" at 0xc042f600. Preloaded elf module "ums_NEW.ko" at 0xc042f6a0. Preloaded elf module "ugen_NEW.ko" at 0xc042f740. Preloaded elf module "umass_CURRENT.ko" at 0xc042f7e0. [...] umass1: OTi USB 7-in-1 Card Reader, rev 2.00/2.00, addr 4 umass1:1:1:-1: Attached to scbus1 [...] umass2: SMSC 223 USB97C223, rev 2.00/1.95, addr 7 umass2:2:2:-1: Attached to scbus2 [...] Creating DISK da0 Creating DISK da1 Creating DISK da2 Creating DISK da3 Creating DISK da4 Creating DISK da5 Creating DISK da6 Creating DISK da7 Creating DISK da8 [snipping for brevity] da0 at umass-sim0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-0 device da0: Serial Number A80A06AE da0: 1.000MB/s transfers da0: 239371MB (490232832 512 byte sectors: 255H 63S/T 30515C) da1 at umass-sim1 bus 1 target 0 lun 0 da1: Removable Direct Access SCSI-0 device [Serial Number lines from this umass device are a control-underscore] da1: 1.000MB/s transfers da5 at umass-sim2 bus 2 target 0 lun 0 da5: Removable Direct Access SCSI-0 device da5: Serial Number da5: 1.000MB/s transfers da2 at umass-sim1 bus 1 target 0 lun 1 da2: Removable Direct Access SCSI-0 device da2: 1.000MB/s transfers da3 at umass-sim1 bus 1 target 0 lun 2 da3: Removable Direct Access SCSI-0 device da3: 1.000MB/s transfers da3: 60MB (124160 512 byte sectors: 64H 32S/T 60C) da6 at umass-sim2 bus 2 target 0 lun 1 da6: Removable Direct Access SCSI-0 device da6: Serial Number da6: 1.000MB/s transfers da4 at umass-sim1 bus 1 target 0 lun 3 da4: Removable Direct Access SCSI-0 device da4: 1.000MB/s transfers da7 at umass-sim2 bus 2 target 0 lun 2 da7: Removable Direct Access SCSI-0 device da7: Serial Number da7: 1.000MB/s transfers da8 at umass-sim2 bus 2 target 0 lun 3 da8: Removable Direct Access SCSI-0 device da8: Serial Number da8: 1.000MB/s transfers da8: 243MB (498176 512 byte sectors: 64H 32S/T 243C) From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 6 08:21:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2EBB516A4CE; Tue, 6 Apr 2004 08:21:11 -0700 (PDT) Received: from tachyon.jinmei.org (kame207.kame.net [203.178.141.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 591EA43D48; Tue, 6 Apr 2004 08:21:10 -0700 (PDT) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from ocean.jinmei.org (unknown [2001:200:0:4819:64a9:7819:e195:d1b1]) by tachyon.jinmei.org (Postfix) with ESMTP id 9C31F35135; Wed, 7 Apr 2004 00:20:35 +0900 (JST) Date: Wed, 07 Apr 2004 00:21:07 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: "Sebastien Petit" In-Reply-To: <003001c41baf$5316dad0$6400a8c0@a91821794s3ti7g> <200403211226.13690.spe@selectbourse.net> References: <003b01c41b0f$b1e4fc90$bc0a270a@bum.sub.fr.hsbc> <003001c41baf$5316dad0$6400a8c0@a91821794s3ti7g> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) Emacs/21.3 Mule/5.0 (SAKAKI) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: multipart/mixed; boundary="Multipart_Wed_Apr__7_00:21:07_2004-1" X-Mailman-Approved-At: Wed, 07 Apr 2004 05:02:55 -0700 cc: freebsd-net@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Re: SOCK_RAW sockets and IPPROTO_AH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2004 15:21:11 -0000 --Multipart_Wed_Apr__7_00:21:07_2004-1 Content-Type: text/plain; charset=US-ASCII >>>>> On Tue, 6 Apr 2004 10:15:29 +0200, >>>>> "Sebastien Petit" said: > Unfortunatly, I can't use bpf/pcap solution because I must do some > setsockopts (like IP_MULTICAST_IF, IP_MULTICAST_TTL, IP_MULTICAST_ADD_MEMBER > etc.) and this can't be done on bpf/pcap. > When I'm using IPPROTO_VRRP (ip proto 112), All work fine (and other ip > proto type I think). What is the reason that SOCK_RAW don't work with > IPPROTO_AH (ip proto 51). > For me, it's an IP packet in two cases. Let me check, why do you have to include AH by the application in the first place? Is that related to the question you made the other day (attached below)? JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp --Multipart_Wed_Apr__7_00:21:07_2004-1 Content-Type: message/rfc822 Return-Path: X-Mail-Format-Warning: Bad RFC2822 header formatting in >From jinmei Sun Mar 21 20:27:00 2004 Return-Path: X-Original-To: jinmei@shuttle.wide.toshiba.co.jp Delivered-To: jinmei@shuttle.wide.toshiba.co.jp Received: from shuttle.wide.toshiba.co.jp [202.249.10.124] by localhost with POP3 (fetchmail-6.2.4) for jinmei@localhost (single-drop); Sun, 21 Mar 2004 20:45:52 +0900 (JST) Received: from tsbgw.wide.toshiba.co.jp (tsbgw.wide.toshiba.co.jp [3ffe:501:100f:0:220:edff:fe2b:92c]) by shuttle.wide.toshiba.co.jp (Postfix) with ESMTP id 9D1EB15210 for ; Sun, 21 Mar 2004 20:27:00 +0900 (JST) Received: from maltese.wide.toshiba.co.jp (maltese.wide.toshiba.co.jp [202.249.10.99]) by tsbgw.wide.toshiba.co.jp (Postfix) with ESMTP id 7DC11330FB for ; Sun, 21 Mar 2004 20:27:00 +0900 (JST) Received: from isl.rdc.toshiba.co.jp (spiffy.isl.rdc.toshiba.co.jp [133.196.10.10]) by maltese.wide.toshiba.co.jp (8.9.1/8.9.1) with ESMTP id UAA24453 for ; Sun, 21 Mar 2004 20:27:00 +0900 (JST) Received: from mx4.toshiba.co.jp (mx4.toshiba.co.jp [133.199.160.112]) i2LBQx100075 for ; Sun, 21 Mar 2004 20:26:59 +0900 (JST) Received: from tsb-sgw2.toshiba.co.jp by toshiba.co.jp id UAA03644; Sun, 21 Mar 2004 20:26:59 +0900 (JST) Received: from inet-tsb5.toshiba.co.jp by tsb-sgw2.toshiba.co.jp with ESMTP id i2LBQwQD012005 for ; Sun, 21 Mar 2004 20:26:58 +0900 (JST) Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by inet-tsb5.toshiba.co.jp with ESMTP id i2LBQv4u013439 for ; Sun, 21 Mar 2004 20:26:57 +0900 (JST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 4E2FF569A6; Sun, 21 Mar 2004 03:26:38 -0800 (PST) (envelope-from owner-freebsd-net@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id E935816A4DC; Sun, 21 Mar 2004 03:26:36 -0800 (PST) Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB31816A4CE for ; Sun, 21 Mar 2004 03:26:22 -0800 (PST) Received: from smtp.noos.fr (nan-smtp-17.noos.net [212.198.2.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3C5343D2D for ; Sun, 21 Mar 2004 03:26:21 -0800 (PST) (envelope-from spe@selectbourse.net) Received: (qmail 19099 invoked by uid 0); 21 Mar 2004 11:26:20 -0000 Received: from unknown (HELO 192.168.0.3) ([81.64.25.123]) (envelope-sender ) by 212.198.2.117 (qmail-ldap-1.03) with SMTP for ; 21 Mar 2004 11:26:20 -0000 From: Sebastien Petit Organization: BSDShell To: freebsd-net@freebsd.org Date: Sun, 21 Mar 2004 12:26:13 +0100 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403211226.13690.spe@selectbourse.net> Subject: IPSec and setsockopt MULTICAST_IF interaction X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: owner-freebsd-net@freebsd.org Errors-To: owner-freebsd-net@freebsd.org X-UIDL: %!$"!=@7!!G&~"!h89!! X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on ocean.jinmei.org X-Spam-Status: No, hits=1.5 required=5.0 tests=RCVD_NUMERIC_HELO autolearn=no version=2.61 Hi Team, I want to use IPsec engine with AH Security Association and SPD on multicast destination adress. When I comment the setsockopt MULTICAST_IF option, all work fine and destination packets to the multicast adress have AH added before IP Header. But when I use the setsockopt MULTICAST_IF, no packets are sended from the interface (packet seems to be destroyed silently by kernel). Is there an issue about using MUTLICAST_IF option and IPsec ? Any help will be greatly appreciated. Regards, spe. -- spe@selectbourse.net _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" --Multipart_Wed_Apr__7_00:21:07_2004-1-- From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 7 09:18:00 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FF0616A4CE for ; Wed, 7 Apr 2004 09:18:00 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF2D043D2F for ; Wed, 7 Apr 2004 09:17:59 -0700 (PDT) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BBFjk-0005P5-00 for ; Wed, 07 Apr 2004 18:17:12 +0200 Received: from mulder.f5.com ([205.229.151.150]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 07 Apr 2004 18:17:12 +0200 Received: from atkin901 by mulder.f5.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 07 Apr 2004 18:17:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: othermark Date: Wed, 07 Apr 2004 09:17:09 -0700 Lines: 9 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: mulder.f5.com User-Agent: KNode/0.7.6 Sender: news Subject: polling for sio? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 16:18:00 -0000 I'm just looking into DEVICE_POLLING. Would it be difficult to add polling functionality to uart or sio? My main objective would be to get rid of silo overflows in the sio device for shared interrupt devices. -- othermark atkin901 at nospam dot yahoo dot com (!wired)?(coffee++):(wired); From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 7 09:49:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A25BA16A4CE for ; Wed, 7 Apr 2004 09:49:03 -0700 (PDT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CB5843D2D for ; Wed, 7 Apr 2004 09:49:03 -0700 (PDT) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: from dibbler.crodrigues.org (h00609772adf0.ne.client2.attbi.com[66.31.45.197]) by comcast.net (rwcrmhc12) with ESMTP id <2004040716322501400sg39ge>; Wed, 7 Apr 2004 16:32:25 +0000 Received: from dibbler.crodrigues.org (localhost.crodrigues.org [127.0.0.1]) i37GWOvF002990 for ; Wed, 7 Apr 2004 12:32:24 -0400 (EDT) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost) by dibbler.crodrigues.org (8.12.11/8.12.11/Submit) id i37GWOTJ002989 for freebsd-hackers@freebsd.org; Wed, 7 Apr 2004 12:32:24 -0400 (EDT) (envelope-from rodrigc) Date: Wed, 7 Apr 2004 12:32:23 -0400 From: Craig Rodrigues To: freebsd-hackers@freebsd.org Message-ID: <20040407163223.GA2981@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: Kernel debugging with a multiport serial card X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 16:49:03 -0000 Hi, I have a few FreeBSD machines with an RJ-45 serial connector on the motherboard. I would like to hook these machines up to a single FreeBSD PC with a multiport serial card and set it up to do kernel debugging. Can anyone recommend any multiport serial cards? Are there any cards with known problems? Thanks. -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 7 10:04:51 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 798A616A4CE for ; Wed, 7 Apr 2004 10:04:51 -0700 (PDT) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1352243D2F for ; Wed, 7 Apr 2004 10:04:51 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 16824 invoked from network); 7 Apr 2004 17:04:23 -0000 Received: from dsl017-045-168.spk4.dsl.speakeasy.net (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail1.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 7 Apr 2004 17:04:23 -0000 Received: from hydrogen.funkthat.com (elopip@localhost.funkthat.com [127.0.0.1])i37H4MOE057035; Wed, 7 Apr 2004 10:04:23 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i37H4MNR057034; Wed, 7 Apr 2004 10:04:22 -0700 (PDT) Date: Wed, 7 Apr 2004 10:04:22 -0700 From: John-Mark Gurney To: othermark Message-ID: <20040407170422.GF567@funkthat.com> Mail-Followup-To: othermark , freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-hackers@freebsd.org Subject: Re: polling for sio? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 17:04:51 -0000 othermark wrote this message on Wed, Apr 07, 2004 at 09:17 -0700: > I'm just looking into DEVICE_POLLING. Would it be difficult to add polling > functionality to uart or sio? My main objective would be to get rid of > silo overflows in the sio device for shared interrupt devices. I would say that more time would be better spent on either lowering your fifo levels (to make the interrupts trigger earlier), or fix sio so that COM_MULTIPORT (for shared interrupts) doesn't poll all sio devices, and instead it keeps track of which devices need to be polled for each interrupt (and possible use the AST/4 register to decide which ports to query).... uart already has most of this logic, but I haven't written an isa attachment for it to make use of the interrupt routing logic.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 7 10:07:23 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A32A16A4CE for ; Wed, 7 Apr 2004 10:07:23 -0700 (PDT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6571E43D53 for ; Wed, 7 Apr 2004 10:07:22 -0700 (PDT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru id i37H2CdF059850 for freebsd-hackers@freebsd.org.checked; (8.12.8/vak/2.1) Wed, 7 Apr 2004 21:02:12 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (hi.cronyx.ru [144.206.181.94]) by hanoi.cronyx.ru with ESMTP id i37GxvfJ059636; (8.12.8/vak/2.1) Wed, 7 Apr 2004 20:59:57 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <40743388.3010901@cronyx.ru> Date: Wed, 07 Apr 2004 20:59:52 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031208 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Craig Rodrigues References: <20040407163223.GA2981@crodrigues.org> In-Reply-To: <20040407163223.GA2981@crodrigues.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Kernel debugging with a multiport serial card X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 17:07:23 -0000 Craig Rodrigues wrote: >Hi, > >I have a few FreeBSD machines with an RJ-45 serial connector >on the motherboard. I would like to hook these >machines up to a single FreeBSD PC with a multiport serial >card and set it up to do kernel debugging. > >Can anyone recommend any multiport serial cards? > > There are many multiport cards. Just grep sio (4) or puc (4) sources. Cronyx: http://www.cronyx.ru/hardware/ompci.html DigiBoard Moxa atc Best regards, rik >Are there any cards with known problems? > >Thanks. > > From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 7 11:03:39 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF93B16A4D3 for ; Wed, 7 Apr 2004 11:03:38 -0700 (PDT) Received: from web25009.mail.ukl.yahoo.com (web25009.mail.ukl.yahoo.com [217.12.10.45]) by mx1.FreeBSD.org (Postfix) with SMTP id 2915643D39 for ; Wed, 7 Apr 2004 11:03:38 -0700 (PDT) (envelope-from keshav_tadimeti@yahoo.co.uk) Message-ID: <20040407180253.50314.qmail@web25009.mail.ukl.yahoo.com> Received: from [147.60.1.195] by web25009.mail.ukl.yahoo.com via HTTP; Wed, 07 Apr 2004 19:02:53 BST Date: Wed, 7 Apr 2004 19:02:53 +0100 (BST) From: =?iso-8859-1?q?Tadimeti=20Keshav?= To: freebsd-firewire@freebsd.org, freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: problems mounting firewire HDD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 18:03:39 -0000 Hi all, I am doing the following to mount a 10GB Quantum Fireball FAT32 HDD via firewire as root. FreeBSD 5.2.1, lucent F322/323 (firewire card). This setup works under Windows 2000. #camcontrol devlist -v #camcontrol start da0 #mount_msdosfs /dev/da0 /bck mount_msdosfs: /dev/da0: operation not permitted. Where am I going wrong? Pls help. Tk ____________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 7 12:01:44 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43D2B16A4CF; Wed, 7 Apr 2004 12:01:44 -0700 (PDT) Received: from herbelot.dyndns.org (herbelot.net1.nerim.net [62.212.117.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29D8343D31; Wed, 7 Apr 2004 12:01:43 -0700 (PDT) (envelope-from thierry@herbelot.com) Received: from [192.168.2.6] (diversion.herbelot.nom [192.168.2.6]) by herbelot.dyndns.org (8.12.10/8.12.10) with ESMTP id i37IntYX014801; Wed, 7 Apr 2004 20:49:55 +0200 (CEST) From: Thierry Herbelot To: freebsd-hackers@freebsd.org Date: Wed, 7 Apr 2004 20:59:57 +0200 User-Agent: KMail/1.6.1 References: <20040407180253.50314.qmail@web25009.mail.ukl.yahoo.com> In-Reply-To: <20040407180253.50314.qmail@web25009.mail.ukl.yahoo.com> 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-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Message-Id: <200404072059.57559.thierry@herbelot.com> cc: freebsd-firewire@freebsd.org cc: Tadimeti Keshav Subject: Re: problems mounting firewire HDD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 07 Apr 2004 19:01:44 -0000 Le Wednesday 07 April 2004 20:02, Tadimeti Keshav a écrit : > Hi all, > I am doing the following to mount a 10GB Quantum > Fireball FAT32 HDD via firewire as root. > FreeBSD 5.2.1, lucent F322/323 (firewire card). This > setup works under Windows 2000. > > #camcontrol devlist -v > #camcontrol start da0 > #mount_msdosfs /dev/da0 /bck > mount_msdosfs: /dev/da0: operation not permitted. you can try : mount_msdosfs /dev/da0s1 /bck (mount the 1st partition) TfH From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 7 14:29:27 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA4F116A4CE for ; Wed, 7 Apr 2004 14:29:27 -0700 (PDT) Received: from web25001.mail.ukl.yahoo.com (web25001.mail.ukl.yahoo.com [217.12.10.37]) by mx1.FreeBSD.org (Postfix) with SMTP id E267B43D31 for ; Wed, 7 Apr 2004 14:29:26 -0700 (PDT) (envelope-from keshav_tadimeti@yahoo.co.uk) Message-ID: <20040407212818.32858.qmail@web25001.mail.ukl.yahoo.com> Received: from [147.60.1.195] by web25001.mail.ukl.yahoo.com via HTTP; Wed, 07 Apr 2004 22:28:18 BST Date: Wed, 7 Apr 2004 22:28:18 +0100 (BST) From: =?iso-8859-1?q?Tadimeti=20Keshav?= To: thierry@herbelot.com, freebsd-hackers@freebsd.org In-Reply-To: <200404072059.57559.thierry@herbelot.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit cc: freebsd-firewire@freebsd.org Subject: Re: problems mounting firewire HDD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 21:29:27 -0000 Thanks. But when I do: ls /dev/da*, I can only see /dev/da0, not /dev/da0s1. Do I need to give some command to have that appear? is it camcontrol start da0? --- Thierry Herbelot wrote: > Le Wednesday 07 April 2004 20:02, Tadimeti Keshav a > écrit : > > Hi all, > > I am doing the following to mount a 10GB Quantum > > Fireball FAT32 HDD via firewire as root. > > FreeBSD 5.2.1, lucent F322/323 (firewire card). > This > > setup works under Windows 2000. > > > > #camcontrol devlist -v > > #camcontrol start da0 > > #mount_msdosfs /dev/da0 /bck > > mount_msdosfs: /dev/da0: operation not permitted. > > you can try : > mount_msdosfs /dev/da0s1 /bck > (mount the 1st partition) > > TfH > _______________________________________________ > 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" ===== -- K E S H A V T A D I M E T I -- ____________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 7 15:38:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4E6016A4CE for ; Wed, 7 Apr 2004 15:38:20 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id E838643D1D for ; Wed, 7 Apr 2004 15:38:17 -0700 (PDT) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BBLeV-0004rl-00 for ; Thu, 08 Apr 2004 00:36:11 +0200 Received: from mulder.f5.com ([205.229.151.150]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Apr 2004 00:36:11 +0200 Received: from atkin901 by mulder.f5.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Apr 2004 00:36:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: othermark Date: Wed, 07 Apr 2004 15:36:02 -0700 Lines: 81 Message-ID: References: <20040407170422.GF567@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: mulder.f5.com User-Agent: KNode/0.7.6 Sender: news Subject: Re: polling for sio? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 22:38:21 -0000 John-Mark Gurney wrote: > othermark wrote this message on Wed, Apr 07, 2004 at 09:17 -0700: >> I'm just looking into DEVICE_POLLING. Would it be difficult to add >> polling >> functionality to uart or sio? My main objective would be to get rid of >> silo overflows in the sio device for shared interrupt devices. > > I would say that more time would be better spent on either lowering > your fifo levels (to make the interrupts trigger earlier) So, I assume you're referring to this comment below. Are you referring to lowering the amount available to sio or to the trigger level latency? /* * Use a fifo trigger level low enough so that the input * latency from the fifo is less than about 16 msec and * the total latency is less than about 30 msec. These * latencies are reasonable for humans. Serial comms * protocols shouldn't expect anything better since modem * latencies are larger. * * The fifo trigger level cannot be set at RX_HIGH for high * speed connections without further work on reducing * interrupt disablement times in other parts of the system, * without producing silo overflow errors. */ com->fifo_image = com->unit == siotsunit ? 0 : t->c_ispeed <= 4800 ? FIFO_ENABLE : FIFO_ENABLE | FIFO_RX_MEDH; > , or fix > sio so that COM_MULTIPORT (for shared interrupts) doesn't poll all > sio devices, and instead it keeps track of which devices need to be > polled for each interrupt (and possible use the AST/4 register to > decide which ports to query).... > > uart already has most of this logic, but I haven't written an isa > attachment for it to make use of the interrupt routing logic.. I have a multi-port PCI card under puc and sio that has 4 19200 connections to it now, and when data is streaming across all of them at once, I get several silo overflows. Would it be better to run this under puc + uart? As an aside, there's some good comments in parts of sio, it makes it more enjoyable to understand. I enjoyed these in particular: - do you suppose that this is still a problem? /* * "& 0x7F" is to avoid the gcc-1.40 generating a slow * jump from the top of the loop to here */ line_status = inb(com->line_status_port) & 0x7F; - I can understand a certain usec delay between disabling the fifo and reading, but is it 'superstitous?'... /* * XXX the delays are for superstitious * historical reasons. It must be less than * the character time at the maximum * supported speed (87 usec at 115200 bps * 8N1). Otherwise we might loop endlessly * if data is streaming in. We used to use * delays of 100. That usually worked * because DELAY(100) used to usually delay * for about 85 usec instead of 100. */ DELAY(50); if (!(inb(com->line_status_port) & LSR_RXRDY)) break; sio_setreg(com, com_fifo, 0); DELAY(50); (void) inb(com->data_port); -- othermark atkin901 at nospam dot yahoo dot com (!wired)?(coffee++):(wired); From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 7 16:56:53 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5069116A4CE; Wed, 7 Apr 2004 16:56:53 -0700 (PDT) Received: from hak.cnd.mcgill.ca (hak.cnd.mcgill.ca [132.216.11.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2B8C43DAE; Wed, 7 Apr 2004 16:56:43 -0700 (PDT) (envelope-from mat@hak.cnd.mcgill.ca) Received: from hak.cnd.mcgill.ca (localhost [127.0.0.1]) by hak.cnd.mcgill.ca (8.12.9/8.12.8) with ESMTP id i37Nx5K0093566; Wed, 7 Apr 2004 19:59:05 -0400 (EDT) (envelope-from mat@hak.cnd.mcgill.ca) Received: (from mat@localhost) by hak.cnd.mcgill.ca (8.12.9/8.12.8/Submit) id i37Nx4BT093565; Wed, 7 Apr 2004 19:59:04 -0400 (EDT) Date: Wed, 7 Apr 2004 19:59:04 -0400 From: Mathew Kanner To: Tadimeti Keshav Message-ID: <20040407235904.GB83704@cnd.mcgill.ca> References: <200404072059.57559.thierry@herbelot.com> <20040407212818.32858.qmail@web25001.mail.ukl.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040407212818.32858.qmail@web25001.mail.ukl.yahoo.com> User-Agent: Mutt/1.4.1i Organization: I speak for myself, operating in Montreal, CANADA X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.62 X-Spam-Checker-Version: SpamAssassin 2.62 (2004-01-11) on hak.cnd.mcgill.ca cc: freebsd-hackers@freebsd.org cc: freebsd-firewire@freebsd.org cc: thierry@herbelot.com Subject: Re: problems mounting firewire HDD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 23:56:53 -0000 [...reformated to remove top posting...] On Apr 07, Tadimeti Keshav wrote: > Le Wednesday 07 April 2004 20:02, Tadimeti Keshav a > > ?crit : > > > Hi all, > > > I am doing the following to mount a 10GB Quantum > > > Fireball FAT32 HDD via firewire as root. > > > FreeBSD 5.2.1, lucent F322/323 (firewire card). > > This > > > setup works under Windows 2000. > > > > > > #camcontrol devlist -v > > > #camcontrol start da0 > > > #mount_msdosfs /dev/da0 /bck > > > mount_msdosfs: /dev/da0: operation not permitted. > > > > you can try : > > mount_msdosfs /dev/da0s1 /bck > > (mount the 1st partition) > > > Thanks. But when I do: ls /dev/da*, I can only see > /dev/da0, not /dev/da0s1. > Do I need to give some command to have that appear? > is it camcontrol start da0? This is what PHK wrote in an older message. Maybe you can apply the same technique: >On sparc64 (or with geom_sunlabel in your kernel) try inserting a >solaris install CD and then: > true > /dev/cd0 # make GEOM taste media > ls -l /dev/cd* >You should now be able to see the boot partitions. --Mat -- Canada is a country whose main exports are hockey players and cold fronts. Our main imports are baseball players and acid rain. - Pierre Elliott Trudeau From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 7 17:01:40 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9AB8416A4CE for ; Wed, 7 Apr 2004 17:01:40 -0700 (PDT) Received: from web25007.mail.ukl.yahoo.com (web25007.mail.ukl.yahoo.com [217.12.10.43]) by mx1.FreeBSD.org (Postfix) with SMTP id 9411443D62 for ; Wed, 7 Apr 2004 17:01:39 -0700 (PDT) (envelope-from keshav_tadimeti@yahoo.co.uk) Message-ID: <20040408000138.99254.qmail@web25007.mail.ukl.yahoo.com> Received: from [147.60.1.195] by web25007.mail.ukl.yahoo.com via HTTP; Thu, 08 Apr 2004 01:01:38 BST Date: Thu, 8 Apr 2004 01:01:38 +0100 (BST) From: =?iso-8859-1?q?Tadimeti=20Keshav?= To: Mathew Kanner In-Reply-To: <20040407235904.GB83704@cnd.mcgill.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit cc: freebsd-hackers@freebsd.org cc: freebsd-firewire@freebsd.org cc: thierry@herbelot.com Subject: Re: problems mounting firewire HDD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 00:01:40 -0000 I am running x86, not sparc. Any solns? Thx in advance... --- Mathew Kanner wrote: > [...reformated to remove top posting...] > > On Apr 07, Tadimeti Keshav wrote: > > Le Wednesday 07 April 2004 20:02, Tadimeti Keshav > a > > > ?crit : > > > > Hi all, > > > > I am doing the following to mount a 10GB > Quantum > > > > Fireball FAT32 HDD via firewire as root. > > > > FreeBSD 5.2.1, lucent F322/323 (firewire > card). > > > This > > > > setup works under Windows 2000. > > > > > > > > #camcontrol devlist -v > > > > #camcontrol start da0 > > > > #mount_msdosfs /dev/da0 /bck > > > > mount_msdosfs: /dev/da0: operation not > permitted. > > > > > > you can try : > > > mount_msdosfs /dev/da0s1 /bck > > > (mount the 1st partition) > > > > > Thanks. But when I do: ls /dev/da*, I can only see > > /dev/da0, not /dev/da0s1. > > Do I need to give some command to have that > appear? > > is it camcontrol start da0? > > This is what PHK wrote in an older message. Maybe > you can apply the > same technique: > > >On sparc64 (or with geom_sunlabel in your kernel) > try inserting a > >solaris install CD and then: > > true > /dev/cd0 # make GEOM taste media > > ls -l /dev/cd* > >You should now be able to see the boot partitions. > > --Mat > > -- > Canada is a country whose main exports are hockey > players > and cold fronts. Our main imports are baseball > players and > acid rain. > - Pierre Elliott Trudeau ===== -- K E S H A V T A D I M E T I -- ____________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 7 19:44:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1D4216A4CE for ; Wed, 7 Apr 2004 19:44:55 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A6D643D58 for ; Wed, 7 Apr 2004 19:44:55 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.11/8.12.11) with ESMTP id i382itLl099310; Wed, 7 Apr 2004 19:44:55 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) i382itdt020254; Wed, 7 Apr 2004 19:44:55 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.11/8.12.11/Submit) id i382it6m020253; Wed, 7 Apr 2004 19:44:55 -0700 (PDT) (envelope-from marcel) Date: Wed, 7 Apr 2004 19:44:55 -0700 From: Marcel Moolenaar To: othermark Message-ID: <20040408024455.GC20138@dhcp01.pn.xcllnt.net> References: <20040407170422.GF567@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: freebsd-hackers@freebsd.org Subject: Re: polling for sio? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 02:44:55 -0000 On Wed, Apr 07, 2004 at 03:36:02PM -0700, othermark wrote: > > , or fix > > sio so that COM_MULTIPORT (for shared interrupts) doesn't poll all > > sio devices, and instead it keeps track of which devices need to be > > polled for each interrupt (and possible use the AST/4 register to > > decide which ports to query).... > > > > uart already has most of this logic, but I haven't written an isa > > attachment for it to make use of the interrupt routing logic.. > > I have a multi-port PCI card under puc and sio that has 4 19200 > connections to it now, and when data is streaming across all of > them at once, I get several silo overflows. Would it be better > to run this under puc + uart? Not really. The problem is that puc(4) iterates over all ports in the same way whether you use uart(4) or sio(4). So, puc(4) is the problem more that sio(4) or uart(4). However, uart(4) has the beginnings of an interface that puc(4) could use to figure out which UART needs attention without actually calling the interrupt routine for each of them. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 7 20:57:04 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAA1716A4CE; Wed, 7 Apr 2004 20:57:04 -0700 (PDT) Received: from herbelot.dyndns.org (herbelot.net1.nerim.net [62.212.117.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1F9B43D41; Wed, 7 Apr 2004 20:57:01 -0700 (PDT) (envelope-from thierry@herbelot.com) Received: from [192.168.2.6] (diversion.herbelot.nom [192.168.2.6]) by herbelot.dyndns.org (8.12.10/8.12.10) with ESMTP id i383kgYX024292; Thu, 8 Apr 2004 05:46:42 +0200 (CEST) From: Thierry Herbelot To: Tadimeti Keshav Date: Thu, 8 Apr 2004 05:56:48 +0200 User-Agent: KMail/1.6.1 References: <20040408000138.99254.qmail@web25007.mail.ukl.yahoo.com> In-Reply-To: <20040408000138.99254.qmail@web25007.mail.ukl.yahoo.com> 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-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Message-Id: <200404080556.48531.thierry@herbelot.com> cc: freebsd-hackers@freebsd.org cc: freebsd-firewire@freebsd.org cc: Mathew Kanner Subject: Re: problems mounting firewire HDD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 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: Thu, 08 Apr 2004 03:57:05 -0000 Le Thursday 08 April 2004 02:01, Tadimeti Keshav a écrit : > I am running x86, not sparc. > Any solns? > Thx in advance... try using fdisk on da0 : fdisk will tell you if there are any partition on your disk TfH From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 01:24:18 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CBA416A4CF for ; Thu, 8 Apr 2004 01:24:18 -0700 (PDT) Received: from cliffclavin.cs.rpi.edu (cliffclavin.cs.rpi.edu [128.213.1.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id E154043D4C for ; Thu, 8 Apr 2004 01:24:17 -0700 (PDT) (envelope-from crossd@cs.rpi.edu) Received: from monica.cs.rpi.edu (root@monica.cs.rpi.edu [128.213.7.2]) i388OHlE010071 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 8 Apr 2004 04:24:17 -0400 (EDT) Received: from monica.cs.rpi.edu (crossd@localhost [127.0.0.1]) by monica.cs.rpi.edu (8.12.9p2/8.12.6) with ESMTP id i388OG5j039268 for ; Thu, 8 Apr 2004 04:24:16 -0400 (EDT) (envelope-from crossd@monica.cs.rpi.edu) Received: from localhost (crossd@localhost)i388OGQM039265 for ; Thu, 8 Apr 2004 04:24:16 -0400 (EDT) (envelope-from crossd@monica.cs.rpi.edu) Date: Thu, 8 Apr 2004 04:24:16 -0400 (EDT) From: "David E. Cross" To: freebsd-hackers@freebsd.org Message-ID: <20040408041649.G38114@monica.cs.rpi.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.37 Subject: 5.2.1-RELEASE, SMP, ACPI, Interrupt loop? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 08:24:18 -0000 I recently upgraded my old P2B-DS dual processor (p2-450Mhz) machine to 5.2.1 everything seemed to be going well, and in fact I didn't notice it until recently, but even when the machine is idle it is spending 50% of its time in an interrupt loop (since I have 2 processors, the second one is free for me to use, since I had only been doing serial tasks I hadn't had cause to notice). If I turn off ACPI I keep both processors and everything else, additionally the interrupt problems go away. One further note is on shutdown, right after ACPI is disabled I get a mangled line of text, one time in particular it said "stray irq 2"; no idea if it was really irq 2, it could have been "12", it seems random characters are dropped under the IRQ storm. Has anyone seen this? Better yet, anyone know what I can do about it? I'd like to keep ACPI support if possible (for things like actually shutting the computer off in response to ACLine/UPS failure.) Cheers, -- David E. Cross From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 02:16:31 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2816F16A4CE; Thu, 8 Apr 2004 02:16:31 -0700 (PDT) Received: from aurora-borealis.phear.org (phear.org [194.177.32.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D4A143D49; Thu, 8 Apr 2004 02:16:30 -0700 (PDT) (envelope-from spot@phear.org) Received: (from rival@localhost) by aurora-borealis.phear.org id i389GSDn003973; Thu, 8 Apr 2004 11:16:28 +0200 Resent-From: rival@phear.org Resent-Date: Thu, 8 Apr 2004 11:16:28 +0200 Resent-Message-ID: <20040408091628.GA3963@phear.org> Resent-To: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org Received: from stalingrad.moon-sytem.com ([195.15.59.99]) by aurora-borealis.phear.org with ESMTP id i389FGjP003947 for ; Thu, 8 Apr 2004 11:15:17 +0200 Received: (from eau@localhost)i389FtA9097933 for eau@phear.org; Thu, 8 Apr 2004 11:15:55 +0200 (CEST) (envelope-from eau) Resent-Message-Id: <200404080915.i389FtA9097933@stalingrad.moon-sytem.com> Date: Tue, 6 Apr 2004 19:02:34 +0200 From: Eric AUGE To: "JINMEI Tatuya / ?$B?@L@C#:H" Message-ID: <20040406170234.GB23125@flufme.sequences-infos.ch> References: <003b01c41b0f$b1e4fc90$bc0a270a@bum.sub.fr.hsbc> <003001c41baf$5316dad0$6400a8c0@a91821794s3ti7g> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DBIVS5p969aUjpLe" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-GPG-PUBLIC_KEY: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8C2A147C X-GPG-Fingerprint: F15C BFC2 4C78 0F03 3A07 952B 4377 193C 8C2A 147C Resent-From: eau@flufme.sequences-infos.ch Resent-Date: Thu, 8 Apr 2004 11:15:54 +0200 Resent-To: eau@phear.org X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.61 X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on aurora-borealis.phear.org cc: Sebastien Petit cc: freebsd-hackers@freebsd.org cc: freebsd-net@freebsd.org Subject: Re: SOCK_RAW sockets and IPPROTO_AH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 09:16:31 -0000 --DBIVS5p969aUjpLe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 07, 2004 at 12:21:07AM +0900, JINMEI Tatuya / ?$B?@L@C#:H wrote: > >>>>> On Tue, 6 Apr 2004 10:15:29 +0200,=20 > >>>>> "Sebastien Petit" said: >=20 > > Unfortunatly, I can't use bpf/pcap solution because I must do some > > setsockopts (like IP_MULTICAST_IF, IP_MULTICAST_TTL, IP_MULTICAST_ADD_M= EMBER > > etc.) and this can't be done on bpf/pcap. > > When I'm using IPPROTO_VRRP (ip proto 112), All work fine (and other ip > > proto type I think). What is the reason that SOCK_RAW don't work with > > IPPROTO_AH (ip proto 51). > > For me, it's an IP packet in two cases. >=20 > Let me check, why do you have to include AH by the application in the > first place? Is that related to the question you made the other day > (attached below)? the question made the other day related to the fact that we wanted to send AH authenticated packets for VRRP (multicast) traffic, so=20 at first we decided to use the PF_KEY API (RFC 2367) implementation of=20 freebsd KAME IPSEC to "protect" outgoing VRRP advertisements packets genera= ted=20 by our application (freevrrpd). After some tests, we decided to implement VRRP/AH the same way as keepalive= d did, that allow portability and could be implemented pretty fast without having to deal with the PF_KEY API and problems we faced with it for multicast traffic, etc...(the old post you mention speak about this) So the fact is we build our "AH enabled" VRRP header and wish to send/recv = using SOCK_RAW sockets for IPPROTO_AH (51), we can send out packets without any t= roubles=20 using this socket but receiving on the same socket is impossible, the quest= ion is=20 why ? why can we receive SOCK_RAW and IPPROTO_VRRP and not IPPROTO_AH ?=20 (socket() returns EPROTONOSUPPORT). Best Regards, Eric. >=20 > JINMEI, Tatuya > Communication Platform Lab. > Corporate R&D Center, Toshiba Corp. > jinmei@isl.rdc.toshiba.co.jp > Date: Sun, 21 Mar 2004 12:26:13 +0100 > From: Sebastien Petit > Subject: IPSec and setsockopt MULTICAST_IF interaction > To: freebsd-net@freebsd.org >=20 > Hi Team, >=20 > I want to use IPsec engine with AH Security Association and SPD on multic= ast=20 > destination adress. When I comment the setsockopt MULTICAST_IF option, al= l=20 > work fine and destination packets to the multicast adress have AH added= =20 > before IP Header. But when I use the setsockopt MULTICAST_IF, no packets = are=20 > sended from the interface (packet seems to be destroyed silently by kerne= l). > Is there an issue about using MUTLICAST_IF option and IPsec ? >=20 > Any help will be greatly appreciated. >=20 > Regards, > spe. > --=20 > spe@selectbourse.net >=20 > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" --DBIVS5p969aUjpLe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAcuKqQ3cZPIwqFHwRAn95AJ9tuor8fkJwj7lNQD65dM5/poLJLwCgrFdb IKsgxHe/9i5X7G7AjCkiKQs= =C5mi -----END PGP SIGNATURE----- --DBIVS5p969aUjpLe-- From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 06:44:19 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2671516A4CE for ; Thu, 8 Apr 2004 06:44:19 -0700 (PDT) Received: from gwdu60.gwdg.de (gwdu60.gwdg.de [134.76.8.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BE5843D39 for ; Thu, 8 Apr 2004 06:44:18 -0700 (PDT) (envelope-from kheuer2@gwdg.de) Received: from gwdu60.gwdg.de (localhost [127.0.0.1]) by gwdu60.gwdg.de (8.12.9p2/8.12.8) with ESMTP id i38DiDrB051727; Thu, 8 Apr 2004 15:44:13 +0200 (CEST) (envelope-from kheuer2@gwdg.de) Received: from localhost (kheuer2@localhost)i38DiASU051724; Thu, 8 Apr 2004 15:44:12 +0200 (CEST) X-Authentication-Warning: gwdu60.gwdg.de: kheuer2 owned process doing -bs Date: Thu, 8 Apr 2004 15:44:10 +0200 (CEST) From: Konrad Heuer To: Andrew MacIntyre , andyf@speednet.com.au In-Reply-To: <20040407084344.V2503@bullseye.apana.org.au> Message-ID: <20040408154001.D30924@gwdu60.gwdg.de> References: <20040406152018.G30924@gwdu60.gwdg.de> <20040407084344.V2503@bullseye.apana.org.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: Critical mmap failure? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 13:44:19 -0000 On Wed, 7 Apr 2004, Andrew MacIntyre wrote: > On Tue, 6 Apr 2004, Konrad Heuer wrote: > > > * The machines in question are all DELL PowerEdge 2650, three with > > RAID controllers, one without. The main difference in hardware is > > that the system on wich the error occurs has 4 GB of memory, the > > others 2 GB. There are no significant differences in the kernel > > configuration files except driver entries for RAID or not. > > I think you are running into issues associated with the kernel autosizing > various data structures and running low on VM address space. > > If you can, try reducing the problematic machine to 2GB of memory and see > whether the problems persist. If they don't, then it is this issue and > you're going to have to fiddle with the kernel config. > > I've seen posts in freebsd-stable about trying to tune i386 systems with > 4GB of memory - you should search the list archives. Thank you both for your similar answers. I learned a lot by studying the mailing list archives and experimenting. After a lot of trials, I found the solution: On the 4 GB machine, I compiled the kernel with MAXDSIZ="(2048*1024*1024)" to achieve a max data segment size of 2 GB. This seems to cause the problems, maybe by a signed int overflow? Reducing MAXDSIZ helps. Best regards Konrad Heuer (kheuer2@gwdg.de) ____ ___ _______ GWDG / __/______ ___ / _ )/ __/ _ \ Am Fassberg / _// __/ -_) -_) _ |\ \/ // / 37077 Goettingen /_/ /_/ \__/\__/____/___/____/ Germany From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 07:57:28 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CA3716A4D0 for ; Thu, 8 Apr 2004 07:57:28 -0700 (PDT) Received: from web25005.mail.ukl.yahoo.com (web25005.mail.ukl.yahoo.com [217.12.10.41]) by mx1.FreeBSD.org (Postfix) with SMTP id D266543D31 for ; Thu, 8 Apr 2004 07:57:27 -0700 (PDT) (envelope-from keshav_tadimeti@yahoo.co.uk) Message-ID: <20040408145726.10903.qmail@web25005.mail.ukl.yahoo.com> Received: from [147.60.1.194] by web25005.mail.ukl.yahoo.com via HTTP; Thu, 08 Apr 2004 15:57:26 BST Date: Thu, 8 Apr 2004 15:57:26 +0100 (BST) From: =?iso-8859-1?q?Tadimeti=20Keshav?= To: thierry@herbelot.com In-Reply-To: <200404080556.48531.thierry@herbelot.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit cc: freebsd-hackers@freebsd.org cc: freebsd-firewire@freebsd.org cc: Mathew Kanner Subject: Re: problems mounting firewire HDD (SOLVED) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 14:57:28 -0000 --- Thierry Herbelot wrote: > Le Thursday 08 April 2004 02:01, Tadimeti Keshav a > écrit : > > I am running x86, not sparc. > > Any solns? > > Thx in advance... > > try using fdisk on da0 : fdisk will tell you if > there are any partition on > your disk > > TfH Thanks folks. I can now see the HDD!! ===== -- K E S H A V T A D I M E T I -- ____________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 11:31:56 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DFD8316A4CE for ; Thu, 8 Apr 2004 11:31:56 -0700 (PDT) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5AB043D1F for ; Thu, 8 Apr 2004 11:31:54 -0700 (PDT) (envelope-from berhart@erhartgroup.com) Received: from cocaine.erhartgroup.com (c-67-166-0-138.client.comcast.net[67.166.0.138]) by comcast.net (rwcrmhc13) with SMTP id <2004040818315301500addd0e>; Thu, 8 Apr 2004 18:31:54 +0000 Message-Id: <6.0.2.0.2.20040408123017.01cecec0@mx1.erhartgroup.com> X-Sender: berhart%erhartgroup.com@mx1.erhartgroup.com (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.2.0 Date: Thu, 08 Apr 2004 12:32:11 -0600 To: freebsd-hackers@freebsd.org From: Brandon Erhart Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: KQueue dropping events? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 18:31:57 -0000 Hi, I am writing a web sucker downer (mirror) for a project on indexing the web (got myself a 1TB raid, just gonna d/l text ..). I am using the KQueue API in FreeBSD 4.9-REL to take care of watching over my sockets. I seem to be running into a nasty problem, however. Here's a scenario. I set the outgoing connections to, say, 5000. The problem is, the amount of connections my program shows as being connected is roughly 1/5 to sometimes even 1/8th of what is actually connected. I see what is "actually connected" by doing a netstat. The program would say 750/5000 connections, while a netstat would show 4500 connections in the ESTABLISHED state. You may be saying, "it must be a bug in your connection tracking logic". I honestly don't think that's it. I have only TWO places in my code where I check if the connection was successful by calling getpeername(), if it wasnt, i return back to the main loops, otherwise I know it connected (and therefore increasing the global connection counter) -- in the callback function for data read() from KQueue-monitored fds (all of the sockets), and then also in my main loop (I check for read, write and connect timeouts there, right after my call to kevent()). Basically the main loop looks like, in psuedo-code of course: while (there_is_still_events) { if (kevent()) <-- i pull 16 events from the kqueue { execute_the_callback_function; } check_for_read()_write()_and_connect()_timeouts; check_for_"client_descriptors(basically just a structure that holds info on the kqueue event)"_that_need_to_be_connected_to_the_next_server_and_do_so; } It's pretty straight forward. I have no idea why my program would be reporting a smaller amount. Is it possible that my program is not getting ALL the information it needs from kevent()? Perhaps the KQueue is becoming "full"? Is this possible? Should I be pulling more than the 16 events off the kqueue at a time? I have been up ALL NIGHT trying to debug this, and cannot figure it out. Any and all help is appreciated! Thanks, Brandon From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 11:34:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5878D16A4CF for ; Thu, 8 Apr 2004 11:34:06 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD89843D1D for ; Thu, 8 Apr 2004 11:34:05 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id i38IY4kj026125; Thu, 8 Apr 2004 12:34:04 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 08 Apr 2004 12:34:43 -0600 (MDT) Message-Id: <20040408.123443.101835222.imp@bsdimp.com> To: marcel@xcllnt.net From: "M. Warner Losh" In-Reply-To: <20040408024455.GC20138@dhcp01.pn.xcllnt.net> References: <20040407170422.GF567@funkthat.com> <20040408024455.GC20138@dhcp01.pn.xcllnt.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: atkin901@yahoo.com Subject: Re: polling for sio? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 18:34:06 -0000 In message: <20040408024455.GC20138@dhcp01.pn.xcllnt.net> Marcel Moolenaar writes: : On Wed, Apr 07, 2004 at 03:36:02PM -0700, othermark wrote: : > > , or fix : > > sio so that COM_MULTIPORT (for shared interrupts) doesn't poll all : > > sio devices, and instead it keeps track of which devices need to be : > > polled for each interrupt (and possible use the AST/4 register to : > > decide which ports to query).... : > > : > > uart already has most of this logic, but I haven't written an isa : > > attachment for it to make use of the interrupt routing logic.. : > : > I have a multi-port PCI card under puc and sio that has 4 19200 : > connections to it now, and when data is streaming across all of : > them at once, I get several silo overflows. Would it be better : > to run this under puc + uart? : : Not really. The problem is that puc(4) iterates over all ports in : the same way whether you use uart(4) or sio(4). So, puc(4) is : the problem more that sio(4) or uart(4). However, uart(4) has the : beginnings of an interface that puc(4) could use to figure out : which UART needs attention without actually calling the interrupt : routine for each of them. Yes, but at 19200 baud, his problems likely aren't related to the iteration. They are likely related to the fact that he said his interrupt is shared and therefore not fast. We have horrible interrupt latency in current when you want to get to the FIFOs of UARTs quickly :-(. I've had an 8 port puc + sio stream data at 115200 w/o losing data or getting overflows in a test setup, but that was on -stable (4.5) with a dedicated interrupt for the puc board. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 12:07:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B200616A4CE for ; Thu, 8 Apr 2004 12:07:47 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id B37A043D6B for ; Thu, 8 Apr 2004 12:07:46 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i38J7imH028247 for ; Thu, 8 Apr 2004 21:07:45 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: hackers@freebsd.org From: Poul-Henning Kamp Date: Thu, 08 Apr 2004 21:07:44 +0200 Message-ID: <28246.1081451264@critter.freebsd.dk> Subject: Fundraising for FreeBSD development. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 19:07:47 -0000 http://people.freebsd.org/~phk/funding.html Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 12:58:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 696ED16A4CE for ; Thu, 8 Apr 2004 12:58:07 -0700 (PDT) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0151F43D54 for ; Thu, 8 Apr 2004 12:58:07 -0700 (PDT) (envelope-from dan@langille.org) Received: from xeon (xeon.unixathome.org [192.168.0.18]) by bast.unixathome.org (Postfix) with ESMTP id 0CB3A3D31; Thu, 8 Apr 2004 15:58:06 -0400 (EDT) Date: Thu, 8 Apr 2004 15:58:06 -0400 (EDT) From: Dan Langille X-X-Sender: dan@xeon.unixathome.org To: Poul-Henning Kamp In-Reply-To: <28246.1081451264@critter.freebsd.dk> Message-ID: <20040408155749.C61633@xeon.unixathome.org> References: <28246.1081451264@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org Subject: Re: Fundraising for FreeBSD development. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 19:58:07 -0000 On Thu, 8 Apr 2004, Poul-Henning Kamp wrote: > > http://people.freebsd.org/~phk/funding.html typo :(An before any of you get an Should be "And", not An. -- Dan Langille - BSDCan: http://www.bsdcan.org/ From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 13:21:09 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B7BA16A4CE for ; Thu, 8 Apr 2004 13:21:09 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A1F343D5D for ; Thu, 8 Apr 2004 13:21:08 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i38KL6WX028760; Thu, 8 Apr 2004 22:21:06 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Dan Langille From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 08 Apr 2004 15:58:06 EDT." <20040408155749.C61633@xeon.unixathome.org> Date: Thu, 08 Apr 2004 22:21:06 +0200 Message-ID: <28759.1081455666@critter.freebsd.dk> cc: hackers@freebsd.org Subject: Re: Fundraising for FreeBSD development. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 20:21:09 -0000 In message <20040408155749.C61633@xeon.unixathome.org>, Dan Langille writes: >On Thu, 8 Apr 2004, Poul-Henning Kamp wrote: > >> >> http://people.freebsd.org/~phk/funding.html > >typo :(An before any of you get an > >Should be "And", not An. Fixed, thanks! -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 14:34:33 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14BB216A4CE for ; Thu, 8 Apr 2004 14:34:33 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C5AB43D1D for ; Thu, 8 Apr 2004 14:34:32 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i38LYQWx029149; Thu, 8 Apr 2004 23:34:27 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: John Von Essen From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 08 Apr 2004 17:18:52 EDT." <20040408171501.V82460@beck.quonix.net> Date: Thu, 08 Apr 2004 23:34:26 +0200 Message-ID: <29148.1081460066@critter.freebsd.dk> cc: hackers@freebsd.org Subject: Re: Fundraising for FreeBSD development. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 21:34:33 -0000 In message <20040408171501.V82460@beck.quonix.net>, John Von Essen writes: >Hi, > >Have a few questions for you. Would the fund raising be handled through >FreeBSD or direct to you? Direct to me. There are three relevant and different things we need to keep separate here: The FreeBSD Project Headed by the core team. Does not ever deal with money, only with software. In response to my informing them about this project they have said what amounts to "This is a good thing", only in quite a few more words. (I need to get their permission to disclose those emails, but I pressume it will figure in the monthly core report as well). The FreeBSD Foundation. Headed by their own board of directors. Deals mostly with money and donations. See point 11 on http://people.freebsd.org/~phk/funding.html Why this is not a Foundation controlled event. Me I hack FreeBSD code when I have time for it. If donate money so I can feed my kids, I have more time to hack FreeBSD. >Are you taking pledges now? I would assume you would gather pledges over >the next month to see if can get the USD16500, if you do, then the pledges >become real donations, if you dont, then the pledges become null. Yes, I am taking pledges and counting them towards the 3 month mininum goal. Pledges will not be listed on the web-page for a number of reasons, but mostly that people may not be able to carry through for various valid reasons, and I don't want to embaras them in that case. >If the fund raising is connected with FreeBSD, could people who donate >larger amounts get some form of acknowledgement on the FreeBSD site? This >would give an incentive for vendors who sell products that rely or use >FreeBSD to donate larger amounts. (see above) Everybody who donate will be listed (possibly anonymously) on http://people.freebsd.org/~phk/donations.html I cannot promise exposure on the main FreeBSD Project pages, that would be up to the webmasters (and to some extent the core team) to arrange and allow for such precense. I realize that marketing budgets might become available if I could offer better PR for donations, but it is really outside my power to do so. Does that answer your questions ? Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 14:51:38 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE0FA16A4CE for ; Thu, 8 Apr 2004 14:51:37 -0700 (PDT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC34D43D60 for ; Thu, 8 Apr 2004 14:51:37 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 11999 invoked from network); 8 Apr 2004 21:51:37 -0000 Received: from dsl017-045-168.spk4.dsl.speakeasy.net (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail2.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 8 Apr 2004 21:51:37 -0000 Received: from hydrogen.funkthat.com (ktgbsh@localhost.funkthat.com [127.0.0.1])i38LpaOE082612; Thu, 8 Apr 2004 14:51:36 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i38LpaqL082611; Thu, 8 Apr 2004 14:51:36 -0700 (PDT) Date: Thu, 8 Apr 2004 14:51:36 -0700 From: John-Mark Gurney To: othermark Message-ID: <20040408215136.GI567@funkthat.com> Mail-Followup-To: othermark , freebsd-hackers@freebsd.org References: <20040407170422.GF567@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-hackers@freebsd.org Subject: Re: polling for sio? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 21:51:38 -0000 othermark wrote this message on Wed, Apr 07, 2004 at 15:36 -0700: > John-Mark Gurney wrote: > > othermark wrote this message on Wed, Apr 07, 2004 at 09:17 -0700: > >> I'm just looking into DEVICE_POLLING. Would it be difficult to add > >> polling > >> functionality to uart or sio? My main objective would be to get rid of > >> silo overflows in the sio device for shared interrupt devices. > > > > I would say that more time would be better spent on either lowering > > your fifo levels (to make the interrupts trigger earlier) > > So, I assume you're referring to this comment below. Are you referring > to lowering the amount available to sio or to the trigger level latency? > > /* > * Use a fifo trigger level low enough so that the input > * latency from the fifo is less than about 16 msec and > * the total latency is less than about 30 msec. These > * latencies are reasonable for humans. Serial comms > * protocols shouldn't expect anything better since modem > * latencies are larger. > * > * The fifo trigger level cannot be set at RX_HIGH for high > * speed connections without further work on reducing > * interrupt disablement times in other parts of the system, > * without producing silo overflow errors. > */ > com->fifo_image = com->unit == siotsunit ? 0 > : t->c_ispeed <= 4800 > ? FIFO_ENABLE : FIFO_ENABLE | FIFO_RX_MEDH; I'm talking about changing FIFO_RX_MEDH to FIFO_RX_MEDL (or _LOW if absolutly necessary).. This will cause the interrupt to be triggered sooner giving the interrupts more time to be serviced before an overflow occured... I thought there was an option for setting this by default, but I guess not... Also, you can try to compile with PUC_FASTINTR to try and install using a fast interrupt (it gets called in the interrupt handler instead of being scheduled to run), but you have to make sure that the interrupt that the puc card is on does not share an interrupt with any other devices... This is easier in the apic case, but may require shuffling cards around to isolate an int pin for that card only... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 15:05:31 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9468016A4CE for ; Thu, 8 Apr 2004 15:05:31 -0700 (PDT) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 397CE43D3F for ; Thu, 8 Apr 2004 15:05:31 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 23077 invoked from network); 8 Apr 2004 22:05:30 -0000 Received: from dsl017-045-168.spk4.dsl.speakeasy.net (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 8 Apr 2004 22:05:30 -0000 Received: from hydrogen.funkthat.com (bkvenm@localhost.funkthat.com [127.0.0.1])i38M5TOE082867; Thu, 8 Apr 2004 15:05:30 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i38M5TsA082866; Thu, 8 Apr 2004 15:05:29 -0700 (PDT) Date: Thu, 8 Apr 2004 15:05:29 -0700 From: John-Mark Gurney To: Brandon Erhart Message-ID: <20040408220529.GJ567@funkthat.com> Mail-Followup-To: Brandon Erhart , freebsd-hackers@freebsd.org References: <6.0.2.0.2.20040408123017.01cecec0@mx1.erhartgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.0.2.0.2.20040408123017.01cecec0@mx1.erhartgroup.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-hackers@freebsd.org Subject: Re: KQueue dropping events? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 22:05:31 -0000 Brandon Erhart wrote this message on Thu, Apr 08, 2004 at 12:32 -0600: > I am writing a web sucker downer (mirror) for a project on indexing the web > (got myself a 1TB raid, just gonna d/l text ..). I am using the KQueue API > in FreeBSD 4.9-REL to take care of watching over my sockets. I seem to be > running into a nasty problem, however. > > Here's a scenario. I set the outgoing connections to, say, 5000. The > problem is, the amount of connections my program shows as being connected > is roughly 1/5 to sometimes even 1/8th of what is actually connected. I see > what is "actually connected" by doing a netstat. The program would say > 750/5000 connections, while a netstat would show 4500 connections in the > ESTABLISHED state. [...] > It's pretty straight forward. I have no idea why my program would be > reporting a smaller amount. Is it possible that my program is not getting > ALL the information it needs from kevent()? Perhaps the KQueue is becoming > "full"? Is this possible? Should I be pulling more than the 16 events off > the kqueue at a time? There is no way that a kqueue can become full.. (Unless you are doing process tracing) All the memory for the kqueue is allocated when the event is put on the kqueue, so, assuming the kqueue call to add the event is not failing, there is no way that it can become full... As for what is happening, are you making sure that you close the sockets after you are done? I'm assuming that in your checking for connections, that you make sure the connect succeeds and then adds the connection to the kqueue and that also succeeds... Also, don't forget that if you aren't doing the connect in an async manner, that since you are only handling 16 events at a time, that it is possible that the delays before connect returns are preventing all the connections from being open... If this last case is it, I'd make sure that you make the socket non-blocking, and set a kqueue event waiting for it to become writable.. my psuedo code: for (;;) { kevent(...) handle events while (cons < maxcons) create socket non-blocking, connect and add event to kqueue other logic } You will then have to handle the connection when it succeeds special, and then switch the state of that socket from connecting to conencted, and then handle it as normal.. There is nothing that I know of with kqueue that will restrict the number of sockets to be used with kqueue.. Also, make sure that your per user and per process limits aren't too small... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 15:10:24 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76EE016A4CE for ; Thu, 8 Apr 2004 15:10:24 -0700 (PDT) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BA2F43D46 for ; Thu, 8 Apr 2004 15:10:24 -0700 (PDT) (envelope-from dan@langille.org) Received: from xeon (xeon.unixathome.org [192.168.0.18]) by bast.unixathome.org (Postfix) with ESMTP id 3B92F3D31; Thu, 8 Apr 2004 18:10:23 -0400 (EDT) Date: Thu, 8 Apr 2004 18:10:23 -0400 (EDT) From: Dan Langille X-X-Sender: dan@xeon.unixathome.org To: Poul-Henning Kamp In-Reply-To: <29148.1081460066@critter.freebsd.dk> Message-ID: <20040408180912.R64341@xeon.unixathome.org> References: <29148.1081460066@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: John Von Essen cc: hackers@freebsd.org Subject: Re: Fundraising for FreeBSD development. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 22:10:24 -0000 On Thu, 8 Apr 2004, Poul-Henning Kamp wrote: > I cannot promise exposure on the main FreeBSD Project pages, that > would be up to the webmasters (and to some extent the core team) > to arrange and allow for such precense. If it helps, I can by put stuff on my websites with respect to acknowledging those that contribute. -- Dan Langille - BSDCan: http://www.bsdcan.org/ From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 15:15:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD6A016A4CE for ; Thu, 8 Apr 2004 15:15:20 -0700 (PDT) Received: from mta10.adelphia.net (mta10.adelphia.net [68.168.78.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F79243D2D for ; Thu, 8 Apr 2004 15:15:20 -0700 (PDT) (envelope-from craigbooth@earthlink.net) Received: from BoothLaptop ([69.167.192.118]) by mta10.adelphia.net (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with ESMTP id <20040408220837.LYOP8065.mta10.adelphia.net@BoothLaptop> for ; Thu, 8 Apr 2004 18:08:37 -0400 From: "Craig Booth" To: Date: Thu, 8 Apr 2004 18:08:35 -0400 MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcQcPcS3CgHU1mrBSkCJeN84Lh95NwBd+d4Q X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-Id: <20040408220837.LYOP8065.mta10.adelphia.net@BoothLaptop> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: XFree86 Install Monitor and Card for Sony Laptop? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 22:15:20 -0000 For XFree86, what do I enter as the monitor and video card for my Sony laptop? During the initial SYSINSTALL setup of Xfree86 on my Sony VAIO PCG-FRV27 laptop under FreeBSD 4.9, the setup goes through the configuration menus, then says it failed and do I want to try again. I exited SYSINSTALL and ran the config option on XFree86, finding out that the generated log shows that its erroring out on the Monitor/Video Card initialization. I can't find a monitor in the database that matches my ATI Radion IGP345M PCI monitor, and none of the display settings specifically match my 800/600 60 hz + 1028/768 60 hz setting. One display setting had 800/600 76 hz + 1028/768 60 hz setting, and that was the closest one so I tried it. I also tried VGA as the monitor, but it stilled failed. What monitor, card and display settings should use? Thanks in advance to anyone who can help! From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 15:16:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AAF916A4CE for ; Thu, 8 Apr 2004 15:16:29 -0700 (PDT) Received: from zaphod.nitro.dk (0x53584e1d.boanxx18.adsl-dhcp.tele.dk [83.88.78.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B7D143D41 for ; Thu, 8 Apr 2004 15:16:28 -0700 (PDT) (envelope-from simon@zaphod.nitro.dk) Received: by zaphod.nitro.dk (Postfix, from userid 3000) id E95F41189F; Fri, 9 Apr 2004 00:16:24 +0200 (CEST) Date: Fri, 9 Apr 2004 00:16:24 +0200 From: "Simon L. Nielsen" To: Poul-Henning Kamp Message-ID: <20040408221624.GA1188@zaphod.nitro.dk> References: <20040408171501.V82460@beck.quonix.net> <29148.1081460066@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: <29148.1081460066@critter.freebsd.dk> User-Agent: Mutt/1.5.6i cc: John Von Essen cc: hackers@freebsd.org Subject: Re: Fundraising for FreeBSD development. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 22:16:29 -0000 --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2004.04.08 23:34:26 +0200, Poul-Henning Kamp wrote: > In message <20040408171501.V82460@beck.quonix.net>, John Von Essen writes: > >If the fund raising is connected with FreeBSD, could people who donate > >larger amounts get some form of acknowledgement on the FreeBSD site? This > >would give an incentive for vendors who sell products that rely or use > >FreeBSD to donate larger amounts. >=20 > (see above) >=20 > Everybody who donate will be listed (possibly anonymously) on > http://people.freebsd.org/~phk/donations.html >=20 > I cannot promise exposure on the main FreeBSD Project pages, that > would be up to the webmasters (and to some extent the core team) > to arrange and allow for such precense. We currently have list of donors both on http://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributors/index.html= #DONORS and on http://www.freebsd.org/donations/donors.html so I don't see a reason why donations to phk's project could not be somewhere on the main FreeBSD website. --=20 Simon L. Nielsen FreeBSD Documentation Team --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAdc83h9pcDSc1mlERAkUuAKCUy/APM1AY6+iCCCkh1ObPx2udKwCaAwCD vq5ghcMUfkeZ+up/M17P9Qg= =r9w0 -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5-- From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 04:33:01 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7411116A4CE for ; Fri, 9 Apr 2004 04:33:01 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00C0F43D31 for ; Fri, 9 Apr 2004 04:33:00 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) i39BUxUS016234 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 9 Apr 2004 13:31:04 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id i39BUPhn085262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Apr 2004 13:30:26 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id i39BUPhD012764; Fri, 9 Apr 2004 13:30:25 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id i39BUMNO012763; Fri, 9 Apr 2004 13:30:22 +0200 (CEST) (envelope-from ticso) Date: Fri, 9 Apr 2004 13:30:22 +0200 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20040409113021.GK5279@cicely12.cicely.de> References: <20040407170422.GF567@funkthat.com> <20040408024455.GC20138@dhcp01.pn.xcllnt.net> <20040408.123443.101835222.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040408.123443.101835222.imp@bsdimp.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.63 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on cicely12.cicely.de cc: freebsd-hackers@freebsd.org cc: atkin901@yahoo.com cc: marcel@xcllnt.net Subject: Re: polling for sio? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2004 11:33:01 -0000 On Thu, Apr 08, 2004 at 12:34:43PM -0600, M. Warner Losh wrote: > In message: <20040408024455.GC20138@dhcp01.pn.xcllnt.net> > Marcel Moolenaar writes: > : On Wed, Apr 07, 2004 at 03:36:02PM -0700, othermark wrote: > : > I have a multi-port PCI card under puc and sio that has 4 19200 > : > connections to it now, and when data is streaming across all of > : > them at once, I get several silo overflows. Would it be better > : > to run this under puc + uart? > : > : Not really. The problem is that puc(4) iterates over all ports in > : the same way whether you use uart(4) or sio(4). So, puc(4) is > : the problem more that sio(4) or uart(4). However, uart(4) has the > : beginnings of an interface that puc(4) could use to figure out > : which UART needs attention without actually calling the interrupt > : routine for each of them. > > Yes, but at 19200 baud, his problems likely aren't related to the > iteration. They are likely related to the fact that he said his > interrupt is shared and therefore not fast. We have horrible > interrupt latency in current when you want to get to the FIFOs of > UARTs quickly :-(. Those cards are just what they are - cheap. They have very small FIFOs and they don't use DMA. IRQ sharing makes them even worse than traditional ISA stuff. My advise for cost efficient and fast serials is getting USB ones. Even noname USB serials do much better then puc(4) based. E.g. the FT232BM (uftdi(4)) has 128 bytes send and 384 bytes receive buffer plus your USB controller does DMA. At best you would add a cheap OHCI card if your onboard USB is UHCI based as OHCI is less CPU intensive. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 8 14:18:56 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16E8316A4CE for ; Thu, 8 Apr 2004 14:18:56 -0700 (PDT) Received: from beck.quonix.net (beck.quonix.net [146.145.66.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5F6B43D41 for ; Thu, 8 Apr 2004 14:18:55 -0700 (PDT) (envelope-from essenz@beck.quonix.net) Received: from beck.quonix.net (localhost.quonix.net [127.0.0.1]) by beck.quonix.net (8.12.11/8.12.11) with ESMTP id i38LIqKQ082505; Thu, 8 Apr 2004 17:18:52 -0400 (EDT) Received: from localhost (essenz@localhost)i38LIqeo082502; Thu, 8 Apr 2004 17:18:52 -0400 (EDT) Date: Thu, 8 Apr 2004 17:18:52 -0400 (EDT) From: John Von Essen To: Poul-Henning Kamp In-Reply-To: <28246.1081451264@critter.freebsd.dk> Message-ID: <20040408171501.V82460@beck.quonix.net> References: <28246.1081451264@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 X-Mailman-Approved-At: Fri, 09 Apr 2004 05:04:24 -0700 cc: hackers@freebsd.org Subject: Re: Fundraising for FreeBSD development. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 21:18:56 -0000 Hi, Have a few questions for you. Would the fund raising be handled through FreeBSD or direct to you? Are you taking pledges now? I would assume you would gather pledges over the next month to see if can get the USD16500, if you do, then the pledges become real donations, if you dont, then the pledges become null. If the fund raising is connected with FreeBSD, could people who donate larger amounts get some form of acknowledgement on the FreeBSD site? This would give an incentive for vendors who sell products that rely or use FreeBSD to donate larger amounts. -John On Thu, 8 Apr 2004, Poul-Henning Kamp wrote: > > http://people.freebsd.org/~phk/funding.html > > Poul-Henning > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 10:02:41 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC36316A4CE for ; Fri, 9 Apr 2004 10:02:41 -0700 (PDT) Received: from diaspar.rdsnet.ro (diaspar.rdsnet.ro [213.157.165.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5F2843D55 for ; Fri, 9 Apr 2004 10:02:40 -0700 (PDT) (envelope-from dudu@diaspar.rdsnet.ro) Received: (qmail 97105 invoked by uid 89); 9 Apr 2004 17:02:30 -0000 Received: from unknown (HELO diaspar.rdsnet.ro) (213.157.165.224) by 0 with AES256-SHA encrypted SMTP; 9 Apr 2004 17:02:30 -0000 Date: Fri, 9 Apr 2004 20:02:30 +0300 (EEST) From: Vlad GALU To: hackers@freebsd.org Message-ID: <20040409195541.I31321@qvnfcne.eqfarg.eb> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: passing messages to routing sockets X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: dudu@diaspar.rdsnet.ro List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2004 17:02:42 -0000 I understand that in order to add a new route to the routing table, one must fill a buffer with an ifa_msghdr header, followed by three socked adddress structures, representing the destination net/ip, the netmask and the gateway. While reading route(4) I encountered this: struct ifa_msghdr { .. u_int ifmam_addrs; /* like rtm_addrs */ .. } Now, the description for the rtm_addrs member of the rt_msghdr says that this should be a bitmask that identifies sockaddrs in the message sent to the routing socket. Could anyone provide a quick/small example on how to fill this member ? I don't really understand what I should write into it. Thanks in advance for any interest shown to my problem and any time spent on enlightening a poor soul :) ---- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 11:02:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AD1E16A4CE for ; Fri, 9 Apr 2004 11:02:03 -0700 (PDT) Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A743D43D54 for ; Fri, 9 Apr 2004 11:02:02 -0700 (PDT) (envelope-from louie@whizzo.transsys.com) Received: from whizzo.transsys.com (#6@localhost [127.0.0.1]) by whizzo.transsys.com (8.12.11/8.12.11) with ESMTP id i39I1uUQ039151; Fri, 9 Apr 2004 14:01:56 -0400 (EDT) (envelope-from louie@whizzo.transsys.com) Message-Id: <200404091801.i39I1uUQ039151@whizzo.transsys.com> X-Mailer: exmh version 2.6.3 04/04/2003 with nmh-1.0.4 To: ticso@cicely.de Organization: Serendipity Scheduling & Management X-Image-URL: http://www.transsys.com/louie/images/louie-mail.jpg From: "Louis A. Mamakos" References: <20040407170422.GF567@funkthat.com> <20040408024455.GC20138@dhcp01.pn.xcllnt.net> <20040408.123443.101835222.imp@bsdimp.com> <20040409113021.GK5279@cicely12.cicely.de> In-reply-to: Your message of "Fri, 09 Apr 2004 13:30:22 +0200." <20040409113021.GK5279@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 09 Apr 2004 14:01:56 -0400 Sender: louie@TransSys.COM cc: freebsd-hackers@freebsd.org cc: atkin901@yahoo.com cc: marcel@xcllnt.net Subject: Re: polling for sio? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2004 18:02:03 -0000 > On Thu, Apr 08, 2004 at 12:34:43PM -0600, M. Warner Losh wrote: > > In message: <20040408024455.GC20138@dhcp01.pn.xcllnt.net> > > Marcel Moolenaar writes: > > : On Wed, Apr 07, 2004 at 03:36:02PM -0700, othermark wrote: > > : > I have a multi-port PCI card under puc and sio that has 4 19200 > > : > connections to it now, and when data is streaming across all of > > : > them at once, I get several silo overflows. Would it be better > > : > to run this under puc + uart? > > : > > : Not really. The problem is that puc(4) iterates over all ports in > > : the same way whether you use uart(4) or sio(4). So, puc(4) is > > : the problem more that sio(4) or uart(4). However, uart(4) has the > > : beginnings of an interface that puc(4) could use to figure out > > : which UART needs attention without actually calling the interrupt > > : routine for each of them. > > > > Yes, but at 19200 baud, his problems likely aren't related to the > > iteration. They are likely related to the fact that he said his > > interrupt is shared and therefore not fast. We have horrible > > interrupt latency in current when you want to get to the FIFOs of > > UARTs quickly :-(. > > Those cards are just what they are - cheap. > They have very small FIFOs and they don't use DMA. > IRQ sharing makes them even worse than traditional ISA stuff. > My advise for cost efficient and fast serials is getting USB ones. > Even noname USB serials do much better then puc(4) based. > E.g. the FT232BM (uftdi(4)) has 128 bytes send and 384 bytes receive > buffer plus your USB controller does DMA. > At best you would add a cheap OHCI card if your onboard USB is UHCI > based as OHCI is less CPU intensive. I used to use 9600 bps serial links on LSI-11/23 systems 20 years ago to run SLIP over. This was with dumb DL-11 serial adapters on way slower CPUs and busses than we have today. The difference was a much lower interrupt latency. You'd think that running serial links 10 times faster on CPUs that are a few hundred times faster wouldn't be too hard. louie From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 11:23:23 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69AAF16A4D0 for ; Fri, 9 Apr 2004 11:23:23 -0700 (PDT) Received: from smtp0.server.rpi.edu (smtp0.server.rpi.edu [128.113.53.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00A3543D39 for ; Fri, 9 Apr 2004 11:23:23 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp0.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i39INKBM025884; Fri, 9 Apr 2004 14:23:20 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20040408171501.V82460@beck.quonix.net> References: <28246.1081451264@critter.freebsd.dk> <20040408171501.V82460@beck.quonix.net> Date: Fri, 9 Apr 2004 14:23:18 -0400 To: John Von Essen , Poul-Henning Kamp From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) cc: hackers@freebsd.org Subject: Re: Fundraising for FreeBSD development. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2004 18:23:24 -0000 At 5:18 PM -0400 4/8/04, John Von Essen wrote: >Hi, > >Have a few questions for you. Would the fund raising be handled >through FreeBSD or direct to you? He has answered that. Funding direct to PHK. Please READ the web page that you quoted from his original message: http://people.freebsd.org/~phk/funding.html >Are you taking pledges now? I would assume you would gather >pledges over the next month to see if can get the USD16500, if >you do, then the pledges become real donations, if you don't, >then the pledges become null. He has answered that. Pledges are not money. Pledges are wishes. It is a bad idea to bet your family's financial health and your mortgage on the other people's "wish" to contribute, even if those wishes are well-intended. This is particularly true if that group of well-wishers include a number of people that you have never dealt with before. I can tell you from my own personal experience that many people will promise you money to do something, and then after you do it they'll have a million excuses. "Oh, my car broke down, poor little old me. I guess *you* will have to do without that money that I had promised *you*, because *my* car broke down". Believe me, they'll make it sound like you're supposed to apologize to them for the bad luck that they have had. >If the fund raising is connected with FreeBSD, could people who >donate larger amounts get some form of acknowledgement on the >FreeBSD site? This would give an incentive for vendors who sell >products that rely or use FreeBSD to donate larger amounts. This has already been discussed in the thread. I'm sure that various things could be arranged for any vendor who really puts up some money to help fund Poul-Henning's work on the specific project he is proposing to do. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 11:30:09 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 829E516A4CE for ; Fri, 9 Apr 2004 11:30:09 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3A8343D2D for ; Fri, 9 Apr 2004 11:30:08 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) i39IS3US029353 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 9 Apr 2004 20:28:07 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id i39IQvhn088293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Apr 2004 20:26:57 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id i39IQu2r014842; Fri, 9 Apr 2004 20:26:56 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id i39IQuKx014841; Fri, 9 Apr 2004 20:26:56 +0200 (CEST) (envelope-from ticso) Date: Fri, 9 Apr 2004 20:26:56 +0200 From: Bernd Walter To: "Louis A. Mamakos" Message-ID: <20040409182655.GO5279@cicely12.cicely.de> References: <20040407170422.GF567@funkthat.com> <20040408024455.GC20138@dhcp01.pn.xcllnt.net> <20040408.123443.101835222.imp@bsdimp.com> <20040409113021.GK5279@cicely12.cicely.de> <200404091801.i39I1uUQ039151@whizzo.transsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200404091801.i39I1uUQ039151@whizzo.transsys.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.63 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on cicely12.cicely.de cc: freebsd-hackers@freebsd.org cc: marcel@xcllnt.net cc: ticso@cicely.de cc: atkin901@yahoo.com Subject: Re: polling for sio? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2004 18:30:09 -0000 On Fri, Apr 09, 2004 at 02:01:56PM -0400, Louis A. Mamakos wrote: > > Those cards are just what they are - cheap. > > They have very small FIFOs and they don't use DMA. > > IRQ sharing makes them even worse than traditional ISA stuff. > > My advise for cost efficient and fast serials is getting USB ones. > > Even noname USB serials do much better then puc(4) based. > > E.g. the FT232BM (uftdi(4)) has 128 bytes send and 384 bytes receive > > buffer plus your USB controller does DMA. > > At best you would add a cheap OHCI card if your onboard USB is UHCI > > based as OHCI is less CPU intensive. > > I used to use 9600 bps serial links on LSI-11/23 systems 20 years ago > to run SLIP over. This was with dumb DL-11 serial adapters on way > slower CPUs and busses than we have today. The difference was a > much lower interrupt latency. You'd think that running serial links > 10 times faster on CPUs that are a few hundred times faster wouldn't > be too hard. I'm not saying that interrupt latency is OK and that it's impossible to get things running with this kind of hardware, but it's very questionable that you have a fast CPU with fast IO bandwidth just to waste cycles for cheap hardware while you can easily get much more efficient hardware for your money. 16550 design is ancient - having them addressed via PCI doesn't change very much. You are also not running your Fastethernet with the same mechanisms as you did with your 10 times slower ISA NIC. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 12:22:16 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 93AFD16A4CF; Fri, 9 Apr 2004 12:22:16 -0700 (PDT) Received: from 82-41-155-225.cable.ubr01.linl.blueyonder.co.uk (82-41-155-225.cable.ubr01.linl.blueyonder.co.uk [82.41.155.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14ED043D5A; Fri, 9 Apr 2004 12:22:16 -0700 (PDT) (envelope-from andrew@mux.org.uk) Received: from mux.org.uk (spatula.home [192.168.0.4]) by gateway.home (Postfix) with ESMTP id 45BC8F0; Fri, 9 Apr 2004 20:22:14 +0100 (BST) Message-ID: <4076F7D4.6050804@mux.org.uk> Date: Fri, 09 Apr 2004 20:21:56 +0100 From: Andrew Boothman User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Simon L. Nielsen" References: <20040408171501.V82460@beck.quonix.net> <29148.1081460066@critter.freebsd.dk> <20040408221624.GA1188@zaphod.nitro.dk> In-Reply-To: <20040408221624.GA1188@zaphod.nitro.dk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Poul-Henning Kamp cc: hackers@freebsd.org cc: doc@freebsd.org cc: John Von Essen Subject: Re: Fundraising for FreeBSD development. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2004 19:22:16 -0000 Simon L. Nielsen wrote: >>I cannot promise exposure on the main FreeBSD Project pages, that >>would be up to the webmasters (and to some extent the core team) >>to arrange and allow for such precense. > > We currently have list of donors both on > http://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributors/index.html#DONORS > and on http://www.freebsd.org/donations/donors.html so I don't see a > reason why donations to phk's project could not be somewhere on the main > FreeBSD website. Surely PHK's appeal could be linked to in the news section reguardless of whether the final contributors are listed on FreeBSD.org or not? That's sure to increase the awareness of what PHK's trying to do. Andrew From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 14:49:48 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8AE916A4CE for ; Fri, 9 Apr 2004 14:49:48 -0700 (PDT) Received: from smtp.dkm.cz (smtp.dkm.cz [62.24.64.34]) by mx1.FreeBSD.org (Postfix) with SMTP id 3467243D1D for ; Fri, 9 Apr 2004 14:49:47 -0700 (PDT) (envelope-from neuhauser@chello.cz) Received: (qmail 62411 invoked by uid 0); 9 Apr 2004 21:49:45 -0000 Received: from r3al16.mistral.cz (HELO isis.wad.cz) (213.220.229.16) by smtp.dkm.cz with SMTP; 9 Apr 2004 21:49:45 -0000 Received: by isis.wad.cz (Postfix, from userid 1001) id B9B532FDA01; Fri, 9 Apr 2004 22:50:16 +0200 (CEST) Date: Fri, 9 Apr 2004 22:50:16 +0200 From: Roman Neuhauser To: hackers@freebsd.org, peter@freebsd.org, gad@freebsd.org Message-ID: <20040409205016.GA6183@isis.wad.cz> Mail-Followup-To: hackers@freebsd.org, peter@freebsd.org, gad@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: MFCs needed in src/sys/sys/cdefs.h X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2004 21:49:49 -0000 This is an extended version of my previous email to hackers@ which hasn't attracted any attention. This time I'm mailing the authors too. Two revisions need MFC in src/sys/sys/cdefs.h: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/cdefs.h.diff?r1=1.78&r2=1.79 Silences gobs of warnings in just about any libtool-using software. Fix for CURRENT commited: (5 months, 1 week ago) by peter. http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/cdefs.h.diff?r1=1.74&r2=1.75 This one fixes __RCSID(), __RCSID_SOURCE(), etc in the same manner as __FBSDID(). The commit message even says it should be MFCed after one week, but that never happened. Commited (8 months, 2 weeks ago) by gad. -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 16:50:38 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 293F716A4CE for ; Fri, 9 Apr 2004 16:50:38 -0700 (PDT) Received: from smtp.dkm.cz (smtp.dkm.cz [62.24.64.34]) by mx1.FreeBSD.org (Postfix) with SMTP id BA24E43D1F for ; Fri, 9 Apr 2004 16:50:36 -0700 (PDT) (envelope-from neuhauser@chello.cz) Received: (qmail 60953 invoked by uid 0); 9 Apr 2004 23:50:35 -0000 Received: from r3al16.mistral.cz (HELO isis.wad.cz) (213.220.229.16) by smtp.dkm.cz with SMTP; 9 Apr 2004 23:50:35 -0000 Received: by isis.wad.cz (Postfix, from userid 1001) id 7D6F32FDA01; Sat, 10 Apr 2004 00:51:07 +0200 (CEST) Date: Sat, 10 Apr 2004 00:51:06 +0200 From: Roman Neuhauser To: freebsd-hackers Message-ID: <20040409225106.GB6183@isis.wad.cz> Mail-Followup-To: freebsd-hackers Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: /bin/sh bug? munges here-doc eof markers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2004 23:50:38 -0000 Why does /bin/sh insert 0x81, or 129, or SYNBASE, before every non-word character in here-doc delimiters? It grows 'END-of-vietnamese/x-unikey/files/patch-src::unikey-gtk::Makefile.am' which is 69 characters, well below EOFMARKLEN (79) to 80 characters. Should I file a PR? roman@isis ~/tmp 1048:0 > sh shar 2>&1 >&- |head -1|hd -c 00000000 37 39 3a 20 88 45 4e 44 81 2d 6f 66 81 2d 76 69 |79: .END.-of.-vi| 0000000 7 9 : 210 E N D 201 - o f 201 - v i 00000010 65 74 6e 61 6d 65 73 65 81 2f 78 81 2d 75 6e 69 |etnamese./x.-uni| 0000010 e t n a m e s e 201 / x 201 - u n i 00000020 6b 65 79 81 2f 66 69 6c 65 73 81 2f 70 61 74 63 |key./files./patc| 0000020 k e y 201 / f i l e s 201 / p a t c 00000030 68 81 2d 73 72 63 81 3a 81 3a 75 6e 69 6b 65 79 |h.-src.:.:unikey| 0000030 h 201 - s r c 201 : 201 : u n i k e y 00000040 81 2d 67 74 6b 81 3a 81 3a 4d 61 6b 65 66 69 6c |.-gtk.:.:Makefil| 0000040 201 - g t k 201 : 201 : M a k e f i l 00000050 65 2e 61 6d 0a |e.am.| 0000050 e . a m \n 0000055 -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 22:01:30 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 543F016A4CE; Fri, 9 Apr 2004 22:01:30 -0700 (PDT) Received: from smtp4.server.rpi.edu (smtp4.server.rpi.edu [128.113.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE28D43D1F; Fri, 9 Apr 2004 22:01:29 -0700 (PDT) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp4.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i3A51RFR008230; Sat, 10 Apr 2004 01:01:27 -0400 Mime-Version: 1.0 X-Sender: gad@gilead.netel.rpi.edu (Unverified) Message-Id: In-Reply-To: <20040409205016.GA6183@isis.wad.cz> References: <20040409205016.GA6183@isis.wad.cz> Date: Sat, 10 Apr 2004 01:01:26 -0400 To: Roman Neuhauser , hackers@FreeBSD.org, peter@FreeBSD.org From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) Subject: Re: MFCs needed in src/sys/sys/cdefs.h X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 05:01:30 -0000 At 10:50 PM +0200 4/9/04, Roman Neuhauser wrote: >This is an extended version of my previous email to hackers@ >which hasn't attracted any attention. This time I'm mailing >the authors too. I must have missed the earlier message... >Two revisions need MFC in src/sys/sys/cdefs.h: > >http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/cdefs.h.diff?r1=1.78&r2=1.79 > >Silences gobs of warnings in just about any libtool-using software. > >Fix for CURRENT commited: (5 months, 1 week ago) by peter. I have no opinion on this. It looks fine to me. >http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/cdefs.h.diff?r1=1.74&r2=1.75 > >This one fixes __RCSID(), __RCSID_SOURCE(), etc in the same >manner as __FBSDID(). The commit message even says it should >be MFCed after one week, but that never happened. > >Commited (8 months, 2 weeks ago) by gad. When I went to MFC this, I found out that cdefs in -stable was different enough to cdefs in -current that this was not a simple MFC. That update modified lines added by earlier changes which had not been MFC'ed. After talking about it with BDE, we felt that it was more trouble than it was worth to sort out what should and should not be MFC'ed. Note, for instance, that the lines which are replaced by r1.75 do not even exist in cdefs.h for release 4.x. The update fixes the handling of the NO__RCSID, NO__RCSID_SOURCE, NO__SCCSID, and NO_COPYRIGHT options -- and 4.x does not have any of those NO__* options. In fact, it doesn't have the __SCCSID macro, never mind the NO__SCCSID option to nullify that macro... It would be easy enough to write a minimal update for 4.x that would "add and then fix" those options. But right now I am really over-committed and over-tired. I also do not see much urgency in MFC'ing a fix for bugs that do not exist in -stable... It would have been much nicer if you had gotten my attention about this a few weeks ago. We are now *in* the code-freeze for 4.x, so I'll have to see what re@ thinks about it. I could also pick up Peter's update, if he wanted me to. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 22:11:48 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65FE816A4CE for ; Fri, 9 Apr 2004 22:11:48 -0700 (PDT) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C7A343D45 for ; Fri, 9 Apr 2004 22:11:48 -0700 (PDT) (envelope-from berhart@erhartgroup.com) Received: from cocaine.erhartgroup.com (c-67-166-0-138.client.comcast.net[67.166.0.138]) by comcast.net (sccrmhc11) with SMTP id <2004041005114701100rurtre>; Sat, 10 Apr 2004 05:11:47 +0000 Message-Id: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> X-Sender: berhart%erhartgroup.com@mx1.erhartgroup.com (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.2.0 Date: Fri, 09 Apr 2004 23:11:49 -0600 To: freebsd-hackers@freebsd.org From: Brandon Erhart Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: FreeBSD and Debugging? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 05:11:48 -0000 Hi, I've been writing an application for some time now, and I seem to have introduced some kind of bug that is smashing the stack or the heap *somewhere*. One of my variables (or more) are being changed, and the program relies on this being set to the last time data was read from a socket. It's getting reset to 0 for some odd, odd reason. But enough of my whining. My code, my problems. What isn't my problem, though, and is probably a lot of people's problem, is the lack of a *good* debugger for BSD. I know gdb is pretty good, and it does help me often, but I can't seem to find a debugger that will detect under/over reads/writes in the heap and/or stack (bounds checking). I had downloaded the bounds checking gcc, it compiled fine, but I get an error that doesn't allow it to run on FreeBSD 4.9 (w/ gcc-2.95.2) -- something about ulimit not being found. I checked Google, and of course, found nothing. I didn't bother enough to look any deeper than that. For Linux, I've seen valgrind (probably one of the best) as well as several others. In the commercial arena, Rational's PURIFY and Parasoft's INSURE++ work on every OS *but* BSD. Any particular reason for this? Are there any debuggers out there for BSD that will detect the heap/stack corruption!? Thanks in advance for you support, Brandon From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 22:14:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC47716A4CE for ; Fri, 9 Apr 2004 22:14:03 -0700 (PDT) Received: from tx0.oucs.ox.ac.uk (tx0.oucs.ox.ac.uk [129.67.1.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2565643D4C for ; Fri, 9 Apr 2004 22:14:03 -0700 (PDT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from scan0.oucs.ox.ac.uk ([129.67.1.162] helo=localhost) by tx0.oucs.ox.ac.uk with esmtp (Exim 4.24) id 1BCAoc-0007HN-DA for freebsd-hackers@freebsd.org; Sat, 10 Apr 2004 06:14:02 +0100 Received: from rx0.oucs.ox.ac.uk ([129.67.1.161]) by localhost (scan0.oucs.ox.ac.uk [129.67.1.162]) (amavisd-new, port 25) with ESMTP id 27947-01 for ; Sat, 10 Apr 2004 06:14:01 +0100 (BST) Received: from gateway.wadham.ox.ac.uk ([163.1.161.253]) by rx0.oucs.ox.ac.uk with smtp (Exim 4.24) id 1BCAob-0007HF-2n for freebsd-hackers@freebsd.org; Sat, 10 Apr 2004 06:14:01 +0100 Received: (qmail 12690 invoked by uid 1004); 10 Apr 2004 05:14:01 -0000 Received: from colin.percival@wadham.ox.ac.uk by gateway by uid 71 with qmail-scanner-1.20 (clamscan: 0.67. sweep: 2.18/3.79. Clear:RC:1(163.1.161.131):. Processed in 0.062512 secs); 10 Apr 2004 05:14:01 -0000 Received: from dhcp1131.wadham.ox.ac.uk (HELO piii600.wadham.ox.ac.uk) (163.1.161.131) by gateway.wadham.ox.ac.uk with SMTP; 10 Apr 2004 05:14:01 -0000 Message-Id: <6.0.1.1.1.20040410061321.04334e28@imap.sfu.ca> X-Sender: cperciva@imap.sfu.ca (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Date: Sat, 10 Apr 2004 06:13:57 +0100 To: Brandon Erhart From: Colin Percival In-Reply-To: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> References: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD and Debugging? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 05:14:03 -0000 At 06:11 10/04/2004, Brandon Erhart wrote: >Are there any debuggers out there for BSD that will detect the heap/stack corruption!? Real Men use printf(3). :-) Colin Percival From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 22:15:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91B9616A4CE for ; Fri, 9 Apr 2004 22:15:55 -0700 (PDT) Received: from smtp.netli.com (ip2-pal-focal.netli.com [66.243.52.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D00B43D55 for ; Fri, 9 Apr 2004 22:15:55 -0700 (PDT) (envelope-from vlm@netli.com) Received: (qmail 1750 invoked by uid 84); 10 Apr 2004 05:15:52 -0000 Received: from vlm@netli.com by l3-1 with qmail-scanner-0.96 (uvscan: v4.1.40/v4121. . Clean. Processed in 0.164179 secs); 10 Apr 2004 05:15:52 -0000 Received: from unknown (HELO netli.com) (172.17.1.12) by mx01-pal-lan.netli.lan with SMTP; 10 Apr 2004 05:15:52 -0000 Message-ID: <40778354.50407@netli.com> Date: Fri, 09 Apr 2004 22:17:08 -0700 From: Lev Walkin Organization: Netli, Inc. User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040307 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: Brandon Erhart References: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> In-Reply-To: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD and Debugging? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 05:15:55 -0000 Brandon Erhart wrote: > > For Linux, I've seen valgrind (probably one of the best) as well as > several others. In the commercial arena, Rational's PURIFY and > Parasoft's INSURE++ work on every OS *but* BSD. Any particular reason > for this? > > Are there any debuggers out there for BSD that will detect the > heap/stack corruption!? Valgrind is available for FreeBSD. http://eirikn.kerneled.com/valgrind/ -- Lev Walkin vlm@netli.com From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 22:23:22 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 604FD16A4CE for ; Fri, 9 Apr 2004 22:23:22 -0700 (PDT) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EABC43D1D for ; Fri, 9 Apr 2004 22:23:22 -0700 (PDT) (envelope-from berhart@erhartgroup.com) Received: from cocaine.erhartgroup.com (c-67-166-0-138.client.comcast.net[67.166.0.138]) by comcast.net (sccrmhc12) with SMTP id <20040410052321012001ur3pe>; Sat, 10 Apr 2004 05:23:21 +0000 Message-Id: <6.0.2.0.2.20040409232219.01c8eec0@mx1.erhartgroup.com> X-Sender: berhart%erhartgroup.com@mx1.erhartgroup.com (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.2.0 Date: Fri, 09 Apr 2004 23:23:23 -0600 To: Lev Walkin From: Brandon Erhart In-Reply-To: <40778354.50407@netli.com> References: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> <40778354.50407@netli.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD and Debugging? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 05:23:22 -0000 Thank you. You are my new god. I had checked out a version of valgrind for BSD (one of the patches) and it failed to compile. Everything seems to be working, except I get this warning at the beginning of the program: "Warning: ignoring --pointercheck=yes, because i386_set_ldt failed (errno=45)" Any ideas? Brandon At 11:17 PM 4/9/2004, you wrote: >Brandon Erhart wrote: >>For Linux, I've seen valgrind (probably one of the best) as well as >>several others. In the commercial arena, Rational's PURIFY and Parasoft's >>INSURE++ work on every OS *but* BSD. Any particular reason for this? >>Are there any debuggers out there for BSD that will detect the heap/stack >>corruption!? > >Valgrind is available for FreeBSD. > >http://eirikn.kerneled.com/valgrind/ > >-- >Lev Walkin >vlm@netli.com >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 22:35:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9BCC16A4CE for ; Fri, 9 Apr 2004 22:35:10 -0700 (PDT) Received: from smtp01.syd.iprimus.net.au (smtp01.syd.iprimus.net.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16F9243D45 for ; Fri, 9 Apr 2004 22:35:10 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from robbins.dropbear.id.au (210.50.36.31) by smtp01.syd.iprimus.net.au (7.0.024) id 402BA92701430477; Sat, 10 Apr 2004 15:35:07 +1000 Received: by robbins.dropbear.id.au (Postfix, from userid 1000) id D32BC41DC; Sat, 10 Apr 2004 15:38:30 +1000 (EST) Date: Sat, 10 Apr 2004 15:38:30 +1000 From: Tim Robbins To: Brandon Erhart Message-ID: <20040410053830.GA59050@cat.robbins.dropbear.id.au> References: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD and Debugging? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 05:35:10 -0000 On Fri, Apr 09, 2004 at 11:11:49PM -0600, Brandon Erhart wrote: [...] > Are there any debuggers out there for BSD that will detect the heap/stack > corruption!? ElectricFence (devel/ElectricFence in the ports collection) detects most kinds of heap corruption, but not stack corruption. It will reliably abort the program on the exact instruction that first corrupts the heap (e.g. overruns a buffer), then you can use gdb on the core dump to analyze it further. After installing the port, run your program with "ef.sh". Tim From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 10 00:13:08 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8EB3716A4CE; Sat, 10 Apr 2004 00:13:08 -0700 (PDT) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B84043D3F; Sat, 10 Apr 2004 00:13:07 -0700 (PDT) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: from dibbler.crodrigues.org (h00609772adf0.ne.client2.attbi.com[66.31.45.197]) by comcast.net (sccrmhc12) with ESMTP id <20040410071306012001v5j7e>; Sat, 10 Apr 2004 07:13:06 +0000 Received: from dibbler.crodrigues.org (localhost.crodrigues.org [127.0.0.1]) i3A7D6DH011219; Sat, 10 Apr 2004 03:13:06 -0400 (EDT) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost) by dibbler.crodrigues.org (8.12.11/8.12.11/Submit) id i3A7D6ci011218; Sat, 10 Apr 2004 03:13:06 -0400 (EDT) (envelope-from rodrigc) Date: Sat, 10 Apr 2004 03:13:06 -0400 From: Craig Rodrigues To: Lev Walkin Message-ID: <20040410071306.GA6522@crodrigues.org> References: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> <40778354.50407@netli.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40778354.50407@netli.com> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@freebsd.org cc: freebsd-ports@freebsd.org Subject: Re: FreeBSD and Debugging? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 07:13:08 -0000 On Fri, Apr 09, 2004 at 10:17:08PM -0700, Lev Walkin wrote: > Valgrind is available for FreeBSD. > > http://eirikn.kerneled.com/valgrind/ Wow!! This is excellent. Is anyone planning to add this to the ports collection? -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 10 01:44:30 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E838616A4CE for ; Sat, 10 Apr 2004 01:44:29 -0700 (PDT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DCB243D45 for ; Sat, 10 Apr 2004 01:44:29 -0700 (PDT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 194096542F; Sat, 10 Apr 2004 09:44:28 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 86773-01; Sat, 10 Apr 2004 09:44:27 +0100 (BST) Received: from empiric.dek.spc.org (82-147-17-88.dsl.uk.rapidplay.com [82.147.17.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 771DF653DF; Sat, 10 Apr 2004 09:44:26 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id C464660EE; Sat, 10 Apr 2004 09:44:25 +0100 (BST) Date: Sat, 10 Apr 2004 09:44:25 +0100 From: Bruce M Simpson To: Vlad GALU Message-ID: <20040410084425.GT710@empiric.dek.spc.org> References: <20040409195541.I31321@qvnfcne.eqfarg.eb> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7vAdt9JsdkkzRPKN" Content-Disposition: inline In-Reply-To: <20040409195541.I31321@qvnfcne.eqfarg.eb> cc: hackers@freebsd.org Subject: Re: passing messages to routing sockets X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 08:44:30 -0000 --7vAdt9JsdkkzRPKN Content-Type: multipart/mixed; boundary="OOq1TgGhe8eTwFBO" Content-Disposition: inline --OOq1TgGhe8eTwFBO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Apr 09, 2004 at 08:02:30PM +0300, Vlad GALU wrote: > I understand that in order to add a new route to the routing > table, one must fill a buffer with an ifa_msghdr header, followed by three > socked adddress structures, representing the destination net/ip, the > netmask and the gateway. [routing table suckiness snipped] > Could anyone provide a quick/small example on how to fill this > member ? I don't really understand what I should write into it. It's a sucky one and I had to stare at src/sbin/route/* for a while til the penny dropped. The netmasks in particular are packed in in a format which isn't immediately obvious. Have a look at the attached code, in particular, reply_rtmsg_resolve(). Also have a look at Section 19.11 of TCP/IP Illustrated Volume 2, and Section 18.9 of UNIX Network Programming 3e Vol 1. The API sucks, and it's something we'd like to change in future. Regards, BMS --OOq1TgGhe8eTwFBO Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rtmhack.c" /* $FreeBSD$ */ /* * This is a hack to demonstrate the concept of hooking for the * RTM_RESOLVE message being sent from the FreeBSD routing code, * as a means of looking up routes on demand using a routing protocol * such as AODV. * This code will probably be vastly cleaned up and tested more thoroughly * before being used as the basis for a user-space BSD AODV implementation. */ /* * Copyright (c) 2003 Bruce M. Simpson * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Bruce M. Simpson. * 4. Neither the name of Bruce M. Simpson nor the names of co- * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY Bruce M. Simpson AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Bruce M. Simpson OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include union sockunion { struct sockaddr sa; struct sockaddr_in sin; struct sockaddr_dl sdl; struct sockaddr_storage ss; }; typedef union sockunion sockunion_t; void usage(void); int add_xresolve_route(char *ifname, struct sockaddr_in *sin, int bits); int inet_cidr_aton(char *s, struct in_addr *pin, int *bits); int create_if(char *ifname); int destroy_if(char *ifname); int if2sockaddr(char *ifname, struct sockaddr_dl *sdl); int handle_rtmsg(struct rt_msghdr *rtm, int msglen); int handle_rtmsg_resolve(struct rt_msghdr *rtm, int msglen); int reply_rtmsg_resolve(struct sockaddr_in *sin); /* * We check for the existence of ifname. */ #if 1 #define _IFNAME "disc1" #else #define _IFNAME "lo0" #endif int rtsock = -1; int created = 0; char *ifname = _IFNAME; void sighand_term(int sig) { /* * Destroying an interface is sufficient to delete the routes * pointing to it. */ if (created) destroy_if(ifname); exit(EXIT_SUCCESS); } void setup_signals(void) { struct sigaction sa, osa; sa.sa_handler = sighand_term; sa.sa_flags = 0; sigemptyset(&sa.sa_mask); sigaction(SIGTERM, &sa, &osa); sigaction(SIGINT, &sa, &osa); sigaction(SIGQUIT, &sa, &osa); sigaction(SIGKILL, &sa, &osa); } int main(int argc, char *argv[]) { int n; int bits; char msg[2048]; struct sockaddr_in sin; if (geteuid() != 0) errx(1, "must be root to alter routing table"); memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_len = sizeof(sin); /* Parse network argument */ if ((argc != 2) || (inet_cidr_aton(argv[1], &sin.sin_addr, &bits) != 1)) usage(); setup_signals(); /* Open routing socket */ rtsock = socket(PF_ROUTE, SOCK_RAW, 0); if (rtsock == -1) err(EX_OSERR, "socket"); /* Check that the target interface exists; create it if it doesn't. */ if (if_nametoindex(ifname) == 0) { warnx("interface %s does not exist, creating.", ifname); create_if(ifname); created = 1; add_xresolve_route(ifname, &sin, bits); } /* Routing event loop */ for (;;) { n = read(rtsock, msg, sizeof(msg)); handle_rtmsg((struct rt_msghdr *)msg, n); } if (rtsock != -1) close(rtsock); exit (EXIT_SUCCESS); } void usage(void) { fprintf(stderr, "usage: rtmhack \n" " specifies the test network in CIDR notation\n"); exit(EXIT_FAILURE); } /* * Like inet_aton(), but handle an optional CIDR prefix. */ int inet_cidr_aton(char *s, struct in_addr *pin, int *bits) { char *q; q = NULL; *bits = 32; if ((q = strchr(s, '/')) != NULL) { *bits = strtoul(q+1, 0, 0); *q = '\0'; } return (inet_aton(s, pin)); } /* * create an instance of a named clonable interface. * Return 0 if successful, or -1 if an error occurred. */ int create_if(char *ifname) { int s, retval; struct ifreq ifr; retval = 0; s = socket(AF_INET, SOCK_DGRAM, 0); if (s == -1) err(1, "socket"); memset(&ifr, 0, sizeof(ifr)); (void) strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(s, SIOCIFCREATE, &ifr) < 0) { retval = -1; warn("SIOCIFCREATE"); } close(s); return (retval); } /* * destroy an instance of a named clonable interface. * Return 0 if successful, or -1 if an error occurred. */ int destroy_if(char *ifname) { int s, retval; struct ifreq ifr; retval = 0; s = socket(AF_INET, SOCK_DGRAM, 0); if (s == -1) err(1, "socket"); memset(&ifr, 0, sizeof(ifr)); (void) strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(s, SIOCIFDESTROY, &ifr) < 0) { retval = -1; warn("SIOCIFDESTROY"); } close(s); return (retval); } /* * Copy the sockaddr_dl structure corresponding to the named interface * into the structure pointed to by sdl. * Returns 0 if successful, or -1 if the structure found was not valid. */ int if2sockaddr(char *ifname, struct sockaddr_dl *sdl) { struct ifaddrs *ifap, *ifa; struct sockaddr_dl *isdl; if (getifaddrs(&ifap)) err(1, "getifaddrs"); isdl = NULL; for (ifa = ifap; ifa; ifa = ifa->ifa_next) { if (ifa->ifa_addr->sa_family != AF_LINK) continue; if (strcmp(ifname, ifa->ifa_name)) continue; isdl = (struct sockaddr_dl *)ifa->ifa_addr; } if (isdl) memcpy(sdl, isdl, isdl->sdl_len); return ((isdl != NULL) ? 0 : -1); } /* * Given the prefix length of an IPv4 CIDR network address, * fill out a sockaddr_in structure accordingly for use with * BSD routing code. * * Return the value of the sin_len member as a hint. */ int inet_makenetmask(int bits, struct sockaddr_in *so_mask) { char *cp; unsigned long mask; int len; const int maxbits = 32; memset(so_mask, 0, sizeof(struct sockaddr_in)); mask = 0xFFFFFFFF << (maxbits - bits); so_mask->sin_addr.s_addr = htonl(mask); /* count number of bytes in mask containing set bits */ cp = (char *)(&so_mask->sin_addr + 1); while (*--cp == 0 && cp > (char *)&so_mask) ; so_mask->sin_len = len = 1 + cp - (char *)&so_mask; return (len); } /* * Bind an cloning XRESOLVE route, for the given network/host, * to a named interface. * * The packing of the rtm message is all important. The kernel * expects it in a certain way. This routine seems to work but * 'route monitor' is reporting some junk at the end of the netmask. * * Return 0 if successful, or -1 if an error occurred. */ int add_xresolve_route(char *ifname, struct sockaddr_in *so_dst, int bits) { #define ROUNDUP(a) \ ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) #define NEXTADDR(cp, l, u) \ do { \ l = (u)->sa.sa_len; \ (l) = ROUNDUP(l); \ memmove((cp), (u), (l)); \ (cp) += (l); \ } while (0) /* */ struct { struct rt_msghdr rtm; sockunion_t addrs[RTAX_MAX]; } r; sockunion_t so_iface; sockunion_t so_mask; int rlen, len, masklen; char *cp; cp = (char *)&r.addrs[0]; masklen = rlen = len = 0; memset(&r, 0, sizeof(r)); memset(&so_iface, 0, sizeof(so_iface)); memset(&so_mask, 0, sizeof(so_mask)); r.rtm.rtm_version = RTM_VERSION; r.rtm.rtm_type = RTM_ADD; r.rtm.rtm_pid = getpid(); r.rtm.rtm_seq = 0; r.rtm.rtm_flags = RTF_XRESOLVE | RTF_CLONING | RTF_UP; r.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK; if2sockaddr(ifname, &so_iface.sdl); masklen = inet_makenetmask(bits, &so_mask.sin); NEXTADDR(cp, len, (sockunion_t *)so_dst); NEXTADDR(cp, len, &so_iface); NEXTADDR(cp, len, &so_mask); r.rtm.rtm_msglen = len = cp - (char *)&r; rlen = write(rtsock, &r, len); if (rlen < 0) warn("write"); return ((rlen > 0) ? 0 : -1); #undef NEXTADDR #undef ROUNDUP } /* * routing socket message dispatcher */ int handle_rtmsg(struct rt_msghdr *rtm, int msglen) { if (rtm->rtm_version != RTM_VERSION) { (void) printf("bad routing message version %d\n", rtm->rtm_version); return (-1); } switch (rtm->rtm_type) { case RTM_RESOLVE: (void) printf("rtm_type %d: RTM_RESOLVE\n", rtm->rtm_type); handle_rtmsg_resolve(rtm, msglen); break; default: (void) printf("rtm_type %d: ignored\n", rtm->rtm_type); } return (0); } /* * Dispatch routine for RTM_RESOLVE routing messages. * Return 0 if successful; otherwise, return -1 if an error occurred. */ int handle_rtmsg_resolve(struct rt_msghdr *rtm, int msglen) { struct sockaddr_in *sin; struct sockaddr *sa; void *sp; /* * ignore messages from ourselves */ if (rtm->rtm_pid == getpid()) { printf("heard own message, ignoring\n"); return (0); } printf("rtm_index: %04x rtm_addrs: %08x\n", rtm->rtm_index, rtm->rtm_addrs); /* * The message must contain the address for which a route is * being requested, otherwise it is invalid. */ if (!(rtm->rtm_addrs & RTA_DST)) { warnx("RTM_RESOLVE message does not contain destination"); return (-1); } sa = sp = (rtm + 1); if (sa->sa_family != AF_INET) { warnx("RTM_RESOLVE contains non-AF_INET destination %d", sa->sa_family); return (-1); } sin = (struct sockaddr_in *)sa; printf("route requested for %s\n", inet_ntoa(sin->sin_addr)); /* * XXX: Should check if the requested destination is within the * network prefix specified on the command line. */ reply_rtmsg_resolve(sin); printf("route resolved for %s\n", inet_ntoa(sin->sin_addr)); return (0); } /* * Modify a given route in response to an RTM_RESOLVE message from the kernel. * Return 0 if successful; otherwise, return -1. */ int reply_rtmsg_resolve(struct sockaddr_in *sin) { struct { struct rt_msghdr rtm; struct sockaddr addrs[RTAX_MAX]; } r; struct sockaddr_dl sdl; int len; memset(&r, 0, sizeof(r)); r.rtm.rtm_version = RTM_VERSION; r.rtm.rtm_type = RTM_CHANGE; r.rtm.rtm_pid = getpid(); r.rtm.rtm_seq = 0; if2sockaddr("lo0", &sdl); memcpy(&r.addrs[RTAX_DST], sin, sin->sin_len); memcpy(&r.addrs[RTAX_GATEWAY], &sdl, sdl.sdl_len); memset(&r.addrs[RTAX_IFP], 0, sizeof(r.addrs[RTAX_IFP])); memset(&r.addrs[RTAX_IFA], 0, sizeof(r.addrs[RTAX_IFA])); r.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_IFP | RTA_IFA; r.rtm.rtm_flags = RTF_DONE; r.rtm.rtm_msglen = sizeof(r); len = write(rtsock, &r, r.rtm.rtm_msglen); if (len != r.rtm.rtm_msglen) warn("write"); return ((len > 0) ? 0 : -1); } --OOq1TgGhe8eTwFBO-- --7vAdt9JsdkkzRPKN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: '' iD8DBQFAd7PpueUpAYYNtTsRAvYjAJ9Yr+IRLqOTkpkTyQl4CY047WRY+gCgnUiO kMMDaCrFJwyKefYUOObxsjM= =np2+ -----END PGP SIGNATURE----- --7vAdt9JsdkkzRPKN-- From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 10 02:18:18 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 999AE16A4CE for ; Sat, 10 Apr 2004 02:18:18 -0700 (PDT) Received: from Vitsch.net (b74143.upc-b.chello.nl [212.83.74.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9960143D39 for ; Sat, 10 Apr 2004 02:18:17 -0700 (PDT) (envelope-from Danovitsch@Vitsch.net) Received: from 192.168.45.9 (b83007.upc-b.chello.nl [212.83.83.7]) by Vitsch.net (8.12.3p2/8.11.3) with ESMTP id i3A9HKt9032377; Sat, 10 Apr 2004 11:17:33 +0200 (CEST) (envelope-from Danovitsch@Vitsch.net) From: "Daan Vreeken [PA4DAN]" To: Brandon Erhart Date: Sat, 10 Apr 2004 11:17:18 +0200 User-Agent: KMail/1.5.2 References: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> <40778354.50407@netli.com> <6.0.2.0.2.20040409232219.01c8eec0@mx1.erhartgroup.com> In-Reply-To: <6.0.2.0.2.20040409232219.01c8eec0@mx1.erhartgroup.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404101117.18163.Danovitsch@Vitsch.net> cc: FreeBSD-hackers@FreeBSD.org Subject: Re: FreeBSD and Debugging? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 09:18:18 -0000 On Saturday 10 April 2004 07:23, Brandon Erhart wrote: > Thank you. You are my new god. I had checked out a version of valgrind for > BSD (one of the patches) and it failed to compile. > > Everything seems to be working, except I get this warning at the beginning > of the program: > > "Warning: ignoring --pointercheck=yes, because i386_set_ldt failed > (errno=45)" Sounds like you need "options USER_LDT" in you kernel. grtz, Daan From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 10 02:37:18 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2A1616A4CE for ; Sat, 10 Apr 2004 02:37:18 -0700 (PDT) Received: from herring.rabson.org (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8C7B43D5C for ; Sat, 10 Apr 2004 02:37:17 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from herring.rabson.org (herring.rabson.org [10.0.0.2]) by herring.rabson.org (8.12.11/8.12.11) with ESMTP id i3A9b3TK014355; Sat, 10 Apr 2004 10:37:04 +0100 (BST) (envelope-from dfr@nlsystems.com) From: Doug Rabson To: freebsd-hackers@freebsd.org Date: Sat, 10 Apr 2004 10:37:03 +0100 User-Agent: KMail/1.6.1 References: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> <40778354.50407@netli.com> In-Reply-To: <40778354.50407@netli.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404101037.03758.dfr@nlsystems.com> X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on herring.rabson.org X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' cc: Brandon Erhart Subject: Re: FreeBSD and Debugging? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 09:37:18 -0000 On Saturday 10 April 2004 06:17, Lev Walkin wrote: > Brandon Erhart wrote: > > For Linux, I've seen valgrind (probably one of the best) as well as > > several others. In the commercial arena, Rational's PURIFY and > > Parasoft's INSURE++ work on every OS *but* BSD. Any particular > > reason for this? > > > > Are there any debuggers out there for BSD that will detect the > > heap/stack corruption!? > > Valgrind is available for FreeBSD. > > http://eirikn.kerneled.com/valgrind/ Or alternatively, a more up-to-date version (which the above is a snapshot of) at http://www.rabson.org/#valgrind. From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 10 04:06:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13AA116A4CE for ; Sat, 10 Apr 2004 04:06:06 -0700 (PDT) Received: from smtp.dkm.cz (smtp.dkm.cz [62.24.64.34]) by mx1.FreeBSD.org (Postfix) with SMTP id BF2CB43D2F for ; Sat, 10 Apr 2004 04:06:04 -0700 (PDT) (envelope-from neuhauser@chello.cz) Received: (qmail 452 invoked by uid 0); 10 Apr 2004 11:06:03 -0000 Received: from r3al16.mistral.cz (HELO isis.wad.cz) (213.220.229.16) by smtp.dkm.cz with SMTP; 10 Apr 2004 11:06:03 -0000 Received: by isis.wad.cz (Postfix, from userid 1001) id 46E5A2FDA01; Sat, 10 Apr 2004 12:06:30 +0200 (CEST) Date: Sat, 10 Apr 2004 12:06:30 +0200 From: Roman Neuhauser To: Garance A Drosehn Message-ID: <20040410100630.GA381@isis.wad.cz> Mail-Followup-To: Garance A Drosehn , hackers@FreeBSD.org, peter@FreeBSD.org References: <20040409205016.GA6183@isis.wad.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: hackers@FreeBSD.org cc: peter@FreeBSD.org Subject: Re: MFCs needed in src/sys/sys/cdefs.h X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 11:06:06 -0000 # gad@FreeBSD.org / 2004-04-10 01:01:26 -0400: > At 10:50 PM +0200 4/9/04, Roman Neuhauser wrote: > >This is an extended version of my previous email to hackers@ > >which hasn't attracted any attention. This time I'm mailing > >the authors too. > > I must have missed the earlier message... Perhaps because I was only talking about the peter's commit? :) > >Two revisions need MFC in src/sys/sys/cdefs.h: > > > >http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/cdefs.h.diff?r1=1.78&r2=1.79 > > > >Silences gobs of warnings in just about any libtool-using software. > > > >Fix for CURRENT commited: (5 months, 1 week ago) by peter. > > I have no opinion on this. It looks fine to me. It's unfortunate we're frozen now, but I don't really care if it gets merged now or when the freeze is lifted, someone just MFC it please. I was tinkering with some ports last week, and the sheer number of occurrences of those warnings almost made me roll over. Google didn't prove very useful beyound showing that the internet is full of them (think archived failed build reports, various bento-like systems, etc), all FreeBSD. As for the change you made, I agree it's not worth the trouble. -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 10 03:31:53 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02A6116A4CF for ; Sat, 10 Apr 2004 03:31:53 -0700 (PDT) Received: from winston.piwebs.com (217-19-20-186.dsl.cambrium.nl [217.19.20.186]) by mx1.FreeBSD.org (Postfix) with SMTP id 0516643D55 for ; Sat, 10 Apr 2004 03:31:52 -0700 (PDT) (envelope-from avleeuwen@piwebs.com) Received: (qmail 978 invoked from network); 10 Apr 2004 10:31:51 -0000 Received: from vincent.piwebs.com (192.168.0.84) by winston.piwebs.com with SMTP; 10 Apr 2004 10:31:51 -0000 From: Arjan van Leeuwen To: freebsd-ports@freebsd.org Date: Sat, 10 Apr 2004 12:31:52 +0200 User-Agent: KMail/1.6.1 References: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> <40778354.50407@netli.com> <20040410071306.GA6522@crodrigues.org> In-Reply-To: <20040410071306.GA6522@crodrigues.org> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_Z08dAYIu/8xTbrB"; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404101231.53182.avleeuwen@piwebs.com> X-Mailman-Approved-At: Sat, 10 Apr 2004 05:28:53 -0700 cc: Craig Rodrigues cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD and Debugging? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: avleeuwen@piwebs.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 10:31:53 -0000 --Boundary-02=_Z08dAYIu/8xTbrB Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 10 April 2004 09:13, Craig Rodrigues wrote: > On Fri, Apr 09, 2004 at 10:17:08PM -0700, Lev Walkin wrote: > > Valgrind is available for FreeBSD. > > > > http://eirikn.kerneled.com/valgrind/ > > Wow!! This is excellent. > > Is anyone planning to add this to the ports collection? It's still in development, see http://www.rabson.org/. A port would be nice= =20 though :). Arjan --Boundary-02=_Z08dAYIu/8xTbrB Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAd80Z3Ym57eNCXiERAlYIAKCox3uec1+wpGQJi8ManEwDG1smBACguK7e 5IuhRtkkoDDRDkfI0LG5oFg= =v7oz -----END PGP SIGNATURE----- --Boundary-02=_Z08dAYIu/8xTbrB-- From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 10 17:30:57 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4803B16A4CE for ; Sat, 10 Apr 2004 17:30:57 -0700 (PDT) Received: from smtp3.Stanford.EDU (smtp3.Stanford.EDU [171.67.16.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 201D443D39 for ; Sat, 10 Apr 2004 17:30:57 -0700 (PDT) (envelope-from tedu@stanford.edu) Received: from elaine29.Stanford.EDU (elaine29.Stanford.EDU [171.64.15.104]) by smtp3.Stanford.EDU (8.12.11/8.12.11) with ESMTP id i3B0Uqmp019614; Sat, 10 Apr 2004 17:30:53 -0700 Date: Sat, 10 Apr 2004 17:30:52 -0700 (PDT) From: Ted Unangst To: Brandon Erhart In-Reply-To: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD and Debugging? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2004 00:30:57 -0000 On Fri, 9 Apr 2004, Brandon Erhart wrote: > Are there any debuggers out there for BSD that will detect the heap/stack > corruption!? [standard disclaimer and note about self-promotion goes here :)] valgrind and electric fence are very good suggestions. my own personal pet project was adding guard pages to the system malloc. then linking malloc.conf -> AFGJ or setenv MALLOC_OPTIONS and you can find bugs in all the software you run. it's less complete than a dedicated heap checker, but lightweight enough (well, 20% penalty may not be light for some) that i run with it full time. we've had a fairly significant amount of success with it finding bugs in software that just happened to work. http://www.zeitbombe.org/patches/malloc_guard.diff should apply pretty cleanly to freebsd's malloc.c -- From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 10 17:47:27 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E02E916A4CE; Sat, 10 Apr 2004 17:47:27 -0700 (PDT) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 767E243D2D; Sat, 10 Apr 2004 17:47:27 -0700 (PDT) (envelope-from berhart@erhartgroup.com) Received: from cocaine.erhartgroup.com (c-67-166-0-138.client.comcast.net[67.166.0.138]) by comcast.net (sccrmhc11) with SMTP id <2004041100472601100rubose>; Sun, 11 Apr 2004 00:47:26 +0000 Message-Id: <6.0.2.0.2.20040410183811.01c7f668@mx1.erhartgroup.com> X-Sender: berhart%erhartgroup.com@mx1.erhartgroup.com (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.2.0 Date: Sat, 10 Apr 2004 18:47:30 -0600 To: freebsd-hackers@freebsd.org From: Brandon Erhart Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Weird behavior with either reading or write()ing !? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2004 00:47:28 -0000 Hello, This is a rather odd bug/weird behavior. Confidence is high that it is not logic in my code this time. Please read the following carefully! In a web-crawling program I am writing, I deal with several thousand fds at a time. I am using FreeBSD's KQueue to keep track of them all so that I may be notified when an event is pending on a given socket. The program works as it should for about 75% of the connections. The other 25% don't work so well. I have implemented read timeouts in the fashion that, whenever I am in the callback function for data being wait to be read off an fd (EVFILT_READ or whatever), I store the last time (via gettimeofday()) that data was read on that socket. Then, in my main loop, I check all sockets to see if the last time data was read isn't any greater than 10 seconds ago. However, I am receiving a lot of read timeouts. I keep track of the last response from the remote server, and the current state I'm in (E.G., sent another GET request on a keepalive connection). In several cases, I had received a response for the last page I requested, processed/parsed it, and sent down another request. However, data never got back to me. Even after 10 seconds. Hell, even after 30 seconds in some cases. What I am wondering is, is it possible for either my write() to be failing it's ability to get data to the remote site (I check the return value of write(), and its always returning the amount of bytes I am writing), or possibly for data to be being "dropped" per-se on my end by the kernel (no data waiting on the socket). I have all my sockets in O_NONBLOCK mode. To test the possibility of perhaps KQueue not notifying me of data waiting, or me not grabbing the event off the queue in time, I call a read() on the socket one last time when I catch the read timeout. Most of the time (99% of it) there is no data waiting. This all seems to be random. It's never consistent (same server) over several runs of the program. Any ideas folks? This has completely stumped me. Thanks for your support, Brandon