From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 06:47: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 63C0016A4CE for ; Sun, 22 Aug 2004 06:47:07 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5936E43D3F for ; Sun, 22 Aug 2004 06:47:07 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 4D6465C912; Sat, 21 Aug 2004 23:47:07 -0700 (PDT) Date: Sat, 21 Aug 2004 23:47:07 -0700 From: Alfred Perlstein To: Poul-Henning Kamp Message-ID: <20040822064707.GF26612@elvis.mu.org> References: <20040821200205.GE26612@elvis.mu.org> <46719.1093120181@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46719.1093120181@critter.freebsd.dk> User-Agent: Mutt/1.4.2.1i cc: hackers@freebsd.org Subject: Re: sysctl hacks 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, 22 Aug 2004 06:47:07 -0000 * Poul-Henning Kamp [040821 13:29] wrote: > In message <20040821200205.GE26612@elvis.mu.org>, Alfred Perlstein writes: > >I'm doing some work that requires that I have a sysctl structure > >be passed around, but inside that structure are several pointers I > >may need to dereference. > > > >Basically: > > > >struct mysysctldata { > > .... (data here) > > void *moredata; > > size_t morelen; > >}; > > > >What is the proper way of sysctl'ing IN the data from moredata? > > > >I need to make a copy of the sysctl req, but... I'm not sure what > >to initialize the 'lock' member to. > > Just use the SYSCTL_IN() and ..._OUT() functions. :( I wasn't clear. I have a sysctl node that takes a struct like so: struct mysysctldata { .... (data here) struct moredata * vc_ptr; size_t len vc_len; } If I use SYSCTL_IN(), then I can get "mysysctldata", but I only get the pointer to "moredata", now I want to get a copy of "moredata", what's a good way to do this? I have a macro that does this: #define VCTLTOREQ(vc, req) \ do { \ (req)->newptr = (vc)->vc_ptr; \ (req)->newlen = (vc)->vc_len; \ (req)->newidx = 0; \ } while (0) Is that right? -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684 From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 07:18: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 4D02A16A4CE for ; Sun, 22 Aug 2004 07:18:24 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17BDC43D3F for ; Sun, 22 Aug 2004 07:18:24 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 25625 invoked from network); 22 Aug 2004 07:18:23 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail3.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 22 Aug 2004 07:18:23 -0000 Received: from hydrogen.funkthat.com (mlifor@localhost.funkthat.com [127.0.0.1])i7M7IMuU031553; Sun, 22 Aug 2004 00:18: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 i7M7IKCO031552; Sun, 22 Aug 2004 00:18:20 -0700 (PDT) Date: Sun, 22 Aug 2004 00:18:20 -0700 From: John-Mark Gurney To: Alfred Perlstein Message-ID: <20040822071820.GA29902@funkthat.com> Mail-Followup-To: Alfred Perlstein , Poul-Henning Kamp , hackers@freebsd.org References: <20040821200205.GE26612@elvis.mu.org> <46719.1093120181@critter.freebsd.dk> <20040822064707.GF26612@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040822064707.GF26612@elvis.mu.org> 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: Poul-Henning Kamp cc: hackers@freebsd.org Subject: Re: sysctl hacks 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: Sun, 22 Aug 2004 07:18:24 -0000 Alfred Perlstein wrote this message on Sat, Aug 21, 2004 at 23:47 -0700: > * Poul-Henning Kamp [040821 13:29] wrote: > > In message <20040821200205.GE26612@elvis.mu.org>, Alfred Perlstein writes: > > >I'm doing some work that requires that I have a sysctl structure > > >be passed around, but inside that structure are several pointers I > > >may need to dereference. > > > > > >Basically: > > > > > >struct mysysctldata { > > > .... (data here) > > > void *moredata; > > > size_t morelen; > > >}; > > > > > >What is the proper way of sysctl'ing IN the data from moredata? > > > > > >I need to make a copy of the sysctl req, but... I'm not sure what > > >to initialize the 'lock' member to. > > > > Just use the SYSCTL_IN() and ..._OUT() functions. > > :( > > I wasn't clear. > > I have a sysctl node that takes a struct like so: > > struct mysysctldata { > .... (data here) > struct moredata * vc_ptr; > size_t len vc_len; > } > > If I use SYSCTL_IN(), then I can get "mysysctldata", but I only > get the pointer to "moredata", now I want to get a copy of > "moredata", what's a good way to do this? > > I have a macro that does this: > > #define VCTLTOREQ(vc, req) \ > do { \ > (req)->newptr = (vc)->vc_ptr; \ > (req)->newlen = (vc)->vc_len; \ > (req)->newidx = 0; \ > } while (0) > > Is that right? After reading the sysctl code, it appears that you can't do that.. SYSCTL_IN only lets you read serially from the buffer passed in... so you have to have all the data serially in userland... once you do a SYSCTL_IN of x bytes of data, the pointer is updated to skip those x, and the next call will read in the bytes following the first read... Hope this helps. -- 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 Sun Aug 22 07:28: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 5C6DD16A4CE for ; Sun, 22 Aug 2004 07:28:47 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 509AC43D3F for ; Sun, 22 Aug 2004 07:28:47 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 478105C90A; Sun, 22 Aug 2004 00:28:47 -0700 (PDT) Date: Sun, 22 Aug 2004 00:28:47 -0700 From: Alfred Perlstein To: Poul-Henning Kamp , hackers@freebsd.org Message-ID: <20040822072847.GG26612@elvis.mu.org> References: <20040821200205.GE26612@elvis.mu.org> <46719.1093120181@critter.freebsd.dk> <20040822064707.GF26612@elvis.mu.org> <20040822071820.GA29902@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040822071820.GA29902@funkthat.com> User-Agent: Mutt/1.4.2.1i Subject: Re: sysctl hacks 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, 22 Aug 2004 07:28:47 -0000 * John-Mark Gurney [040822 00:18] wrote: > Alfred Perlstein wrote this message on Sat, Aug 21, 2004 at 23:47 -0700: > > > > I have a sysctl node that takes a struct like so: > > > > struct mysysctldata { > > .... (data here) > > struct moredata * vc_ptr; > > size_t len vc_len; > > } > > > > If I use SYSCTL_IN(), then I can get "mysysctldata", but I only > > get the pointer to "moredata", now I want to get a copy of > > "moredata", what's a good way to do this? > > > > I have a macro that does this: > > > > #define VCTLTOREQ(vc, req) \ > > do { \ > > (req)->newptr = (vc)->vc_ptr; \ > > (req)->newlen = (vc)->vc_len; \ > > (req)->newidx = 0; \ > > } while (0) > > > > Is that right? > > After reading the sysctl code, it appears that you can't do that.. > SYSCTL_IN only lets you read serially from the buffer passed in... so > you have to have all the data serially in userland... once you do a > SYSCTL_IN of x bytes of data, the pointer is updated to skip those x, > and the next call will read in the bytes following the first read... > > Hope this helps. Yes, but you can update the sysctlreq struct's newptr, newlen and newidx to point to the auxiliary data as my macro does, I just wanted to make sure I wasn't missing some subtle point of the how sysctl works. -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684 From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 08:56: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 C1E4116A4CE for ; Sun, 22 Aug 2004 08:56:48 +0000 (GMT) Received: from mta2.rdslink.ro (mta2.rdslink.ro [193.231.236.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9399C43D2F for ; Sun, 22 Aug 2004 08:56:47 +0000 (GMT) (envelope-from dr.clau@rdslink.ro) Received: (qmail 2573 invoked from network); 22 Aug 2004 11:50:17 -0000 Received: from unknown (HELO mail.rdslink.ro) (193.231.236.20) by mta2.rdslink.ro with DES-CBC3-SHA encrypted SMTP; 22 Aug 2004 11:50:17 -0000 Received: (qmail 13755 invoked from network); 22 Aug 2004 08:55:48 -0000 Received: from unknown (HELO ?82.79.29.15?) (82.79.29.15) by mail.rdslink.ro with SMTP; 22 Aug 2004 08:55:48 -0000 Message-ID: <41285FD0.6010405@rdslink.ro> Date: Sun, 22 Aug 2004 11:56:48 +0300 From: Claudiu User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040807) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: possible hardware 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: Sun, 22 Aug 2004 08:56:48 -0000 Hello, I get this in logs, recently: ad4: TIMEOUT - WRITE_DMA retrying (2 retries left) LBA=208234968 There are more lines like this, with different LBA values of course. Is this a time to backup the data and replace the disk ? Thank you in advance. Best regards, -- Claudiu Dragalina-Paraipan e-mail: dr.clau@rdslink.ro From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 09:06: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 27A1216A4CE for ; Sun, 22 Aug 2004 09:06:53 +0000 (GMT) Received: from mta2.rdslink.ro (mta2.rdslink.ro [193.231.236.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5232043D3F for ; Sun, 22 Aug 2004 09:06:52 +0000 (GMT) (envelope-from dr.clau@rdslink.ro) Received: (qmail 10353 invoked from network); 22 Aug 2004 12:00:22 -0000 Received: from unknown (HELO mail.rdslink.ro) (193.231.236.20) by mta2.rdslink.ro with DES-CBC3-SHA encrypted SMTP; 22 Aug 2004 12:00:22 -0000 Received: (qmail 24120 invoked from network); 22 Aug 2004 09:05:55 -0000 Received: from unknown (HELO ?82.79.29.15?) (82.79.29.15) by mail.rdslink.ro with SMTP; 22 Aug 2004 09:05:55 -0000 Message-ID: <41286230.9050704@rdslink.ro> Date: Sun, 22 Aug 2004 12:06:56 +0300 From: Claudiu User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040807) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <41285FD0.6010405@rdslink.ro> In-Reply-To: <41285FD0.6010405@rdslink.ro> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: possible hardware 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: Sun, 22 Aug 2004 09:06:53 -0000 I have also checked the SMART state of the driver with smartctl, it looks like this: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000f 062 056 006 Pre-fail Always - 101410838 3 Spin_Up_Time 0x0003 096 096 000 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 0 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0 7 Seek_Error_Rate 0x000f 081 060 030 Pre-fail Always - 146351689 9 Power_On_Hours 0x0032 094 094 000 Old_age Always - 5292 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 67 194 Temperature_Celsius 0x0022 034 047 000 Old_age Always - 34 195 Hardware_ECC_Recovered 0x001a 062 056 000 Old_age Always - 101410838 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0000 100 253 000 Old_age Offline - 0 202 TA_Increase_Count 0x0032 100 253 000 Old_age Always - 0 This does not look very encouraging, but seems to be in reasonable limits. I have 2 drivers, and I am using vinum for mirroring. Both are in similar situation. Should I trust both of them until the SMART attributes are closer to to the WORST case ? Best regards, -- Claudiu Dragalina-Paraipan e-mail: dr.clau@rdslink.ro From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 21 21:51: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 5ED2016A4CE for ; Sat, 21 Aug 2004 21:51:06 +0000 (GMT) Received: from vsmtp2.tin.it (vsmtp2alice.tin.it [212.216.176.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id B44C143D31 for ; Sat, 21 Aug 2004 21:51:05 +0000 (GMT) (envelope-from flag@tin.it) Received: from southcross.homeunix.org (82.50.110.173) by vsmtp2.tin.it (7.0.027) id 411B8CBC000F0238 for freebsd-hackers@freebsd.org; Sat, 21 Aug 2004 23:51:06 +0200 Received: by southcross.homeunix.org (Postfix, from userid 1001) id 0BDF6209B; Sun, 22 Aug 2004 00:00:50 +0200 (CEST) Date: Sun, 22 Aug 2004 00:00:49 +0200 From: Paolo Pisati To: FreeBSD_Hackers Message-ID: <20040821220049.GB1938@tin.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Mailman-Approved-At: Sun, 22 Aug 2004 12:07:54 +0000 Subject: Playing with mbuf in userland 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, 21 Aug 2004 21:51:06 -0000 Hi, i'm developing a little app that manipulates mbuf. Right now i'm still working on it as userland app but i would like to test it with some real mbufs straight from the stack. Do you know how i can get some of these structs in an easy way? I mean, is it possible to copy some of these struct from stack to userland? Or should i fake it in userland? Thank you. -- Paolo Italian FreeBSD User Group: http://www.gufi.org From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 02:18: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 E442316A4CE; Sun, 22 Aug 2004 02:18:27 +0000 (GMT) Received: from imf25aec.mail.bellsouth.net (imf25aec.mail.bellsouth.net [205.152.59.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5337943D53; Sun, 22 Aug 2004 02:18:27 +0000 (GMT) (envelope-from kruptos@bellsouth.net) Received: from [172.23.23.23] ([67.35.154.55]) by imf25aec.mail.bellsouth.netESMTP <20040822021825.MDZB1789.imf25aec.mail.bellsouth.net@[172.23.23.23]>; Sat, 21 Aug 2004 22:18:25 -0400 From: Kevin Brunelle To: freebsd-current@freebsd.org Content-Type: multipart/mixed; boundary="=-kIt1Q+HEFYIutSbaPLMi" Message-Id: <1093141197.643.28.camel@fnord.quux.edu> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sat, 21 Aug 2004 22:19:57 -0400 X-Mailman-Approved-At: Sun, 22 Aug 2004 12:07:54 +0000 X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: freebsd-hackers@freebsd.org cc: kruptos@bellsouth.net Subject: Fatal trap 12: page fault while in kernel mode 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, 22 Aug 2004 02:18:28 -0000 --=-kIt1Q+HEFYIutSbaPLMi Content-Type: text/plain Content-Transfer-Encoding: 7bit Recently I came home from work and found my machine still as death. It was on but nothing was happening. It didn't take me too long to figure out what had happened. It has panic'd. The horrible irony is they I had JUST been convinced of the necessity of having a dump-device and a debugging kernel laying about (thanks to Michael Lucas). I had enabled the dump device for the next boot but not had time to build a kernel before work. Since I hadn't built the kernel I did not have an active dump device when this happened. Sadly, I am left wishing I could offer you more information but I will try and pull as much as I can. I am not a kernel programmer (not of any ability, yet, at least) but I suspect my NVIDIA drivers had something to do with this. As you can see from the following information, the program gleidescope appears to have initiated this collapse. Attached: panic.txt (the text of the panic message from the logs) dmesg.txt (the text of the dmesg dump from the logs) FOOKERN.old (my kernel configuration file for the kernel in question) make.conf (/etc/make.conf) uname.txt (uname -a) Following the advice of the FAQ I have done my best to narrow down the functions referred to in the panic. There are two. The output is the very specific location from gdb. = 0xc05450ae = 0xc054567a Sorry I don't have more. I have enabled the dump device and am currently building a debugging kernel. With any luck I will be able to replicate the panic and provide better information. -Kevin -- "Down with disease, up before the dawn. A thousand barefoot children, dancin' on my lawn" -Phish "Down with Disease" --=-kIt1Q+HEFYIutSbaPLMi Content-Disposition: attachment; filename=dmesg.txt Content-Type: text/plain; name=dmesg.txt; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.2.1-RELEASE-p9 #0: Tue Aug 3 19:13:31 EDT 2004 kevinb@fnord.quux.edu:/usr/src/sys/i386/compile/FOOKERN Preloaded elf kernel "/boot/kernel/kernel" at 0xc0ce8000. Preloaded elf module "/boot/kernel/splash_bmp.ko" at 0xc0ce8244. Preloaded splash_image_data "/boot/splash.bmp" at 0xc0ce82f4. Preloaded elf module "/boot/kernel/linux.ko" at 0xc0ce8344. Preloaded elf module "/boot/modules/nvidia.ko" at 0xc0ce83f0. Preloaded elf module "/boot/kernel/acpi.ko" at 0xc0ce849c. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel Pentium III (863.87-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x683 Stepping = 3 Features=0x383f9ff real memory = 268173312 (255 MB) avail memory = 246661120 (235 MB) Pentium Pro MTRR support enabled npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard pcibios: BIOS version 2.10 Using $PIR table, 12 entries at 0xc00f2d00 acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 acpi_cpu0: port 0x530-0x537 on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib0: slot 31 INTD is routed to irq 10 pcib0: slot 31 INTB is routed to irq 9 agp0: mem 0xf8000000-0xfbffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci2: on pcib1 pcib0: slot 1 INTA is routed to irq 11 pcib1: slot 0 INTA is routed to irq 11 nvidia0: mem 0xf2000000-0xf3ffffff,0xfd000000-0xfdffffff irq 11 at device 0.0 on pci2 pcib2: at device 30.0 on pci0 pci1: on pcib2 pcib2: slot 9 INTA is routed to irq 3 pcib2: slot 12 INTA is routed to irq 9 xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xdc00-0xdc7f mem 0xfc9ff800-0xfc9ff87f irq 3 at device 9.0 on pci1 xl0: Ethernet address: 00:01:03:23:9d:ba miibus0: on xl0 xlphy0: <3c905C 10/100 internal PHY> on miibus0 xlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto pcm0: port 0xdf00-0xdf3f irq 9 at device 12.0 on pci1 pcm0: isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xffa0-0xffaf at device 31.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata0: [MPSAFE] ata1: at 0x170 irq 15 on atapci0 ata1: [MPSAFE] uhci0: port 0xef80-0xef9f irq 10 at device 31.2 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered ums0: Logitech USB-PS/2 Optical Mouse, rev 2.00/11.10, addr 2, iclass 3/1 ums0: 3 buttons and Z dir. pci0: at device 31.3 (no driver attached) atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 fdc0: port 0x3f7,0x3f4-0x3f5,0x3f2-0x3f3,0x3f0-0x3f1 irq 6 drq 2 on acpi0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0 port 0x3f8-0x3ff irq 4 on acpi0 sio0: type 16550A ppc0 port 0x778-0x77f,0x378-0x37f irq 7 drq 3 on acpi0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/8 bytes threshold ppbus0: on ppc0 ppbus0: IEEE1284 device found /NIBBLE/ECP Probing for PnP devices on ppbus0: ppbus0: MLC,PCL,PML plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 pmtimer0 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 863866798 Hz quality 800 Timecounters tick every 10.000 msec GEOM: create disk ad0 dp=0xc31c3460 ad0: 28629MB [58168/16/63] at ata0-master UDMA66 GEOM: create disk ad1 dp=0xc31c3160 ad1: 57220MB [116257/16/63] at ata0-slave UDMA100 acd0: CDRW at ata1-master PIO4 acd1: CDROM at ata1-slave PIO4 Mounting root from ufs:/dev/ad0s1a WARNING: / was not properly dismounted WARNING: /tmp was not properly dismounted WARNING: /usr was not properly dismounted WARNING: /var was not properly dismounted /var: mount pending error: blocks 4 files 0 WARNING: /drv1 was not properly dismounted NVRM: detected agp.ko, aborting NVIDIA AGP setup! NVRM: detected agp.ko, aborting NVIDIA AGP setup! pid 1034 (bouncingcow), uid 1000: exited on signal 8 (core dumped) pid 1420 (antspotlight), uid 1000: exited on signal 11 (core dumped) --=-kIt1Q+HEFYIutSbaPLMi Content-Disposition: attachment; filename=panic.txt Content-Type: text/plain; name=panic.txt; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Aug 20 07:33:50 fnord syslogd: kernel boot file is /boot/kernel/kernel Aug 20 07:33:50 fnord kernel: pid 7702 (gleidescope), uid 1000: exited on signal 11 (core dumped) Aug 20 07:33:50 fnord kernel: TPTE at 0xbfca0168 IS ZERO @ VA 2805a000 Aug 20 07:33:50 fnord kernel: panic: bad pte Aug 20 07:33:50 fnord kernel: Aug 20 07:33:50 fnord kernel: syncing disks, buffers remaining... kernel trap 12 with interrupts disabled Aug 20 07:33:50 fnord kernel: Aug 20 07:33:50 fnord kernel: Aug 20 07:33:50 fnord kernel: Fatal trap 12: page fault while in kernel mode Aug 20 07:33:50 fnord kernel: fault virtual address = 0x24 Aug 20 07:33:50 fnord kernel: fault code = supervisor read, page not present Aug 20 07:33:50 fnord kernel: instruction pointer = 0x8:0xc05450ae Aug 20 07:33:50 fnord kernel: stack pointer = 0x10:0xcde47c24 Aug 20 07:33:50 fnord kernel: frame pointer = 0x10:0xcde47c48 Aug 20 07:33:50 fnord kernel: code segment = base 0x0, limit 0xfffff, type 0x1b Aug 20 07:33:50 fnord kernel: = DPL 0, pres 1, def32 1, gran 1 Aug 20 07:33:50 fnord kernel: processor eflags = resume, IOPL = 0 Aug 20 07:33:50 fnord kernel: current process = 28 (swi8: tty:sio clock) Aug 20 07:33:50 fnord kernel: trap number = 12 Aug 20 07:33:50 fnord kernel: panic: page fault Aug 20 07:33:50 fnord kernel: Uptime: 16h50m58s Aug 20 07:33:50 fnord kernel: Shutting down ACPI Aug 20 07:33:50 fnord kernel: kernel trap 12 with interrupts disabled Aug 20 07:33:50 fnord kernel: Aug 20 07:33:50 fnord kernel: Aug 20 07:33:50 fnord kernel: Fatal trap 12: page fault while in kernel mode Aug 20 07:33:50 fnord kernel: fault virtual address = 0x10 Aug 20 07:33:50 fnord kernel: fault code = supervisor write, page not present Aug 20 07:33:50 fnord kernel: instruction pointer = 0x8:0xc054567a Aug 20 07:33:50 fnord kernel: stack pointer = 0x10:0xcde478d8 Aug 20 07:33:50 fnord kernel: frame pointer = 0x10:0xcde478f8 Aug 20 07:33:50 fnord kernel: code segment = base 0x0, limit 0xfffff, type 0x1b Aug 20 07:33:50 fnord kernel: = DPL 0, pres 1, def32 1, gran 1 Aug 20 07:33:50 fnord kernel: processor eflags = resume, IOPL = 0 Aug 20 07:33:50 fnord kernel: current process = 28 (swi8: tty:sio clock) Aug 20 07:33:50 fnord kernel: trap number = 12 Aug 20 07:33:50 fnord kernel: panic: page fault Aug 20 07:33:50 fnord kernel: Uptime: 16h50m58s Aug 20 07:33:50 fnord kernel: Shutting down ACPI Aug 20 07:33:50 fnord kernel: Automatic reboot in 15 seconds - press a key on the console to abort Aug 20 07:33:50 fnord kernel: Rebooting... Aug 20 07:33:50 fnord kernel: Copyright (c) 1992-2004 The FreeBSD Project. Aug 20 07:33:50 fnord kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 Aug 20 07:33:50 fnord kernel: The Regents of the University of California. All rights reserved. Aug 20 07:33:50 fnord kernel: FreeBSD 5.2.1-RELEASE-p9 #0: Tue Aug 3 19:13:31 EDT 2004 Aug 20 07:33:50 fnord kernel: kevinb@fnord.quux.edu:/usr/src/sys/i386/compile/FOOKERN Aug 20 07:33:50 fnord kernel: Preloaded elf kernel "/boot/kernel/kernel" at 0xc0ce8000. Aug 20 07:33:50 fnord kernel: Preloaded elf module "/boot/kernel/splash_bmp.ko" at 0xc0ce8244. Aug 20 07:33:50 fnord kernel: Preloaded splash_image_data "/boot/splash.bmp" at 0xc0ce82f4. Aug 20 07:33:50 fnord kernel: Preloaded elf module "/boot/kernel/linux.ko" at 0xc0ce8344. Aug 20 07:33:50 fnord kernel: Preloaded elf module "/boot/modules/nvidia.ko" at 0xc0ce83f0. Aug 20 07:33:50 fnord kernel: Preloaded elf module "/boot/kernel/acpi.ko" at 0xc0ce849c. Aug 20 07:33:50 fnord kernel: Timecounter "i8254" frequency 1193182 Hz quality 0 Aug 20 07:33:50 fnord kernel: CPU: Intel Pentium III (863.87-MHz 686-class CPU) Aug 20 07:33:50 fnord kernel: Origin = "GenuineIntel" Id = 0x683 Stepping = 3 Aug 20 07:33:50 fnord kernel: Features=0x383f9ff Aug 20 07:33:50 fnord kernel: real memory = 268173312 (255 MB) Aug 20 07:33:50 fnord kernel: avail memory = 246661120 (235 MB) Aug 20 07:33:50 fnord kernel: Pentium Pro MTRR support enabled Aug 20 07:33:50 fnord kernel: npx0: [FAST] Aug 20 07:33:50 fnord kernel: npx0: on motherboard Aug 20 07:33:50 fnord kernel: npx0: INT 16 interface Aug 20 07:33:50 fnord kernel: acpi0: on motherboard Aug 20 07:33:50 fnord kernel: pcibios: BIOS version 2.10 Aug 20 07:33:50 fnord kernel: Using $PIR table, 12 entries at 0xc00f2d00 Aug 20 07:33:50 fnord kernel: acpi0: Power Button (fixed) Aug 20 07:33:50 fnord kernel: Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 Aug 20 07:33:50 fnord kernel: acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 Aug 20 07:33:50 fnord kernel: acpi_cpu0: port 0x530-0x537 on acpi0 Aug 20 07:33:50 fnord kernel: acpi_button0: on acpi0 Aug 20 07:33:50 fnord kernel: pcib0: port 0xcf8-0xcff on acpi0 Aug 20 07:33:50 fnord kernel: pci0: on pcib0 Aug 20 07:33:50 fnord kernel: pcib0: slot 31 INTD is routed to irq 10 Aug 20 07:33:50 fnord kernel: pcib0: slot 31 INTB is routed to irq 9 Aug 20 07:33:50 fnord kernel: agp0: mem 0xf8000000-0xfbffffff at device 0.0 on pci0 Aug 20 07:33:50 fnord kernel: pcib1: at device 1.0 on pci0 Aug 20 07:33:50 fnord kernel: pci2: on pcib1 Aug 20 07:33:50 fnord kernel: pcib0: slot 1 INTA is routed to irq 11 Aug 20 07:33:50 fnord kernel: pcib1: slot 0 INTA is routed to irq 11 Aug 20 07:33:50 fnord kernel: nvidia0: mem 0xf2000000-0xf3ffffff,0xfd000000-0xfdffffff irq 11 at device 0.0 on pci2 Aug 20 07:33:50 fnord kernel: pcib2: at device 30.0 on pci0 Aug 20 07:33:50 fnord kernel: pci1: on pcib2 Aug 20 07:33:50 fnord kernel: pcib2: slot 9 INTA is routed to irq 3 Aug 20 07:33:50 fnord kernel: pcib2: slot 12 INTA is routed to irq 9 Aug 20 07:33:50 fnord kernel: xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xdc00-0xdc7f mem 0xfc9ff800-0xfc9ff87f irq 3 at device 9.0 on pci1 Aug 20 07:33:50 fnord kernel: xl0: Ethernet address: 00:01:03:23:9d:ba Aug 20 07:33:50 fnord kernel: miibus0: on xl0 Aug 20 07:33:50 fnord kernel: xlphy0: <3c905C 10/100 internal PHY> on miibus0 Aug 20 07:33:50 fnord kernel: xlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Aug 20 07:33:50 fnord kernel: pcm0: port 0xdf00-0xdf3f irq 9 at device 12.0 on pci1 Aug 20 07:33:50 fnord kernel: pcm0: Aug 20 07:33:50 fnord kernel: isab0: at device 31.0 on pci0 Aug 20 07:33:50 fnord kernel: isa0: on isab0 Aug 20 07:33:50 fnord kernel: atapci0: port 0xffa0-0xffaf at device 31.1 on pci0 Aug 20 07:33:50 fnord kernel: ata0: at 0x1f0 irq 14 on atapci0 Aug 20 07:33:50 fnord kernel: ata0: [MPSAFE] Aug 20 07:33:50 fnord kernel: ata1: at 0x170 irq 15 on atapci0 Aug 20 07:33:50 fnord kernel: ata1: [MPSAFE] Aug 20 07:33:50 fnord kernel: uhci0: port 0xef80-0xef9f irq 10 at device 31.2 on pci0 Aug 20 07:33:50 fnord kernel: usb0: on uhci0 Aug 20 07:33:50 fnord kernel: usb0: USB revision 1.0 Aug 20 07:33:50 fnord kernel: uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 Aug 20 07:33:50 fnord kernel: uhub0: 2 ports with 2 removable, self powered Aug 20 07:33:50 fnord kernel: ums0: Logitech USB-PS/2 Optical Mouse, rev 2.00/11.10, addr 2, iclass 3/1 Aug 20 07:33:50 fnord kernel: ums0: 3 buttons and Z dir. Aug 20 07:33:50 fnord kernel: pci0: at device 31.3 (no driver attached) Aug 20 07:33:50 fnord kernel: atkbdc0: port 0x64,0x60 irq 1 on acpi0 Aug 20 07:33:50 fnord kernel: atkbd0: flags 0x1 irq 1 on atkbdc0 Aug 20 07:33:50 fnord kernel: kbd0 at atkbd0 Aug 20 07:33:50 fnord kernel: fdc0: port 0x3f7,0x3f4-0x3f5,0x3f2-0x3f3,0x3f0-0x3f1 irq 6 drq 2 on acpi0 Aug 20 07:33:50 fnord kernel: fdc0: FIFO enabled, 8 bytes threshold Aug 20 07:33:50 fnord kernel: fd0: <1440-KB 3.5" drive> on fdc0 drive 0 Aug 20 07:33:50 fnord kernel: sio0 port 0x3f8-0x3ff irq 4 on acpi0 Aug 20 07:33:50 fnord kernel: sio0: type 16550A Aug 20 07:33:50 fnord kernel: ppc0 port 0x778-0x77f,0x378-0x37f irq 7 drq 3 on acpi0 Aug 20 07:33:50 fnord kernel: ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode Aug 20 07:33:50 fnord kernel: ppc0: FIFO with 16/16/8 bytes threshold Aug 20 07:33:50 fnord kernel: ppbus0: on ppc0 Aug 20 07:33:50 fnord kernel: ppbus0: IEEE1284 device found /NIBBLE/ECP Aug 20 07:33:50 fnord kernel: Probing for PnP devices on ppbus0: Aug 20 07:33:50 fnord kernel: ppbus0: MLC,PCL,PML Aug 20 07:33:50 fnord kernel: plip0: on ppbus0 Aug 20 07:33:50 fnord kernel: lpt0: on ppbus0 Aug 20 07:33:50 fnord kernel: lpt0: Interrupt-driven port Aug 20 07:33:50 fnord kernel: ppi0: on ppbus0 Aug 20 07:33:50 fnord kernel: pmtimer0 on isa0 Aug 20 07:33:50 fnord kernel: sc0: at flags 0x100 on isa0 Aug 20 07:33:50 fnord kernel: sc0: VGA <16 virtual consoles, flags=0x300> Aug 20 07:33:50 fnord kernel: sio1: configured irq 3 not in bitmap of probed irqs 0 Aug 20 07:33:50 fnord kernel: sio1: port may not be enabled Aug 20 07:33:50 fnord kernel: vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Aug 20 07:33:50 fnord kernel: Timecounter "TSC" frequency 863866968 Hz quality 800 Aug 20 07:33:50 fnord kernel: Timecounters tick every 10.000 msec Aug 20 07:33:50 fnord kernel: GEOM: create disk ad0 dp=0xc31c3460 Aug 20 07:33:50 fnord kernel: ad0: 28629MB [58168/16/63] at ata0-master UDMA66 Aug 20 07:33:50 fnord kernel: GEOM: create disk ad1 dp=0xc31c3160 Aug 20 07:33:50 fnord kernel: ad1: 57220MB [116257/16/63] at ata0-slave UDMA100 Aug 20 07:33:50 fnord kernel: acd0: CDRW at ata1-master PIO4 Aug 20 07:33:50 fnord kernel: acd1: CDROM at ata1-slave PIO4 Aug 20 07:33:50 fnord kernel: Mounting root from ufs:/dev/ad0s1a Aug 20 07:33:50 fnord kernel: WARNING: / was not properly dismounted Aug 20 07:33:50 fnord kernel: WARNING: /tmp was not properly dismounted Aug 20 07:33:50 fnord kernel: WARNING: /usr was not properly dismounted Aug 20 07:33:50 fnord kernel: WARNING: /var was not properly dismounted Aug 20 07:33:50 fnord kernel: WARNING: /drv1 was not properly dismounted --=-kIt1Q+HEFYIutSbaPLMi Content-Disposition: attachment; filename=make.conf Content-Type: text/plain; name=make.conf; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit # -- use.perl generated deltas -- # # Created: Wed Jun 9 22:17:55 2004 # Setting to use base perl from ports: PERL_VER=5.6.1 PERL_VERSION=5.6.1 PERL_ARCH=mach NOPERL=yo NO_PERL=yo NO_PERL_WRAPPER=yo CPUTYPE=p3 X_WINDOW_SYSTEM=xorg --=-kIt1Q+HEFYIutSbaPLMi Content-Disposition: attachment; filename=uname.txt Content-Type: text/plain; name=uname.txt; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit FreeBSD fnord.quux.edu 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #0: Tue Aug 3 19:13:31 EDT 2004 kevinb@fnord.quux.edu:/usr/src/sys/i386/compile/FOOKERN i386 --=-kIt1Q+HEFYIutSbaPLMi-- From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 12:29: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 DAA6D16A4CE for ; Sun, 22 Aug 2004 12:29:55 +0000 (GMT) Received: from mps5.plala.or.jp (c148240.vh.plala.or.jp [210.150.148.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B78D43D41 for ; Sun, 22 Aug 2004 12:29:52 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc1.plala.or.jp ([172.23.8.209]) by mps5.plala.or.jp with SMTP id <20040822122949.RNHO25141.mps5.plala.or.jp@msvc1.plala.or.jp> for ; Sun, 22 Aug 2004 21:29:49 +0900 Received: ( 26054 invoked from network); 22 Aug 2004 21:29:48 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc1 with SMTP; 22 Aug 2004 21:29:47 +0900 Received: from trio.plala.or.jp ([219.25.148.52]) by mpb1.plala.or.jp with ESMTP id <20040822122947.YEX16886.mpb1.plala.or.jp@trio.plala.or.jp> for ; Sun, 22 Aug 2004 21:29:47 +0900 Message-ID: <4128939D.3080808@trio.plala.or.jp> Date: Sun, 22 Aug 2004 21:37:49 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: FreeBSD_Hackers X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Subject: send-pr 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, 22 Aug 2004 12:29:56 -0000 Hi, I have sent the send-pr message. No one seems to work around to it. Doesn't anyone necessarily do it even if it were sent -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e$B!>(Bmail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: CDBA 7611 5C29 A90E 4F3F 087A A90D 370A 7703 CF48 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 14:03: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 B61C116A4CE for ; Sun, 22 Aug 2004 14:03:18 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A797F43D45; Sun, 22 Aug 2004 14:03:18 +0000 (GMT) (envelope-from bmilekic@FreeBSD.org) Received: from freefall.freebsd.org (bmilekic@localhost [127.0.0.1]) i7ME3IHw046479; Sun, 22 Aug 2004 14:03:18 GMT (envelope-from bmilekic@freefall.freebsd.org) Received: (from bmilekic@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7ME3Id8046478; Sun, 22 Aug 2004 14:03:18 GMT (envelope-from bmilekic) Date: Sun, 22 Aug 2004 14:03:18 +0000 From: Bosko Milekic To: Paolo Pisati , FreeBSD_Hackers Message-ID: <20040822140318.GA45977@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: Re: Playing with mbuf in userland 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, 22 Aug 2004 14:03:18 -0000 Paolo Pisati wrote: >Hi, > >i'm developing a little app that manipulates mbuf. >Right now i'm still working on it as userland app but i >would like to test it with some real mbufs straight >from the stack. >Do you know how i can get some of these structs in >an easy way? >I mean, is it possible to copy some of these struct from >stack to userland? >Or should i fake it in userland? One way to do this would be to instrument a for-superuser-only socket option that would copy out all of the data, including the metadata and mbuf headers, out to userland, while taking care to modify references within the mbufs to userland locations {*}. To do this, in turn, you would need to obtain the userland target addresses of all mbufs and clusters you're copying out beforehand, and overwrite all mbufs' m_next, m_nextpkt, m_data, and in some cases, m_ext.ext_buf references before doing the copyout in-kernel. This can be a pretty involved copy and would require careful implementation. {*} The data is the socket buffer is kept as an mbuf chain so this is possible. Another option to look into would be to implement a sysctl(8)-exported handler that iterates over the mbuf chain and prints out the mbuf chains in something like XML, which your userland application can then more or less easily parse, and reproduce the chain ("fake it up") in userland. This solution is rather attractive because you can do all sorts of things with the intermediate-parsing-language right from the kernel, as well as from userland (at the parsing stages). To see an example of a sysctl(8) handler, refer to src/sys/vm/uma_core.c (the bottom) in FreeBSD 5.x. In any case, I would be very interested in seeing what you come up with, as this could be a very useful diagnostic tool. -Bosko -- Bosko Milekic "For the wicked / Carry us away / Captivity require from us a song / How can we sing king alpha's song in a strange land?" --Bob Marley From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 14:12: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 7B1D616A4CE for ; Sun, 22 Aug 2004 14:12:53 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EFBC43D39; Sun, 22 Aug 2004 14:12:53 +0000 (GMT) (envelope-from bmilekic@FreeBSD.org) Received: from freefall.freebsd.org (bmilekic@localhost [127.0.0.1]) i7MECr2U050541; Sun, 22 Aug 2004 14:12:53 GMT (envelope-from bmilekic@freefall.freebsd.org) Received: (from bmilekic@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7MECrgn050540; Sun, 22 Aug 2004 14:12:53 GMT (envelope-from bmilekic) Date: Sun, 22 Aug 2004 14:12:53 +0000 From: Bosko Milekic To: Paolo Pisati , FreeBSD_Hackers Message-ID: <20040822141253.GA50325@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: Re: Playing with mbuf in userland 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, 22 Aug 2004 14:12:53 -0000 I wrote: Another option to look into would be to implement a sysctl(8)-exported handler that iterates over the mbuf chain and prints out the mbuf chains in something like XML, which your userland application can then more or less easily parse, and reproduce the chain ("fake it up") in userland. This solution is rather attractive because you can do all sorts of things with the intermediate-parsing-language right from the kernel, as well as from userland (at the parsing stages). To see an example of a sysctl(8) handler, refer to src/sys/vm/uma_core.c (the bottom) in FreeBSD 5.x. I should also add: you should have various sysctl OIDs that call this handler passing, say, the mbuf chain as an argument (a reference to the top mbuf). This way certain OIDs can send out a snapshot of an mbuf chain at a particular point in the stack, and others can send snapshots from the socket buffer and driver entry-points (you can get some perception of how the chain changes as it makes its way up-and-down the layers). -Bosko From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 15: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 0E67116A4CE; Sun, 22 Aug 2004 15:21:10 +0000 (GMT) Received: from imf25aec.mail.bellsouth.net (imf25aec.mail.bellsouth.net [205.152.59.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 443E643D5C; Sun, 22 Aug 2004 15:21:10 +0000 (GMT) (envelope-from kruptos@bellsouth.net) Received: from [172.23.23.23] ([67.35.154.55]) by imf25aec.mail.bellsouth.netESMTP <20040822152109.TBLR1789.imf25aec.mail.bellsouth.net@[172.23.23.23]>; Sun, 22 Aug 2004 11:21:09 -0400 From: Kevin Brunelle To: freebsd-current@freebsd.org In-Reply-To: <1093141197.643.28.camel@fnord.quux.edu> References: <1093141197.643.28.camel@fnord.quux.edu> Content-Type: text/plain Message-Id: <1093188163.2100.4.camel@fnord.quux.edu> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sun, 22 Aug 2004 11:22:43 -0400 Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Fatal trap 12: page fault while in kernel mode 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, 22 Aug 2004 15:21:11 -0000 Okay, Replication does not look like it will be an issue. Again, the system panic'd while running a gl application when I was at work. This time I did get a core dump (but I still don't have a debugging kernel -- it was building ARG). Right now, I am going to disable my screensaver and carefully avoid applications which might cause the panic again. Once the proper kernel is in place... then it is go-time. If anyone is interested I am going to save the dump -- but it probably is worth the wait (in saved effort) till I have a proper kernel in place. I am almost 100% sure this is due to the nvidia drivers -- I upgraded on the 19th and never had a problem before this... that and gl programs seem to be the cause of both crashes so far. Kevin -- "Down with disease, up before the dawn. A thousand barefoot children, dancin? on my lawn" -Phish "Down with Disease" From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 15:27: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 69B2A16A4CE for ; Sun, 22 Aug 2004 15:27:47 +0000 (GMT) Received: from vsmtp12.tin.it (vsmtp12.tin.it [212.216.176.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id F145443D46 for ; Sun, 22 Aug 2004 15:27:46 +0000 (GMT) (envelope-from gerarra@tin.it) Received: from ims3a.cp.tin.it (192.168.70.103) by vsmtp12.tin.it (7.0.027) id 40B33B8700FDE7B1 for freebsd-hackers@freebsd.org; Sun, 22 Aug 2004 17:27:47 +0200 Received: from [192.168.70.228] by ims3a.cp.tin.it with HTTP; Sun, 22 Aug 2004 17:27:45 +0200 Date: Sun, 22 Aug 2004 17:27:45 +0200 Message-ID: <41197229000075E7@ims3a.cp.tin.it> In-Reply-To: <20040821220049.GB1938@tin.it> From: gerarra@tin.it To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Subject: RE: Playing with mbuf in userland 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, 22 Aug 2004 15:27:47 -0000 D you mean copying datas between mbuf structure and userspoace pointers or emulating mbuf behaviur in kspace? rookie >Hi, > >i'm developing a little app that manipulates mbuf. >Right now i'm still working on it as userland app but i >would like to test it with some real mbufs straight >from the stack. >Do you know how i can get some of these structs in >an easy way? >I mean, is it possible to copy some of these struct from >stack to userland? >Or should i fake it in userland? > >Thank you. > >-- >Paolo > >Italian FreeBSD User Group: http://www.gufi.org >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.or= g" From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 15:59: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 48D4E16A4CE for ; Sun, 22 Aug 2004 15:59:00 +0000 (GMT) Received: from smtp.eos.ocn.ne.jp (eos.ocn.ne.jp [222.146.51.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CE6643D31 for ; Sun, 22 Aug 2004 15:59:00 +0000 (GMT) (envelope-from hrs@FreeBSD.org) Received: from delta.allbsd.org (p61097-adsao12honb4-acca.tokyo.ocn.ne.jp [220.96.143.97]) by smtp.eos.ocn.ne.jp (Postfix) with ESMTP id 44A0F29DA; Mon, 23 Aug 2004 00:58:59 +0900 (JST) Received: from localhost (alph.allbsd.org [192.168.0.10]) by delta.allbsd.org (8.12.9p2/8.12.9) with ESMTP id i7MFwgA2051197; Mon, 23 Aug 2004 00:58:43 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Mon, 23 Aug 2004 00:58:24 +0900 (JST) Message-Id: <20040823.005824.59646266.hrs@eos.ocn.ne.jp> To: e-kamo@trio.plala.or.jp From: Hiroki Sato In-Reply-To: <4128939D.3080808@trio.plala.or.jp> References: <4128939D.3080808@trio.plala.or.jp> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 4.0.65 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Mon_Aug_23_00_58_24_2004_636)--" Content-Transfer-Encoding: 7bit cc: freebsd-hackers@FreeBSD.org Subject: Re: send-pr 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, 22 Aug 2004 15:59:00 -0000 ----Security_Multipart(Mon_Aug_23_00_58_24_2004_636)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Eitarou Kamo wrote in <4128939D.3080808@trio.plala.or.jp>: e-kamo> Hi, e-kamo> e-kamo> I have sent the send-pr message. No one seems to work e-kamo> around to it. e-kamo> Doesn't anyone necessarily do it even if it were sent Please do not post these sorts of questions to -hackers@ mailing list. A better place to ask such questions is on the freebsd-questions@FreeBSD.org mailing list. And note that you should read the following documents carefully: * Writing FreeBSD Problem Reports http://www.freebsd.org/doc/en_US.ISO8859-1/articles/problem-reports/index.html * Problem Report Handling Guidelines http://www.freebsd.org/doc/en_US.ISO8859-1/articles/pr-guidelines/index.html * How to get best results from the FreeBSD-questions mailing list http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-questions/index.html -- | Hiroki SATO ----Security_Multipart(Mon_Aug_23_00_58_24_2004_636)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBBKMKgTyzT2CeTzy0RAnwkAKCCFD0s4DyX3Pn7vRx3o5TCvFVhZwCghtVB pNYK7/ECniaiiTngqUIdWT0= =Dxe1 -----END PGP SIGNATURE----- ----Security_Multipart(Mon_Aug_23_00_58_24_2004_636)---- From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 16:06:21 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 CE9D816A4CE for ; Sun, 22 Aug 2004 16:06:21 +0000 (GMT) Received: from mail.rdstm.ro (mail.rdstm.ro [193.231.233.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2E1843D48 for ; Sun, 22 Aug 2004 16:06:20 +0000 (GMT) (envelope-from aanton@spintech.ro) Received: from [10.0.0.2] (casa_auto [81.196.32.25]) by mail.rdstm.ro (8.12.10/8.12.1) with ESMTP id i7MG5iwh012271 for ; Sun, 22 Aug 2004 19:05:45 +0300 Message-ID: <4128C474.2010809@spintech.ro> Date: Sun, 22 Aug 2004 19:06:12 +0300 From: Anton Alin-Adrian User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040706) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: possible hardware 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: Sun, 22 Aug 2004 16:06:21 -0000 Claudiu wrote: > I have also checked the SMART state of the driver with smartctl, it looks like this: [...] Same happens with my atapi cdrom from time to time. Could be messed-up IDE channel. But anyway, good time for a backup. Did you try a fsck -y.. Yours, -- Alin-Adrian Anton Spintech Systems GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E) gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 17:55: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 6C99816A4D5 for ; Sun, 22 Aug 2004 17:55:19 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4F0743D41 for ; Sun, 22 Aug 2004 17:55:18 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from gothmog.gr (patr530-b183.otenet.gr [212.205.244.191]) i7MHtFKJ026657; Sun, 22 Aug 2004 20:55:15 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i7MHrr19000808; Sun, 22 Aug 2004 20:53:53 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i7MForiE072890; Sun, 22 Aug 2004 18:50:53 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Sun, 22 Aug 2004 18:50:53 +0300 From: Giorgos Keramidas To: Eitarou Kamo Message-ID: <20040822155053.GA68929@gothmog.gr> References: <4128939D.3080808@trio.plala.or.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4128939D.3080808@trio.plala.or.jp> Phone: +30-2610-312145 Mobile: +30-6944-116520 cc: freebsd-hackers@freebsd.org Subject: Re: send-pr 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, 22 Aug 2004 17:55:19 -0000 On 2004-08-22 21:37, Eitarou Kamo wrote: > Hi, > > I have sent the send-pr message. No one seems to work around to it. > Doesn't anyone necessarily do it even if it were sent When you use send-pr to submit a problem report, the report is saved in a database and a notification is mailed to the subscribers of the appropriate list. The time it will take for someone to work on the problem depends a lot on a few things: o The quality of the submitted problem report. o The difficulty of the problem. o The amount of time that developers have available to spend tracking problems and fixing bugs. This means that it can take a while for someone to pick your report and work on it; even then they might find the problem too difficult and just leave it open for someone more knowledgeable. Having said all this, what was your report about? Perhaps I can find it in the database and point the right person or group of persons to it. - Giorgos From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 19:09: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 09DF716A4CE; Sun, 22 Aug 2004 19:09:08 +0000 (GMT) Received: from green.homeunix.org (pcp04371970pcs.nrockv01.md.comcast.net [69.140.223.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B47E43D4C; Sun, 22 Aug 2004 19:09:07 +0000 (GMT) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.1/8.13.1) with ESMTP id i7MJ96UY077303; Sun, 22 Aug 2004 15:09:06 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.1/8.13.1/Submit) id i7MJ95Ft077302; Sun, 22 Aug 2004 15:09:05 -0400 (EDT) (envelope-from green) Date: Sun, 22 Aug 2004 15:09:05 -0400 From: Brian Fundakowski Feldman To: Kevin Brunelle Message-ID: <20040822190905.GC77230@green.homeunix.org> References: <1093141197.643.28.camel@fnord.quux.edu> <1093188163.2100.4.camel@fnord.quux.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1093188163.2100.4.camel@fnord.quux.edu> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org cc: freebsd-current@freebsd.org cc: Andreas Kohn Subject: Re: Fatal trap 12: page fault while in kernel mode 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, 22 Aug 2004 19:09:08 -0000 On Sun, Aug 22, 2004 at 11:22:43AM -0400, Kevin Brunelle wrote: > Okay, > > Replication does not look like it will be an issue. Again, the system > panic'd while running a gl application when I was at work. This time I > did get a core dump (but I still don't have a debugging kernel -- it was > building ARG). > > Right now, I am going to disable my screensaver and carefully avoid > applications which might cause the panic again. Once the proper kernel > is in place... then it is go-time. > > If anyone is interested I am going to save the dump -- but it probably > is worth the wait (in saved effort) till I have a proper kernel in > place. I am almost 100% sure this is due to the nvidia drivers -- I > upgraded on the 19th and never had a problem before this... that and gl > programs seem to be the cause of both crashes so far. Andreas, are you using the nvidia driver too? -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 00:31: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 BAAB416A4CE for ; Mon, 23 Aug 2004 00:31:08 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31BDD43D49 for ; Mon, 23 Aug 2004 00:31:08 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i7N0UPFq056970; Sun, 22 Aug 2004 18:30:25 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 22 Aug 2004 18:30:41 -0600 (MDT) Message-Id: <20040822.183041.128046524.imp@bsdimp.com> To: tedu@coverity.com From: "M. Warner Losh" In-Reply-To: <41263E77.5040500@coverity.com> References: <41263E77.5040500@coverity.com> 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: hackers@freebsd.org Subject: Re: use after free bugs 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, 23 Aug 2004 00:31:08 -0000 In message: <41263E77.5040500@coverity.com> Ted Unangst writes: : aha_isa.c: aha_isa_attach: aha_free free "aha", can't use it : afterwards, lots of examples. aha_free doesn't actually free the aha, it just tears down the dma for the device. So the sturct aha_softc * that's passed to it is safe to use after calls to aha_free. void aha_free(struct aha_softc *aha) { switch (aha->init_level) { default: case 8: { struct sg_map_node *sg_map; while ((sg_map = SLIST_FIRST(&aha->sg_maps))!= NULL) { SLIST_REMOVE_HEAD(&aha->sg_maps, links); bus_dmamap_unload(aha->sg_dmat, sg_map->sg_dmamap); bus_dmamem_free(aha->sg_dmat, sg_map->sg_vaddr, sg_map->sg_dmamap); free(sg_map, M_DEVBUF); } bus_dma_tag_destroy(aha->sg_dmat); } case 7: bus_dmamap_unload(aha->ccb_dmat, aha->ccb_dmamap); case 6: bus_dmamap_destroy(aha->ccb_dmat, aha->ccb_dmamap); bus_dmamem_free(aha->ccb_dmat, aha->aha_ccb_array, aha->ccb_dmamap); case 5: bus_dma_tag_destroy(aha->ccb_dmat); case 4: bus_dmamap_unload(aha->mailbox_dmat, aha->mailbox_dmamap); case 3: bus_dmamem_free(aha->mailbox_dmat, aha->in_boxes, aha->mailbox_dmamap); bus_dmamap_destroy(aha->mailbox_dmat, aha->mailbox_dmamap); case 2: bus_dma_tag_destroy(aha->buffer_dmat); case 1: bus_dma_tag_destroy(aha->mailbox_dmat); case 0: break; } } so all the calls to aha_free then the freeing of resoruces are OK. Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 03:07:50 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 5C84B16A4CF for ; Mon, 23 Aug 2004 03:07:50 +0000 (GMT) Received: from mps4.plala.or.jp (c147240.vh.plala.or.jp [210.150.147.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id B22D743D31 for ; Mon, 23 Aug 2004 03:07:49 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc1.plala.or.jp ([172.23.8.209]) by mps4.plala.or.jp with SMTP id <20040823030746.PAVO12587.mps4.plala.or.jp@msvc1.plala.or.jp> for ; Mon, 23 Aug 2004 12:07:46 +0900 Received: ( 21710 invoked from network); 23 Aug 2004 12:07:45 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc1 with SMTP; 23 Aug 2004 12:07:42 +0900 Received: from trio.plala.or.jp ([219.25.148.52]) by mpb1.plala.or.jp with ESMTP id <20040823030742.BKLD16886.mpb1.plala.or.jp@trio.plala.or.jp>; Mon, 23 Aug 2004 12:07:42 +0900 Message-ID: <41296163.8050300@trio.plala.or.jp> Date: Mon, 23 Aug 2004 12:15:47 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: Giorgos Keramidas , freebsd-hackers@freebsd.org References: <4128939D.3080808@trio.plala.or.jp> <20040822155053.GA68929@gothmog.gr> In-Reply-To: <20040822155053.GA68929@gothmog.gr> X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: send-pr 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, 23 Aug 2004 03:07:50 -0000 Hi, Giorgos Keramidas wrote: > >This means that it can take a while for someone to pick your report and >work on it; even then they might find the problem too difficult and just >leave it open for someone more knowledgeable. > >Having said all this, what was your report about? Perhaps I can find it in >the database and point the right person or group of persons to it. > >- Giorgos > > > > This is the one I sent. http://www.freebsd.org/cgi/query-pr.cgi?pr=70028 Eitarou -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e-mail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: CDBA 7611 5C29 A90E 4F3F 087A A90D 370A 7703 CF48 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 16:42:34 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 C8E4116A4CE; Mon, 23 Aug 2004 16:42:34 +0000 (GMT) Received: from xraided.net (ns1.gadoz.com [66.88.26.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85BDF43D82; Mon, 23 Aug 2004 16:42:32 +0000 (GMT) (envelope-from kyle@xraided.net) Received: from [168.103.174.29] (account kyle HELO kyle) by xraided.net (CommuniGate Pro SMTP 4.1.8) with ESMTP id 1850034; Mon, 23 Aug 2004 09:42:32 -0700 From: "Kyle Mott" To: , Date: Mon, 23 Aug 2004 09:42:28 -0700 Message-ID: <000001c48930$2dc3d1e0$150ba8c0@kyle> MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Importance: Normal Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Digi PCI / XEM 16-Port 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, 23 Aug 2004 16:42:34 -0000 I have tried several times now to compile a GENERIC kernel on 4.10-STABLE with dgm0 (Digi Ports/16em, PCI version!) enabled, and have had no luck. Can anyone give me pointers? Right now, it's not showing up in dmesg (no errors, no warnings, nothing). The config line I have been using is below (but it's the one straight out of LINT). I've done a lot of googling and maillist searching; most of the documentation is for the ISA version, and not the PCI version. I've tried chaning 'at isa?' to 'at pci?' with no luck. My next guess would be to try 5.2.1, and then beyond that RedHat (though, I would really like to avoid using RH). device dgm0 at isa? port 0x104 iomem 0xd0000 -Kyle Mott From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 17:21:17 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 5982616A4CE for ; Mon, 23 Aug 2004 17:21:17 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3F1043D49 for ; Mon, 23 Aug 2004 17:21:15 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i7NHL3oa069149; Mon, 23 Aug 2004 11:21:04 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 23 Aug 2004 11:21:21 -0600 (MDT) Message-Id: <20040823.112121.85395384.imp@bsdimp.com> To: tedu@coverity.com From: "M. Warner Losh" In-Reply-To: <412A258A.3060100@coverity.com> References: <41263E77.5040500@coverity.com> <20040822.183041.128046524.imp@bsdimp.com> <412A258A.3060100@coverity.com> 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: hackers@freebsd.org Subject: Re: use after free bugs 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, 23 Aug 2004 17:21:17 -0000 In message: <412A258A.3060100@coverity.com> Ted Unangst writes: : M. Warner Losh wrote: : > In message: <41263E77.5040500@coverity.com> : > Ted Unangst writes: : > : aha_isa.c: aha_isa_attach: aha_free free "aha", can't use it : > : afterwards, lots of examples. : > : > aha_free doesn't actually free the aha, it just tears down the dma for : > the device. So the sturct aha_softc * that's passed to it is safe to : > use after calls to aha_free. : > : > void : > aha_free(struct aha_softc *aha) : > { : > switch (aha->init_level) { : > default: : > case 8: : > { : > struct sg_map_node *sg_map; : > : > while ((sg_map = SLIST_FIRST(&aha->sg_maps))!= NULL) { : > SLIST_REMOVE_HEAD(&aha->sg_maps, links); : > bus_dmamap_unload(aha->sg_dmat, sg_map->sg_dmamap); : > bus_dmamem_free(aha->sg_dmat, sg_map->sg_vaddr, : > sg_map->sg_dmamap); : > free(sg_map, M_DEVBUF); : > } : > bus_dma_tag_destroy(aha->sg_dmat); : > } : > case 7: : > bus_dmamap_unload(aha->ccb_dmat, aha->ccb_dmamap); : > case 6: : > bus_dmamap_destroy(aha->ccb_dmat, aha->ccb_dmamap); : > bus_dmamem_free(aha->ccb_dmat, aha->aha_ccb_array, : > aha->ccb_dmamap); : > case 5: : > bus_dma_tag_destroy(aha->ccb_dmat); : > case 4: : > bus_dmamap_unload(aha->mailbox_dmat, aha->mailbox_dmamap); : > case 3: : > bus_dmamem_free(aha->mailbox_dmat, aha->in_boxes, : > aha->mailbox_dmamap); : > bus_dmamap_destroy(aha->mailbox_dmat, aha->mailbox_dmamap); : > case 2: : > bus_dma_tag_destroy(aha->buffer_dmat); : > case 1: : > bus_dma_tag_destroy(aha->mailbox_dmat); : > case 0: : > break; : > } : > } : > : > so all the calls to aha_free then the freeing of resoruces are OK. : : ah, look at the 4.x sources though. it does free aha. Hmmmmm.... Very true. Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 19:02:17 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 5DEFA16A4CE; Mon, 23 Aug 2004 19:02:17 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 080B743D2D; Mon, 23 Aug 2004 19:02:17 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i7NJ1kLC070566; Mon, 23 Aug 2004 13:01:46 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 23 Aug 2004 13:02:04 -0600 (MDT) Message-Id: <20040823.130204.00005737.imp@bsdimp.com> To: kyle@xraided.net From: "M. Warner Losh" In-Reply-To: <000001c48930$2dc3d1e0$150ba8c0@kyle> References: <000001c48930$2dc3d1e0$150ba8c0@kyle> 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: freebsd-questions@freebsd.org Subject: Re: Digi PCI / XEM 16-Port 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, 23 Aug 2004 19:02:17 -0000 In message: <000001c48930$2dc3d1e0$150ba8c0@kyle> "Kyle Mott" writes: : I have tried several times now to compile a GENERIC kernel on : 4.10-STABLE with dgm0 (Digi Ports/16em, PCI version!) enabled, and have : had no luck. Can anyone give me pointers? Right now, it's not showing up : in dmesg (no errors, no warnings, nothing). The config line I have been : using is below (but it's the one straight out of LINT). I've done a lot : of googling and maillist searching; most of the documentation is for the : ISA version, and not the PCI version. I've tried chaning 'at isa?' to : 'at pci?' with no luck. : : device dgm0 at isa? port 0x104 iomem 0xd0000 Try 'digi' instead. The various drivers were merged into digi. Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 19:03: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 5DF4516A4CE for ; Mon, 23 Aug 2004 19:03:48 +0000 (GMT) Received: from mindfields.energyhq.es.eu.org (73.Red-213-97-200.pooles.rima-tde.net [213.97.200.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0884543D4C for ; Mon, 23 Aug 2004 19:03:42 +0000 (GMT) (envelope-from flynn@energyhq.es.eu.org) Received: from scienide.energyhq.es.eu.org (scienide.energyhq.es.eu.org [192.168.100.1]) by mindfields.energyhq.es.eu.org (Postfix) with SMTP id ADA6C36857 for ; Mon, 23 Aug 2004 21:03:31 +0200 (CEST) Date: Mon, 23 Aug 2004 21:03:24 +0200 From: Miguel Mendez To: freebsd-hackers@freebsd.org Message-Id: <20040823210324.567ea3a3.flynn@energyhq.es.eu.org> X-Mailer: Sylpheed version 0.9.12-gtk2-20040622 (GTK+ 2.4.7; i386-portbld-freebsd5.2.1) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="Signature=_Mon__23_Aug_2004_21_03_24_+0200_NeqW=IrefUM8KTgW" Subject: valgrind on 5.3BETA1 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, 23 Aug 2004 19:03:48 -0000 --Signature=_Mon__23_Aug_2004_21_03_24_+0200_NeqW=IrefUM8KTgW Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7bit Hi all, Is anybody using valgrind on 5.3BETA1 or newer? I've been using it for a while on 5.2.1 without any problems, until I upgraded my system to RELENG_5. The program works but it never exits after running your program, it gets stuck into `umtx' state indefinitely. This is happening with both plain jane valgrind and valgrind-snapshot ports. Is this already a known issue? I've tried to attach to the valgrind (built with -g) process with gdb, but the backtrace doesn't give much info... Attaching to program: /usr/local/bin/valgrind, process 24554 0xb803cf79 in ?? () (gdb) bt #0 0xb803cf79 in ?? () #1 0xb803082f in ?? () #2 0xb82e4f78 in ?? () #3 0xb82e4f64 in ?? () [...] #49 0x08048000 in ?? () #50 0x080497d0 in setrlimit () #51 0xb81e1030 in ?? () [...] #56 0xb81df0a0 in ?? () #57 0x08048430 in fix_auxv (v_init_esp=0x1, info=0x1) at stage1.c:124 Previous frame inner to this frame (corrupt stack?) Cheers, -- Miguel Mendez http://www.energyhq.es.eu.org PGP Key: 0xDC8514F1 Note: All HTML and non-english mail goes to /dev/null --Signature=_Mon__23_Aug_2004_21_03_24_+0200_NeqW=IrefUM8KTgW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQFBKj9/nLctrNyFFPERAhkIAKC3MAi6dCcfnnd0IQU+hazO23L4CgCfUAXV zdhI7rDUVi5NYwRgk6PTXU4= =cVs6 -----END PGP SIGNATURE----- --Signature=_Mon__23_Aug_2004_21_03_24_+0200_NeqW=IrefUM8KTgW-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 20:03: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 E878E16A4CE for ; Mon, 23 Aug 2004 20:03:40 +0000 (GMT) Received: from tuminfo2.informatik.tu-muenchen.de (tuminfo2.informatik.tu-muenchen.de [131.159.0.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0813143D41 for ; Mon, 23 Aug 2004 20:03:40 +0000 (GMT) (envelope-from barner@in.tum.de) Received: by zi025.glhnet.mhn.de (Postfix, from userid 1000) id B831FC1B6; Mon, 23 Aug 2004 22:03:39 +0200 (CEST) Date: Mon, 23 Aug 2004 22:03:39 +0200 From: Simon Barner To: Miguel Mendez Message-ID: <20040823200339.GA5717@zi025.glhnet.mhn.de> References: <20040823210324.567ea3a3.flynn@energyhq.es.eu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: <20040823210324.567ea3a3.flynn@energyhq.es.eu.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new/sophie/sophos at mailrelay1.informatik.tu-muenchen.de cc: freebsd-hackers@freebsd.org Subject: Re: valgrind on 5.3BETA1 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, 23 Aug 2004 20:03:41 -0000 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Miguel Mendez wrote: > Hi all, >=20 > Is anybody using valgrind on 5.3BETA1 or newer? I've been using it for a > while on 5.2.1 without any problems, until I upgraded my system to > RELENG_5. The program works but it never exits after running your > program, it gets stuck into `umtx' state indefinitely. This is happening > with both plain jane valgrind and valgrind-snapshot ports. Is this > already a known issue?=20 Hi, there is a closed problem report in the database: http://www.freebsd.org/cgi/query-pr.cgi?pr=3D68992 At the end of that PR, there is a patch that seems to work around the problem. Could you please test it? Simon --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQFBKk2bCkn+/eutqCoRAsi5AKCi3XVsvRSPvTWvpylS3IvgotVUkACg4f10 /OdB2PQdG2C6VohlbycXn5A= =ov5x -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 20:32: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 C206716A4CE; Mon, 23 Aug 2004 20:32:20 +0000 (GMT) Received: from imf17aec.mail.bellsouth.net (imf17aec.mail.bellsouth.net [205.152.59.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4335743D54; Mon, 23 Aug 2004 20:32:20 +0000 (GMT) (envelope-from kruptos@bellsouth.net) Received: from [172.23.23.23] ([67.35.154.55]) by imf17aec.mail.bellsouth.netESMTP <20040823203217.QMGH1758.imf17aec.mail.bellsouth.net@[172.23.23.23]>; Mon, 23 Aug 2004 16:32:17 -0400 From: Kevin Brunelle To: freebsd-current@freebsd.org In-Reply-To: <1093188163.2100.4.camel@fnord.quux.edu> References: <1093141197.643.28.camel@fnord.quux.edu> <1093188163.2100.4.camel@fnord.quux.edu> Content-Type: multipart/mixed; boundary="=-vpYO8kooTC9NnTLQkRkK" Message-Id: <1093293236.618.12.camel@fnord.quux.edu> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 23 Aug 2004 16:33:56 -0400 cc: freebsd-hackers@freebsd.org Subject: Re: Fatal trap 12: page fault while in kernel mode 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, 23 Aug 2004 20:32:20 -0000 --=-vpYO8kooTC9NnTLQkRkK Content-Type: text/plain Content-Transfer-Encoding: 7bit Alright, this is driving me nuts. For a little while there I could not get the system to panic -- it would spontaniously reboot when running a GL program instead of panic. This afternoon it finally panic'd (who would think that would be something I want to see but it was). I am attaching the transcript of me playing around with it. It includes the panic message as well as some debug output from gdb. Although I am not certain that is as helpful as I hoped it would be. At the very end I have included yet another uname -a and copy of my kernel configuration file. The error this time was a double fault (are we playing tennis?). My original issue was with a page fault in kernel mode. And my original problem also was related to a different function. The function this time is . Take a look at all those sig-11s. I would suspect bad memory but I ran memtest86+ on this machine less than a week ago and everything was fine -- not even a whiff of a problem. I caused this panic by running another gl application and I feel it is related to my orginal problem. Another thing that interested me is that the kernel dump seems "corrupted" or incomplete... does the line "---Can't read userspace from dump, or kernel process---" possibly imply that I did not get a good dump at the time of the panic? If anyone has any ideas about what to fix I would love to hear them. I am tempted to change a few things myself that might be an issue (for example, removing the FreeBSD agp which nvidia complains about in my dmesg -- and also upgrading to 3-Beta1 ... so at least my kernel panics will relate to making that system better). But, until I know that this is a dead end and no one wants to see anything, I am not touching anything. I don't want to ruin the chances of this being a real bug and it not being fixed because I change something that just hides it. If you want me to get any information from the dump or try anything please let me know. You may have to tell me how to go about doing stuff with gdb (I am not very experienced with its advanced features) but I am willing to learn and do what I can. -Kevin -- "Down with disease, up before the dawn. A thousand barefoot children, dancin? on my lawn" -Phish "Down with Disease" --=-vpYO8kooTC9NnTLQkRkK Content-Disposition: attachment; filename=typescript Content-Type: text/plain; name=typescript; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Script started on Mon Aug 23 16:14:53 2004 /home/kevinb/crash# gdb -k kernel.debug vmcore.1 GNU gdb 5.2.1 (FreeBSD) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"... panic: swp_pager_meta_free_all: failed to locate all swap meta blocks panic messages: --- panic: double fault syncing disks, buffers remaining... 2177 2177 Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.2.1-RELEASE-p9 #0: Sun Aug 22 14:00:38 EDT 2004 kevinb@fnord.quux.edu:/usr/obj/usr/src/sys/FOOKERN Preloaded elf kernel "/boot/kernel/kernel" at 0xc0ce4000. Preloaded elf module "/boot/modules/nvidia.ko" at 0xc0ce4244. Preloaded elf module "/boot/kernel/linux.ko" at 0xc0ce42f0. Preloaded elf module "/boot/kernel/acpi.ko" at 0xc0ce439c. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel Pentium III (863.87-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x683 Stepping = 3 Features=0x383f9ff real memory = 268173312 (255 MB) avail memory = 246661120 (235 MB) Pentium Pro MTRR support enabled npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard pcibios: BIOS version 2.10 Using $PIR table, 12 entries at 0xc00f2d00 acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 acpi_cpu0: port 0x530-0x537 on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib0: slot 31 INTD is routed to irq 10 pcib0: slot 31 INTB is routed to irq 9 agp0: mem 0xf8000000-0xfbffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci2: on pcib1 pcib0: slot 1 INTA is routed to irq 11 pcib1: slot 0 INTA is routed to irq 11 nvidia0: mem 0xf2000000-0xf3ffffff,0xfd000000-0xfdffffff irq 11 at device 0.0 on pci2 pcib2: at device 30.0 on pci0 pci1: on pcib2 pcib2: slot 9 INTA is routed to irq 3 pcib2: slot 12 INTA is routed to irq 9 xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xdc00-0xdc7f mem 0xfc9ff800-0xfc9ff87f irq 3 at device 9.0 on pci1 xl0: Ethernet address: 00:01:03:23:9d:ba miibus0: on xl0 xlphy0: <3c905C 10/100 internal PHY> on miibus0 xlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto pcm0: port 0xdf00-0xdf3f irq 9 at device 12.0 on pci1 pcm0: isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xffa0-0xffaf at device 31.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata0: [MPSAFE] ata1: at 0x170 irq 15 on atapci0 ata1: [MPSAFE] uhci0: port 0xef80-0xef9f irq 10 at device 31.2 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered ums0: Logitech USB-PS/2 Optical Mouse, rev 2.00/11.10, addr 2, iclass 3/1 ums0: 3 buttons and Z dir. pci0: at device 31.3 (no driver attached) atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 fdc0: port 0x3f7,0x3f4-0x3f5,0x3f2-0x3f3,0x3f0-0x3f1 irq 6 drq 2 on acpi0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0 port 0x3f8-0x3ff irq 4 on acpi0 sio0: type 16550A ppc0 port 0x778-0x77f,0x378-0x37f irq 7 drq 3 on acpi0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/8 bytes threshold ppbus0: on ppc0 ppbus0: IEEE1284 device found /NIBBLE/ECP Probing for PnP devices on ppbus0: ppbus0: MLC,PCL,PML plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 pmtimer0 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 863868717 Hz quality 800 Timecounters tick every 10.000 msec GEOM: create disk ad0 dp=0xc3138960 ad0: 28629MB [58168/16/63] at ata0-master UDMA66 GEOM: create disk ad1 dp=0xc3138660 ad1: 57220MB [116257/16/63] at ata0-slave UDMA100 acd0: CDRW at ata1-master PIO4 acd1: CDROM at ata1-slave PIO4 Mounting root from ufs:/dev/ad0s1a WARNING: / was not properly dismounted WARNING: /tmp was not properly dismounted WARNING: /usr was not properly dismounted WARNING: /var was not properly dismounted WARNING: /drv1 was not properly dismounted /drv1: superblock summary recomputed NVRM: detected agp.ko, aborting NVIDIA AGP setup! NVRM: detected agp.ko, aborting NVIDIA AGP setup! Fatal double fault: eip = 0xc064c41d esp = 0xd31f1ffc ebp = 0xd31f2034 panic: double fault syncing disks, buffers remaining... 2176 2176 Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.2.1-RELEASE-p9 #0: Sun Aug 22 14:00:38 EDT 2004 kevinb@fnord.quux.edu:/usr/obj/usr/src/sys/FOOKERN Preloaded elf kernel "/boot/kernel/kernel" at 0xc0cf8000. Preloaded elf module "/boot/kernel/splash_bmp.ko" at 0xc0cf8244. Preloaded splash_image_data "/boot/splash.bmp" at 0xc0cf82f4. Preloaded elf module "/boot/kernel/linux.ko" at 0xc0cf8344. Preloaded elf module "/boot/modules/nvidia.ko" at 0xc0cf83f0. Preloaded elf module "/boot/kernel/acpi.ko" at 0xc0cf849c. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel Pentium III (863.87-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x683 Stepping = 3 Features=0x383f9ff real memory = 268173312 (255 MB) avail memory = 246661120 (235 MB) Pentium Pro MTRR support enabled npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard pcibios: BIOS version 2.10 Using $PIR table, 12 entries at 0xc00f2d00 acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 acpi_cpu0: port 0x530-0x537 on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib0: slot 31 INTD is routed to irq 10 pcib0: slot 31 INTB is routed to irq 9 agp0: mem 0xf8000000-0xfbffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci2: on pcib1 pcib0: slot 1 INTA is routed to irq 11 pcib1: slot 0 INTA is routed to irq 11 nvidia0: mem 0xf2000000-0xf3ffffff,0xfd000000-0xfdffffff irq 11 at device 0.0 on pci2 pcib2: at device 30.0 on pci0 pci1: on pcib2 pcib2: slot 9 INTA is routed to irq 3 pcib2: slot 12 INTA is routed to irq 9 xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xdc00-0xdc7f mem 0xfc9ff800-0xfc9ff87f irq 3 at device 9.0 on pci1 xl0: Ethernet address: 00:01:03:23:9d:ba miibus0: on xl0 xlphy0: <3c905C 10/100 internal PHY> on miibus0 xlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto pcm0: port 0xdf00-0xdf3f irq 9 at device 12.0 on pci1 pcm0: isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xffa0-0xffaf at device 31.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata0: [MPSAFE] ata1: at 0x170 irq 15 on atapci0 ata1: [MPSAFE] uhci0: port 0xef80-0xef9f irq 10 at device 31.2 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered ums0: Logitech USB-PS/2 Optical Mouse, rev 2.00/11.10, addr 2, iclass 3/1 ums0: 3 buttons and Z dir. pci0: at device 31.3 (no driver attached) atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 fdc0: port 0x3f7,0x3f4-0x3f5,0x3f2-0x3f3,0x3f0-0x3f1 irq 6 drq 2 on acpi0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0 port 0x3f8-0x3ff irq 4 on acpi0 sio0: type 16550A ppc0 port 0x778-0x77f,0x378-0x37f irq 7 drq 3 on acpi0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/8 bytes threshold ppbus0: on ppc0 ppbus0: IEEE1284 device found /NIBBLE/ECP Probing for PnP devices on ppbus0: ppbus0: MLC,PCL,PML plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 pmtimer0 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 863866045 Hz quality 800 Timecounters tick every 10.000 msec GEOM: create disk ad0 dp=0xc31c3460 ad0: 28629MB [58168/16/63] at ata0-master UDMA66 GEOM: create disk ad1 dp=0xc31c3160 ad1: 57220MB [116257/16/63] at ata0-slave UDMA100 acd0: CDRW at ata1-master PIO4 acd1: CDROM at ata1-slave PIO4 Mounting root from ufs:/dev/ad0s1a WARNING: / was not properly dismounted WARNING: /tmp was not properly dismounted WARNING: /usr was not properly dismounted WARNING: /var was not properly dismounted WARNING: /drv1 was not properly dismounted /drv1: mount pending error: blocks 108 files 0 NVRM: detected agp.ko, aborting NVIDIA AGP setup! NVRM: detected agp.ko, aborting NVIDIA AGP setup! pid 3725 (stairs), uid 1000: exited on signal 10 (core dumped) pid 3757 (dd), uid 2: exited on signal 11 pid 3796 (dd), uid 2: exited on signal 11 pid 3859 (dd), uid 2: exited on signal 11 pid 3921 (dd), uid 2: exited on signal 11 pid 3981 (dd), uid 2: exited on signal 11 pid 4041 (dd), uid 2: exited on signal 11 pid 4103 (dd), uid 2: exited on signal 11 pid 4136 (dd), uid 2: exited on signal 11 pid 4193 (dd), uid 2: exited on signal 11 pid 4250 (dd), uid 2: exited on signal 11 pid 4306 (dd), uid 2: exited on signal 11 pid 4363 (dd), uid 2: exited on signal 11 pid 4423 (dd), uid 2: exited on signal 11 pid 4455 (dd), uid 2: exited on signal 11 pid 4511 (dd), uid 2: exited on signal 11 pid 4569 (dd), uid 2: exited on signal 11 pid 4625 (dd), uid 2: exited on signal 11 pid 4682 (dd), uid 2: exited on signal 11 pid 4742 (dd), uid 2: exited on signal 11 pid 4774 (dd), uid 2: exited on signal 11 pid 4832 (dd), uid 2: exited on signal 11 pid 4888 (dd), uid 2: exited on signal 11 pid 4945 (dd), uid 2: exited on signal 11 pid 5002 (dd), uid 2: exited on signal 11 pid 1841 (xscreensaver), uid 1000: exited on signal 4 pid 5036 (xscreensaver), uid 1000: exited on signal 4 pid 5057 (glsnake), uid 1000: exited on signal 11 (core dumped) pid 5058 (gltext), uid 1000: exited on signal 11 (core dumped) pid 5059 (gltext), uid 1000: exited on signal 11 (core dumped) pid 5060 (gltext), uid 1000: exited on signal 11 (core dumped) pid 5061 (gltext), uid 1000: exited on signal 11 (core dumped) pid 5066 (glplanet), uid 1000: exited on signal 11 (core dumped) pid 5067 (glplanet), uid 1000: exited on signal 11 (core dumped) pid 5068 (glmatrix), uid 1000: exited on signal 11 (core dumped) pid 5069 (glmatrix), uid 1000: exited on signal 11 (core dumped) pid 5071 (glplanet), uid 1000: exited on signal 11 (core dumped) pid 5072 (glmatrix), uid 1000: exited on signal 11 (core dumped) pid 5073 (gltext), uid 1000: exited on signal 11 (core dumped) pid 9782 (dd), uid 2: exited on signal 11 pid 10650 (dd), uid 2: exited on signal 11 pid 13114 (bouncingcow), uid 1000: exited on signal 11 (core dumped) pid 12995 (tcsh), uid 1000: exited on signal 11 (core dumped) pid 5167 (firefox-bin), uid 1000: exited on signal 11 (core dumped) pid 1837 (wmaker), uid 1000: exited on signal 11 (core dumped) panic: swp_pager_meta_free_all: failed to locate all swap meta blocks syncing disks, buffers remaining... 1712 1672 1672 1672 1672 1672 1672 1672 1672 1672 1672 1672 1672 1672 1672 1672 ad1: WARNING - WRITE_DMA interrupt was seen but timeout fired LBA=38562655 1672 1672 1672 1672 1672 giving up on 435 buffers Uptime: 12h25m26s Dumping 255 MB [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] 16 32 48 64 80 96 112 128 144 160 176 192[CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] 208[CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] 224[CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] 240 --- warning: cannot find file for module nvidia.ko Error while mapping shared library sections: nvidia.ko: No such file or directory. Reading symbols from /boot/kernel/splash_bmp.ko...done. Loaded symbols for /boot/kernel/splash_bmp.ko Reading symbols from /usr/obj/usr/src/sys/FOOKERN/modules/usr/src/sys/modules/linux/linux.ko.debug...done. Loaded symbols for /usr/obj/usr/src/sys/FOOKERN/modules/usr/src/sys/modules/linux/linux.ko.debug Error while reading shared library symbols: nvidia.ko: No such file or directory. Reading symbols from /usr/obj/usr/src/sys/FOOKERN/modules/usr/src/sys/modules/acpi/acpi.ko.debug...done. Loaded symbols for /usr/obj/usr/src/sys/FOOKERN/modules/usr/src/sys/modules/acpi/acpi.ko.debug #0 doadump () at /usr/src/sys/kern/kern_shutdown.c:240 240 dumping++; (kgdb) where #0 doadump () at /usr/src/sys/kern/kern_shutdown.c:240 #1 0xc0527cf7 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:372 #2 0xc0528027 in panic () at /usr/src/sys/kern/kern_shutdown.c:550 #3 0xc0621025 in swp_pager_meta_free_all (object=0xc38d9b58) at /usr/src/sys/vm/swap_pager.c:1980 #4 0xc061ef04 in swap_pager_dealloc (object=0xc38d9b58) at /usr/src/sys/vm/swap_pager.c:552 #5 0xc063532a in vm_pager_deallocate (object=0x0) at /usr/src/sys/vm/vm_pager.c:261 #6 0xc062dc03 in vm_object_terminate (object=0xc38d9b58) at /usr/src/sys/vm/vm_object.c:637 #7 0xc062da31 in vm_object_deallocate (object=0xc38d9b58) at /usr/src/sys/vm/vm_object.c:551 #8 0xc0629c28 in vm_map_entry_delete (map=0xc1acb1d8, entry=0xc38d412c) at /usr/src/sys/vm/vm_map.c:2090 #9 0xc0629e88 in vm_map_delete (map=0xc1acb1d8, start=3280814380, end=3217031168) at /usr/src/sys/vm/vm_map.c:2190 #10 0xc0629f05 in vm_map_remove (map=0xc1acb1d8, start=0, end=3217031168) at /usr/src/sys/vm/vm_map.c:2212 #11 0xc0511d9d in exit1 (td=0xc31d8dc0, rv=139) at /usr/src/sys/vm/vm_map.h:201 #12 0xc052c4cc in sigexit () at /usr/src/sys/kern/kern_sig.c:2428 #13 0xc052c129 in postsig (sig=11) at /usr/src/sys/kern/kern_sig.c:2313 #14 0xc054b018 in ast (framep=0xd2936d48) at /usr/src/sys/kern/subr_trap.c:262 #15 0xc065cb5d in doreti_ast () at {standard input}:348 ---Can't read userspace from dump, or kernel process--- (kgdb) dia sas 0xc064c41d Dump of assembler code for function scterm_puts: 0xc064c370 : push %ebp 0xc064c371 : mov %esp,%ebp 0xc064c373 : push %edi 0xc064c374 : push %esi 0xc064c375 : push %ebx 0xc064c376 : sub $0x2c,%esp 0xc064c379 : mov 0x8(%ebp),%eax 0xc064c37c : mov 0x7c(%eax),%eax 0xc064c37f : mov %eax,0xfffffff0(%ebp) 0xc064c382 : lea 0x0(%esi,1),%esi 0xc064c389 : lea 0x0(%edi,1),%edi 0xc064c390 : mov 0x8(%ebp),%edx 0xc064c393 : mov 0x4(%edx),%eax 0xc064c396 : incb 0x3f(%eax) 0xc064c399 : mov 0xfffffff0(%ebp),%ecx 0xc064c39c : cmpl $0x0,0x4(%ecx) 0xc064c3a0 : je 0xc064c3c0 0xc064c3a2 : mov 0xc(%ebp),%eax 0xc064c3a5 : movzbl (%eax),%eax 0xc064c3a8 : mov %eax,0x8(%esp,1) 0xc064c3ac : mov %ecx,0x4(%esp,1) 0xc064c3b0 : mov %edx,(%esp,1) 0xc064c3b3 : call 0xc064b0a0 0xc064c3b8 : jmp 0xc064c3d9 0xc064c3ba : lea 0x0(%esi),%esi 0xc064c3c0 : mov 0xc(%ebp),%eax 0xc064c3c3 : cmpb $0x1b,(%eax) 0xc064c3c6 : jne 0xc064c3e4 0xc064c3c8 : mov 0xfffffff0(%ebp),%eax 0xc064c3cb : movl $0x1,0x4(%eax) 0xc064c3d2 : movl $0x0,0x8(%eax) 0xc064c3d9 : incl 0xc(%ebp) 0xc064c3dc : decl 0x10(%ebp) 0xc064c3df : jmp 0xc064c60a 0xc064c3e4 : mov 0x8(%ebp),%edi 0xc064c3e7 : mov 0xfffffff0(%ebp),%edx 0xc064c3ea : mov 0x30(%edx),%edx 0xc064c3ed : mov %edx,0xffffffec(%ebp) 0xc064c3f0 : mov 0xc(%ebp),%esi 0xc064c3f3 : mov 0x10(%ebp),%ecx 0xc064c3f6 : mov %ecx,0xffffffe0(%ebp) 0xc064c3f9 : cmpb $0x1b,(%esi) 0xc064c3fc : ja 0xc064c410 0xc064c3fe : movzbl (%esi),%eax 0xc064c401 : sub $0xe,%al 0xc064c403 : cmp $0xc,%al 0xc064c405 : jbe 0xc064c410 0xc064c407 : cmpb $0x6,(%esi) ---Type to continue, or q to quit--- 0xc064c40a : ja 0xc064c503 0xc064c410 : mov 0x88(%edi),%eax 0xc064c416 : mov %eax,0x4(%esp,1) 0xc064c41a : lea 0x28(%edi),%eax 0xc064c41d : mov %eax,(%esp,1) 0xc064c420 : call 0xc064e5c0 0xc064c425 : mov %eax,%edx 0xc064c427 : mov 0x4(%edi),%eax 0xc064c42a : add $0x60,%eax 0xc064c42d : mov %eax,0xffffffe8(%ebp) 0xc064c430 : mov 0x4c(%edi),%eax 0xc064c433 : sub 0x44(%edi),%eax 0xc064c436 : cmp 0xffffffe0(%ebp),%eax 0xc064c439 : cmovg 0xffffffe0(%ebp),%eax 0xc064c43d : mov %eax,0xffffffe4(%ebp) 0xc064c440 : mov %eax,%ebx 0xc064c442 : lea 0x28(%edi),%ecx 0xc064c445 : mov %ecx,0xffffffdc(%ebp) 0xc064c448 : nop 0xc064c449 : lea 0x0(%esi,1),%esi 0xc064c450 : mov 0xffffffec(%ebp),%eax 0xc064c453 : mov %eax,0xc(%esp,1) 0xc064c457 : movzbl (%esi),%eax 0xc064c45a : mov 0xffffffe8(%ebp),%ecx 0xc064c45d : movzbl (%eax,%ecx,1),%eax 0xc064c461 : mov %eax,0x8(%esp,1) 0xc064c465 : mov %edx,0x4(%esp,1) 0xc064c469 : mov 0xffffffdc(%ebp),%eax 0xc064c46c : mov %eax,(%esp,1) 0xc064c46f : call 0xc064e5a0 0xc064c474 : mov %eax,%edx 0xc064c476 : inc %esi 0xc064c477 : dec %ebx 0xc064c478 : test %ebx,%ebx 0xc064c47a : jle 0xc064c48f 0xc064c47c : cmpb $0x1b,(%esi) 0xc064c47f : ja 0xc064c450 0xc064c481 : movzbl (%esi),%eax 0xc064c484 : sub $0xe,%al 0xc064c486 : cmp $0xc,%al 0xc064c488 : jbe 0xc064c450 0xc064c48a : cmpb $0x6,(%esi) 0xc064c48d : jbe 0xc064c450 0xc064c48f : mov 0xffffffe4(%ebp),%eax 0xc064c492 : sub %ebx,%eax 0xc064c494 : sub %eax,0xffffffe0(%ebp) 0xc064c497 : mov 0x88(%edi),%eax 0xc064c49d : cmp 0x70(%edi),%eax 0xc064c4a0 : jge 0xc064c4a7 ---Type to continue, or q to quit---q Quit (kgdb) q /home/kevinb/crash# grep /var/log/messages  /" A u g   /2 3   /0 3 : 3 "  Aug 23 03:37:55 fnord syslogd: kernel boot file is /boot/kernel/kernel Aug 23 03:37:55 fnord kernel: Aug 23 03:37:55 fnord kernel: Fatal double fault: Aug 23 03:37:55 fnord kernel: eip = 0xc064c41d Aug 23 03:37:55 fnord kernel: esp = 0xd31f1ffc Aug 23 03:37:55 fnord kernel: ebp = 0xd31f2034 Aug 23 03:37:55 fnord kernel: panic: double fault Aug 23 03:37:55 fnord kernel: Aug 23 03:37:55 fnord kernel: syncing disks, buffers remaining... 2176 2176 Copyright (c) 1992-2004 The FreeBSD Project. Aug 23 03:37:55 fnord kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 Aug 23 03:37:55 fnord kernel: The Regents of the University of California. All rights reserved. Aug 23 03:37:55 fnord kernel: FreeBSD 5.2.1-RELEASE-p9 #0: Sun Aug 22 14:00:38 EDT 2004 Aug 23 03:37:55 fnord kernel: kevinb@fnord.quux.edu:/usr/obj/usr/src/sys/FOOKERN Aug 23 03:37:55 fnord kernel: Preloaded elf kernel "/boot/kernel/kernel" at 0xc0cf8000. Aug 23 03:37:55 fnord kernel: Preloaded elf module "/boot/kernel/splash_bmp.ko" at 0xc0cf8244. Aug 23 03:37:55 fnord kernel: Preloaded splash_image_data "/boot/splash.bmp" at 0xc0cf82f4. Aug 23 03:37:55 fnord kernel: Preloaded elf module "/boot/kernel/linux.ko" at 0xc0cf8344. Aug 23 03:37:55 fnord kernel: Preloaded elf module "/boot/modules/nvidia.ko" at 0xc0cf83f0. Aug 23 03:37:55 fnord kernel: Preloaded elf module "/boot/kernel/acpi.ko" at 0xc0cf849c. Aug 23 03:37:55 fnord kernel: Timecounter "i8254" frequency 1193182 Hz quality 0 Aug 23 03:37:55 fnord kernel: CPU: Intel Pentium III (863.87-MHz 686-class CPU) Aug 23 03:37:55 fnord kernel: Origin = "GenuineIntel" Id = 0x683 Stepping = 3 Aug 23 03:37:55 fnord kernel: Features=0x383f9ff Aug 23 03:37:55 fnord kernel: real memory = 268173312 (255 MB) Aug 23 03:37:55 fnord kernel: avail memory = 246661120 (235 MB) Aug 23 03:37:55 fnord kernel: Pentium Pro MTRR support enabled Aug 23 03:37:55 fnord kernel: npx0: [FAST] Aug 23 03:37:55 fnord kernel: npx0: on motherboard Aug 23 03:37:55 fnord kernel: npx0: INT 16 interface Aug 23 03:37:55 fnord kernel: acpi0: on motherboard Aug 23 03:37:55 fnord kernel: pcibios: BIOS version 2.10 Aug 23 03:37:55 fnord kernel: Using $PIR table, 12 entries at 0xc00f2d00 Aug 23 03:37:55 fnord kernel: acpi0: Power Button (fixed) Aug 23 03:37:55 fnord kernel: Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 Aug 23 03:37:55 fnord kernel: acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 Aug 23 03:37:55 fnord kernel: acpi_cpu0: port 0x530-0x537 on acpi0 Aug 23 03:37:55 fnord kernel: acpi_button0: on acpi0 Aug 23 03:37:55 fnord kernel: pcib0: port 0xcf8-0xcff on acpi0 Aug 23 03:37:55 fnord kernel: pci0: on pcib0 Aug 23 03:37:55 fnord kernel: pcib0: slot 31 INTD is routed to irq 10 Aug 23 03:37:55 fnord kernel: pcib0: slot 31 INTB is routed to irq 9 Aug 23 03:37:55 fnord kernel: agp0: mem 0xf8000000-0xfbffffff at device 0.0 on pci0 Aug 23 03:37:55 fnord kernel: pcib1: at device 1.0 on pci0 Aug 23 03:37:55 fnord kernel: pci2: on pcib1 Aug 23 03:37:55 fnord kernel: pcib0: slot 1 INTA is routed to irq 11 Aug 23 03:37:55 fnord kernel: pcib1: slot 0 INTA is routed to irq 11 Aug 23 03:37:55 fnord kernel: nvidia0: mem 0xf2000000-0xf3ffffff,0xfd000000-0xfdffffff irq 11 at device 0.0 on pci2 Aug 23 03:37:55 fnord kernel: pcib2: at device 30.0 on pci0 Aug 23 03:37:55 fnord kernel: pci1: on pcib2 Aug 23 03:37:55 fnord kernel: pcib2: slot 9 INTA is routed to irq 3 Aug 23 03:37:55 fnord kernel: pcib2: slot 12 INTA is routed to irq 9 Aug 23 03:37:55 fnord kernel: xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xdc00-0xdc7f mem 0xfc9ff800-0xfc9ff87f irq 3 at device 9.0 on pci1 Aug 23 03:37:55 fnord kernel: xl0: Ethernet address: 00:01:03:23:9d:ba Aug 23 03:37:55 fnord kernel: miibus0: on xl0 Aug 23 03:37:55 fnord kernel: xlphy0: <3c905C 10/100 internal PHY> on miibus0 Aug 23 03:37:55 fnord kernel: xlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Aug 23 03:37:55 fnord kernel: pcm0: port 0xdf00-0xdf3f irq 9 at device 12.0 on pci1 Aug 23 03:37:55 fnord kernel: pcm0: Aug 23 03:37:55 fnord kernel: isab0: at device 31.0 on pci0 Aug 23 03:37:55 fnord kernel: isa0: on isab0 Aug 23 03:37:55 fnord kernel: atapci0: port 0xffa0-0xffaf at device 31.1 on pci0 Aug 23 03:37:55 fnord kernel: ata0: at 0x1f0 irq 14 on atapci0 Aug 23 03:37:55 fnord kernel: ata0: [MPSAFE] Aug 23 03:37:55 fnord kernel: ata1: at 0x170 irq 15 on atapci0 Aug 23 03:37:55 fnord kernel: ata1: [MPSAFE] Aug 23 03:37:55 fnord kernel: uhci0: port 0xef80-0xef9f irq 10 at device 31.2 on pci0 Aug 23 03:37:55 fnord kernel: usb0: on uhci0 Aug 23 03:37:55 fnord kernel: usb0: USB revision 1.0 Aug 23 03:37:55 fnord kernel: uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 Aug 23 03:37:55 fnord kernel: uhub0: 2 ports with 2 removable, self powered Aug 23 03:37:55 fnord kernel: ums0: Logitech USB-PS/2 Optical Mouse, rev 2.00/11.10, addr 2, iclass 3/1 Aug 23 03:37:55 fnord kernel: ums0: 3 buttons and Z dir. Aug 23 03:37:55 fnord kernel: pci0: at device 31.3 (no driver attached) Aug 23 03:37:55 fnord kernel: atkbdc0: port 0x64,0x60 irq 1 on acpi0 Aug 23 03:37:55 fnord kernel: atkbd0: flags 0x1 irq 1 on atkbdc0 Aug 23 03:37:55 fnord kernel: kbd0 at atkbd0 Aug 23 03:37:55 fnord kernel: fdc0: port 0x3f7,0x3f4-0x3f5,0x3f2-0x3f3,0x3f0-0x3f1 irq 6 drq 2 on acpi0 Aug 23 03:37:55 fnord kernel: fdc0: FIFO enabled, 8 bytes threshold Aug 23 03:37:55 fnord kernel: fd0: <1440-KB 3.5" drive> on fdc0 drive 0 Aug 23 03:37:55 fnord kernel: sio0 port 0x3f8-0x3ff irq 4 on acpi0 Aug 23 03:37:55 fnord kernel: sio0: type 16550A Aug 23 03:37:55 fnord kernel: ppc0 port 0x778-0x77f,0x378-0x37f irq 7 drq 3 on acpi0 Aug 23 03:37:55 fnord kernel: ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode Aug 23 03:37:55 fnord kernel: ppc0: FIFO with 16/16/8 bytes threshold Aug 23 03:37:55 fnord kernel: ppbus0: on ppc0 Aug 23 03:37:55 fnord kernel: ppbus0: IEEE1284 device found /NIBBLE/ECP Aug 23 03:37:55 fnord kernel: Probing for PnP devices on ppbus0: Aug 23 03:37:55 fnord kernel: ppbus0: MLC,PCL,PML Aug 23 03:37:55 fnord kernel: plip0: on ppbus0 Aug 23 03:37:55 fnord kernel: lpt0: on ppbus0 Aug 23 03:37:55 fnord kernel: lpt0: Interrupt-driven port Aug 23 03:37:55 fnord kernel: ppi0: on ppbus0 Aug 23 03:37:55 fnord kernel: pmtimer0 on isa0 Aug 23 03:37:55 fnord kernel: sc0: at flags 0x100 on isa0 Aug 23 03:37:55 fnord kernel: sc0: VGA <16 virtual consoles, flags=0x300> Aug 23 03:37:55 fnord kernel: sio1: configured irq 3 not in bitmap of probed irqs 0 Aug 23 03:37:55 fnord kernel: sio1: port may not be enabled Aug 23 03:37:55 fnord kernel: vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Aug 23 03:37:55 fnord kernel: Timecounter "TSC" frequency 863866045 Hz quality 800 Aug 23 03:37:55 fnord kernel: Timecounters tick every 10.000 msec Aug 23 03:37:55 fnord kernel: GEOM: create disk ad0 dp=0xc31c3460 Aug 23 03:37:55 fnord kernel: ad0: 28629MB [58168/16/63] at ata0-master UDMA66 Aug 23 03:37:55 fnord kernel: GEOM: create disk ad1 dp=0xc31c3160 Aug 23 03:37:55 fnord kernel: ad1: 57220MB [116257/16/63] at ata0-slave UDMA100 Aug 23 03:37:55 fnord kernel: acd0: CDRW at ata1-master PIO4 Aug 23 03:37:55 fnord kernel: acd1: CDROM at ata1-slave PIO4 Aug 23 03:37:55 fnord kernel: Mounting root from ufs:/dev/ad0s1a Aug 23 03:37:55 fnord kernel: WARNING: / was not properly dismounted Aug 23 03:37:55 fnord kernel: WARNING: /tmp was not properly dismounted Aug 23 03:37:55 fnord kernel: WARNING: /usr was not properly dismounted Aug 23 03:37:55 fnord kernel: WARNING: /var was not properly dismounted Aug 23 03:37:55 fnord kernel: WARNING: /drv1 was not properly dismounted Aug 23 03:37:55 fnord kernel: /drv1: mount pending error: blocks 108 files 0 Aug 23 03:37:55 fnord savecore: no dumps found Aug 23 03:37:56 fnord lpd[417]: lpd startup: logging=0 net-secure Aug 23 03:38:02 fnord kernel: NVRM: detected agp.ko, aborting NVIDIA AGP setup! Aug 23 03:38:02 fnord kernel: NVRM: detected agp.ko, aborting NVIDIA AGP setup! Aug 23 03:39:01 fnord fsck: /dev/ad0s1e: 38 files, 66 used, 506421 free (37 frags, 63298 blocks, 0.0% fragmentation) /home/kevinb/crash# uname -a FreeBSD fnord.quux.edu 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #0: Sun Aug 22 14:00:38 EDT 2004 kevinb@fnord.quux.edu:/usr/obj/usr/src/sys/FOOKERN i386 /home/kevinb/crash# cat /usr/src/sys/i386/conf/DFOOKERN # # FOOKERN -- Desktop kernel configuration file for FreeBSD/i386 # # For more information on this file, please read the handbook section on # Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the # FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the # latest information. # # An exhaustive list of options and more detailed explanations of the # device lines is also present in the ../../conf/NOTES and NOTES files. # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # machine i386 cpu I686_CPU ident FOOKERN makeoptions DEBUG=-g options DDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories options MD_ROOT #MD is a potential root device options NFSCLIENT #Network Filesystem Client options NFSSERVER #Network Filesystem Server options NFS_ROOT #NFS usable as /, requires NFSCLIENT options MSDOSFS #MSDOS Filesystem options CD9660 #ISO 9660 Filesystem options PROCFS #Process filesystem (requires PSEUDOFS) options PSEUDOFS #Pseudo-filesystem framework options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] options COMPAT_FREEBSD4 #Compatible with FreeBSD4 options KTRACE #ktrace(1) support options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver. options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. options PFIL_HOOKS # pfil(9) framework options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS device isa device eisa device pci # Floppy drives device fdc # ATA and ATAPI devices device ata device atadisk # ATA disk drives device ataraid # ATA RAID drives device atapicd # ATAPI CDROM drives device atapifd # ATAPI floppy drives device atapist # ATAPI tape drives options ATA_STATIC_ID #Static device numbering # SCSI peripherals device scbus # SCSI bus (required for SCSI) # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse device vga # VGA video card driver device splash # Splash screen and screen saver support # syscons is the default console driver, resembling an SCO console device sc device agp # support several AGP chipsets # Floating point support - do not disable. device npx # Add suspend/resume support for the i8254. device pmtimer # PCCARD (PCMCIA) support # Pcmcia and cardbus bridge support device cbb # cardbus (yenta) bridge #device pcic # ExCA ISA and PCI bridges device pccard # PC Card (16-bit) bus device cardbus # CardBus (32-bit) bus # Serial (COM) ports device sio # 8250, 16[45]50 based serial ports # Parallel port device ppc device ppbus # Parallel port bus (required) device lpt # Printer device plip # TCP/IP over parallel device ppi # Parallel port interface device # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # Pseudo devices - the number indicates how many units to allocate. device random # Entropy device device loop # Network loopback device ether # Ethernet support device ppp # Kernel PPP device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" device gif # IPv6 and IPv4 tunneling device faith # IPv6-to-IPv4 relaying (translation) # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! device bpf # Berkeley packet filter # USB support device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface device usb # USB Bus (required) device ugen # Generic device ums # Mouse device pcm /home/kevinb/crash# EXIT EXIT: Command not found. /home/kevinb/crash# exit exit Script done on Mon Aug 23 16:21:18 2004 --=-vpYO8kooTC9NnTLQkRkK-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 20:50:58 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 19D2516A4CE for ; Mon, 23 Aug 2004 20:50:58 +0000 (GMT) Received: from mindfields.energyhq.es.eu.org (73.Red-213-97-200.pooles.rima-tde.net [213.97.200.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEF6743D46 for ; Mon, 23 Aug 2004 20:50:50 +0000 (GMT) (envelope-from flynn@energyhq.es.eu.org) Received: from scienide.energyhq.es.eu.org (scienide.energyhq.es.eu.org [192.168.100.1]) by mindfields.energyhq.es.eu.org (Postfix) with SMTP id CEFA036835; Mon, 23 Aug 2004 22:50:43 +0200 (CEST) Date: Mon, 23 Aug 2004 22:50:38 +0200 From: Miguel Mendez To: Simon Barner Message-Id: <20040823225038.5fb6b392.flynn@energyhq.es.eu.org> In-Reply-To: <20040823200339.GA5717@zi025.glhnet.mhn.de> References: <20040823210324.567ea3a3.flynn@energyhq.es.eu.org> <20040823200339.GA5717@zi025.glhnet.mhn.de> X-Mailer: Sylpheed version 0.9.12-gtk2-20040622 (GTK+ 2.4.7; i386-portbld-freebsd5.2.1) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="Signature=_Mon__23_Aug_2004_22_50_38_+0200__FBPmOd.yxC=./Nq" cc: freebsd-hackers@freebsd.org Subject: Re: valgrind on 5.3BETA1 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, 23 Aug 2004 20:50:58 -0000 --Signature=_Mon__23_Aug_2004_22_50_38_+0200__FBPmOd.yxC=./Nq Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7bit On Mon, 23 Aug 2004 22:03:39 +0200 Simon Barner wrote: Hi, > there is a closed problem report in the database: > http://www.freebsd.org/cgi/query-pr.cgi?pr=68992 > > At the end of that PR, there is a patch that seems to work around > the problem. Could you please test it? Interesting. However, it looks like that patch was already incorporated into valgrind (the patch is for version 337, the port has 352), but it can be a good start to get an idea of what to look for. Cheers, -- Miguel Mendez http://www.energyhq.es.eu.org PGP Key: 0xDC8514F1 Note: All HTML and non-english mail goes to /dev/null --Signature=_Mon__23_Aug_2004_22_50_38_+0200__FBPmOd.yxC=./Nq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQFBKlihnLctrNyFFPERAq/DAJwJmOuJeVqVPwdxpEQ8DB3wJrLu2QCeIJhD 8kBOw54puUZJITo7skf8OQg= =SIxb -----END PGP SIGNATURE----- --Signature=_Mon__23_Aug_2004_22_50_38_+0200__FBPmOd.yxC=./Nq-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 21: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 DEBC516A4CE for ; Mon, 23 Aug 2004 21:22:28 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91F8843D49 for ; Mon, 23 Aug 2004 21:22:28 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.11/8.12.11) id i7NLLd4w022777; Mon, 23 Aug 2004 16:21:39 -0500 (CDT) (envelope-from dan) Date: Mon, 23 Aug 2004 16:21:39 -0500 From: Dan Nelson To: Simon Barner Message-ID: <20040823212138.GB36920@dan.emsphone.com> References: <20040823210324.567ea3a3.flynn@energyhq.es.eu.org> <20040823200339.GA5717@zi025.glhnet.mhn.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <20040823200339.GA5717@zi025.glhnet.mhn.de> X-OS: FreeBSD 5.3-BETA1 X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: valgrind on 5.3BETA1 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, 23 Aug 2004 21:22:29 -0000 --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In the last episode (Aug 23), Simon Barner said: > Miguel Mendez wrote: > > Is anybody using valgrind on 5.3BETA1 or newer? I've been using it > > for a while on 5.2.1 without any problems, until I upgraded my > > system to RELENG_5. The program works but it never exits after > > running your program, it gets stuck into `umtx' state indefinitely. > > This is happening with both plain jane valgrind and > > valgrind-snapshot ports. Is this already a known issue? > > Hi, > > there is a closed problem report in the database: > http://www.freebsd.org/cgi/query-pr.cgi?pr=68992 > > At the end of that PR, there is a patch that seems to work around the > problem. Could you please test it? That patch looks like it's already in the valgrind-snapshot-352 port, and it still hangs on me. Adding some debugging to the code that calls the umtx syscalls give me: $ valgrind --skin=memcheck date ==14620== Memcheck, a memory error detector for x86-linux. ==14620== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward. ==14620== Using valgrind-2.1.2.CVS, a program supervision framework for x86-linux. ==14620== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward. ==14620== Locking#1 mutex 0x0/0x0 ==14620== Done 0x187B8/0x187B8 ==14620== For more details, rerun with: -v ==14620== Mon Aug 23 16:17:01 CDT 2004 ==14620== ==14620== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==14620== malloc/free: in use at exit: 4096 bytes in 1 blocks. ==14620== malloc/free: 1 allocs, 0 frees, 4096 bytes allocated. ==14620== For a detailed leak analysis, rerun with: --leak-check=yes ==14620== For counts of detected errors, rerun with: -v ==14620== Unlocking mutex 0x187B9/0x187B9 ==14620== Done 0x187B9/0x187B9 ==14620== Locking#2 mutex 0x187B9/0x187B9 ( send SIGKILL from another vty here ) zsh: 14620 killed valgrind --skin=memcheck date There doesn't seem to be any docs on these umtx syscalls so I don't know what the expected behaviour is supposed to be. I printed the pointer and the contents of the u_owner member before and after the syscall. -- Dan Nelson dnelson@allantgroup.com --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-dn-umtxdebug --- coregrind/vg_proxylwp.c~ Mon Aug 23 15:47:33 2004 +++ coregrind/vg_proxylwp.c Mon Aug 23 15:48:42 2004 @@ -596,6 +596,8 @@ static const vki_kstack_t ss = { .ss_flags = VKI_SS_DISABLE }; #if __FreeBSD__ == 5 + VG_(message)(Vg_UserMsg, "Locking#1 mutex %p/%p", px->mutex, px->mutex.u_owner); VG_(do_syscall)(__NR__umtx_lock, &px->mutex); + VG_(message)(Vg_UserMsg, "Done %p/%p", px->mutex, px->mutex.u_owner); px->mutex.u_owner |= UMTX_CONTESTED; VG_(do_syscall)(__NR_thr_self, &px->lwp); @@ -943,6 +944,8 @@ px->exitcode = ret; #if __FreeBSD__ == 5 + VG_(message)(Vg_UserMsg, "Unlocking mutex %p/%p", px->mutex, px->mutex.u_owner); ret = VG_(do_syscall)(__NR__umtx_unlock, &px->mutex); + VG_(message)(Vg_UserMsg, "Done %p/%p", px->mutex, px->mutex.u_owner); if (use_rfork) VG_(do_syscall)(__NR_exit, 0); @@ -1171,7 +1173,11 @@ #if __FreeBSD__ == 5 if (block) { if(proxy->lwp != 0) + { + VG_(message)(Vg_UserMsg, "Locking#2 mutex %p/%p", proxy->mutex, proxy->mutex.u_owner); VG_(do_syscall)(__NR__umtx_lock, &proxy->mutex); + VG_(message)(Vg_UserMsg, "Done %p/%p", proxy->mutex, proxy->mutex.u_owner); + } if (status) *status = proxy->exitcode; --RnlQjJ0d97Da+TV1-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 21:26: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 7688116A4CE; Mon, 23 Aug 2004 21:26:18 +0000 (GMT) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id C905B43D45; Mon, 23 Aug 2004 21:26:17 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (m3bgacuyk9vlv89t@thor.farley.org [IPv6:2002:4340:5fcd:1::5]) by mail.farley.org (8.12.11/8.12.11) with ESMTP id i7NLQERf078568; Mon, 23 Aug 2004 16:26:14 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (localhost [127.0.0.1]) by thor.farley.org (8.12.11/8.12.11) with ESMTP id i7NLQEBm003090; Mon, 23 Aug 2004 16:26:14 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from localhost (sean@localhost)i7NLQDW2003087; Mon, 23 Aug 2004 16:26:14 -0500 (CDT) (envelope-from sean-freebsd@farley.org) X-Authentication-Warning: thor.farley.org: sean owned process doing -bs Date: Mon, 23 Aug 2004 16:26:13 -0500 (CDT) From: Sean Farley X-X-Sender: sean@thor.farley.org To: Kevin Brunelle In-Reply-To: <1093293236.618.12.camel@fnord.quux.edu> Message-ID: <20040823161337.V715@thor.farley.org> References: <1093141197.643.28.camel@fnord.quux.edu> <1093188163.2100.4.camel@fnord.quux.edu> <1093293236.618.12.camel@fnord.quux.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-hackers@freebsd.org cc: freebsd-current@freebsd.org Subject: Re: Fatal trap 12: page fault while in kernel mode 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, 23 Aug 2004 21:26:18 -0000 On Mon, 23 Aug 2004, Kevin Brunelle wrote: > Alright, this is driving me nuts. For a little while there I could > not get the system to panic -- it would spontaniously reboot when > running a GL program instead of panic. This afternoon it finally > panic'd (who would think that would be something I want to see but it > was). If this is how I got most of my panics, this little script running in two different xterms helped decrease the time to panic. It got my system to panic a lot with the older nvidia drivers. #!/usr/local/bin/zsh # Try with and without. export __GL_SINGLE_THREADED=1 /bin/rm -f glxinfo.core while [ 1 = 1 ]; do /usr/X11R6/bin/glxinfo >& /dev/null if [ -e glxinfo.core ]; then echo "Core found." /bin/rm -f glxinfo.core fi done This always helped get my system unstable on 4-STABLE rather quickly. I think it was the issue of running two or more GL programs at the same time that caused or increased the problem. Are you using the latest nvidia drivers? > The error this time was a double fault (are we playing tennis?). My > original issue was with a page fault in kernel mode. And my original > problem also was related to a different function. The function this > time is . My panics were fairly random. > Take a look at all those sig-11s. I would suspect bad memory but I > ran memtest86+ on this machine less than a week ago and everything was > fine -- not even a whiff of a problem. I caused this panic by running > another gl application and I feel it is related to my orginal problem. I also ran memtest86 for over a day without finding fault in the memory. The sad thing is that almost any type of bad hardware can cause stability issues. At least this is what I was told. Maybe the caps on your system have started going bad? > Another thing that interested me is that the kernel dump seems > "corrupted" or incomplete... does the line "---Can't read userspace > from dump, or kernel process---" possibly imply that I did not get a > good dump at the time of the panic? > > If anyone has any ideas about what to fix I would love to hear them. > I am tempted to change a few things myself that might be an issue (for > example, removing the FreeBSD agp which nvidia complains about in my > dmesg -- and also upgrading to 3-Beta1 ... so at least my kernel > panics will relate to making that system better). But, until I know > that this is a dead end and no one wants to see anything, I am not > touching anything. I don't want to ruin the chances of this being a > real bug and it not being fixed because I change something that just > hides it. You should not be mixing the FreeBSD AGP and the nvidia AGP together. Choose one or the other. > If you want me to get any information from the dump or try anything > please let me know. You may have to tell me how to go about doing > stuff with gdb (I am not very experienced with its advanced features) > but I am willing to learn and do what I can. I have my own panic on 4-STABLE which I just reported in freebsd-stable: http://lists.freebsd.org/pipermail/freebsd-stable/2004-August/008530.html Would you like to trade? :) Sean ----------------------- sean-freebsd@farley.org From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 21:26: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 4D6D516A4EA for ; Mon, 23 Aug 2004 21:26:31 +0000 (GMT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FFDE43D1F for ; Mon, 23 Aug 2004 21:26:31 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 18743 invoked from network); 23 Aug 2004 21:26:30 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 23 Aug 2004 21:26:28 -0000 Received: from [10.50.40.208] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i7NLQHeS089422; Mon, 23 Aug 2004 17:26:21 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Mon, 23 Aug 2004 15:13:13 -0400 User-Agent: KMail/1.6.2 References: <412652AA.5020308@coverity.com> <20040821131924.U34847@mp2.macomnet.net> <20040821150427.O35076@mp2.macomnet.net> In-Reply-To: <20040821150427.O35076@mp2.macomnet.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408231513.14014.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: hackers@FreeBSD.org cc: Ted Unangst Subject: Re: off by one bounds 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, 23 Aug 2004 21:26:31 -0000 On Saturday 21 August 2004 07:07 am, Maxim Konovalov wrote: > On Sat, 21 Aug 2004, 13:19+0400, Maxim Konovalov wrote: > > On Sat, 21 Aug 2004, 05:00-0400, Skip Ford wrote: > > > Maxim Konovalov wrote: > > > > On Fri, 20 Aug 2004, 12:36-0700, Ted Unangst wrote: > > > >> errors in freebsd 4.10 found by Coverity's analysis. > > > >> > > > >> ip_icmp.c:ip_next_mtu, i == sizeof, dir >= 0 > > > > > > > > If i == sizeof then mtutab[i] == 0 > > > > > > If "i == sizeof" then mtutab[i] is out of bounds, off by one. > > > There is no mtutab[sizeof mtutab / sizeof mtutab[0]]. > > > > > > This isn't specific to RELENG_4 > > After the second thought I still think it is not a error. mtu is > always >= than the minimal value in mtutab[] that is why i is always > less than (sizeof mtutab) / sizeof mtutab[0]). What do you think? It's better to fix the code so it doesn't break on unexpected inputs. :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 21:26: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 5058916A4EB for ; Mon, 23 Aug 2004 21:26:31 +0000 (GMT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2080243D41 for ; Mon, 23 Aug 2004 21:26:31 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 18743 invoked from network); 23 Aug 2004 21:26:30 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 23 Aug 2004 21:26:28 -0000 Received: from [10.50.40.208] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i7NLQHeS089422; Mon, 23 Aug 2004 17:26:21 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Mon, 23 Aug 2004 15:13:13 -0400 User-Agent: KMail/1.6.2 References: <412652AA.5020308@coverity.com> <20040821131924.U34847@mp2.macomnet.net> <20040821150427.O35076@mp2.macomnet.net> In-Reply-To: <20040821150427.O35076@mp2.macomnet.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408231513.14014.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: hackers@FreeBSD.org cc: Ted Unangst Subject: Re: off by one bounds 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, 23 Aug 2004 21:26:31 -0000 On Saturday 21 August 2004 07:07 am, Maxim Konovalov wrote: > On Sat, 21 Aug 2004, 13:19+0400, Maxim Konovalov wrote: > > On Sat, 21 Aug 2004, 05:00-0400, Skip Ford wrote: > > > Maxim Konovalov wrote: > > > > On Fri, 20 Aug 2004, 12:36-0700, Ted Unangst wrote: > > > >> errors in freebsd 4.10 found by Coverity's analysis. > > > >> > > > >> ip_icmp.c:ip_next_mtu, i == sizeof, dir >= 0 > > > > > > > > If i == sizeof then mtutab[i] == 0 > > > > > > If "i == sizeof" then mtutab[i] is out of bounds, off by one. > > > There is no mtutab[sizeof mtutab / sizeof mtutab[0]]. > > > > > > This isn't specific to RELENG_4 > > After the second thought I still think it is not a error. mtu is > always >= than the minimal value in mtutab[] that is why i is always > less than (sizeof mtutab) / sizeof mtutab[0]). What do you think? It's better to fix the code so it doesn't break on unexpected inputs. :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 21:31: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 176D716A4CE for ; Mon, 23 Aug 2004 21:31:35 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id C071C43D8A for ; Mon, 23 Aug 2004 21:31:34 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.11/8.12.11) id i7NLVXeH056503; Mon, 23 Aug 2004 16:31:33 -0500 (CDT) (envelope-from dan) Date: Mon, 23 Aug 2004 16:31:33 -0500 From: Dan Nelson To: Simon Barner Message-ID: <20040823213133.GC36920@dan.emsphone.com> References: <20040823210324.567ea3a3.flynn@energyhq.es.eu.org> <20040823200339.GA5717@zi025.glhnet.mhn.de> <20040823212138.GB36920@dan.emsphone.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="mojUlQ0s9EVzWg2t" Content-Disposition: inline In-Reply-To: <20040823212138.GB36920@dan.emsphone.com> X-OS: FreeBSD 5.3-BETA1 X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: valgrind on 5.3BETA1 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, 23 Aug 2004 21:31:35 -0000 --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In the last episode (Aug 23), Dan Nelson said: > --- coregrind/vg_proxylwp.c~ Mon Aug 23 15:47:33 2004 > +++ coregrind/vg_proxylwp.c Mon Aug 23 15:48:42 2004 And of course I screwed up the patch. The first argument of each print call should be printing &px->mutex, not px->mutex. Here's better output: ==52845== Memcheck, a memory error detector for x86-linux. ==52845== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward. ==52845== Using valgrind-2.1.2.CVS, a program supervision framework for x86-linux. ==52845== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward. ==52845== Locking#1 mutex 0xB82E4F78/0x0 ==52845== Done 0xB82E4F78/0x18820 ==52845== For more details, rerun with: -v ==52845== Mon Aug 23 16:30:27 CDT 2004 ==52845== ==52845== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==52845== malloc/free: in use at exit: 4096 bytes in 1 blocks. ==52845== malloc/free: 1 allocs, 0 frees, 4096 bytes allocated. ==52845== For a detailed leak analysis, rerun with: --leak-check=yes ==52845== For counts of detected errors, rerun with: -v ==52845== Unlocking mutex 0xB82E4F78/0x18821 ==52845== Done 0xB82E4F78/0x18821 ==52845== Locking#2 mutex 0xB82E4F78/0x18821 ( send SIGKILL here ) zsh: 52845 killed valgrind --skin=memcheck date -- Dan Nelson dnelson@allantgroup.com --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-dn-umtxdebug --- coregrind/vg_proxylwp.c~ Mon Aug 23 15:47:33 2004 +++ coregrind/vg_proxylwp.c Mon Aug 23 15:48:42 2004 @@ -596,6 +596,8 @@ static const vki_kstack_t ss = { .ss_flags = VKI_SS_DISABLE }; #if __FreeBSD__ == 5 + VG_(message)(Vg_UserMsg, "Locking#1 mutex %p/%p", &px->mutex, px->mutex.u_owner); VG_(do_syscall)(__NR__umtx_lock, &px->mutex); + VG_(message)(Vg_UserMsg, "Done %p/%p", &px->mutex, px->mutex.u_owner); px->mutex.u_owner |= UMTX_CONTESTED; VG_(do_syscall)(__NR_thr_self, &px->lwp); @@ -943,6 +944,8 @@ px->exitcode = ret; #if __FreeBSD__ == 5 + VG_(message)(Vg_UserMsg, "Unlocking mutex %p/%p", &px->mutex, px->mutex.u_owner); ret = VG_(do_syscall)(__NR__umtx_unlock, &px->mutex); + VG_(message)(Vg_UserMsg, "Done %p/%p", &px->mutex, px->mutex.u_owner); if (use_rfork) VG_(do_syscall)(__NR_exit, 0); @@ -1171,7 +1173,11 @@ #if __FreeBSD__ == 5 if (block) { if(proxy->lwp != 0) + { + VG_(message)(Vg_UserMsg, "Locking#2 mutex %p/%p", &proxy->mutex, proxy->mutex.u_owner); VG_(do_syscall)(__NR__umtx_lock, &proxy->mutex); + VG_(message)(Vg_UserMsg, "Done %p/%p", &proxy->mutex, proxy->mutex.u_owner); + } if (status) *status = proxy->exitcode; --mojUlQ0s9EVzWg2t-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 22:13: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 361D816A4CE; Mon, 23 Aug 2004 22:13:56 +0000 (GMT) Received: from imf18aec.mail.bellsouth.net (imf18aec.mail.bellsouth.net [205.152.59.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFB0F43D1D; Mon, 23 Aug 2004 22:13:55 +0000 (GMT) (envelope-from kruptos@bellsouth.net) Received: from [172.23.23.23] ([67.35.154.55]) by imf18aec.mail.bellsouth.netESMTP <20040823221355.NULJ1792.imf18aec.mail.bellsouth.net@[172.23.23.23]>; Mon, 23 Aug 2004 18:13:55 -0400 From: Kevin Brunelle To: Sean Farley In-Reply-To: <20040823161337.V715@thor.farley.org> References: <1093141197.643.28.camel@fnord.quux.edu> <1093188163.2100.4.camel@fnord.quux.edu> <1093293236.618.12.camel@fnord.quux.edu> <20040823161337.V715@thor.farley.org> Content-Type: text/plain Message-Id: <1093299334.618.30.camel@fnord.quux.edu> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 23 Aug 2004 18:15:34 -0400 Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: freebsd-current@freebsd.org Subject: Re: Fatal trap 12: page fault while in kernel mode 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, 23 Aug 2004 22:13:56 -0000 > If this is how I got most of my panics, this little script running in > two different xterms helped decrease the time to panic. It got my > system to panic a lot with the older nvidia drivers. [script trimmed out] > This always helped get my system unstable on 4-STABLE rather quickly. I > think it was the issue of running two or more GL programs at the same > time that caused or increased the problem. lol, I might try that. Although I really don't need to go that far. Lately, I have been able to spontaniously reboot by running five GL applications at once. Which isn't pleasant but doesn't concern me too much. Each time I've had a panic there has been only one gl application running... and lately all GL programs are causing this issue. > Are you using the latest nvidia drivers? As a matter of fact, that is what I think caused the problem. I just upgraded to the latest drivers on the 19th... right before I had these problems. That combined with the fact that all of these issues can be consistently caused by running gl programs gives me strong cause to suspect it. > You should not be mixing the FreeBSD AGP and the nvidia AGP together. > Choose one or the other. Yes, I suspect this might be part of the issue. I don't remember seeing this message before the new driver was installed. But I do know that the old kernel had it loaded (it was hard coded with the configuration file). I think the driver might have changed the way it handled the presence of both AGPs. > I have my own panic on 4-STABLE which I just reported in freebsd-stable: > http://lists.freebsd.org/pipermail/freebsd-stable/2004-August/008530.html > Would you like to trade? :) lol, I would love to... if I thought I could help. But I am still learning as much as I can about the kernel... nowhere near the level required to help. Kevin -- "Down with disease, up before the dawn. A thousand barefoot children, dancin? on my lawn" -Phish "Down with Disease" From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 17:18:14 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 76AE216A4CE for ; Mon, 23 Aug 2004 17:18:14 +0000 (GMT) Received: from coverity.dreamhost.com (coverity.dreamhost.com [66.33.192.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60F2243D2D for ; Mon, 23 Aug 2004 17:18:14 +0000 (GMT) (envelope-from tedu@coverity.com) Received: from coverity.com (dsl093-171-098.sfo4.dsl.speakeasy.net [66.93.171.98]) by coverity.dreamhost.com (Postfix) with ESMTP id 0974190888; Mon, 23 Aug 2004 10:18:14 -0700 (PDT) Message-ID: <412A258A.3060100@coverity.com> Date: Mon, 23 Aug 2004 10:12:42 -0700 From: Ted Unangst User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "M. Warner Losh" References: <41263E77.5040500@coverity.com> <20040822.183041.128046524.imp@bsdimp.com> In-Reply-To: <20040822.183041.128046524.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 24 Aug 2004 12:03:13 +0000 cc: hackers@freebsd.org Subject: Re: use after free bugs 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, 23 Aug 2004 17:18:14 -0000 M. Warner Losh wrote: > In message: <41263E77.5040500@coverity.com> > Ted Unangst writes: > : aha_isa.c: aha_isa_attach: aha_free free "aha", can't use it > : afterwards, lots of examples. > > aha_free doesn't actually free the aha, it just tears down the dma for > the device. So the sturct aha_softc * that's passed to it is safe to > use after calls to aha_free. > > void > aha_free(struct aha_softc *aha) > { > switch (aha->init_level) { > default: > case 8: > { > struct sg_map_node *sg_map; > > while ((sg_map = SLIST_FIRST(&aha->sg_maps))!= NULL) { > SLIST_REMOVE_HEAD(&aha->sg_maps, links); > bus_dmamap_unload(aha->sg_dmat, sg_map->sg_dmamap); > bus_dmamem_free(aha->sg_dmat, sg_map->sg_vaddr, > sg_map->sg_dmamap); > free(sg_map, M_DEVBUF); > } > bus_dma_tag_destroy(aha->sg_dmat); > } > case 7: > bus_dmamap_unload(aha->ccb_dmat, aha->ccb_dmamap); > case 6: > bus_dmamap_destroy(aha->ccb_dmat, aha->ccb_dmamap); > bus_dmamem_free(aha->ccb_dmat, aha->aha_ccb_array, > aha->ccb_dmamap); > case 5: > bus_dma_tag_destroy(aha->ccb_dmat); > case 4: > bus_dmamap_unload(aha->mailbox_dmat, aha->mailbox_dmamap); > case 3: > bus_dmamem_free(aha->mailbox_dmat, aha->in_boxes, > aha->mailbox_dmamap); > bus_dmamap_destroy(aha->mailbox_dmat, aha->mailbox_dmamap); > case 2: > bus_dma_tag_destroy(aha->buffer_dmat); > case 1: > bus_dma_tag_destroy(aha->mailbox_dmat); > case 0: > break; > } > } > > so all the calls to aha_free then the freeing of resoruces are OK. ah, look at the 4.x sources though. it does free aha. From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 17:28: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 0CC4016A4CE for ; Mon, 23 Aug 2004 17:28:40 +0000 (GMT) Received: from coverity.dreamhost.com (coverity.dreamhost.com [66.33.192.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0216943D1F for ; Mon, 23 Aug 2004 17:28:40 +0000 (GMT) (envelope-from tedu@coverity.com) Received: from coverity.com (dsl093-171-098.sfo4.dsl.speakeasy.net [66.93.171.98]) by coverity.dreamhost.com (Postfix) with ESMTP id 74A9E90888; Mon, 23 Aug 2004 10:28:39 -0700 (PDT) Message-ID: <412A27FB.8030207@coverity.com> Date: Mon, 23 Aug 2004 10:23:07 -0700 From: Ted Unangst User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Julian Elischer References: <41263E77.5040500@coverity.com> <4126F9B3.8050900@elischer.org> In-Reply-To: <4126F9B3.8050900@elischer.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 24 Aug 2004 12:03:13 +0000 cc: hackers@freebsd.org Subject: Re: use after free bugs 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, 23 Aug 2004 17:28:40 -0000 Julian Elischer wrote: > Ted Unangst wrote: > >> these are results from running Coverity's analysis over Freebsd 4.10 >> kernel. >> two improper loops: >> if_ef.c:566 and atapi-all.c >> >> ng_socket.c: possible double free of resp 815 and 870, depending on >> caller context. is this possible? >> > > I'm not seeing it.. > > Can you show the lines in the version that is being examined? > (So I can be sure I'm looking at the right code) > (and how do I interpret the above report? 815 and 870 are freeing > different things.) sorry, typo. the file is ng_ksocket.c. case NGM_KSOCKET_GETOPT: if (error = sogetoopt())) FREE(resp, M_NETGRAPH); ... if (rptr) *rptr = resp; else if (resp) FREE(resp, M_NETGRAPH); i'm not sure if rptr is tied to the typecookie or not. From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 19:29:46 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 13BA316A4CE for ; Tue, 24 Aug 2004 19:29:46 +0000 (GMT) Received: from mailout1.informatik.tu-muenchen.de (mailout1.informatik.tu-muenchen.de [131.159.0.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDA1143D49 for ; Tue, 24 Aug 2004 19:29:45 +0000 (GMT) (envelope-from barner@in.tum.de) Received: by zi025.glhnet.mhn.de (Postfix, from userid 1000) id EBAB9C1B9; Tue, 24 Aug 2004 21:29:50 +0200 (CEST) Date: Tue, 24 Aug 2004 21:29:50 +0200 From: Simon Barner To: Dan Nelson Message-ID: <20040824192950.GA78484@zi025.glhnet.mhn.de> References: <20040823210324.567ea3a3.flynn@energyhq.es.eu.org> <20040823200339.GA5717@zi025.glhnet.mhn.de> <20040823212138.GB36920@dan.emsphone.com> <20040823213133.GC36920@dan.emsphone.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: <20040823213133.GC36920@dan.emsphone.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new/sophie/sophos at mailrelay1.informatik.tu-muenchen.de cc: freebsd-hackers@freebsd.org Subject: Re: valgrind on 5.3BETA1 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, 24 Aug 2004 19:29:46 -0000 --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > --- coregrind/vg_proxylwp.c~ Mon Aug 23 15:47:33 2004 > +++ coregrind/vg_proxylwp.c Mon Aug 23 15:48:42 2004 > @@ -596,6 +596,8 @@ > static const vki_kstack_t ss =3D { .ss_flags =3D VKI_SS_DISABLE }; > =20 > #if __FreeBSD__ =3D=3D 5 > + VG_(message)(Vg_UserMsg, "Locking#1 mutex %p/%p", &px->mutex, px->mut= ex.u_owner); > VG_(do_syscall)(__NR__umtx_lock, &px->mutex); > + VG_(message)(Vg_UserMsg, "Done %p/%p", &px->mutex, px->mutex.u_owner); > px->mutex.u_owner |=3D UMTX_CONTESTED; > VG_(do_syscall)(__NR_thr_self, &px->lwp); > @@ -943,6 +944,8 @@ > px->exitcode =3D ret; > =20 > #if __FreeBSD__ =3D=3D 5 > + VG_(message)(Vg_UserMsg, "Unlocking mutex %p/%p", &px->mutex, px->mut= ex.u_owner); > ret =3D VG_(do_syscall)(__NR__umtx_unlock, &px->mutex); > + VG_(message)(Vg_UserMsg, "Done %p/%p", &px->mutex, px->mutex.u_owner); > if (use_rfork) > VG_(do_syscall)(__NR_exit, 0); > @@ -1171,7 +1173,11 @@ > #if __FreeBSD__ =3D=3D 5 > if (block) { > if(proxy->lwp !=3D 0) > + { > + VG_(message)(Vg_UserMsg, "Locking#2 mutex %p/%p", &proxy->mutex, pro= xy->mutex.u_owner); > VG_(do_syscall)(__NR__umtx_lock, &proxy->mutex); ^^^^^^^^^^^^^^^^ Commenting out this lock operation works for me. Did you notice that there are two places where the lock is acquired, and only one, where it is released? Perhaps the right solution would be to add another unlock operation...? =20 Of course, I have no idea of valgrind internals, threading implementation on FreeBSD, umtx, etc. ;-D > + VG_(message)(Vg_UserMsg, "Done %p/%p", &proxy->mutex, proxy->mutex.u= _owner); > + } > =20 > if (status) > *status =3D proxy->exitcode; --T4sUOijqQbZv57TR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQFBK5cuCkn+/eutqCoRAjEeAKDfB4Fo/cfZFKCJlGCCmxq4NKn/UgCdEOhe FIEqRbpiDmuWZ6tzQ8wJves= =2hJm -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 21:33:46 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 EEE0016A4CF for ; Tue, 24 Aug 2004 21:33:46 +0000 (GMT) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 428A343D3F for ; Tue, 24 Aug 2004 21:33:46 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (nkkcjvwmy6h5aalp@thor.farley.org [IPv6:2002:4340:5fcd:1::5]) by mail.farley.org (8.12.11/8.12.11) with ESMTP id i7OLXhvR094345 for ; Tue, 24 Aug 2004 16:33:43 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (localhost [127.0.0.1]) by thor.farley.org (8.12.11/8.12.11) with ESMTP id i7OLXh6d042010 for ; Tue, 24 Aug 2004 16:33:43 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from localhost (sean@localhost)i7OLXhU6042007 for ; Tue, 24 Aug 2004 16:33:43 -0500 (CDT) (envelope-from sean-freebsd@farley.org) X-Authentication-Warning: thor.farley.org: sean owned process doing -bs Date: Tue, 24 Aug 2004 16:33:42 -0500 (CDT) From: Sean Farley X-X-Sender: sean@thor.farley.org To: freebsd-hackers@freebsd.org Message-ID: <20040824163214.G15868@thor.farley.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: vm_page_remove() panic 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, 24 Aug 2004 21:33:47 -0000 This e-mail was previously posted on freebsd-stable. I recently received a panic in vm_page_remove() which got me looking for similar panics in the past for other people. From this search, I came across a change that was made to fix a similar problem and was quickly reverted afterwards. My system experienced panics in the past, but I may or may not have fixed it. More recently my system has been freezing providing no clue for the reason. Fortunately, I was on the console when it died as opposed to within X, although X was running with some applications. I believe this allowed the kernel to at least fall into DDB. Fix: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/i386/pmap.c.diff?r1=1.250.2.19&r2=1.250.2.20&only_with_tag=RELENG_4&f=h Regression?: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/i386/pmap.c.diff?r1=1.250.2.20&r2=1.250.2.21&only_with_tag=RELENG_4&f=h Mention of patch to remove the change: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=bilo8r%241vbn%241%40FreeBSD.csie.NCTU.edu.tw&rnum=14 Panic (function trace) as scribbled from DDB: vm_page_remove vm_page_free_toq vm_page_alloc vm_hold_load_pages allocbuf geteblk bwrite vop_stdbwrite vop_defaultop spec_vnoperate ufs_vnoperatespec bawrite softdep_fsync_mountdev ffs_fsync sched_sync fork_trampoline Uname: FreeBSD thor.farley.org 4.10-STABLE FreeBSD 4.10-STABLE #2: Tue Aug 3 17:37:38 CDT 2004 root@thor.farley.org:/usr/obj/usr/src/sys/THOR i386 Kernel message some time (longer than several minutes but unknown): Aug 21 18:46:36 thor /kernel: handle_workitem_freeblocks: block count While RELENG_4 and RELENG_5 are fairly close in that section of code, RELENG_5 has the assignment of pte within the for-loop, uses pmap_pte_quick() instead of pmap_pte() and performs a slightly different check against pte. memtest86 has been run on this system for longer than a day without any problems. Does anyone know if it was reverted back on purpose? Should it be more similar to RELENG_5. I am fairly good at C; I just do not know the kernel all that well. :) Sean ----------------------- sean-freebsd@farley.org From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 25 03:55:46 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 3FE7B16A4CE for ; Wed, 25 Aug 2004 03:55:46 +0000 (GMT) Received: from webmail-outgoing.us4.outblaze.com (webmail-outgoing.us4.outblaze.com [205.158.62.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF9D943D6A for ; Wed, 25 Aug 2004 03:55:45 +0000 (GMT) (envelope-from mark.manning@fastermail.com) Received: from wfilter.us4.outblaze.com (wfilter.us4.outblaze.com [205.158.62.180])1BDCC18011FE for ; Wed, 25 Aug 2004 03:55:45 +0000 (GMT) X-OB-Received: from unknown (205.158.62.132) by wfilter.us4.outblaze.com; 25 Aug 2004 03:55:44 -0000 Received: by ws5-2.us4.outblaze.com (Postfix, from userid 1001) id E65FC4160A1; Wed, 25 Aug 2004 03:55:44 +0000 (GMT) Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) Received: from [216.110.82.59] by ws5-2.us4.outblaze.com with http for mark.manning@fastermail.com; Tue, 24 Aug 2004 22:55:44 -0500 From: "mark manning" To: hackers@freebsd.org Date: Tue, 24 Aug 2004 22:55:44 -0500 X-Originating-Ip: 216.110.82.59 X-Originating-Server: ws5-2.us4.outblaze.com Message-Id: <20040825035544.E65FC4160A1@ws5-2.us4.outblaze.com> X-Mailman-Approved-At: Wed, 25 Aug 2004 11:58:39 +0000 cc: samy@kerneled.org Subject: Problems with tiocget/seta 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, 25 Aug 2004 03:55:46 -0000 Some background... For the past three years I have been developing a Forth compiler for Linux. The kernel to my compiler is written in 100% pure assembler using NASM. The object code produced is almost identical to what the Forth compiler itself would produce were it were used to compile its own sources (some day). I accomplish this via liberal use of NASM macros. All I/O etc is accomplished using Linux syscalls, no external libraries are referenced. Linux is my BIOS :) The problem... I consider Isforth to be a worthy project, worthy enough to be ported to other processors and other operating systems. The PPC port is being done by a friend of mine and is almost complete. The FreeBSD port has been "nearly complete" for about EIGHT months. I am currenty at a complete loss as to how to fix the problem (even though i think i know what it is!) :/ One of the things that my compiler has to do is switch stdin out of canoniacal mode and switch off echo. In Linux the ioctl is working - in fbsd its not. Im almost posative that i am passing correct values to the syscall yet stdin is still buffered after the call and is still echoing. I would truely love to get this up and running in FBSD but am in dire need of help. Im told that if anyone can help me YOU guys can (blame samy for getting you into this :)... My Linux project page is at isforth.clss.net and I have posted the fbsd sources to... http://isforth.clss.net/isforth-1.15b-fbsd.tgz ...The relavant sources would be the syscalls.1 file and the bottom two or three functions in the io.1 file (if anyone asks why i used .1 its on my web page but these file extensions will disappear once im metacompiling :) These two files can be found in the src/kernel subdirectory (extracting the tgz creats a directory for all files as it should) Thanx in advance... Mark I Manning IV (aka I440r in #forth on irc.freenode.net) If you sit down at a poker game and don't see a sucker..... Get UP! You're the sucker! -- _______________________________________________ Get your free email from http://fastermail.com Powered by Outblaze From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 25 07:09: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 9B2C216A4CE for ; Wed, 25 Aug 2004 07:09:23 +0000 (GMT) Received: from hotmail.com (bay17-dav11.bay17.hotmail.com [64.4.43.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EBA343D3F for ; Wed, 25 Aug 2004 07:09:23 +0000 (GMT) (envelope-from yangshazhou@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 25 Aug 2004 00:09:22 -0700 Received: from 61.187.16.2 by bay17-dav11.bay17.hotmail.com with DAV; Wed, 25 Aug 2004 07:09:22 +0000 X-Originating-IP: [61.187.16.2] X-Originating-Email: [yangshazhou@hotmail.com] X-Sender: yangshazhou@hotmail.com From: To: Date: Wed, 25 Aug 2004 15:06:51 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: X-OriginalArrivalTime: 25 Aug 2004 07:09:22.0718 (UTC) FILETIME=[729F8BE0:01C48A72] X-Mailman-Approved-At: Wed, 25 Aug 2004 11:58:39 +0000 Subject: yield() in kernel CAN'T yield control for MOD_LOAD thread 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, 25 Aug 2004 07:09:23 -0000 Hi all, This problem delay me for quite a long time. I've built two klds, I'd like to see the result one's running to the other's. In one kld's MOD_LOAD subroutine, I make a long 'for' loop, in which it DELAY(1000) and then call yield(curthread,NULL). When the module was loaded by kldload, the system failed to response until the loop quit. The loop seems like that: for(i=0;i<8000;i++){ ...... DELAY(1000); yield(curthread,NULL); } My system is 5.2.1-release. Thanks. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 25 14:16:15 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 8DBBE16A4CE for ; Wed, 25 Aug 2004 14:16:15 +0000 (GMT) Received: from vsmtp2.tin.it (vsmtp2alice.tin.it [212.216.176.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id D267F43D1F for ; Wed, 25 Aug 2004 14:16:14 +0000 (GMT) (envelope-from gerarra@tin.it) Received: from ims3a.cp.tin.it (192.168.70.103) by vsmtp2.tin.it (7.0.027) id 40DB55F500B0605F for freebsd-hackers@freebsd.org; Wed, 25 Aug 2004 16:13:39 +0200 Received: from [192.168.70.226] by ims3a.cp.tin.it with HTTP; Wed, 25 Aug 2004 16:13:38 +0200 Date: Wed, 25 Aug 2004 16:13:38 +0200 Message-ID: <411972290000B0FD@ims3a.cp.tin.it> In-Reply-To: <20040825035544.E65FC4160A1@ws5-2.us4.outblaze.com> From: gerarra@tin.it To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Subject: RE: Problems with tiocget/seta 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, 25 Aug 2004 14:16:15 -0000 > > >Some background... > >For the past three years I have been developing a Forth compiler for Lin= ux. > The kernel to my compiler is written in 100% pure assembler using NASM.= > The object code produced is almost identical to what the Forth compiler= >itself would produce were it were used to compile its own sources (some day). > I accomplish this via liberal use of NASM macros. > >All I/O etc is accomplished using Linux syscalls, no external libraries are >referenced. Linux is my BIOS :) > >The problem... > >I consider Isforth to be a worthy project, worthy enough to be ported to= >other processors and other operating systems. The PPC port is being don= e >by a friend of mine and is almost complete. The FreeBSD port has been "nearly >complete" for about EIGHT months. I am currenty at a complete loss as to >how to fix the problem (even though i think i know what it is!) :/ > >One of the things that my compiler has to do is switch stdin out of cano= niacal >mode and switch off echo. In Linux the ioctl is working - in fbsd its not. have you get a look to freebsd ioctl request codes? they differ from Linu= x and FreeBSD. > Im almost posative that i am passing correct values to the syscall yet stdin >is still buffered after the call and is still echoing. I would truely love >to get this up and running in FBSD but am in dire need of help. Im told= >that if anyone can help me YOU guys can (blame samy for getting you into= >this :)... If you don't find a solution giving a look to tcsetattr(3) implementation= for FreeBSD could be a good idea. rookie From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 25 14:26: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 66BC016A4CE for ; Wed, 25 Aug 2004 14:26:31 +0000 (GMT) Received: from n33.kp.t-systems-sfr.com (n33.kp.t-systems-sfr.com [129.247.16.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8602743D46 for ; Wed, 25 Aug 2004 14:26:30 +0000 (GMT) (envelope-from harti@freebsd.org) Received: from n81.sp.op.dlr.de (n81g.sp.op.dlr.de [129.247.163.1]) i7PEQS239874; Wed, 25 Aug 2004 16:26:29 +0200 Received: from zeus.nt.op.dlr.de (zeus.nt.op.dlr.de [129.247.173.3]) i7PEQSI104204; Wed, 25 Aug 2004 16:26:28 +0200 Received: from beagle.kn.op.dlr.de (opkndnwsbsd178 [129.247.173.178]) by zeus.nt.op.dlr.de (8.11.7+Sun/8.9.1) with ESMTP id i7PEQRe07933; Wed, 25 Aug 2004 16:26:27 +0200 (MET DST) Date: Wed, 25 Aug 2004 16:26:29 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt@beagle.kn.op.dlr.de To: gerarra@tin.it In-Reply-To: <411972290000B0FD@ims3a.cp.tin.it> Message-ID: <20040825162539.N553@beagle.kn.op.dlr.de> References: <411972290000B0FD@ims3a.cp.tin.it> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-hackers@freebsd.org Subject: RE: Problems with tiocget/seta X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Aug 2004 14:26:31 -0000 On Wed, 25 Aug 2004 gerarra@tin.it wrote: > >> >> >> Some background... >> >> For the past three years I have been developing a Forth compiler for Linux. >> The kernel to my compiler is written in 100% pure assembler using NASM. >> The object code produced is almost identical to what the Forth compiler >> itself would produce were it were used to compile its own sources (some > day). >> I accomplish this via liberal use of NASM macros. >> >> All I/O etc is accomplished using Linux syscalls, no external libraries > are >> referenced. Linux is my BIOS :) >> >> The problem... >> >> I consider Isforth to be a worthy project, worthy enough to be ported to >> other processors and other operating systems. The PPC port is being done >> by a friend of mine and is almost complete. The FreeBSD port has been > "nearly >> complete" for about EIGHT months. I am currenty at a complete loss as > to >> how to fix the problem (even though i think i know what it is!) :/ >> >> One of the things that my compiler has to do is switch stdin out of canoniacal >> mode and switch off echo. In Linux the ioctl is working - in fbsd its > not. > > have you get a look to freebsd ioctl request codes? they differ from Linux > and FreeBSD. > >> Im almost posative that i am passing correct values to the syscall yet > stdin >> is still buffered after the call and is still echoing. I would truely > love >> to get this up and running in FBSD but am in dire need of help. Im told >> that if anyone can help me YOU guys can (blame samy for getting you into >> this :)... > > If you don't find a solution giving a look to tcsetattr(3) implementation > for FreeBSD could be a good idea. Especially cfmakeraw(). harti From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 25 20:46: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 2738616A4CE for ; Wed, 25 Aug 2004 20:46:33 +0000 (GMT) Received: from cicero1.cybercity.dk (cicero1.cybercity.dk [212.242.40.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96D2843D60 for ; Wed, 25 Aug 2004 20:46:32 +0000 (GMT) (envelope-from db@traceroute.dk) Received: from user5.cybercity.dk (user5.cybercity.dk [212.242.41.51]) by cicero1.cybercity.dk (Postfix) with ESMTP id A0CA17E3E83 for ; Wed, 25 Aug 2004 22:46:30 +0200 (CEST) Received: from trinita (port132.ds1-arsy.adsl.cybercity.dk [212.242.239.73]) by user5.cybercity.dk (Postfix) with SMTP id EC26D3A1FDD for ; Wed, 25 Aug 2004 22:46:29 +0200 (CEST) Message-ID: <000c01c48ae4$c1867e90$0b00000a@trinita> From: "db" To: Date: Wed, 25 Aug 2004 22:47:36 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: New computer 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, 25 Aug 2004 20:46:33 -0000 Hi all I'm gonna buy a new computer with an Intel 915g, will freebsd be able to = support this? br db From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 25 20: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 F422816A4CE for ; Wed, 25 Aug 2004 20:50:31 +0000 (GMT) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FAC743D3F for ; Wed, 25 Aug 2004 20:50:29 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 23122 invoked from network); 25 Aug 2004 20:50:28 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 25 Aug 2004 20:50:28 -0000 Received: from [10.50.40.208] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i7PKoM3B005745; Wed, 25 Aug 2004 16:50:25 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Wed, 25 Aug 2004 13:14:47 -0400 User-Agent: KMail/1.6.2 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: <200408251314.47962.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: yangshazhou@hotmail.com Subject: Re: yield() in kernel CAN'T yield control for MOD_LOAD thread 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, 25 Aug 2004 20:50:32 -0000 On Wednesday 25 August 2004 03:06 am, yangshazhou@hotmail.com wrote: > Hi all, > This problem delay me for quite a long time. > I've built two klds, I'd like to see the result one's running to the > other's. In one kld's MOD_LOAD subroutine, I make a long 'for' loop, in > which it DELAY(1000) and then call yield(curthread,NULL). When the module > was loaded by kldload, the system failed to response until the loop quit. > The loop seems like that: > for(i=0;i<8000;i++){ > ...... > DELAY(1000); > yield(curthread,NULL); > } > > My system is 5.2.1-release. Thanks. You could try having the first one wait on a condition variable that the second module's MOD_LOAD does a wakeup on. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 02:04: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 3483316A4CE for ; Thu, 26 Aug 2004 02:04:29 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E977D43D58 for ; Thu, 26 Aug 2004 02:04:28 +0000 (GMT) (envelope-from caelian@gmail.com) Received: by mproxy.gmail.com with SMTP id 77so160810rnl for ; Wed, 25 Aug 2004 19:04:25 -0700 (PDT) Received: by 10.38.171.20 with SMTP id t20mr2273491rne; Wed, 25 Aug 2004 19:04:24 -0700 (PDT) Received: by 10.38.79.78 with HTTP; Wed, 25 Aug 2004 19:04:24 -0700 (PDT) Message-ID: Date: Wed, 25 Aug 2004 19:04:24 -0700 From: Pascal Hofstee To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Base System libobjc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Pascal Hofstee List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2004 02:04:29 -0000 Hi, I have been playing with GNUstep for a while now, and since CURRENT switched their base system compiler to 3.4.2 it has always felt somewhat superfluous to use the gcc-3.3.5 port, as far as i can tell so far ... for basically only a shared version of libobjc. I have since been toying around with building GNUstep from GNUstep CVS instead of ports using my base system compiler and the base system provided static version of libobjc and so far things are looking sweet and things are working as expected (installed ffcall from ports and so far that seems to be only necesarry dependency) What i am wondering about though is the following. It seems FreeBSD already provides a static version of libobjc in its base system, which (i assume) automatically gets updated whenever the base system's compiler is updated to a newer snapshot/release. What i am wondering is if there is any specific reason why FreeBSD only provides a static version of this library, and if that is not the case, what would it take to make a buildworld provide a shared version of this Objective-C runtime library ? With kind regards, Pascal Hofstee From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 03:35: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 E714C16A4CE for ; Thu, 26 Aug 2004 03:35:55 +0000 (GMT) Received: from pd2mo2so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AB8143D46 for ; Thu, 26 Aug 2004 03:35:53 +0000 (GMT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from pd3mr7so.prod.shaw.ca (pd3mr7so-qfe3.prod.shaw.ca [10.0.141.23])2004))freebsd-hackers@freebsd.org; Wed, 25 Aug 2004 20:33:57 -0600 (MDT) Received: from pn2ml7so.prod.shaw.ca ([10.0.121.151]) by pd3mr7so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I3100B0Q8GK6DF0@pd3mr7so.prod.shaw.ca> for freebsd-hackers@freebsd.org; Wed, 25 Aug 2004 20:33:57 -0600 (MDT) Received: from piii600.wadham.ox.ac.uk (S0106006067227a4a.vc.shawcable.net [24.87.233.42]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0I3100D028GJMR@l-daemon> for freebsd-hackers@freebsd.org; Wed, 25 Aug 2004 20:33:56 -0600 (MDT) Date: Wed, 25 Aug 2004 19:32:14 -0700 From: Colin Percival In-reply-to: X-Sender: cperciva@popserver.sfu.ca (Unverified) To: Pascal Hofstee Message-id: <6.1.0.6.1.20040825192913.03850018@popserver.sfu.ca> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 6.1.0.6 Content-type: text/plain; charset=us-ascii References: cc: freebsd-hackers@freebsd.org Subject: Re: Base System libobjc 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, 26 Aug 2004 03:35:56 -0000 At 19:04 25/08/2004, Pascal Hofstee wrote: >What i am wondering >is if there is any specific reason why FreeBSD only provides a static >version of this library, and if that is not the case, what would it >take to make a buildworld provide a shared version of this Objective-C >runtime library ? Thus quoth the gnu/lib/libobjc Makefile: NOPIC= works but method lookup slowdown is significant If you want a shared library, remove that line. Colin Percival From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 25 13:30: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 80A4816A4CE for ; Wed, 25 Aug 2004 13:30:53 +0000 (GMT) Received: from smtp-out2.email.it (smtp-out2.email.it [80.247.70.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19FA543D39 for ; Wed, 25 Aug 2004 13:30:53 +0000 (GMT) (envelope-from mmaist@email.it) Received: from 213.203.147.246 (unknown [80.247.70.16]) by smtp-out2.email.it (Email.it) with ESMTP id 67DD91BC235 for ; Wed, 25 Aug 2004 15:31:06 +0200 (CEST) Received: from Email-mailer ([213.203.147.246]) by 213.203.147.246 with HTTP (Wmail); Wed, 25 Aug 2004 15:30:42 +0200 Date: Wed, 25 Aug 2004 15:30:42 +0200 To: freebsd-hackers@freebsd.org From: Mmaist Message-ID: X-Priority: 1 X-Mailer: Webmail-Email.it [Mailer version 1.70] X-SenderIP: 213.203.147.246 MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 26 Aug 2004 12:20:11 +0000 Content-Type: text/plain; charset = "iso-8859-1" Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: syscalls implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mmaist List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Aug 2004 13:30:53 -0000 Hi! I was wondering were syscalls implementation is in the FreeBSD source tree. I would like to know, especially, where int kldload(const char*); is located. sys/kern/kern_linker.c contains int kldload(struct thread *, struct kldload_args *) and I need to watch at what called between them. thanks, markus -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Cepu offre una soluzione di insegnamento individuale e personalizzato tutor specializzati e assistenza nel disbrigo delle pratiche burocratiche Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2611&d=20040825 From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 04:39:21 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 3ADE316A4CE for ; Thu, 26 Aug 2004 04:39:21 +0000 (GMT) Received: from hotmail.com (bay17-dav2.bay17.hotmail.com [64.4.43.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D11A43D46 for ; Thu, 26 Aug 2004 04:39:21 +0000 (GMT) (envelope-from yangshazhou@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 25 Aug 2004 20:56:54 -0700 Received: from 61.187.16.2 by bay17-dav2.bay17.hotmail.com with DAV; Thu, 26 Aug 2004 03:56:54 +0000 X-Originating-IP: [61.187.16.2] X-Originating-Email: [yangshazhou@hotmail.com] X-Sender: yangshazhou@hotmail.com From: To: Date: Thu, 26 Aug 2004 11:45:39 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: X-OriginalArrivalTime: 26 Aug 2004 03:56:54.0592 (UTC) FILETIME=[B9D11C00:01C48B20] X-Mailman-Approved-At: Thu, 26 Aug 2004 12:20:11 +0000 Subject: yield() in kernel CAN'T yield control for MOD_LOAD thread 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, 26 Aug 2004 04:39:21 -0000 >On Wednesday 25 August 2004 03:06 am, yangshazhou at hotmail.com wrote: >> Hi all, >> This problem delay me for quite a long time. >> I've built two klds, I'd like to see the result one's running to the >> other's. In one kld's MOD_LOAD subroutine, I make a long 'for' loop, in >> which it DELAY(1000) and then call yield(curthread,NULL). When the module >> was loaded by kldload, the system failed to response until the loop quit. >> The loop seems like that: >> for(i=0;i<8000;i++){ >> ...... >> DELAY(1000); >> yield(curthread,NULL); >> } >> > My system is 5.2.1-release. Thanks. > >You could try having the first one wait on a condition variable that the >second module's MOD_LOAD does a wakeup on.You mean, msleep(ident,...) in one module and wakeup(ident) in the other till the second module run out?But why yield() can't yield? It's because of the priority? I'll try msleep/wakeup anyway, thanks. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 07:00:05 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 A6F7316A4D9 for ; Thu, 26 Aug 2004 07:00:05 +0000 (GMT) Received: from hotmail.com (bay17-dav17.bay17.hotmail.com [64.4.43.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9801443D5E for ; Thu, 26 Aug 2004 07:00:05 +0000 (GMT) (envelope-from yangshazhou@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 25 Aug 2004 23:39:26 -0700 Received: from 61.187.16.2 by bay17-dav17.bay17.hotmail.com with DAV; Thu, 26 Aug 2004 06:39:25 +0000 X-Originating-IP: [61.187.16.2] X-Originating-Email: [yangshazhou@hotmail.com] X-Sender: yangshazhou@hotmail.com From: To: Date: Thu, 26 Aug 2004 14:36:50 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: X-OriginalArrivalTime: 26 Aug 2004 06:39:26.0235 (UTC) FILETIME=[6E3FBEB0:01C48B37] X-Mailman-Approved-At: Thu, 26 Aug 2004 12:20:11 +0000 Subject: yield() in kernel CAN'T yield control for MOD_LOAD thread 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, 26 Aug 2004 07:00:05 -0000 Now "tsleep(&ident,PRIBIO,NULL,1)" solved the problem. Maybe yield() can't do the job in kernel. And mi_switch() is not enough to.Thank you.On Wednesday 25 August 2004 03:06 am, yangshazhou at hotmail.com wrote: > Hi all, > This problem delay me for quite a long time. > I've built two klds, I'd like to see the result one's running to the > other's. In one kld's MOD_LOAD subroutine, I make a long 'for' loop, in > which it DELAY(1000) and then call yield(curthread,NULL). When the module > was loaded by kldload, the system failed to response until the loop quit. > The loop seems like that: > for(i=0;i<8000;i++){ > ...... > DELAY(1000); > yield(curthread,NULL); > } > > My system is 5.2.1-release. Thanks. You could try having the first one wait on a condition variable that the second module's MOD_LOAD does a wakeup on. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 15:56: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 3CBE116A4CE for ; Thu, 26 Aug 2004 15:56:32 +0000 (GMT) Received: from jive.SoftHome.net (jive.SoftHome.net [66.54.152.27]) by mx1.FreeBSD.org (Postfix) with SMTP id E3B6C43D5E for ; Thu, 26 Aug 2004 15:56:31 +0000 (GMT) (envelope-from shawnwebb@softhome.net) Received: (qmail 11061 invoked by uid 417); 26 Aug 2004 15:56:31 -0000 Received: from shunt-smtp-out-0 (HELO softhome.net) (172.16.3.12) by shunt-smtp-out-0 with SMTP; 26 Aug 2004 15:56:31 -0000 Received: from m00 ([24.10.159.210]) (AUTH: LOGIN shawnwebb@softhome.net) by softhome.net with esmtp; Thu, 26 Aug 2004 09:56:31 -0600 Message-ID: <000801c48b85$36f73b60$0c0aa8c0@Domain> From: "Shawn Webb" To: "Mmaist" References: Date: Thu, 26 Aug 2004 09:56:10 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 cc: freebsd-hackers@freebsd.org Subject: Re: syscalls implementation 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, 26 Aug 2004 15:56:32 -0000 You could overwrite sysent[SYS_kldload] to point to your own kldload function. After you do what you want to, you return what the original kldload returns. Meaning, call the original kldload and return it's value. int (*orig_kldload)(struct thread *, struct kldload_args *) = sysent[SYS_kldload]; int my_kldload(struct thread *, struct kldload_args *); int my_kldload(struct thread *td, struct kldload_args *uap) { do_stuff_here(); return (*orig_kldload)(td, uap); } lattera ----- Original Message ----- From: "Mmaist" To: Sent: Wednesday, August 25, 2004 7:30 AM Subject: syscalls implementation > Hi! > I was wondering were syscalls implementation is in the FreeBSD source tree. > I would like to know, especially, where > > int kldload(const char*); > > is located. sys/kern/kern_linker.c contains > > int > kldload(struct thread *, struct kldload_args *) > > and I need to watch at what called between them. > > thanks, > > markus > -- > Email.it, the professional e-mail, gratis per te: http://www.email.it/f > > Sponsor: > Cepu offre una soluzione di insegnamento individuale e personalizzato > tutor specializzati e assistenza nel disbrigo delle pratiche burocratiche > > Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2611&d=20040825 > > _______________________________________________ > 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" --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.737 / Virus Database: 491 - Release Date: 8/11/04 From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 06:53: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 7DF6816A4CE for ; Fri, 27 Aug 2004 06:53:06 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3876343D49 for ; Fri, 27 Aug 2004 06:53:06 +0000 (GMT) (envelope-from geniusfreak@gmail.com) Received: by mproxy.gmail.com with SMTP id 77so212166rnl for ; Thu, 26 Aug 2004 23:53:05 -0700 (PDT) Received: by 10.38.83.11 with SMTP id g11mr1918789rnb; Thu, 26 Aug 2004 23:53:05 -0700 (PDT) Received: by 10.38.82.75 with HTTP; Thu, 26 Aug 2004 23:53:05 -0700 (PDT) Message-ID: <97f8dd040826235372388dea@mail.gmail.com> Date: Thu, 26 Aug 2004 23:53:05 -0700 From: Genius Freak To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: System freeze when useing bfe (Broadcom BCM440x) driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Genius Freak List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2004 06:53:06 -0000 I just installed 5.2.1 RELEASE from CD on my dell inspiron 1100 I found some guides online and used them to create a custom kernel for the laptop, it compiled and booted fine however it freezes whenever I use the network card. (example: running "pkg_add -r cvsup" causes it to freeze ) I have compiled a second kernel while running the first to see it it was just a CPU or resource issue but it went fine so it seems to me to be the driver. I have attached the kernel config file for reference. Please tell me if there are any tricks to get this working properly. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 11:14:42 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 CE85016A4CE for ; Fri, 27 Aug 2004 11:14:42 +0000 (GMT) Received: from audiogram.mail.pas.earthlink.net (audiogram.mail.pas.earthlink.net [207.217.120.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98B3443D49 for ; Fri, 27 Aug 2004 11:14:42 +0000 (GMT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfim5.dialup.mindspring.com ([165.247.202.197] helo=mindspring.com) by audiogram.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 4.34) id 1C0egq-0000IE-9v; Fri, 27 Aug 2004 04:14:42 -0700 Message-ID: <412F17FC.E856A234@mindspring.com> Date: Fri, 27 Aug 2004 04:16:12 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Mmaist References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4b515a79f089df969116d86919fb1500b350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 165.247.202.197 cc: freebsd-hackers@freebsd.org Subject: Re: syscalls implementation 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, 27 Aug 2004 11:14:42 -0000 Mmaist wrote: > Hi! > I was wondering were syscalls implementation is in the FreeBSD source tree. > I would like to know, especially, where > > int kldload(const char*); > > is located. sys/kern/kern_linker.c contains > > int > kldload(struct thread *, struct kldload_args *) > > and I need to watch at what called between them. This is probably the wrong list. You probably want -questions. Here's the simplest answer you will probably understand, given that the question you are really asking is about understanding how system calls work, and where baby system calls come from. 8-). The system calls are in code that's generated from the file /usr/src/sys/kern/syscalls.master by /usr/src/sys/kern/maksyscalls.sh, which is an awk script encapsulated in a shell script. In user space, the system calls are stubs in a library that traps into the vector code generated from syscalls.master in the kernel. This code is located in /usr/src/lib/libc. In the case os system calls that are unwrapped (like kldload(2)), the calls are generated assembly code that comes from running a script against the same syscalls.master file describd earlier; see src/lib/libc/sys/Makefile.inc for the exact place in the source tree that these stubs are being generated from. The way a system call happens is that the arguments are pushed on the stack (or put into registers, depending), and then a trap is issued by attempting to execute a supervisor-only instruction in user code. This effectively generates a fault which is then serviced by a fault handler in the kernel which recognizes the particular trap as "special", and treats it as a system call. Now when the special trap code in the kernel itself is activated, it packages up the arguments in a structure of a known size (known to the code in init_sysent.c, generated from syscalls.master). For the Intel version of the trap code, see /usr/src/sys/i386/i386/trap.c and the related assembly code there. The current thread and the packaged argument pointer are passed to the system call. Techinically, it makes a lot of things difficult that the current thread is passed into the system call as part of its context, rather than obtained when needed, and cached locally, if necessary, but since it's handy at the time, it's passed in. On non-register-poor architectures, the current thread is usually made available in a register, so the cost in obtaining it later is actually lss than a memory dereference of a computed stack offset, as it is/was (depends on the version, architecture, etc.) in FreeBSD because it's being passed in. On of the major things this makes difficult is accurate proxy credential representation at various points in the kernel (see the NFS server source code for examples of the contorted logic this makes necessary). The packages argument structures are defined in the (also generated from the syscalls.master) file /usr/src/sys/sys/sysproto.h. For the kldload system call, this looks like: struct kldload_args { char file_l_[PADL_(const char *)]; const char * file; char file_r_[PADR_(const char *)]; }; This argument structure is actually a dscriptor. A descriptor is used to ensure packing and alignment, so that the user stack save area can be coerced directly to the structure type, and dereferenced in the function. The descriptor contains the information necessary to line the structure contents up with the user stack area and/or register spill area, where the arguments were stored in user space before the trap. Mostly, you can just look at the middle element to know what the argument is, for each line of arguments. In this case, it's a "const char * file". This matches what it was in user space when you made the call. So the function you are seeing in the kernel: int kldload(struct thread *, struct kldload_args *); *is* the system call you saw in user space: int kldload(const char*); with the trap added thread pointer and pointer to the packed up save area containing the same char * value you passed in user space. Note that since the user and kernel space are not necessarily in core at the same time (maybe the pointer you pointed to was in a page that was swapped out), so you have to use copyin/uiomove in the function in the kernel to copy the path in before it can be used in the kernel address space. Probably you should not be hacking in this area until you understand the code operation a little better, since unless you know what you are doing, most changes you could possibly make will leave you with a dead system. -- Terry From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 16: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 EE4BD16A4CE for ; Thu, 26 Aug 2004 16:44:30 +0000 (GMT) Received: from smtp-out2.email.it (smtp-out2.email.it [80.247.70.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EAF943D45 for ; Thu, 26 Aug 2004 16:44:30 +0000 (GMT) (envelope-from mmaist@email.it) Received: from 213.140.6.102 (unknown [80.247.70.13]) by smtp-out2.email.it (Email.it) with ESMTP id BDE201BC67E for ; Thu, 26 Aug 2004 18:44:34 +0200 (CEST) Received: from Email-mailer ([213.140.6.102]) by 213.140.6.102 with HTTP (Wmail); Thu, 26 Aug 2004 18:44:34 +0200 Date: Thu, 26 Aug 2004 18:44:34 +0200 To: freebsd-hackers@freebsd.org From: Mmaist Message-ID: X-Priority: X-Mailer: Webmail-Email.it [Mailer version 1.70] X-SenderIP: 213.140.6.102 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 27 Aug 2004 12:07:13 +0000 Content-Type: text/plain; charset = "iso-8859-1" Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: syscalls implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mmaist List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2004 16:44:31 -0000 > You could overwrite sysent[SYS_kldload] to point to your own kldload > function. After you do what you want to, you return what the original > kldload returns. Meaning, call the original kldload and return it\'s value. > > int (*orig_kldload)(struct thread *, struct kldload_args *) = > sysent[SYS_kldload]; > int my_kldload(struct thread *, struct kldload_args *); > > int my_kldload(struct thread *td, struct kldload_args *uap) > { > do_stuff_here(); > > return (*orig_kldload)(td, uap); > } > > lattera You didn\'t point the problem. kldload(2) accepts just one const char* and the only one implementation I\'ve found of kldload(2) is int kldload(struct thread *, struct kldload_args *), so I guess there could be kldload(const char*) implementation in another file; where is? thanks in advance markus -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Incredibile offerta: 18 eccellenti vini Giordano + 7 gustose specialitą alimentari compreso un carrello dispensa o una batteria di pentole. Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2619&d=20040826 From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 14:57:49 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 4788916A4CE for ; Fri, 27 Aug 2004 14:57:49 +0000 (GMT) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FC0A43D41 for ; Fri, 27 Aug 2004 14:57:48 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from midget.dons.net.au ([150.101.45.33])i7REvUHY053430; Sat, 28 Aug 2004 00:27:41 +0930 (CST) Received: from inchoate.dons.net.au (root@localhost.dons.net.au [127.0.0.1]) by midget.dons.net.au (8.12.9/8.12.10) with ESMTP id i7REvEn7022487; Sat, 28 Aug 2004 00:27:18 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org, Genius Freak Date: Sat, 28 Aug 2004 00:27:14 +0930 User-Agent: KMail/1.6.2 References: <97f8dd040826235372388dea@mail.gmail.com> In-Reply-To: <97f8dd040826235372388dea@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200408280027.14207.doconnor@gsoft.com.au> X-Spam-Score: 0 () X-Scanned-By: MIMEDefang 2.26 (www . roaringpenguin . com / mimedefang) Subject: Re: System freeze when useing bfe (Broadcom BCM440x) driver 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, 27 Aug 2004 14:57:49 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 27 Aug 2004 16:23, Genius Freak wrote: > I just installed 5.2.1 RELEASE from CD on my dell inspiron 1100 > > I found some guides online and used them to create a custom kernel for > the laptop, > it compiled and booted fine however it freezes whenever I use the network > card. (example: running "pkg_add -r cvsup" causes it to freeze ) > > I have compiled a second kernel while running the first to see it it > was just a CPU or resource issue but it went fine so it seems to me to > be the driver. > > I have attached the kernel config file for reference. > > Please tell me if there are any tricks to get this working properly. The bfe driver in 5.2.1 is faulty - if it gets a dud packet it will get int= o=20 an infinite loop. =46etch rev 1.6 (5.2.1 has 1.4) from here -> http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sys/dev/bfe/if_bfe.c?r= ev=3D1.6&content-type=3Dtext/plain and put it in /usr/src/sys/dev/bfe then rebuild your kernel, or if you used= =20 the KLD for bfe do.. cd /usr/src/sys/modules/bfe make make install kldunload if_bfe kldload if_bfe Then cvsup to RELENG_5 :) =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBL0vK5ZPcIHs/zowRAtX2AJoDViLfoASo9FhORzatQJQHqEvDRACfVAiK yOFR0mOV0mdz3MTb38WKNtU=3D =3DsZk+ =2D----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 15:18:52 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 6097616A4CE for ; Fri, 27 Aug 2004 15:18:52 +0000 (GMT) Received: from plab.ku.dk (plab.ku.dk [130.225.107.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2190E43D48 for ; Fri, 27 Aug 2004 15:18:52 +0000 (GMT) (envelope-from dk@plab.ku.dk) Received: from plab.ku.dk (localhost [127.0.0.1]) by plab.ku.dk (Postfix) with SMTP id 033CD5253D for ; Fri, 27 Aug 2004 17:18:51 +0200 (CEST) Received: by plab.ku.dk (Postfix, from userid 1003) id 714175253B; Fri, 27 Aug 2004 17:18:50 +0200 (CEST) Mime-version: 1.0 Content-type: text/plain; charset="koi8-r" Content-transfer-encoding: 8bit Keywords: 2001334874 X-Comment-To: Ted Unangst Sender: dk@plab.ku.dk To: hackers@freebsd.org From: Dmitry Karasik Date: 27 Aug 2004 17:18:50 +0200 In-Reply-To: Ted Unangst's message of "Mon, 23 Aug 2004 10:12:42 -0700" Message-ID: <84zn4g7go5.fsf_-_@plab.ku.dk> Lines: 22 X-Mailer: Gnus v5.7/Emacs 20.7 Subject: shared memory in jails 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, 27 Aug 2004 15:18:52 -0000 Hi hackers, I've been playing with shared memory in jails, and very soon found out that one jail's segments are visible (didn't check the accesibility thoroughly) in another, which IMO is against the very idea of the jail. ( The exact problem is that postgresqls, when run in jails, try to use same set of IPC keys and (expectedly) fail ). I'm not really sure if the issue was already discussed, but even if it wasn't, I wonder if anything can be done to fix the problem. I think I am myself able to hack sys/kern/sysv_shm.c and around, but what I do not know is the extent of the area that should be affected by the proper solution. Do you have any ideas or comments on this? -- Sincerely, Dmitry --- www.karasik.eu.org --- From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 16:57: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 7B21116A4CE for ; Fri, 27 Aug 2004 16:57:27 +0000 (GMT) Received: from stf01.seccuris.com (stf01.seccuris.com [204.112.0.40]) by mx1.FreeBSD.org (Postfix) with SMTP id D290E43D3F for ; Fri, 27 Aug 2004 16:57:26 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: (qmail 38642 invoked by uid 1006); 27 Aug 2004 16:57:25 -0000 Date: Fri, 27 Aug 2004 16:57:25 +0000 From: "Christian S.J. Peron" To: Dmitry Karasik Message-ID: <20040827165725.A36937@stf01.seccuris.com> References: <84zn4g7go5.fsf_-_@plab.ku.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <84zn4g7go5.fsf_-_@plab.ku.dk>; from dmitry@karasik.eu.org on Fri, Aug 27, 2004 at 05:18:50PM +0200 cc: hackers@freebsd.org Subject: Re: shared memory in jails 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, 27 Aug 2004 16:57:27 -0000 On 27 Aug 2004 Dmitry Karasik wrote: > > Hi hackers, > > I've been playing with shared memory in jails, and very soon found > out that one jail's segments are visible (didn't check the accesibility > thoroughly) in another, which IMO is against the very idea of the jail. > ( The exact problem is that postgresqls, when run in jails, try to use same > set of IPC keys and (expectedly) fail ). Yes, this is a known issue with prisons. iirc for this very reason we default security.jail.sysvipc_allowed to 0. I think it would be beneficial to solve this problem, however I have not had much time to look into it. -- Christian S.J. Peron csjp@FreeBSD.ORG FreeBSD Committer From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 18:12: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 BC5DE16A4CE for ; Fri, 27 Aug 2004 18:12:20 +0000 (GMT) Received: from shellma.zin.lublin.pl (shellma.zin.lublin.pl [212.182.126.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 390E643D6A for ; Fri, 27 Aug 2004 18:12:20 +0000 (GMT) (envelope-from pawmal-posting@freebsd.lublin.pl) Received: by shellma.zin.lublin.pl (Postfix, from userid 1018) id D16CA3474C2; Fri, 27 Aug 2004 20:10:38 +0200 (CEST) Date: Fri, 27 Aug 2004 20:10:38 +0200 From: Pawel Malachowski To: Dmitry Karasik Message-ID: <20040827181038.GA75620@shellma.zin.lublin.pl> References: <84zn4g7go5.fsf_-_@plab.ku.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <84zn4g7go5.fsf_-_@plab.ku.dk> User-Agent: Mutt/1.4.2i cc: hackers@freebsd.org Subject: Re: shared memory in jails 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, 27 Aug 2004 18:12:20 -0000 On Fri, Aug 27, 2004 at 05:18:50PM +0200, Dmitry Karasik wrote: > I've been playing with shared memory in jails, and very soon found > out that one jail's segments are visible (didn't check the accesibility > thoroughly) in another, which IMO is against the very idea of the jail. kern/48471 -- Pawe³ Ma³achowski From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 19:01: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 9013016A4CE for ; Fri, 27 Aug 2004 19:01:24 +0000 (GMT) Received: from lakermmtao09.cox.net (lakermmtao09.cox.net [68.230.240.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CDB543D2F for ; Fri, 27 Aug 2004 19:01:24 +0000 (GMT) (envelope-from bagus@cox.net) Received: from bagus ([68.11.49.116]) by lakermmtao09.cox.net (InterMail vM.6.01.03.02.01 201-2131-111-104-103-20040709) with SMTP id <20040827190107.QRCK16771.lakermmtao09.cox.net@bagus> for ; Fri, 27 Aug 2004 15:01:07 -0400 From: "Bagus" To: Date: Fri, 27 Aug 2004 14:05:42 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Subject: slow login, app launching, etc 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, 27 Aug 2004 19:01:24 -0000 Hi, I'm running FreeBSD 2.2CAM-19980716-SNAP on bagus.org. I've been running it for a few years. Recently, after normal performance, I've been experiencing extremely slow login prompt appearance, extremely slow application launching and what bugs me the most is the extremely slow response time of my java-web server. OTher functionality is ok. It serves html files just fine and also basic command line response is fine. Anyone out there have any clues as to what it could be? I'm kind of guessing it has something to do with some name resolution somewhere, but I'm not sure. Any help would be greatly appreciated. Thanks, Bagus. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 19: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 1C5D116A4FF for ; Fri, 27 Aug 2004 19:04:51 +0000 (GMT) Received: from lakermmtao11.cox.net (lakermmtao11.cox.net [68.230.240.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99CA943D2D for ; Fri, 27 Aug 2004 19:04:50 +0000 (GMT) (envelope-from bagus@cox.net) Received: from bagus ([68.11.49.116]) by lakermmtao11.cox.net (InterMail vM.6.01.03.02.01 201-2131-111-104-103-20040709) with SMTP id <20040827190434.RQYX6461.lakermmtao11.cox.net@bagus> for ; Fri, 27 Aug 2004 15:04:34 -0400 From: "Bagus" To: Date: Fri, 27 Aug 2004 14:09:08 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Subject: slow login, app launching, etc 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, 27 Aug 2004 19:04:51 -0000 Hi, I'm running FreeBSD 2.2CAM-19980716-SNAP on bagus.org. I've been running it for a few years. Recently, after normal performance, I've been experiencing extremely slow login prompt appearance, extremely slow application launching and what bugs me the most is the extremely slow response time of my java-web server. OTher functionality is ok. It serves html files just fine and also basic command line response is fine. Anyone out there have any clues as to what it could be? I'm kind of guessing it has something to do with some name resolution somewhere, but I'm not sure. Any help would be greatly appreciated. Thanks, Bagus. p.s. sorry if this got sent twice. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 21:56: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 AC70116A4CE for ; Fri, 27 Aug 2004 21:56:45 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 607D043D39 for ; Fri, 27 Aug 2004 21:56:45 +0000 (GMT) (envelope-from geniusfreak@gmail.com) Received: by mproxy.gmail.com with SMTP id 77so241381rnl for ; Fri, 27 Aug 2004 14:56:44 -0700 (PDT) Received: by 10.38.15.69 with SMTP id 69mr2644328rno; Fri, 27 Aug 2004 14:56:44 -0700 (PDT) Received: by 10.38.82.75 with HTTP; Fri, 27 Aug 2004 14:56:44 -0700 (PDT) Message-ID: <97f8dd0408271456a8cb2e7@mail.gmail.com> Date: Fri, 27 Aug 2004 14:56:44 -0700 From: Genius Freak To: Daniel O'Connor , freebsd-hackers@freebsd.org In-Reply-To: <200408280027.14207.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <97f8dd040826235372388dea@mail.gmail.com> <200408280027.14207.doconnor@gsoft.com.au> Subject: Re: System freeze when useing bfe (Broadcom BCM440x) driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Genius Freak List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2004 21:56:45 -0000 Thanks for your advice. The kernel is rebuilding now :) I was so desperate I even tried the 5.3 beta1 to see if that would work and it did but it was too much of a beta for me to use, it crashed in sysinstall twice. Thanks again, i'll let you know how it goes. On Sat, 28 Aug 2004 00:27:14 +0930, Daniel O'Connor wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > > On Fri, 27 Aug 2004 16:23, Genius Freak wrote: > > I just installed 5.2.1 RELEASE from CD on my dell inspiron 1100 > > > > I found some guides online and used them to create a custom kernel for > > the laptop, > > it compiled and booted fine however it freezes whenever I use the network > > card. (example: running "pkg_add -r cvsup" causes it to freeze ) > > > > I have compiled a second kernel while running the first to see it it > > was just a CPU or resource issue but it went fine so it seems to me to > > be the driver. > > > > I have attached the kernel config file for reference. > > > > Please tell me if there are any tricks to get this working properly. > > The bfe driver in 5.2.1 is faulty - if it gets a dud packet it will get into > an infinite loop. > > Fetch rev 1.6 (5.2.1 has 1.4) from here -> > http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sys/dev/bfe/if_bfe.c?rev=1.6&content-type=text/plain > > and put it in /usr/src/sys/dev/bfe then rebuild your kernel, or if you used > the KLD for bfe do.. > cd /usr/src/sys/modules/bfe > make > make install > kldunload if_bfe > kldload if_bfe > > Then cvsup to RELENG_5 :) > > - -- > Daniel O'Connor software and network engineer > for Genesis Software - http://www.gsoft.com.au > "The nice thing about standards is that there > are so many of them to choose from." > -- Andrew Tanenbaum > GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (FreeBSD) > > iD8DBQFBL0vK5ZPcIHs/zowRAtX2AJoDViLfoASo9FhORzatQJQHqEvDRACfVAiK > yOFR0mOV0mdz3MTb38WKNtU= > =sZk+ > -----END PGP SIGNATURE----- > From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 01:35: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 AE46E16A4CE for ; Sat, 28 Aug 2004 01:35:16 +0000 (GMT) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDE3143D31 for ; Sat, 28 Aug 2004 01:35:11 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from midget.dons.net.au ([150.101.45.33])i7S1Z04Y096788; Sat, 28 Aug 2004 11:05:10 +0930 (CST) Received: from inchoate.dons.net.au (root@localhost.dons.net.au [127.0.0.1]) by midget.dons.net.au (8.12.9/8.12.10) with ESMTP id i7S1Ywn7036993; Sat, 28 Aug 2004 11:04:59 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Genius Freak Date: Sat, 28 Aug 2004 11:04:57 +0930 User-Agent: KMail/1.6.2 References: <97f8dd040826235372388dea@mail.gmail.com> <200408280027.14207.doconnor@gsoft.com.au> <97f8dd0408271456a8cb2e7@mail.gmail.com> In-Reply-To: <97f8dd0408271456a8cb2e7@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200408281104.58018.doconnor@gsoft.com.au> X-Spam-Score: 0 () X-Scanned-By: MIMEDefang 2.26 (www . roaringpenguin . com / mimedefang) cc: freebsd-hackers@freebsd.org Subject: Re: System freeze when useing bfe (Broadcom BCM440x) driver 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, 28 Aug 2004 01:35:16 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, 28 Aug 2004 07:26, Genius Freak wrote: > The kernel is rebuilding now :) > I was so desperate I even tried the 5.3 beta1 to see if that would > work and it did but it was too much of a beta for me to use, it > crashed in sysinstall twice. Personally I'd trust 5.3-BETA over 5.2.1... If it crashes in sysinstall you should report it (eg the panic message) so= =20 it's less of a beta when it's released :) =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBL+FB5ZPcIHs/zowRAglPAKCH0Ch2W3h4/rYvMIJVnFLffwmZVgCfX5dF jX8bNG5v5NWXfBoWnPskkw8=3D =3D2gbX =2D----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 03:48: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 C4D8216A4CE for ; Sat, 28 Aug 2004 03:48:35 +0000 (GMT) Received: from mail.iinet.net.au (mail-13.iinet.net.au [203.59.3.45]) by mx1.FreeBSD.org (Postfix) with SMTP id 77A9243D1F for ; Sat, 28 Aug 2004 03:48:33 +0000 (GMT) (envelope-from hacker2004@damon.com) Received: (qmail 13579 invoked from network); 28 Aug 2004 03:48:32 -0000 Received: from unknown (HELO ?199.98.84.67?) (199.98.84.67) by mail.iinet.net.au with SMTP; 28 Aug 2004 03:48:32 -0000 Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <2061FF78-F8A5-11D8-BD8C-000A957C9058@damon.com> Content-Transfer-Encoding: 7bit X-Image-Url: http://homepage.mac.com/permezel/.cv/thumbs/me.thumbnail From: Herbert Acker X-Face: NW=A7k7S; x-wc#Kc74a\5QbF7iiHJ!a>%no+IRQE:0-0Pt@pVB`U&+_MSpHH}]*?l*Tol{ *7^7b>hPpuJpPvfwv+:f?hiz&>ecO8(^K'DCRHO2%sq2rz&w-?7G?pFs0/[fHW9`m>hL.S m#+64}^[o6eggyJ!w*_q*}1ZD7+HGy'h|$}Cbc ]h^N~>{uv>~L(r]o]5u\W{Xfi|MQNr4LY8*1(ss><[Zo? List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2004 03:48:35 -0000 Hi. I have been occasionally plagued by panics in KLD: at /usr/src/sys/i386/i386/trap.c:466 #6 0xc016c2dc in sysctl_register_oid (oidp=0x0) at /usr/src/sys/kern/kern_sysctl.c:92 #7 0xc016c841 in sysctl_register_set (lsp=0xcd5000a0) at /usr/src/sys/kern/kern_sysctl.c:391 #8 0xc0157847 in linker_file_register_sysctls (lf=0xcd4ea180) at /usr/src/sys/kern/kern_linker.c:224 #9 0xc01578fc in linker_load_file ( It bit me once several years ago, and then again today. It croaks because it finds the sysctl_set symbol in the KLD but the OIDs are zero. I finally got pissed off enough and figured out what the problem is, instead of using the dynamic-sysctls approach I adopted the other time. Essentially, I have two KLDs. One imports symbols from the other. I have them in separate dirs, and have a -I ../dir0/ in the Makefile of the KLD which imports the interface of the other KLD. IE: dir0/has_interfaces_and_sysctls.c dir1/uses_interfaces_no_sysctls.c dir1/Makefile: CFLAGS += -I../dir0/ gensetdefs creates files to manage the .set sections. The setdefs0.c includes setdefs.h, and the ../dir0/setdefs.h has some sysctls, so it has the set definitions for those sysctls. The second KLD has no sysctls. The second KLD is being linked with a setdefs0.o which is made using the ../dir0/setdefs.h. Simple fix: put "-I." in the CFLAGS prior to -I../dir0/. Hopefully, this will be helpful to some others. Damon From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 10:22: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 3792D16A4CE for ; Sat, 28 Aug 2004 10:22:30 +0000 (GMT) Received: from web50301.mail.yahoo.com (web50301.mail.yahoo.com [206.190.38.55]) by mx1.FreeBSD.org (Postfix) with SMTP id D4A8B43D55 for ; Sat, 28 Aug 2004 10:22:29 +0000 (GMT) (envelope-from sampaior@yahoo.com) Message-ID: <20040828102229.43947.qmail@web50301.mail.yahoo.com> Received: from [201.9.66.100] by web50301.mail.yahoo.com via HTTP; Sat, 28 Aug 2004 03:22:29 PDT Date: Sat, 28 Aug 2004 03:22:29 -0700 (PDT) From: Sam Paior To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: sysctl 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, 28 Aug 2004 10:22:30 -0000 Dear Friends, I'm using the FreeBsd5.2.1 How do I do to activate the OID? It shows the message: root# sysctl security.jail.allow_raw_sockets sysctl: unknown oid 'security.jail.allow_raw_sockets' Regards. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 18:14: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 50C6E16A4CE for ; Fri, 27 Aug 2004 18:14:10 +0000 (GMT) Received: from vsmtp12.tin.it (vsmtp12.tin.it [212.216.176.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id B77D543D1D for ; Fri, 27 Aug 2004 18:14:09 +0000 (GMT) (envelope-from flag@tin.it) Received: from southcross.homeunix.org (82.50.110.173) by vsmtp12.tin.it (7.0.027) id 40B33B7C012865E8 for freebsd-hackers@freebsd.org; Fri, 27 Aug 2004 20:14:09 +0200 Received: by southcross.homeunix.org (Postfix, from userid 1001) id 6D0A8209D; Fri, 27 Aug 2004 20:23:58 +0200 (CEST) Date: Fri, 27 Aug 2004 20:23:58 +0200 From: Paolo Pisati To: FreeBSD_Hackers Message-ID: <20040827182358.GA2114@tin.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Mailman-Approved-At: Sat, 28 Aug 2004 11:58:49 +0000 Subject: Library (ab)use in kernel land 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, 27 Aug 2004 18:14:10 -0000 As a general rule of thumb, which are the safe libraries we can link against while developing a kernel module? I mean, can i use libc functions? All of them? And what about the other libraries in the base system? Thanks. -- Paolo Italian FreeBSD User Group: http://www.gufi.org From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 13:09: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 A9E6016A4CE for ; Sat, 28 Aug 2004 13:09:31 +0000 (GMT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4052943D4C for ; Sat, 28 Aug 2004 13:09:31 +0000 (GMT) (envelope-from des@des.no) Received: from dwp.des.no (37.80-203-228.nextgentel.com [80.203.228.37]) by mail.broadpark.no (Postfix) with ESMTP id AD11D490E; Sat, 28 Aug 2004 15:10:07 +0200 (MEST) Received: by dwp.des.no (Postfix, from userid 2602) id 0773DB86E; Sat, 28 Aug 2004 15:09:30 +0200 (CEST) To: Paolo Pisati References: <20040827182358.GA2114@tin.it> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Sat, 28 Aug 2004 15:09:29 +0200 In-Reply-To: <20040827182358.GA2114@tin.it> (Paolo Pisati's message of "Fri, 27 Aug 2004 20:23:58 +0200") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable cc: FreeBSD_Hackers Subject: Re: Library (ab)use in kernel land 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, 28 Aug 2004 13:09:31 -0000 Paolo Pisati writes: > which are the safe libraries we can link against while developing a > kernel module? none. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 20:40:52 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 F225616A4CE for ; Sat, 28 Aug 2004 20:40:51 +0000 (GMT) Received: from web50903.mail.yahoo.com (web50903.mail.yahoo.com [206.190.38.123]) by mx1.FreeBSD.org (Postfix) with SMTP id 7AE6843D2D for ; Sat, 28 Aug 2004 20:40:51 +0000 (GMT) (envelope-from b_oshea@yahoo.com) Message-ID: <20040828204050.77238.qmail@web50903.mail.yahoo.com> Received: from [24.6.211.166] by web50903.mail.yahoo.com via HTTP; Sat, 28 Aug 2004 13:40:50 PDT Date: Sat, 28 Aug 2004 13:40:50 -0700 (PDT) From: Brian O'Shea To: FreeBSD_Hackers In-Reply-To: <20040827182358.GA2114@tin.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: Library (ab)use in kernel land 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, 28 Aug 2004 20:40:52 -0000 Hello Paolo, --- Paolo Pisati wrote: > > As a general rule of thumb, > which are the safe libraries we can link against > while developing a kernel module? The standard C libraries that we have all come to know and love can only be used from user space. This is mainly because many library functions call into the kernel (via the system call interface), and this is not necessary or appropriate from the perspective of kernel code (such as the kernel module that you are writing). Also, the assumptions that a programmer makes when writing kernel code with respect to memory allocation and efficiency of algorithms are different from those of an application programmer. For example, you wouldn't want to link an XML DOM parser into the kernel! :-O (however, grepping through the GEOM code reveals that apparently it can be made to dump its configuration information in XML format, presumablly to be parsed by a user-space configuratoin utility... sweet!) That being said, there are a few analogs of the standard C library functions in the kernel, such as printf, strcpy, bcmp, qsort, etc. You can find sources for them in src/sys/libkern/ with prototypes in the src/sys/sys/libkern.h and src/sys/sys/systm.h header files. Cheers, -brian ===== _______________________________ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush