From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 01:00:39 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B2E9837B401; Sun, 27 Jul 2003 01:00:39 -0700 (PDT) Received: from cueball.rtp.FreeBSD.org (cueball.rtp.FreeBSD.org [192.58.184.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 955B043F3F; Sun, 27 Jul 2003 01:00:38 -0700 (PDT) (envelope-from des+tinderbox@freebsd.org) Received: from cueball.rtp.FreeBSD.org (localhost [127.0.0.1]) h6R80bmM077881; Sun, 27 Jul 2003 04:00:38 -0400 (EDT) (envelope-from des+tinderbox@freebsd.org) Received: (from des@localhost) by cueball.rtp.FreeBSD.org (8.12.9/8.12.9/Submit) id h6R80b7w077880; Sun, 27 Jul 2003 04:00:37 -0400 (EDT) Date: Sun, 27 Jul 2003 04:00:37 -0400 (EDT) Message-Id: <200307270800.h6R80b7w077880@cueball.rtp.FreeBSD.org> X-Authentication-Warning: cueball.rtp.FreeBSD.org: des set sender to Tinderbox using -f Sender: Tinderbox From: Tinderbox To: current@freebsd.org, i386@freebsd.org Precedence: bulk Subject: [current tinderbox] failure on i386/i386 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 08:00:40 -0000 TB --- 2003-07-27 06:25:00 - starting CURRENT tinderbox run for i386/i386 TB --- 2003-07-27 06:25:00 - checking out the source tree TB --- cd /home/des/tinderbox/CURRENT/i386/i386 TB --- /usr/bin/cvs -f -R -q -d/home/ncvs update -Pd -A src TB --- 2003-07-27 06:28:41 - building world TB --- cd /home/des/tinderbox/CURRENT/i386/i386/src TB --- /usr/bin/make -B buildworld >>> Rebuilding the temporary build tree >>> stage 1: legacy release compatibility shims >>> stage 1: bootstrap tools >>> stage 2: cleaning up the object tree >>> stage 2: rebuilding the object tree >>> stage 2: build tools >>> stage 3: cross tools >>> stage 4: populating /home/des/tinderbox/CURRENT/i386/i386/obj/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/i386/usr/include >>> stage 4: building libraries >>> stage 4: make dependencies >>> stage 4: building everything.. TB --- 2003-07-27 07:34:15 - building generic kernel TB --- cd /home/des/tinderbox/CURRENT/i386/i386/src TB --- /usr/bin/make buildkernel KERNCONF=GENERIC >>> Kernel build for GENERIC started on Sun Jul 27 07:34:15 GMT 2003 >>> Kernel build for GENERIC completed on Sun Jul 27 07:48:41 GMT 2003 TB --- 2003-07-27 07:48:41 - generating LINT kernel config TB --- cd /home/des/tinderbox/CURRENT/i386/i386/src/sys/i386/conf TB --- /usr/bin/make -B LINT TB --- 2003-07-27 07:48:41 - building LINT kernel TB --- cd /home/des/tinderbox/CURRENT/i386/i386/src TB --- /usr/bin/make buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Sun Jul 27 07:48:42 GMT 2003 [...] cc -c -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -finline-limit=15000 -fno-builtin -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror -finstrument-functions -Wno-inline /vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/i386/isa/pcvt/pcvt_drv.c cc -c -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -finline-limit=15000 -fno-builtin -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror -finstrument-functions -Wno-inline /vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/i386/isa/pcvt/pcvt_ext.c cc -c -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -finline-limit=15000 -fno-builtin -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror -finstrument-functions -Wno-inline /vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/i386/isa/pcvt/pcvt_kbd.c cc -c -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -finline-limit=15000 -fno-builtin -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror -finstrument-functions -Wno-inline /vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/i386/isa/pcvt/pcvt_out.c cc -c -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -finline-limit=15000 -fno-builtin -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror -finstrument-functions -Wno-inline /vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/i386/isa/pcvt/pcvt_sup.c cc -c -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -finline-limit=15000 -fno-builtin -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror -finstrument-functions -Wno-inline /vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/i386/isa/pcvt/pcvt_vtf.c /vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/i386/isa/pcvt/pcvt_vtf.c: In function `vt_udk': /vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/i386/isa/pcvt/pcvt_vtf.c:1735: warning: comparison is always true due to limited range of data type *** Error code 1 Stop in /vol/vol0/users/des/tinderbox/CURRENT/i386/i386/obj/vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src/sys/LINT. *** Error code 1 Stop in /vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src. *** Error code 1 Stop in /vol/vol0/users/des/tinderbox/CURRENT/i386/i386/src. TB --- 2003-07-27 08:00:37 - /usr/bin/make returned exit code 1 TB --- 2003-07-27 08:00:37 - ERROR: failed to build lint kernel TB --- 2003-07-27 08:00:37 - tinderbox aborted From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 07:37:02 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0ADCB37B401 for ; Sun, 27 Jul 2003 07:37:02 -0700 (PDT) Received: from mailhost1.dircon.co.uk (mailhost1.dircon.co.uk [194.112.32.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5384C43F75 for ; Sun, 27 Jul 2003 07:37:01 -0700 (PDT) (envelope-from mark@exonetric.com) Received: from exonetric.com (unknown [195.157.223.200]) by mailhost1.dircon.co.uk (Postfix) with ESMTP id 89A21246662; Sun, 27 Jul 2003 15:36:58 +0100 (BST) Date: Sun, 27 Jul 2003 15:37:01 +0100 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) To: Gary Jennejohn From: Mark Blackman In-Reply-To: <200307262102.h6QL2nPD012268@peedub.jennejohn.org> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.552) cc: freebsd-current@freebsd.org Subject: Re: device driver memory leak in 5.1-20030726? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 14:37:02 -0000 On Saturday, July 26, 2003, at 10:02 PM, Gary Jennejohn wrote: > > Mark Blackman writes: >> I'm seeing the same 'kmem_malloc(4096): kmem_map too small: XXXXX >> total >> allocated' >> messages that a few other have reported. > [snip] >> From these symptoms, I'm speculating that one or more device drivers >> are producing kernel memory leaks and either triggering the >> 'kmem_map too small' messages or pushing all of the userland processes >> out of the way. Is this a reasonable interpretation? >> >> Does anyone else see symptoms that might lead to this conclusion? >> > > I'm seeing exactly the same thing when I try to access my Archos > Jukebox (a USB 2.0 device). This didn't happen with a kernel made > before July 20, although I can't say when exactly the leak (if there > is one) was introduced, since I only make a new kernel every few > weeks. > > Eventually usb_allocmem fails and shortly thereafter I get the > ``kmem_map > too small'' panic. > > Unfortunately, panicing in ddb results in a hang - no crashdump. > > --- > Gary Jennejohn / garyj[at]jennejohn.org gj[at]freebsd.org gj[at]denx.de > > Perhaps it's a USB bug. There seems to be some correspondence between the use of the USB Speedtouch ADSL modem and the out-of-control devbuf allocations. Mark Blackman Exonetric Consulting From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 07:44:09 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B27BF37B401 for ; Sun, 27 Jul 2003 07:44:09 -0700 (PDT) Received: from mailbox.univie.ac.at (mailbox.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id C487543FB1 for ; Sun, 27 Jul 2003 07:44:08 -0700 (PDT) (envelope-from l.ertl@univie.ac.at) Received: from dialin202.cc.univie.ac.at (dialin202.cc.univie.ac.at [131.130.202.202]) by mailbox.univie.ac.at (8.12.2/8.12.2) with ESMTP id h6REhiYd131908; Sun, 27 Jul 2003 16:43:54 +0200 Date: Sun, 27 Jul 2003 16:43:32 +0200 (CEST) From: Lukas Ertl To: Mark Blackman In-Reply-To: Message-ID: <20030727163914.S698@korben.in.tern> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-DCC-ZID-Univie-Metrics: mailbox 4246; Body=0 Fuz1=0 Fuz2=0 cc: Gary Jennejohn cc: freebsd-current@freebsd.org Subject: Re: device driver memory leak in 5.1-20030726? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 14:44:10 -0000 On Sun, 27 Jul 2003, Mark Blackman wrote: > Perhaps it's a USB bug. There seems to be some correspondence between > the use of the USB Speedtouch ADSL modem and the out-of-control > devbuf allocations. I'm too seeing these annoying kmem_malloc panics on recent -current kernels. The laptop I'm using is way off of being overloaded at all, the only thing I do is going online using a Bluetooth USB dongle. As soon as I generate some network traffic, devbuf allocations go up, until at some point the machine panics randomly in kmem_malloc. I have different core dumps and backtraces available, but they don't seem to be of much use in this case. I really suspect the USB stuff to be leaking. regards, le -- Lukas Ertl eMail: l.ertl@univie.ac.at UNIX Systemadministrator Tel.: (+43 1) 4277-14073 Vienna University Computer Center Fax.: (+43 1) 4277-9140 University of Vienna http://mailbox.univie.ac.at/~le/ From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 07:54:48 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5336337B401 for ; Sun, 27 Jul 2003 07:54:48 -0700 (PDT) Received: from godel.mtl.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70D6343F93 for ; Sun, 27 Jul 2003 07:54:47 -0700 (PDT) (envelope-from bmilekic@technokratis.com) Received: from godel.mtl.distributel.net (localhost [127.0.0.1]) h6RAxPaA032662; Sun, 27 Jul 2003 10:59:25 GMT (envelope-from bmilekic@technokratis.com) Received: (from bmilekic@localhost) by godel.mtl.distributel.net (8.12.9/8.12.9/Submit) id h6RAxPmb032661; Sun, 27 Jul 2003 10:59:25 GMT X-Authentication-Warning: godel.mtl.distributel.net: bmilekic set sender to bmilekic@technokratis.com using -f Date: Sun, 27 Jul 2003 10:59:25 +0000 From: Bosko Milekic To: Stephane Raimbault Message-ID: <20030727105925.GA32626@technokratis.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i cc: current@freebsd.org Subject: Re: FreeBSD 5.1-R kernel panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 14:54:48 -0000 On Sat, Jul 26, 2003 at 10:48:21PM -0600, Stephane Raimbault wrote: > Well, I had compiled "options DDB" into the kernel and today the kernel > panic'd... here is what I got. I ran the following in the db> prompt. > "trace", "show reg", "ps". Let me know if this is the kind of information > you need, and if there is anything else I need to provide... can I > re-compile the kernel without the "options DDB" now, or should I provide the > same info next time in panic's to confirm it's the same problem? > > Thanks, > Stephane. > > I've attached the file debug.txt which contains the panic info. Let me know > if you need it in a different format. > > Thanks again, > Stephane Raimbault. Are you using USB? Approximately 2 weeks ago, some changes were introduced into the USB code which could in some scenarios mean a depletion of kmem_map. I've glanced at usb_mem.c and it appears that the USB code 'caches' everything that it allocates into a couple of lists it maintains locally. This prevents UMA from seeing the freed memory and, from the point of view of the VM, the memory is never reclaimed. I am unsure as to whether or not the memory allocated by the USB stuff needs to be type stable so I can't really fix this. I urge the USB authors to glance there. If you are using USB, try turning it off to see if the panic persists. If not, then we'll have to look elsewhere. Regards, -- Bosko Milekic * bmilekic@technokratis.com * bmilekic@FreeBSD.org TECHNOkRATIS Consulting Services * http://www.technokratis.com/ From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 08:49:08 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FA7937B404 for ; Sun, 27 Jul 2003 08:49:08 -0700 (PDT) Received: from godel.mtl.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED4B743F75 for ; Sun, 27 Jul 2003 08:49:06 -0700 (PDT) (envelope-from bmilekic@technokratis.com) Received: from godel.mtl.distributel.net (localhost [127.0.0.1]) h6RBriaA032875; Sun, 27 Jul 2003 11:53:44 GMT (envelope-from bmilekic@technokratis.com) Received: (from bmilekic@localhost) by godel.mtl.distributel.net (8.12.9/8.12.9/Submit) id h6RBriww032874; Sun, 27 Jul 2003 11:53:44 GMT X-Authentication-Warning: godel.mtl.distributel.net: bmilekic set sender to bmilekic@technokratis.com using -f Date: Sun, 27 Jul 2003 11:53:44 +0000 From: Bosko Milekic To: Lukas Ertl Message-ID: <20030727115344.GA32848@technokratis.com> References: <20030727163914.S698@korben.in.tern> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030727163914.S698@korben.in.tern> User-Agent: Mutt/1.4.1i cc: Gary Jennejohn cc: freebsd-current@freebsd.org cc: Mark Blackman Subject: Re: device driver memory leak in 5.1-20030726? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 15:49:08 -0000 On Sun, Jul 27, 2003 at 04:43:32PM +0200, Lukas Ertl wrote: > On Sun, 27 Jul 2003, Mark Blackman wrote: > > > Perhaps it's a USB bug. There seems to be some correspondence between > > the use of the USB Speedtouch ADSL modem and the out-of-control > > devbuf allocations. > > I'm too seeing these annoying kmem_malloc panics on recent -current > kernels. The laptop I'm using is way off of being overloaded at all, the > only thing I do is going online using a Bluetooth USB dongle. As soon as I > generate some network traffic, devbuf allocations go up, until at some > point the machine panics randomly in kmem_malloc. > > I have different core dumps and backtraces available, but they don't seem > to be of much use in this case. I really suspect the USB stuff to be > leaking. > > regards, > le There are two problems. 1) The USB code never frees the stuff it allocates; 2) The USB code places the stuff it allocates into a couple of lists unprotected by any mutexes. It should at a minimum assert that Giant is held coming in, at all times. > -- > Lukas Ertl eMail: l.ertl@univie.ac.at > UNIX Systemadministrator Tel.: (+43 1) 4277-14073 > Vienna University Computer Center Fax.: (+43 1) 4277-9140 > University of Vienna http://mailbox.univie.ac.at/~le/ -- Bosko Milekic * bmilekic@technokratis.com * bmilekic@FreeBSD.org TECHNOkRATIS Consulting Services * http://www.technokratis.com/ From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 10:21:59 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B41DD37B401; Sun, 27 Jul 2003 10:21:59 -0700 (PDT) Received: from cueball.rtp.FreeBSD.org (cueball.rtp.FreeBSD.org [192.58.184.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB24643F93; Sun, 27 Jul 2003 10:21:58 -0700 (PDT) (envelope-from des+tinderbox@freebsd.org) Received: from cueball.rtp.FreeBSD.org (localhost [127.0.0.1]) h6RHLvmM008724; Sun, 27 Jul 2003 13:21:58 -0400 (EDT) (envelope-from des+tinderbox@freebsd.org) Received: (from des@localhost) by cueball.rtp.FreeBSD.org (8.12.9/8.12.9/Submit) id h6RHLvfx008723; Sun, 27 Jul 2003 13:21:57 -0400 (EDT) Date: Sun, 27 Jul 2003 13:21:57 -0400 (EDT) Message-Id: <200307271721.h6RHLvfx008723@cueball.rtp.FreeBSD.org> X-Authentication-Warning: cueball.rtp.FreeBSD.org: des set sender to Tinderbox using -f Sender: Tinderbox From: Tinderbox To: current@freebsd.org, alpha@freebsd.org Precedence: bulk Subject: [current tinderbox] failure on alpha/alpha X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 17:22:00 -0000 TB --- 2003-07-27 16:00:01 - starting CURRENT tinderbox run for alpha/alpha TB --- 2003-07-27 16:00:01 - checking out the source tree TB --- cd /home/des/tinderbox/CURRENT/alpha/alpha TB --- /usr/bin/cvs -f -R -q -d/home/ncvs update -Pd -A src TB --- 2003-07-27 16:01:57 - building world TB --- cd /home/des/tinderbox/CURRENT/alpha/alpha/src TB --- /usr/bin/make -B buildworld >>> Rebuilding the temporary build tree >>> stage 1: legacy release compatibility shims >>> stage 1: bootstrap tools >>> stage 2: cleaning up the object tree >>> stage 2: rebuilding the object tree >>> stage 2: build tools >>> stage 3: cross tools >>> stage 4: populating /home/des/tinderbox/CURRENT/alpha/alpha/obj/alpha/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/i386/usr/include >>> stage 4: building libraries >>> stage 4: make dependencies >>> stage 4: building everything.. TB --- 2003-07-27 17:07:06 - building generic kernel TB --- cd /home/des/tinderbox/CURRENT/alpha/alpha/src TB --- /usr/bin/make buildkernel KERNCONF=GENERIC >>> Kernel build for GENERIC started on Sun Jul 27 17:07:06 GMT 2003 >>> Kernel build for GENERIC completed on Sun Jul 27 17:18:54 GMT 2003 TB --- 2003-07-27 17:18:54 - generating LINT kernel config TB --- cd /home/des/tinderbox/CURRENT/alpha/alpha/src/sys/alpha/conf TB --- /usr/bin/make -B LINT TB --- 2003-07-27 17:18:54 - building LINT kernel TB --- cd /home/des/tinderbox/CURRENT/alpha/alpha/src TB --- /usr/bin/make buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Sun Jul 27 17:18:54 GMT 2003 [...] cc -c -O -pipe -mcpu=ev4 -mtune=ev5 -mieee -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-builtin -mno-fp-regs -ffixed-8 -Wa,-mev6 -ffreestanding -Werror /vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev/advansys/adwlib.c cc -c -O -pipe -mcpu=ev4 -mtune=ev5 -mieee -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-builtin -mno-fp-regs -ffixed-8 -Wa,-mev6 -ffreestanding -Werror /vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev/advansys/adwmcode.c cc -c -O -pipe -mcpu=ev4 -mtune=ev5 -mieee -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-builtin -mno-fp-regs -ffixed-8 -Wa,-mev6 -ffreestanding -Werror /vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev/aha/aha.c cc -c -O -pipe -mcpu=ev4 -mtune=ev5 -mieee -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-builtin -mno-fp-regs -ffixed-8 -Wa,-mev6 -ffreestanding -Werror /vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev/aha/aha_isa.c cc -c -O -pipe -mcpu=ev4 -mtune=ev5 -mieee -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-builtin -mno-fp-regs -ffixed-8 -Wa,-mev6 -ffreestanding -Werror /vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev/ahb/ahb.c /vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev/ahb/ahb.c: In function `ahbecbptov': /vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev/ahb/ahb.c:143: warning: cast to pointer from integer of different size /vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/dev/ahb/ahb.c:143: warning: cast to pointer from integer of different size *** Error code 1 Stop in /vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/obj/alpha/vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src/sys/LINT. *** Error code 1 Stop in /vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src. *** Error code 1 Stop in /vol/vol0/users/des/tinderbox/CURRENT/alpha/alpha/src. TB --- 2003-07-27 17:21:57 - /usr/bin/make returned exit code 1 TB --- 2003-07-27 17:21:57 - ERROR: failed to build lint kernel TB --- 2003-07-27 17:21:57 - tinderbox aborted From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 11:24:49 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6251D37B401; Sun, 27 Jul 2003 11:24:49 -0700 (PDT) Received: from cueball.rtp.FreeBSD.org (cueball.rtp.FreeBSD.org [192.58.184.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 822A043FAF; Sun, 27 Jul 2003 11:24:48 -0700 (PDT) (envelope-from des+tinderbox@freebsd.org) Received: from cueball.rtp.FreeBSD.org (localhost [127.0.0.1]) h6RIOlmM007201; Sun, 27 Jul 2003 14:24:47 -0400 (EDT) (envelope-from des+tinderbox@freebsd.org) Received: (from des@localhost) by cueball.rtp.FreeBSD.org (8.12.9/8.12.9/Submit) id h6RIOlba007200; Sun, 27 Jul 2003 14:24:47 -0400 (EDT) Date: Sun, 27 Jul 2003 14:24:47 -0400 (EDT) Message-Id: <200307271824.h6RIOlba007200@cueball.rtp.FreeBSD.org> X-Authentication-Warning: cueball.rtp.FreeBSD.org: des set sender to Tinderbox using -f Sender: Tinderbox From: Tinderbox To: current@freebsd.org, amd64@freebsd.org Precedence: bulk Subject: [current tinderbox] failure on amd64/amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 18:24:49 -0000 TB --- 2003-07-27 17:21:58 - starting CURRENT tinderbox run for amd64/amd64 TB --- 2003-07-27 17:21:58 - checking out the source tree TB --- cd /home/des/tinderbox/CURRENT/amd64/amd64 TB --- /usr/bin/cvs -f -R -q -d/home/ncvs update -Pd -A src TB --- 2003-07-27 17:23:54 - building world TB --- cd /home/des/tinderbox/CURRENT/amd64/amd64/src TB --- /usr/bin/make -B buildworld >>> Rebuilding the temporary build tree >>> stage 1: legacy release compatibility shims >>> stage 1: bootstrap tools >>> stage 2: cleaning up the object tree >>> stage 2: rebuilding the object tree >>> stage 2: build tools >>> stage 3: cross tools >>> stage 4: populating /home/des/tinderbox/CURRENT/amd64/amd64/obj/amd64/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/i386/usr/include >>> stage 4: building libraries >>> stage 4: make dependencies >>> stage 4: building everything.. TB --- 2003-07-27 18:23:48 - building generic kernel TB --- cd /home/des/tinderbox/CURRENT/amd64/amd64/src TB --- /usr/bin/make buildkernel KERNCONF=GENERIC >>> Kernel build for GENERIC started on Sun Jul 27 18:23:48 GMT 2003 [...] cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Werror /vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/cam/scsi/scsi_ch.c cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Werror /vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/cam/scsi/scsi_da.c cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Werror /vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/cam/scsi/scsi_pass.c cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Werror /vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/cam/scsi/scsi_sa.c cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Werror /vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/cam/scsi/scsi_ses.c cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/dev -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/acpica -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/ipfilter -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/ath -I/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Werror /vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/acpica/dbcmds.c /vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/acpica/dbcmds.c: In function `AcpiDbGenerateGpe': /vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/contrib/dev/acpica/dbcmds.c:1295: warning: cast to pointer from integer of different size *** Error code 1 Stop in /vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/obj/amd64/vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src/sys/GENERIC. *** Error code 1 Stop in /vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src. *** Error code 1 Stop in /vol/vol0/users/des/tinderbox/CURRENT/amd64/amd64/src. TB --- 2003-07-27 18:24:47 - /usr/bin/make returned exit code 1 TB --- 2003-07-27 18:24:47 - ERROR: failed to build generic kernel TB --- 2003-07-27 18:24:47 - tinderbox aborted From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 12:01:26 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE55D37B404 for ; Sun, 27 Jul 2003 12:01:26 -0700 (PDT) Received: from hotmail.com (law10-oe28.law10.hotmail.com [64.4.14.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 949D943FA3 for ; Sun, 27 Jul 2003 12:01:25 -0700 (PDT) (envelope-from segr@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 27 Jul 2003 12:01:25 -0700 Received: from 142.173.139.189 by law10-oe28.law10.hotmail.com with DAV; Sun, 27 Jul 2003 19:01:24 +0000 X-Originating-IP: [142.173.139.189] X-Originating-Email: [segr@hotmail.com] From: "Stephane Raimbault" To: "Bosko Milekic" References: Date: Sun, 27 Jul 2003 13:01:03 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: X-OriginalArrivalTime: 27 Jul 2003 19:01:25.0267 (UTC) FILETIME=[7A13EE30:01C35471] cc: current@freebsd.org Subject: Re: FreeBSD 5.1-R kernel panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 19:01:27 -0000 Hi Bosko, Thanks for your response. I do not use USB on the system... I'll try removing those devices from the kernel and see if the problem continues. I will let you know. Thanks, Stephane Raimbault. ----- Original Message ----- From: "Bosko Milekic" Newsgroups: mailing.freebsd.current Sent: Sunday, July 27, 2003 8:56 Subject: Re: FreeBSD 5.1-R kernel panic > > On Sat, Jul 26, 2003 at 10:48:21PM -0600, Stephane Raimbault wrote: > > Well, I had compiled "options DDB" into the kernel and today the kernel > > panic'd... here is what I got. I ran the following in the db> prompt. > > "trace", "show reg", "ps". Let me know if this is the kind of information > > you need, and if there is anything else I need to provide... can I > > re-compile the kernel without the "options DDB" now, or should I provide the > > same info next time in panic's to confirm it's the same problem? > > > > Thanks, > > Stephane. > > > > I've attached the file debug.txt which contains the panic info. Let me know > > if you need it in a different format. > > > > Thanks again, > > Stephane Raimbault. > > Are you using USB? > > Approximately 2 weeks ago, some changes were introduced into the USB > code which could in some scenarios mean a depletion of kmem_map. I've > glanced at usb_mem.c and it appears that the USB code 'caches' > everything that it allocates into a couple of lists it maintains > locally. This prevents UMA from seeing the freed memory and, from the > point of view of the VM, the memory is never reclaimed. > > I am unsure as to whether or not the memory allocated by the USB stuff > needs to be type stable so I can't really fix this. I urge the USB > authors to glance there. > > If you are using USB, try turning it off to see if the panic persists. > If not, then we'll have to look elsewhere. > > Regards, > -- > Bosko Milekic * bmilekic@technokratis.com * bmilekic@FreeBSD.org > TECHNOkRATIS Consulting Services * http://www.technokratis.com/ > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 12:14:54 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6308737B401 for ; Sun, 27 Jul 2003 12:14:54 -0700 (PDT) Received: from peedub.jennejohn.org (p213.54.227.172.tisdip.tiscali.de [213.54.227.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19AA243FA3 for ; Sun, 27 Jul 2003 12:14:53 -0700 (PDT) (envelope-from garyj@jennejohn.org) Received: from peedub.jennejohn.org (localhost [127.0.0.1]) by peedub.jennejohn.org (8.12.9/8.11.6) with ESMTP id h6RJEjjr001156; Sun, 27 Jul 2003 21:14:46 +0200 (CEST) (envelope-from garyj@peedub.jennejohn.org) Message-Id: <200307271914.h6RJEjjr001156@peedub.jennejohn.org> X-Mailer: exmh version 2.6.3 04/04/2003 with nmh-1.0.4 To: Lukas Ertl In-Reply-To: Message from Lukas Ertl of "Sun, 27 Jul 2003 16:43:32 +0200." <20030727163914.S698@korben.in.tern> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 27 Jul 2003 21:14:45 +0200 From: Gary Jennejohn cc: freebsd-current@freebsd.org cc: Mark Blackman Subject: Re: device driver memory leak in 5.1-20030726? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 19:14:54 -0000 Lukas Ertl writes: > On Sun, 27 Jul 2003, Mark Blackman wrote: > > > Perhaps it's a USB bug. There seems to be some correspondence between > > the use of the USB Speedtouch ADSL modem and the out-of-control > > devbuf allocations. > > I'm too seeing these annoying kmem_malloc panics on recent -current > kernels. The laptop I'm using is way off of being overloaded at all, the > only thing I do is going online using a Bluetooth USB dongle. As soon as I > generate some network traffic, devbuf allocations go up, until at some > point the machine panics randomly in kmem_malloc. > > I have different core dumps and backtraces available, but they don't seem > to be of much use in this case. I really suspect the USB stuff to be > leaking. > I did some playing around today with various kernels. A kernel from July 12 at 12:01 works just fine. A kernel from July 15 at 23:30 hangs (with the IRQ9 thread and g_down each using 50% of the CPU). Killing the mount with ^C leaves the (in my case) mount_msdos hung in the background and it's un-killable. It's probably stuck waiting for USB. A kernel from July 16 at 12:01 exhibits similar symptoms to the kernel from July 15. July 15 is about the time that a massive update of the USB code from NetBSD was made. I didn't try kernels from July 13 or July 14. I've observed other problems with -current: 1) mount_msdos results in a kernel panic (NULL pointer deref) 2) mounting linuxprocfs also results in a panic At the moment I'm running a world from July 15 and a kernel from July 12. --- Gary Jennejohn / garyj[at]jennejohn.org gj[at]freebsd.org gj[at]denx.de From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 12:18:29 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 057D637B401 for ; Sun, 27 Jul 2003 12:18:29 -0700 (PDT) Received: from mail.cyberonic.com (mail.cyberonic.com [4.17.179.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15BB343F85 for ; Sun, 27 Jul 2003 12:18:28 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (node-40244c0a.sfo.onnet.us.uu.net [64.36.76.10]) by mail.cyberonic.com (8.12.8/8.12.5) with ESMTP id h6RJnl0n012798; Sun, 27 Jul 2003 15:49:48 -0400 Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.9/8.11.6) id h6RJHwo3082135; Sun, 27 Jul 2003 12:17:58 -0700 (PDT) (envelope-from jmg) Date: Sun, 27 Jul 2003 12:17:58 -0700 From: John-Mark Gurney To: Lukas Ertl Message-ID: <20030727191758.GN10708@funkthat.com> Mail-Followup-To: Lukas Ertl , Mark Blackman , Gary Jennejohn , freebsd-current@freebsd.org References: <20030727163914.S698@korben.in.tern> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030727163914.S698@korben.in.tern> 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: Gary Jennejohn cc: freebsd-current@freebsd.org cc: Mark Blackman Subject: Re: device driver memory leak in 5.1-20030726? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 19:18:29 -0000 Lukas Ertl wrote this message on Sun, Jul 27, 2003 at 16:43 +0200: > On Sun, 27 Jul 2003, Mark Blackman wrote: > > > Perhaps it's a USB bug. There seems to be some correspondence between > > the use of the USB Speedtouch ADSL modem and the out-of-control > > devbuf allocations. > > I'm too seeing these annoying kmem_malloc panics on recent -current > kernels. The laptop I'm using is way off of being overloaded at all, the > only thing I do is going online using a Bluetooth USB dongle. As soon as I > generate some network traffic, devbuf allocations go up, until at some > point the machine panics randomly in kmem_malloc. I must note that the USB changes only allocates memory in the M_USB area which is described by: usb.c:MALLOC_DEFINE(M_USB, "USB", "USB"); So, that means it wouldn't be in the devbuf area. (This is the one of the points of malloc areas is to help track down stray allocations and memory leaks). > I have different core dumps and backtraces available, but they don't seem > to be of much use in this case. I really suspect the USB stuff to be > leaking. It may be leaking, but it won't be leaking devbuf memory. The only thing that is in usb (in dev/usb) that uses M_DEVBUF is ukbd. -- 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-current@FreeBSD.ORG Sun Jul 27 12:22:07 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8E4137B401 for ; Sun, 27 Jul 2003 12:22:07 -0700 (PDT) Received: from peedub.jennejohn.org (p213.54.227.172.tisdip.tiscali.de [213.54.227.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 641C143FB1 for ; Sun, 27 Jul 2003 12:22:06 -0700 (PDT) (envelope-from garyj@jennejohn.org) Received: from peedub.jennejohn.org (localhost [127.0.0.1]) by peedub.jennejohn.org (8.12.9/8.11.6) with ESMTP id h6RJM2jr001268; Sun, 27 Jul 2003 21:22:02 +0200 (CEST) (envelope-from garyj@peedub.jennejohn.org) Message-Id: <200307271922.h6RJM2jr001268@peedub.jennejohn.org> X-Mailer: exmh version 2.6.3 04/04/2003 with nmh-1.0.4 To: freebsd-current@freebsd.org In-Reply-To: Message from Gary Jennejohn <200307271914.h6RJEjjr001156@peedub.jennejohn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 27 Jul 2003 21:22:02 +0200 From: Gary Jennejohn cc: Mark Blackman cc: Lukas Ertl Subject: Re: device driver memory leak in 5.1-20030726? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 19:22:07 -0000 Gary Jennejohn writes: > I've observed other problems with -current: > 1) mount_msdos results in a kernel panic (NULL pointer deref) > 2) mounting linuxprocfs also results in a panic > Replying to myself. (2) is wrong. It doesn't panic, it just fails with a message that linuxprocfs doesn't support the new mount. --- Gary Jennejohn / garyj[at]jennejohn.org gj[at]freebsd.org gj[at]denx.de From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 13:25:28 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A868D37B401 for ; Sun, 27 Jul 2003 13:25:28 -0700 (PDT) Received: from gate.volant.org (gate.volant.org [207.111.218.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51EAE43F3F for ; Sun, 27 Jul 2003 13:25:28 -0700 (PDT) (envelope-from patl+freebsd@volant.org) Received: from 64-144-229-193.client.dsl.net ([64.144.229.193] helo=[192.168.0.13]) by gate.volant.org with asmtp (TLSv1:DES-CBC3-SHA:168) (Exim 3.33 #1) id 19gs59-0003of-00 for current@freebsd.org; Sun, 27 Jul 2003 13:25:27 -0700 Date: Sun, 27 Jul 2003 13:25:26 -0700 From: Pat Lashley To: current@freebsd.org Message-ID: <1454962704.1059337526@mccaffrey.phoenix.volant.org> X-Mailer: Mulberry/3.1.0b4 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: SSH from host to jail X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 20:25:28 -0000 I'm trying to set up some jails in a 5.1R system. I've pretty much copied a setup that was working fine in 4.8; but on 5.1 I can't seem to SSH from the host system into one of its jails. It acts like the packets just aren't getting through. I would really appreciate it if somebody would send me rc.conf fragments that are known to work for setting up a jail's IP alias and routing on 5.1. Thanks, -Pat From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 13:32:52 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B42237B401 for ; Sun, 27 Jul 2003 13:32:52 -0700 (PDT) Received: from phk.freebsd.dk (phk.freebsd.dk [212.242.86.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D73243FA3 for ; Sun, 27 Jul 2003 13:32:51 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by phk.freebsd.dk (8.12.8/8.12.8) with ESMTP id h6RKWnV3030848; Sun, 27 Jul 2003 20:32:49 GMT (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h6RKWm5H066006; Sun, 27 Jul 2003 22:32:49 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: John Stockdale From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 27 Jul 2003 17:56:23 +1200." <0D8BEE11-BFF7-11D7-B8B6-000393A6EB58@stanford.edu> Date: Sun, 27 Jul 2003 22:32:48 +0200 Message-ID: <66005.1059337968@critter.freebsd.dk> cc: freebsd-current@freebsd.org Subject: Re: Feasibility/Practicality of using GBDE to facilitate encrypted swap, md, /tmp, filesystems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 20:32:52 -0000 In message <0D8BEE11-BFF7-11D7-B8B6-000393A6EB58@stanford.edu>, John Stockdale writes: >Hopefully PHK has a chance to look this one over, but if anyone else >has any thoughts I'll take any opinions I can get. ;) I have a number of operations I plan to add to the gbde tool, but some of them has be a bit worried about their foot-shooting potential so I'm still thinking about them, and rather than go over the program twice, I'm holding on to the easy ones until I'm ready to do them all. The one operation which is a no-brainer so to speak is the "one time attach" where the gbde device is init'ed and attached but the master key and lock sector is never written to the device. This is the mode you want to use for paging devices. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 14:15:41 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB75937B401 for ; Sun, 27 Jul 2003 14:15:41 -0700 (PDT) Received: from ms-smtp-01.southeast.rr.com (ms-smtp-01.southeast.rr.com [24.93.67.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8637043F75 for ; Sun, 27 Jul 2003 14:15:40 -0700 (PDT) (envelope-from marcus@marcuscom.com) Received: from creme-brulee.marcuscom.com (rdu57-17-158.nc.rr.com [66.57.17.158])h6RL9FpM029601 for ; Sun, 27 Jul 2003 17:09:15 -0400 (EDT) Received: from [192.168.1.9] (gyros.marcuscom.com [192.168.1.9]) h6RLFX9u006833 for ; Sun, 27 Jul 2003 17:15:34 -0400 (EDT) (envelope-from marcus@marcuscom.com) From: Joe Marcus Clarke To: current@freebsd.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-xl/i2D02ybTrPu+Juo5I" Organization: MarcusCom, Inc. Message-Id: <1059340538.795.22.camel@gyros> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 27 Jul 2003 17:15:38 -0400 X-Spam-Status: No, hits=-10.3 required=5.0 tests=BAYES_01,PGP_SIGNATURE_2,USER_AGENT_XIMIAN autolearn=ham version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: [PATCH] Add support for the Intel 852 chipset X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 21:15:42 -0000 --=-xl/i2D02ybTrPu+Juo5I Content-Type: multipart/mixed; boundary="=-i9uKYyx0i6WY+hhcWVwH" --=-i9uKYyx0i6WY+hhcWVwH Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Here is a bad that adds i852 support to the AGP system. This seems to work fine on my Dell 5150. Others may want to double-check this first since this isn't my area of expertise. Joe --=20 PGP Key : http://www.marcuscom.com/pgp.asc --=-i9uKYyx0i6WY+hhcWVwH Content-Disposition: attachment; filename=agp_intel.c.diff Content-Transfer-Encoding: base64 Content-Type: text/plain; name=agp_intel.c.diff; charset=ISO-8859-1 LS0tIHNyYy9zeXMvcGNpL2FncF9pbnRlbC5jLm9yaWcJU2F0IEp1bCAyNiAwMDoyODozNCAyMDAz DQorKysgc3JjL3N5cy9wY2kvYWdwX2ludGVsLmMJU2F0IEp1bCAyNiAwMDoyODozOSAyMDAzDQpA QCAtOTksNiArOTksOSBAQA0KIA0KIAljYXNlIDB4MjUzMDgwODY6DQogCQlyZXR1cm4gKCJJbnRl bCA4Mjg1MCBob3N0IHRvIEFHUCBicmlkZ2UiKTsNCisJDQorCWNhc2UgMHgzNTgwODA4NjoNCisJ CXJldHVybiAoIkludGVsIDgyODUyIGhvc3QgdG8gQUdQIGJyaWRnZSIpOw0KIA0KIAljYXNlIDB4 MzM0MDgwODY6DQogCQlyZXR1cm4gKCJJbnRlbCA4Mjg1NSBob3N0IHRvIEFHUCBicmlkZ2UiKTsN CkBAIC0yMDksNiArMjEyLDcgQEANCiAJCWJyZWFrOw0KIA0KIAljYXNlIDB4MWEzMDgwODY6IC8q IGk4NDUgKi8NCisJY2FzZSAweDM1ODA4MDg2OiAvKiBpODUyICovDQogCWNhc2UgMHgzMzQwODA4 NjogLyogaTg1NSAqLw0KIAljYXNlIDB4MjU3MDgwODY6IC8qIGk4NjUgKi8NCiAJY2FzZSAweDI1 Nzg4MDg2OiAvKiBpODc1UCAqLw0KQEAgLTIzMiw2ICsyMzYsNyBAQA0KIAljYXNlIDB4MjUwMTgw ODY6IC8qIGk4MjAgKi8NCiAJY2FzZSAweDFhMzA4MDg2OiAvKiBpODQ1ICovDQogCWNhc2UgMHgy NTMwODA4NjogLyogaTg1MCAqLw0KKwljYXNlIDB4MzU4MDgwODY6IC8qIGk4NTIgKi8NCiAJY2Fz ZSAweDMzNDA4MDg2OiAvKiBpODU1ICovDQogCWNhc2UgMHgyNTMxODA4NjogLyogaTg2MCAqLw0K IAljYXNlIDB4MjU3MDgwODY6IC8qIGk4NjUgKi8NCkBAIC0yNzgsNiArMjgzLDcgQEANCiAJCQkJ JiB+KDEgPDwgMSkpLCAxKTsNCiANCiAJY2FzZSAweDFhMzA4MDg2OiAvKiBpODQ1ICovDQorCWNh c2UgMHgzNTgwODA4NjogLyogaTg1MiAqLw0KIAljYXNlIDB4MzM0MDgwODY6IC8qIGk4NTUgKi8N CiAJY2FzZSAweDI1NzA4MDg2OiAvKiBpODY1ICovDQogCWNhc2UgMHgyNTc4ODA4NjogLyogaTg3 NVAgKi8NCg== --=-i9uKYyx0i6WY+hhcWVwH-- --=-xl/i2D02ybTrPu+Juo5I Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA/JED6b2iPiv4Uz4cRAhDYAJ9pO2RUPwQng0KXjvVTokkdCs2NGwCbBV5V V61u+q3fp68ZdXOrNGDLFzU= =7OTv -----END PGP SIGNATURE----- --=-xl/i2D02ybTrPu+Juo5I-- From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 14:29:02 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C3A6837B401 for ; Sun, 27 Jul 2003 14:29:02 -0700 (PDT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id D649C43F3F for ; Sun, 27 Jul 2003 14:29:00 -0700 (PDT) (envelope-from diz@linuxpowered.com) Received: from linuxpowered.com (12-238-113-137.client.attbi.com[12.238.113.137](untrusted sender)) by comcast.net (rwcrmhc12) with SMTP id <2003072721290001400ck1uve> (Authid: jdisnard); Sun, 27 Jul 2003 21:29:00 +0000 Message-ID: <3F24440C.1000005@linuxpowered.com> Date: Sun, 27 Jul 2003 16:28:44 -0500 From: Jon Disnard User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pat Lashley References: <1454962704.1059337526@mccaffrey.phoenix.volant.org> In-Reply-To: <1454962704.1059337526@mccaffrey.phoenix.volant.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: Re: SSH from host to jail X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 21:29:03 -0000 Pat Lashley wrote: > I'm trying to set up some jails in a 5.1R system. I've pretty much > copied a setup that was working fine in 4.8; but on 5.1 I can't seem > to SSH from the host system into one of its jails. It acts like the > packets just aren't getting through. > > I would really appreciate it if somebody would send me rc.conf fragments > that are known to work for setting up a jail's IP alias and routing on > 5.1. sure, but this isn't going to fix your problem: ifconfig_wi0="inet 192.168.0.140 netmask 255.255.255.0" ifconfig_wi0_alias0="inet 192.168.0.131 netmask 255.255.255.255" jail_enable="YES" jail_list="shiba" jail_shiba_hostname="shiba" jail_shiba_ip="192.168.0.131" jail_shiba_rootdir="/usr/prison/192_168_0_130/" jail_shiba_exec="/bin/sh /etc/rc" To fix your problem you should try to mount a devfs for the jail so the tty device is available for sshd to open when you login. I simply added one line to my /etc/rc.d/jail script to test for the "dev" mount-point in jail. Like so: [ -d "${jail_rootdir}/dev" ] && mount -t devfs ${jail_rootdir}\dev I suppose we could avoid this little fau pax in the future by adding a new jail specific rc.conf var like this example: jail_shiba_devfs="/usr/prison/192_168_0_130/dev" It could be easy to have it simply exist, or be non-null, to imply a desire for devfs, and further checked for the existence of the mount-point as I wrote above. I could have a pr+patch made in 5 minutes if anybody thinks this is not a bad idea? -Jon From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 16:12:20 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B07A37B401 for ; Sun, 27 Jul 2003 16:12:20 -0700 (PDT) Received: from mailbox.univie.ac.at (mail.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A81943F75 for ; Sun, 27 Jul 2003 16:12:19 -0700 (PDT) (envelope-from l.ertl@univie.ac.at) Received: from wireless (adslle.cc.univie.ac.at [131.130.102.11]) by mailbox.univie.ac.at (8.12.2/8.12.2) with ESMTP id h6RNBxwt217712; Mon, 28 Jul 2003 01:12:03 +0200 Date: Mon, 28 Jul 2003 01:11:55 +0200 (CEST) From: Lukas Ertl To: John-Mark Gurney In-Reply-To: <20030727191758.GN10708@funkthat.com> Message-ID: <20030728010746.I587@korben.in.tern> References: <20030727163914.S698@korben.in.tern> <20030727191758.GN10708@funkthat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-DCC-ZID-Univie-Metrics: mailbox 4245; Body=0 Fuz1=0 Fuz2=0 cc: Gary Jennejohn cc: freebsd-current@freebsd.org cc: Mark Blackman Subject: Re: device driver memory leak in 5.1-20030726? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 23:12:20 -0000 On Sun, 27 Jul 2003, John-Mark Gurney wrote: > Lukas Ertl wrote this message on Sun, Jul 27, 2003 at 16:43 +0200: > > > > I'm too seeing these annoying kmem_malloc panics on recent -current > > kernels. The laptop I'm using is way off of being overloaded at all, the > > only thing I do is going online using a Bluetooth USB dongle. As soon as I > > generate some network traffic, devbuf allocations go up, until at some > > point the machine panics randomly in kmem_malloc. > > I must note that the USB changes only allocates memory in the M_USB > area which is described by: > usb.c:MALLOC_DEFINE(M_USB, "USB", "USB"); > > So, that means it wouldn't be in the devbuf area. (This is the one of > the points of malloc areas is to help track down stray allocations and > memory leaks). Then I have no explanation. I'm running the box with a WiFi card, generating lots of network traffic, and the box is running fine, no panics, and low devbuf allocation. I'm running the box with the USB Bluetooth dongle, generating much less traffic (it's just a 9.6kbit GSM link), and the box panics within half an hour in kmem_malloc, with devbuf allocation up to 74MB. It must be either in the Bluetooth code or in the USB code. regards, le -- Lukas Ertl eMail: l.ertl@univie.ac.at UNIX Systemadministrator Tel.: (+43 1) 4277-14073 Vienna University Computer Center Fax.: (+43 1) 4277-9140 University of Vienna http://mailbox.univie.ac.at/~le/ From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 16:33:52 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0FDC37B404; Sun, 27 Jul 2003 16:33:52 -0700 (PDT) Received: from obsecurity.dyndns.org (adsl-63-207-60-135.dsl.lsan03.pacbell.net [63.207.60.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE14F43F93; Sun, 27 Jul 2003 16:33:51 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: from rot13.obsecurity.org (rot13.obsecurity.org [10.0.0.5]) by obsecurity.dyndns.org (Postfix) with ESMTP id B6F3B66BE5; Sun, 27 Jul 2003 16:33:51 -0700 (PDT) Received: by rot13.obsecurity.org (Postfix, from userid 1000) id 8CCA4551; Sun, 27 Jul 2003 16:33:51 -0700 (PDT) Date: Sun, 27 Jul 2003 16:33:51 -0700 From: Kris Kennaway To: current@FreeBSD.org Message-ID: <20030727233351.GB80934@rot13.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TRYliJ5NKNqkz5bu" Content-Disposition: inline User-Agent: Mutt/1.4.1i cc: alc@FreeBSD.org Subject: LOR with filedesc structure and Giant X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 23:33:53 -0000 --TRYliJ5NKNqkz5bu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline After upgrading last night, one of the package machines found this: lock order reversal 1st 0xc6c1c334 filedesc structure (filedesc structure) @ /a/asami/portbuild/i386/src-client/sys/kern/sys_generic.c:902 2nd 0xc04aa120 Giant (Giant) @ /a/asami/portbuild/i386/src-client/sys/fs/specfs/spec_vnops.c:372 Stack backtrace: backtrace(c043d4af,c04aa120,c0439aa4,c0439aa4,c0434e3d) at backtrace+0x17 witness_lock(c04aa120,8,c0434e3d,174,1bc) at witness_lock+0x672 _mtx_lock_flags(c04aa120,0,c0434e3d,174,c043daba) at _mtx_lock_flags+0xba spec_poll(d8dddaf8,d8dddb18,c02d119c,d8dddaf8,c04939a0) at spec_poll+0x134 spec_vnoperate(d8dddaf8,c04939a0,c520b124,40,c675e300) at spec_vnoperate+0x18 vn_poll(c44c5e14,40,c675e300,c6222d10,c675e300) at vn_poll+0x3c selscan(c6222d10,d8dddb98,d8dddb88,6,4) at selscan+0x13e kern_select(c6222d10,6,bfbff5c0,0,0) at kern_select+0x36f select(c6222d10,d8dddd10,c0455899,3ee,5) at select+0x66 syscall(2f,2f,2f,8055050,bfbff5b8) at syscall+0x273 Xint0x80_syscall() at Xint0x80_syscall+0x1d --- syscall (93), eip = 0x280ccacc, esp = 0x2832eb68, ebp = 0x2832ebc0 --- Debugger("witness_lock") Stopped at Debugger+0x54: xchgl %ebx,in_Debugger.0 Kris --TRYliJ5NKNqkz5bu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/JGFeWry0BWjoQKURAutnAKDyoAsrvOhfocBStFNQj5XrR4PYfACcC6fS c0rw2gafgz2utUnus+PAeSA= =gpBm -----END PGP SIGNATURE----- --TRYliJ5NKNqkz5bu-- From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 17:30:12 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 540BF37B401 for ; Sun, 27 Jul 2003 17:30:12 -0700 (PDT) Received: from white.imgsrc.co.jp (ns.imgsrc.co.jp [210.226.20.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27BDE43F93 for ; Sun, 27 Jul 2003 17:30:11 -0700 (PDT) (envelope-from kuriyama@imgsrc.co.jp) Received: from localhost (localhost [127.0.0.1]) by white.imgsrc.co.jp (Postfix) with ESMTP id 7E98041D0 for ; Mon, 28 Jul 2003 09:30:09 +0900 (JST) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [2001:218:422:2::130]) by white.imgsrc.co.jp (Postfix) with ESMTP id BB22841CA for ; Mon, 28 Jul 2003 09:30:08 +0900 (JST) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [2001:218:422:2::130]) by black.imgsrc.co.jp (Postfix) with ESMTP id 938721E460E for ; Mon, 28 Jul 2003 09:30:08 +0900 (JST) Date: Mon, 28 Jul 2003 09:30:08 +0900 Message-ID: <7mwue3v6gf.wl@black.imgsrc.co.jp> From: Jun Kuriyama To: Current User-Agent: Wanderlust/2.10.0 (Venus) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.4 Emacs/21.2 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS snapshot-20020531 Subject: dereferencing type-punned pointer will break strict-aliasing rules X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2003 00:30:12 -0000 Is this caused by -oS option? ----- in making BOOTMFS in make release cc -c -Os -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/dev -I/usr/src/sys/contrib/dev/acpica -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/dev/ath -I/usr/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror /usr/src/sys/geom/geom_dev.c /usr/src/sys/geom/geom_dev.c: In function `g_dev_open': /usr/src/sys/geom/geom_dev.c:198: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:198: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:198: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:198: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:205: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:205: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c: In function `g_dev_close': /usr/src/sys/geom/geom_dev.c:232: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:232: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:232: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:232: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:253: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:253: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c: In function `g_dev_ioctl': /usr/src/sys/geom/geom_dev.c:281: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:281: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:281: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:281: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:340: warning: dereferencing type-punned pointer will break strict-aliasing rules /usr/src/sys/geom/geom_dev.c:340: warning: dereferencing type-punned pointer will break strict-aliasing rules *** Error code 1 1 error -- Jun Kuriyama // IMG SRC, Inc. // FreeBSD Project From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 17:50:08 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DFEF37B404 for ; Sun, 27 Jul 2003 17:50:08 -0700 (PDT) Received: from mail.cyberonic.com (mail.cyberonic.com [4.17.179.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2936B43F85 for ; Sun, 27 Jul 2003 17:50:07 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (node-40244c0a.sfo.onnet.us.uu.net [64.36.76.10]) by mail.cyberonic.com (8.12.8/8.12.5) with ESMTP id h6S1LX0n025034; Sun, 27 Jul 2003 21:21:34 -0400 Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.9/8.11.6) id h6S0o1AE086555; Sun, 27 Jul 2003 17:50:01 -0700 (PDT) (envelope-from jmg) Date: Sun, 27 Jul 2003 17:50:01 -0700 From: John-Mark Gurney To: Lukas Ertl Message-ID: <20030728005001.GP10708@funkthat.com> Mail-Followup-To: Lukas Ertl , Gary Jennejohn , freebsd-current@freebsd.org, Mark Blackman References: <20030727163914.S698@korben.in.tern> <20030727191758.GN10708@funkthat.com> <20030728010746.I587@korben.in.tern> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="s/l3CgOIzMHHjg/5" Content-Disposition: inline In-Reply-To: <20030728010746.I587@korben.in.tern> 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: Gary Jennejohn cc: Mark Blackman cc: freebsd-current@freebsd.org Subject: Re: device driver memory leak in 5.1-20030726? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2003 00:50:08 -0000 --s/l3CgOIzMHHjg/5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Lukas Ertl wrote this message on Mon, Jul 28, 2003 at 01:11 +0200: > On Sun, 27 Jul 2003, John-Mark Gurney wrote: > Then I have no explanation. I'm running the box with a WiFi card, > generating lots of network traffic, and the box is running fine, no > panics, and low devbuf allocation. I'm running the box with the USB > Bluetooth dongle, generating much less traffic (it's just a 9.6kbit GSM > link), and the box panics within half an hour in kmem_malloc, with devbuf > allocation up to 74MB. It must be either in the Bluetooth code or in the > USB code. Hmm. this is wierd, it appears to be a bug in the Netgraph code. There is a bit of code that allocates memory for the data, and then promptly overwrites the malloc w/ data from the mbuf. Try the attached patch. This could VERY well crash your machine as I don't know mbuf code very well. Thanks. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." --s/l3CgOIzMHHjg/5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ng_device.diff" Index: ng_device.c =================================================================== RCS file: /home/ncvs/src/sys/netgraph/ng_device.c,v retrieving revision 1.3 diff -u -u -r1.3 ng_device.c --- ng_device.c 3 Mar 2003 12:15:52 -0000 1.3 +++ ng_device.c 28 Jul 2003 00:47:30 -0000 @@ -360,12 +360,6 @@ return(-1); } - buffer = malloc(sizeof(char)*m->m_len, M_DEVBUF, M_NOWAIT | M_ZERO); - if(buffer == NULL) { - printf("%s(): ERROR: buffer malloc failed\n",__func__); - return(-1); - } - buffer = mtod(m,char *); if( (connection->loc+m->m_len) < NGD_QUEUE_SIZE) { @@ -374,7 +368,8 @@ } else printf("%s(): queue full, first read out a bit\n",__func__); - free(buffer,M_DEVBUF); + /* XXX - free chain? */ + m_free(m); return(0); } --s/l3CgOIzMHHjg/5-- From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 17:57:56 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C215B37B401; Sun, 27 Jul 2003 17:57:56 -0700 (PDT) Received: from obsecurity.dyndns.org (adsl-63-207-60-135.dsl.lsan03.pacbell.net [63.207.60.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D8A843F75; Sun, 27 Jul 2003 17:57:55 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: from rot13.obsecurity.org (rot13.obsecurity.org [10.0.0.5]) by obsecurity.dyndns.org (Postfix) with ESMTP id 190B766D16; Sun, 27 Jul 2003 17:57:55 -0700 (PDT) Received: by rot13.obsecurity.org (Postfix, from userid 1000) id 0A4C2450; Sun, 27 Jul 2003 17:57:55 -0700 (PDT) Date: Sun, 27 Jul 2003 17:57:54 -0700 From: Kris Kennaway To: Kris Kennaway Message-ID: <20030728005754.GA23650@rot13.obsecurity.org> References: <20030727233351.GB80934@rot13.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: <20030727233351.GB80934@rot13.obsecurity.org> User-Agent: Mutt/1.4.1i cc: alc@FreeBSD.org cc: current@FreeBSD.org Subject: Re: LOR with filedesc structure and Giant X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2003 00:57:57 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 27, 2003 at 04:33:51PM -0700, Kris Kennaway wrote: > After upgrading last night, one of the package machines found this: >=20 > lock order reversal > 1st 0xc6c1c334 filedesc structure (filedesc structure) @ /a/asami/portbu= ild/i386/src-client/sys/kern/sys_generic.c:902 > 2nd 0xc04aa120 Giant (Giant) @ /a/asami/portbuild/i386/src-client/sys/fs= /specfs/spec_vnops.c:372 > Stack backtrace: > backtrace(c043d4af,c04aa120,c0439aa4,c0439aa4,c0434e3d) at backtrace+0x17 > witness_lock(c04aa120,8,c0434e3d,174,1bc) at witness_lock+0x672 > _mtx_lock_flags(c04aa120,0,c0434e3d,174,c043daba) at _mtx_lock_flags+0xba > spec_poll(d8dddaf8,d8dddb18,c02d119c,d8dddaf8,c04939a0) at spec_poll+0x134 > spec_vnoperate(d8dddaf8,c04939a0,c520b124,40,c675e300) at spec_vnoperate+= 0x18 > vn_poll(c44c5e14,40,c675e300,c6222d10,c675e300) at vn_poll+0x3c > selscan(c6222d10,d8dddb98,d8dddb88,6,4) at selscan+0x13e > kern_select(c6222d10,6,bfbff5c0,0,0) at kern_select+0x36f > select(c6222d10,d8dddd10,c0455899,3ee,5) at select+0x66 > syscall(2f,2f,2f,8055050,bfbff5b8) at syscall+0x273 > Xint0x80_syscall() at Xint0x80_syscall+0x1d > --- syscall (93), eip =3D 0x280ccacc, esp =3D 0x2832eb68, ebp =3D 0x2832e= bc0 --- > Debugger("witness_lock") > Stopped at Debugger+0x54: xchgl %ebx,in_Debugger.0 #8 0xc0290ed7 in witness_lock (lock=3D0xc04aa120, flags=3D8, file=3D0xc0434e3d "/a/asami/portbuild/i386/src-client/sys/fs/specfs/spe= c_vnops.c", line=3D372) at /a/asami/portbuild/i386/src-client/sys/kern/subr_witness.c:838 #9 0xc0261f4a in _mtx_lock_flags (m=3D0x0, opts=3D0, file=3D0xc04d17a8 "",= line=3D-1068850912) at /a/asami/portbuild/i386/src-client/sys/kern/kern_mutex.c:334 #10 0xc0231154 in spec_poll (ap=3D0xd8dddaf8) at /a/asami/portbuild/i386/src-client/sys/fs/specfs/spec_vnops.c:372 #11 0xc0230648 in spec_vnoperate (ap=3D0x0) at /a/asami/portbuild/i386/src-client/sys/fs/specfs/spec_vnops.c:122 #12 0xc02d119c in vn_poll (fp=3D0x0, events=3D0, active_cred=3D0xc675e300, = td=3D0x0) at vnode_if.h:537 #13 0xc02945ae in selscan (td=3D0xc6222d10, ibits=3D0xd8dddb98, obits=3D0xd= 8dddb88, nfd=3D6) at /a/asami/portbuild/i386/src-client/sys/sys/file.h:272 #14 0xc029412f in kern_select (td=3D0xc6222d10, nd=3D6, fd_in=3D0xbfbff5c0,= fd_ou=3D0x0, fd_ex=3D0x0, tvp=3D0xd8dddcd4) at /a/asami/portbuild/i386/src-client/sys/kern/sys_generic.c:822 #15 0xc0293da6 in select (td=3D0x0, uap=3D0xd8dddd10) at /a/asami/portbuild/i386/src-client/sys/kern/sys_generic.c:726 #16 0xc03ef9b3 in syscall (frame=3D {tf_fs =3D 47, tf_es =3D 47, tf_ds =3D 47, tf_edi =3D 134565968, tf_e= si =3D -1077938760, tf_ebp =3D 674425792, tf_isp =3D -656548492, tf_ebx =3D= 0, tf_edx =3D -1077938752, tf_ecx =3D 0, tf_eax =3D 93, tf_trapno =3D 12, = tf_err =3D 2, tf_eip =3D 671926988, tf_cs =3D 31, tf_eflags =3D 534, tf_esp= =3D 674425704, tf_ss =3D 47}) at /a/asami/portbuild/i386/src-client/sys/i386/i386/trap.c:1008 #17 0xc03dfbed in Xint0x80_syscall () at {standard input}:144 ---Can't read userspace from dump, or kernel process--- (kgdb) --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/JHUQWry0BWjoQKURApi/AKDmLpFPJ5TkMWWGY1qxPnk6KuWBvQCg/Zat czAJ+6dctwTGUo/gdcwhxxs= =0iNn -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm-- From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 18:06:45 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF0D637B401 for ; Sun, 27 Jul 2003 18:06:45 -0700 (PDT) Received: from mail.cyberonic.com (mail.cyberonic.com [4.17.179.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA96F43F85 for ; Sun, 27 Jul 2003 18:06:44 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (node-40244c0a.sfo.onnet.us.uu.net [64.36.76.10]) by mail.cyberonic.com (8.12.8/8.12.5) with ESMTP id h6S1cE0n027317; Sun, 27 Jul 2003 21:38:14 -0400 Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.9/8.11.6) id h6S16gkS086830; Sun, 27 Jul 2003 18:06:42 -0700 (PDT) (envelope-from jmg) Date: Sun, 27 Jul 2003 18:06:41 -0700 From: John-Mark Gurney To: Lukas Ertl Message-ID: <20030728010641.GQ10708@funkthat.com> Mail-Followup-To: Lukas Ertl , Gary Jennejohn , freebsd-current@freebsd.org, Mark Blackman References: <20030727163914.S698@korben.in.tern> <20030727191758.GN10708@funkthat.com> <20030728010746.I587@korben.in.tern> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="E/DnYTRukya0zdZ1" Content-Disposition: inline In-Reply-To: <20030728010746.I587@korben.in.tern> 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: Gary Jennejohn cc: Mark Blackman cc: freebsd-current@freebsd.org Subject: Re: device driver memory leak in 5.1-20030726? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2003 01:06:46 -0000 --E/DnYTRukya0zdZ1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Lukas Ertl wrote this message on Mon, Jul 28, 2003 at 01:11 +0200: > Then I have no explanation. I'm running the box with a WiFi card, > generating lots of network traffic, and the box is running fine, no > panics, and low devbuf allocation. I'm running the box with the USB > Bluetooth dongle, generating much less traffic (it's just a 9.6kbit GSM > link), and the box panics within half an hour in kmem_malloc, with devbuf > allocation up to 74MB. It must be either in the Bluetooth code or in the > USB code. Upon futher looking at the code, I have a better fix for this. Let me know how things go for you. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." --E/DnYTRukya0zdZ1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ng_device.diff" Index: ng_device.c =================================================================== RCS file: /home/ncvs/src/sys/netgraph/ng_device.c,v retrieving revision 1.3 diff -u -u -r1.3 ng_device.c --- ng_device.c 3 Mar 2003 12:15:52 -0000 1.3 +++ ng_device.c 28 Jul 2003 01:04:31 -0000 @@ -354,27 +354,13 @@ NGI_GET_M(item, m); NG_FREE_ITEM(item); - m = m_pullup(m,m->m_len); - if(m == NULL) { - printf("%s(): ERROR: m_pullup failed\n",__func__); - return(-1); - } - - buffer = malloc(sizeof(char)*m->m_len, M_DEVBUF, M_NOWAIT | M_ZERO); - if(buffer == NULL) { - printf("%s(): ERROR: buffer malloc failed\n",__func__); - return(-1); - } - - buffer = mtod(m,char *); - - if( (connection->loc+m->m_len) < NGD_QUEUE_SIZE) { - memcpy(connection->readq+connection->loc, buffer, m->m_len); - connection->loc += m->m_len; - } else + if( (connection->loc+m->m_len) < NGD_QUEUE_SIZE) + m_copydata(m, 0, m->m_len, connection->readq+connection->loc); + else + /* XXX - we really should handle this failure case better */ printf("%s(): queue full, first read out a bit\n",__func__); - free(buffer,M_DEVBUF); + m_freem(m); return(0); } --E/DnYTRukya0zdZ1-- From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 18:22:03 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE62237B401 for ; Sun, 27 Jul 2003 18:22:03 -0700 (PDT) Received: from xyzzy.wireless.snsonline.net (dhcp.looksmart.com.au [210.9.52.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED79543F3F for ; Sun, 27 Jul 2003 18:21:59 -0700 (PDT) (envelope-from msergeant@snsonline.net) Received: from xyzzy.wireless.snsonline.net (localhost [127.0.0.1]) h6QBWlvE064180; Sat, 26 Jul 2003 21:32:47 +1000 (EST) (envelope-from msergeant@snsonline.net) Received: (from sarge@localhost)h6QBWfrX064179; Sat, 26 Jul 2003 21:32:41 +1000 (EST) X-Authentication-Warning: xyzzy.wireless.snsonline.net: sarge set sender to msergeant@snsonline.net using -f From: Mark Sergeant To: "Sebastian Yepes [ESN]" In-Reply-To: <20030726110952.GA5205@x123.info> References: <49699.192.168.1.3.1059193863.squirrel@agosto> <20030726045704.GA9697@rot13.obsecurity.org> <20030726110952.GA5205@x123.info> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: SNSOnline Technical Services Message-Id: <1059219160.1383.9.camel@xyzzy.wireless.snsonline.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 26 Jul 2003 21:32:40 +1000 cc: freebsd-current@freebsd.org Subject: Re: LiveCD FBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2003 01:22:04 -0000 On Sat, 2003-07-26 at 21:09, Sebastian Yepes [ESN] wrote: > On Fri, Jul 25, 2003 at 09:57:04PM -0700, Kris Kennaway wrote: > > On Sat, Jul 26, 2003 at 06:31:03AM +0200, Sebastian Yepes [ESN] wrote: > > > > > > Hi all > > > > > > I have made a liveCD of FreeBSD Current and it boot's and looks like it > > > run ok.. > > > > > > The only problem i am haveing is with the md system.. it dus not let me do > > > the newfs on the md dev, i have runing devfs and mounted the procfs.. > > > > > > > > > mdcondig -a -t malloc -s 2m -u 0 <- work's ok > > > newfs /dev/md0 > > > -- > > > 'pid xxx (newfs), uid 0: exited on signal 4 > > > IIIegal instruction > > > -- > > > And with < mdmfs -M -s 2m md1 -tmp > i get the same error > > > > > > Can any one plz informe me on how to fix this or what am i duing bad... > > > > This typically means you compiled the binary with CPU optimizations > > that are incorrect for the target system. > > > > Kris > > Thanx for the tip.. > I was compiling the kernel for other box.. > > It work 100% now thanx Any chance of a website with a howto for others looking at doing the same thing ? Cheers, -- Mark Sergeant SNSOnline Technical Services From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 18:35:26 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AA5E37B401 for ; Sun, 27 Jul 2003 18:35:26 -0700 (PDT) Received: from white.imgsrc.co.jp (ns.imgsrc.co.jp [210.226.20.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B74343F85 for ; Sun, 27 Jul 2003 18:35:25 -0700 (PDT) (envelope-from kuriyama@imgsrc.co.jp) Received: from localhost (localhost [127.0.0.1]) by white.imgsrc.co.jp (Postfix) with ESMTP id BC359413F for ; Mon, 28 Jul 2003 10:35:23 +0900 (JST) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [2001:218:422:2::130]) by white.imgsrc.co.jp (Postfix) with ESMTP id 04A4C410C for ; Mon, 28 Jul 2003 10:35:23 +0900 (JST) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [2001:218:422:2::130]) by black.imgsrc.co.jp (Postfix) with ESMTP id C62B41E460E for ; Mon, 28 Jul 2003 10:35:22 +0900 (JST) Date: Mon, 28 Jul 2003 10:35:22 +0900 Message-ID: <7mvftnv3fp.wl@black.imgsrc.co.jp> From: Jun Kuriyama To: Current In-Reply-To: <7mwue3v6gf.wl@black.imgsrc.co.jp> References: <7mwue3v6gf.wl@black.imgsrc.co.jp> User-Agent: Wanderlust/2.10.0 (Venus) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.4 Emacs/21.2 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS snapshot-20020531 Subject: Re: dereferencing type-punned pointer will break strict-aliasing rules X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2003 01:35:26 -0000 At Mon, 28 Jul 2003 00:30:35 +0000 (UTC), kuriyama wrote: > Is this caused by -oS option? Grrr, of course this should be s/-oS/-Os/. These warnings are caused from DROP_GIANT() macro. By tracking this down, actual source is __PCPU_GET() macro (line: 115) in sys/i386/include/pcpu.h. __result = *(__pcpu_type(name) *)&__i; To test this with simplified code: ----- % cat test.c struct T { int a; }; void test() { struct T* c; int __i = 0; c = *(struct T* *)&__i; } % cc -c -Os -Wall test.c test.c: In function `test': test.c:11: warning: dereferencing type-punned pointer will break strict-aliasing rules ----- __PCPU_GET() macro seems to be harmless if -Os is not used or __pcpu_type() returns actual type rather than pointer. What should we do? -- Jun Kuriyama // IMG SRC, Inc. // FreeBSD Project From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 18:50:51 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 239A737B401 for ; Sun, 27 Jul 2003 18:50:51 -0700 (PDT) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9146443FA3 for ; Sun, 27 Jul 2003 18:50:50 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) h6S1ooh5077063; Sun, 27 Jul 2003 18:50:50 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost)h6S1ooqE077062; Sun, 27 Jul 2003 18:50:50 -0700 (PDT) Date: Sun, 27 Jul 2003 18:50:50 -0700 From: Steve Kargl To: Jun Kuriyama Message-ID: <20030728015050.GA77047@troutmask.apl.washington.edu> References: <7mwue3v6gf.wl@black.imgsrc.co.jp> <7mvftnv3fp.wl@black.imgsrc.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7mvftnv3fp.wl@black.imgsrc.co.jp> User-Agent: Mutt/1.4.1i cc: Current Subject: Re: dereferencing type-punned pointer will break strict-aliasing rules X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2003 01:50:51 -0000 On Mon, Jul 28, 2003 at 10:35:22AM +0900, Jun Kuriyama wrote: > At Mon, 28 Jul 2003 00:30:35 +0000 (UTC), > kuriyama wrote: > > Is this caused by -oS option? > > Grrr, of course this should be s/-oS/-Os/. > > These warnings are caused from DROP_GIANT() macro. By tracking this > down, actual source is __PCPU_GET() macro (line: 115) in > sys/i386/include/pcpu.h. > > __result = *(__pcpu_type(name) *)&__i; > snip > > What should we do? > I presume you read share/example/make.conf, which states # To compile just the kernel with special optimizations, you should use # this instead of CFLAGS (which is not applicable to kernel builds anyway). # There is very little to gain by using higher optimization levels, and doing # so can cause problems. # #COPTFLAGS= -O -pipe Notice the last 6 words. -- Steve From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 18:58:51 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF1DC37B401 for ; Sun, 27 Jul 2003 18:58:51 -0700 (PDT) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 2C9E743F3F for ; Sun, 27 Jul 2003 18:58:50 -0700 (PDT) (envelope-from tmoestl@gmx.net) Received: (qmail 18201 invoked by uid 65534); 28 Jul 2003 01:58:48 -0000 Received: from p508E51E4.dip.t-dialin.net (EHLO galatea.local) (80.142.81.228) by mail.gmx.net (mp023) with SMTP; 28 Jul 2003 03:58:48 +0200 Received: from tmm by galatea.local with local (Exim 4.20 #1) id 19gxHx-0008bp-7F; Mon, 28 Jul 2003 03:59:01 +0200 Date: Mon, 28 Jul 2003 03:59:00 +0200 From: Thomas Moestl To: Jun Kuriyama Message-ID: <20030728015900.GB5628@crow.dom2ip.de> Mail-Followup-To: Jun Kuriyama , Current References: <7mwue3v6gf.wl@black.imgsrc.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline In-Reply-To: <7mwue3v6gf.wl@black.imgsrc.co.jp> User-Agent: Mutt/1.4.1i Sender: Thomas Moestl cc: Current Subject: Re: dereferencing type-punned pointer will break strict-aliasing rules X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2003 01:58:52 -0000 --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, 2003/07/28 at 09:30:08 +0900, Jun Kuriyama wrote: > > Is this caused by -oS option? > > ----- in making BOOTMFS in make release > cc -c -Os -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/dev -I/usr/src/sys/contrib/dev/acpica -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/dev/ath -I/usr/src/sys/contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror /usr/src/sys/geom/geom_dev.c > /usr/src/sys/geom/geom_dev.c: In function `g_dev_open': > /usr/src/sys/geom/geom_dev.c:198: warning: dereferencing type-punned pointer will break strict-aliasing rules > [...] Yes, by implying -fstrict-aliasing, so using -fno-strict-aliasing is a workaround. The problem is caused by the i386 PCPU_GET/PCPU_SET implementation: #define __PCPU_GET(name) ({ \ __pcpu_type(name) __result; \ \ [...] } else if (sizeof(__result) == 4) { \ u_int __i; \ __asm __volatile("movl %%fs:%1,%0" \ : "=r" (__i) \ : "m" (*(u_int *)(__pcpu_offset(name)))); \ __result = *(__pcpu_type(name) *)&__i; \ [...] In this case, the PCPU_GET is used to retrieve curthread, causing sizeof(__result) to be 4, so the cast at the end of the code snippet is from a u_int * to struct thread *, and __i is accessed through the casted pointer, which violates the C99 aliasing rules. An alternative is to type-pun via a union, which is also a bit ugly, but explicitly allowed by C99. Patch attached (but only superficially tested). - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pcpu.diff" Index: pcpu.h =================================================================== RCS file: /vol/ncvs/src/sys/i386/include/pcpu.h,v retrieving revision 1.36 diff -u -r1.36 pcpu.h --- pcpu.h 27 Jun 2003 21:50:52 -0000 1.36 +++ pcpu.h 28 Jul 2003 01:37:57 -0000 @@ -96,23 +96,32 @@ __pcpu_type(name) __result; \ \ if (sizeof(__result) == 1) { \ - u_char __b; \ + union { \ + u_char __b; \ + __pcpu_type(name) __r; \ + } __u; \ __asm __volatile("movb %%fs:%1,%0" \ - : "=r" (__b) \ + : "=r" (__u.__b) \ : "m" (*(u_char *)(__pcpu_offset(name)))); \ - __result = *(__pcpu_type(name) *)&__b; \ + __result = __u.__r; \ } else if (sizeof(__result) == 2) { \ - u_short __w; \ + union { \ + u_short __w; \ + __pcpu_type(name) __r; \ + } __u; \ __asm __volatile("movw %%fs:%1,%0" \ - : "=r" (__w) \ + : "=r" (__u.__w) \ : "m" (*(u_short *)(__pcpu_offset(name)))); \ - __result = *(__pcpu_type(name) *)&__w; \ + __result = __u.__r; \ } else if (sizeof(__result) == 4) { \ - u_int __i; \ + union { \ + u_int __i; \ + __pcpu_type(name) __r; \ + } __u; \ __asm __volatile("movl %%fs:%1,%0" \ - : "=r" (__i) \ + : "=r" (__u.__i) \ : "m" (*(u_int *)(__pcpu_offset(name)))); \ - __result = *(__pcpu_type(name) *)&__i; \ + __result = __u.__r; \ } else { \ __result = *__PCPU_PTR(name); \ } \ @@ -127,23 +136,32 @@ __pcpu_type(name) __val = (val); \ \ if (sizeof(__val) == 1) { \ - u_char __b; \ - __b = *(u_char *)&__val; \ + union { \ + u_char __b; \ + __pcpu_type(name) __v; \ + } __u; \ + __u.__v = __val; \ __asm __volatile("movb %1,%%fs:%0" \ : "=m" (*(u_char *)(__pcpu_offset(name))) \ - : "r" (__b)); \ + : "r" (__u.__b)); \ } else if (sizeof(__val) == 2) { \ - u_short __w; \ - __w = *(u_short *)&__val; \ + union { \ + u_short __w; \ + __pcpu_type(name) __v; \ + } __u; \ + __u.__v = __val; \ __asm __volatile("movw %1,%%fs:%0" \ : "=m" (*(u_short *)(__pcpu_offset(name))) \ - : "r" (__w)); \ + : "r" (__u.__w)); \ } else if (sizeof(__val) == 4) { \ - u_int __i; \ - __i = *(u_int *)&__val; \ + union { \ + u_int __i; \ + __pcpu_type(name) __v; \ + } __u; \ + __u.__v = __val; \ __asm __volatile("movl %1,%%fs:%0" \ : "=m" (*(u_int *)(__pcpu_offset(name))) \ - : "r" (__i)); \ + : "r" (__u.__i)); \ } else { \ *__PCPU_PTR(name) = __val; \ } \ --jI8keyz6grp/JLjh-- From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 19:05:19 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C20537B401 for ; Sun, 27 Jul 2003 19:05:19 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 4D19143F75 for ; Sun, 27 Jul 2003 19:05:18 -0700 (PDT) (envelope-from tmoestl@gmx.net) Received: (qmail 8362 invoked by uid 65534); 28 Jul 2003 02:05:17 -0000 Received: from p508E51E4.dip.t-dialin.net (EHLO galatea.local) (80.142.81.228) by mail.gmx.net (mp009) with SMTP; 28 Jul 2003 04:05:17 +0200 Received: from tmm by galatea.local with local (Exim 4.20 #1) id 19gxOJ-0000Bi-6t; Mon, 28 Jul 2003 04:05:35 +0200 Date: Mon, 28 Jul 2003 04:05:35 +0200 From: Thomas Moestl To: Jun Kuriyama , Current Message-ID: <20030728020534.GA678@crow.dom2ip.de> Mail-Followup-To: Jun Kuriyama , Current References: <7mwue3v6gf.wl@black.imgsrc.co.jp> <20030728015900.GB5628@crow.dom2ip.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030728015900.GB5628@crow.dom2ip.de> User-Agent: Mutt/1.4.1i Sender: Thomas Moestl Subject: Re: dereferencing type-punned pointer will break strict-aliasing rules X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2003 02:05:19 -0000 On Mon, 2003/07/28 at 03:59:00 +0200, Thomas Moestl wrote: > Yes, by implying -fstrict-aliasing, so using -fno-strict-aliasing is a > workaround. The problem is caused by the i386 PCPU_GET/PCPU_SET > implementation: > > #define __PCPU_GET(name) ({ \ > __pcpu_type(name) __result; \ > \ > [...] > } else if (sizeof(__result) == 4) { \ > u_int __i; \ > __asm __volatile("movl %%fs:%1,%0" \ > : "=r" (__i) \ > : "m" (*(u_int *)(__pcpu_offset(name)))); \ > __result = *(__pcpu_type(name) *)&__i; \ > [...] > > In this case, the PCPU_GET is used to retrieve curthread, causing > sizeof(__result) to be 4, so the cast at the end of the code snippet > is from a u_int * to struct thread *, and __i is accessed through the ^^^^^^^^^^^^^^^ struct thread **, of course. > casted pointer, which violates the C99 aliasing rules. - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 20:26:57 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40CC437B401; Sun, 27 Jul 2003 20:26:57 -0700 (PDT) Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 554D643F3F; Sun, 27 Jul 2003 20:26:55 -0700 (PDT) (envelope-from grog@lemis.com) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id 35A1A526F8; Mon, 28 Jul 2003 12:56:53 +0930 (CST) Date: Mon, 28 Jul 2003 12:56:53 +0930 From: Greg 'groggy' Lehey To: "M. Warner Losh" Message-ID: <20030728032653.GA37499@wantadilla.lemis.com> References: <20030727010938.GF45069@wantadilla.lemis.com> <20030726.194750.28168388.imp@bsdimp.com> <20030727015903.GJ45069@wantadilla.lemis.com> <20030726.221859.122847811.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <20030726.221859.122847811.imp@bsdimp.com> User-Agent: Mutt/1.4i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: FreeBSD-current@FreeBSD.org cc: freebsd-mobile@FreeBSD.org Subject: Re: Mapping Video BIOS? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2003 03:26:57 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Saturday, 26 July 2003 at 22:18:59 -0600, M. Warner Losh wrote: > In message: <20030727015903.GJ45069@wantadilla.lemis.com> > "Greg 'groggy' Lehey" writes: >> Presuming that it's the ROM driver, I get this in the dmesg I posted: >> pnpbios: Bad PnP BIOS data checksum > > That's likely the problem. However, PnP BIOS information isn't the > same thing that the orm[sic] driver probes for. They look related. I've now found the orm output: orm0: