From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 31 04:59:53 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB94D16A407 for ; Sun, 31 Dec 2006 04:59:53 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from pd4mo2so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id C025F13C441 for ; Sun, 31 Dec 2006 04:59:53 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from pd4mr6so.prod.shaw.ca (pd4mr6so-qfe3.prod.shaw.ca [10.0.141.69]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JB40063OGJTRCC0@l-daemon> for freebsd-hackers@freebsd.org; Sat, 30 Dec 2006 21:59:53 -0700 (MST) Received: from pn2ml10so.prod.shaw.ca ([10.0.121.80]) by pd4mr6so.prod.shaw.ca (Sun Java System Messaging Server 6.2-2.05 (built Apr 28 2005)) with ESMTP id <0JB4009UDGJT5PB0@pd4mr6so.prod.shaw.ca> for freebsd-hackers@freebsd.org; Sat, 30 Dec 2006 21:59:53 -0700 (MST) Received: from hexahedron.daemonology.net ([24.82.18.31]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with SMTP id <0JB400GK7GJSQB20@l-daemon> for freebsd-hackers@freebsd.org; Sat, 30 Dec 2006 21:59:53 -0700 (MST) Received: (qmail 32191 invoked from network); Sun, 31 Dec 2006 04:59:47 +0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; Sun, 31 Dec 2006 04:59:47 +0000 Date: Sat, 30 Dec 2006 20:59:47 -0800 From: Colin Percival In-reply-to: <20061229090146.d2bc2b1c.wmoran@collaborativefusion.com> To: Bill Moran Message-id: <459743C3.90801@freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Enigmail-Version: 0.94.0.0 References: <20061229120030.3DCE316A530@hub.freebsd.org> <45950CFD.5020506@freebsd.org> <20061229090146.d2bc2b1c.wmoran@collaborativefusion.com> User-Agent: Thunderbird 1.5.0.9 (X11/20061227) Cc: freebsd-hackers@freebsd.org Subject: Re: Modified version of jexec allows non-root access into jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2006 04:59:54 -0000 Bill Moran wrote: > You also describe a scenerio where a user can create a jail of his own > design and give himself root inside it, thus allowing him to use the > setuid trick to get root on the host as well. The place this falls down > is that the user would need to already have root to create the jail in the > first place. Not necessarily. An unprivileged user can create hard links to binaries he doesn't own, including suid binaries. Colin Percival From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 31 06:41:01 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC03816A407 for ; Sun, 31 Dec 2006 06:41:01 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with SMTP id 4D03713C468 for ; Sun, 31 Dec 2006 06:41:01 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 24474 invoked by uid 399); 31 Dec 2006 06:41:00 -0000 Received: from localhost (HELO ?192.168.0.5?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 31 Dec 2006 06:41:00 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <45975B7B.7030002@FreeBSD.org> Date: Sat, 30 Dec 2006 22:40:59 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Erik Udo References: <4592C91C.2040801@gmail.com> <200612281237.kBSCbE2n047391@lurza.secnetix.de> <20061228.132844.-579333856.imp@bsdimp.com> <20061228.134053.-1548238884.imp@bsdimp.com> <4595875B.20609@gmail.com> In-Reply-To: <4595875B.20609@gmail.com> X-Enigmail-Version: 0.94.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2006 06:41:01 -0000 Erik Udo wrote: > That's nice. But NetBSDs init.c executes /etc/rc before calling > chroot(), and that's what i'm looking for Sorry if I missed your rationale earlier, but could you perhaps explain a bit more about why you want to do this? I ask because I'm generally interested in boot-time issues, and this sounds like an interesting problem. Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 31 07:38:54 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CBD2C16A407 for ; Sun, 31 Dec 2006 07:38:54 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id B077C13C43E for ; Sun, 31 Dec 2006 07:38:54 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id kBV72K83005061 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 30 Dec 2006 23:02:20 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id kBV72Kwf005060 for freebsd-hackers@freebsd.org; Sat, 30 Dec 2006 23:02:20 -0800 (PST) Received: from fbsd61 ([192.168.200.61]) by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA25615; Sat, 30 Dec 06 22:50:26 PST Date: Sat, 30 Dec 2006 22:52:12 -0800 From: perryh@pluto.rain.com To: freebsd-hackers@freebsd.org Message-Id: <45975e1c.zZgcyHPeHeBwZNlg%perryh@pluto.rain.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: how to deal with const X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2006 07:38:54 -0000 I'm working on a kernel project that needs strstr(3). It looks as if most of the str* functions in libkern are very similar, if not identical, to their counterparts in libc/string, but that approach does not seem to work for strstr (#s added): 1: char * 2: strstr(s, find) 3: const char *s, *find; 4: { 5: char c, sc; 6: size_t len; 7: 8: if ((c = *find++) != 0) { 9: len = strlen(find); 10: do { 11: do { 12: if ((sc = *s++) == 0) 13: return (NULL); 14: } while (sc != c); 15: } while (strncmp(s, find, len) != 0); 16: s--; 17: } 18: return ((char *)s); 19: } I get a "warning: cast discards qualifiers from pointer target type" on line 18. If I remove the cast, changing it to just "return (s);", I get "warning: return discards qualifiers from pointer target type" (and because this is the kernel, those "warning" messages are actually treated as errors). What is the accepted method of dealing with this sort of thing? From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 31 07:54:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E354016A40F; Sun, 31 Dec 2006 07:54:42 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A5C5D13C442; Sun, 31 Dec 2006 07:54:42 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kBV7qsgY056045; Sun, 31 Dec 2006 00:52:54 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 31 Dec 2006 00:53:02 -0700 (MST) Message-Id: <20061231.005302.174088308.imp@bsdimp.com> To: dougb@freebsd.org From: "M. Warner Losh" In-Reply-To: <45975B7B.7030002@FreeBSD.org> References: <20061228.134053.-1548238884.imp@bsdimp.com> <4595875B.20609@gmail.com> <45975B7B.7030002@FreeBSD.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 31 Dec 2006 00:52:54 -0700 (MST) Cc: erik.udo@gmail.com, freebsd-hackers@freebsd.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2006 07:54:43 -0000 In message: <45975B7B.7030002@FreeBSD.org> Doug Barton writes: : Erik Udo wrote: : > That's nice. But NetBSDs init.c executes /etc/rc before calling : > chroot(), and that's what i'm looking for : : Sorry if I missed your rationale earlier, but could you perhaps : explain a bit more about why you want to do this? I ask because I'm : generally interested in boot-time issues, and this sounds like an : interesting problem. This allows one to have a 'simple' /etc/rc that arranges things so that a new '/' is ready to 'boot'. Warner From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 31 08:44:26 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91D0D16A412 for ; Sun, 31 Dec 2006 08:44:26 +0000 (UTC) (envelope-from erik.udo@gmail.com) Received: from isolokki.dnainternet.net (isolokki.dnainternet.net [212.149.75.39]) by mx1.freebsd.org (Postfix) with ESMTP id 56F0213C428 for ; Sun, 31 Dec 2006 08:44:26 +0000 (UTC) (envelope-from erik.udo@gmail.com) Received: from [192.168.1.11] (host-212-149-186-30.kpylaajakaista.net [212.149.186.30]) by isolokki.dnainternet.net (Postfix) with ESMTP id 4A60ACC95; Sun, 31 Dec 2006 10:44:23 +0200 (EET) Message-ID: <45977863.4000704@gmail.com> Date: Sun, 31 Dec 2006 10:44:19 +0200 From: Erik Udo User-Agent: Thunderbird 1.5.0.9 (X11/20061226) MIME-Version: 1.0 To: "M. Warner Losh" References: <20061228.132844.-579333856.imp@bsdimp.com> <20061228.134053.-1548238884.imp@bsdimp.com> <459584A5.8000100@gmail.com> <20061229.185058.-1175576066.imp@bsdimp.com> In-Reply-To: <20061229.185058.-1175576066.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2006 08:44:26 -0000 M. Warner Losh wrote: > Oh! I see. Reading the actual code is instructive... > > Run /etc/rc, maybe chroot and run a different /etc/rc... That makes > a lot more sense... > > Warner > Yes, it allows for me to create the new chroot, becouse in a livecd it's a disk image. Maybe the /etc/rc is a bit misleading becouse it's only a script that sets up the new chroot and nothing else. From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 31 13:04:29 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9659016A407 for ; Sun, 31 Dec 2006 13:04:29 +0000 (UTC) (envelope-from dmw@unete.cl) Received: from qmail0.ifxnetworks.com (qmail0.ifxnetworks.com [200.110.128.5]) by mx1.freebsd.org (Postfix) with ESMTP id 41D9D13C448 for ; Sun, 31 Dec 2006 13:04:29 +0000 (UTC) (envelope-from dmw@unete.cl) Received: (qmail 16662 invoked from network); 31 Dec 2006 12:37:47 -0000 X-Spam-DCC: sonic.net: qmail0.ifxnetworks.com 1156; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on qmail0.ifxnetworks.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.7 Received: from host232.200.73.29.dynamic.ifxnw.cl (HELO daemon) (dmw@unete.cl@[200.73.29.232]) (envelope-sender ) by qmail0.ifxnetworks.com (qmail-ldap-1.03) with SMTP for ; 31 Dec 2006 12:37:47 -0000 From: Daniel Molina Wegener Organization: DMW To: freebsd-hackers@freebsd.org Date: Sun, 31 Dec 2006 09:37:54 -0300 User-Agent: KMail/1.9.1 References: <45975e1c.zZgcyHPeHeBwZNlg%perryh@pluto.rain.com> In-Reply-To: <45975e1c.zZgcyHPeHeBwZNlg%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612310937.55142.dmw@unete.cl> Cc: perryh@pluto.rain.com Subject: Re: how to deal with const X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dmw@unete.cl List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2006 13:04:29 -0000 On Sunday 31 December 2006 03:52, perryh@pluto.rain.com wrote: > I'm working on a kernel project that needs strstr(3). > > It looks as if most of the str* functions in libkern are very > similar, if not identical, to their counterparts in > libc/string, but that approach does not seem to work for > strstr (#s added): > > 1: char * > 2: strstr(s, find) > 3: const char *s, *find; > 4: { > 5: char c, sc; > 6: size_t len; > 7: > 8: if ((c = *find++) != 0) { > 9: len = strlen(find); > 10: do { > 11: do { > 12: if ((sc = *s++) == 0) > 13: return (NULL); > 14: } while (sc != c); > 15: } while (strncmp(s, find, len) != 0); > 16: s--; > 17: } > 18: return ((char *)s); > 19: } > > I get a "warning: cast discards qualifiers from pointer > target type" on line 18. If I remove the cast, changing it > to just "return (s);", I get "warning: return discards > qualifiers from pointer target type" (and because this is the > kernel, those "warning" messages are actually treated as > errors). If you need strstr(3) in your project is allready defined in libkern. The implementation is identical, but using the __DECONST macro. Take a look in /usr/src/sys/libkern/strstr.c for the function definition and /usr/src/sys/geom/label/g_label.c for usage. The function prototype is defined in sys/libkern.h Best regards... -- . 0 . | Daniel Molina Wegener . . 0 | dmw at unete dot cl 0 0 0 | FreeBSD User From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 31 15:07:09 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F176E16A403; Sun, 31 Dec 2006 15:07:09 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9D79613C45B; Sun, 31 Dec 2006 15:07:09 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 923BC487E7; Sun, 31 Dec 2006 10:07:05 -0500 (EST) Date: Sun, 31 Dec 2006 15:07:05 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Colin Percival In-Reply-To: <459743C3.90801@freebsd.org> Message-ID: <20061231150623.M7974@fledge.watson.org> References: <20061229120030.3DCE316A530@hub.freebsd.org> <45950CFD.5020506@freebsd.org> <20061229090146.d2bc2b1c.wmoran@collaborativefusion.com> <459743C3.90801@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Bill Moran Subject: Re: Modified version of jexec allows non-root access into jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2006 15:07:10 -0000 On Sat, 30 Dec 2006, Colin Percival wrote: > Bill Moran wrote: >> You also describe a scenerio where a user can create a jail of his own >> design and give himself root inside it, thus allowing him to use the setuid >> trick to get root on the host as well. The place this falls down is that >> the user would need to already have root to create the jail in the first >> place. > > Not necessarily. An unprivileged user can create hard links to binaries he > doesn't own, including suid binaries. BTW, I understand that Solaris has now changed the default to be that users cannot hard link files they don't own. We have a sysctl option for that -- if this is now a widespread default, I wonder if we should be considering switching the default? Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 31 20:18:22 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 47F4516A403; Sun, 31 Dec 2006 20:18:22 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 10BB913C457; Sun, 31 Dec 2006 20:18:21 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.222] (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id kBVJjA24025270; Sun, 31 Dec 2006 11:45:10 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <45981346.3050201@freebsd.org> Date: Sun, 31 Dec 2006 11:45:10 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Watson References: <200612301119.kBUBJNno062104@lurza.secnetix.de> <20061230123256.V18740@fledge.watson.org> In-Reply-To: <20061230123256.V18740@fledge.watson.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Oliver Fromme Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2006 20:18:22 -0000 Robert Watson wrote: > ... It used to be that only certain file systems could be used as a > root file system, because only they knew how to bypass the lookup > procedure to find their device node, short-circuiting to the in-kernel > device list. So why are the MD_ROOT and NFS_ROOT options still around? It sounds like there must still be something special about root-capable file systems. Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 31 20:41:06 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9804916A407 for ; Sun, 31 Dec 2006 20:41:06 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 452E813C457 for ; Sun, 31 Dec 2006 20:41:06 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 85CD84949D; Sun, 31 Dec 2006 15:41:04 -0500 (EST) Date: Sun, 31 Dec 2006 20:41:04 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Tim Kientzle In-Reply-To: <45981346.3050201@freebsd.org> Message-ID: <20061231203829.O7974@fledge.watson.org> References: <200612301119.kBUBJNno062104@lurza.secnetix.de> <20061230123256.V18740@fledge.watson.org> <45981346.3050201@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Oliver Fromme Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2006 20:41:06 -0000 On Sun, 31 Dec 2006, Tim Kientzle wrote: > Robert Watson wrote: >> ... It used to be that only certain file systems could be used as a root >> file system, because only they knew how to bypass the lookup procedure to >> find their device node, short-circuiting to the in-kernel device list. > > So why are the MD_ROOT and NFS_ROOT options still around? It sounds like > there must still be something special about root-capable file systems. NFS_ROOT has to do with extracting the root mount configuration information from the interface list, loader environment, prior to the file system mount process so that NFS knows where to go to find a file system, configure networking, etc. MD_ROOT has to do with setting up the md device to mount the root file system from in memory without having mdconfig run. A glance at the md(4) source code suggests that it also tweaks the default root device to be "ufs:/dev/md0". This is not actually a file system option so much as an option in the behavior of the md(4) device driver. At least, this is my understanding from a very casual glance at the source. In both cases, we now use the single vfs_mount VFSOP. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 31 20:54:27 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6AF1716A412 for ; Sun, 31 Dec 2006 20:54:27 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id 25BFF13C459 for ; Sun, 31 Dec 2006 20:54:27 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.7/8.13.7) with ESMTP id kBVKhi3U095667 for ; Sun, 31 Dec 2006 12:43:44 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.13.7/8.13.4/Submit) id kBVKhi7t095666; Sun, 31 Dec 2006 12:43:44 -0800 (PST) Date: Sun, 31 Dec 2006 12:43:44 -0800 (PST) From: Matthew Dillon Message-Id: <200612312043.kBVKhi7t095666@apollo.backplane.com> To: freebsd-hackers@freebsd.org Subject: Confusion in acpi_sleep_machdep(). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2006 20:54:27 -0000 I'm trying to figure out how the acpi_sleep_machdep() code works and there are a couple of lines I just don't understand: pm = vmspace_pmap(p->p_vmspace); cr3 = rcr3(); #ifdef PAE load_cr3(vtophys(pm->pm_pdpt)); #else load_cr3(vtophys(pm->pm_pdir)); #endif page = PHYS_TO_VM_PAGE(sc->acpi_wakephys); pmap_enter(pm, sc->acpi_wakephys, page, VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE, 1); First, why isn't it just using kernel_pmap ? What's all the load_cr3() stuff for ? Second, why is it entering the physical address sc->acpi_wakephys as the virtual address in the pmap ? Shouldn't it be using sc->acpi_wakeaddr there? Anybody know ? -Matt From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 31 22:13:16 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DD95E16A412 for ; Sun, 31 Dec 2006 22:13:16 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id BF55613C457 for ; Sun, 31 Dec 2006 22:13:16 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id kBVMDF8g086663 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 31 Dec 2006 14:13:15 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id kBVMDFnP086662; Sun, 31 Dec 2006 14:13:15 -0800 (PST) Received: from fbsd61 ([192.168.200.61]) by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA27673; Sun, 31 Dec 06 14:08:11 PST Date: Sun, 31 Dec 2006 14:09:55 -0800 From: perryh@pluto.rain.com To: dmw@unete.cl Message-Id: <45983533.nD9Vm0IfHU3DbCZC%perryh@pluto.rain.com> References: <45975e1c.zZgcyHPeHeBwZNlg%perryh@pluto.rain.com> <200612310937.55142.dmw@unete.cl> In-Reply-To: <200612310937.55142.dmw@unete.cl> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: how to deal with const X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2006 22:13:16 -0000 > If you need strstr(3) in your project is allready defined > in libkern. The implementation is identical, but using the > __DECONST macro. > > Take a look in /usr/src/sys/libkern/strstr.c for the function > definition and /usr/src/sys/geom/label/g_label.c for usage. > > The function prototype is defined in sys/libkern.h There's no strstr.c in my (6.1) libkern, but sys/cdefs.h does provide __DECONST and it certainly looks like the intended solution. Thanks for the pointer. From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 24 09:55:01 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D12DE16A40F for ; Sun, 24 Dec 2006 09:55:00 +0000 (UTC) (envelope-from duane@dwpc.dwlabs.ca) Received: from smtpout.eastlink.ca (smtpout.eastlink.ca [24.222.0.30]) by mx1.freebsd.org (Postfix) with ESMTP id 8B01713C466 for ; Sun, 24 Dec 2006 09:55:00 +0000 (UTC) (envelope-from duane@dwpc.dwlabs.ca) Received: from ip02.eastlink.ca ([24.222.10.10]) by mta01.eastlink.ca (Sun Java System Messaging Server 6.2-4.03 (built Sep 22 2005)) with ESMTP id <0JAR00GUKU7H5S81@mta01.eastlink.ca> for freebsd-hackers@freebsd.org; Sun, 24 Dec 2006 05:26:05 -0400 (AST) Received: from blk-224-199-230.eastlink.ca (HELO dwpc.dwlabs.ca) ([24.224.199.230]) by ip02.eastlink.ca with ESMTP; Sun, 24 Dec 2006 05:24:50 -0400 Received: from dwpc.dwlabs.ca (localhost [127.0.0.1]) by dwpc.dwlabs.ca (8.13.8/8.13.8) with ESMTP id kBO9OR3T029064; Sun, 24 Dec 2006 05:24:27 -0400 (AST envelope-from duane@dwpc.dwlabs.ca) Received: (from duane@localhost) by dwpc.dwlabs.ca (8.13.8/8.13.8/Submit) id kBO9ORkg029063; Sun, 24 Dec 2006 05:24:27 -0400 (AST envelope-from duane) Date: Sun, 24 Dec 2006 05:24:27 -0400 From: Duane Whitty In-reply-to: <20061223142410.2a2b783c@Magellan.Leidinger.net> To: Alexander Leidinger Message-id: <20061224092427.GD10511@dwpc.dwlabs.ca> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CADrWjUUY4MfmdGdsb2JhbACOCA X-IronPort-AV: i="4.12,208,1165204800"; d="scan'208"; a="25261069:sNHT43954956" References: <20061220041843.GA10511@dwpc.dwlabs.ca> <3bbf2fe10612200414j4c1c01ecr7b37e956b70b01fa@mail.gmail.com> <458A249D.3030502@FreeBSD.org> <3bbf2fe10612210558m66795673kd352a385a98f6e2b@mail.gmail.com> <20061222134113.T65423@fledge.watson.org> <3bbf2fe10612221425j62374c46q538ca2e256f7efc2@mail.gmail.com> <20061223142410.2a2b783c@Magellan.Leidinger.net> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org Subject: Re: Locking fundamentals X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: duane@dwlabs.ca List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Dec 2006 09:55:01 -0000 On Sat, Dec 23, 2006 at 02:24:10PM +0100, Alexander Leidinger wrote: > Quoting "Attilio Rao" (Fri, 22 Dec 2006 23:25:53 +0100): > > > 2006/12/22, Robert Watson : > > > On Thu, 21 Dec 2006, Attilio Rao wrote: > > [explanation] > > Could someone of you make a copy and paste of and a little bit of gluing > the parts together somewhere? Maybe in the wiki? One of the reasons for my initial mail is that I would like to help with the Architecture Handbook. That is where I would like to put the content of this thread as well as other emails I have been reading/saving regarding locking/threads/scheduling. When I started reading the Arch. Handbook I under estimated the complexities involved in the FreeBSD kernel. It is a complex piece of software and I am learning that it is not mastered overnight, at least not by me. I am studying it though. I believe locking is a good place to start and I am gaining an understanding of it. Recent explanations have gone a long way in furthering my understanding of how locking works in the kernel. I hope I can take this information and glue it into an interesting and detailed section in our Arch. Handbook. I regret that I am not able to produce something more quickly; I simply haven't learned enough yet. Best Regards, Duane Whitty > > Bye, > Alexander. > > -- > I don't do it for the money. > -- Donald Trump, Art of the Deal > http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 > http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 25 15:36:01 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D3F1416A403 for ; Mon, 25 Dec 2006 15:36:01 +0000 (UTC) (envelope-from myself@rojer.pp.ru) Received: from wooster.rojer.pp.ru (wooster.rojer.pp.ru [80.68.246.188]) by mx1.freebsd.org (Postfix) with ESMTP id 0C1C513C46E for ; Mon, 25 Dec 2006 15:36:01 +0000 (UTC) (envelope-from myself@rojer.pp.ru) Received: from wooster.rojer.pp.ru (localhost [127.0.0.1]) by wooster.rojer.pp.ru (Postfix) with ESMTP id 224BF114F7; Mon, 25 Dec 2006 18:18:11 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.1.6-rojer (2006-10-03) on wooster.rojer.pp.ru X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.6-rojer Received: from [IPv6:::1] (localhost [127.0.0.1]) by wooster.rojer.pp.ru (Postfix) with ESMTP; Mon, 25 Dec 2006 18:18:05 +0300 (MSK) Message-ID: <458FEBAA.7020104@rojer.pp.ru> Date: Mon, 25 Dec 2006 15:18:02 +0000 From: Deomid Ryabkov User-Agent: Thunderbird 1.5.0.8 (X11/20061113) MIME-Version: 1.0 To: Gonzalo Arana References: In-Reply-To: Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms070700030506060502020107" Cc: freebsd-hackers@freebsd.org Subject: Re: net/mpd causes a kernel freeze X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2006 15:36:01 -0000 This is a cryptographically signed message in MIME format. --------------ms070700030506060502020107 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Gonzalo Arana wrote: > Hi, > > When I open a pptp tunnel with net/mpd, my PC freezes (numlock stops > responding, for instance). exactly. a complete freeze, not even being able to break into DDB (i.e. even ctrl-alt-esc stops working) > > I am using 6.1-RELEASE with GENERIC kernel. I've recompiled removing > USB, SCSI/RAID controllers, with the same result. also occurs on -CURRENT as of Nov 4. > The freeze occurs right after the tunnel is up. actually, it's after the first packet is sent. i.e., i can have tunnel up as long as i want, but as soon as a packet is sent down the route, the system freezes. > Does anyone expierence the same problem? yes. and i'm glad to report that i found a solution for at least my instance. it turned out to be a config error. so what happened was this. i created an entry for a new tunnel in my mpd.conf nad of course done that by just copy-pasting the previous entry. ended up with these mysterious freezes. because this happened on -CURRENT, i went through great pains to try it on something more -STABLE, but to my complete astonishment it was all the same on -STABLE. and i positively knew that -STABLE was previously able to handle a tunnel to this very same endpoint. now i knew something was not right. my -CURRENT is vanilla GENERIC, so it already had WITNESS, INVARIANTS and DDB, but neither did i see any messages on the console, nor could i break into debugger (i could, prior to the freeze, but not after). so anyway, some fairly long time into the whole process, i just decided to start commenting my config line by line, to maybe see if any particular option would trigger this freeze. and bingo, there it was: i used _wrong_ up_script for this connection. i wrote the right one, but forgot to change the config line i copied from previous entry. so yeh, it's 100% reproducible: wrong up_script - freeze, no up_script or the right one - no freeze. so what's in the script? here it is in its entirety: IF=$1 /sbin/route delete default /sbin/route add 10.1.0.0/16 10.2.0.1 /sbin/route add default -iface $IF that's it. now what is important here, is that the network and gateway in the second line are wrong for this network configuration. in particular, 10.2.0.1 is not directly reachable. it's worth noting that this configuration would hang the machine only if used for the very first time. if used after the correct configuration, it would not make machine hang. e.g., if i boot a machine, set up a tunnel with "up_script wrong_script.sh" and then ping an external host, the machine hangs. however, if i boot, set up a tunnel with "up_script right_script.sh" (at this point the tunnel works as expected and external host is pingable), then tear it down, replace "up_script right_script.sh" with "up_script wrong_script.sh", the machine does not hang and external host is not pingable (no route to host). my guess is that this incorrect route somehow messes up routing table. > > Here are the relevant configs: > >> /usr/local/etc/mpd/mpd.conf: >> >> default: >> load vpn >> >> vpn: >> new -i ng0 vpn vpn >> set iface disable on-demand >> set iface idle 0 >> # disconnect the client after 8 hours >> set iface session 28800 >> #set iface route 192.168.2.0/24 >> set bundle disable multilink >> set bundle authname my_username >> set bundle password my_password >> set link yes acfcomp protocomp >> set link no pap chap >> set link accept pap >> set link mtu 1460 >> # If remote machine is NT you need this.. >> # set link enable no-orig-auth >> set link keep-alive 10 75 >> set ipcp no vjcomp >> >> /usr/local/etc/mpd/mpd.links: >> vpn: >> set link type pptp >> set pptp self ZZZ >> set pptp peer YYY >> set pptp enable originate incoming outcall >> set pptp disable windowing >> >> >> where: >> ZZZ my ethernet IP address >> YYY ip address of TCP peer >> > > Thank you very much in advance, > -- Deomid Ryabkov aka Rojer myself@rojer.pp.ru rojer@sysadmins.ru ICQ: 8025844 --------------ms070700030506060502020107 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJPTCC AvkwggJioAMCAQICEA6d3TvG5eRen2BAM1uAkm0wDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UE BhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMT I1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDQwMTE4MjY1NFoX DTA3MDQwMTE4MjY1NFowXzEQMA4GA1UEBBMHUnlhYmtvdjEPMA0GA1UEKhMGRGVvbWlkMRcw FQYDVQQDEw5EZW9taWQgUnlhYmtvdjEhMB8GCSqGSIb3DQEJARYSbXlzZWxmQHJvamVyLnBw LnJ1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmnOKvalRf0lrl/4S2fAVovyt 2FxjDn8hDhSOeYNY97Ddi8Y2t+eELg7cpxAUq9GnymPBQanGlvUN2VTuSA4YUVg+VE1yhGgE TDKm0CNVh0v5LOVVAs52IFvdQ0wREYRH0nPBa/ovPWVvlsJ/cIR5GhvRfAW3FbvuP+bEYU54 ESo7OTu7EeGVOLBTF5ow1zaU9PStIied3ffaK5xl8lB6TnQ7DBnIir0ugCqdAuaVxsjD4SfG hqzv42uOuvNjFCQhtFn9dUSnx1cF1TI39cumqVV4UNrqDlQZ4bgrBu/ClqSI4oJnfxgafNkq oSVx7mXNuD1U7V8tJRbOiNdZFpS6mwIDAQABoy8wLTAdBgNVHREEFjAUgRJteXNlbGZAcm9q ZXIucHAucnUwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQQFAAOBgQAmvjeaZmSMwreI1RIl M1frBBOatokRhsStY6nyswNwxpCCcMGiK6sS8a0rtE4Iowvm48oCfXG062anUAFUMJ+e6Fse uOE1lJKrFQRJWGUzp61BOZJH8HZfKnrb7ll2GXY7YvvBicmif/wdjEBgp0WwNucm6jJS/57f mY3M9LQbwzCCAvkwggJioAMCAQICEA6d3TvG5eRen2BAM1uAkm0wDQYJKoZIhvcNAQEEBQAw YjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4x LDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDQw MTE4MjY1NFoXDTA3MDQwMTE4MjY1NFowXzEQMA4GA1UEBBMHUnlhYmtvdjEPMA0GA1UEKhMG RGVvbWlkMRcwFQYDVQQDEw5EZW9taWQgUnlhYmtvdjEhMB8GCSqGSIb3DQEJARYSbXlzZWxm QHJvamVyLnBwLnJ1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmnOKvalRf0lr l/4S2fAVovyt2FxjDn8hDhSOeYNY97Ddi8Y2t+eELg7cpxAUq9GnymPBQanGlvUN2VTuSA4Y UVg+VE1yhGgETDKm0CNVh0v5LOVVAs52IFvdQ0wREYRH0nPBa/ovPWVvlsJ/cIR5GhvRfAW3 FbvuP+bEYU54ESo7OTu7EeGVOLBTF5ow1zaU9PStIied3ffaK5xl8lB6TnQ7DBnIir0ugCqd AuaVxsjD4SfGhqzv42uOuvNjFCQhtFn9dUSnx1cF1TI39cumqVV4UNrqDlQZ4bgrBu/ClqSI 4oJnfxgafNkqoSVx7mXNuD1U7V8tJRbOiNdZFpS6mwIDAQABoy8wLTAdBgNVHREEFjAUgRJt eXNlbGZAcm9qZXIucHAucnUwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQQFAAOBgQAmvjea ZmSMwreI1RIlM1frBBOatokRhsStY6nyswNwxpCCcMGiK6sS8a0rtE4Iowvm48oCfXG062an UAFUMJ+e6FseuOE1lJKrFQRJWGUzp61BOZJH8HZfKnrb7ll2GXY7YvvBicmif/wdjEBgp0Ww Nucm6jJS/57fmY3M9LQbwzCCAz8wggKooAMCAQICAQ0wDQYJKoZIhvcNAQEFBQAwgdExCzAJ BgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEa MBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy dmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBDQTEr MCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxAdGhhd3RlLmNvbTAeFw0wMzA3MTcw MDAwMDBaFw0xMzA3MTYyMzU5NTlaMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUg Q29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1h aWwgSXNzdWluZyBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxKY8VXNV+065ypla HmjAdQRwnd/p/6Me7L3N9VvyGna9fww6YfK/Uc4B1OVQCjDXAmNaLIkVcI7dyfArhVqqP3FW y688Cwfn8R+RNiQqE88r1fOCdz0Dviv+uxg+B79AgAJk16emu59l0cUqVIUPSAR/p7bRPGEE QB5kGXJgt/sCAwEAAaOBlDCBkTASBgNVHRMBAf8ECDAGAQH/AgEAMEMGA1UdHwQ8MDowOKA2 oDSGMmh0dHA6Ly9jcmwudGhhd3RlLmNvbS9UaGF3dGVQZXJzb25hbEZyZWVtYWlsQ0EuY3Js MAsGA1UdDwQEAwIBBjApBgNVHREEIjAgpB4wHDEaMBgGA1UEAxMRUHJpdmF0ZUxhYmVsMi0x MzgwDQYJKoZIhvcNAQEFBQADgYEASIzRUIPqCy7MDaNmrGcPf6+svsIXoUOWlJ1/TCG4+DYf qi2fNi/A9BxQIJNwPP2t4WFiw9k6GX6EsZkbAMUaC4J0niVQlGLH2ydxVyWN3amcOY6MIE9l X5Xa9/eH1sYITq726jTlEBpbNU1341YheILcIRk13iSx0x1G/11fZU8xggNkMIIDYAIBATB2 MGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQu MSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgSXNzdWluZyBDQQIQDp3dO8bl 5F6fYEAzW4CSbTAJBgUrDgMCGgUAoIIBwzAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwG CSqGSIb3DQEJBTEPFw0wNjEyMjUxNTE4MDJaMCMGCSqGSIb3DQEJBDEWBBRPRSVHwT+eGMJv YgodLa5uC8+PSDBSBgkqhkiG9w0BCQ8xRTBDMAoGCCqGSIb3DQMHMA4GCCqGSIb3DQMCAgIA gDANBggqhkiG9w0DAgIBQDAHBgUrDgMCBzANBggqhkiG9w0DAgIBKDCBhQYJKwYBBAGCNxAE MXgwdjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkg THRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECEA6d 3TvG5eRen2BAM1uAkm0wgYcGCyqGSIb3DQEJEAILMXigdjBiMQswCQYDVQQGEwJaQTElMCMG A1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBl cnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECEA6d3TvG5eRen2BAM1uAkm0wDQYJKoZIhvcN AQEBBQAEggEAYdSTzz82TJGNgBKmfKLpQfdRZT6YjQeKFwbegXs9FMxJEEq6epSOhM0a1xNf zBs97Bk3hVH7aQtdphk3sIPKceHPhQs6dM0wueHBFP/DvBs8vEPEBnVXQ2jMQG4CusjhFuv/ 58zhQ2AIqWK2vlG/KQ8UyNnV+mg1qWnj/S9T4rl6GxuKGVIzbdITnvSy2kUejiQlhm+4YfvJ 5PUCvzWIj7pOZ8c5UlfDEM3AQI6NQbxCwCpbtn7dFxCPAfmNL8TH24G19q8AqKTnGM1vOf3b RYAlLEclPws7bvnQmRldmmwYICV4E0EMvuGGgobF8ApUiKzEw4u1czqV5coDW2eHhwAAAAAA AA== --------------ms070700030506060502020107-- From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 25 21:37:26 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4714916A407 for ; Mon, 25 Dec 2006 21:37:26 +0000 (UTC) (envelope-from erik.udo@gmail.com) Received: from satakieli.dnainternet.net (satakieli.dnainternet.net [212.149.75.40]) by mx1.freebsd.org (Postfix) with ESMTP id 0E46A13C473 for ; Mon, 25 Dec 2006 21:37:26 +0000 (UTC) (envelope-from erik.udo@gmail.com) Received: from [192.168.1.11] (host-212-149-186-30.kpylaajakaista.net [212.149.186.30]) by satakieli.dnainternet.net (Postfix) with ESMTP id 2777DC932; Mon, 25 Dec 2006 23:17:21 +0200 (EET) Message-ID: <45903FE1.9070400@gmail.com> Date: Mon, 25 Dec 2006 23:17:21 +0200 From: Erik Udo User-Agent: Thunderbird 1.5.0.8 (X11/20061114) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Erik Udo Subject: mounting uzip image: Invalid argument X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2006 21:37:26 -0000 I'm making a live cd and i just hit a wall with uzip. I started by creating a null 1GB file, which i filled with FreeBSD. After that i compressed the file with mkuzip. Any attempts to mount this compressed image has failed, here is the output of truss when using mount_cd9660 to mount the image: koti# truss mount_cd9660 /dev/md0.uzip testi .... lstat("/stor/livecd/testi",0xbfbfe390) = 0 (0x0) stat("/stor/livecd/testi",0xbfbfe420) = 0 (0x0) open("/dev/md0.uzip",0x0,00) = 3 (0x3) ioctl(3,CHIOGPICKER,0xbfbfe15c) ERR#25 'Inappropriate ioctl for device' close(3) = 0 (0x0) mount("cd9660","/stor/livecd/testi",1,0xbfbfe8c0) ERR#22 'Invalid argument' mount_cd9660: write(2,0xbfbfdd00,14) = 14 (0xe) /dev/md0.uzipwrite(2,0xbfbfdd20,13) = 13 (0xd) : write(2,0x281348d0,2) = 2 (0x2) Invalid argument write(2,0xbfbfdd00,17) = 17 (0x11) exit(0x1) process exit, rval = 256 koti# My system is FreeBSD 6.1-p11. If anyone has any ideas on how to get this working, or what's wrong, please tell me. Cheers, Erik From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 25 21:36:05 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 89F3916A52F for ; Mon, 25 Dec 2006 21:36:05 +0000 (UTC) (envelope-from erik.u@dnainternet.net) Received: from isolokki.dnainternet.net (isolokki.dnainternet.net [212.149.75.39]) by mx1.freebsd.org (Postfix) with ESMTP id 5084713C46D for ; Mon, 25 Dec 2006 21:36:05 +0000 (UTC) (envelope-from erik.u@dnainternet.net) Received: from [192.168.1.11] (host-212-149-186-30.kpylaajakaista.net [212.149.186.30]) by isolokki.dnainternet.net (Postfix) with ESMTP id 6DAFDDE2D; Mon, 25 Dec 2006 23:10:41 +0200 (EET) Message-ID: <45903E50.2020804@dnainternet.net> Date: Mon, 25 Dec 2006 23:10:40 +0200 From: Erik Udo User-Agent: Thunderbird 1.5.0.8 (X11/20061114) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 26 Dec 2006 03:34:01 +0000 Cc: Erik Udo Subject: mounting uzip image: Invalid argument X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2006 21:36:05 -0000 I'm making a live cd and i just hit a wall with uzip. I started by creating a null 1GB file, which i filled with FreeBSD. After that i compressed the file with mkuzip. Any attempts to mount this compressed image has failed, here is the output of truss when using mount_cd9660 to mount the image: koti# truss mount_cd9660 /dev/md0.uzip testi .... lstat("/stor/livecd/testi",0xbfbfe390) = 0 (0x0) stat("/stor/livecd/testi",0xbfbfe420) = 0 (0x0) open("/dev/md0.uzip",0x0,00) = 3 (0x3) ioctl(3,CHIOGPICKER,0xbfbfe15c) ERR#25 'Inappropriate ioctl for device' close(3) = 0 (0x0) mount("cd9660","/stor/livecd/testi",1,0xbfbfe8c0) ERR#22 'Invalid argument' mount_cd9660: write(2,0xbfbfdd00,14) = 14 (0xe) /dev/md0.uzipwrite(2,0xbfbfdd20,13) = 13 (0xd) : write(2,0x281348d0,2) = 2 (0x2) Invalid argument write(2,0xbfbfdd00,17) = 17 (0x11) exit(0x1) process exit, rval = 256 koti# My system is FreeBSD 6.1-p11. If anyone has any ideas on how to get this working, or what's wrong, please tell me. Cheers, Erik From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 26 21:35:32 2006 Return-Path: X-Original-To: FreeBSD-Hackers@FreeBSD.org Delivered-To: FreeBSD-Hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34A1E16A407 for ; Tue, 26 Dec 2006 21:35:32 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: from digitaldaemon.com (digitaldaemon.com [63.105.9.34]) by mx1.freebsd.org (Postfix) with SMTP id 57D6513C466 for ; Tue, 26 Dec 2006 21:35:31 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: (qmail 26384 invoked by uid 98); 26 Dec 2006 21:09:08 -0000 Received: from 63.105.9.34 by digitaldaemon.com (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.87/1195. Clear:RC:1(63.105.9.34):. Processed in 0.064548 secs); 26 Dec 2006 21:09:08 -0000 X-Qmail-Scanner-Mail-From: jan@digitaldaemon.com via digitaldaemon.com X-Qmail-Scanner: 1.25 (Clear:RC:1(63.105.9.34):. Processed in 0.064548 secs) Received: from digitaldaemon.com (HELO ?160.63.102.2?) (63.105.9.34) by digitaldaemon.com with SMTP; 26 Dec 2006 21:09:08 -0000 Message-ID: <45918F6E.90006@digitaldaemon.com> Date: Tue, 26 Dec 2006 16:09:02 -0500 From: Jan Knepper User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: FreeBSD ISP , FreeBSD Hackers Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Dec 2006 21:35:32 -0000 All, (sorry for the cross post) Something goofy is going on with a 6.x kernel. Dual Opteron Server (Tyan motherboard). 2 GB RAM... 2 x 256 GB SATA HD's. Just upgraded this machine from FreeBSD 5.5-STABLE to 6.2RC# and than down to 6.1-RELEASE. For some reason FreeBSD 6.1 seems to be very unstable. I use a custom kernel, (most devices not present in the system have been removed). When I create an SMP kernel after an undefined about of time which I have seen varying from 5 minutes up to about 6 hours the kernel will just hang. Things that seem to accelerate/aggrevate this are running CVSup from a repository on the same system. Something else that seems to push it is dd if=/dev/ad4 if=/dev/ad6 bs=64m (copying the master disk to the supposed slave, however geom is not active and module geom_mirror is not loaded! When I take SMP out of the kernel config and rebuild and install instead of hanging, the system seems to crash and reboot when I perform the same action. Also... When I first upgraded I did get an error during boot: kernel: module_register_init: MOD_LOAD (amr_linux, 0xffffffff805db120, 0) error 6 I disabled device amr (under RAID controllers) in the kernel config which took care of this. Following the bootlog. If any of you had any idea what the problem might be I definitely would like to know. Thanks! Jan syslogd: kernel boot file is /boot/kernel/kernel kernel: Copyright (c) 1992-2006 The FreeBSD Project. kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 kernel: The Regents of the University of California. All rights reserved. kernel: FreeBSD 6.1-RELEASE #4: Tue Dec 26 12:03:35 EST 2006 kernel: root@digitaldaemon.com:/usr/src/sys/amd64/compile/digitaldaemon kernel: Timecounter "i8254" frequency 1193182 Hz quality 0 kernel: CPU: AMD Opteron(tm) Processor 246 (1993.53-MHz K8-class CPU) kernel: Origin = "AuthenticAMD" Id = 0xf5a Stepping = 10 kernel: Features=0x78bfbff kernel: AMD Features=0xe0500800 kernel: real memory = 2147418112 (2047 MB) kernel: avail memory = 2065596416 (1969 MB) kernel: ACPI APIC Table: kernel: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs kernel: cpu0 (BSP): APIC ID: 0 kernel: cpu1 (AP): APIC ID: 1 kernel: MADT: Forcing active-low polarity and level trigger for SCI kernel: ioapic0 irqs 0-23 on motherboard kernel: ioapic1 irqs 24-27 on motherboard kernel: ioapic2 irqs 28-31 on motherboard kernel: netsmb_dev: loaded kernel: acpi0: on motherboard kernel: acpi0: Power Button (fixed) kernel: Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 kernel: acpi_timer0: <24-bit timer at 3.579545MHz> port 0x5008-0x500b on acpi0 kernel: cpu0: on acpi0 kernel: acpi_throttle0: on cpu0 kernel: cpu1: on acpi0 kernel: pcib0: port 0xcf8-0xcff on acpi0 kernel: pci0: on pcib0 kernel: pcib1: at device 6.0 on pci0 kernel: pci3: on pcib1 kernel: ohci0: mem 0xff3fd000-0xff3fdfff irq 19 at device 0.0 on pci3 kernel: ohci0: [GIANT-LOCKED] kernel: usb0: OHCI version 1.0, legacy support kernel: usb0: on ohci0 kernel: usb0: USB revision 1.0 kernel: uhub0: AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 kernel: uhub0: 3 ports with 3 removable, self powered kernel: ohci1: mem 0xff3fe000-0xff3fefff irq 19 at device 0.1 on pci3 kernel: ohci1: [GIANT-LOCKED] kernel: usb1: OHCI version 1.0, legacy support kernel: usb1: on ohci1 kernel: usb1: USB revision 1.0 kernel: uhub1: AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 kernel: uhub1: 3 ports with 3 removable, self powered kernel: xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0x8080-0x80ff mem 0xff3ff800-0xff3ff87f irq 16 at device 10.0 on pci3 kernel: miibus0: on xl0 kernel: ukphy0: on miibus0 kernel: ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto kernel: xl0: Ethernet address: 00:04:75:ad:ac:0a kernel: atapci0: port 0x8c00-0x8c07,0x8880-0x8883,0x8800-0x8807,0x8480-0x8483,0x8400-0x840f mem 0xff3ffc00-0xff3fffff irq 17 at device 11.0 on pci3 kernel: ata2: on atapci0 kernel: ata3: on atapci0 kernel: ata4: on atapci0 kernel: ata5: on atapci0 kernel: fwohci0: mem 0xff3ff000-0xff3ff7ff,0xff3f8000-0xff3fbfff irq 19 at device 12.0 on pci3 kernel: fwohci0: OHCI version 1.10 (ROM=1) kernel: fwohci0: No. of Isochronous channels is 4. kernel: fwohci0: EUI64 00:e0:81:00:00:30:4c:06 kernel: fwohci0: Phy 1394a available S400, 2 ports. kernel: fwohci0: Link S400, max_rec 2048 bytes. kernel: firewire0: on fwohci0 kernel: fwe0: on firewire0 kernel: if_fwe0: Fake Ethernet address: 02:e0:81:30:4c:06 kernel: fwe0: Ethernet address: 02:e0:81:30:4c:06 kernel: fwe0: if_start running deferred for Giant kernel: sbp0: on firewire0 kernel: fwohci0: Initiate bus reset kernel: fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode kernel: firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) kernel: firewire0: bus manager 0 (me) kernel: isab0: at device 7.0 on pci0 kernel: isa0: on isab0 kernel: atapci1: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 7.1 on pci0 kernel: ata0: on atapci1 kernel: ata1: on atapci1 kernel: pci0: at device 7.2 (no driver attached) kernel: pci0: at device 7.3 (no driver attached) kernel: pci0: at device 7.5 (no driver attached) kernel: pcib2: at device 10.0 on pci0 kernel: pci2: on pcib2 kernel: bge0: mem 0xff1f0000-0xff1fffff irq 24 at device 9.0 on pci2 kernel: miibus1: on bge0 kernel: brgphy0: on miibus1 kernel: brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto kernel: bge0: Ethernet address: 00:e0:81:2d:ee:f7 kernel: pci0: at device 10.1 (no driver attached) kernel: pcib3: at device 11.0 on pci0 kernel: pci1: on pcib3 kernel: pci0: at device 11.1 (no driver attached) kernel: pcib4: on acpi0 kernel: pci4: on pcib4 kernel: pcib5: at device 1.0 on pci4 kernel: pci5: on pcib5 kernel: pci5: at device 0.0 (no driver attached) kernel: pci5: at device 0.1 (no driver attached) kernel: acpi_button0: on acpi0 kernel: atkbdc0: port 0x60,0x64 irq 1 on acpi0 kernel: atkbd0: irq 1 on atkbdc0 kernel: kbd0 at atkbd0 kernel: atkbd0: [GIANT-LOCKED] kernel: psm0: irq 12 on atkbdc0 kernel: psm0: [GIANT-LOCKED] kernel: psm0: model IntelliMouse Explorer, device ID 4 kernel: sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 kernel: sio0: type 16550A kernel: sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 kernel: sio1: type 16550A kernel: fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 kernel: fdc0: [FAST] kernel: ppc0: port 0x378-0x37f irq 7 on acpi0 kernel: ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode kernel: ppbus0: on ppc0 kernel: orm0: at iomem 0xc0000-0xccfff,0xcd000-0xd17ff,0xd1800-0xd1fff,0 xd2000-0xd2fff on isa0 kernel: sc0: at flags 0x100 on isa0 kernel: sc0: VGA <16 virtual consoles, flags=0x300> kernel: vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 kernel: ugen0: American Power Conversion Back-UPS RS 1500 FW:8.g9 .D USB FW:g9, rev 1.10/1.06, addr 2 kernel: Timecounters tick every 1.000 msec kernel: ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding enabled, default to deny, logging limited to 100 packets/entry by default kernel: acd0: DVDR at ata0-master UDMA33 kernel: ad4: 238475MB at ata2-master SATA150 kernel: ad6: 238475MB at ata3-master SATA150 kernel: SMP: AP CPU #1 Launched! kernel: Trying to mount root from ufs:/dev/ad4s1a From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 01:24:30 2006 Return-Path: X-Original-To: FreeBSD-Hackers@FreeBSD.org Delivered-To: FreeBSD-Hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1D0C416A40F for ; Wed, 27 Dec 2006 01:24:30 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: from digitaldaemon.com (digitaldaemon.com [63.105.9.34]) by mx1.freebsd.org (Postfix) with SMTP id F403A13C470 for ; Wed, 27 Dec 2006 01:24:28 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: (qmail 2439 invoked by uid 98); 27 Dec 2006 01:24:19 -0000 Received: from 63.105.9.34 by digitaldaemon.com (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.87/1195. Clear:RC:1(63.105.9.34):. Processed in 0.07042 secs); 27 Dec 2006 01:24:19 -0000 X-Qmail-Scanner-Mail-From: jan@digitaldaemon.com via digitaldaemon.com X-Qmail-Scanner: 1.25 (Clear:RC:1(63.105.9.34):. Processed in 0.07042 secs) Received: from digitaldaemon.com (HELO ?16.81.102.2?) (63.105.9.34) by digitaldaemon.com with SMTP; 27 Dec 2006 01:24:19 -0000 Message-ID: <4591CB3C.1060902@digitaldaemon.com> Date: Tue, 26 Dec 2006 20:24:12 -0500 From: Jan Knepper User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Tim McCullagh , FreeBSD ISP , FreeBSD Hackers References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> In-Reply-To: <004c01c7293b$d5e03b40$6500a8c0@laptopt> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 01:24:30 -0000 Tried that and started dd if=/dev/ad4 if=/dev/ad6 bs=1m Kernel went in panic and automatic reboot in about an hour... It gets worse... when it does reboot the disk drive will not show in the BIOS, nor does FreeBSD recognize it during boot. The system actually has to be turned off to reset the drive... This is bad... Any other suggestions? Thanks! Jan Tim McCullagh wrote: > Hi Jan > > try editing your loader.conf > > I had a similar sounding issue. As soon as I did the following the > system became stable immediately. It was also on a Tyan Mainboard, > although with dual Xeon's > > # vi /boot/loader.conf > hint.apic.0.disabled="1" > > > Regards > > Tim > ----- Original Message ----- From: "Jan Knepper" > To: "FreeBSD ISP" ; "FreeBSD Hackers" > > Sent: Wednesday, December 27, 2006 7:09 AM > Subject: 6.1-RELEASE / 6.2 Kernel Crash... > > >> All, (sorry for the cross post) >> >> Something goofy is going on with a 6.x kernel. >> >> Dual Opteron Server (Tyan motherboard). 2 GB RAM... 2 x 256 GB SATA >> HD's. >> Just upgraded this machine from FreeBSD 5.5-STABLE to 6.2RC# and than >> down to 6.1-RELEASE. >> For some reason FreeBSD 6.1 seems to be very unstable. I use a custom >> kernel, (most devices not present in the system have been removed). >> >> When I create an SMP kernel after an undefined about of time which I >> have seen varying from 5 minutes up to about 6 hours the kernel will >> just hang. Things that seem to accelerate/aggrevate this are running >> CVSup from a repository on the same system. >> Something else that seems to push it is dd if=/dev/ad4 if=/dev/ad6 >> bs=64m (copying the master disk to the supposed slave, however geom >> is not active and module geom_mirror is not loaded! >> >> When I take SMP out of the kernel config and rebuild and install >> instead of hanging, the system seems to crash and reboot when I >> perform the same action. >> >> Also... When I first upgraded I did get an error during boot: >> kernel: module_register_init: MOD_LOAD (amr_linux, >> 0xffffffff805db120, 0) error 6 >> I disabled device amr (under RAID controllers) in the kernel config >> which took care of this. >> >> Following the bootlog. If any of you had any idea what the problem >> might be I definitely would like to know. >> >> Thanks! >> Jan >> >> >> >> syslogd: kernel boot file is /boot/kernel/kernel >> kernel: Copyright (c) 1992-2006 The FreeBSD Project. >> kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, >> 1993, 1994 >> kernel: The Regents of the University of California. All rights >> reserved. >> kernel: FreeBSD 6.1-RELEASE #4: Tue Dec 26 12:03:35 EST 2006 >> kernel: root@digitaldaemon.com:/usr/src/sys/amd64/compile/digitaldaemon >> kernel: Timecounter "i8254" frequency 1193182 Hz quality 0 >> kernel: CPU: AMD Opteron(tm) Processor 246 (1993.53-MHz K8-class CPU) >> kernel: Origin = "AuthenticAMD" Id = 0xf5a Stepping = 10 >> kernel: >> Features=0x78bfbff >> >> kernel: AMD Features=0xe0500800 >> kernel: real memory = 2147418112 (2047 MB) >> kernel: avail memory = 2065596416 (1969 MB) >> kernel: ACPI APIC Table: >> kernel: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs >> kernel: cpu0 (BSP): APIC ID: 0 >> kernel: cpu1 (AP): APIC ID: 1 >> kernel: MADT: Forcing active-low polarity and level trigger for SCI >> kernel: ioapic0 irqs 0-23 on motherboard >> kernel: ioapic1 irqs 24-27 on motherboard >> kernel: ioapic2 irqs 28-31 on motherboard >> kernel: netsmb_dev: loaded >> kernel: acpi0: on motherboard >> kernel: acpi0: Power Button (fixed) >> kernel: Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 >> kernel: acpi_timer0: <24-bit timer at 3.579545MHz> port 0x5008-0x500b >> on acpi0 >> kernel: cpu0: on acpi0 >> kernel: acpi_throttle0: on cpu0 >> kernel: cpu1: on acpi0 >> kernel: pcib0: port 0xcf8-0xcff on acpi0 >> kernel: pci0: on pcib0 >> kernel: pcib1: at device 6.0 on pci0 >> kernel: pci3: on pcib1 >> kernel: ohci0: mem >> 0xff3fd000-0xff3fdfff irq 19 at device 0.0 on pci3 >> kernel: ohci0: [GIANT-LOCKED] >> kernel: usb0: OHCI version 1.0, legacy support >> kernel: usb0: on ohci0 >> kernel: usb0: USB revision 1.0 >> kernel: uhub0: AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 >> kernel: uhub0: 3 ports with 3 removable, self powered >> kernel: ohci1: mem >> 0xff3fe000-0xff3fefff irq 19 at device 0.1 on pci3 >> kernel: ohci1: [GIANT-LOCKED] >> kernel: usb1: OHCI version 1.0, legacy support >> kernel: usb1: on ohci1 >> kernel: usb1: USB revision 1.0 >> kernel: uhub1: AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 >> kernel: uhub1: 3 ports with 3 removable, self powered >> kernel: xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0x8080-0x80ff >> mem 0xff3ff800-0xff3ff87f irq 16 at device 10.0 on pci3 >> kernel: miibus0: on xl0 >> kernel: ukphy0: on miibus0 >> kernel: ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto >> kernel: xl0: Ethernet address: 00:04:75:ad:ac:0a >> kernel: atapci0: port >> 0x8c00-0x8c07,0x8880-0x8883,0x8800-0x8807,0x8480-0x8483,0x8400-0x840f >> mem 0xff3ffc00-0xff3fffff irq 17 at device 11.0 on pci3 >> kernel: ata2: on atapci0 >> kernel: ata3: on atapci0 >> kernel: ata4: on atapci0 >> kernel: ata5: on atapci0 >> kernel: fwohci0: mem >> 0xff3ff000-0xff3ff7ff,0xff3f8000-0xff3fbfff irq 19 at device 12.0 on >> pci3 >> kernel: fwohci0: OHCI version 1.10 (ROM=1) >> kernel: fwohci0: No. of Isochronous channels is 4. >> kernel: fwohci0: EUI64 00:e0:81:00:00:30:4c:06 >> kernel: fwohci0: Phy 1394a available S400, 2 ports. >> kernel: fwohci0: Link S400, max_rec 2048 bytes. >> kernel: firewire0: on fwohci0 >> kernel: fwe0: on firewire0 >> kernel: if_fwe0: Fake Ethernet address: 02:e0:81:30:4c:06 >> kernel: fwe0: Ethernet address: 02:e0:81:30:4c:06 >> kernel: fwe0: if_start running deferred for Giant >> kernel: sbp0: on firewire0 >> kernel: fwohci0: Initiate bus reset >> kernel: fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode >> kernel: firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) >> kernel: firewire0: bus manager 0 (me) >> kernel: isab0: at device 7.0 on pci0 >> kernel: isa0: on isab0 >> kernel: atapci1: port >> 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 7.1 on pci0 >> kernel: ata0: on atapci1 >> kernel: ata1: on atapci1 >> kernel: pci0: at device 7.2 (no driver attached) >> kernel: pci0: at device 7.3 (no driver attached) >> kernel: pci0: at device 7.5 (no driver attached) >> kernel: pcib2: at device 10.0 on pci0 >> kernel: pci2: on pcib2 >> kernel: bge0: >> mem 0xff1f0000-0xff1fffff irq 24 at device 9.0 on pci2 >> kernel: miibus1: on bge0 >> kernel: brgphy0: on miibus1 >> kernel: brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, >> 1000baseTX, 1000baseTX-FDX, auto >> kernel: bge0: Ethernet address: 00:e0:81:2d:ee:f7 >> kernel: pci0: at device 10.1 >> (no driver attached) >> kernel: pcib3: at device 11.0 on pci0 >> kernel: pci1: on pcib3 >> kernel: pci0: at device 11.1 >> (no driver attached) >> kernel: pcib4: on acpi0 >> kernel: pci4: on pcib4 >> kernel: pcib5: at device 1.0 on pci4 >> kernel: pci5: on pcib5 >> kernel: pci5: at device 0.0 (no driver attached) >> kernel: pci5: at device 0.1 (no driver attached) >> kernel: acpi_button0: on acpi0 >> kernel: atkbdc0: port 0x60,0x64 irq 1 >> on acpi0 >> kernel: atkbd0: irq 1 on atkbdc0 >> kernel: kbd0 at atkbd0 >> kernel: atkbd0: [GIANT-LOCKED] >> kernel: psm0: irq 12 on atkbdc0 >> kernel: psm0: [GIANT-LOCKED] >> kernel: psm0: model IntelliMouse Explorer, device ID 4 >> kernel: sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 >> flags 0x10 on acpi0 >> kernel: sio0: type 16550A >> kernel: sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on >> acpi0 >> kernel: sio1: type 16550A >> kernel: fdc0: port 0x3f0-0x3f5,0x3f7 >> irq 6 drq 2 on acpi0 >> kernel: fdc0: [FAST] >> kernel: ppc0: port 0x378-0x37f irq 7 >> on acpi0 >> kernel: ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode >> kernel: ppbus0: on ppc0 >> kernel: orm0: at iomem >> 0xc0000-0xccfff,0xcd000-0xd17ff,0xd1800-0xd1fff,0 >> xd2000-0xd2fff on isa0 >> kernel: sc0: at flags 0x100 on isa0 >> kernel: sc0: VGA <16 virtual consoles, flags=0x300> >> kernel: vga0: at port 0x3c0-0x3df iomem >> 0xa0000-0xbffff on isa0 >> kernel: ugen0: American Power Conversion Back-UPS RS 1500 FW:8.g9 .D >> USB FW:g9, rev 1.10/1.06, addr 2 >> kernel: Timecounters tick every 1.000 msec >> kernel: ipfw2 (+ipv6) initialized, divert loadable, rule-based >> forwarding enabled, default to deny, logging limited to 100 >> packets/entry by default >> kernel: acd0: DVDR at ata0-master UDMA33 >> kernel: ad4: 238475MB at ata2-master SATA150 >> kernel: ad6: 238475MB at ata3-master SATA150 >> kernel: SMP: AP CPU #1 Launched! >> kernel: Trying to mount root from ufs:/dev/ad4s1a >> >> _______________________________________________ >> freebsd-isp@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-isp >> To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org" >> > > _______________________________________________ > freebsd-isp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-isp > To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org" > > From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 03:37:43 2006 Return-Path: X-Original-To: FreeBSD-Hackers@FreeBSD.org Delivered-To: FreeBSD-Hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1389516A407; Wed, 27 Dec 2006 03:37:43 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id F3EAC13C48A; Wed, 27 Dec 2006 03:37:42 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id CE9571A3C1C; Tue, 26 Dec 2006 19:37:42 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 3CE87513F2; Tue, 26 Dec 2006 22:37:42 -0500 (EST) Date: Tue, 26 Dec 2006 22:37:42 -0500 From: Kris Kennaway To: Jan Knepper Message-ID: <20061227033742.GA9706@xor.obsecurity.org> References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3MwIy2ne0vdjdPXF" Content-Disposition: inline In-Reply-To: <4591CB3C.1060902@digitaldaemon.com> User-Agent: Mutt/1.4.2.2i Cc: Tim McCullagh , FreeBSD ISP , FreeBSD Hackers Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 03:37:43 -0000 --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 26, 2006 at 08:24:12PM -0500, Jan Knepper wrote: > Tried that and started >=20 > dd if=3D/dev/ad4 if=3D/dev/ad6 bs=3D1m >=20 > Kernel went in panic and automatic reboot in about an hour... >=20 > It gets worse... when it does reboot the disk drive will not show in the= =20 > BIOS, nor does FreeBSD recognize it during boot. The system actually has= =20 > to be turned off to reset the drive... >=20 > This is bad... >=20 > Any other suggestions? Sounds like a bug in the support for your ATA hardware, or your hardware is broken. The very least you'll need to do is to obtain a crashdump and debugging backtrace (see the developers handbook) and CC it to sos@ Kris --3MwIy2ne0vdjdPXF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFkeqFWry0BWjoQKURAqP9AKC5e35lRbzZFYXzEul7PHfaO+kpggCbBBar dCe1/AwKwvaRXB3DRWpbsVY= =UpcX -----END PGP SIGNATURE----- --3MwIy2ne0vdjdPXF-- From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 03:39:01 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 44E9116A407 for ; Wed, 27 Dec 2006 03:39:01 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 3351613C466 for ; Wed, 27 Dec 2006 03:39:01 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 153A61A4D81; Tue, 26 Dec 2006 19:39:01 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 6F9E6513F2; Tue, 26 Dec 2006 22:39:00 -0500 (EST) Date: Tue, 26 Dec 2006 22:39:00 -0500 From: Kris Kennaway To: Erik Udo Message-ID: <20061227033900.GB9706@xor.obsecurity.org> References: <45903FE1.9070400@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tsOsTdHNUZQcU9Ye" Content-Disposition: inline In-Reply-To: <45903FE1.9070400@gmail.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org Subject: Re: mounting uzip image: Invalid argument X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 03:39:01 -0000 --tsOsTdHNUZQcU9Ye Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 25, 2006 at 11:17:21PM +0200, Erik Udo wrote: > I'm making a live cd and i just hit a wall with uzip. >=20 > I started by creating a null 1GB file, which i filled with FreeBSD.=20 > After that i compressed the file with mkuzip. >=20 > Any attempts to mount this compressed image has failed, here is the=20 > output of truss when using mount_cd9660 to mount the image: >=20 > koti# truss mount_cd9660 /dev/md0.uzip testi > .... > lstat("/stor/livecd/testi",0xbfbfe390) =3D 0 (0x0) > stat("/stor/livecd/testi",0xbfbfe420) =3D 0 (0x0) > open("/dev/md0.uzip",0x0,00) =3D 3 (0x3) > ioctl(3,CHIOGPICKER,0xbfbfe15c) ERR#25 'Inappropriate=20 > ioctl for device' Looks like you don't have geom_uzip configured, per the manpage. Kris --tsOsTdHNUZQcU9Ye Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFkerTWry0BWjoQKURAgZgAJ4jVfCohN1C859sUWbQSNkmV7wS4gCg8kTw SjIV39oQ4LHBwoZwtH5vNGM= =IeJ1 -----END PGP SIGNATURE----- --tsOsTdHNUZQcU9Ye-- From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 08:10:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2493916A407 for ; Wed, 27 Dec 2006 08:10:08 +0000 (UTC) (envelope-from erik.udo@gmail.com) Received: from satakieli.dnainternet.net (satakieli.dnainternet.net [212.149.75.40]) by mx1.freebsd.org (Postfix) with ESMTP id C83E813C46D for ; Wed, 27 Dec 2006 08:10:07 +0000 (UTC) (envelope-from erik.udo@gmail.com) Received: from [192.168.1.11] (host-212-149-186-30.kpylaajakaista.net [212.149.186.30]) by satakieli.dnainternet.net (Postfix) with ESMTP id 4BF02C830; Wed, 27 Dec 2006 10:10:04 +0200 (EET) Message-ID: <45922A5B.3060604@gmail.com> Date: Wed, 27 Dec 2006 10:10:03 +0200 From: Erik Udo User-Agent: Thunderbird 1.5.0.9 (X11/20061226) MIME-Version: 1.0 To: Kris Kennaway References: <45903FE1.9070400@gmail.com> <20061227033900.GB9706@xor.obsecurity.org> In-Reply-To: <20061227033900.GB9706@xor.obsecurity.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: mounting uzip image: Invalid argument X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 08:10:08 -0000 Kris Kennaway wrote: > On Mon, Dec 25, 2006 at 11:17:21PM +0200, Erik Udo wrote: >> I'm making a live cd and i just hit a wall with uzip. >> >> I started by creating a null 1GB file, which i filled with FreeBSD. >> After that i compressed the file with mkuzip. >> >> Any attempts to mount this compressed image has failed, here is the >> output of truss when using mount_cd9660 to mount the image: >> >> koti# truss mount_cd9660 /dev/md0.uzip testi >> .... >> lstat("/stor/livecd/testi",0xbfbfe390) = 0 (0x0) >> stat("/stor/livecd/testi",0xbfbfe420) = 0 (0x0) >> open("/dev/md0.uzip",0x0,00) = 3 (0x3) >> ioctl(3,CHIOGPICKER,0xbfbfe15c) ERR#25 'Inappropriate >> ioctl for device' > > Looks like you don't have geom_uzip configured, per the manpage. > > Kris geom_uzip configured? I have it loaded in the kernel. Anyway, i solved it by "mount -o to /dev/md0.uzip testi", i didn't need to mount it with mount_cd9660. Perhaps the man page is wrong? From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 11:07:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA90216A407; Wed, 27 Dec 2006 11:07:37 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 5D80513C466; Wed, 27 Dec 2006 11:07:37 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [193.217.102.48] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe07.swip.net (CommuniGate Pro SMTP 5.0.12) with ESMTPA id 368938761; Wed, 27 Dec 2006 11:07:29 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Wed, 27 Dec 2006 11:07:11 +0100 User-Agent: KMail/1.7 References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> In-Reply-To: <4591CB3C.1060902@digitaldaemon.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612271107.13124.hselasky@c2i.net> Cc: Tim McCullagh , FreeBSD ISP Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 11:07:38 -0000 On Wednesday 27 December 2006 02:24, Jan Knepper wrote: > Tried that and started > > dd if=/dev/ad4 if=/dev/ad6 bs=1m > > Kernel went in panic and automatic reboot in about an hour... > > It gets worse... when it does reboot the disk drive will not show in the > BIOS, nor does FreeBSD recognize it during boot. The system actually has > to be turned off to reset the drive... > > This is bad... > > Any other suggestions? > Maybe you can setup a serial console to grab the panic message? http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup.html --HPS From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 12:26:17 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C159B16A47B for ; Wed, 27 Dec 2006 12:26:17 +0000 (UTC) (envelope-from iluxa@pes.spb.ru) Received: from ns1.pes.spb.ru (ns1.pes.spb.ru [81.3.179.155]) by mx1.freebsd.org (Postfix) with ESMTP id 7106313C493 for ; Wed, 27 Dec 2006 12:26:17 +0000 (UTC) (envelope-from iluxa@pes.spb.ru) Received: from [10.200.4.84] (helo=smtp.buh.pes.spb.ru) by ns1.pes.spb.ru with esmtp (Exim 3.35 #1 (Debian)) id 1GzXXe-0006S7-00 for ; Wed, 27 Dec 2006 15:05:54 +0300 Received: from drweb by smtp.buh.pes.spb.ru with drweb-scanned (Exim 4.43) id 1GzXXa-0004SV-1Q for freebsd-hackers@freebsd.org; Wed, 27 Dec 2006 15:05:50 +0300 Received: from ost012.buh.pes.spb.ru ([10.200.16.40]) by smtp.buh.pes.spb.ru with esmtp (Exim 4.43) id 1GzXXZ-0004SJ-Nv; Wed, 27 Dec 2006 15:05:49 +0300 Message-ID: <4592619D.7020800@pes.spb.ru> Date: Wed, 27 Dec 2006 15:05:49 +0300 From: Illia Baidakov User-Agent: Thunderbird 1.5.0.8 (X11/20061117) MIME-Version: 1.0 To: Hans Petter Selasky , freebsd-hackers@freebsd.org References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> <200612271107.13124.hselasky@c2i.net> In-Reply-To: <200612271107.13124.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 12:26:17 -0000 Hans Petter Selasky wrote: > On Wednesday 27 December 2006 02:24, Jan Knepper wrote: >> Tried that and started >> >> dd if=/dev/ad4 if=/dev/ad6 bs=1m >> >> Kernel went in panic and automatic reboot in about an hour... Does it reproducable while invoking dd with the input device as if=/dev/ad4s1a or using your drives' slice and partition? And the "of=" too. -- Best regards, Illia Baidakov From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 12:37:49 2006 Return-Path: X-Original-To: FreeBSD-Hackers@freebsd.org Delivered-To: FreeBSD-Hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF0AA16A403 for ; Wed, 27 Dec 2006 12:37:49 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: from digitaldaemon.com (digitaldaemon.com [63.105.9.34]) by mx1.freebsd.org (Postfix) with SMTP id 8135613C489 for ; Wed, 27 Dec 2006 12:37:45 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: (qmail 34647 invoked by uid 98); 27 Dec 2006 12:37:42 -0000 Received: from 63.105.9.34 by digitaldaemon.com (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.87/1195. Clear:RC:1(63.105.9.34):. Processed in 1.433789 secs); 27 Dec 2006 12:37:42 -0000 X-Qmail-Scanner-Mail-From: jan@digitaldaemon.com via digitaldaemon.com X-Qmail-Scanner: 1.25 (Clear:RC:1(63.105.9.34):. Processed in 1.433789 secs) Received: from digitaldaemon.com (HELO ?184.157.102.2?) (63.105.9.34) by digitaldaemon.com with SMTP; 27 Dec 2006 12:37:40 -0000 Message-ID: <4592690B.7080800@digitaldaemon.com> Date: Wed, 27 Dec 2006 07:37:31 -0500 From: Jan Knepper User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Mario Theodoridis References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> <200612261808.08984.mario@schmut.com> In-Reply-To: <200612261808.08984.mario@schmut.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-isp@freebsd.org, Tim McCullagh , FreeBSD Hackers Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 12:37:49 -0000 FreeBSD 5.x branch run on that machine for almost 2 years without a problem and magically the same time period in *hours* that I upgrade the machine I get hardware problems too? Not an impossible coincidence, but not very likely... Thanks! Jan Mario Theodoridis wrote: > is it just me, or is this beginning to sound like hardware problems? > > mario;> > > On Tuesday 26 December 2006 17:24, Jan Knepper wrote: > >> Tried that and started >> >> dd if=/dev/ad4 if=/dev/ad6 bs=1m >> >> Kernel went in panic and automatic reboot in about an hour... >> >> It gets worse... when it does reboot the disk drive will not show in the >> BIOS, nor does FreeBSD recognize it during boot. The system actually has >> to be turned off to reset the drive... >> >> This is bad... >> >> Any other suggestions? >> >> Thanks! >> Jan >> >> Tim McCullagh wrote: >> >>> Hi Jan >>> >>> try editing your loader.conf >>> >>> I had a similar sounding issue. As soon as I did the following the >>> system became stable immediately. It was also on a Tyan Mainboard, >>> although with dual Xeon's >>> >>> # vi /boot/loader.conf >>> hint.apic.0.disabled="1" >>> >>> >>> Regards >>> >>> Tim >>> ----- Original Message ----- From: "Jan Knepper" >>> To: "FreeBSD ISP" ; "FreeBSD Hackers" >>> >>> Sent: Wednesday, December 27, 2006 7:09 AM >>> Subject: 6.1-RELEASE / 6.2 Kernel Crash... >>> >>> >>>> All, (sorry for the cross post) >>>> >>>> Something goofy is going on with a 6.x kernel. >>>> >>>> Dual Opteron Server (Tyan motherboard). 2 GB RAM... 2 x 256 GB SATA >>>> HD's. >>>> Just upgraded this machine from FreeBSD 5.5-STABLE to 6.2RC# and than >>>> down to 6.1-RELEASE. >>>> For some reason FreeBSD 6.1 seems to be very unstable. I use a custom >>>> kernel, (most devices not present in the system have been removed). >>>> >>>> When I create an SMP kernel after an undefined about of time which I >>>> have seen varying from 5 minutes up to about 6 hours the kernel will >>>> just hang. Things that seem to accelerate/aggrevate this are running >>>> CVSup from a repository on the same system. >>>> Something else that seems to push it is dd if=/dev/ad4 if=/dev/ad6 >>>> bs=64m (copying the master disk to the supposed slave, however geom >>>> is not active and module geom_mirror is not loaded! >>>> >>>> When I take SMP out of the kernel config and rebuild and install >>>> instead of hanging, the system seems to crash and reboot when I >>>> perform the same action. >>>> >>>> Also... When I first upgraded I did get an error during boot: >>>> kernel: module_register_init: MOD_LOAD (amr_linux, >>>> 0xffffffff805db120, 0) error 6 >>>> I disabled device amr (under RAID controllers) in the kernel config >>>> which took care of this. >>>> >>>> Following the bootlog. If any of you had any idea what the problem >>>> might be I definitely would like to know. >>>> >>>> Thanks! >>>> Jan >>>> >>>> >>>> >>>> syslogd: kernel boot file is /boot/kernel/kernel >>>> kernel: Copyright (c) 1992-2006 The FreeBSD Project. >>>> kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, >>>> 1993, 1994 >>>> kernel: The Regents of the University of California. All rights >>>> reserved. >>>> kernel: FreeBSD 6.1-RELEASE #4: Tue Dec 26 12:03:35 EST 2006 >>>> kernel: root@digitaldaemon.com:/usr/src/sys/amd64/compile/digitaldaemon >>>> kernel: Timecounter "i8254" frequency 1193182 Hz quality 0 >>>> kernel: CPU: AMD Opteron(tm) Processor 246 (1993.53-MHz K8-class CPU) >>>> kernel: Origin = "AuthenticAMD" Id = 0xf5a Stepping = 10 >>>> kernel: >>>> Features=0x78bfbff>>> MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2> >>>> >>>> kernel: AMD Features=0xe0500800 >>>> kernel: real memory = 2147418112 (2047 MB) >>>> kernel: avail memory = 2065596416 (1969 MB) >>>> kernel: ACPI APIC Table: >>>> kernel: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs >>>> kernel: cpu0 (BSP): APIC ID: 0 >>>> kernel: cpu1 (AP): APIC ID: 1 >>>> kernel: MADT: Forcing active-low polarity and level trigger for SCI >>>> kernel: ioapic0 irqs 0-23 on motherboard >>>> kernel: ioapic1 irqs 24-27 on motherboard >>>> kernel: ioapic2 irqs 28-31 on motherboard >>>> kernel: netsmb_dev: loaded >>>> kernel: acpi0: on motherboard >>>> kernel: acpi0: Power Button (fixed) >>>> kernel: Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 >>>> kernel: acpi_timer0: <24-bit timer at 3.579545MHz> port 0x5008-0x500b >>>> on acpi0 >>>> kernel: cpu0: on acpi0 >>>> kernel: acpi_throttle0: on cpu0 >>>> kernel: cpu1: on acpi0 >>>> kernel: pcib0: port 0xcf8-0xcff on acpi0 >>>> kernel: pci0: on pcib0 >>>> kernel: pcib1: at device 6.0 on pci0 >>>> kernel: pci3: on pcib1 >>>> kernel: ohci0: mem >>>> 0xff3fd000-0xff3fdfff irq 19 at device 0.0 on pci3 >>>> kernel: ohci0: [GIANT-LOCKED] >>>> kernel: usb0: OHCI version 1.0, legacy support >>>> kernel: usb0: on ohci0 >>>> kernel: usb0: USB revision 1.0 >>>> kernel: uhub0: AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 >>>> kernel: uhub0: 3 ports with 3 removable, self powered >>>> kernel: ohci1: mem >>>> 0xff3fe000-0xff3fefff irq 19 at device 0.1 on pci3 >>>> kernel: ohci1: [GIANT-LOCKED] >>>> kernel: usb1: OHCI version 1.0, legacy support >>>> kernel: usb1: on ohci1 >>>> kernel: usb1: USB revision 1.0 >>>> kernel: uhub1: AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 >>>> kernel: uhub1: 3 ports with 3 removable, self powered >>>> kernel: xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0x8080-0x80ff >>>> mem 0xff3ff800-0xff3ff87f irq 16 at device 10.0 on pci3 >>>> kernel: miibus0: on xl0 >>>> kernel: ukphy0: on miibus0 >>>> kernel: ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto >>>> kernel: xl0: Ethernet address: 00:04:75:ad:ac:0a >>>> kernel: atapci0: port >>>> 0x8c00-0x8c07,0x8880-0x8883,0x8800-0x8807,0x8480-0x8483,0x8400-0x840f >>>> mem 0xff3ffc00-0xff3fffff irq 17 at device 11.0 on pci3 >>>> kernel: ata2: on atapci0 >>>> kernel: ata3: on atapci0 >>>> kernel: ata4: on atapci0 >>>> kernel: ata5: on atapci0 >>>> kernel: fwohci0: mem >>>> 0xff3ff000-0xff3ff7ff,0xff3f8000-0xff3fbfff irq 19 at device 12.0 on >>>> pci3 >>>> kernel: fwohci0: OHCI version 1.10 (ROM=1) >>>> kernel: fwohci0: No. of Isochronous channels is 4. >>>> kernel: fwohci0: EUI64 00:e0:81:00:00:30:4c:06 >>>> kernel: fwohci0: Phy 1394a available S400, 2 ports. >>>> kernel: fwohci0: Link S400, max_rec 2048 bytes. >>>> kernel: firewire0: on fwohci0 >>>> kernel: fwe0: on firewire0 >>>> kernel: if_fwe0: Fake Ethernet address: 02:e0:81:30:4c:06 >>>> kernel: fwe0: Ethernet address: 02:e0:81:30:4c:06 >>>> kernel: fwe0: if_start running deferred for Giant >>>> kernel: sbp0: on firewire0 >>>> kernel: fwohci0: Initiate bus reset >>>> kernel: fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode >>>> kernel: firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) >>>> kernel: firewire0: bus manager 0 (me) >>>> kernel: isab0: at device 7.0 on pci0 >>>> kernel: isa0: on isab0 >>>> kernel: atapci1: port >>>> 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 7.1 on pci0 >>>> kernel: ata0: on atapci1 >>>> kernel: ata1: on atapci1 >>>> kernel: pci0: at device 7.2 (no driver attached) >>>> kernel: pci0: at device 7.3 (no driver attached) >>>> kernel: pci0: at device 7.5 (no driver attached) >>>> kernel: pcib2: at device 10.0 on pci0 >>>> kernel: pci2: on pcib2 >>>> kernel: bge0: >>>> mem 0xff1f0000-0xff1fffff irq 24 at device 9.0 on pci2 >>>> kernel: miibus1: on bge0 >>>> kernel: brgphy0: on miibus1 >>>> kernel: brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, >>>> 1000baseTX, 1000baseTX-FDX, auto >>>> kernel: bge0: Ethernet address: 00:e0:81:2d:ee:f7 >>>> kernel: pci0: at device 10.1 >>>> (no driver attached) >>>> kernel: pcib3: at device 11.0 on pci0 >>>> kernel: pci1: on pcib3 >>>> kernel: pci0: at device 11.1 >>>> (no driver attached) >>>> kernel: pcib4: on acpi0 >>>> kernel: pci4: on pcib4 >>>> kernel: pcib5: at device 1.0 on pci4 >>>> kernel: pci5: on pcib5 >>>> kernel: pci5: at device 0.0 (no driver attached) >>>> kernel: pci5: at device 0.1 (no driver attached) >>>> kernel: acpi_button0: on acpi0 >>>> kernel: atkbdc0: port 0x60,0x64 irq 1 >>>> on acpi0 >>>> kernel: atkbd0: irq 1 on atkbdc0 >>>> kernel: kbd0 at atkbd0 >>>> kernel: atkbd0: [GIANT-LOCKED] >>>> kernel: psm0: irq 12 on atkbdc0 >>>> kernel: psm0: [GIANT-LOCKED] >>>> kernel: psm0: model IntelliMouse Explorer, device ID 4 >>>> kernel: sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 >>>> flags 0x10 on acpi0 >>>> kernel: sio0: type 16550A >>>> kernel: sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on >>>> acpi0 >>>> kernel: sio1: type 16550A >>>> kernel: fdc0: port 0x3f0-0x3f5,0x3f7 >>>> irq 6 drq 2 on acpi0 >>>> kernel: fdc0: [FAST] >>>> kernel: ppc0: port 0x378-0x37f irq 7 >>>> on acpi0 >>>> kernel: ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode >>>> kernel: ppbus0: on ppc0 >>>> kernel: orm0: at iomem >>>> 0xc0000-0xccfff,0xcd000-0xd17ff,0xd1800-0xd1fff,0 >>>> xd2000-0xd2fff on isa0 >>>> kernel: sc0: at flags 0x100 on isa0 >>>> kernel: sc0: VGA <16 virtual consoles, flags=0x300> >>>> kernel: vga0: at port 0x3c0-0x3df iomem >>>> 0xa0000-0xbffff on isa0 >>>> kernel: ugen0: American Power Conversion Back-UPS RS 1500 FW:8.g9 .D >>>> USB FW:g9, rev 1.10/1.06, addr 2 >>>> kernel: Timecounters tick every 1.000 msec >>>> kernel: ipfw2 (+ipv6) initialized, divert loadable, rule-based >>>> forwarding enabled, default to deny, logging limited to 100 >>>> packets/entry by default >>>> kernel: acd0: DVDR at ata0-master UDMA33 >>>> kernel: ad4: 238475MB at ata2-master SATA150 >>>> kernel: ad6: 238475MB at ata3-master SATA150 >>>> kernel: SMP: AP CPU #1 Launched! >>>> kernel: Trying to mount root from ufs:/dev/ad4s1a >>>> >>>> _______________________________________________ >>>> freebsd-isp@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-isp >>>> To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org" >>>> >>> _______________________________________________ >>> freebsd-isp@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-isp >>> To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org" >>> >> _______________________________________________ >> freebsd-isp@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-isp >> To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org" >> > _______________________________________________ > freebsd-isp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-isp > To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org" > > > From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 12:40:02 2006 Return-Path: X-Original-To: FreeBSD-Hackers@FreeBSD.org Delivered-To: FreeBSD-Hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9E1916A47B for ; Wed, 27 Dec 2006 12:40:02 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: from digitaldaemon.com (digitaldaemon.com [63.105.9.34]) by mx1.freebsd.org (Postfix) with SMTP id C8A3713C494 for ; Wed, 27 Dec 2006 12:40:00 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: (qmail 34764 invoked by uid 98); 27 Dec 2006 12:39:58 -0000 Received: from 63.105.9.34 by digitaldaemon.com (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.87/1195. Clear:RC:1(63.105.9.34):. Processed in 0.293546 secs); 27 Dec 2006 12:39:58 -0000 X-Qmail-Scanner-Mail-From: jan@digitaldaemon.com via digitaldaemon.com X-Qmail-Scanner: 1.25 (Clear:RC:1(63.105.9.34):. Processed in 0.293546 secs) Received: from digitaldaemon.com (HELO ?184.157.102.2?) (63.105.9.34) by digitaldaemon.com with SMTP; 27 Dec 2006 12:39:57 -0000 Message-ID: <45926996.2070603@digitaldaemon.com> Date: Wed, 27 Dec 2006 07:39:50 -0500 From: Jan Knepper User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Kris Kennaway References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> <20061227033742.GA9706@xor.obsecurity.org> In-Reply-To: <20061227033742.GA9706@xor.obsecurity.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Tim McCullagh , FreeBSD ISP , FreeBSD Hackers Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 12:40:02 -0000 Kris Kennaway wrote: > On Tue, Dec 26, 2006 at 08:24:12PM -0500, Jan Knepper wrote: > >> Tried that and started >> >> dd if=/dev/ad4 if=/dev/ad6 bs=1m >> >> Kernel went in panic and automatic reboot in about an hour... >> >> It gets worse... when it does reboot the disk drive will not show in the >> BIOS, nor does FreeBSD recognize it during boot. The system actually has >> to be turned off to reset the drive... >> >> This is bad... >> >> Any other suggestions? >> > > Sounds like a bug in the support for your ATA hardware, or your > hardware is broken. The very least you'll need to do is to obtain a > crashdump and debugging backtrace (see the developers handbook) and CC > it to sos@ > Will start working on that (or downgrade to 5.5)... I am testing that and I think although I have not found a documented way of doing that it can be done. Thanks! Jan From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 12:42:17 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B67A116A494 for ; Wed, 27 Dec 2006 12:42:17 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: from digitaldaemon.com (digitaldaemon.com [63.105.9.34]) by mx1.freebsd.org (Postfix) with SMTP id 5333A13C493 for ; Wed, 27 Dec 2006 12:42:16 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: (qmail 34929 invoked by uid 98); 27 Dec 2006 12:42:12 -0000 Received: from 63.105.9.34 by digitaldaemon.com (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.87/1195. Clear:RC:1(63.105.9.34):. Processed in 0.225964 secs); 27 Dec 2006 12:42:12 -0000 X-Qmail-Scanner-Mail-From: jan@digitaldaemon.com via digitaldaemon.com X-Qmail-Scanner: 1.25 (Clear:RC:1(63.105.9.34):. Processed in 0.225964 secs) Received: from digitaldaemon.com (HELO ?184.157.102.2?) (63.105.9.34) by digitaldaemon.com with SMTP; 27 Dec 2006 12:42:12 -0000 Message-ID: <45926A1D.8040009@digitaldaemon.com> Date: Wed, 27 Dec 2006 07:42:05 -0500 From: Jan Knepper User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Hans Petter Selasky References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> <200612271107.13124.hselasky@c2i.net> In-Reply-To: <200612271107.13124.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Tim McCullagh , freebsd-hackers@freebsd.org, FreeBSD ISP Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 12:42:17 -0000 Hans Petter Selasky wrote: > On Wednesday 27 December 2006 02:24, Jan Knepper wrote: > >> Tried that and started >> >> dd if=/dev/ad4 if=/dev/ad6 bs=1m >> >> Kernel went in panic and automatic reboot in about an hour... >> >> It gets worse... when it does reboot the disk drive will not show in the >> BIOS, nor does FreeBSD recognize it during boot. The system actually has >> to be turned off to reset the drive... >> >> This is bad... >> >> Any other suggestions? >> >> > > Maybe you can setup a serial console to grab the panic message? > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup.html > > Good idea... I might just try that... Thanks! Jan From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 19:27:28 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 873D016A403 for ; Wed, 27 Dec 2006 19:27:28 +0000 (UTC) (envelope-from erik.udo@gmail.com) Received: from satakieli.dnainternet.net (satakieli.dnainternet.net [212.149.75.40]) by mx1.freebsd.org (Postfix) with ESMTP id 4EA4513C474 for ; Wed, 27 Dec 2006 19:27:28 +0000 (UTC) (envelope-from erik.udo@gmail.com) Received: from [192.168.1.11] (host-212-149-186-30.kpylaajakaista.net [212.149.186.30]) by satakieli.dnainternet.net (Postfix) with ESMTP id EB1ACC8BC for ; Wed, 27 Dec 2006 21:27:25 +0200 (EET) Message-ID: <4592C91C.2040801@gmail.com> Date: Wed, 27 Dec 2006 21:27:24 +0200 From: Erik Udo User-Agent: Thunderbird 1.5.0.9 (X11/20061226) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 19:27:28 -0000 How can i make init chroot after executing /etc/rc, and executing /etc/rc again in the chrooted enviroment? For this to work, i'd like to know at what point do i call chroot(), becouse init.c uses fork() at the point where it runs the rc script. The thing is, i want to run a whole system in a chrooted enviroment in this livecd i'm making. But the command "chroot /mnt/root /etc/rc" returns after the /etc/rc has been run, dropping me back from the chrooted enviroment. And if it doesn't, init never starts the multiuser mode. So how can i go to the multiuser mode in a chrooted enviroment? I guess the only way to do that is to modify init.c Any help/feedback is appreciated. Cheers, Erik From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 20:40:27 2006 Return-Path: X-Original-To: FreeBSD-Hackers@freebsd.org Delivered-To: FreeBSD-Hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2E79816A492 for ; Wed, 27 Dec 2006 20:40:27 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.freebsd.org (Postfix) with SMTP id C96ED13C475 for ; Wed, 27 Dec 2006 20:40:26 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 76064 invoked by uid 1001); 27 Dec 2006 20:14:13 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Wed, 27 Dec 2006 15:14:12 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17810.54292.139339.466850@bhuda.mired.org> Date: Wed, 27 Dec 2006 15:14:12 -0500 To: Jan Knepper In-Reply-To: <4592690B.7080800@digitaldaemon.com> References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> <200612261808.08984.mario@schmut.com> <4592690B.7080800@digitaldaemon.com> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: freebsd-isp@freebsd.org, Tim McCullagh , Mario Theodoridis , FreeBSD Hackers Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 20:40:27 -0000 In <4592690B.7080800@digitaldaemon.com>, Jan Knepper typed: > FreeBSD 5.x branch run on that machine for almost 2 years without a > problem and magically the same time period in *hours* that I upgrade the > machine I get hardware problems too? Not an impossible coincidence, but > not very likely... Or it could be that you have a hardware problem in hardware that wasn't used by 5.x but is by 6.x. I had an 11/750 that ran BSD 4.2 for years with no problems. When I tried to upgrade it to BSD 4.3, it would reliably panic in namei during the boot process. We had about a dozen 750s, and this was our test machine - so none of them were going to be upgraded until this got fixed, deadline or no. Stepping through namei in the debugger showed that one of the instructions in the function prelude was changing a high bit in a register it wasn't supposed to touch at all. In 4.2, the register was unused, because namei got passed a handful of arguments. In 4.3, it got passed a pointer to a struct with some of that information in it, and the pointer wound up in said register. Dereferencing the pointer caused the panic. A motherboard replacement solved the problem. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 20:50:30 2006 Return-Path: X-Original-To: FreeBSD-Hackers@freebsd.org Delivered-To: FreeBSD-Hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F04716A407 for ; Wed, 27 Dec 2006 20:50:30 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: from digitaldaemon.com (digitaldaemon.com [63.105.9.34]) by mx1.freebsd.org (Postfix) with SMTP id 7C04C13C466 for ; Wed, 27 Dec 2006 20:50:29 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: (qmail 67330 invoked by uid 98); 27 Dec 2006 20:50:25 -0000 Received: from 63.105.9.34 by digitaldaemon.com (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.87/1195. Clear:RC:1(63.105.9.34):. Processed in 0.340147 secs); 27 Dec 2006 20:50:25 -0000 X-Qmail-Scanner-Mail-From: jan@digitaldaemon.com via digitaldaemon.com X-Qmail-Scanner: 1.25 (Clear:RC:1(63.105.9.34):. Processed in 0.340147 secs) Received: from digitaldaemon.com (HELO ?16.81.102.2?) (63.105.9.34) by digitaldaemon.com with SMTP; 27 Dec 2006 20:50:25 -0000 Message-ID: <4592DC8C.4040704@digitaldaemon.com> Date: Wed, 27 Dec 2006 15:50:20 -0500 From: Jan Knepper User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Mike Meyer References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> <200612261808.08984.mario@schmut.com> <4592690B.7080800@digitaldaemon.com> <17810.54292.139339.466850@bhuda.mired.org> In-Reply-To: <17810.54292.139339.466850@bhuda.mired.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-isp@freebsd.org, Tim McCullagh , Mario Theodoridis , FreeBSD Hackers Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 20:50:30 -0000 Understood... and exactly as I wrote... Not impossible, but not that likely... Thanks! Jan Mike Meyer wrote: > In <4592690B.7080800@digitaldaemon.com>, Jan Knepper typed: > >> FreeBSD 5.x branch run on that machine for almost 2 years without a >> problem and magically the same time period in *hours* that I upgrade the >> machine I get hardware problems too? Not an impossible coincidence, but >> not very likely... >> > > Or it could be that you have a hardware problem in hardware that > wasn't used by 5.x but is by 6.x. > > > I had an 11/750 that ran BSD 4.2 for years with no problems. When I > tried to upgrade it to BSD 4.3, it would reliably panic in namei > during the boot process. We had about a dozen 750s, and this was our > test machine - so none of them were going to be upgraded until this > got fixed, deadline or no. > > Stepping through namei in the debugger showed that one of the > instructions in the function prelude was changing a high bit in a > register it wasn't supposed to touch at all. In 4.2, the register was > unused, because namei got passed a handful of arguments. In 4.3, it > got passed a pointer to a struct with some of that information in it, > and the pointer wound up in said register. Dereferencing the pointer > caused the panic. > > A motherboard replacement solved the problem. > > > > From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 23:22:39 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF0F716A403 for ; Wed, 27 Dec 2006 23:22:39 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.freebsd.org (Postfix) with ESMTP id ABCE013C48E for ; Wed, 27 Dec 2006 23:22:39 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id E660A5F50; Thu, 28 Dec 2006 01:50:52 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id C3D2B5F28; Thu, 28 Dec 2006 01:50:52 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id kBRMoQfn076661; Thu, 28 Dec 2006 01:50:26 +0300 (MSK) (envelope-from ru) Date: Thu, 28 Dec 2006 01:50:26 +0300 From: Ruslan Ermilov To: Erik Udo Message-ID: <20061227225026.GA76597@rambler-co.ru> References: <4592C91C.2040801@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EVF5PPMfhYS0aIcm" Content-Disposition: inline In-Reply-To: <4592C91C.2040801@gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: freebsd-hackers@FreeBSD.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 23:22:40 -0000 --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 27, 2006 at 09:27:24PM +0200, Erik Udo wrote: > How can i make init chroot after executing /etc/rc, and executing=20 > /etc/rc again in the chrooted enviroment? >=20 Go look at the NetBSD init(8) that can do this, and bring us back a patch for this. Quote from the NetBSD init(8) manpage: : 2. Multi-user boot (default operation). Executes /etc/rc (see rc(8)). : If this was the first state entered (as opposed to entering here : after state 1), then /etc/rc will be invoked with its first argument : being `autoboot'. If /etc/rc exits with a non-zero (error) exit : code, commence single user operation by giving the super-user a : shell on the console by going to state 1 (single user). Otherwise, : proceed to state 3. :=20 : If value of the ``init.root'' sysctl node is not equal to / at this : point, the /etc/rc process will be run inside a chroot(2) indicated : by sysctl with the same error handling as above. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --EVF5PPMfhYS0aIcm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFkviyqRfpzJluFF4RApTUAJ9pvHSUHurie8kVlO3xfr7QU7syGACfY25x 3a7+nJn3om3XmmsvioxmQPQ= =j3r0 -----END PGP SIGNATURE----- --EVF5PPMfhYS0aIcm-- From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 23:46:43 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F7A416A415 for ; Wed, 27 Dec 2006 23:46:43 +0000 (UTC) (envelope-from dave@horsfall.org) Received: from dave.horsfall.org (mrdavi2.lnk.telstra.net [139.130.75.233]) by mx1.freebsd.org (Postfix) with ESMTP id AF7C413C473 for ; Wed, 27 Dec 2006 23:46:41 +0000 (UTC) (envelope-from dave@horsfall.org) Received: from localhost (dave@localhost) by dave.horsfall.org (8.11.4/8.11.4) with ESMTP id kBRN7JH24991 for ; Thu, 28 Dec 2006 10:07:19 +1100 (EST) Date: Thu, 28 Dec 2006 10:07:18 +1100 (EST) From: Dave Horsfall To: FreeBSD Hackers In-Reply-To: <17810.54292.139339.466850@bhuda.mired.org> Message-ID: References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> <200612261808.08984.mario@schmut.com> <4592690B.7080800@digitaldaemon.com> <17810.54292.139339.466850@bhuda.mired.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 23:46:43 -0000 On Wed, 27 Dec 2006, Mike Meyer wrote: > I had an 11/750 that ran BSD 4.2 for years with no problems. When I > tried to upgrade it to BSD 4.3, it would reliably panic in namei during > the boot process. We had about a dozen 750s, and this was our test > machine - so none of them were going to be upgraded until this got > fixed, deadline or no. Heh. We had a PDP-11/40 running Edition 6, and it was unable to use the "overlapped seeks" feature of the RK-11 controller, so of course Unix got blamed by DEC. Turned out that DEC OSs (RSX, RSTS etc) never used that feature, and an FCO was necessary to fix it. -- Dave From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 00:52:05 2006 Return-Path: X-Original-To: FreeBSD-Hackers@freebsd.org Delivered-To: FreeBSD-Hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 73B2916A407 for ; Thu, 28 Dec 2006 00:52:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with SMTP id 0C2DA13C470 for ; Thu, 28 Dec 2006 00:52:04 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 17252 invoked by uid 399); 28 Dec 2006 00:25:23 -0000 Received: from localhost (HELO ?192.168.0.5?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 28 Dec 2006 00:25:23 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <45930EF1.2040105@FreeBSD.org> Date: Wed, 27 Dec 2006 16:25:21 -0800 From: Doug Barton Organization: http://www.freebsd.org/ User-Agent: Thunderbird 1.5.0.8 (X11/20061215) MIME-Version: 1.0 To: Jan Knepper References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> <200612261808.08984.mario@schmut.com> <4592690B.7080800@digitaldaemon.com> In-Reply-To: <4592690B.7080800@digitaldaemon.com> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-isp@freebsd.org, Tim McCullagh , Mario Theodoridis , FreeBSD Hackers Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: FreeBSD-stable@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 00:52:05 -0000 [Attempting to redirect this to -stable, where it's more appropriate.] Jan Knepper wrote: > FreeBSD 5.x branch run on that machine for almost 2 years without a > problem and magically the same time period in *hours* that I upgrade the > machine I get hardware problems too? Not an impossible coincidence, but > not very likely... Depends on how you did the upgrade. Was the machine running continuously for 2 years, then you turned it off, then you did the upgrade? I had a box die that way because (we found out later) that the system drive's spindle had "issues" that were not apparent until it had been turned off, cooled down, then spun (sort of) back up. IOW, you're probably right, but "magical" hardware problems that develop during upgrade periods are more common than a lot of people realize. Meanwhile, back at the ranch, if you can't easily get a serial console up and running, your earlier suggestion of putting the box back to the last known good 5.x release is a good one. At least that can help rule out hardware _failure_, as opposed to hardware-used-differently issues. hth, Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 27 17:31:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1203F16A407 for ; Wed, 27 Dec 2006 17:31:42 +0000 (UTC) (envelope-from gergely.czuczy@harmless.hu) Received: from marvin.harmless.hu (marvin.harmless.hu [195.56.55.204]) by mx1.freebsd.org (Postfix) with ESMTP id 2E7DF13C46D for ; Wed, 27 Dec 2006 17:31:40 +0000 (UTC) (envelope-from gergely.czuczy@harmless.hu) Received: from localhost (marvin-mail [192.168.0.2]) by marvin.harmless.hu (Postfix) with ESMTP id 8B3D37C0AA2 for ; Wed, 27 Dec 2006 18:09:42 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.4.2 (20060627) (Debian) at harmless.hu Received: from marvin.harmless.hu ([192.168.0.2]) by localhost (marvin.harmless.hu [192.168.0.2]) (amavisd-new, port 10024) with ESMTP id Hyv8qQCbRW5Y for ; Wed, 27 Dec 2006 18:09:42 +0100 (CET) Received: from marvin.harmless.hu (localhost [127.0.0.1]) by marvin.harmless.hu (Postfix) with ESMTP id 3D1747C010C for ; Wed, 27 Dec 2006 18:09:41 +0100 (CET) Date: Wed, 27 Dec 2006 18:09:41 +0100 From: Gergely CZUCZY To: freebsd-hackers@freebsd.org Message-ID: <20061227170941.GA44402@harmless.hu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=x-unknown; protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99" Content-Disposition: inline User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Mailman-Approved-At: Thu, 28 Dec 2006 01:35:26 +0000 Subject: unresolved symbol for C++ class dtor X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 17:31:42 -0000 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable hello i've written a testprogram to check how dynamic linking works for C++ code, specially for class, when are global objects' ctors and dtors are being called etc. however, i've run into a very strange problem. in the main program i have a "class module", which has a virtual destructor. The dlopen()'d module has a class derived from this one. Main program: class module { public: module(); virtual ~module(); }; mod_bar: class modbar: public module { public: modbar(): module() {}; ~modbar() {}; }; Of course the main program's module class's methods are not just declared they are also defined elsewhere. This is the way i try to dlopen() mod_bar: if ( !(dh =3D dlopen(MOD_BAR, RTLD_NOW|RTLD_GLOBAL)) ) { ... } i've got the following error message when running the code: Unable to dlopen(lib/mod_bar.so): lib/mod_bar.so: Undefined symbol "_ZN6mod= uleD2Ev" however, i've check the testprogram: $ nm bin/dltest | grep _ZN6moduleD2Ev 08048918 T _ZN6moduleD2Ev so it does exist. i've tried to compile the binaries both without and without -fpic -fPIC, but nothing had changed. the question is, what am i doing wrong? according to the symbols, the dynamic linker should be able to load that symbol, however it doesn't. what do i need to do to fix this? looking forward for answers, Bye, Gergely Czuczy mailto: gergely.czuczy@harmless.hu --=20 Weenies test. Geniuses solve problems that arise. --5vNYLRcllDrimb99 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) owF1Vc9vG0UUDq3gMKKHHjjzGiHZVrwbJzGN6yhKmzgKSGmDgqtKcIhmd2a908zO bGdmvXGalAsHkDhUvYLgygWpElyQkPgLQEKIO/8BHDiCxJu115giJMuaeTPzve99 78c+vXZ16cr1H59/8/7KJ88+femrV9ailaxwTo2CjJqxUMFap7MWdLvdznqwEbzJ 443eRty9uUm7m71Od//Zl7/saeW4csFwkvM+OH7mVnNJhdqCOKXGcrdduCTokfre QNhcW+GEVn0QSgrF52dDQ5VNuAn2VayZUKM+PCq04yzIjVCORpITknIpNSGiMeZQ GuHwJVB0bF1u9MjQDJxG3zw+hVSXwCaKZiIGdHSKiKTU5tRCog3srawAuuFtsDmP BZVyUtljSa1tQ5l6YMNhJHVEJejoIY+dbZDYaWOBKgZsusI7EUdsiBGDM+AuDpGn LvmYmzZUTE2hMFpkRgGNE7AOYx1xQM4YVRYSocClHDKUDupABKQU31JYrjhBplkh +bLnJuIUDy1BOGFcgfwYKmAKTy6EISIxqXOumq0Gm73z9xGrgiKMGzFGronRKFgq LGjFkfXdBf99sugWHhPIi0iKuE9gZmu2tnBdM3jyj/FyixDcnUTULKD43Qzj/0Dx SrPVn8PD40vv4Ul9Uu09+FGCuSuwvv6jWmNOuPLrt9ylmlWJIko7eFhYh3LhsUEF 8P2kyiGVVqM5wYrEHErLsQKM12To5cGf91TSCabFYQYxl7XEMA+VgEigCTeaLIXt jUF94+7R4GT3znEbjoeHg5N7Rw8uqsXB4dHuncNWC1pehzAMCVzOKnuEPL2/RGO1 l764uDFYnBm3lmLdVNWJRaX8kb/oK7lP7ivfJAvcpIhWZ+xCq1HZfxv6cF/VIdtJ FmkJyyfv3buJN7YJajhY3x8vv1jL0+byThe6rk/eAJVBJNQqk94OFzAyPIcZ3AyM dHBu9G6t9WD44glB+QUmRnML/ExYF860cEb4PGFX6ywXcppydETRbiHSLoVSYIoL V3VlvQ6SHOssSN55e69NIjRg7lMvV0qZH07YfgxdeLBHBRLGiYRZ9s1FEch3H9P+ emm0Gu0AjWNtWCW3rhhM9bLtCmFxzHADFhlIhmMB6nxITX2tIfT0XRtmotYxqwYG XPlmqAMoPo0ZN/ifiLOqS3cIkVr7QeZHVUkNq0YWjs2SG6RCdicc/w+4GXEcZ3vn RXw+Idge0mGuR1NzGFfm2zifM4n1FKYFIUGwvd4hDzhXXlSfwBAOcFNY3Fotx/NZ ZadhoPoWu+OjnasvL/kPQf0VuX5l87elz8MPLs5++vB48Of6r989vfUxeet859Wl L9jzn8fRt79//0Pjtc++Xs7/uvHuH6//DQ== =U1DI -----END PGP SIGNATURE----- --5vNYLRcllDrimb99-- From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 02:35:00 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5068D16A407 for ; Thu, 28 Dec 2006 02:35:00 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.226]) by mx1.freebsd.org (Postfix) with ESMTP id 0DE3D13C463 for ; Thu, 28 Dec 2006 02:34:59 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so4187953wxc for ; Wed, 27 Dec 2006 18:34:59 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=HYch7IioR1IgCXst3N4LK0DnydjSoVEcJVyvgMMB6iC7uI0TOdgEXx7o9psfmN6tXA61XjRu5nZji2sE/fchvmkOCQjqwDRBKMriL2KW31dhGrRyDQ+uMJzwGUjvWFjcEn/q7fDlpGKUc3tDunDMlVrbGgEBbLLO0n1zpmqyjyE= Received: by 10.70.75.14 with SMTP id x14mr26685717wxa.1167271625891; Wed, 27 Dec 2006 18:07:05 -0800 (PST) Received: from kan.dnsalias.net ( [24.34.98.164]) by mx.google.com with ESMTP id 6sm29790705wrh.2006.12.27.18.07.04; Wed, 27 Dec 2006 18:07:05 -0800 (PST) Date: Wed, 27 Dec 2006 21:06:59 -0500 From: Alexander Kabaev To: Gergely CZUCZY Message-ID: <20061227210659.282da266@kan.dnsalias.net> In-Reply-To: <20061227170941.GA44402@harmless.hu> References: <20061227170941.GA44402@harmless.hu> X-Mailer: Claws Mail 2.6.1 (GTK+ 2.10.6; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_Wbpc_MAyQUiAAl+fD302qXC; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-hackers@freebsd.org Subject: Re: unresolved symbol for C++ class dtor X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 02:35:00 -0000 --Sig_Wbpc_MAyQUiAAl+fD302qXC Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 27 Dec 2006 18:09:41 +0100 Gergely CZUCZY wrote: Executables only export symbols required by shared libraries known at link time by default. You want --export-dynamic on linker command line or ether -rdynamic or -Wl,--export-dynamic on CC command line. --=20 Alexander Kabaev --Sig_Wbpc_MAyQUiAAl+fD302qXC Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFkybGQ6z1jMm+XZYRAs2HAKDnEmcVwQni2xE9xksQtrbaThcv1gCfUgoW 8+OudXt3meL8op4GXgzZfds= =+9JB -----END PGP SIGNATURE----- --Sig_Wbpc_MAyQUiAAl+fD302qXC-- From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 05:25:06 2006 Return-Path: X-Original-To: FreeBSD-Hackers@FreeBSD.org Delivered-To: FreeBSD-Hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA7D016A407 for ; Thu, 28 Dec 2006 05:25:06 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: from digitaldaemon.com (digitaldaemon.com [63.105.9.34]) by mx1.freebsd.org (Postfix) with SMTP id 4D84713C470 for ; Thu, 28 Dec 2006 05:25:05 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: (qmail 2680 invoked by uid 98); 28 Dec 2006 05:25:04 -0000 Received: from 63.105.9.34 by digitaldaemon.com (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.87/1195. Clear:RC:1(63.105.9.34):. Processed in 0.136763 secs); 28 Dec 2006 05:25:04 -0000 X-Qmail-Scanner-Mail-From: jan@digitaldaemon.com via digitaldaemon.com X-Qmail-Scanner: 1.25 (Clear:RC:1(63.105.9.34):. Processed in 0.136763 secs) Received: from digitaldaemon.com (HELO ?160.63.102.2?) (63.105.9.34) by digitaldaemon.com with SMTP; 28 Dec 2006 05:25:03 -0000 Message-ID: <4593552E.80400@digitaldaemon.com> Date: Thu, 28 Dec 2006 00:25:02 -0500 From: Jan Knepper User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Kris Kennaway References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> <20061227033742.GA9706@xor.obsecurity.org> In-Reply-To: <20061227033742.GA9706@xor.obsecurity.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Tim McCullagh , FreeBSD ISP , FreeBSD Hackers Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 05:25:07 -0000 Kris Kennaway wrote: > On Tue, Dec 26, 2006 at 08:24:12PM -0500, Jan Knepper wrote: > >> Tried that and started >> >> dd if=/dev/ad4 if=/dev/ad6 bs=1m >> >> Kernel went in panic and automatic reboot in about an hour... >> >> It gets worse... when it does reboot the disk drive will not show in the >> BIOS, nor does FreeBSD recognize it during boot. The system actually has >> to be turned off to reset the drive... >> >> This is bad... >> >> Any other suggestions? >> > > Sounds like a bug in the support for your ATA hardware, or your > hardware is broken. The very least you'll need to do is to obtain a > crashdump and debugging backtrace (see the developers handbook) and CC > it to sos@ > > This is getting funnier... I added: dumpdev="AUTO" to: rc.conf Rebooted the system and tried to get it to crash again... And indeed it does in process 9: taskq Then it starts dumping which takes a couple of seconds as the machine has 2 GB Ram... Than it reboots... and the next thing you know... savecore does NOT recognize a dump on the swap file system. If does not save anything to /var/crash... Tried this about 10 times... No luck... Any other idea's? Thanks! Jan From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 06:22:18 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0ECE316A403 for ; Thu, 28 Dec 2006 06:22:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id ACFF813C475 for ; Thu, 28 Dec 2006 06:22:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kBS5gZL0061275; Thu, 28 Dec 2006 00:42:37 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 27 Dec 2006 23:50:43 -0500 User-Agent: KMail/1.9.4 References: <20061214190510.GA26590@neutrino.bsdhome.com> <552E24DE-C1D1-41B1-83D2-157F0A3E0449@bleepsoft.com> In-Reply-To: <552E24DE-C1D1-41B1-83D2-157F0A3E0449@bleepsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612272350.43680.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Thu, 28 Dec 2006 00:42:39 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2386/Wed Dec 27 13:32:31 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: "R. Tyler Ballance" , Brian Dean Subject: Re: Kernel hang on 6.x X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 06:22:18 -0000 On Thursday 14 December 2006 16:06, R. Tyler Ballance wrote: > > On Dec 14, 2006, at 1:05 PM, Brian Dean wrote: > > > Hi, > > > > We're experiencing a kernel hang on a 6.x quad processor Sun amd64 > > based system. We are able to reproduce it fairly reliably, but the > > environment to do so is not easily replicatable so I cannot provide a > > simple test case. However, I have been able to build a debug kernel > > and when the system "hangs", I can break to the debugger prompt. But > > once there, I'm not sure what to do to isolate where the system is > > hung up. I have confirmed that the hang occurs in both SMP and > > uniprocessor mode. Here are some system details: > > > I think you'll need to ship this machine to my house for further > um....erm, diagnostics, yes, that's it ;) > > > On a more serious topic, can you paste the output from: > > > ddb> show pcpu > ddb>allpcpu > ddb>traceall > ddb>show alllocks > ddb>show lockedvnods > > Just curious as to whether those would show more info, because you're > right, that trace is about as informative as new printer paper :) The 'traceall' seemed to miss several threads actually (like pid 18). Can you get a 'ps'? Also, are you able to get a kernel dump when this happens? -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 12:37:22 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68BDC16A412 for ; Thu, 28 Dec 2006 12:37:22 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id CCAF913C475 for ; Thu, 28 Dec 2006 12:37:21 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (hsrqxa@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kBSCbF3c047392; Thu, 28 Dec 2006 13:37:20 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id kBSCbE2n047391; Thu, 28 Dec 2006 13:37:14 +0100 (CET) (envelope-from olli) Date: Thu, 28 Dec 2006 13:37:14 +0100 (CET) Message-Id: <200612281237.kBSCbE2n047391@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, erik.udo@gmail.com In-Reply-To: <4592C91C.2040801@gmail.com> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 28 Dec 2006 13:37:20 +0100 (CET) Cc: Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, erik.udo@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 12:37:22 -0000 Erik Udo wrote: > How can i make init chroot after executing /etc/rc, and executing > /etc/rc again in the chrooted enviroment? > > For this to work, i'd like to know at what point do i call chroot(), > becouse init.c uses fork() at the point where it runs the rc script. > > The thing is, i want to run a whole system in a chrooted enviroment in > this livecd i'm making. But the command "chroot /mnt/root /etc/rc" > returns after the /etc/rc has been run, dropping me back from the > chrooted enviroment. And if it doesn't, init never starts the multiuser > mode. That's exactly the problem I had when I created a combined DVD-ROM with FreeBSD and DragonFly BSD on it. For them to share the same ISO-9660, at least one of them needed to be chrooted. I decided to add the feature to DragonFly BSD's init(8) because the DragonFly people seemed to be easier to convince of the usefulness. ;-) Indeed, the feature was committed quickly. I didn't try to send-pr a similar patch for FreeBSD. It shouldn't be too difficult to port it, though: http://www.dragonflybsd.org/cvsweb/src/sbin/init/init.c The chroot() patch has been committed with r1.6. It uses kenv to specify the chroot directory, so it can easily be set by the loader(8), e.g. using a custom boot menu. Best regards Oliver PS: I see NetBSD has a similar feature, too. Maybe FreeBSD should join the crowd and adopt it. ;-) -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "Python tricks" is a tough one, cuz the language is so clean. E.g., C makes an art of confusing pointers with arrays and strings, which leads to lotsa neat pointer tricks; APL mistakes everything for an array, leading to neat one-liners; and Perl confuses everything period, making each line a joyous adventure . -- Tim Peters From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 15:11:45 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69FD816A403 for ; Thu, 28 Dec 2006 15:11:45 +0000 (UTC) (envelope-from steve@localhost.lu) Received: from linion.ion.lu (linion.ion.lu [80.90.47.168]) by mx1.freebsd.org (Postfix) with ESMTP id BA54C13C466 for ; Thu, 28 Dec 2006 15:11:44 +0000 (UTC) (envelope-from steve@localhost.lu) Received: (qmail 5887 invoked by uid 89); 28 Dec 2006 16:06:00 +0100 Received: from localhost (HELO ?127.0.0.1?) (steve@localhost.lu@127.0.0.1) by linion.ion.lu with SMTP; 28 Dec 2006 16:06:00 +0100 Message-ID: <4593DD1A.40700@localhost.lu> Date: Thu, 28 Dec 2006 16:04:58 +0100 From: Steve Clement User-Agent: Thunderbird 1.5.0.9 (X11/20061222) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 28 Dec 2006 16:53:40 +0000 Cc: Subject: repeatedly unloading a stuck module followed by a segfault X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 15:11:45 -0000 Hi, I recently compiled the rather experimental if_wpi driver (Interl 3945 Wireless Card) Now I noticed it would take quite a long time to unload or rather it wouldn't unload because of a bug, so I tried to repeatedly unload it and I had a kernel segfault followed by a reboot :) I wondered whether the actual module has a bug that provokes this segv? Who handles such an event? cheers a lot, Steve Clement From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 15:12:02 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 368FA16A403 for ; Thu, 28 Dec 2006 15:12:02 +0000 (UTC) (envelope-from steve@localhost.lu) Received: from linion.ion.lu (linion.ion.lu [80.90.47.168]) by mx1.freebsd.org (Postfix) with ESMTP id 80B4013C46E for ; Thu, 28 Dec 2006 15:12:01 +0000 (UTC) (envelope-from steve@localhost.lu) Received: (qmail 5438 invoked by uid 89); 28 Dec 2006 15:58:54 +0100 Received: from localhost (HELO ?127.0.0.1?) (steve@localhost.lu@127.0.0.1) by linion.ion.lu with SMTP; 28 Dec 2006 15:58:54 +0100 Message-ID: <4593DB6A.7030208@localhost.lu> Date: Thu, 28 Dec 2006 15:57:46 +0100 From: Steve Clement User-Agent: Thunderbird 1.5.0.9 (X11/20061222) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org, freebsd-performance@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 28 Dec 2006 16:53:49 +0000 Cc: sos@FreeBSD.org Subject: ICH7 IO Performance Issues X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 15:12:02 -0000 Hi list, I recently bought a New Asus W5F - 12" Laptop and am experiencing some issues with: If "Heavy" disk access occurs I experience overall system hangs Say I just compiled OpenOffice.Org and am happy all is fine so I can do a make clean. Make clean generates quite a lot of disk IO and everything begins lagging like: ls or playing an MP3 file. So I tried to reproduce this by doing the following: cat /dev/random > /tmp/junk_file didn't have the same effect, but I think that's because the source was not the local disk but fast memory a cp of a big file (1GB) didn't do anything BUT an rsync of that very same big file did give me hangs in my music at least so I catted big file attached it to now even bigger file and had some trouble too. The more I spawned IO Processes the badder it got. Is that a known issue? With 1.5Gb Ram there is for sure no way I ran out of Ram or any other memory issue (3Gig Swap) Also whilst rsyncing locally from disc to disc I noticed only between 10MB/s - 15MB/s throughput on average it did spike on 24MB during a few seconds. I seem to notice this issue quite often on FreeBSD, I had major RAID performance problems with a Rocket Raid adapter (ok I know it ain't the best but for what it's worth it should be more or less stable) Are there disk I/O issues on a larger scale maybe? Sincerely yours and willing to test/help, Steve Clement From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 19:19:17 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA62216A407 for ; Thu, 28 Dec 2006 19:19:17 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by mx1.freebsd.org (Postfix) with ESMTP id 5220213C48D for ; Thu, 28 Dec 2006 19:19:17 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so5248481nfc for ; Thu, 28 Dec 2006 11:19:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=F1n+kYtpnc6NxTcn9pT42xA5bwMcNNiZxVq6dAeIzgzJ17oatsJFrwiZvPWXFSHVhFndDnZIQsc0iWHANaPB9Spg5Dho83tXt5B3FdFcn+J8rBTMj4bewr67ZQYcm+cQZWy++ZzeWIJtTVJHJXfQFVw+slGbpHQmOBOLhhNOFXg= Received: by 10.82.105.13 with SMTP id d13mr888540buc.1167333556046; Thu, 28 Dec 2006 11:19:16 -0800 (PST) Received: by 10.82.178.4 with HTTP; Thu, 28 Dec 2006 11:19:15 -0800 (PST) Message-ID: <3bbf2fe10612281119w136f0561p2c0f7efd924d3b80@mail.gmail.com> Date: Thu, 28 Dec 2006 20:19:15 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: duane@dwlabs.ca In-Reply-To: <20061224092427.GD10511@dwpc.dwlabs.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061220041843.GA10511@dwpc.dwlabs.ca> <3bbf2fe10612200414j4c1c01ecr7b37e956b70b01fa@mail.gmail.com> <458A249D.3030502@FreeBSD.org> <3bbf2fe10612210558m66795673kd352a385a98f6e2b@mail.gmail.com> <20061222134113.T65423@fledge.watson.org> <3bbf2fe10612221425j62374c46q538ca2e256f7efc2@mail.gmail.com> <20061223142410.2a2b783c@Magellan.Leidinger.net> <20061224092427.GD10511@dwpc.dwlabs.ca> X-Google-Sender-Auth: 94f3497f23c4cca7 Cc: Alexander@leidinger.net, freebsd-hackers@freebsd.org Subject: Re: Locking fundamentals X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 19:19:17 -0000 2006/12/24, Duane Whitty : > On Sat, Dec 23, 2006 at 02:24:10PM +0100, Alexander Leidinger wrote: > > Quoting "Attilio Rao" (Fri, 22 Dec 2006 23:25:53 +0100): > > > > > 2006/12/22, Robert Watson : > > > > On Thu, 21 Dec 2006, Attilio Rao wrote: > > > > [explanation] > > > > Could someone of you make a copy and paste of and a little bit of gluing > > the parts together somewhere? Maybe in the wiki? > > One of the reasons for my initial mail is that I would like > to help with the Architecture Handbook. That is where I would > like to put the content of this thread as well as other emails > I have been reading/saving regarding locking/threads/scheduling. This would be a great idea. A 'locking manual' chapter would be a very nice thing (and we could add a section on 'prefered strategies' into the kernel, a sort of 'how do proper locking' showing some real cases). I think that the better person to review the work would be jhb@ but I don't know his current level of busy-ness :P. I hope to see something in this direction, ASAP. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 20:20:05 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 74AFB16A407 for ; Thu, 28 Dec 2006 20:20:05 +0000 (UTC) (envelope-from duane@dwpc.dwlabs.ca) Received: from smtpout.eastlink.ca (smtpout.eastlink.ca [24.222.0.30]) by mx1.freebsd.org (Postfix) with ESMTP id 38EE713C466 for ; Thu, 28 Dec 2006 20:20:04 +0000 (UTC) (envelope-from duane@dwpc.dwlabs.ca) Received: from ip04.eastlink.ca ([24.222.10.20]) by mta01.eastlink.ca (Sun Java System Messaging Server 6.2-4.03 (built Sep 22 2005)) with ESMTP id <0JB000KMJ342RF50@mta01.eastlink.ca> for freebsd-hackers@freebsd.org; Thu, 28 Dec 2006 16:19:14 -0400 (AST) Received: from blk-224-199-230.eastlink.ca (HELO dwpc.dwlabs.ca) ([24.224.199.230]) by ip04.eastlink.ca with ESMTP; Thu, 28 Dec 2006 16:20:04 -0400 Received: from dwpc.dwlabs.ca (localhost [127.0.0.1]) by dwpc.dwlabs.ca (8.13.8/8.13.8) with ESMTP id kBSKK4pS008511; Thu, 28 Dec 2006 16:20:04 -0400 (AST envelope-from duane@dwpc.dwlabs.ca) Received: (from duane@localhost) by dwpc.dwlabs.ca (8.13.8/8.13.8/Submit) id kBSKK3SA008510; Thu, 28 Dec 2006 16:20:03 -0400 (AST envelope-from duane) Date: Thu, 28 Dec 2006 16:20:03 -0400 From: Duane Whitty In-reply-to: <20061228103344.GI2187@obiwan.tataz.chchile.org> To: Jeremie Le Hen Message-id: <20061228202003.GA8290@dwpc.dwlabs.ca> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAAq1k0UY4MfmdGdsb2JhbACOCgE X-IronPort-AV: i="4.12,216,1165204800"; d="scan'208"; a="62072470:sNHT81646605" References: <20061220041843.GA10511@dwpc.dwlabs.ca> <20061228103344.GI2187@obiwan.tataz.chchile.org> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org Subject: Re: Locking fundamentals X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: duane@dwlabs.ca List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 20:20:05 -0000 On Thu, Dec 28, 2006 at 11:33:44AM +0100, Jeremie Le Hen wrote: > Hi Duane, > > On Wed, Dec 20, 2006 at 12:18:43AM -0400, Duane Whitty wrote: > > I have read the man pages describing each family of locks, John Baldwin's > > BSDCon 2002 paper, Jeffrey Hsu's paper, the Arch handbook, and the source. > > Sorry for bugging you, but I would be glad if you could point me out > these documents. > You're not bugging me at all; My apologies to the authors for not more properly citing their work. Baldwin, John H., Locking in the Multithreaded FreeBSD Kernel, 2002 BSDCon 2002 Paper http://people.FreeBSD.org/~jhb http://www.usenix.org/events/bsdcon02/full_papers/baldwin/baldwin_html/index.html Hsu, Jeffrey, Reasoning about SMP in FreeBSD, 2003 BSDCon 2003 Paper http://people.freebsd.org/~hsu http://www.usenix.org/publications/library/proceedings/bsdcon03/tech/hsu.html The FreeBSD Architecture Handbook http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/index.html Another useful page of information regarding SMP on FreeBSD is http://www.freebsd.org/smp/ Best Regards, Duane Whitty > Thank you very much in advance. > Regards, > -- > Jeremie Le Hen > < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 20:31:34 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5712E16A407 for ; Thu, 28 Dec 2006 20:31:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1629E13C46E for ; Thu, 28 Dec 2006 20:31:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kBSKSeAN018270; Thu, 28 Dec 2006 13:28:40 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 28 Dec 2006 13:28:44 -0700 (MST) Message-Id: <20061228.132844.-579333856.imp@bsdimp.com> To: freebsd-hackers@freebsd.org, erik.udo@gmail.com, olli@lurza.secnetix.de From: "M. Warner Losh" In-Reply-To: <200612281237.kBSCbE2n047391@lurza.secnetix.de> References: <4592C91C.2040801@gmail.com> <200612281237.kBSCbE2n047391@lurza.secnetix.de> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 28 Dec 2006 13:28:41 -0700 (MST) Cc: Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 20:31:34 -0000 In message: <200612281237.kBSCbE2n047391@lurza.secnetix.de> Oliver Fromme writes: : Erik Udo wrote: : > How can i make init chroot after executing /etc/rc, and executing : > /etc/rc again in the chrooted enviroment? : > : > For this to work, i'd like to know at what point do i call chroot(), : > becouse init.c uses fork() at the point where it runs the rc script. : > : > The thing is, i want to run a whole system in a chrooted enviroment in : > this livecd i'm making. But the command "chroot /mnt/root /etc/rc" : > returns after the /etc/rc has been run, dropping me back from the : > chrooted enviroment. And if it doesn't, init never starts the multiuser : > mode. : : That's exactly the problem I had when I created a combined : DVD-ROM with FreeBSD and DragonFly BSD on it. For them to : share the same ISO-9660, at least one of them needed to be : chrooted. I decided to add the feature to DragonFly BSD's : init(8) because the DragonFly people seemed to be easier to : convince of the usefulness. ;-) Indeed, the feature was : committed quickly. I didn't try to send-pr a similar patch : for FreeBSD. You do the FreeBSD developer community a disservice with this attitude. We've been talking about needing something like this for a while. : It shouldn't be too difficult to port it, though: : : http://www.dragonflybsd.org/cvsweb/src/sbin/init/init.c : : The chroot() patch has been committed with r1.6. It uses : kenv to specify the chroot directory, so it can easily be : set by the loader(8), e.g. using a custom boot menu. : : Best regards : Oliver : : PS: I see NetBSD has a similar feature, too. Maybe : FreeBSD should join the crowd and adopt it. ;-) Please, don't come into the FreeBSD forums and talk trash on FreeBSD when you've not even tried to get a change into the base system. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 20:42:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 851A616A403 for ; Thu, 28 Dec 2006 20:42:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2ECA513C46D for ; Thu, 28 Dec 2006 20:42:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kBSKenvi018370; Thu, 28 Dec 2006 13:40:49 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 28 Dec 2006 13:40:53 -0700 (MST) Message-Id: <20061228.134053.-1548238884.imp@bsdimp.com> To: freebsd-hackers@freebsd.org, erik.udo@gmail.com, olli@lurza.secnetix.de From: "M. Warner Losh" In-Reply-To: <20061228.132844.-579333856.imp@bsdimp.com> References: <4592C91C.2040801@gmail.com> <200612281237.kBSCbE2n047391@lurza.secnetix.de> <20061228.132844.-579333856.imp@bsdimp.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_Dec_28_13_40_53_2006_777)--" Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 28 Dec 2006 13:40:49 -0700 (MST) Cc: Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 20:42:38 -0000 ----Next_Part(Thu_Dec_28_13_40_53_2006_777)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit BTW, here's a patch to test. Since FreeBSD has kenv(2), the patch is actually very small. Warner ----Next_Part(Thu_Dec_28_13_40_53_2006_777)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="init_chroot" Index: init.c =================================================================== RCS file: /cache/ncvs/src/sbin/init/init.c,v retrieving revision 1.62 diff -u -r1.62 init.c --- init.c 8 Jun 2006 14:04:36 -0000 1.62 +++ init.c 28 Dec 2006 20:39:33 -0000 @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -187,6 +188,7 @@ int main(int argc, char *argv[]) { + char init_chroot[PATH_MAX]; int c; struct sigaction sa; sigset_t mask; @@ -239,6 +241,12 @@ */ openlog("init", LOG_CONS|LOG_ODELAY, LOG_AUTH); + *init_chroot = '\0'; + kenv(KENV_GET, "init_chroot", init_chroot, sizeof(init_chroot)); + if (*init_chroot) + if (chdir(init_chroot) != 0 || chroot(".") != 0) + warning("Can't chroot to %s: %m", init_chroot); + /* * Create an initial session. */ ----Next_Part(Thu_Dec_28_13_40_53_2006_777)---- From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 21:27:46 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 886FD16A407 for ; Thu, 28 Dec 2006 21:27:46 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.freebsd.org (Postfix) with ESMTP id 3BC9C13C46E for ; Thu, 28 Dec 2006 21:27:46 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from vanquish.pgh.priv.collaborativefusion.com (vanquish.pgh.priv.collaborativefusion.com [192.168.2.61]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Thu, 28 Dec 2006 16:17:43 -0500 id 000564AD.45943477.00014102 Date: Thu, 28 Dec 2006 16:17:42 -0500 From: Bill Moran To: hackers@freebsd.org Message-Id: <20061228161742.9e346eb4.wmoran@collaborativefusion.com> Organization: Collaborative Fusion X-Mailer: Sylpheed 2.3.0 (GTK+ 2.10.6; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Subject: Modified version of jexec allows non-root access into jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 21:27:46 -0000 http://people.collaborativefusion.com/~wmoran/code/jailme.html Feedback is appreciated. -- Bill Moran Collaborative Fusion Inc. wmoran@collaborativefusion.com Phone: 412-422-3463x4023 **************************************************************** IMPORTANT: This message contains confidential information and is intended only for the individual named. If the reader of this message is not an intended recipient (or the individual responsible for the delivery of this message to an intended recipient), please be advised that any re-use, dissemination, distribution or copying of this message is prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. **************************************************************** From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 28 22:24:14 2006 Return-Path: X-Original-To: FreeBSD-Hackers@FreeBSD.org Delivered-To: FreeBSD-Hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 353FC16A412 for ; Thu, 28 Dec 2006 22:24:14 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: from digitaldaemon.com (digitaldaemon.com [63.105.9.34]) by mx1.freebsd.org (Postfix) with SMTP id 62ED613C478 for ; Thu, 28 Dec 2006 22:24:12 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: (qmail 2432 invoked by uid 98); 28 Dec 2006 22:24:07 -0000 Received: from 63.105.9.34 by digitaldaemon.com (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.87/1195. Clear:RC:1(63.105.9.34):. Processed in 0.138927 secs); 28 Dec 2006 22:24:07 -0000 X-Qmail-Scanner-Mail-From: jan@digitaldaemon.com via digitaldaemon.com X-Qmail-Scanner: 1.25 (Clear:RC:1(63.105.9.34):. Processed in 0.138927 secs) Received: from digitaldaemon.com (HELO ?160.63.102.2?) (63.105.9.34) by digitaldaemon.com with SMTP; 28 Dec 2006 22:24:06 -0000 Message-ID: <45944404.8050301@digitaldaemon.com> Date: Thu, 28 Dec 2006 17:24:04 -0500 From: Jan Knepper User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Jan Knepper References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> <20061227033742.GA9706@xor.obsecurity.org> <4593552E.80400@digitaldaemon.com> In-Reply-To: <4593552E.80400@digitaldaemon.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Tim McCullagh , FreeBSD ISP , FreeBSD Hackers , Kris Kennaway Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 22:24:14 -0000 Jan Knepper wrote: > Kris Kennaway wrote: >> On Tue, Dec 26, 2006 at 08:24:12PM -0500, Jan Knepper wrote: >> >>> Tried that and started >>> >>> dd if=/dev/ad4 if=/dev/ad6 bs=1m >>> >>> Kernel went in panic and automatic reboot in about an hour... >>> >>> It gets worse... when it does reboot the disk drive will not show in >>> the BIOS, nor does FreeBSD recognize it during boot. The system >>> actually has to be turned off to reset the drive... >>> >>> This is bad... >>> >>> Any other suggestions? >>> >> >> Sounds like a bug in the support for your ATA hardware, or your >> hardware is broken. The very least you'll need to do is to obtain a >> crashdump and debugging backtrace (see the developers handbook) and CC >> it to sos@ >> >> > This is getting funnier... > I added: > dumpdev="AUTO" > to: rc.conf > Rebooted the system and tried to get it to crash again... > And indeed it does in process 9: taskq > > Then it starts dumping which takes a couple of seconds as the machine > has 2 GB Ram... > > Than it reboots... and the next thing you know... savecore does NOT > recognize a dump on the swap file system. If does not save anything to > /var/crash... > Tried this about 10 times... No luck... > > Any other idea's? > Well... since capturing a kernel debug dump does not seem to be working I had an other crash (is not that difficult to reproduce) and copied the console screen with the information... Here it is, for whatever this is worth... Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x50 fault code = supervisor read, page not present instruction pointer = 0x8:0xffffffff80289d6d stack pointer = 0x10:0xffffffffb1b06af0 frame pointer = 0x10:0xffffff00468d9400 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current processor = 9 (thread taskq) trap number = 12 panic: page fault cpuid = 0 Uptime: 16h56m17s Dumping 2047 MB (2 chunks) chunk 0: 1MB (156 pages) .. ok chunk 1: 2047MB (524016 pages) 2031 2015 1999 1983 1967 1951 1935 1919 1903 18 87 ... ... 47 31 15 ... ok Dump complete Automatic reboot in 15 seconds - press a key on console ot abort From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 29 13:41:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C4C316A403 for ; Fri, 29 Dec 2006 13:41:42 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from pd2mo3so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 60B2113C46A for ; Fri, 29 Dec 2006 13:41:42 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from pd2mr4so.prod.shaw.ca (pd2mr4so-qfe3.prod.shaw.ca [10.0.141.107]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JB100F2UCLJOOE0@l-daemon> for freebsd-hackers@freebsd.org; Fri, 29 Dec 2006 05:41:43 -0700 (MST) Received: from pn2ml5so.prod.shaw.ca ([10.0.121.149]) by pd2mr4so.prod.shaw.ca (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0JB1005NOCLIHJR1@pd2mr4so.prod.shaw.ca> for freebsd-hackers@freebsd.org; Fri, 29 Dec 2006 05:41:43 -0700 (MST) Received: from hexahedron.daemonology.net ([24.82.18.31]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with SMTP id <0JB100CHGCLEON52@l-daemon> for freebsd-hackers@freebsd.org; Fri, 29 Dec 2006 05:41:39 -0700 (MST) Received: (qmail 21231 invoked from network); Fri, 29 Dec 2006 12:41:33 +0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; Fri, 29 Dec 2006 12:41:33 +0000 Date: Fri, 29 Dec 2006 04:41:33 -0800 From: Colin Percival In-reply-to: <20061229120030.3DCE316A530@hub.freebsd.org> To: freebsd-hackers@freebsd.org, Bill Moran Message-id: <45950CFD.5020506@freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Enigmail-Version: 0.94.0.0 References: <20061229120030.3DCE316A530@hub.freebsd.org> User-Agent: Thunderbird 1.5.0.9 (X11/20061227) Cc: Subject: Re: Modified version of jexec allows non-root access into jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 13:41:42 -0000 Bill Moran wrote: > http://people.collaborativefusion.com/~wmoran/code/jailme.html > > Feedback is appreciated. Be very very careful. Both chroot(2) and jail(2) can only be called by root, and for very good reasons. Unprivileged users can create hardlinks to files which they don't own, including setuid root binaries; but these binaries will probably not operate correctly inside a jail of an attacker's construction (e.g., which contains a root password of "r00tmeplz"). The attacker can thus obtain jailed root privileges, create all the setuid root binaries he wants, and then run them from outside of the jail to obtain root privileges in the host machine. The fact that you're calling jail_attach(2) instead of jail(2) makes me slightly less worried, but you'd still have to work very hard to convince me that this should become part of the FreeBSD base system. Colin Percival From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 29 14:11:48 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E757016A407 for ; Fri, 29 Dec 2006 14:11:48 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.freebsd.org (Postfix) with ESMTP id AE13A13C478 for ; Fri, 29 Dec 2006 14:11:48 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from vanquish.pgh.priv.collaborativefusion.com (vanquish.pgh.priv.collaborativefusion.com [192.168.2.61]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Fri, 29 Dec 2006 09:01:47 -0500 id 000564C7.45951FCB.00000088 Date: Fri, 29 Dec 2006 09:01:46 -0500 From: Bill Moran To: Colin Percival Message-Id: <20061229090146.d2bc2b1c.wmoran@collaborativefusion.com> In-Reply-To: <45950CFD.5020506@freebsd.org> References: <20061229120030.3DCE316A530@hub.freebsd.org> <45950CFD.5020506@freebsd.org> Organization: Collaborative Fusion X-Mailer: Sylpheed 2.3.0 (GTK+ 2.10.6; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Modified version of jexec allows non-root access into jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 14:11:49 -0000 In response to Colin Percival : > Bill Moran wrote: > > http://people.collaborativefusion.com/~wmoran/code/jailme.html > > > > Feedback is appreciated. > > Be very very careful. Both chroot(2) and jail(2) can only be called by > root, and for very good reasons. Unprivileged users can create hardlinks > to files which they don't own, including setuid root binaries; but these > binaries will probably not operate correctly inside a jail of an attacker's > construction (e.g., which contains a root password of "r00tmeplz"). The > attacker can thus obtain jailed root privileges, create all the setuid > root binaries he wants, and then run them from outside of the jail to > obtain root privileges in the host machine. Interesting. I hadn't considered that possibility. > The fact that you're calling jail_attach(2) instead of jail(2) makes me > slightly less worried, but you'd still have to work very hard to convince > me that this should become part of the FreeBSD base system. Well, my ultimate goal is to get it in _only_ if it makes sense as part of the base system -- and I'm not even fully convinced of that yet. The scenario you're describing (correct me if I misunderstand) would be a user who has a normal account on the host system, but has root access inside a pre-existing jail. Said user could create a setuid binary inside the jail filesystem that would continue to be setuid in the host, and basically leads to a privilege escalation. This is possible even without the addition of the jailme program, however. Basically, any user who has root inside a jail and a normal account on the host system can easily get root permissions outside the jail. It's probably possible to prevent this by careful use of nosetuid mounted filesystems within the jail. You also describe a scenerio where a user can create a jail of his own design and give himself root inside it, thus allowing him to use the setuid trick to get root on the host as well. The place this falls down is that the user would need to already have root to create the jail in the first place. I suppose I hadn't thought this through because our setup has users with normal accounts both inside and outside the jail, and our ultimate goal is to keep these users from ever having or needing root access in either place. I'll wrap it up and submit it as a port. It seems like most of the current jail utilities start out as ports anyway, so that seems to be a good path to determine whether or not it's a proper fit for the base system. If not, it can just stay a port for anyone who finds it useful. -- Bill Moran Collaborative Fusion Inc. From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 29 17:19:23 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4FDB216A412 for ; Fri, 29 Dec 2006 17:19:23 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id C42E813C469 for ; Fri, 29 Dec 2006 17:19:22 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (luzyro@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kBTHJBWW020842; Fri, 29 Dec 2006 18:19:16 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id kBTHJBBG020840; Fri, 29 Dec 2006 18:19:11 +0100 (CET) (envelope-from olli) From: Oliver Fromme Message-Id: <200612291719.kBTHJBBG020840@lurza.secnetix.de> To: imp@bsdimp.com (M. Warner Losh) Date: Fri, 29 Dec 2006 18:19:11 +0100 (CET) In-Reply-To: <20061228.132844.-579333856.imp@bsdimp.com> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Fri, 29 Dec 2006 18:19:17 +0100 (CET) X-Mailman-Approved-At: Fri, 29 Dec 2006 18:08:17 +0000 Cc: erik.udo@gmail.com, freebsd-hackers@FreeBSD.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 17:19:23 -0000 M. Warner Losh wrote: > Oliver Fromme writes: > : Erik Udo wrote: > : > How can i make init chroot after executing /etc/rc, and executing > : > /etc/rc again in the chrooted enviroment? > : > > : > For this to work, i'd like to know at what point do i call chroot(), > : > becouse init.c uses fork() at the point where it runs the rc script. > : > > : > The thing is, i want to run a whole system in a chrooted enviroment in > : > this livecd i'm making. But the command "chroot /mnt/root /etc/rc" > : > returns after the /etc/rc has been run, dropping me back from the > : > chrooted enviroment. And if it doesn't, init never starts the multiuser > : > mode. > : > : That's exactly the problem I had when I created a combined > : DVD-ROM with FreeBSD and DragonFly BSD on it. For them to > : share the same ISO-9660, at least one of them needed to be > : chrooted. I decided to add the feature to DragonFly BSD's > : init(8) because the DragonFly people seemed to be easier to > : convince of the usefulness. ;-) Indeed, the feature was > : committed quickly. I didn't try to send-pr a similar patch > : for FreeBSD. > > You do the FreeBSD developer community a disservice with this > attitude. We've been talking about needing something like this for a > while. I'm sorry, I must have missed that then. Would you point me to the URL of a thread discussing that, or a subject I could grep for? When I first mentioned it (2 or 3 years ago), nobody was interested. When I needed a solution, I needed the chroot feature in either of the two BSDs, but not necessarily in both. And most importantly, I needed it quickly because the publisher had a deadline. I mentioned the issue in both lists, and Matt responded and assisted quickly, so the feature went into DragonFly. At that moment I simply didn't have enough time to try to convince the people on this side of the borderline ;-) that the feature might also be useful for FreeBSD. My immediate problem was solved. If you look at the archives and at the PR database you will see that I have submitted quite a lot of things to the FreeBSD project. And there are quite many submissions that stay in the PR database (open or closed) without a chance of getting committed, because they're not deemed to be useful, or nobody is interested in them, or no responsible person shows up, or it ends up in a bikeshed discussion, or I don't know what else. Don't worry, I'll continue to submit code, when I have the time to do so, and if I see at least a slim chance that a committer will pick it up. > : PS: I see NetBSD has a similar feature, too. Maybe > : FreeBSD should join the crowd and adopt it. ;-) > > Please, don't come into the FreeBSD forums and talk trash on FreeBSD > when you've not even tried to get a change into the base system. I have tried. Best regards Oliver PS: I'll write another mail in a few minutes, in reply to your patch. -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. > Can the denizens of this group enlighten me about what the > advantages of Python are, versus Perl ? "python" is more likely to pass unharmed through your spelling checker than "perl". -- An unknown poster and Fredrik Lundh From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 29 18:37:00 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E99316A47B for ; Fri, 29 Dec 2006 18:37:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C77F313C44B for ; Fri, 29 Dec 2006 18:36:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kBTIYJTe034326; Fri, 29 Dec 2006 11:34:20 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 29 Dec 2006 11:34:25 -0700 (MST) Message-Id: <20061229.113425.-593217865.imp@bsdimp.com> To: olli@lurza.secnetix.de From: "M. Warner Losh" In-Reply-To: <200612291736.kBTHa9kj021368@lurza.secnetix.de> References: <20061228.134053.-1548238884.imp@bsdimp.com> <200612291736.kBTHa9kj021368@lurza.secnetix.de> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Fri_Dec_29_11_34_25_2006_113)--" Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 29 Dec 2006 11:34:20 -0700 (MST) Cc: erik.udo@gmail.com, freebsd-hackers@freebsd.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 18:37:00 -0000 ----Next_Part(Fri_Dec_29_11_34_25_2006_113)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In message: <200612291736.kBTHa9kj021368@lurza.secnetix.de> Oliver Fromme writes: : : M. Warner Losh wrote: : > BTW, here's a patch to test. Since FreeBSD has kenv(2), the patch is : > actually very small. : : OK, I tried it. The patch applied cleanly to RELENG_6. : The following line triggered a warning and caused the : compilation to be aborted: : : > + kenv(KENV_GET, "init_chroot", init_chroot, sizeof(init_chroot)); : : I get: : : /usr/src/sbin/init/init.c: In function `main': : /usr/src/sbin/init/init.c:245: warning: passing arg 2 of `kenv' discards qualifiers from pointer target type looks like kenv on RELENG_6 hadn't been const poisoned :-(. : It compiles without problems. For testing I prepared an : ISO image and put everything into a subdirectory called : /chroot, except for /boot. /boot/loader.conf contains : these lines: : : init_path="/ochroot/sbin/init" : init_chroot="/ochroot" : : When I boot the CD (with -v), it freezes after printing : these lines: : : cd9660: RockRidge Extension : Lookup of /dev for devfs, error: 2 : start_init: trying /ochroot/sbin/init OK. There's code in init to mount devfs, but it is disabled by default. The error message is from devfs_fixup. Early in the kernel boot, just before we mount root, the kernel executes devfs_first. This mounts devfs as / and creates a /dev -> / symlink. This allows mounting and the like to work. Later, after we've mounted /, we do what linux would call 'pivot root' and remount this devfs on / as /dev. That's devfs_fixup. : It seems that the kernel looks for /dev before starting : init, hence before the chroot. So I created /dev in the : ISO image and tried again. Now the "devfs error 2" line : doesn't appear anymore, but it still freezes after the : "start_init" line. I can understand that. init doesn't try to mount devfs on /dev unless you pass it -d. The -d comes from the boot loader somehow, but I've not threaded to see how it could be set. It appears, from first blush, that RB_SINGLE gets 's' set, but there's no way to get 'd' set. Maybe init_chroot should imply it. : I suspect that init expects devfs to be mounted on /dev : _inside_ the chroot (i.e. on /ochroot/dev in my case), : but I'm not sure if that's really causing the freeze. : Unfortunately I haven't been able to analyse the problem : further. Do you have an idea or hint? Once we chroot, we need to have a sane environment inside the chroot. Since the patches I posted chroot so early, /dev doesn't exist inside of it... : PS: The init_chroot feature would also be useful for : making a shared CD/DVD that contains a standard FreeBSD : installation (with sysinstall and "fixit") and a bootable : live FS such as FreeSBIE at the same time. The desire for a feature similar to this has come up many times, usually in one-on-one meetings. I'm sold on its need. I've enclosed a patch. delphi@ also checked the return value of kenv too, which is more documented an interface. Warner ----Next_Part(Fri_Dec_29_11_34_25_2006_113)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="init_chroot.diff" Index: init.c =================================================================== RCS file: /cache/ncvs/src/sbin/init/init.c,v retrieving revision 1.62 diff -u -r1.62 init.c --- init.c 8 Jun 2006 14:04:36 -0000 1.62 +++ init.c 29 Dec 2006 18:32:22 -0000 @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -187,6 +188,8 @@ int main(int argc, char *argv[]) { + char init_chroot[PATH_MAX]; + char icname[] = "init_chroot"; int c; struct sigaction sa; sigset_t mask; @@ -239,6 +242,13 @@ */ openlog("init", LOG_CONS|LOG_ODELAY, LOG_AUTH); + if (kenv(KENV_GET, icname, init_chroot, sizeof(init_chroot)) > 0) { + if (chdir(init_chroot) != 0 || chroot(".") != 0) + warning("Can't chroot to %s: %m", init_chroot); + else + devfs++; + } + /* * Create an initial session. */ ----Next_Part(Fri_Dec_29_11_34_25_2006_113)---- From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 29 17:36:18 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 831DE16A40F for ; Fri, 29 Dec 2006 17:36:18 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id 042D413C486 for ; Fri, 29 Dec 2006 17:36:17 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (ahsrqx@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kBTHaAlX021369; Fri, 29 Dec 2006 18:36:15 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id kBTHa9kj021368; Fri, 29 Dec 2006 18:36:09 +0100 (CET) (envelope-from olli) From: Oliver Fromme Message-Id: <200612291736.kBTHa9kj021368@lurza.secnetix.de> To: imp@bsdimp.com (M. Warner Losh) Date: Fri, 29 Dec 2006 18:36:09 +0100 (CET) In-Reply-To: <20061228.134053.-1548238884.imp@bsdimp.com> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Fri, 29 Dec 2006 18:36:15 +0100 (CET) X-Mailman-Approved-At: Fri, 29 Dec 2006 19:45:07 +0000 Cc: erik.udo@gmail.com, freebsd-hackers@freebsd.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 17:36:18 -0000 M. Warner Losh wrote: > BTW, here's a patch to test. Since FreeBSD has kenv(2), the patch is > actually very small. OK, I tried it. The patch applied cleanly to RELENG_6. The following line triggered a warning and caused the compilation to be aborted: > + kenv(KENV_GET, "init_chroot", init_chroot, sizeof(init_chroot)); I get: /usr/src/sbin/init/init.c: In function `main': /usr/src/sbin/init/init.c:245: warning: passing arg 2 of `kenv' discards qualifiers from pointer target type I modified your patch slightly, now also checking the return value from kenv(): --- init.orig/init.c Sat Jul 15 13:12:44 2006 +++ init/init.c Fri Dec 29 14:52:59 2006 @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -187,6 +188,8 @@ int main(int argc, char *argv[]) { + char init_chroot[PATH_MAX]; + char init_chroot_name[] = "init_chroot"; int c; struct sigaction sa; sigset_t mask; @@ -238,6 +241,13 @@ * Does 'init' deserve its own facility number? */ openlog("init", LOG_CONS|LOG_ODELAY, LOG_AUTH); + + *init_chroot = '\0'; + if (kenv(KENV_GET, init_chroot_name, init_chroot, sizeof(init_chroot)) + && *init_chroot != '\0') { + if (chdir(init_chroot) != 0 || chroot(".") != 0) + warning("Can't chroot to %s: %m", init_chroot); + } /* * Create an initial session. It compiles without problems. For testing I prepared an ISO image and put everything into a subdirectory called /chroot, except for /boot. /boot/loader.conf contains these lines: init_path="/ochroot/sbin/init" init_chroot="/ochroot" When I boot the CD (with -v), it freezes after printing these lines: cd9660: RockRidge Extension Lookup of /dev for devfs, error: 2 start_init: trying /ochroot/sbin/init It seems that the kernel looks for /dev before starting init, hence before the chroot. So I created /dev in the ISO image and tried again. Now the "devfs error 2" line doesn't appear anymore, but it still freezes after the "start_init" line. I suspect that init expects devfs to be mounted on /dev _inside_ the chroot (i.e. on /ochroot/dev in my case), but I'm not sure if that's really causing the freeze. Unfortunately I haven't been able to analyse the problem further. Do you have an idea or hint? (I can put my ISO online for testing if someone wants to look at it. It's 27 MB compressed.) Best regards Oliver PS: The init_chroot feature would also be useful for making a shared CD/DVD that contains a standard FreeBSD installation (with sysinstall and "fixit") and a bootable live FS such as FreeSBIE at the same time. -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. Perl is worse than Python because people wanted it worse. -- Larry Wall From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 29 19:40:02 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B59216A415 for ; Fri, 29 Dec 2006 19:40:02 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id A779413C44B for ; Fri, 29 Dec 2006 19:40:01 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (vcpahe@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kBTJdrAV027984; Fri, 29 Dec 2006 20:39:58 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id kBTJdqa0027982; Fri, 29 Dec 2006 20:39:52 +0100 (CET) (envelope-from olli) From: Oliver Fromme Message-Id: <200612291939.kBTJdqa0027982@lurza.secnetix.de> To: imp@bsdimp.com (M. Warner Losh) Date: Fri, 29 Dec 2006 20:39:52 +0100 (CET) In-Reply-To: <20061229.113425.-593217865.imp@bsdimp.com> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Fri, 29 Dec 2006 20:39:58 +0100 (CET) X-Mailman-Approved-At: Fri, 29 Dec 2006 19:45:25 +0000 Cc: erik.udo@gmail.com, freebsd-hackers@freebsd.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 19:40:02 -0000 Thanks for the new patch, I'll try it as soon as possible. However, that might not be before Tuesday or Wednesday because of wedding anniversary, birthday and new year's eve (yup, all on one weekend), and it might take a day or two until I'm sober again. ;-) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. With Perl you can manipulate text, interact with programs, talk over networks, drive Web pages, perform arbitrary precision arithmetic, and write programs that look like Snoopy swearing. From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 29 20:04:06 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B01E516A415 for ; Fri, 29 Dec 2006 20:04:06 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 716FA13C448 for ; Fri, 29 Dec 2006 20:04:06 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kBTK3RIK035177; Fri, 29 Dec 2006 13:03:27 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 29 Dec 2006 13:03:33 -0700 (MST) Message-Id: <20061229.130333.-1771083254.imp@bsdimp.com> To: olli@lurza.secnetix.de From: "M. Warner Losh" In-Reply-To: <200612291939.kBTJdqa0027982@lurza.secnetix.de> References: <20061229.113425.-593217865.imp@bsdimp.com> <200612291939.kBTJdqa0027982@lurza.secnetix.de> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 29 Dec 2006 13:03:28 -0700 (MST) Cc: erik.udo@gmail.com, freebsd-hackers@freebsd.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 20:04:06 -0000 In message: <200612291939.kBTJdqa0027982@lurza.secnetix.de> Oliver Fromme writes: : : Thanks for the new patch, I'll try it as soon as possible. : : However, that might not be before Tuesday or Wednesday : because of wedding anniversary, birthday and new year's eve : (yup, all on one weekend), and it might take a day or two : until I'm sober again. ;-) Sounds good. I don't have the proper environment to easily test this out, but I think what I sent will work... Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 29 21:23:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71E9A16A412 for ; Fri, 29 Dec 2006 21:23:46 +0000 (UTC) (envelope-from erik.udo@gmail.com) Received: from satakieli.dnainternet.net (satakieli.dnainternet.net [212.149.75.40]) by mx1.freebsd.org (Postfix) with ESMTP id 3693413C486 for ; Fri, 29 Dec 2006 21:23:46 +0000 (UTC) (envelope-from erik.udo@gmail.com) Received: from [192.168.1.11] (host-212-149-186-30.kpylaajakaista.net [212.149.186.30]) by satakieli.dnainternet.net (Postfix) with ESMTP id 5AB71C8D7 for ; Fri, 29 Dec 2006 23:23:42 +0200 (EET) Message-ID: <4595875B.20609@gmail.com> Date: Fri, 29 Dec 2006 23:23:39 +0200 From: Erik Udo User-Agent: Thunderbird 1.5.0.9 (X11/20061226) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4592C91C.2040801@gmail.com> <200612281237.kBSCbE2n047391@lurza.secnetix.de> <20061228.132844.-579333856.imp@bsdimp.com> <20061228.134053.-1548238884.imp@bsdimp.com> In-Reply-To: <20061228.134053.-1548238884.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 21:23:46 -0000 That's nice. But NetBSDs init.c executes /etc/rc before calling chroot(), and that's what i'm looking for, and for a moment tried to implement, but i'm not very familiar with FreeBSD code :) For example that kenv() came to me as a suprise. I'll have to try to implement the NetBSD way where /etc/rc is executed before chroot(). Ofcourse now that i dont have to use sysctls, it's alot easier. M. Warner Losh wrote: > BTW, here's a patch to test. Since FreeBSD has kenv(2), the patch is > actually very small. > > Warner > > > > ------------------------------------------------------------------------ > > Index: init.c > =================================================================== > RCS file: /cache/ncvs/src/sbin/init/init.c,v > retrieving revision 1.62 > diff -u -r1.62 init.c > --- init.c 8 Jun 2006 14:04:36 -0000 1.62 > +++ init.c 28 Dec 2006 20:39:33 -0000 > @@ -55,6 +55,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -187,6 +188,7 @@ > int > main(int argc, char *argv[]) > { > + char init_chroot[PATH_MAX]; > int c; > struct sigaction sa; > sigset_t mask; > @@ -239,6 +241,12 @@ > */ > openlog("init", LOG_CONS|LOG_ODELAY, LOG_AUTH); > > + *init_chroot = '\0'; > + kenv(KENV_GET, "init_chroot", init_chroot, sizeof(init_chroot)); > + if (*init_chroot) > + if (chdir(init_chroot) != 0 || chroot(".") != 0) > + warning("Can't chroot to %s: %m", init_chroot); > + > /* > * Create an initial session. > */ From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 29 21:33:25 2006 Return-Path: X-Original-To: FreeBSD-Hackers@FreeBSD.org Delivered-To: FreeBSD-Hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC1C816A412 for ; Fri, 29 Dec 2006 21:33:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id AA3F913C46A for ; Fri, 29 Dec 2006 21:33:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 403EB46DE0; Fri, 29 Dec 2006 16:33:25 -0500 (EST) Date: Fri, 29 Dec 2006 21:33:25 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Jan Knepper In-Reply-To: <4593552E.80400@digitaldaemon.com> Message-ID: <20061229213013.E86685@fledge.watson.org> References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> <20061227033742.GA9706@xor.obsecurity.org> <4593552E.80400@digitaldaemon.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Tim McCullagh , FreeBSD ISP , FreeBSD Hackers , Kris Kennaway Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 21:33:25 -0000 On Thu, 28 Dec 2006, Jan Knepper wrote: >> Sounds like a bug in the support for your ATA hardware, or your hardware is >> broken. The very least you'll need to do is to obtain a crashdump and >> debugging backtrace (see the developers handbook) and CC it to sos@ >> > This is getting funnier... > I added: > dumpdev="AUTO" > to: rc.conf > Rebooted the system and tried to get it to crash again... > And indeed it does in process 9: taskq > > Then it starts dumping which takes a couple of seconds as the machine has 2 > GB Ram... > > Than it reboots... and the next thing you know... savecore does NOT > recognize a dump on the swap file system. If does not save anything to > /var/crash... Tried this about 10 times... No luck... > > Any other idea's? Yeah, unfortunately if some combination of storage driver and hardware aren't working, it's hard to get a dump... The usual fallback here is to use a serial console to capture debugging information from DDB and to skip the dump side of things. In fact, I prefer debugging that way most of the time. The reason for using a serial console (or firewire) is to avoid having to hand-copy trap and debugging information, which gets very painful very quickly. Compile DDB and KDB into your kernel, and configure a serial console, and a panic should lead to the system entering the debugger. The usual first command to type is "trace" to generate a backtrace; it's often useful also to do "show pcpu", "show allpcpu", "alltrace", and "ps", although for the problem you're seeing the last two may be less useful. The 0x50 trap address in your post suggests this is a NULL pointer dereference. What we now need to do is work out what piece of code is dereferencing the pointer improperly, which is where the backtrace comes in. If you could copy and paste all that DDB/KDB output into an e-mail (or, perhaps more ideally, a PR), that would be great. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 29 22:33:07 2006 Return-Path: X-Original-To: FreeBSD-Hackers@FreeBSD.org Delivered-To: FreeBSD-Hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9CE016A407 for ; Fri, 29 Dec 2006 22:33:07 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: from digitaldaemon.com (digitaldaemon.com [63.105.9.34]) by mx1.freebsd.org (Postfix) with SMTP id 0527113C458 for ; Fri, 29 Dec 2006 22:33:06 +0000 (UTC) (envelope-from jan@digitaldaemon.com) Received: (qmail 79498 invoked by uid 98); 29 Dec 2006 22:33:04 -0000 Received: from 63.105.9.34 by digitaldaemon.com (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.87/1195. Clear:RC:1(63.105.9.34):. Processed in 0.243414 secs); 29 Dec 2006 22:33:04 -0000 X-Qmail-Scanner-Mail-From: jan@digitaldaemon.com via digitaldaemon.com X-Qmail-Scanner: 1.25 (Clear:RC:1(63.105.9.34):. Processed in 0.243414 secs) Received: from digitaldaemon.com (HELO ?16.81.102.2?) (63.105.9.34) by digitaldaemon.com with SMTP; 29 Dec 2006 22:33:04 -0000 Message-ID: <4595979B.1030104@digitaldaemon.com> Date: Fri, 29 Dec 2006 17:32:59 -0500 From: Jan Knepper User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Robert Watson References: <45918F6E.90006@digitaldaemon.com> <004c01c7293b$d5e03b40$6500a8c0@laptopt> <4591CB3C.1060902@digitaldaemon.com> <20061227033742.GA9706@xor.obsecurity.org> <4593552E.80400@digitaldaemon.com> <20061229213013.E86685@fledge.watson.org> In-Reply-To: <20061229213013.E86685@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Tim McCullagh , FreeBSD ISP , Kris Kennaway , FreeBSD Hackers Subject: Re: 6.1-RELEASE / 6.2 Kernel Crash... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 22:33:07 -0000 Robert Watson wrote: > On Thu, 28 Dec 2006, Jan Knepper wrote: > >>> Sounds like a bug in the support for your ATA hardware, or your >>> hardware is broken. The very least you'll need to do is to obtain a >>> crashdump and debugging backtrace (see the developers handbook) and >>> CC it to sos@ >>> >> This is getting funnier... >> I added: >> dumpdev="AUTO" >> to: rc.conf >> Rebooted the system and tried to get it to crash again... >> And indeed it does in process 9: taskq >> >> Then it starts dumping which takes a couple of seconds as the machine >> has 2 GB Ram... >> >> Than it reboots... and the next thing you know... savecore does NOT >> recognize a dump on the swap file system. If does not save anything >> to /var/crash... Tried this about 10 times... No luck... >> >> Any other idea's? > > Yeah, unfortunately if some combination of storage driver and hardware > aren't working, it's hard to get a dump... No kidding! > The usual fallback here is to use a serial console to capture > debugging information from DDB and to skip the dump side of things. > In fact, I prefer debugging that way most of the time. The reason for > using a serial console (or firewire) is to avoid having to hand-copy > trap and debugging information, which gets very painful very quickly. > Compile DDB and KDB into your kernel, and configure a serial console, > and a panic should lead to the system entering the debugger. The > usual first command to type is "trace" to generate a backtrace; it's > often useful also to do "show pcpu", "show allpcpu", "alltrace", and > "ps", although for the problem you're seeing the last two may be less > useful. > > The 0x50 trap address in your post suggests this is a NULL pointer > dereference. What we now need to do is work out what piece of code is > dereferencing the pointer improperly, which is where the backtrace > comes in. > > If you could copy and paste all that DDB/KDB output into an e-mail > (or, perhaps more ideally, a PR), that would be great. Thanks for the reply Robert. Since this machine runs at my house I hope to get to this over the weekend. I will definitely try to get this information out as soon as I decently can. Thanks! Jan Knepper From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 06:10:51 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D59DA16A407 for ; Sat, 30 Dec 2006 06:10:51 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.freebsd.org (Postfix) with SMTP id 8B96E13C44B for ; Sat, 30 Dec 2006 06:10:51 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: (qmail 16351 invoked by uid 0); 30 Dec 2006 06:10:50 -0000 Received: from unknown (HELO phobos.mars.bsd) (unknown) by unknown with SMTP; 30 Dec 2006 06:10:50 -0000 X-pair-Authenticated: 200.115.252.195 Date: Sat, 30 Dec 2006 03:10:35 -0300 From: Alejandro Pulver To: freebsd-hackers@FreeBSD.org Message-ID: <20061230031035.149313d3@phobos.mars.bsd> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_KFw9IxljbeUfR1xo/v1chnW"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Program receiving SIGSEGV after exit() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 06:10:51 -0000 --Sig_KFw9IxljbeUfR1xo/v1chnW Content-Type: multipart/mixed; boundary=MP_klNeH2SPAO8xR07wsOBXfyF --MP_klNeH2SPAO8xR07wsOBXfyF Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello. The port "games/qudos" keeps running in a loop after exiting from the main menu. This is because after calling exit() the program receives a SIGSEGV signal, and the signal handler, after intercepting it, calls exit() again. I think it is a problem with the application itself, but I don't know what to look for in the source code. I have attached a 'gdb' backtrace. Could someone please point me in the right direction? Thanks and Best Regards, Ale --MP_klNeH2SPAO8xR07wsOBXfyF-- --Sig_KFw9IxljbeUfR1xo/v1chnW Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFlgLniV05EpRcP2ERApO1AKC8gvYPZX7SM0ythmw6BfDKKKxYJACeKjW4 EmzWp8aPSrogdSf3YzlrvxA= =pLof -----END PGP SIGNATURE----- --Sig_KFw9IxljbeUfR1xo/v1chnW-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 06:14:25 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1858D16A407 for ; Sat, 30 Dec 2006 06:14:25 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: from relay00.pair.com (relay00.pair.com [209.68.5.9]) by mx1.freebsd.org (Postfix) with SMTP id BE57D13C441 for ; Sat, 30 Dec 2006 06:14:24 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: (qmail 16858 invoked by uid 0); 30 Dec 2006 05:47:42 -0000 Received: from 200.115.252.195 (HELO phobos.mars.bsd) (200.115.252.195) by relay00.pair.com with SMTP; 30 Dec 2006 05:47:42 -0000 X-pair-Authenticated: 200.115.252.195 Date: Sat, 30 Dec 2006 02:47:18 -0300 From: Alejandro Pulver To: freebsd-hackers@FreeBSD.org Message-ID: <20061230024718.22131bff@phobos.mars.bsd> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_5B+3Wn=CO3+_4K/d/q4oOcI"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Subject: Program not being executed at all X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 06:14:25 -0000 --Sig_5B+3Wn=CO3+_4K/d/q4oOcI Content-Type: multipart/mixed; boundary=MP_9JbH.FRHcGOaiW4jlKjLmDJ --MP_9JbH.FRHcGOaiW4jlKjLmDJ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello. I tried to update the port I maintain "games/quake2max", a Quake II engine, but when I try to run the compiled executables, except for the dedicated server (quake2max-ded) they output "Abort" and quit. The output of 'ktrace' is the following (it just stops before running it): 82753 ktrace RET ktrace 0 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) 82753 ktrace NAMI "/sbin/quake2max" 82753 ktrace RET execve -1 errno 2 No such file or directory 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) 82753 ktrace NAMI "/bin/quake2max" 82753 ktrace RET execve -1 errno 2 No such file or directory 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) 82753 ktrace NAMI "/usr/sbin/quake2max" 82753 ktrace RET execve -1 errno 2 No such file or directory 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) 82753 ktrace NAMI "/usr/bin/quake2max" 82753 ktrace RET execve -1 errno 2 No such file or directory 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) 82753 ktrace NAMI "/usr/games/quake2max" 82753 ktrace RET execve -1 errno 2 No such file or directory 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) 82753 ktrace NAMI "/usr/local/sbin/quake2max" 82753 ktrace RET execve -1 errno 2 No such file or directory 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) 82753 ktrace NAMI "/usr/local/bin/quake2max" Interestingly 'ldd' also crashes when examining it, outputting the following (however 'ktrace' has more information): /usr/local/bin/quake2max: /usr/local/bin/quake2max: signal 6 My first thought was that it was a GCC bug, so I tried compiling it with 4.1 (my system is a FreeBSD 6.1-RELEASE-p1 with GCC 3.4.4 20050518) but it made no difference. Interestingly the actual "games/quake2max" port works just fine (version 0.44), and I couldn't see something suspicious with a quick look to the 'diff' output. I have attached a patch to update the port in the tree to the 0.45 version. Could someone investigate this please? Thanks and Best Regards, Ale P.S.: please CC me since I am not subscribed to the list. --MP_9JbH.FRHcGOaiW4jlKjLmDJ Content-Type: text/x-patch; name=quake2max.diff Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=quake2max.diff Index: quake2max/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/pcvs/ports/games/quake2max/Makefile,v retrieving revision 1.4 diff -u -r1.4 Makefile --- quake2max/Makefile 28 Dec 2006 13:55:46 -0000 1.4 +++ quake2max/Makefile 30 Dec 2006 05:46:07 -0000 @@ -6,8 +6,7 @@ # =20 PORTNAME=3D quake2max -PORTVERSION=3D 0.44 -PORTREVISION=3D 1 +PORTVERSION=3D 0.45 CATEGORIES=3D games MASTER_SITES=3D http://qudos.quakedev.com/linux/quake2/engines/Quake2MaX/:= src \ ${MASTER_SITE_LOCAL:S/$/:data/} @@ -24,9 +23,9 @@ =20 USE_BZIP2=3D yes USE_GMAKE=3D yes -USE_GCC=3D 3.2+ +USE_GCC=3D 3.4+ ALL_TARGET=3D release -WRKSRC=3D ${WRKDIR}/Quake2maX-44-src_unix +WRKSRC=3D ${WRKDIR}/${DISTNAME:S/quake2max/Quake2maX/} =20 OPTIONS=3D CLIENT "Build client" on \ DEDICATED "Build dedicated server" on \ @@ -40,10 +39,7 @@ PLIST_SUB=3D LIBDIR=3D"${LIBDIR:S/${PREFIX}\///}" LIBDIR=3D ${PREFIX}/lib/${PORTNAME} =20 -Q2MAX_DATA=3D ${PORTNAME}.${PORTVERSION:S/.//}.rar - -# The data is not available and compiled executables do not work for 0.45. -PORTSCOUT=3D skipv:0.45 +Q2MAX_DATA=3D ${PORTNAME}.044.rar =20 .include "${.CURDIR}/../quake2-data/Makefile.include" =20 Index: quake2max/distinfo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/pcvs/ports/games/quake2max/distinfo,v retrieving revision 1.1 diff -u -r1.1 distinfo --- quake2max/distinfo 28 Jul 2006 22:05:00 -0000 1.1 +++ quake2max/distinfo 30 Dec 2006 05:46:07 -0000 @@ -1,6 +1,6 @@ -MD5 (Quake2maX_0.44-src_unix.tar.bz2) =3D 862d114541a49df2ef78f2700fde636b -SHA256 (Quake2maX_0.44-src_unix.tar.bz2) =3D 579aa80b1f26ebb5e7cd4dff40965= 04c378c7b225dd6c05fd5f076e3a4b5c8b7 -SIZE (Quake2maX_0.44-src_unix.tar.bz2) =3D 535440 +MD5 (Quake2maX_0.45-src_unix.tar.bz2) =3D 1bbc2611a8d84711f6a2416d04480430 +SHA256 (Quake2maX_0.45-src_unix.tar.bz2) =3D daca65e62a359f4ec526d85e809f9= f22e66f7d2e70e6b8e0047daa4434499942 +SIZE (Quake2maX_0.45-src_unix.tar.bz2) =3D 528143 MD5 (quake2max.044.rar) =3D 8a18fa4a431acbe1891a9666abb210e7 SHA256 (quake2max.044.rar) =3D a8fd147c747e283438780bc8a4700df9c6173f4417e= 7ace0c67975036a08bce1 SIZE (quake2max.044.rar) =3D 2071329 Index: quake2max/files/patch-qcommon__files.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/pcvs/ports/games/quake2max/files/patch-qcommon__files.c,v retrieving revision 1.1 diff -u -r1.1 patch-qcommon__files.c --- quake2max/files/patch-qcommon__files.c 28 Jul 2006 22:05:00 -0000 1.1 +++ quake2max/files/patch-qcommon__files.c 30 Dec 2006 05:46:07 -0000 @@ -1,16 +1,16 @@ ---- ./qcommon/files.c.orig Wed Jan 4 07:14:49 2006 -+++ ./qcommon/files.c Fri Jul 28 13:30:29 2006 -@@ -778,6 +778,9 @@ - Cvar_FullSet ("gamedir", dir, CVAR_SERVERINFO|CVAR_NOSET); +--- qcommon/files.c.orig Wed Jan 4 07:33:05 2006 ++++ qcommon/files.c Sat Dec 30 02:02:16 2006 +@@ -775,6 +775,9 @@ if (fs_cddir->string[0]) - FS_AddGameDirectory (va("%s/%s", fs_cddir->string, dir) ); + =09 + FS_AddGameDirectory (va("%s/%s", fs_cddir->string, dir) ); +#ifdef DATADIR + FS_AddGameDirectory(va("%s/%s", DATADIR, dir)); +#endif #ifdef LIBDIR FS_AddGameDirectory(va("%s/%s", LIBDIR, dir)); #endif -@@ -1002,16 +1005,7 @@ +@@ -999,16 +1002,7 @@ // basedir // allows the game to run from outside the data tree // @@ -27,7 +27,7 @@ =20 sv_defaultpaks =3D Cvar_Get ("sv_defaultpaks", "0", CVAR_ARCHIVE); =20 -@@ -1027,8 +1021,11 @@ +@@ -1024,8 +1018,11 @@ // // start up with baseq2 by default // Index: quake2max/files/patch-unix__sys_unix.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/pcvs/ports/games/quake2max/files/patch-unix__sys_unix.c,v retrieving revision 1.1 diff -u -r1.1 patch-unix__sys_unix.c --- quake2max/files/patch-unix__sys_unix.c 28 Jul 2006 22:05:00 -0000 1.1 +++ quake2max/files/patch-unix__sys_unix.c 30 Dec 2006 05:46:07 -0000 @@ -1,6 +1,17 @@ ---- ./unix/sys_unix.c.orig Wed Jan 4 07:57:40 2006 -+++ ./unix/sys_unix.c Fri Jul 28 13:30:29 2006 -@@ -220,15 +220,8 @@ +--- unix/sys_unix.c.orig Wed Jan 11 10:06:28 2006 ++++ unix/sys_unix.c Sat Dec 30 02:03:37 2006 +@@ -36,10 +36,6 @@ + #include + #include +=20 +-#ifdef __linux__ +-#include +-#endif +- + #include +=20 + #include "../qcommon/qcommon.h" +@@ -220,15 +216,8 @@ void *(*GetGameAPI) (void *); =20 char name[MAX_OSPATH]; @@ -17,7 +28,7 @@ =20 setreuid(getuid(), getuid()); setegid(getgid()); -@@ -236,8 +229,6 @@ +@@ -236,8 +225,6 @@ if (game_library) Com_Error (ERR_FATAL, "Sys_GetGameAPI without Sys_UnloadingGame"); =20 @@ -26,7 +37,7 @@ Com_Printf("------- Loading %s -------\n", gamename); =20 // now run through the search paths -@@ -247,7 +238,7 @@ +@@ -247,7 +234,7 @@ path =3D FS_NextPath (path); if (!path) return NULL; // couldn't find one anywhere @@ -35,19 +46,3 @@ game_library =3D dlopen (name, RTLD_LAZY ); if (game_library) { -@@ -319,6 +310,7 @@ -=20 - void Sys_CopyProtect(void) - { -+#if 0 - FILE *mnt; - struct mntent *ent; - char path[MAX_OSPATH]; -@@ -366,6 +358,7 @@ - Com_Error (ERR_FATAL, "Could not find a Quake2 CD in your CD drive."); - Com_Error (ERR_FATAL, "Unable to find a mounted iso9660 file system.\n" - "You must mount the Quake2 CD in a cdrom drive in order to play."); -+#endif - } -=20 - #if 0 --MP_9JbH.FRHcGOaiW4jlKjLmDJ-- --Sig_5B+3Wn=CO3+_4K/d/q4oOcI Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFlf2BiV05EpRcP2ERAoAIAJ41J0QUni70RGB8K6QYWkBIAIi0OQCeKDa7 tbzNjtrSGYGL6l1sVgrFcx0= =67l9 -----END PGP SIGNATURE----- --Sig_5B+3Wn=CO3+_4K/d/q4oOcI-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 11:19:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22A1216A407 for ; Sat, 30 Dec 2006 11:19:38 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id 7939513C45D for ; Sat, 30 Dec 2006 11:19:37 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (tojuzm@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kBUBJRZ4062116; Sat, 30 Dec 2006 12:19:32 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id kBUBJNno062104; Sat, 30 Dec 2006 12:19:23 +0100 (CET) (envelope-from olli) From: Oliver Fromme Message-Id: <200612301119.kBUBJNno062104@lurza.secnetix.de> To: imp@bsdimp.com (M. Warner Losh) Date: Sat, 30 Dec 2006 12:19:23 +0100 (CET) In-Reply-To: <20061229.130333.-1771083254.imp@bsdimp.com> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Sat, 30 Dec 2006 12:19:33 +0100 (CET) X-Mailman-Approved-At: Sat, 30 Dec 2006 12:31:13 +0000 Cc: erik.udo@gmail.com, freebsd-hackers@freebsd.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 11:19:38 -0000 M. Warner Losh wrote: > Oliver Fromme writes: > : Thanks for the new patch, I'll try it as soon as possible. I got a few minutes and tested it. > I don't have the proper environment to easily test this > out, but I think what I sent will work... It does work indeed! With that patch, the chrooted system boots fine into multi-user mode and I get a login prompt. If you would like to look at my ISO (or anybody else who's following this thread): http://www.secnetix.de/tmp/init_chroot/ The ISO is 17 MB compressed (I removed some stuff to keep it small). Actually it's pretty much a standard FreeBSD base system. There's also an ls -alR listing on the URL above. The directory structure on it looks like this: /boot /ochroot /ochroot/bin /ochroot/boot /ochroot/dev /ochroot/etc /ochroot/... i.e. basically everything is located under /ochroot, except for /boot which is hardlinked from /ochroot/boot (to save space). In particular, there is no /dev, so I still get this one from the kernel: Lookup of /dev for devfs, error: 2 But then init and everything starts up fine, so it doesn't seem to cause any harm. That raises two questions: 1- Why does the kernel try to mount /dev at all? Why not simply let init mount it in all cases, with ot without init_chroot? Would make things simpler. There doesn't seem to be a clear reason why the kernel needs to mount it. (Or maybe there _are_ reasons, byt they don't appear during my testing.) 2- Another solution would be to let init(8) autodetect whether /dev needs to be mounted. However, that might not be as trivial as it sounds. By the way, testing the whole thing is easy. Just install qemu from ports, then run this command: qemu -monitor stdio -cdrom chroot-test.iso -boot d Creating the ISO (with mkisofs) takes 5 seconds, and booting it in qemu takes 10 seconds (even without the kqemu kernel accelerator module), so the development and testing cycles are very short. That's how I developed my CD/DVD boot manager "eltoro"[1]. As soon as the ISO runs successfully in qemu, I write it to a CD-RW and boot it on a real PC for verification. Best regards Oliver PS: [1] http://www.secnetix.de/products/eltoro/ -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs." -- Robert Firth From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 12:47:53 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38D9516A403; Sat, 30 Dec 2006 12:47:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.freebsd.org (Postfix) with ESMTP id C718013C442; Sat, 30 Dec 2006 12:47:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.227] (helo=fw.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.60) (envelope-from ) id 1H0dDm-000BX2-22; Sat, 30 Dec 2006 14:22:02 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id kBUCLo0J042162 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Dec 2006 14:21:50 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id kBUCLohc039132; Sat, 30 Dec 2006 14:21:50 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id kBUCLosA039131; Sat, 30 Dec 2006 14:21:50 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Dec 2006 14:21:50 +0200 From: Kostik Belousov To: Alejandro Pulver Message-ID: <20061230122149.GM21325@deviant.kiev.zoral.com.ua> References: <20061230024718.22131bff@phobos.mars.bsd> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Cf/4ySkkvY6jtT1l" Content-Disposition: inline In-Reply-To: <20061230024718.22131bff@phobos.mars.bsd> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.7, clamav-milter version 0.88.7 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-0.1 required=5.0 tests=ALL_TRUSTED,SPF_NEUTRAL autolearn=failed version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on fw.zoral.com.ua X-Scanner-Signature: 8a658898c353158d5b622bcbe36a9e12 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 661 [Dec 30 2006] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-hackers@freebsd.org Subject: Re: Program not being executed at all X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 12:47:53 -0000 --Cf/4ySkkvY6jtT1l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 30, 2006 at 02:47:18AM -0300, Alejandro Pulver wrote: > Hello. >=20 > I tried to update the port I maintain "games/quake2max", a Quake II > engine, but when I try to run the compiled executables, except for > the dedicated server (quake2max-ded) they output "Abort" and quit. >=20 > The output of 'ktrace' is the following (it just stops before running > it): >=20 > 82753 ktrace RET ktrace 0 > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > 82753 ktrace NAMI "/sbin/quake2max" > 82753 ktrace RET execve -1 errno 2 No such file or directory > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > 82753 ktrace NAMI "/bin/quake2max" > 82753 ktrace RET execve -1 errno 2 No such file or directory > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > 82753 ktrace NAMI "/usr/sbin/quake2max" > 82753 ktrace RET execve -1 errno 2 No such file or directory > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > 82753 ktrace NAMI "/usr/bin/quake2max" > 82753 ktrace RET execve -1 errno 2 No such file or directory > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > 82753 ktrace NAMI "/usr/games/quake2max" > 82753 ktrace RET execve -1 errno 2 No such file or directory > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > 82753 ktrace NAMI "/usr/local/sbin/quake2max" > 82753 ktrace RET execve -1 errno 2 No such file or directory > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > 82753 ktrace NAMI "/usr/local/bin/quake2max" >=20 > Interestingly 'ldd' also crashes when examining it, outputting the > following (however 'ktrace' has more information): >=20 > /usr/local/bin/quake2max: > /usr/local/bin/quake2max: signal 6 >=20 > My first thought was that it was a GCC bug, so I tried compiling it > with 4.1 (my system is a FreeBSD 6.1-RELEASE-p1 with GCC 3.4.4 > 20050518) but it made no difference. >=20 > Interestingly the actual "games/quake2max" port works just fine > (version 0.44), and I couldn't see something suspicious with a quick > look to the 'diff' output. I have attached a patch to update the port > in the tree to the 0.45 version. >=20 > Could someone investigate this please? >=20 > Thanks and Best Regards, > Ale >=20 > P.S.: please CC me since I am not subscribed to the list. Please, show the output of the commands file /usr/local/bin/quake2max readelf -ld /usr/local/bin/quake2max --Cf/4ySkkvY6jtT1l Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFllndC3+MBN1Mb4gRAhkSAJ9i4/KeAazhnGRi8zL0D7os3hbvfACbBH/p pIoQBGuxxZ4hknWEy+4u3lo= =MILX -----END PGP SIGNATURE----- --Cf/4ySkkvY6jtT1l-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 12:51:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BADF216A407 for ; Sat, 30 Dec 2006 12:51:08 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6F51213C459 for ; Sat, 30 Dec 2006 12:51:08 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 28EFC46FC5; Sat, 30 Dec 2006 07:51:08 -0500 (EST) Date: Sat, 30 Dec 2006 12:51:08 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Oliver Fromme In-Reply-To: <200612301119.kBUBJNno062104@lurza.secnetix.de> Message-ID: <20061230123256.V18740@fledge.watson.org> References: <200612301119.kBUBJNno062104@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: erik.udo@gmail.com, freebsd-hackers@freebsd.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 12:51:08 -0000 On Sat, 30 Dec 2006, Oliver Fromme wrote: > In particular, there is no /dev, so I still get this one from the kernel: > > Lookup of /dev for devfs, error: 2 > > But then init and everything starts up fine, so it doesn't seem to cause any > harm. That raises two questions: > > 1- Why does the kernel try to mount /dev at all? Why not > simply let init mount it in all cases, with ot without > init_chroot? Would make things simpler. There doesn't > seem to be a clear reason why the kernel needs to mount > it. (Or maybe there _are_ reasons, byt they don't > appear during my testing.) > > 2- Another solution would be to let init(8) autodetect > whether /dev needs to be mounted. However, that might > not be as trivial as it sounds. The kernel needs to mount devfs because that's how it finds the device node to mount the root file system from. The bootstrap process is a bit complex, but basically what happens is this: (1) The kernel mounts devfs as /, and creates a /dev -> / symlink so that lookups in /dev using standard device names will work. (2) The kernel then attempts to mount the requested root file system using a device node from the devfs root. (3) Once a real root file system is successfully mounted, it performs a "fixup", which makes the new root file system the actual root file system, and re-grafts the original devfs mount onto /dev of the new root file system. It also removes the /dev/dev symlink. The error message you're seeing is the kernel failing to find a /dev directory on the new root file system so having no where to regraft the boot-time /dev. You can see the logic for this in vfs_mountroot_try(), devfs_first(), and devfs_fixup(). The point of all this is that we want the mount logic in every file system to be identical whether it's being used for the root file system or not. It used to be that only certain file systems could be used as a root file system, because only they knew how to bypass the lookup procedure to find their device node, short-circuiting to the in-kernel device list. Normally when a file system is mounted, it is given a path to a device node, which it looks up using VFS and then mounts, so the root file system required quite special behavior. Since devfs doesn't require a source device to mount, being purely synthetic, this isn't an issue, and every file system now has exactly one mount routine that can make consistent assumptions about what it's being mounted on/with. The grafting logic is entirely a property of VFS, and while not pretty, it is fairly functional, and is not in per-file system code. init contains fallback logic to mount a devfs instance if requested (-d), but I believe this exists largely to support upgrade transitions that may or may not still be relevant. Mounting a second devfs instance is undesirable for a number of reasons, not least that you end up with an extra file system floating around (although not reachable via the name space). It's certainly not disastrous though. Robert N M Watson Computer Laboratory University of Cambridge > > By the way, testing the whole thing is easy. Just install > qemu from ports, then run this command: > > qemu -monitor stdio -cdrom chroot-test.iso -boot d > > Creating the ISO (with mkisofs) takes 5 seconds, and booting > it in qemu takes 10 seconds (even without the kqemu kernel > accelerator module), so the development and testing cycles > are very short. That's how I developed my CD/DVD boot > manager "eltoro"[1]. As soon as the ISO runs successfully > in qemu, I write it to a CD-RW and boot it on a real PC > for verification. > > Best regards > Oliver > > > PS: [1] http://www.secnetix.de/products/eltoro/ > > -- > Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing > Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd > Any opinions expressed in this message may be personal to the author > and may not necessarily reflect the opinions of secnetix in any way. > > "One of the main causes of the fall of the Roman Empire was that, > lacking zero, they had no way to indicate successful termination > of their C programs." > -- Robert Firth > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 12:59:19 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 659EF16A403; Sat, 30 Dec 2006 12:59:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.freebsd.org (Postfix) with ESMTP id 0DE6313C43E; Sat, 30 Dec 2006 12:59:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.227] (helo=fw.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.60) (envelope-from ) id 1H0d86-000AFv-5S; Sat, 30 Dec 2006 14:16:10 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id kBUCFwiu042025 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Dec 2006 14:15:58 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id kBUCFwrZ039086; Sat, 30 Dec 2006 14:15:58 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id kBUCFvHV039085; Sat, 30 Dec 2006 14:15:57 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Dec 2006 14:15:57 +0200 From: Kostik Belousov To: Alejandro Pulver Message-ID: <20061230121557.GL21325@deviant.kiev.zoral.com.ua> References: <20061230031035.149313d3@phobos.mars.bsd> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hu1ClgjWvfumRnAp" Content-Disposition: inline In-Reply-To: <20061230031035.149313d3@phobos.mars.bsd> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.7, clamav-milter version 0.88.7 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-0.1 required=5.0 tests=ALL_TRUSTED,SPF_NEUTRAL autolearn=failed version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on fw.zoral.com.ua X-Scanner-Signature: 8fcfa5a562f326ba64a474cd1db6e25e X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 661 [Dec 30 2006] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-hackers@freebsd.org Subject: Re: Program receiving SIGSEGV after exit() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 12:59:19 -0000 --hu1ClgjWvfumRnAp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 30, 2006 at 03:10:35AM -0300, Alejandro Pulver wrote: > Hello. >=20 > The port "games/qudos" keeps running in a loop after exiting from the > main menu. This is because after calling exit() the program receives a > SIGSEGV signal, and the signal handler, after intercepting it, calls > exit() again. >=20 > I think it is a problem with the application itself, but I don't know > what to look for in the source code. >=20 > I have attached a 'gdb' backtrace. >=20 > Could someone please point me in the right direction? >=20 > Thanks and Best Regards, > Ale Use _exit() instead of exit() in the handler. Aside question is whether this handler is needed at all. --hu1ClgjWvfumRnAp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFllh9C3+MBN1Mb4gRAt/SAKD0AEcJeO7YPdE+VNrxowgIXI4PwQCg2OJP ZPPlYBE487vkf8jNMUJDWCU= =t8yQ -----END PGP SIGNATURE----- --hu1ClgjWvfumRnAp-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 14:14:18 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5472A16A407 for ; Sat, 30 Dec 2006 14:14:18 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: from relay00.pair.com (relay00.pair.com [209.68.5.9]) by mx1.freebsd.org (Postfix) with SMTP id 0B83713C474 for ; Sat, 30 Dec 2006 14:14:17 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: (qmail 75646 invoked by uid 0); 30 Dec 2006 14:14:17 -0000 Received: from 200.115.252.195 (HELO phobos.mars.bsd) (200.115.252.195) by relay00.pair.com with SMTP; 30 Dec 2006 14:14:17 -0000 X-pair-Authenticated: 200.115.252.195 Date: Sat, 30 Dec 2006 11:13:52 -0300 From: Alejandro Pulver To: Kostik Belousov Message-ID: <20061230111352.43fa8c32@phobos.mars.bsd> In-Reply-To: <20061230121557.GL21325@deviant.kiev.zoral.com.ua> References: <20061230031035.149313d3@phobos.mars.bsd> <20061230121557.GL21325@deviant.kiev.zoral.com.ua> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_HKbJwXO4X=D5ok=P5mvK8Mz"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-hackers@freebsd.org Subject: Re: Program receiving SIGSEGV after exit() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 14:14:18 -0000 --Sig_HKbJwXO4X=D5ok=P5mvK8Mz Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 30 Dec 2006 14:15:57 +0200 Kostik Belousov wrote: > On Sat, Dec 30, 2006 at 03:10:35AM -0300, Alejandro Pulver wrote: > > Hello. > >=20 > > The port "games/qudos" keeps running in a loop after exiting from the > > main menu. This is because after calling exit() the program receives a > > SIGSEGV signal, and the signal handler, after intercepting it, calls > > exit() again. > >=20 > > I think it is a problem with the application itself, but I don't know > > what to look for in the source code. > >=20 > > I have attached a 'gdb' backtrace. > >=20 > > Could someone please point me in the right direction? > >=20 > > Thanks and Best Regards, > > Ale > Use _exit() instead of exit() in the handler. Aside question is whether > this handler is needed at all. >=20 >=20 Hello. Thank you for your reply. I searched in the SVN repository and found it originally was _exit(), but changed to exit() just before the release, and after that it was backed out. Yes, I guess the handler is not very useful (also it doesn't produce a core file like the default one). Best Regards, Ale --Sig_HKbJwXO4X=D5ok=P5mvK8Mz Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFlnQ9iV05EpRcP2ERAubqAJ4udaYzwEE26kAUK7DyUj5eUdK1XgCgiW/F s2z3yQK1EILVWTYSjQtvh0s= =TNAw -----END PGP SIGNATURE----- --Sig_HKbJwXO4X=D5ok=P5mvK8Mz-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 14:16:10 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36C9516A403 for ; Sat, 30 Dec 2006 14:16:10 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.freebsd.org (Postfix) with SMTP id F0DDD13C44C for ; Sat, 30 Dec 2006 14:16:09 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: (qmail 60237 invoked by uid 0); 30 Dec 2006 14:16:08 -0000 Received: from unknown (HELO phobos.mars.bsd) (unknown) by unknown with SMTP; 30 Dec 2006 14:16:08 -0000 X-pair-Authenticated: 200.115.252.195 Date: Sat, 30 Dec 2006 11:15:59 -0300 From: Alejandro Pulver To: Kostik Belousov Message-ID: <20061230111559.760a497b@phobos.mars.bsd> In-Reply-To: <20061230122149.GM21325@deviant.kiev.zoral.com.ua> References: <20061230024718.22131bff@phobos.mars.bsd> <20061230122149.GM21325@deviant.kiev.zoral.com.ua> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_jw9/E3Welzr_jpp5ThFSfy_"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-hackers@freebsd.org Subject: Re: Program not being executed at all X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 14:16:10 -0000 --Sig_jw9/E3Welzr_jpp5ThFSfy_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 30 Dec 2006 14:21:50 +0200 Kostik Belousov wrote: > On Sat, Dec 30, 2006 at 02:47:18AM -0300, Alejandro Pulver wrote: > > Hello. > >=20 > > I tried to update the port I maintain "games/quake2max", a Quake II > > engine, but when I try to run the compiled executables, except for > > the dedicated server (quake2max-ded) they output "Abort" and quit. > >=20 > > The output of 'ktrace' is the following (it just stops before running > > it): > >=20 > > 82753 ktrace RET ktrace 0 > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > 82753 ktrace NAMI "/sbin/quake2max" > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > 82753 ktrace NAMI "/bin/quake2max" > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > 82753 ktrace NAMI "/usr/sbin/quake2max" > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > 82753 ktrace NAMI "/usr/bin/quake2max" > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > 82753 ktrace NAMI "/usr/games/quake2max" > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > 82753 ktrace NAMI "/usr/local/sbin/quake2max" > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > 82753 ktrace NAMI "/usr/local/bin/quake2max" > >=20 > > Interestingly 'ldd' also crashes when examining it, outputting the > > following (however 'ktrace' has more information): > >=20 > > /usr/local/bin/quake2max: > > /usr/local/bin/quake2max: signal 6 > >=20 > > My first thought was that it was a GCC bug, so I tried compiling it > > with 4.1 (my system is a FreeBSD 6.1-RELEASE-p1 with GCC 3.4.4 > > 20050518) but it made no difference. > >=20 > > Interestingly the actual "games/quake2max" port works just fine > > (version 0.44), and I couldn't see something suspicious with a quick > > look to the 'diff' output. I have attached a patch to update the port > > in the tree to the 0.45 version. > >=20 > > Could someone investigate this please? > >=20 > > Thanks and Best Regards, > > Ale > >=20 > > P.S.: please CC me since I am not subscribed to the list. >=20 > Please, show the output of the commands > file /usr/local/bin/quake2max > readelf -ld /usr/local/bin/quake2max >=20 >=20 Hello. Thank you for your reply. Here is the output: % file /usr/local/bin/quake2max /usr/local/bin/quake2max: ELF 32-bit LSB executable, Intel 80386, version 1= (FreeBSD), for FreeBSD 6.1, dynamically linked (uses shared libs), stripped % readelf -ld /usr/local/bin/quake2max Elf file type is EXEC (Executable file) Entry point 0x80497d0 There are 6 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000034 0x08048034 0x08048034 0x000c0 0x000c0 R E 0x4 INTERP 0x0000f4 0x080480f4 0x080480f4 0x00015 0x00015 R 0x1 [Requesting program interpreter: /libexec/ld-elf.so.1] LOAD 0x000000 0x08048000 0x08048000 0x72875 0x72875 R E 0x1000 LOAD 0x073000 0x080bb000 0x080bb000 0x02cc4 0x28a20e34 RW 0x10= 00 DYNAMIC 0x075a70 0x080bda70 0x080bda70 0x000c0 0x000c0 RW 0x4 NOTE 0x00010c 0x0804810c 0x0804810c 0x00018 0x00018 R 0x4 Section to Segment mapping: Segment Sections... 00 =20 01 .interp=20 02 .interp .note.ABI-tag .hash .dynsym .dynstr .rel.dyn .rel.plt .in= it .plt .text .fini .rodata=20 03 .data .eh_frame .dynamic .ctors .dtors .jcr .got .bss=20 04 .dynamic=20 05 .note.ABI-tag=20 Dynamic segment at offset 0x75a70 contains 19 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libm.so.4] 0x00000001 (NEEDED) Shared library: [libz.so.3] 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000c (INIT) 0x80491dc 0x0000000d (FINI) 0x80b1748 0x00000004 (HASH) 0x8048124 0x00000005 (STRTAB) 0x8048b5c 0x00000006 (SYMTAB) 0x804846c 0x0000000a (STRSZ) 878 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x80bdb44 0x00000002 (PLTRELSZ) 744 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x8048ef4 0x00000011 (REL) 0x8048ecc 0x00000012 (RELSZ) 40 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x00000000 (NULL) 0x0 Best Regards, Ale --Sig_jw9/E3Welzr_jpp5ThFSfy_ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFlnSviV05EpRcP2ERAncaAJ0UuZA+pXeygh0BX40a6beT8y5kOACcCXYJ zT7FWNnjCnZhDHO7bAIlc64= =oZ+a -----END PGP SIGNATURE----- --Sig_jw9/E3Welzr_jpp5ThFSfy_-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 14:31:17 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8E0A16A403; Sat, 30 Dec 2006 14:31:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.freebsd.org (Postfix) with ESMTP id 5AC6313C45D; Sat, 30 Dec 2006 14:31:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.227] (helo=fw.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.60) (envelope-from ) id 1H0fEp-000F0R-JR; Sat, 30 Dec 2006 16:31:16 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id kBUEV3Ji045423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Dec 2006 16:31:03 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id kBUEV3kq094169; Sat, 30 Dec 2006 16:31:03 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id kBUEV3LU094168; Sat, 30 Dec 2006 16:31:03 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Dec 2006 16:31:03 +0200 From: Kostik Belousov To: Alejandro Pulver Message-ID: <20061230143103.GP21325@deviant.kiev.zoral.com.ua> References: <20061230024718.22131bff@phobos.mars.bsd> <20061230122149.GM21325@deviant.kiev.zoral.com.ua> <20061230111559.760a497b@phobos.mars.bsd> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NEAjDeynQrrxd8+d" Content-Disposition: inline In-Reply-To: <20061230111559.760a497b@phobos.mars.bsd> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.7, clamav-milter version 0.88.7 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-0.1 required=5.0 tests=ALL_TRUSTED,SPF_NEUTRAL autolearn=failed version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on fw.zoral.com.ua X-Scanner-Signature: e97279b2caa82cd912acb3683499d123 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 661 [Dec 30 2006] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-hackers@freebsd.org Subject: Re: Program not being executed at all X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 14:31:17 -0000 --NEAjDeynQrrxd8+d Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 30, 2006 at 11:15:59AM -0300, Alejandro Pulver wrote: > On Sat, 30 Dec 2006 14:21:50 +0200 > Kostik Belousov wrote: >=20 > > On Sat, Dec 30, 2006 at 02:47:18AM -0300, Alejandro Pulver wrote: > > > Hello. > > >=20 > > > I tried to update the port I maintain "games/quake2max", a Quake II > > > engine, but when I try to run the compiled executables, except for > > > the dedicated server (quake2max-ded) they output "Abort" and quit. > > >=20 > > > The output of 'ktrace' is the following (it just stops before running > > > it): > > >=20 > > > 82753 ktrace RET ktrace 0 > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/sbin/quake2max" > > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/bin/quake2max" > > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/usr/sbin/quake2max" > > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/usr/bin/quake2max" > > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/usr/games/quake2max" > > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/usr/local/sbin/quake2max" > > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/usr/local/bin/quake2max" > > >=20 > > > Interestingly 'ldd' also crashes when examining it, outputting the > > > following (however 'ktrace' has more information): > > >=20 > > > /usr/local/bin/quake2max: > > > /usr/local/bin/quake2max: signal 6 > > >=20 > > > My first thought was that it was a GCC bug, so I tried compiling it > > > with 4.1 (my system is a FreeBSD 6.1-RELEASE-p1 with GCC 3.4.4 > > > 20050518) but it made no difference. > > >=20 > > > Interestingly the actual "games/quake2max" port works just fine > > > (version 0.44), and I couldn't see something suspicious with a quick > > > look to the 'diff' output. I have attached a patch to update the port > > > in the tree to the 0.45 version. > > >=20 > > > Could someone investigate this please? > > >=20 > > > Thanks and Best Regards, > > > Ale > > >=20 > > > P.S.: please CC me since I am not subscribed to the list. > >=20 > > Please, show the output of the commands > > file /usr/local/bin/quake2max > > readelf -ld /usr/local/bin/quake2max > >=20 > >=20 >=20 > Hello. >=20 > Thank you for your reply. >=20 > Here is the output: >=20 > % file /usr/local/bin/quake2max > /usr/local/bin/quake2max: ELF 32-bit LSB executable, Intel 80386, version= 1 (FreeBSD), for FreeBSD 6.1, dynamically linked (uses shared libs), strip= ped >=20 > % readelf -ld /usr/local/bin/quake2max > Elf file type is EXEC (Executable file) > Entry point 0x80497d0 > There are 6 program headers, starting at offset 52 >=20 > Program Headers: > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align > PHDR 0x000034 0x08048034 0x08048034 0x000c0 0x000c0 R E 0x4 > INTERP 0x0000f4 0x080480f4 0x080480f4 0x00015 0x00015 R 0x1 > [Requesting program interpreter: /libexec/ld-elf.so.1] > LOAD 0x000000 0x08048000 0x08048000 0x72875 0x72875 R E 0x1000 > LOAD 0x073000 0x080bb000 0x080bb000 0x02cc4 0x28a20e34 RW 0x= 1000 > DYNAMIC 0x075a70 0x080bda70 0x080bda70 0x000c0 0x000c0 RW 0x4 > NOTE 0x00010c 0x0804810c 0x0804810c 0x00018 0x00018 R 0x4 >=20 > Section to Segment mapping: > Segment Sections... > 00 =20 > 01 .interp=20 > 02 .interp .note.ABI-tag .hash .dynsym .dynstr .rel.dyn .rel.plt .= init .plt .text .fini .rodata=20 > 03 .data .eh_frame .dynamic .ctors .dtors .jcr .got .bss=20 > 04 .dynamic=20 > 05 .note.ABI-tag=20 >=20 > Dynamic segment at offset 0x75a70 contains 19 entries: > Tag Type Name/Value > 0x00000001 (NEEDED) Shared library: [libm.so.4] > 0x00000001 (NEEDED) Shared library: [libz.so.3] > 0x00000001 (NEEDED) Shared library: [libc.so.6] > 0x0000000c (INIT) 0x80491dc > 0x0000000d (FINI) 0x80b1748 > 0x00000004 (HASH) 0x8048124 > 0x00000005 (STRTAB) 0x8048b5c > 0x00000006 (SYMTAB) 0x804846c > 0x0000000a (STRSZ) 878 (bytes) > 0x0000000b (SYMENT) 16 (bytes) > 0x00000015 (DEBUG) 0x0 > 0x00000003 (PLTGOT) 0x80bdb44 > 0x00000002 (PLTRELSZ) 744 (bytes) > 0x00000014 (PLTREL) REL > 0x00000017 (JMPREL) 0x8048ef4 > 0x00000011 (REL) 0x8048ecc > 0x00000012 (RELSZ) 40 (bytes) > 0x00000013 (RELENT) 8 (bytes) > 0x00000000 (NULL) 0x0 >=20 > Best Regards, > Ale Signal 6 is sent by elf image activator upon exec() when old address space is destroyed, but new image cannot be loaded. In your case, I guess that extra large bss section size (where uninitialized global/static variables are placed) causes loader to fail: > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align > LOAD 0x073000 0x080bb000 0x080bb000 0x02cc4 0x28a20e34 RW 0x= 1000 Look at MemSiz column. VirtAddr + MemSiz >=3D 0x30000000, and elf interpret= er (/libexec/ld-elf.so.1) is usually mmapped at 0x28000000. Look at the source for huge global arrays/objects. --NEAjDeynQrrxd8+d Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFlngmC3+MBN1Mb4gRAlfWAJ4sIghSMDU5MPd30qvCstXswbsmhQCdEd6W sVDF1zvww/ga8MkWi1MkSdQ= =yaz7 -----END PGP SIGNATURE----- --NEAjDeynQrrxd8+d-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 17:36:55 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D55AC16A407; Sat, 30 Dec 2006 17:36:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 95D5D13C47E; Sat, 30 Dec 2006 17:36:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kBUHZPFH050256; Sat, 30 Dec 2006 10:35:25 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 30 Dec 2006 10:35:32 -0700 (MST) Message-Id: <20061230.103532.1784646290.imp@bsdimp.com> To: rwatson@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20061230123256.V18740@fledge.watson.org> References: <200612301119.kBUBJNno062104@lurza.secnetix.de> <20061230123256.V18740@fledge.watson.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 30 Dec 2006 10:35:26 -0700 (MST) Cc: erik.udo@gmail.com, freebsd-hackers@FreeBSD.org, olli@lurza.secnetix.de Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 17:36:55 -0000 In message: <20061230123256.V18740@fledge.watson.org> Robert Watson writes: : Mounting a second devfs instance is undesirable for a number of : reasons, not least that you end up with an extra file system : floating around (although not reachable via the name space). It's : certainly not disastrous though. At work, we have a build server. Our build environment is a chroot'd area that allows us to insultate the products we're building from the host os's files completely. We have to have a devfs entry in each of these chroots. We often see dozens of devfs instances mounted on our 6.2 build boxes w/o ill effect. We've done this as far back as 5.3. Warner From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 17:45:41 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AFD8B16A403 for ; Sat, 30 Dec 2006 17:45:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 5489813C442 for ; Sat, 30 Dec 2006 17:45:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kBUHh2Yw050300; Sat, 30 Dec 2006 10:43:02 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 30 Dec 2006 10:43:09 -0700 (MST) Message-Id: <20061230.104309.35221148.imp@bsdimp.com> To: olli@lurza.secnetix.de From: "M. Warner Losh" In-Reply-To: <200612301119.kBUBJNno062104@lurza.secnetix.de> References: <20061229.130333.-1771083254.imp@bsdimp.com> <200612301119.kBUBJNno062104@lurza.secnetix.de> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 30 Dec 2006 10:43:02 -0700 (MST) Cc: erik.udo@gmail.com, freebsd-hackers@freebsd.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 17:45:41 -0000 In message: <200612301119.kBUBJNno062104@lurza.secnetix.de> Oliver Fromme writes: : 1- Why does the kernel try to mount /dev at all? Why not : simply let init mount it in all cases, with ot without : init_chroot? Would make things simpler. There doesn't : seem to be a clear reason why the kernel needs to mount : it. (Or maybe there _are_ reasons, byt they don't : appear during my testing.) The kernel needs to mount /, and to do that it needs to have a /dev to look things up in. Well, it actually mounts devfs on / before looking up and mounting the real /. After it does that, it pivots the devfs mounted on / into /dev, which is the source of the warning that you see. : 2- Another solution would be to let init(8) autodetect : whether /dev needs to be mounted. However, that might : not be as trivial as it sounds. Indeed. As far as I can tell, the -d fallback in init is totally unused these days. Since the kernel doesn't have a general list of args passed to init, but instead has to construct them one at time from flags set by the boot loader, I'm pretty sure that it can't be easily specified. : By the way, testing the whole thing is easy. Just install : qemu from ports, then run this command: : : qemu -monitor stdio -cdrom chroot-test.iso -boot d : : Creating the ISO (with mkisofs) takes 5 seconds, and booting : it in qemu takes 10 seconds (even without the kqemu kernel : accelerator module), so the development and testing cycles : are very short. That's how I developed my CD/DVD boot : manager "eltoro"[1]. As soon as the ISO runs successfully : in qemu, I write it to a CD-RW and boot it on a real PC : for verification. Cool! : Best regards : Oliver : : : PS: [1] http://www.secnetix.de/products/eltoro/ : : -- : Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing : Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd : Any opinions expressed in this message may be personal to the author : and may not necessarily reflect the opinions of secnetix in any way. : : "One of the main causes of the fall of the Roman Empire was that, : lacking zero, they had no way to indicate successful termination : of their C programs." : -- Robert Firth : : From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 18:07:03 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6972D16A40F for ; Sat, 30 Dec 2006 18:07:03 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 03B6213C461 for ; Sat, 30 Dec 2006 18:07:02 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 72B1C4758A; Sat, 30 Dec 2006 13:07:01 -0500 (EST) Date: Sat, 30 Dec 2006 18:07:01 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "M. Warner Losh" In-Reply-To: <20061230.103532.1784646290.imp@bsdimp.com> Message-ID: <20061230180625.B50974@fledge.watson.org> References: <200612301119.kBUBJNno062104@lurza.secnetix.de> <20061230123256.V18740@fledge.watson.org> <20061230.103532.1784646290.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: erik.udo@gmail.com, freebsd-hackers@FreeBSD.org, olli@lurza.secnetix.de Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 18:07:03 -0000 On Sat, 30 Dec 2006, M. Warner Losh wrote: > In message: <20061230123256.V18740@fledge.watson.org> > Robert Watson writes: > : Mounting a second devfs instance is undesirable for a number of > : reasons, not least that you end up with an extra file system > : floating around (although not reachable via the name space). It's > : certainly not disastrous though. > > At work, we have a build server. Our build environment is a chroot'd area > that allows us to insultate the products we're building from the host os's > files completely. We have to have a devfs entry in each of these chroots. > We often see dozens of devfs instances mounted on our 6.2 build boxes w/o > ill effect. We've done this as far back as 5.3. Yes, this is certainly a supported configuration, as it's also used extensively with jail. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 20:37:15 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1FD416A40F for ; Sat, 30 Dec 2006 20:37:15 +0000 (UTC) (envelope-from gizmen@blurp.pl) Received: from ip155.azs.pwr.wroc.pl (ip155.azs.pwr.wroc.pl [156.17.17.155]) by mx1.freebsd.org (Postfix) with ESMTP id 681CE13C459 for ; Sat, 30 Dec 2006 20:37:15 +0000 (UTC) (envelope-from gizmen@blurp.pl) Received: from [10.2.2.2] (ip5.t2.ds.pwr.wroc.pl [156.17.224.5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ip155.azs.pwr.wroc.pl (Postfix) with ESMTP id 5370A1142B for ; Sat, 30 Dec 2006 21:10:49 +0100 (CET) Date: Sat, 30 Dec 2006 21:10:50 +0100 From: Bartosz Giza X-Mailer: The Bat! (v3.95.6) UNREG / CD5BF9353B3B7091 X-Priority: 3 (Normal) Message-ID: <363265914.20061230211050@blurp.pl> To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: problem with apache bench X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bartosz Giza List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 20:37:15 -0000 Hi, from couple of days i am trying to figure out what is wrong with apache bench. I want to test my remote site with it but all the time i got this error message. % ab -c 10 -n 500 http://xxxxx/test.php Test aborted after 10 failures apr_socket_connect(): Operation already in progress (37) Total of 8 requests completed I searched google but i didn't find anything in english that i could use. Could somebody help me with this. I am running freebsd 6.2-PRE. I have tested this on amd64 and i386. It seems that there is problem with -c 10 parametr. Without this param ab works good (i hope). But without -c it is hard to benchmark my apache. -- Pozdrowienia, Bartosz Giza From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 20:44:48 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3FCB16A407 for ; Sat, 30 Dec 2006 20:44:47 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id B40CE13C448 for ; Sat, 30 Dec 2006 20:44:47 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (2rle69vks8wqmve9@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id kBUKS00h091974; Sat, 30 Dec 2006 12:28:00 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id kBUKRxHL091973; Sat, 30 Dec 2006 12:27:59 -0800 (PST) (envelope-from jmg) Date: Sat, 30 Dec 2006 12:27:59 -0800 From: John-Mark Gurney To: Neelkanth Natu Message-ID: <20061230202759.GI817@funkthat.com> Mail-Followup-To: Neelkanth Natu , hackers@freebsd.org References: <20061212233346.86191.qmail@web34405.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061212233346.86191.qmail@web34405.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 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: hackers@freebsd.org Subject: Re: MFS_IMAGE with a DEBUG kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 20:44:48 -0000 Neelkanth Natu wrote this message on Tue, Dec 12, 2006 at 15:33 -0800: > Trying to stuff in an MFS_IMAGE into a debug kernel does not work in -current. kern.post.mk tries > to put the MFS_IMAGE in ${KERNEL_KO} when building ${FULLKERNEL} - but ${KERNEL_KO} has not been > created at that point. > > The error message I get is: > > linking kernel.debug > text data bss dec hex filename > 3540430 4532668 149800 8222898 7d78b2 kernel.debug > strings: 'kernel': No such file > rm: kernel: No such file or directory > *** Error code 1 > > The following patch against version 1.98 of kern.post.mk fixes the problem: Thanks, committed the fix... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 21:12:19 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E73B16A40F for ; Sat, 30 Dec 2006 21:12:19 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.freebsd.org (Postfix) with SMTP id 4460713C448 for ; Sat, 30 Dec 2006 21:12:19 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: (qmail 1187 invoked by uid 0); 30 Dec 2006 21:12:17 -0000 Received: from unknown (HELO phobos.mars.bsd) (unknown) by unknown with SMTP; 30 Dec 2006 21:12:17 -0000 X-pair-Authenticated: 200.115.252.195 Date: Sat, 30 Dec 2006 18:12:01 -0300 From: Alejandro Pulver To: Kostik Belousov Message-ID: <20061230181201.20ade388@phobos.mars.bsd> In-Reply-To: <20061230143103.GP21325@deviant.kiev.zoral.com.ua> References: <20061230024718.22131bff@phobos.mars.bsd> <20061230122149.GM21325@deviant.kiev.zoral.com.ua> <20061230111559.760a497b@phobos.mars.bsd> <20061230143103.GP21325@deviant.kiev.zoral.com.ua> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_UDXHvbju6jV=7sbfOgZrm_Y"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-hackers@freebsd.org Subject: Re: Program not being executed at all X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 21:12:19 -0000 --Sig_UDXHvbju6jV=7sbfOgZrm_Y Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 30 Dec 2006 16:31:03 +0200 Kostik Belousov wrote: [...] > > > > Interestingly 'ldd' also crashes when examining it, outputting the > > > > following (however 'ktrace' has more information): > > > >=20 > > > > /usr/local/bin/quake2max: > > > > /usr/local/bin/quake2max: signal 6 > > > >=20 [...] > > > Please, show the output of the commands > > > file /usr/local/bin/quake2max > > > readelf -ld /usr/local/bin/quake2max > > >=20 [...] > Signal 6 is sent by elf image activator upon exec() when old address space > is destroyed, but new image cannot be loaded. In your case, I guess that > extra large bss section size (where uninitialized global/static variables > are placed) causes loader to fail: >=20 > > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Ali= gn > > LOAD 0x073000 0x080bb000 0x080bb000 0x02cc4 0x28a20e34 RW = 0x1000 >=20 > Look at MemSiz column. VirtAddr + MemSiz >=3D 0x30000000, and elf interpr= eter > (/libexec/ld-elf.so.1) is usually mmapped at 0x28000000. >=20 > Look at the source for huge global arrays/objects. Hello. Thank you very much for your help, I have found the array; see below. I searched the diff for increments in the macros (it has many global arrays of a size defined with '#define') and the only thing I could find is the following: -#define MAX_DECAL_FRAGMENTS 32 +#define MAX_DECAL_FRAGMENTS 64 But the problem is here: #define MAX_PARTICLES 4096 typedef struct particle_s { /* skip */ decalpolys_t decal[MAX_DECAL_FRAGMENTS]; /* skip */ } cparticle_t; cparticle_t particles[MAX_PARTICLES]; The size of the cparticle_t type is 68 in my machine. So 68*32*4096 =3D 8912896, and in the new version it was doubled to 17825792. I have changed the definition back to 32, and now 'readelf' reports the size has been reduced considerably: LOAD 0x070000 0x080b8000 0x080b8000 0x03010 0x149a1954 RW 0x10= 00 BTW this works in Linux (I haven't tried myself but someone else told me), so just for curiosity, does it allocate more memory for loading programs? Best Regards, Ale --Sig_UDXHvbju6jV=7sbfOgZrm_Y Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFltY0iV05EpRcP2ERAqTQAKCa69gkcO2u2suMLvoiC0vTSvDK9QCeOe51 bZ2dB/osuCGrRWE7Mg2mgac= =lAZ9 -----END PGP SIGNATURE----- --Sig_UDXHvbju6jV=7sbfOgZrm_Y-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 21:23:40 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C77F716A403; Sat, 30 Dec 2006 21:23:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay01.kiev.sovam.com (relay01.kiev.sovam.com [62.64.120.200]) by mx1.freebsd.org (Postfix) with ESMTP id 3BBE313C44B; Sat, 30 Dec 2006 21:23:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.227] (helo=fw.zoral.com.ua) by relay01.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.60) (envelope-from ) id 1H0lfh-000GIv-Fr; Sat, 30 Dec 2006 23:23:26 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id kBULNEYo055862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Dec 2006 23:23:14 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id kBULNDgq062668; Sat, 30 Dec 2006 23:23:13 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id kBULNDSA062667; Sat, 30 Dec 2006 23:23:13 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Dec 2006 23:23:13 +0200 From: Kostik Belousov To: Alejandro Pulver Message-ID: <20061230212313.GS21325@deviant.kiev.zoral.com.ua> References: <20061230024718.22131bff@phobos.mars.bsd> <20061230122149.GM21325@deviant.kiev.zoral.com.ua> <20061230111559.760a497b@phobos.mars.bsd> <20061230143103.GP21325@deviant.kiev.zoral.com.ua> <20061230181201.20ade388@phobos.mars.bsd> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rVDsP1EMu6KJGDpG" Content-Disposition: inline In-Reply-To: <20061230181201.20ade388@phobos.mars.bsd> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.7, clamav-milter version 0.88.7 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-0.1 required=5.0 tests=ALL_TRUSTED,SPF_NEUTRAL autolearn=failed version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on fw.zoral.com.ua X-Scanner-Signature: 69ad68b945e79e087f1af101bf3fefec X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 661 [Dec 30 2006] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-hackers@freebsd.org Subject: Re: Program not being executed at all X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 21:23:41 -0000 --rVDsP1EMu6KJGDpG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 30, 2006 at 06:12:01PM -0300, Alejandro Pulver wrote: > On Sat, 30 Dec 2006 16:31:03 +0200 > Kostik Belousov wrote: >=20 > [...] > > > > > Interestingly 'ldd' also crashes when examining it, outputting the > > > > > following (however 'ktrace' has more information): > > > > >=20 > > > > > /usr/local/bin/quake2max: > > > > > /usr/local/bin/quake2max: signal 6 > > > > >=20 > [...] > > > > Please, show the output of the commands > > > > file /usr/local/bin/quake2max > > > > readelf -ld /usr/local/bin/quake2max > > > >=20 > [...] > > Signal 6 is sent by elf image activator upon exec() when old address sp= ace > > is destroyed, but new image cannot be loaded. In your case, I guess that > > extra large bss section size (where uninitialized global/static variabl= es > > are placed) causes loader to fail: > >=20 > > > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg A= lign > > > LOAD 0x073000 0x080bb000 0x080bb000 0x02cc4 0x28a20e34 RW= 0x1000 > >=20 > > Look at MemSiz column. VirtAddr + MemSiz >=3D 0x30000000, and elf inter= preter > > (/libexec/ld-elf.so.1) is usually mmapped at 0x28000000. > >=20 > > Look at the source for huge global arrays/objects. >=20 > Hello. >=20 > Thank you very much for your help, I have found the array; see below. >=20 > I searched the diff for increments in the macros (it has many global > arrays of a size defined with '#define') and the only thing I could > find is the following: >=20 > -#define MAX_DECAL_FRAGMENTS 32 > +#define MAX_DECAL_FRAGMENTS 64 >=20 > But the problem is here: >=20 > #define MAX_PARTICLES 4096 >=20 > typedef struct particle_s > { > /* skip */ > decalpolys_t decal[MAX_DECAL_FRAGMENTS]; > /* skip */ > } cparticle_t; >=20 > cparticle_t particles[MAX_PARTICLES]; >=20 > The size of the cparticle_t type is 68 in my machine. So 68*32*4096 =3D > 8912896, and in the new version it was doubled to 17825792. In fact, it shall be bigger due to alignment. >=20 > I have changed the definition back to 32, and now 'readelf' reports the > size has been reduced considerably: >=20 > LOAD 0x070000 0x080b8000 0x080b8000 0x03010 0x149a1954 RW 0x= 1000 >=20 > BTW this works in Linux (I haven't tried myself but someone else told > me), so just for curiosity, does it allocate more memory for loading > programs? >=20 > Best Regards, > Ale This is not how much memory is allocated for loading, this is the address map that determines max size of the data/bss section. I don't remember the typical address where linux places mmaped regions and elf interpreter, and do not have accessible machine to check. Most likely, this address is higher for linux. The array of such size (I think up to 1-1.5 Gb) could be easily allocated dynamically by mmap(2). --rVDsP1EMu6KJGDpG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFltjBC3+MBN1Mb4gRAjW/AKDxZ2anuAyYdj2oQGJ3fsvx8F2guQCgrAT+ b7v5/G6x0tpABI/3531qKwQ= =hedP -----END PGP SIGNATURE----- --rVDsP1EMu6KJGDpG-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 22:31:02 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9905B16A412 for ; Sat, 30 Dec 2006 22:31:02 +0000 (UTC) (envelope-from simon@zaphod.nitro.dk) Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.freebsd.org (Postfix) with ESMTP id 58EF813C45A for ; Sat, 30 Dec 2006 22:31:02 +0000 (UTC) (envelope-from simon@zaphod.nitro.dk) Received: from zaphod.nitro.dk (unknown [192.168.3.39]) by mx.nitro.dk (Postfix) with ESMTP id 4E8622D4AF7; Sat, 30 Dec 2006 22:09:00 +0000 (UTC) Received: by zaphod.nitro.dk (Postfix, from userid 3000) id D4D2E11434; Sat, 30 Dec 2006 23:09:24 +0100 (CET) Date: Sat, 30 Dec 2006 23:09:24 +0100 From: "Simon L. Nielsen" To: Bartosz Giza Message-ID: <20061230220923.GA997@zaphod.nitro.dk> References: <363265914.20061230211050@blurp.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <363265914.20061230211050@blurp.pl> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: problem with apache bench X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 22:31:02 -0000 On 2006.12.30 21:10:50 +0100, Bartosz Giza wrote: > from couple of days i am trying to figure out what is wrong with apache > bench. I want to test my remote site with it but all the time i got this > error message. > > % ab -c 10 -n 500 http://xxxxx/test.php > Test aborted after 10 failures > > apr_socket_connect(): Operation already in progress (37) > Total of 8 requests completed I have had some problems with ab from apache 2.0/2.2, but ab from apache 1.3 it worked fine. I just had to get it to work so I didn't look more into why it broke on newer versions. -- Simon L. Nielsen From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 22:51:41 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0243416A403 for ; Sat, 30 Dec 2006 22:51:41 +0000 (UTC) (envelope-from steve@stevehodgson.co.uk) Received: from benin.smallmonkey.co.uk (benin.smallmonkey.co.uk [82.138.248.235]) by mx1.freebsd.org (Postfix) with ESMTP id C24F713C489 for ; Sat, 30 Dec 2006 22:51:40 +0000 (UTC) (envelope-from steve@stevehodgson.co.uk) Received: from [192.168.7.2] (dyn-62-56-101-172.dslaccess.co.uk [62.56.101.172]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: steve@stevehodgson.co.uk) by benin.smallmonkey.co.uk (Postfix) with ESMTP id D70526D442; Sat, 30 Dec 2006 22:25:32 +0000 (GMT) Message-ID: <4596E75C.6080304@stevehodgson.co.uk> Date: Sat, 30 Dec 2006 22:25:32 +0000 From: Steve Hodgson User-Agent: Thunderbird 1.5.0.7 (X11/20061031) MIME-Version: 1.0 To: Bartosz Giza References: <363265914.20061230211050@blurp.pl> In-Reply-To: <363265914.20061230211050@blurp.pl> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: problem with apache bench X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 22:51:41 -0000 Bartosz Giza wrote: > Hi, > > from couple of days i am trying to figure out what is wrong with apache > bench. I want to test my remote site with it but all the time i got this > error message. > > % ab -c 10 -n 500 http://xxxxx/test.php > Test aborted after 10 failures > > apr_socket_connect(): Operation already in progress (37) > Total of 8 requests completed > > I would use truss to look at the syscalls ab is using. Make sure /proc is mounted and use "truss ab" instead of just ab. Also checking the httpd logs in /var/log might be useful. I've used ab locally on a recent 6.2 and I don't get this failure, but my ab and my kernel are likely different. Steve > I searched google but i didn't find anything in english that i could use. > Could somebody help me with this. > > I am running freebsd 6.2-PRE. I have tested this on amd64 and i386. > It seems that there is problem with -c 10 parametr. Without this param ab > works good (i hope). But without -c it is hard to benchmark my apache. > > >