From owner-freebsd-hackers@FreeBSD.ORG Sun May 22 02:34:20 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82518106564A for ; Sun, 22 May 2011 02:34:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3B9888FC08 for ; Sun, 22 May 2011 02:34:19 +0000 (UTC) Received: by yxl31 with SMTP id 31so2205688yxl.13 for ; Sat, 21 May 2011 19:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=WMdGUU2VxD0+rVxKCLUD8KqrIxB/GM6eGSuypy5MAhM=; b=JNdrbLRhxhUHG1CEF63eHHlDak12mjOobYzusZhaWTci7CwWpNvmlr5n6+xip/8nQ7 ocFiysFgE6YbJu1kc98//LATWyuaCyTQ3LKoi2pEhtaWxgL0MkjT+zdjVg+PBLCQFWZV PRLXUXxD/W0Vv3JLtvYwPUqtTSOCEGqQ60JbQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=U5BTv6g2tq1apuBSbYL/EzThtDbuwPQPq1ODDDgpw7l5t/eQ8Tt6JuXi98HnbBAjJk gOmVplnJrV4N57rGnekTrhK/Kf4fYFhOLG2bcxPYsiv9ntF+papLgNPf3TS9s+8JKWP6 vOwL10slQ5WInN415QwwRkySMfelObgreTE84= MIME-Version: 1.0 Received: by 10.150.187.18 with SMTP id k18mr1666517ybf.19.1306031657728; Sat, 21 May 2011 19:34:17 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.150.91.12 with HTTP; Sat, 21 May 2011 19:34:17 -0700 (PDT) In-Reply-To: References: <83D72FE6-15E8-4113-9811-05299D9C2402@longcount.org> <4DD20EA9.5060300@freebsd.org> Date: Sun, 22 May 2011 10:34:17 +0800 X-Google-Sender-Auth: qEipX7g8JMvtjVp9MWeILNFXFYA Message-ID: From: Adrian Chadd To: Mark Saad Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-hackers@freebsd.org" Subject: Re: Freebsd And the sun x4440 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, 22 May 2011 02:34:20 -0000 On 19 May 2011 22:08, Mark Saad wrote: > I feel that that what bz@ noted in > http://lists.freebsd.org/pipermail/freebsd-arch/2011-March/011198.html > =A0is what I am seeing . This along with some serial port weirdness. > You could add a progress meter to the FreeBSD memory check... ? Adrian From owner-freebsd-hackers@FreeBSD.ORG Sun May 22 07:52:39 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEE74106564A; Sun, 22 May 2011 07:52:39 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 30A878FC13; Sun, 22 May 2011 07:52:38 +0000 (UTC) Received: by bwz12 with SMTP id 12so5571168bwz.13 for ; Sun, 22 May 2011 00:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:from:date:message-id :subject:to:content-type; bh=0cRSk670pG6aF8daiIZ5AQlCjWoYiK3JaCSo+TTKutI=; b=U/kenqjNt5TNms7t9WWh0pSLPLI6kW3O6+QxQAof1aUB6Bc/mQCVyC/HOn7+afnzcv SrIpf39cc8dTJy1K4LeF4higJfbcyNixvEoU5xA6znvStCHa7owtakO7gZavxAigfgUi XZDIOgRVhZrhLn04Y7Y68uwGxbEIW7lKrSWn4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:from:date:message-id:subject:to:content-type; b=VEFyO16zpDr2ZSMJdSKVaP2DwBjoPt3iNXNQsgoISzTTLe900Cde9W6JrlK4PX2wwn eA8MqEoVJpLFFx5mjKJWoEqO4ClM4ZGt+wQppwqs2CFlkLONn5Yq3cV/dSMlRfsm6NSE 7wzG+O0nYWgg7HpX/UWC0BK5FbgR2ifFdm2Hc= Received: by 10.204.16.70 with SMTP id n6mr1044340bka.87.1306049394071; Sun, 22 May 2011 00:29:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.205.65.198 with HTTP; Sun, 22 May 2011 00:29:24 -0700 (PDT) From: Chris Rees Date: Sun, 22 May 2011 08:29:24 +0100 Message-ID: To: freebsd-hackers@freebsd.org, ed@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Utmpx usage X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 07:52:39 -0000 Hi all, After removing all kittens from Ed's reach, I'm disclosing that sysutils/runit tried to use utmpx to directly read() and write() the utmpx files directly... I've replaced the offending code with a patch to the port [1], but I wonder if anyone would please review the patch? I don't have a CURRENT machine to try it on... I may have also made some terrible mistakes -- I'm not hugely familiar with utmpx. Thanks! Chris [1] http://www.bayofrum.net/~crees/patches/runit-utmpx.patch From owner-freebsd-hackers@FreeBSD.ORG Sun May 22 18:03:46 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62A8B1065673; Sun, 22 May 2011 18:03:46 +0000 (UTC) (envelope-from mlfbsd@kanar.ci0.org) Received: from kanar.ci0.org (unknown [IPv6:2a01:e0b:1:50:40:63ff:feea:93a]) by mx1.freebsd.org (Postfix) with ESMTP id 05CC98FC0C; Sun, 22 May 2011 18:03:45 +0000 (UTC) Received: from kanar.ci0.org (pluxor@localhost [127.0.0.1]) by kanar.ci0.org (8.14.2/8.14.3) with ESMTP id p4MI4NE8048839; Sun, 22 May 2011 20:04:23 +0200 (CEST) (envelope-from mlfbsd@kanar.ci0.org) Received: (from mlfbsd@localhost) by kanar.ci0.org (8.14.2/8.14.3/Submit) id p4MI4MKX048838; Sun, 22 May 2011 20:04:22 +0200 (CEST) (envelope-from mlfbsd) Date: Sun, 22 May 2011 20:04:22 +0200 From: Olivier Houchard To: Damjan Marion Message-ID: <20110522180422.GA46973@ci0.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Mailman-Approved-At: Sun, 22 May 2011 19:04:33 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-arm@freebsd.org Subject: Re: vm_fault when accessing PCI address space 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, 22 May 2011 18:03:46 -0000 On Sat, May 21, 2011 at 01:34:02AM +0200, Damjan Marion wrote: > > Hi, > Hi Damjan, > I'm made some progress on porting existing marvell orion ARM code > to work on 88F5181L SoC which have embedded PCI controller. > > PCI driver detects resources and recognizes Atheros wlan card, > however when driver tries to access 1st register with > bus_space_write_4 vm_fault happens: > > vm_fault(0xc0e4f000, e8007000, 2, 0) -> 1 > Fatal kernel mode data abort: 'Translation Fault (S)' > trapframe: 0xc0d3faa4 > FSR=00000005, FAR=e800704c, spsr=600000d3 > r0 =00000000, r1 =e8000000, r2 =0000704c, r3 =00000003 > r4 =c13cd000, r5 =c0c4bd60, r6 =c0bece04, r7 =c12dd000 > r8 =00000023, r9 =c0d074c8, r10=c0d3fba4, r11=c0d3fb00 > r12=00000000, ssp=c0d3faf0, slr=c095f830, pc =c0bece04 > > [ thread pid 0 tid 100000 ] > Stopped at generic_bs_w_4: str r3, [r1, r2] > > 0xe8000000 is PCI mem space. I can see that PCI driver (mv_pci.c) allocates this resource: > > pcib0: mem 0xf1030000-0xf1031fff irq 0 on fdtbus0 > pci0: on pcib0 > mv_pcib_alloc_resource: start=0xe8000000 end=0xe800ffff count=0x00010000 flags=0x00 > > What can be the reason for this vm_fault? > I don't know the Marvell, nor the FDT code, well, but you shouldn't access to the PCI mem space using the physical address, so maybe something is missing from the dts ? Also, reading the mv code, there's this in mv_machdep.c : if (fdt_pci_devmap(child, &fdt_devmap[i], MV_PCIE_IO_BASE, MV_PCIE_MEM_BASE) != 0) return (ENXIO); but nothing equivalent for the PCI controller (as it seems the Orion has both PCI and PCIe). So maybe it is lacking ? Regards, Olivier From owner-freebsd-hackers@FreeBSD.ORG Sun May 22 20:19:15 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 002CF106566B; Sun, 22 May 2011 20:19:14 +0000 (UTC) (envelope-from damjan.marion@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 527338FC15; Sun, 22 May 2011 20:19:13 +0000 (UTC) Received: by bwz12 with SMTP id 12so5905988bwz.13 for ; Sun, 22 May 2011 13:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=+WcYcxXk2hS5gFYis9DKJE8qojeoEirhB7nEbbmlOes=; b=tGGZamQe/ai31zhQAR/qab0hlhQIdf73Fd9f4uFQ3hp2v+muSQWlEyHBADNhoECs1L RNyXTZnJrmZo1LVLDBwChWEe/8EaPB9eI7dPac95sjWUIAQZp2aH7Wg2qyoF6gPOY5wY F43WHPDBTBtjygl7WP1pce7OA1qozG/7Cburg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=SnJqAI7Fg7SpmonvFGQ10BXikXqgr9P6dQ4iURX9RP3uGPj9/FNpjavH+qeAph1JKY x6XUSF4B+UugLNwzZq2ZYV2h/gTrcLzakgWTHFRV41/eOGhofHvZ/xTmwF74dzT+tOsi /qe3GASjXvdN8gzesAVtaJ4uD4TenQIsnnubY= Received: by 10.204.83.7 with SMTP id d7mr1360584bkl.206.1306095553054; Sun, 22 May 2011 13:19:13 -0700 (PDT) Received: from [192.168.123.4] (cpe-109-60-66-194.zg3.cable.xnet.hr [109.60.66.194]) by mx.google.com with ESMTPS id q25sm3468974bkk.10.2011.05.22.13.19.11 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 22 May 2011 13:19:12 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Damjan Marion In-Reply-To: <20110522180422.GA46973@ci0.org> Date: Sun, 22 May 2011 22:19:09 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20110522180422.GA46973@ci0.org> To: Olivier Houchard X-Mailer: Apple Mail (2.1084) Cc: freebsd-hackers@freebsd.org, freebsd-arm@freebsd.org Subject: Re: vm_fault when accessing PCI address space 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, 22 May 2011 20:19:15 -0000 On May 22, 2011, at 8:04 PM, Olivier Houchard wrote: > On Sat, May 21, 2011 at 01:34:02AM +0200, Damjan Marion wrote: >>=20 >> Hi, >>=20 >=20 > Hi Damjan, >=20 >> I'm made some progress on porting existing marvell orion ARM code=20 >> to work on 88F5181L SoC which have embedded PCI controller. >>=20 >> PCI driver detects resources and recognizes Atheros wlan card,=20 >> however when driver tries to access 1st register with >> bus_space_write_4 vm_fault happens: >>=20 >> vm_fault(0xc0e4f000, e8007000, 2, 0) -> 1 >> Fatal kernel mode data abort: 'Translation Fault (S)' >> trapframe: 0xc0d3faa4 >> FSR=3D00000005, FAR=3De800704c, spsr=3D600000d3 >> r0 =3D00000000, r1 =3De8000000, r2 =3D0000704c, r3 =3D00000003 >> r4 =3Dc13cd000, r5 =3Dc0c4bd60, r6 =3Dc0bece04, r7 =3Dc12dd000 >> r8 =3D00000023, r9 =3Dc0d074c8, r10=3Dc0d3fba4, r11=3Dc0d3fb00 >> r12=3D00000000, ssp=3Dc0d3faf0, slr=3Dc095f830, pc =3Dc0bece04 >>=20 >> [ thread pid 0 tid 100000 ] >> Stopped at generic_bs_w_4: str r3, [r1, r2] >>=20 >> 0xe8000000 is PCI mem space. I can see that PCI driver (mv_pci.c) = allocates this resource: >>=20 >> pcib0: mem = 0xf1030000-0xf1031fff irq 0 on fdtbus0 >> pci0: on pcib0 >> mv_pcib_alloc_resource: start=3D0xe8000000 end=3D0xe800ffff = count=3D0x00010000 flags=3D0x00 >>=20 >> What can be the reason for this vm_fault?=20 >>=20 >=20 > I don't know the Marvell, nor the FDT code, well, but you shouldn't = access > to the PCI mem space using the physical address, so maybe something is = missing > from the dts ? > Also, reading the mv code, there's this in mv_machdep.c : > if (fdt_pci_devmap(child, &fdt_devmap[i], > MV_PCIE_IO_BASE, MV_PCIE_MEM_BASE) !=3D 0) > return (ENXIO); > but nothing equivalent for the PCI controller (as it seems the Orion = has both > PCI and PCIe). So maybe it is lacking ? Hi Olivier, yes, that code is wrong. It is inside loop so if there are 2 PCI = adapters=20 (i.e. PCIe + PCI) it will try to map both to same VA. Also different Marvell SoCs are using different PCI regions, so this = needs to be adjusted to work with my SoC. Thanks, Damjan From owner-freebsd-hackers@FreeBSD.ORG Sun May 22 22:39:34 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE181106564A for ; Sun, 22 May 2011 22:39:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 8194D8FC12 for ; Sun, 22 May 2011 22:39:34 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4MMZ691094405 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 16:35:07 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sun, 22 May 2011 16:35:05 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <8854CF36-7B6D-4918-ADF8-6A16CCB2F307@bsdimp.com> References: To: Benjamin Kaduk X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 May 2011 16:35:07 -0600 (MDT) Cc: freebsd-hackers@FreeBSD.org Subject: Re: porting third-party build system to bsd.kmod.mk 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, 22 May 2011 22:39:35 -0000 The usual reason that vnode_if.h doesn't build for me when I'm doing = in-tree hacking is because make depend hasn't run to generate it yet. = Or more precisely, the arc in the dependency graph from osi_crypto.c to = vnode_if.h. I didn't see that as part of the log, so you might try this = first (and make setup dependent on depend somehow, as long as it is = idempotent. But many of the things that are being setup with the setup target = shouldn't be necessary. depend does that based on the setting of = SYSDIR. and the @ symlink should be enough to make the ufs and other = symlinks unnecessary. Warner On May 21, 2011, at 12:14 AM, Benjamin Kaduk wrote: > After getting a few pointers from jhb at BSDCan on what a = bsd.kmod.mk-using Makefile should look like, I have been trying my hand = at porting the OpenAFS kernel module build system to use it. (The main = thing this gets us is not having to manually track version- and = architecture-dependent CFLAGS and the like.) However, the path is not = exactly smooth. >=20 > A lot of the difficulty is in getting an autogenerated vnode_if.h = while using a list of files to include in the module(from the common = OpenAFS code) that's given as a list of object files. If there's = already a vnode_if.h sitting around, I can just use OBJS and things = progress quite nicely; however, if I have to get back to SRCS for the = use of sys/conf/kmod.mk's vnode_if.h logic, I get this sort of build = failure (full log attached) with the attached Makefile: > gcc -I. -I.. -I../nfs [more includes and defines] = -I/usr/devel/openafs/git/openafs/include/afs -I@/sys -Imachine -I. -I@ = -I@/contrib/altq -finline-limit=3D8000 --param inline-unit-growth=3D100 = --param large-function-growth=3D1000 -fno-common -fno-omit-frame-pointer = -mcmodel=3Dkernel -mno-red-zone -mfpmath=3D387 -mno-mmx -mno-3dnow = -mno-sse -mno-sse2 -mno-sse3 -msoft-float = -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector = -std=3Diso9899:1999 -fstack-protector -Wno-redundant-decls = -Wsystem-headers -Werror -Wno-pointer-sign -o osi_crypto.o -c = /usr/devel/openafs/git/openafs/src/afs/FBSD/osi_crypto.c = /usr/devel/openafs/git/openafs/src/libafs/MODLOAD/../../afs/FBSD/osi_crypt= o.c vnode_if.h > gcc: cannot specify -o with -c or -S with multiple files >=20 > That last bit, "-o osi_crypto.o -c /path/to/osi_crypto.c = /path/to/osi_crypto.c vnode_if.h" is quite troublesome. Any thoughts on = what is causing those extra files to be listed would be greatly = appreciated. (Comments on other issues in the Makefile are welcome, too = -- it's still in pretty rough shape.) >=20 > I should note that though Makefile.common does define a osi_crypto.o = target, "make -d A" reports: > using existing source = /usr/devel/openafs/git/openafs/src/afs/FBSD/osi_crypto.c > applying .c -> .o to "osi_crypto.o" >=20 >=20 > Thanks, >=20 > Ben = Kaduk____________________________________________= ___ > 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 May 23 03:48:09 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4902A106566C; Mon, 23 May 2011 03:48:09 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id AE5DD8FC12; Mon, 23 May 2011 03:48:08 +0000 (UTC) Received: by iyj12 with SMTP id 12so6553462iyj.13 for ; Sun, 22 May 2011 20:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qnRlcV9/jeLl8ManO2naUYxYOA/uznLzxM8HnTKAhz8=; b=VnP5GHBvLo5xwG8hBIBuzAFJV5MYY1mU/2qBgPANAwM7C7WrfovGKeq1hJDFkOBZsY xNALAL3nju3Pi8wa9rt3sZ5zk/3+sPRduRkH46MGNL//OELo+jBLpjgPk2OKA5VIaKP3 1NKFxtzOES34jRiEKvm0wVS6BRcgPQQ8SvB8Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=qeRe6njn29bp0DsXyji9deNc+FDBMTYhAuV7CtQr7uRgwHSOXORH3U7chtcmSoQPAx FfIqfNhilGmo9siC0jzikFjDbMmC1vfB2KFyvSqEr7KplICnNFXLn88zgsnbWDQAt6XE FFfXltfRGzerPGVq4W1qCb5nJ+D+445R6hvug= MIME-Version: 1.0 Received: by 10.43.47.72 with SMTP id ur8mr8717438icb.9.1306122487886; Sun, 22 May 2011 20:48:07 -0700 (PDT) Received: by 10.42.177.10 with HTTP; Sun, 22 May 2011 20:48:07 -0700 (PDT) In-Reply-To: <5AF348C8-6AB6-490D-A12E-89A51528F58F@bsdimp.com> References: <4D934AF4.9080503@FreeBSD.org> <742085CD-7F6F-4879-9FFD-517EC3203D52@bsdimp.com> <5AF348C8-6AB6-490D-A12E-89A51528F58F@bsdimp.com> Date: Sun, 22 May 2011 23:48:07 -0400 Message-ID: From: Arnaud Lacombe To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: mdf@freebsd.org, "Robert N. M. Watson" , Dimitry Andric , freebsd-hackers Subject: Re: Include file search path 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, 23 May 2011 03:48:09 -0000 Hi Warner, On Sat, Apr 2, 2011 at 6:49 PM, Warner Losh wrote: > > On Apr 2, 2011, at 1:10 PM, Robert N. M. Watson wrote: > >> On 2 Apr 2011, at 19:47, Warner Losh wrote: >> >>>> (2) Working clang/LLVM cross-compile of FreeBSD. =A0This seems like a = basic >>>> =A0requirement to adopt clang/LLVM, and as far as I'm aware that's not= yet a >>>> =A0resolved issue? >>> >>> 0 work has been done here to my knowledge. =A0The world view for clang = and our in-tree gcc differ which makes it a challenge. >> >> That's disappointing. I seem to recall it's more an issue of our build i= ntegration with clang/LLVM than an underlying issue in clang/LLVM? > > Yes. =A0The problem isn't hard, the cross compile paradigm is just a litt= le different. > >>>> We (Cambridge) are currently bringing up FreeBSD on a new soft-core 64= -bit MIPS platform. =A0We're already using a non-base gcc for our boot load= er work, and plan to move to using clang/LLVM later in the year. =A0The bas= e system seems a bit short on detail when it comes to the above, currently. >>> >>> Yes. =A0I've had to add about a dozen changes so far to get close to bu= ilding with xdev compilers. =A0A similar number are needed to make it easy = to configure and add systree support, I think. >> >> Sounds like great progress -- do you think we'll ship 9.0 in a "just wor= ks" state with regard to this? > > I sure hope so. =A0I'd like to have demoable stuff by BSDcan. > BSDCan has passed, has there been any advance made since that discussion ? Thanks, - Arnaud From owner-freebsd-hackers@FreeBSD.ORG Mon May 23 13:13:02 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DCAF1065670 for ; Mon, 23 May 2011 13:13:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A4F438FC15 for ; Mon, 23 May 2011 13:13:01 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA12338; Mon, 23 May 2011 16:12:59 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4DDA5D5A.4060509@FreeBSD.org> Date: Mon, 23 May 2011 16:12:58 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110504 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Eduardo References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: upgrade to version 8 - can not mount root 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, 23 May 2011 13:13:02 -0000 on 20/05/2011 20:36 Eduardo said the following: > da0 at ahc0 bus0 scbus0 target 5 lun 0 > da0 messages ... > da0 at ahc0 bus0 scbus0 target 6 lun 0 > da1 messages ... > Trying to mount root from ufs:/dev/da0s1a > ROOT MOUNT ERROR: > If you have invalid mount options, reboot, and first try the following > from the loader prompt: > set vfs.root.mountfrom.options=rw > and then remove invalid mount options from /etc/fstab > Loader variables: > vfs.root.mountfrom=ufs:/dev/da0s1a > vfs.root.mountfrom.options=rw > > Manual root filesystem specification: ...etc.. > > mountroot> > > pani: Root mount failed, startup aborted. > cpuid=0 > KBD: stack backtrace: > #0 0xc08ebe67 at kdb_backtrace+0x47 > #1 0xc08bc627 at panic+0x117 > #2 0xc0943fc7 at vfs_mountroot+0x4f7 > #3 0xc08737c0 at start_init+0x60 > #4 0xc0890f51 at fork_exit+0x91 > #5 0xc0bd5b84 at fork_trampoline+0x8 > > I can boot the old kernel at 7.2 and recompile again with debug flags as needed. > > One thing I did try just now was to install 8.2 from the CD ... after > I choose install options and he goes to create the filesystems I get > these error messages: > > > Unable to find device node for /dev/da0s1b in /dev! > The creation of filesystems will be aborted. First, this is not really a question for hackers@. Perhaps stable@, geom@ or fs@ would be better choices. To the subject matter, it seems like you could have an MBR that is reject by code in in 8. Have you tried to get a lit of devices that kernel sees at the mountroot prompt? What are those? It could also be useful to boot from 8 or 9 live disk and examine how the system sees your disks. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Mon May 23 14:13:44 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 486B41065670 for ; Mon, 23 May 2011 14:13:44 +0000 (UTC) (envelope-from philip-freebsd1@soeberg.net) Received: from pasmtpB.tele.dk (pasmtpb.tele.dk [80.160.77.98]) by mx1.freebsd.org (Postfix) with ESMTP id 0803B8FC19 for ; Mon, 23 May 2011 14:13:43 +0000 (UTC) Received: from mail.soeberg.net (0x573f534a.cpe.ge-1-1-0-1109.bynqu1.customer.tele.dk [87.63.83.74]) by pasmtpB.tele.dk (Postfix) with ESMTP id 7B952E3023B for ; Mon, 23 May 2011 16:13:42 +0200 (CEST) Received: from [192.168.1.199] ([192.168.1.199]) (authenticated user philip@soeberg.net) by mail.soeberg.net (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)) for freebsd-hackers@freebsd.org; Mon, 23 May 2011 16:13:43 +0200 Message-ID: <4DDA6B95.3090704@soeberg.net> Date: Mon, 23 May 2011 16:13:41 +0200 From: Philip Soeberg User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: device_detach() on a device used by ixgbe driver (FreeBSD 7-STABLE through to 9-CURRENT) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: philip-freebsd1@soeberg.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 14:13:44 -0000 Hi fellow FreeBSD hackers, I've just completed designing a new driver for the Intels IXGBE suite of network adapters, but is building my driver as a kernel module to be loaded after system boot. The current sys/dev/ixgbe/ixgbe.c driver which attach to Intels adapters return a zero in it's probe() function (which equals to BUS_PROBE_SPECIFIC).. This has the distinct disadvantage that I cannot, through my module, call a device_detach() on the devices I support, and afterward expect being probed for them. A BUS_PROBE_SPECIFIC, according to wording in sys/sys/bus.h, inform the OS that "Only I can use this device". I assume this (transcanding from FreeBSD 7.0-STABLE through to FreeBSD 9-CURRENT) is in error? I would expect sys/dev/ixgbe/ixgbe.c's probe() function to return BUS_PROBE_DEFAULT, which is the "Base OS default driver".. If this is true, then we should probably also update sys/kern/device_if.m's description of the probe() method as to reflect the BUS_PROBE_* return values in a clearer way than is currently described. Do you want me to provide a patch? (it's really a one liner for ixgbe.c and a couple of alterations to the device_if.m, if need be) I would also expect the ixgbe.c driver to do a quick resource_disabled() in it's attach() function, so that we can disable specific adapters through kenv hint.ix.0.disabled=1.. Given that I can't use device_detach() on a device hogged by the IXGBE driver, can any one of you help me with a way around this problem? I can't use the hints, and I can't detach() the device.. how can I get my kernel module to attach the device? Thanks, Phil From owner-freebsd-hackers@FreeBSD.ORG Mon May 23 14:32:22 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1A711065670 for ; Mon, 23 May 2011 14:32:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A980B8FC0A for ; Mon, 23 May 2011 14:32:22 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 50F8046CDC; Mon, 23 May 2011 10:32:22 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DF1DB8A051; Mon, 23 May 2011 10:32:21 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org, philip-freebsd1@soeberg.net Date: Mon, 23 May 2011 10:32:19 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <4DDA6B95.3090704@soeberg.net> In-Reply-To: <4DDA6B95.3090704@soeberg.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105231032.20084.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 23 May 2011 10:32:22 -0400 (EDT) Cc: jfv@gmail.com Subject: Re: device_detach() on a device used by ixgbe driver (FreeBSD 7-STABLE through to 9-CURRENT) 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, 23 May 2011 14:32:22 -0000 On Monday, May 23, 2011 10:13:41 am Philip Soeberg wrote: > Hi fellow FreeBSD hackers, > > I've just completed designing a new driver for the Intels IXGBE suite of > network adapters, but is building my driver as a kernel module to be > loaded after system boot. > > The current sys/dev/ixgbe/ixgbe.c driver which attach to Intels adapters > return a zero in it's probe() function (which equals to > BUS_PROBE_SPECIFIC).. This has the distinct disadvantage that I cannot, > through my module, call a device_detach() on the devices I support, and > afterward expect being probed for them. A BUS_PROBE_SPECIFIC, according > to wording in sys/sys/bus.h, inform the OS that "Only I can use this > device". > > I assume this (transcanding from FreeBSD 7.0-STABLE through to FreeBSD > 9-CURRENT) is in error? I would expect sys/dev/ixgbe/ixgbe.c's probe() > function to return BUS_PROBE_DEFAULT, which is the "Base OS default > driver".. Yes, that is true. > If this is true, then we should probably also update > sys/kern/device_if.m's description of the probe() method as to reflect > the BUS_PROBE_* return values in a clearer way than is currently described. > Do you want me to provide a patch? (it's really a one liner for ixgbe.c > and a couple of alterations to the device_if.m, if need be) device_if.m was probably just never updated from when BUS_PROBE_* were added. Updating it would be a good thing. > I would also expect the ixgbe.c driver to do a quick resource_disabled() > in it's attach() function, so that we can disable specific adapters > through kenv hint.ix.0.disabled=1.. That is not universally supported (i.e. it's not a part of new-bus specifically). For buses that support hinted devices, they do all generally support being able to disable a hinted device, but disabling bus-enumerated devices is not generally supported. > Given that I can't use device_detach() on a device hogged by the IXGBE > driver, can any one of you help me with a way around this problem? I > can't use the hints, and I can't detach() the device.. how can I get my > kernel module to attach the device? I think ixgbe has to be fixed to use BUS_PROBE_DEFAULT. Very few drivers should use '0' for their probe return value. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon May 23 17:22:54 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC22A106566C for ; Mon, 23 May 2011 17:22:54 +0000 (UTC) (envelope-from philip-freebsd1@soeberg.net) Received: from pasmtpA.tele.dk (pasmtpa.tele.dk [80.160.77.114]) by mx1.freebsd.org (Postfix) with ESMTP id 5B6178FC16 for ; Mon, 23 May 2011 17:22:54 +0000 (UTC) Received: from mail.soeberg.net (0x573f534a.cpe.ge-1-1-0-1109.bynqu1.customer.tele.dk [87.63.83.74]) by pasmtpA.tele.dk (Postfix) with ESMTP id DBCDC80027B for ; Mon, 23 May 2011 19:22:52 +0200 (CEST) Received: from [192.168.1.199] ([192.168.1.199]) (authenticated user philip@soeberg.net) by mail.soeberg.net (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)) for freebsd-hackers@freebsd.org; Mon, 23 May 2011 19:22:53 +0200 Message-ID: <4DDA97EA.20705@soeberg.net> Date: Mon, 23 May 2011 19:22:50 +0200 From: Philip Soeberg User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4DDA6B95.3090704@soeberg.net> <201105231032.20084.jhb@freebsd.org> In-Reply-To: <201105231032.20084.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: device_detach() on a device used by ixgbe driver (FreeBSD 7-STABLE through to 9-CURRENT) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: philip-freebsd1@soeberg.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 17:22:54 -0000 On 23-05-2011 16:32, John Baldwin wrote: >> I assume this (transcanding from FreeBSD 7.0-STABLE through to FreeBSD >> 9-CURRENT) is in error? I would expect sys/dev/ixgbe/ixgbe.c's probe() >> function to return BUS_PROBE_DEFAULT, which is the "Base OS default >> driver".. > > Yes, that is true. > >> If this is true, then we should probably also update >> sys/kern/device_if.m's description of the probe() method as to reflect >> the BUS_PROBE_* return values in a clearer way than is currently described. >> Do you want me to provide a patch? (it's really a one liner for ixgbe.c >> and a couple of alterations to the device_if.m, if need be) > > device_if.m was probably just never updated from when BUS_PROBE_* were added. > Updating it would be a good thing. I'll submit a patch tomorrow with an updated description and a fix for the ixgbe then.. > >> I would also expect the ixgbe.c driver to do a quick resource_disabled() >> in it's attach() function, so that we can disable specific adapters >> through kenv hint.ix.0.disabled=1.. > > I think ixgbe has to be fixed to use BUS_PROBE_DEFAULT. Very few drivers > should use '0' for their probe return value. > but since it does return zero, do you have any idea how I can force it to detach allowing me in instead? I've been stabbing high and low at it for hours now, and nothing seem to get me anywhere.. short of hacking the ixgbe_attach() function address, I can't seem to figure out a way to kill the systems way of re-attaching the device to the ixgbe just after I've detached it. rather frustrating.. It's like a catch-22 problem.. and worse, the ixgbe driver is per default included as a static module, so loader.conf "ix_load=no" will have no effect (unless I'm mistaken?) I'm running out of ideas as to how I can attach myself to that Intel device instead of the ixgbe when it is linked static and with a return of zero in it's probe().. And I'm also out of ideas as to how to disable that damn module altogether, short of recompiling the kernel.. any ideas? From owner-freebsd-hackers@FreeBSD.ORG Mon May 23 19:25:51 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E2D41065675; Mon, 23 May 2011 19:25:51 +0000 (UTC) (envelope-from aboyer@averesystems.com) Received: from zimbra.averesystems.com (75-149-8-245-Pennsylvania.hfc.comcastbusiness.net [75.149.8.245]) by mx1.freebsd.org (Postfix) with ESMTP id ED0148FC1B; Mon, 23 May 2011 19:25:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra.averesystems.com (Postfix) with ESMTP id 92B1C446001; Mon, 23 May 2011 15:09:20 -0400 (EDT) X-Virus-Scanned: amavisd-new at averesystems.com Received: from zimbra.averesystems.com ([127.0.0.1]) by localhost (zimbra.averesystems.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n+7VI2V7Sohu; Mon, 23 May 2011 15:09:19 -0400 (EDT) Received: from riven.arriad.com (fw.arriad.com [10.0.0.16]) by zimbra.averesystems.com (Postfix) with ESMTPSA id 0F0E38BC001; Mon, 23 May 2011 15:09:19 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1084) From: Andrew Boyer In-Reply-To: <201105231032.20084.jhb@freebsd.org> Date: Mon, 23 May 2011 15:08:05 -0400 Message-Id: References: <4DDA6B95.3090704@soeberg.net> <201105231032.20084.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: jfv@gmail.com, freebsd-hackers@freebsd.org, philip-freebsd1@soeberg.net Subject: Re: device_detach() on a device used by ixgbe driver (FreeBSD 7-STABLE through to 9-CURRENT) 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, 23 May 2011 19:25:51 -0000 On May 23, 2011, at 10:32 AM, John Baldwin wrote: > On Monday, May 23, 2011 10:13:41 am Philip Soeberg wrote: >> I would also expect the ixgbe.c driver to do a quick = resource_disabled()=20 >> in it's attach() function, so that we can disable specific adapters=20= >> through kenv hint.ix.0.disabled=3D1.. >=20 > That is not universally supported (i.e. it's not a part of new-bus=20 > specifically). For buses that support hinted devices, they do all = generally=20 > support being able to disable a hinted device, but disabling = bus-enumerated=20 > devices is not generally supported. >=20 FYI, I submitted a patch to Jack to add this in all of the e1000/ixgbe = drivers. Setting a disabled=3D"1" hint causes the attach to fail with = ENXIO. I don't know if it's 'correct' or not but it serves a purpose in = our testing and I thought it would be useful for others. -Andrew -------------------------------------------------- Andrew Boyer aboyer@averesystems.com From owner-freebsd-hackers@FreeBSD.ORG Tue May 24 11:55:40 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E2EC106566C for ; Tue, 24 May 2011 11:55:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 558D78FC0A for ; Tue, 24 May 2011 11:55:40 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id EC72946B32; Tue, 24 May 2011 07:55:39 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 77ED68A04F; Tue, 24 May 2011 07:55:39 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org, philip-freebsd1@soeberg.net Date: Tue, 24 May 2011 07:47:01 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <4DDA6B95.3090704@soeberg.net> <201105231032.20084.jhb@freebsd.org> <4DDA97EA.20705@soeberg.net> In-Reply-To: <4DDA97EA.20705@soeberg.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105240747.02381.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 24 May 2011 07:55:39 -0400 (EDT) Cc: Subject: Re: device_detach() on a device used by ixgbe driver ( FreeBSD 7-STABLE through to 9-CURRENT) 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, 24 May 2011 11:55:40 -0000 On Monday, May 23, 2011 1:22:50 pm Philip Soeberg wrote: > On 23-05-2011 16:32, John Baldwin wrote: > >> I assume this (transcanding from FreeBSD 7.0-STABLE through to FreeBSD > >> 9-CURRENT) is in error? I would expect sys/dev/ixgbe/ixgbe.c's probe() > >> function to return BUS_PROBE_DEFAULT, which is the "Base OS default > >> driver".. > > > > Yes, that is true. > > > >> If this is true, then we should probably also update > >> sys/kern/device_if.m's description of the probe() method as to reflect > >> the BUS_PROBE_* return values in a clearer way than is currently described. > >> Do you want me to provide a patch? (it's really a one liner for ixgbe.c > >> and a couple of alterations to the device_if.m, if need be) > > > > device_if.m was probably just never updated from when BUS_PROBE_* were added. > > Updating it would be a good thing. > I'll submit a patch tomorrow with an updated description and a fix for > the ixgbe then.. > > > >> I would also expect the ixgbe.c driver to do a quick resource_disabled() > >> in it's attach() function, so that we can disable specific adapters > >> through kenv hint.ix.0.disabled=1.. > > > > I think ixgbe has to be fixed to use BUS_PROBE_DEFAULT. Very few drivers > > should use '0' for their probe return value. > > > > but since it does return zero, do you have any idea how I can force it > to detach allowing me in instead? I've been stabbing high and low at it > for hours now, and nothing seem to get me anywhere.. short of hacking > the ixgbe_attach() function address, I can't seem to figure out a way to > kill the systems way of re-attaching the device to the ixgbe just after > I've detached it. > > rather frustrating.. It's like a catch-22 problem.. > > and worse, the ixgbe driver is per default included as a static module, > so loader.conf "ix_load=no" will have no effect (unless I'm mistaken?) > > I'm running out of ideas as to how I can attach myself to that Intel > device instead of the ixgbe when it is linked static and with a return > of zero in it's probe().. And I'm also out of ideas as to how to disable > that damn module altogether, short of recompiling the kernel.. > > any ideas? Short of dynamically patching ixgbe_probe()'s return value at runtime? No, no ideas. :( -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue May 24 11:55:41 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8165F106564A for ; Tue, 24 May 2011 11:55:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 585008FC1B for ; Tue, 24 May 2011 11:55:41 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 064C146B2C; Tue, 24 May 2011 07:55:41 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 99FA78A051; Tue, 24 May 2011 07:55:40 -0400 (EDT) From: John Baldwin To: Andrew Boyer Date: Tue, 24 May 2011 07:49:53 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <4DDA6B95.3090704@soeberg.net> <201105231032.20084.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201105240749.53149.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 24 May 2011 07:55:40 -0400 (EDT) Cc: freebsd-hackers@freebsd.org, philip-freebsd1@soeberg.net Subject: Re: device_detach() on a device used by ixgbe driver (FreeBSD 7-STABLE through to 9-CURRENT) 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, 24 May 2011 11:55:41 -0000 On Monday, May 23, 2011 3:08:05 pm Andrew Boyer wrote: > > On May 23, 2011, at 10:32 AM, John Baldwin wrote: > > > On Monday, May 23, 2011 10:13:41 am Philip Soeberg wrote: > >> I would also expect the ixgbe.c driver to do a quick resource_disabled() > >> in it's attach() function, so that we can disable specific adapters > >> through kenv hint.ix.0.disabled=1.. > > > > That is not universally supported (i.e. it's not a part of new-bus > > specifically). For buses that support hinted devices, they do all generally > > support being able to disable a hinted device, but disabling bus- enumerated > > devices is not generally supported. > > > > FYI, I submitted a patch to Jack to add this in all of the e1000/ixgbe drivers. Setting a disabled="1" hint causes the attach to fail with ENXIO. I don't know if it's 'correct' or not but it serves a purpose in our testing and I thought it would be useful for others. One patch I have had for a while is a way to disable specific PCI devices, but that's not quite the same thing as it disables all drivers for a given device. (It adds support for a 'hw.pci....disabled=1' tunable). -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue May 24 12:19:01 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6C481065670 for ; Tue, 24 May 2011 12:19:01 +0000 (UTC) (envelope-from philip-dev@soeberg.net) Received: from pasmtpA.tele.dk (pasmtpa.tele.dk [80.160.77.114]) by mx1.freebsd.org (Postfix) with ESMTP id 5673F8FC17 for ; Tue, 24 May 2011 12:19:01 +0000 (UTC) Received: from mail.soeberg.net (0x573f534a.cpe.ge-1-1-0-1109.bynqu1.customer.tele.dk [87.63.83.74]) by pasmtpA.tele.dk (Postfix) with ESMTP id 7587F8004EE; Tue, 24 May 2011 13:56:59 +0200 (CEST) Received: from [10.240.10.87] ([188.120.77.114]) (authenticated user philip@soeberg.net) by mail.soeberg.net (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)); Tue, 24 May 2011 13:57:02 +0200 Message-ID: <4DDB9D0E.5030309@soeberg.net> Date: Tue, 24 May 2011 13:57:02 +0200 From: Philip Soeberg User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4DDA6B95.3090704@soeberg.net> <201105231032.20084.jhb@freebsd.org> In-Reply-To: <201105231032.20084.jhb@freebsd.org> Content-Type: multipart/mixed; boundary="------------080803000504030803000001" Cc: freebsd@intel.com Subject: Re: device_detach() on a device used by ixgbe driver (FreeBSD 7-STABLE through to 9-CURRENT) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: philip-dev@soeberg.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 12:19:01 -0000 This is a multi-part message in MIME format. --------------080803000504030803000001 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Attached is a patch against FreeBSD HEAD (svn 222248, aka. FreeBSD 9-CURRENT) which solves the Intel IXGBE driver problem reported below. Changes: * IXGBE's probe() function now return BUS_PROBE_DEFAULT as it should. * IXGBE's attach() now inquire resource_disabled() to enable hints to explicitly disable supported adapters. * device_if.m's wording has been updated. (This file's descriptions of DEVICE_* functions seem redundant as it is also written in man 9 DEVICE_*.9) * IXGBE's module build Makefile now use name if_ixgbe instead of old-style ixgbe. Man pages and forth's loader.conf already reflect this. The wording in device_if.m is likely to provide you with a good laugh, so I suggest rewording it further :) It is an attempt at ensuring future driver developers does -not- return zero in their probe() function, unless absolutely required. I am however not sure if we need this file's descriptions any longer, as the man pages seem far better? The attached file also patch nicely against RELENG_8, which is still open. I assume it is enough to submit this patch to the freebsd-hackers mailinglist? Philip Soeberg //// philip-dev@soeberg.net (@ @) soeberg.net ------------------------------oOO--(_)--OOo------------------ On 23-05-2011 16:32, John Baldwin wrote: > On Monday, May 23, 2011 10:13:41 am Philip Soeberg wrote: >> Hi fellow FreeBSD hackers, >> >> I've just completed designing a new driver for the Intels IXGBE suite of >> network adapters, but is building my driver as a kernel module to be >> loaded after system boot. >> >> The current sys/dev/ixgbe/ixgbe.c driver which attach to Intels adapters >> return a zero in it's probe() function (which equals to >> BUS_PROBE_SPECIFIC).. This has the distinct disadvantage that I cannot, >> through my module, call a device_detach() on the devices I support, and >> afterward expect being probed for them. A BUS_PROBE_SPECIFIC, according >> to wording in sys/sys/bus.h, inform the OS that "Only I can use this >> device". >> >> I assume this (transcanding from FreeBSD 7.0-STABLE through to FreeBSD >> 9-CURRENT) is in error? I would expect sys/dev/ixgbe/ixgbe.c's probe() >> function to return BUS_PROBE_DEFAULT, which is the "Base OS default >> driver".. > Yes, that is true. > >> If this is true, then we should probably also update >> sys/kern/device_if.m's description of the probe() method as to reflect >> the BUS_PROBE_* return values in a clearer way than is currently described. >> Do you want me to provide a patch? (it's really a one liner for ixgbe.c >> and a couple of alterations to the device_if.m, if need be) > device_if.m was probably just never updated from when BUS_PROBE_* were added. > Updating it would be a good thing. > >> I would also expect the ixgbe.c driver to do a quick resource_disabled() >> in it's attach() function, so that we can disable specific adapters >> through kenv hint.ix.0.disabled=1.. > That is not universally supported (i.e. it's not a part of new-bus > specifically). For buses that support hinted devices, they do all generally > support being able to disable a hinted device, but disabling bus-enumerated > devices is not generally supported. > >> Given that I can't use device_detach() on a device hogged by the IXGBE >> driver, can any one of you help me with a way around this problem? I >> can't use the hints, and I can't detach() the device.. how can I get my >> kernel module to attach the device? > I think ixgbe has to be fixed to use BUS_PROBE_DEFAULT. Very few drivers > should use '0' for their probe return value. > --------------080803000504030803000001 Content-Type: text/plain; name="freebsd-head-svn-222248.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="freebsd-head-svn-222248.patch" Index: sys/kern/device_if.m =================================================================== --- sys/kern/device_if.m (revision 222248) +++ sys/kern/device_if.m (working copy) @@ -97,10 +97,18 @@ * used to generate an informative message when DEVICE_ATTACH() * is called. * + * Driver election is determined by the negative return value of + * the probe function on a highest-value-best-match type effort. + * Drivers included in the kernel normally return -20 (via + * convenience define BUS_PROBE_DEFAULT) which allows for a more + * specific driver to be installed at a later time. + * * As a special case, if a driver returns zero, the driver election * is cut short and that driver will attach to the device - * immediately. + * immediately. A return value of zero is rarely used. * + * Please see man page for DEVICE_PROBE() for more information. + * * For example, a probe method for a pci device driver might look * like this: * @@ -110,7 +118,7 @@ * if (pci_get_vendor(dev) == FOOVENDOR && * pci_get_device(dev) == FOODEVICE) { * device_set_desc(dev, "Foo device"); - * return (0); + * return (BUS_PROBE_DEFAULT); * } * return (ENXIO); * } @@ -128,7 +136,7 @@ * @retval 0 if the driver strongly matches this device * @retval negative if the driver can match this device - the * least negative value is used to select the - * driver + * driver. Typical return value is BUS_PROBE_DEFAULT. * @retval ENXIO if the driver does not match the device * @retval positive if some kind of error was detected during * the probe, a regular unix error code should Index: sys/modules/ixgbe/Makefile =================================================================== --- sys/modules/ixgbe/Makefile (revision 222248) +++ sys/modules/ixgbe/Makefile (working copy) @@ -1,6 +1,6 @@ #$FreeBSD$ .PATH: ${.CURDIR}/../../dev/ixgbe -KMOD = ixgbe +KMOD = if_ixgbe SRCS = device_if.h bus_if.h pci_if.h SRCS += ixgbe.c ixv.c # Shared source Index: sys/dev/ixgbe/ixgbe.c =================================================================== --- sys/dev/ixgbe/ixgbe.c (revision 222248) +++ sys/dev/ixgbe/ixgbe.c (working copy) @@ -318,7 +318,7 @@ * ixgbe_probe determines if the driver should be loaded on * adapter based on PCI vendor/device id of the adapter. * - * return 0 on success, positive on failure + * return BUS_PROBE_DEFAULT on success, ENXIO on failure *********************************************************************/ static int @@ -357,7 +357,7 @@ ixgbe_driver_version); device_set_desc_copy(dev, adapter_name); ++ixgbe_total_ports; - return (0); + return (BUS_PROBE_DEFAULT); } ent++; } @@ -383,6 +383,13 @@ u16 csum; u32 ctrl_ext; + /* If device unit is disabled through hints, e.g. + (hint.ix..disabled=1), don't attach it */ + if (resource_disabled(device_get_name(dev), device_get_unit(dev))) { + device_printf(dev, "device is disabled\n"); + return (ENXIO); + } + INIT_DEBUGOUT("ixgbe_attach: begin"); /* Allocate, clear, and link in our adapter structure */ --------------080803000504030803000001-- From owner-freebsd-hackers@FreeBSD.ORG Tue May 24 17:56:53 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 140D1106564A; Tue, 24 May 2011 17:56:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-hackers@FreeBSD.org Date: Tue, 24 May 2011 13:56:43 -0400 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_dF/2NU1LNz9TGHi" Message-Id: <201105241356.45543.jkim@FreeBSD.org> Cc: Andriy Gapon Subject: [RFC] Enabling invariant TSC timecounter on SMP 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, 24 May 2011 17:56:53 -0000 --Boundary-00=_dF/2NU1LNz9TGHi Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline I think it's about time to enable invariant TSC timecounter on SMP by default. Please see the attached patch. It is also available from here: http://people.freebsd.org/~jkim/tsc_smp_test4.diff avg convinced me enough that it should be an opt-out feature going forward. :-) Comments? Cheers, Jung-uk Kim --Boundary-00=_dF/2NU1LNz9TGHi Content-Type: text/plain; charset="iso-8859-1"; name="tsc_smp_test4.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tsc_smp_test4.diff" Index: sys/x86/x86/tsc.c =================================================================== --- sys/x86/x86/tsc.c (revision 222262) +++ sys/x86/x86/tsc.c (working copy) @@ -79,7 +79,8 @@ static void tsc_freq_changed(void *arg, const stru int status); static void tsc_freq_changing(void *arg, const struct cf_level *level, int *status); -static unsigned tsc_get_timecount(struct timecounter *tc); +static unsigned tsc_get_timecount(struct timecounter *tc); +static unsigned tsc_get_timecount_lowres(struct timecounter *tc); static void tsc_levels_changed(void *arg, int unit); static struct timecounter tsc_timecounter = { @@ -385,7 +386,7 @@ test_smp_tsc(void) if (bootverbose) printf("SMP: %sed TSC synchronization test\n", smp_tsc ? "pass" : "fail"); - return (smp_tsc ? 800 : -100); + return (smp_tsc ? (tsc_is_invariant ? 1000 : 800) : -100); } #undef N @@ -395,11 +396,19 @@ test_smp_tsc(void) static void init_TSC_tc(void) { + uint64_t max_freq; + int shift; if ((cpu_feature & CPUID_TSC) == 0 || tsc_disabled) return; /* + * Limit timecounter frequency to fit in an int and prevent it from + * overflowing too fast. + */ + max_freq = UINT_MAX; + + /* * We can not use the TSC if we support APM. Precise timekeeping * on an APM'ed machine is at best a fools pursuit, since * any and all of the time spent in various SMM code can't @@ -421,13 +430,30 @@ init_TSC_tc(void) * We can not use the TSC in SMP mode unless the TSCs on all CPUs are * synchronized. If the user is sure that the system has synchronized * TSCs, set kern.timecounter.smp_tsc tunable to a non-zero value. + * We also limit the frequency even lower to avoid "temporal anomalies" + * as much as possible. */ - if (smp_cpus > 1) + if (smp_cpus > 1) { tsc_timecounter.tc_quality = test_smp_tsc(); + max_freq >>= 8; + } else #endif + if (tsc_is_invariant) + tsc_timecounter.tc_quality = 1000; + init: + for (shift = 0; shift < 32 && (tsc_freq >> shift) > max_freq; shift++) + ; + if (shift > 0) { + tsc_timecounter.tc_get_timecount = tsc_get_timecount_lowres; + tsc_timecounter.tc_name = "TSC-low"; + if (bootverbose) + printf("TSC timecounter discards lower %d bit(s).\n", + shift); + } if (tsc_freq != 0) { - tsc_timecounter.tc_frequency = tsc_freq; + tsc_timecounter.tc_frequency = tsc_freq >> shift; + tsc_timecounter.tc_priv = (void *)(intptr_t)shift; tc_init(&tsc_timecounter); } } @@ -499,7 +525,8 @@ tsc_freq_changed(void *arg, const struct cf_level /* Total setting for this level gives the new frequency in MHz. */ freq = (uint64_t)level->total_set.freq * 1000000; atomic_store_rel_64(&tsc_freq, freq); - atomic_store_rel_64(&tsc_timecounter.tc_frequency, freq); + tsc_timecounter.tc_frequency = + freq >> (int)(intptr_t)tsc_timecounter.tc_priv; } static int @@ -514,7 +541,8 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) error = sysctl_handle_64(oidp, &freq, 0, req); if (error == 0 && req->newptr != NULL) { atomic_store_rel_64(&tsc_freq, freq); - atomic_store_rel_64(&tsc_timecounter.tc_frequency, freq); + tsc_timecounter.tc_frequency = + freq >> (int)(intptr_t)tsc_timecounter.tc_priv; } return (error); } @@ -523,8 +551,15 @@ SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_ 0, 0, sysctl_machdep_tsc_freq, "QU", "Time Stamp Counter frequency"); static u_int -tsc_get_timecount(struct timecounter *tc) +tsc_get_timecount(struct timecounter *tc __unused) { return (rdtsc32()); } + +static u_int +tsc_get_timecount_lowres(struct timecounter *tc) +{ + + return (rdtsc() >> (int)(intptr_t)tc->tc_priv); +} --Boundary-00=_dF/2NU1LNz9TGHi-- From owner-freebsd-hackers@FreeBSD.ORG Tue May 24 21:32:27 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82C68106566B for ; Tue, 24 May 2011 21:32:27 +0000 (UTC) (envelope-from sathler90@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 11FFD8FC0C for ; Tue, 24 May 2011 21:32:26 +0000 (UTC) Received: by fxm11 with SMTP id 11so6965741fxm.13 for ; Tue, 24 May 2011 14:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=VsxTZJ/BGUJfrsm2BZaKrs4R7ENpaiKrd206t4O8i04=; b=rmXj0vdqSPHnfzXkW3FbVeC+q3qHXVPaOH3uRUdCVnRMajup1re05N6ZVUBQwX/3Yo I/fmt8DNte73qKPwT6Nf2/a6kdpBqfYHRYUQlQWjQrWtc6TdUup+6Gt6VVFPX2vexcEN VFBsw7PQYweCkhq78BBzRnAWA6jAmxberzHLA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=MBXuuAhy/8ubT56Krko/EUtUtSY3U3gxLI4y65FHtlNpGpfuRx1CRXqjbbxgslWOjN Gee/qmHrJk6s9jfZy4EQiJa5aErGbzTiNs0KwblGSA7J79jBB5O9avC63qu6doBEOD4y sby3LhEbeb5Wyv144oDqRTwP+h7b2QXpQRWPM= MIME-Version: 1.0 Received: by 10.223.68.193 with SMTP id w1mr4278275fai.42.1306272745840; Tue, 24 May 2011 14:32:25 -0700 (PDT) Received: by 10.223.72.198 with HTTP; Tue, 24 May 2011 14:32:25 -0700 (PDT) In-Reply-To: <4DDA5D5A.4060509@FreeBSD.org> References: <4DDA5D5A.4060509@FreeBSD.org> Date: Tue, 24 May 2011 18:32:25 -0300 Message-ID: From: Eduardo To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: upgrade to version 8 - can not mount root 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, 24 May 2011 21:32:27 -0000 Thanks to all the replies... I did solve this problem by doing a low level format of the disk... I also saw another thread where this bug was reported ... http://www.freebsd.org/cgi/query-pr.cgi?pr=3D130698 I have to find out now, how to indentify this potencial problem on my other servers, so I would know beforehand that a standard upgrade will not work. Cheers. On Mon, May 23, 2011 at 10:12 AM, Andriy Gapon wrote: > on 20/05/2011 20:36 Eduardo said the following: >> da0 at ahc0 bus0 scbus0 target 5 lun 0 >> da0 messages ... >> da0 at ahc0 bus0 scbus0 target 6 lun 0 >> da1 messages ... >> Trying to mount root from ufs:/dev/da0s1a >> ROOT MOUNT ERROR: >> If you have invalid mount options, reboot, and first try the following >> from the loader prompt: >> set vfs.root.mountfrom.options=3Drw >> and then remove invalid mount options from /etc/fstab >> Loader variables: >> vfs.root.mountfrom=3Dufs:/dev/da0s1a >> vfs.root.mountfrom.options=3Drw >> >> Manual root filesystem specification: =A0...etc.. >> >> mountroot> >> >> pani: Root mount failed, startup aborted. >> cpuid=3D0 >> KBD: stack backtrace: >> #0 0xc08ebe67 at kdb_backtrace+0x47 >> #1 0xc08bc627 at panic+0x117 >> #2 0xc0943fc7 at vfs_mountroot+0x4f7 >> #3 0xc08737c0 at start_init+0x60 >> #4 0xc0890f51 at fork_exit+0x91 >> #5 0xc0bd5b84 at fork_trampoline+0x8 >> >> I can boot the old kernel at 7.2 and recompile again with debug flags as= needed. >> >> One thing I did try just now was to install 8.2 from the CD ... after >> I choose install options and he goes to create the filesystems I get >> these error messages: >> >> >> Unable to find device node for /dev/da0s1b in /dev! >> The creation of filesystems will be aborted. > > First, this is not really a question for hackers@. =A0Perhaps stable@, ge= om@ or fs@ > would be better choices. > > To the subject matter, it seems like you could have an MBR that is reject= by code > in in 8. =A0Have you tried to get a lit of devices that kernel sees at th= e mountroot > prompt? =A0What are those? > > It could also be useful to boot from 8 or 9 live disk and examine how the= system > sees your disks. > > -- > Andriy Gapon > From owner-freebsd-hackers@FreeBSD.ORG Wed May 25 11:57:19 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EFD41065677 for ; Wed, 25 May 2011 11:57:19 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 01C878FC15 for ; Wed, 25 May 2011 11:57:18 +0000 (UTC) Received: by wwc33 with SMTP id 33so8045027wwc.31 for ; Wed, 25 May 2011 04:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:from:to:subject:date:content-type :content-transfer-encoding:x-mailer; bh=ynH5D6GL8An/7QsDSMCZj6tPuhLDAdQayOLO1SERWQY=; b=k5ZHwILgkkDFImHQW0spZF3cU2hd/G1Yl6CaUbgXbSQ6ttpjPZCVgJq9d3yfAtsWvn 32yGsPVw/3elBFTvkmMmXHCUVgGXoFy4PVd+ZwoLXcai3ba5DER3AVcElaOV4Q46E24i mZ4qQkbqrUUyoWIKGqxnBtJAqQr5kDJJpbndo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:x-mailer; b=BfW2hTz98fANm5Jx1ChtlV3QqzytJq8eZoxfRMGkxYqT00AteouMgBm5YG6ZfhJOXZ vr07pnPuO5yPJm1lUJaNbZLZPJUSXIZuP5NA3qlek4f9UNNmzIsWHkxKHFi+eollKJQH ehqKX2SKKcI3SwQQe58VACos/pHQa4Re9iqaY= Received: by 10.216.245.4 with SMTP id n4mr4497671wer.83.1306323294592; Wed, 25 May 2011 04:34:54 -0700 (PDT) Received: from DEV ([82.193.208.173]) by mx.google.com with ESMTPS id d13sm308259wbh.1.2011.05.25.04.34.43 (version=SSLv3 cipher=OTHER); Wed, 25 May 2011 04:34:52 -0700 (PDT) Message-ID: <20110525.113441.625.1@DEV> From: rank1seeker@gmail.com To: hackers@freebsd.org Date: Wed, 25 May 2011 13:34:41 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable X-Mailer: POP Peeper (3.7.0.0) Cc: Subject: Linking STAGE 2 boot, directly to the kernel (skipping loader) 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, 25 May 2011 11:57:19 -0000 After I do it via /boot.config, it fails, with an error: "Invalid format", = in cases when:=0D=0A=0D=0Aa) kernel is gzip-ed=0D=0Ab) kernel has = statically compiled md root, which was gzip-ed, before being embedded = into kernel=0D=0Ac) kernel has statically compiled md root, which was = uzip-ed, before being embedded into kernel=0D=0Ad) kernel has statically = compiled md root, which wasn't compress-ed, before being embedded into = kernel=0D=0A=0D=0AIt works, only with regular kernel.=0D=0A=0D=0AIs this = a bug or what?=0D=0AI suspect size of a kernel, confuses STAGE 2 boot, in = non-a) cases.=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6 From owner-freebsd-hackers@FreeBSD.ORG Wed May 25 16:42:22 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8D39106566C; Wed, 25 May 2011 16:42:22 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.freebsd.org (Postfix) with ESMTP id 09D9A8FC16; Wed, 25 May 2011 16:42:20 +0000 (UTC) X-Ambrisko-Me: Yes Received: from server2.ambrisko.com (HELO internal.ambrisko.com) ([192.168.1.2]) by ironport.ambrisko.com with ESMTP; 25 May 2011 09:42:51 -0700 Received: from ambrisko.com (localhost [127.0.0.1]) by internal.ambrisko.com (8.14.4/8.14.4) with ESMTP id p4PGgK99062918; Wed, 25 May 2011 09:42:20 -0700 (PDT) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.14.4/8.14.4/Submit) id p4PGgKWL062917; Wed, 25 May 2011 09:42:20 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <201105251642.p4PGgKWL062917@ambrisko.com> In-Reply-To: <20110520082905.1914751s9bwb2w4x@webmail.leidinger.net> To: Alexander Leidinger Date: Wed, 25 May 2011 09:42:20 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL124d (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Cc: Pawel Jakub Dawidek , Arnaud Lacombe , "freebsd-hackers@freebsd.org" Subject: Re: NFS mount inside jail fails 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, 25 May 2011 16:42:23 -0000 Alexander Leidinger writes: | Quoting Doug Ambrisko (from Thu, 19 May 2011 | 14:38:40 -0700 (PDT)): | | > Alexander Leidinger writes: | > | On Thu, 19 May 2011 10:24:59 -0700 (PDT) Doug Ambrisko | > | wrote: | > | | > | > doesn't have access to it anymore either. Running an X server in a | > | > vimage has some issues. Most are pretty easy to over-come. | > | | > | Are you using my patch | > | (http://www.leidinger.net/FreeBSD/current-patches/0_jail.diff) + a | > | custom devfs.rules to get the 2D part (the last time I tried the DRI | > | part of my patch, it paniced the machine) of the X server working in a | > | jail, or did you come up with something yourself? If it is the later, I | > | would be interested how you did it. | > | > Nope, didn't know about it when I played with it. I should try it. | > I added | > case PRIV_IO: | > return (0); | > | > to kern_jail.c to get X to work. This was with the Intel graphics. | > The main problem I have now is on resume the X server dies and restarts. | > I use xdm. Without jail with vimage then it works okay. | | I use it without vimage in a jail. This is with a radeon card | (corresponding kernel module loaded at boot to get 2D acceleration, as | the X server obviously can not load modules in a jail). | | > My laptop can use either Intel or ATI graphics. I just switched it to | > ATI to see what happens. I should try some more tests. It seems | > my BIOS likes to reset this setting and enable both :-( | > | > I don't seem to have panics. This is with a month or so old -current. | | You do not allow access to the dri device, so I do not expect a panic. | If you give access to the dri device (which can be enabled separately | in my patch), I would not be surprised to see a panic (the last time I | tried it is a year or two ago, I didn't take the time to investigate | why it panics). Okay, I have an update. With Intel graphics and using dri things work better and I don't get panics. I load drm.ko & i915.ko before starting the vimage jail. X sees it and uses it. This solves the suspend/resume issue I had. The dri issue also prevented suspend and resume fail to work in a chroot. I have not tried switching to using the ATI option. On a plus side my laptop is running cooler and faster now. Doug A. From owner-freebsd-hackers@FreeBSD.ORG Wed May 25 17:06:46 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56F4B106566B for ; Wed, 25 May 2011 17:06:46 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id E74488FC0A for ; Wed, 25 May 2011 17:06:43 +0000 (UTC) Received: by wwc33 with SMTP id 33so8379815wwc.31 for ; Wed, 25 May 2011 10:06:42 -0700 (PDT) Received: by 10.227.19.130 with SMTP id a2mr4840836wbb.8.1306341413113; Wed, 25 May 2011 09:36:53 -0700 (PDT) Received: from dfleuriot-at-hi-media.com ([83.167.62.196]) by mx.google.com with ESMTPS id b16sm480502wbh.24.2011.05.25.09.36.51 (version=SSLv3 cipher=OTHER); Wed, 25 May 2011 09:36:52 -0700 (PDT) Message-ID: <4DDD3021.1000109@my.gd> Date: Wed, 25 May 2011 18:36:49 +0200 From: Damien Fleuriot User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: DEBUG - analysing core dumps 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, 25 May 2011 17:06:46 -0000 Hello list, We've got these boxes at work running FreeBSD 8.1-STABLE amd64 and serving as firewalls and openvpn gateways. We use CARP interfaces to provide an active-passive fault tolerant system. Today, we received a nagios alert from the master box saying it's rsyslogd process had crashed. I logged on to it and tried to relaunch it, to no avail: pid 2303 (rsyslogd), uid 0: exited on signal 11 (core dumped) I would like advice on how to debug the output from the core dump. This is what I get from gdb: # gdb GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd". (gdb) core rsyslogd.core Core was generated by `rsyslogd'. Program terminated with signal 11, Segmentation fault. #0 0x00000000004258ec in ?? () Sadly, getting a backtrace with "bt" gives me more lines with "??", which is totally not helpful: [SNIP] #13 0x00007fffff1f9d70 in ?? () #14 0x0000000000000000 in ?? () #15 0x6f70732f7261762f in ?? () #16 0x6c737973722f6c6f in ?? () #17 0x5f6e70766f2f676f in ?? () #18 0x746174732e676f6c in ?? () #19 0x0000000000000065 in ?? () #20 0x0000000000000000 in ?? () [SNIP] I am not sure what steps I should follow to get more information ? Also, I believe that often, core dumps with signal 11 = RAM problems and I would like a confirmation here. I am concerned because rsyslogd is the only process that crashes in this way, even after I rebooted the firewall. Thanks for your input :) -- dfl From owner-freebsd-hackers@FreeBSD.ORG Wed May 25 17:37:23 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39FF91065674 for ; Wed, 25 May 2011 17:37:23 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og124.obsmtp.com (exprod7og124.obsmtp.com [64.18.2.26]) by mx1.freebsd.org (Postfix) with ESMTP id CDEAC8FC16 for ; Wed, 25 May 2011 17:37:21 +0000 (UTC) Received: from P-EMHUB01-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob124.postini.com ([64.18.6.12]) with SMTP ID DSNKTd0+Ud4xSPQMwsltIpfAdNHRb1rEsYPG@postini.com; Wed, 25 May 2011 10:37:22 PDT Received: from p-emfe02-wf.jnpr.net (172.28.145.25) by P-EMHUB01-HQ.jnpr.net (172.24.192.35) with Microsoft SMTP Server (TLS) id 8.2.254.0; Wed, 25 May 2011 10:20:50 -0700 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe02-wf.jnpr.net ([fe80::c126:c633:d2dc:8090%11]) with mapi; Wed, 25 May 2011 13:20:32 -0400 From: Andrew Duane To: Damien Fleuriot , "freebsd-hackers@freebsd.org" Date: Wed, 25 May 2011 13:20:31 -0400 Thread-Topic: DEBUG - analysing core dumps Thread-Index: Acwa/kwIf9affM/zTs+DD5wIW9BhEQAASQFg Message-ID: References: <4DDD3021.1000109@my.gd> In-Reply-To: <4DDD3021.1000109@my.gd> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Subject: RE: DEBUG - analysing core dumps 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, 25 May 2011 17:37:23 -0000 Damien Fleuriot wrote: > Hello list, >=20 >=20 >=20 > We've got these boxes at work running FreeBSD 8.1-STABLE amd64 and > serving as firewalls and openvpn gateways. >=20 > We use CARP interfaces to provide an active-passive fault tolerant > system.=20 >=20 >=20 > Today, we received a nagios alert from the master box saying it's > rsyslogd process had crashed. >=20 > I logged on to it and tried to relaunch it, to no avail: > pid 2303 (rsyslogd), uid 0: exited on signal 11 (core dumped) >=20 >=20 >=20 >=20 > I would like advice on how to debug the output from the core dump. >=20 > This is what I get from gdb: >=20 > # gdb > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and > you are welcome to change it and/or distribute copies of it under > certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details. This GDB was configured as "amd64-marcel-freebsd". > (gdb) core rsyslogd.core > Core was generated by `rsyslogd'. > Program terminated with signal 11, Segmentation fault. > #0 0x00000000004258ec in ?? () >=20 >=20 > Sadly, getting a backtrace with "bt" gives me more lines with "??", > which is totally not helpful: > [SNIP] > #13 0x00007fffff1f9d70 in ?? () > #14 0x0000000000000000 in ?? () > #15 0x6f70732f7261762f in ?? () > #16 0x6c737973722f6c6f in ?? () > #17 0x5f6e70766f2f676f in ?? () > #18 0x746174732e676f6c in ?? () > #19 0x0000000000000065 in ?? () > #20 0x0000000000000000 in ?? () > [SNIP] >=20 > I am not sure what steps I should follow to get more information ? >=20 >=20 >=20 > Also, I believe that often, core dumps with signal 11 =3D RAM problems > and I would like a confirmation here. >=20 > I am concerned because rsyslogd is the only process that crashes in > this way, even after I rebooted the firewall. >=20 > Thanks for your input :) For what it's worth, the addresses shown in frames 15, 16, 17, and 18 are A= SCII: ops/rav/ lsysr/lo _npvo/go tats.gol /Andrew From owner-freebsd-hackers@FreeBSD.ORG Wed May 25 17:38:35 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 107821065673 for ; Wed, 25 May 2011 17:38:35 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [91.121.44.19]) by mx1.freebsd.org (Postfix) with ESMTP id C9C6E8FC13 for ; Wed, 25 May 2011 17:38:34 +0000 (UTC) Received: from baby-jane.lamaiziere.net (6.176.97.84.rev.sfr.net [84.97.176.6]) by smtp.lamaiziere.net (Postfix) with ESMTPA id 46290633207 for ; Wed, 25 May 2011 19:20:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by baby-jane.lamaiziere.net (Postfix) with ESMTP id 8955F7324E for ; Wed, 25 May 2011 19:20:33 +0200 (CEST) Date: Wed, 25 May 2011 19:20:32 +0200 From: Patrick Lamaiziere To: freebsd-hackers@freebsd.org Message-ID: <20110525192032.63751cbf@davenulle.org> In-Reply-To: <4DDD3021.1000109@my.gd> References: <4DDD3021.1000109@my.gd> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.1; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: DEBUG - analysing core dumps 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, 25 May 2011 17:38:35 -0000 Le Wed, 25 May 2011 18:36:49 +0200, Damien Fleuriot a écrit : Hello, > Sadly, getting a backtrace with "bt" gives me more lines with "??", > which is totally not helpful: > [SNIP] > #13 0x00007fffff1f9d70 in ?? () > #14 0x0000000000000000 in ?? () > #15 0x6f70732f7261762f in ?? () > #16 0x6c737973722f6c6f in ?? () > #17 0x5f6e70766f2f676f in ?? () > #18 0x746174732e676f6c in ?? () > #19 0x0000000000000065 in ?? () > #20 0x0000000000000000 in ?? () > [SNIP] > > I am not sure what steps I should follow to get more information ? You have to build the binary with debug symbols included. The rsyslog port provides an option for this. Did you see this notice in the port's makefile? " # XXX: 5.5.6+ seem to crash frequently with low-mid load # on FreeBSD, temporailiy enable debugging by default. # Now we can send gdb backtraces into the list: # rsyslog-users OPTIONS= DEBUG "Enable debugging" on " Good luck... Regards. From owner-freebsd-hackers@FreeBSD.ORG Wed May 25 18:04:54 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D361106566C for ; Wed, 25 May 2011 18:04:54 +0000 (UTC) (envelope-from dhartmei@insomnia.benzedrine.cx) Received: from insomnia.benzedrine.cx (106-30.3-213.fix.bluewin.ch [213.3.30.106]) by mx1.freebsd.org (Postfix) with ESMTP id 57A488FC1C for ; Wed, 25 May 2011 18:04:52 +0000 (UTC) Received: from insomnia.benzedrine.cx (localhost.benzedrine.cx [127.0.0.1]) by insomnia.benzedrine.cx (8.14.1/8.13.4) with ESMTP id p4PHigsd005532 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Wed, 25 May 2011 19:44:42 +0200 (MEST) Received: (from dhartmei@localhost) by insomnia.benzedrine.cx (8.14.1/8.12.10/Submit) id p4PHig9t016998; Wed, 25 May 2011 19:44:42 +0200 (MEST) Date: Wed, 25 May 2011 19:44:42 +0200 From: Daniel Hartmeier To: Damien Fleuriot Message-ID: <20110525174442.GA29057@insomnia.benzedrine.cx> References: <4DDD3021.1000109@my.gd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DDD3021.1000109@my.gd> User-Agent: Mutt/1.5.12-2006-07-14 Cc: freebsd-hackers@freebsd.org Subject: Re: DEBUG - analysing core dumps 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, 25 May 2011 18:04:54 -0000 On Wed, May 25, 2011 at 06:36:49PM +0200, Damien Fleuriot wrote: > I am not sure what steps I should follow to get more information ? Rebuild the port with debug information, as in # cd /usr/ports/sysutils/rsyslog4 # WITH_DEBUG=1 make package And install that on the target host. Then repeat the gdb backtrace. If you are using disk spool files, try removing them before the start, I've seen rsyslogd die like that due to corrupted spool files... HTH, Daniel From owner-freebsd-hackers@FreeBSD.ORG Wed May 25 18:09:35 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 202191065780 for ; Wed, 25 May 2011 18:09:35 +0000 (UTC) (envelope-from krivenok.dmitry@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id A5AB28FC08 for ; Wed, 25 May 2011 18:09:34 +0000 (UTC) Received: by bwz12 with SMTP id 12so4793bwz.13 for ; Wed, 25 May 2011 11:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=I+naTFv6agjzko8c4rirPq14gxz0DSd3OnJg1nhCqPA=; b=lBY2Gxsv+2M0sOUja51QvZU8icGT2l81vXlQ8CNRZcU+2lhPBPEO5gPYz3nw83FMY6 Dfj0k0r5k3XYTJBrv7LAJFeDPcy8d5KqKROr9hO5Sdo/N5yhDGKhN7kKgvcTkEXGCPtk v4kVaS0YzGtgwUe0ae//FHTYJmbn2RWxVnNoA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=d7yzo00dfF16eF2j5WIf5j6DnihkMPNNd5i5cdDr54z6CXfYWqRA5R5wtbhiQ+4GNt ZZBijmSMJiUb8cFIMTD1M+TqDFgL8oeNGscUsp1yk7wWE3E1dOWIJYeqXAIt3sYg3qAS NMmIcKcakLH14+r7/Yh3ERNxSUkqMPO3NB6xg= MIME-Version: 1.0 Received: by 10.204.151.202 with SMTP id d10mr4403969bkw.168.1306345649396; Wed, 25 May 2011 10:47:29 -0700 (PDT) Received: by 10.204.85.100 with HTTP; Wed, 25 May 2011 10:47:29 -0700 (PDT) Date: Wed, 25 May 2011 21:47:29 +0400 Message-ID: From: Dmitry Krivenok To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Possible bug in gdb-6.1.1 (it leaves zombie processes) 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, 25 May 2011 18:09:35 -0000 Hello hackers, I think I found a bug in base gdb-6.1.1 on FreeBSD-8.2. Below is how you can reproduce it. I run "sleep 10" command under control of gdb-6.1.1 as follows $ gdb --args sleep 10 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)... (gdb) r Starting program: /bin/sleep 10 (no debugging symbols found)...(no debugging symbols found)... Program exited normally. (gdb) q $ During execution of sleep I saw: $ ps auxw | grep sleep krived 2951 0.0 1.1 15836 5520 0 S 4:14PM 0:00.04 gdb --args sleep 10 krived 2952 0.0 0.2 2764 840 0 SX+ 4:14PM 0:00.01 /bin/sleep 10 $ As expected, once sleep exited and got $ ps auxw | grep sleep krived 2951 0.0 1.1 15836 5520 0 S+ 4:14PM 0:00.04 gdb --args sleep 10 $ However, I found that sleep process became a zombie: $ ps auxw | grep 2952 krived 2952 0.0 0.0 0 0 0 Z 4:14PM 0:00.01 $ Then I closed gdb and zombie process went away: $ ps auxw | grep 2952 $ I did a quick search through the Google and found that other people also encountered this problem before: https://bugzilla.redhat.com/show_bug.cgi?id=243845 I tried the same test with gdb-7.2 installed from ports and there was no zombie process. I didn't find any reports on this problem in PR database. Can this problem be classified as a bug in base gdb-6.1.1? Thanks! From owner-freebsd-hackers@FreeBSD.ORG Wed May 25 18:20:07 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D6911065687 for ; Wed, 25 May 2011 18:20:07 +0000 (UTC) (envelope-from krivenok.dmitry@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1638FC08 for ; Wed, 25 May 2011 18:20:06 +0000 (UTC) Received: by bwz12 with SMTP id 12so15931bwz.13 for ; Wed, 25 May 2011 11:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=wNVPlgkORP8GPLvU5a1Ch5i545Xd5swGhJ/GxZtJGto=; b=uWooP3CXERMQmgyP6ojPdnTiJiCz5IxDTDynWAlqQ3vZbCYPbdpNO8S0kB0Bisnd3D bmIXEs40qfmB2ksdbgSWBU3FOOJhnNFkHzD8woodzBgUjImRJUFC743t99rgYgLVXB5w 2dy45j9TCV8/X3UCueytQzIGmr1mEliS/V3rc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=O6GbFgxAtWeYkQqXwqtlce/Pmrn7FRoAxAKQOH3jY8R+Ts1nypIX47h3+PDf+Fqib0 2NYGjsOID3fxR4lvEZhbO/u5X/wrfq6SbQ04OPENqKw/194aMel7qPczL2uOQpBepMj9 Bq5AxEqAGxHvqa1QNXMIejmTDs12zBBeBAikA= MIME-Version: 1.0 Received: by 10.204.41.206 with SMTP id p14mr1277753bke.53.1306345829294; Wed, 25 May 2011 10:50:29 -0700 (PDT) Received: by 10.204.85.100 with HTTP; Wed, 25 May 2011 10:50:29 -0700 (PDT) Date: Wed, 25 May 2011 21:50:29 +0400 Message-ID: From: Dmitry Krivenok To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread) 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, 25 May 2011 18:20:07 -0000 Hello, I wrote very simple Pthreads program to demonstrate the problem with gdb-7.2 installed from ports on my FreeBSD-8.2 (amd64). /////////////////////////////////////////////////////////////////////////////// #include #include #include void* run(void* arg) { return 0; } int main(int argc, char** argv) { pthread_t tid; int r; r = pthread_create(&tid, NULL, &run, NULL); assert(!r); r = pthread_join(tid, NULL); assert(!r); return 0; } /////////////////////////////////////////////////////////////////////////////// I compiled it as follows $ gcc -Wall -g -O0 -pthread -o t t.c $ and then run under base gdb-6.1.1 $ gdb --args t GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... (gdb) r Starting program: /big/work/coverage/csxroot/src/t/t [New LWP 100071] [New Thread 800a041c0 (LWP 100071)] [New Thread 800a0ae40 (LWP 100170)] [Thread 800a0ae40 (LWP 100170) exited] Program exited normally. (gdb) q $ As you can see program exited normally w/o any errors. Then I run the same program under gdb-7.2 $ /usr/local/bin/gdb72 --args t GNU gdb (GDB) 7.2 [GDB v7.2 for FreeBSD] Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd8.2". For bug reporting instructions, please see: ... Reading symbols from /big/work/coverage/csxroot/src/t/t...done. (gdb) r Starting program: /big/work/coverage/csxroot/src/t/t [New LWP 100162] [New Thread 800a041c0 (LWP 100162)] [New Thread 800a0ae40 (LWP 100171)] [Thread 800a0ae40 (LWP 100171) exited] Invalid selected thread. (gdb) q A debugging session is active. Inferior 1 [process 7756] will be killed. Quit anyway? (y or n) y $ In this case I got "Invalid selected thread." right after the thread has exited. Looks like gdb is unable to switch to another thread. What's wrong here? Thanks! -- Sincerely yours, Dmitry V. Krivenok e-mail: krivenok.dmitry@gmail.com skype: krivenok_dmitry jabber: krivenok_dmitry@jabber.ru icq: 242-526-443 From owner-freebsd-hackers@FreeBSD.ORG Thu May 26 00:35:43 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B906106566B for ; Thu, 26 May 2011 00:35:43 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 2FC038FC12 for ; Thu, 26 May 2011 00:35:42 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QPOYA-0000hP-1j for freebsd-hackers@freebsd.org; Thu, 26 May 2011 02:35:42 +0200 Received: from 189.61.203.226 ([189.61.203.226]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 May 2011 02:35:41 +0200 Received: from kubito by 189.61.203.226 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 May 2011 02:35:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Raphael Kubo da Costa Date: Wed, 25 May 2011 21:35:28 -0300 Lines: 56 Message-ID: <87pqn6jo33.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 189.61.203.226 User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (berkeley-unix) Cancel-Lock: sha1:kK1FBSdTPodqu6HQqGtUAD0Zn8s= Subject: Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread) 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, 26 May 2011 00:35:43 -0000 Dmitry Krivenok writes: > As you can see program exited normally w/o any errors. > Then I run the same program under gdb-7.2 > > $ /usr/local/bin/gdb72 --args t > GNU gdb (GDB) 7.2 [GDB v7.2 for FreeBSD] > Copyright (C) 2010 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "x86_64-portbld-freebsd8.2". > For bug reporting instructions, please see: > ... > Reading symbols from /big/work/coverage/csxroot/src/t/t...done. > (gdb) r > Starting program: /big/work/coverage/csxroot/src/t/t > [New LWP 100162] > [New Thread 800a041c0 (LWP 100162)] > [New Thread 800a0ae40 (LWP 100171)] > [Thread 800a0ae40 (LWP 100171) exited] > Invalid selected thread. > (gdb) q > A debugging session is active. > > Inferior 1 [process 7756] will be killed. > > Quit anyway? (y or n) y > $ > > In this case I got "Invalid selected thread." right after the thread has exited. > Looks like gdb is unable to switch to another thread. In my case, I get the following error when running your program (and many others) with the gdb72 package (installed via portmaster -PP devel/gdb): (gdb) r Starting program: /tmp/test-base [New LWP 100315] Cannot get thread info, Thread ID=100315, generic error (gdb) q A debugging session is active. Inferior 1 [process 84832] will be killed. Quit anyway? (y or n) y If I compile the port myself, I can't run any binary (PR ports/152896, which has been unanswered despite my efforts): Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't do that. Symbol format `elf64-x86-64-freebsd' unknown. This is 8.2-STABLE. From owner-freebsd-hackers@FreeBSD.ORG Thu May 26 07:37:18 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9E71106564A; Thu, 26 May 2011 07:37:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D6F1B8FC13; Thu, 26 May 2011 07:37:17 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA15205; Thu, 26 May 2011 10:37:14 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1QPV86-000DcA-Iq; Thu, 26 May 2011 10:37:14 +0300 Message-ID: <4DDE0329.9030208@FreeBSD.org> Date: Thu, 26 May 2011 10:37:13 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110503 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Raphael Kubo da Costa , John Baldwin References: <87pqn6jo33.fsf@gmail.com> In-Reply-To: <87pqn6jo33.fsf@gmail.com> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread) 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, 26 May 2011 07:37:18 -0000 on 26/05/2011 03:35 Raphael Kubo da Costa said the following: > If I compile the port myself, I can't run any binary (PR ports/152896, > which has been unanswered despite my efforts): > > Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't > do that. Symbol format `elf64-x86-64-freebsd' unknown. > This is a somewhat known issue that John was going to fix a while ago. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu May 26 07:51:27 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F038106566B for ; Thu, 26 May 2011 07:51:27 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id F1C598FC13 for ; Thu, 26 May 2011 07:51:26 +0000 (UTC) Received: by wwc33 with SMTP id 33so397956wwc.31 for ; Thu, 26 May 2011 00:51:25 -0700 (PDT) Received: by 10.227.5.210 with SMTP id 18mr521085wbw.18.1306396285827; Thu, 26 May 2011 00:51:25 -0700 (PDT) Received: from dfleuriot.technique-admin.paris.hi-media-techno.com ([83.167.62.196]) by mx.google.com with ESMTPS id en1sm279825wbb.18.2011.05.26.00.51.24 (version=SSLv3 cipher=OTHER); Thu, 26 May 2011 00:51:24 -0700 (PDT) Message-ID: <4DDE067B.7080605@my.gd> Date: Thu, 26 May 2011 09:51:23 +0200 From: Damien Fleuriot User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4DDD3021.1000109@my.gd> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: DEBUG - analysing core dumps 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, 26 May 2011 07:51:27 -0000 On 5/25/11 7:10 PM, Garrett Cooper wrote: > On Wed, May 25, 2011 at 9:36 AM, Damien Fleuriot wrote: >> Hello list, >> >> >> >> We've got these boxes at work running FreeBSD 8.1-STABLE amd64 and >> serving as firewalls and openvpn gateways. >> >> We use CARP interfaces to provide an active-passive fault tolerant system. >> >> >> Today, we received a nagios alert from the master box saying it's >> rsyslogd process had crashed. >> >> I logged on to it and tried to relaunch it, to no avail: >> pid 2303 (rsyslogd), uid 0: exited on signal 11 (core dumped) >> >> >> >> >> I would like advice on how to debug the output from the core dump. >> >> This is what I get from gdb: >> >> # gdb >> GNU gdb 6.1.1 [FreeBSD] >> Copyright 2004 Free Software Foundation, Inc. >> GDB is free software, covered by the GNU General Public License, and you are >> welcome to change it and/or distribute copies of it under certain >> conditions. >> Type "show copying" to see the conditions. >> There is absolutely no warranty for GDB. Type "show warranty" for details. >> This GDB was configured as "amd64-marcel-freebsd". >> (gdb) core rsyslogd.core >> Core was generated by `rsyslogd'. >> Program terminated with signal 11, Segmentation fault. >> #0 0x00000000004258ec in ?? () >> >> >> >> >> Sadly, getting a backtrace with "bt" gives me more lines with "??", >> which is totally not helpful: >> [SNIP] >> #13 0x00007fffff1f9d70 in ?? () >> #14 0x0000000000000000 in ?? () >> #15 0x6f70732f7261762f in ?? () >> #16 0x6c737973722f6c6f in ?? () >> #17 0x5f6e70766f2f676f in ?? () >> #18 0x746174732e676f6c in ?? () >> #19 0x0000000000000065 in ?? () >> #20 0x0000000000000000 in ?? () >> [SNIP] >> >> I am not sure what steps I should follow to get more information ? >> >> >> >> Also, I believe that often, core dumps with signal 11 = RAM problems and >> I would like a confirmation here. >> >> I am concerned because rsyslogd is the only process that crashes in this >> way, even after I rebooted the firewall. > > Rebuild and reinstall rsyslogd with debug symbols and see if you > can get a reasonable stack trace. Something else to try before that to > narrow down the problem section of code is ktrace/kdump it, or truss > it, and see if it's trying to open/read from a file and failing. > Thanks, > -Garrett Thanks everyone for your answers, I'll recompile with DEBUG and obtain a new core dump. I'll also investigate the possibility of corrupted spool files and post the resolution here :) -- dfl From owner-freebsd-hackers@FreeBSD.ORG Thu May 26 09:29:15 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52F261065673 for ; Thu, 26 May 2011 09:29:15 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 137C58FC1A for ; Thu, 26 May 2011 09:29:12 +0000 (UTC) Received: by vws18 with SMTP id 18so530444vws.13 for ; Thu, 26 May 2011 02:29:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.98.71 with SMTP id eg7mr867605vdb.47.1306402152393; Thu, 26 May 2011 02:29:12 -0700 (PDT) Received: by 10.52.159.133 with HTTP; Thu, 26 May 2011 02:29:12 -0700 (PDT) In-Reply-To: <4DDE067B.7080605@my.gd> References: <4DDD3021.1000109@my.gd> <4DDE067B.7080605@my.gd> Date: Thu, 26 May 2011 11:29:12 +0200 Message-ID: From: Damien Fleuriot To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: DEBUG - analysing core dumps 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, 26 May 2011 09:29:15 -0000 On 26 May 2011 09:51, Damien Fleuriot wrote: > > > On 5/25/11 7:10 PM, Garrett Cooper wrote: >> On Wed, May 25, 2011 at 9:36 AM, Damien Fleuriot wrote: >>> Hello list, >>> >>> >>> >>> We've got these boxes at work running FreeBSD 8.1-STABLE amd64 and >>> serving as firewalls and openvpn gateways. >>> >>> We use CARP interfaces to provide an active-passive fault tolerant syst= em. >>> >>> >>> Today, we received a nagios alert from the master box saying it's >>> rsyslogd process had crashed. >>> >>> I logged on to it and tried to relaunch it, to no avail: >>> pid 2303 (rsyslogd), uid 0: exited on signal 11 (core dumped) >>> >>> >>> >>> >>> I would like advice on how to debug the output from the core dump. >>> >>> This is what I get from gdb: >>> >>> # gdb >>> GNU gdb 6.1.1 [FreeBSD] >>> Copyright 2004 Free Software Foundation, Inc. >>> GDB is free software, covered by the GNU General Public License, and yo= u are >>> welcome to change it and/or distribute copies of it under certain >>> conditions. >>> Type "show copying" to see the conditions. >>> There is absolutely no warranty for GDB. =A0Type "show warranty" for de= tails. >>> This GDB was configured as "amd64-marcel-freebsd". >>> (gdb) core rsyslogd.core >>> Core was generated by `rsyslogd'. >>> Program terminated with signal 11, Segmentation fault. >>> #0 =A00x00000000004258ec in ?? () >>> >>> >>> >>> >>> Sadly, getting a backtrace with "bt" gives me more lines with "??", >>> which is totally not helpful: >>> [SNIP] >>> #13 0x00007fffff1f9d70 in ?? () >>> #14 0x0000000000000000 in ?? () >>> #15 0x6f70732f7261762f in ?? () >>> #16 0x6c737973722f6c6f in ?? () >>> #17 0x5f6e70766f2f676f in ?? () >>> #18 0x746174732e676f6c in ?? () >>> #19 0x0000000000000065 in ?? () >>> #20 0x0000000000000000 in ?? () >>> [SNIP] >>> >>> I am not sure what steps I should follow to get more information ? >>> >>> >>> >>> Also, I believe that often, core dumps with signal 11 =3D RAM problems = and >>> I would like a confirmation here. >>> >>> I am concerned because rsyslogd is the only process that crashes in thi= s >>> way, even after I rebooted the firewall. >> >> =A0 =A0 Rebuild and reinstall rsyslogd with debug symbols and see if you >> can get a reasonable stack trace. Something else to try before that to >> narrow down the problem section of code is ktrace/kdump it, or truss >> it, and see if it's trying to open/read from a file and failing. >> Thanks, >> -Garrett > > > > > Thanks everyone for your answers, I'll recompile with DEBUG and obtain a > new core dump. > > I'll also investigate the possibility of corrupted spool files and post > the resolution here :) > > > -- > dfl > Turns out that after rebuilding rsyslog4-relp with -DWITH_DEBUG , the new daemon works just fine and doesn't sig11 anymore. Odd, but well, solves my problem. I will upgrade it on all the other boxes then. Thanks for the help guys -- dfl From owner-freebsd-hackers@FreeBSD.ORG Thu May 26 07:08:34 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C586106566B for ; Thu, 26 May 2011 07:08:34 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id B6C8A8FC14 for ; Thu, 26 May 2011 07:08:33 +0000 (UTC) Received: from outgoing.leidinger.net (p5B155E9A.dip.t-dialin.net [91.21.94.154]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 0E631844015; Thu, 26 May 2011 09:08:20 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [IPv6:fd73:10c7:2053:1::3:102]) by outgoing.leidinger.net (Postfix) with ESMTP id 560DB2CCD; Thu, 26 May 2011 09:08:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1306393697; bh=WHq7JNtZ/UdsvQdxP1Mv2Z3wxIK2HWsVwmguU+2f53w=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=e1U/6JRFtw2E3Y4Mp//1hh7XPP3PXbWGn7JHk54pKQ1cd4Y3XKPQg0OfS2iQyJ3sH FPNn1JM86DyxiOeHHabWDtDUUAB0UGy1imC6R7Cfk4YcIbtFg7rZM/7jD4KFZxoldI Ag8fxORbRHH3cUeUACC4P2VkiRj84oqxebV/0XpMAmvTO7lLnwrPQ1iBfnDUMpijPX oZmuwqA5uIYleIA2eYVIyuoGTUlMgpooheumSOkyvQFGkWC1x9lTh6NGO86OMnvcqm mpKJXgjofu7+zd4uDPb36aCjATAhHM5TypX3j3uZCaljQsN5I6Lbhsm2rcgkXS3dKc YxOS77iInJ0LA== Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.14.4/Submit) id p4Q78G2T062220; Thu, 26 May 2011 09:08:16 +0200 (CEST) (envelope-from Alexander@Leidinger.net) X-Authentication-Warning: webmail.leidinger.net: www set sender to Alexander@Leidinger.net using -f Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Thu, 26 May 2011 09:08:16 +0200 Message-ID: <20110526090816.21102eh1d7ighug0@webmail.leidinger.net> Date: Thu, 26 May 2011 09:08:16 +0200 From: Alexander Leidinger To: Doug Ambrisko References: <201105251642.p4PGgKWL062917@ambrisko.com> In-Reply-To: <201105251642.p4PGgKWL062917@ambrisko.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.6) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 0E631844015.A1645 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=1.177, required 6, autolearn=disabled, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, J_CHICKENPOX_32 0.60, J_CHICKENPOX_55 0.60, TW_GL 0.08) X-EBL-MailScanner-SpamScore: s X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1306998500.56351@vbUklB1q6hTxJF5KlaiWeg X-EBL-Spam-Status: No X-Mailman-Approved-At: Thu, 26 May 2011 11:08:32 +0000 Cc: "freebsd-hackers@freebsd.org" , jails@freebsd.org Subject: X11 in a jail (was: Re: NFS mount inside jail fails) 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, 26 May 2011 07:08:34 -0000 Quoting Doug Ambrisko (from Wed, 25 May 2011 09:42:20 -0700 (PDT)): CCing jails@ > Alexander Leidinger writes: > | Quoting Doug Ambrisko (from Thu, 19 May 2011 > | 14:38:40 -0700 (PDT)): > | > | > Alexander Leidinger writes: > | > | On Thu, 19 May 2011 10:24:59 -0700 (PDT) Doug Ambrisko > | > | wrote: > | > | > | > | > doesn't have access to it anymore either. Running an X server in a > | > | > vimage has some issues. Most are pretty easy to over-come. > | > | > | > | Are you using my patch > | > | (http://www.leidinger.net/FreeBSD/current-patches/0_jail.diff) + a > | > | custom devfs.rules to get the 2D part (the last time I tried the DRI > | > | part of my patch, it paniced the machine) of the X server working in a > | > | jail, or did you come up with something yourself? If it is the later, I > | > | would be interested how you did it. > | > > | > Nope, didn't know about it when I played with it. I should try it. > | > I added > | > case PRIV_IO: > | > return (0); > | > > | > to kern_jail.c to get X to work. This was with the Intel graphics. > | > The main problem I have now is on resume the X server dies and restarts. > | > I use xdm. Without jail with vimage then it works okay. > | > | I use it without vimage in a jail. This is with a radeon card > | (corresponding kernel module loaded at boot to get 2D acceleration, as > | the X server obviously can not load modules in a jail). > | > | > My laptop can use either Intel or ATI graphics. I just switched it to > | > ATI to see what happens. I should try some more tests. It seems > | > my BIOS likes to reset this setting and enable both :-( > | > > | > I don't seem to have panics. This is with a month or so old -current. > | > | You do not allow access to the dri device, so I do not expect a panic. > | If you give access to the dri device (which can be enabled separately > | in my patch), I would not be surprised to see a panic (the last time I > | tried it is a year or two ago, I didn't take the time to investigate > | why it panics). > > Okay, I have an update. With Intel graphics and using dri things > work better and I don't get panics. I load drm.ko & i915.ko before Just to make sure we talk about the same things: Did you configure the X server to use 3D (dri and glx in the modules section, dri section in the X11 config, dri device visible in devfs)? xdriinfo shows some valid hardware acceleration? If yes, I definitively have to test the 3D part again with my radeon (with a normal jail and with a vimage jail in case the normal jail fails). > starting the vimage jail. X sees it and uses it. This solves the > suspend/resume issue I had. The dri issue also prevented suspend and > resume fail to work in a chroot. > > I have not tried switching to using the ATI option. On a plus side > my laptop is running cooler and faster now. If you didn't had loaded i915.ko before, you have at least 2D accel now, and probably the power management of the chip got activated too. Bye, Alexander. -- Hope that the day after you die is a nice day. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-hackers@FreeBSD.ORG Thu May 26 13:30:37 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 039881065672 for ; Thu, 26 May 2011 13:30:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id CE08F8FC0A for ; Thu, 26 May 2011 13:30:36 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 846DE46B0A; Thu, 26 May 2011 09:30:36 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 226F78A04F; Thu, 26 May 2011 09:30:36 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 26 May 2011 09:27:24 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <87pqn6jo33.fsf@gmail.com> In-Reply-To: <87pqn6jo33.fsf@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201105260927.24922.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 26 May 2011 09:30:36 -0400 (EDT) Cc: Raphael Kubo da Costa Subject: Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread) 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, 26 May 2011 13:30:37 -0000 On Wednesday, May 25, 2011 8:35:28 pm Raphael Kubo da Costa wrote: > Dmitry Krivenok writes: > > > As you can see program exited normally w/o any errors. > > Then I run the same program under gdb-7.2 > > > > $ /usr/local/bin/gdb72 --args t > > GNU gdb (GDB) 7.2 [GDB v7.2 for FreeBSD] > > Copyright (C) 2010 Free Software Foundation, Inc. > > License GPLv3+: GNU GPL version 3 or later > > This is free software: you are free to change and redistribute it. > > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > > and "show warranty" for details. > > This GDB was configured as "x86_64-portbld-freebsd8.2". > > For bug reporting instructions, please see: > > ... > > Reading symbols from /big/work/coverage/csxroot/src/t/t...done. > > (gdb) r > > Starting program: /big/work/coverage/csxroot/src/t/t > > [New LWP 100162] > > [New Thread 800a041c0 (LWP 100162)] > > [New Thread 800a0ae40 (LWP 100171)] > > [Thread 800a0ae40 (LWP 100171) exited] > > Invalid selected thread. > > (gdb) q > > A debugging session is active. > > > > Inferior 1 [process 7756] will be killed. > > > > Quit anyway? (y or n) y > > $ > > > > In this case I got "Invalid selected thread." right after the thread has exited. > > Looks like gdb is unable to switch to another thread. > > In my case, I get the following error when running your program (and > many others) with the gdb72 package (installed via portmaster -PP > devel/gdb): > > (gdb) r > Starting program: /tmp/test-base > [New LWP 100315] > Cannot get thread info, Thread ID=100315, generic error > (gdb) q > A debugging session is active. > > Inferior 1 [process 84832] will be killed. > > Quit anyway? (y or n) y > > If I compile the port myself, I can't run any binary (PR ports/152896, > which has been unanswered despite my efforts): > > Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't > do that. Symbol format `elf64-x86-64-freebsd' unknown. You need to unininstall libreadline, or turn off the hack to try to use libreadline from ports. There is no easy way to fix the gdb build to use /usr/local only for the bits that need readline and not have it use the wrong binutils headers from /usr/local as well. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu May 26 13:33:20 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68CBF1065675; Thu, 26 May 2011 13:33:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3E52B8FC16; Thu, 26 May 2011 13:33:20 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id E6CA746B0A; Thu, 26 May 2011 09:33:19 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 836228A050; Thu, 26 May 2011 09:33:19 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Thu, 26 May 2011 09:33:19 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <87pqn6jo33.fsf@gmail.com> <4DDE0329.9030208@FreeBSD.org> In-Reply-To: <4DDE0329.9030208@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="koi8-u" Content-Transfer-Encoding: 7bit Message-Id: <201105260933.19077.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 26 May 2011 09:33:19 -0400 (EDT) Cc: freebsd-hackers@freebsd.org, Raphael Kubo da Costa Subject: Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread) 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, 26 May 2011 13:33:20 -0000 On Thursday, May 26, 2011 3:37:13 am Andriy Gapon wrote: > on 26/05/2011 03:35 Raphael Kubo da Costa said the following: > > If I compile the port myself, I can't run any binary (PR ports/152896, > > which has been unanswered despite my efforts): > > > > Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't > > do that. Symbol format `elf64-x86-64-freebsd' unknown. > > > > This is a somewhat known issue that John was going to fix a while ago. Actually, it's not really fixable if you have libreadline installed from ports and binutils installed from ports. I'd like to just remove the hack to use libreadline from ports if possible. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu May 26 13:36:37 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D78B106564A; Thu, 26 May 2011 13:36:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 780428FC0C; Thu, 26 May 2011 13:36:36 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA20839; Thu, 26 May 2011 16:36:35 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4DDE5762.8060901@FreeBSD.org> Date: Thu, 26 May 2011 16:36:34 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110504 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: John Baldwin References: <87pqn6jo33.fsf@gmail.com> <4DDE0329.9030208@FreeBSD.org> <201105260933.19077.jhb@freebsd.org> In-Reply-To: <201105260933.19077.jhb@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, Raphael Kubo da Costa Subject: Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread) 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, 26 May 2011 13:36:37 -0000 on 26/05/2011 16:33 John Baldwin said the following: > On Thursday, May 26, 2011 3:37:13 am Andriy Gapon wrote: >> on 26/05/2011 03:35 Raphael Kubo da Costa said the following: >>> If I compile the port myself, I can't run any binary (PR ports/152896, >>> which has been unanswered despite my efforts): >>> >>> Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't >>> do that. Symbol format `elf64-x86-64-freebsd' unknown. >>> >> >> This is a somewhat known issue that John was going to fix a while ago. > > Actually, it's not really fixable if you have libreadline installed from ports > and binutils installed from ports. I'd like to just remove the hack to use > libreadline from ports if possible. I referred to this option as a fix. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu May 26 16:57:07 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89F87106566B for ; Thu, 26 May 2011 16:57:07 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 176618FC21 for ; Thu, 26 May 2011 16:57:06 +0000 (UTC) Received: by wwc33 with SMTP id 33so949319wwc.31 for ; Thu, 26 May 2011 09:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=kYIcZZk8XZCSwUeN58ksypFqDg4haQamhsM2pnpQDm8=; b=G1pN12ii8QyWnJgyxxTbpTTlA0lWKiNvZ1YHzos7z/DF2tZim/tHhu5cCZb4egUvS+ RFCjDeTMOOLr9Tnviyz8DLlEtPqo2WyTgUhNJrvrKgeItHnGv+0Ed0aLsSRYKJHxnoRQ 0cZlx9ccdSPVehHq1PqoDG13ZpwTjIEubqa3s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; b=UvcrCj67iIU3pf1Iiqt3hn/ksFsWCcrXfaL0kO8Jznniak/jHSTN4BcEGlyYH/bUo3 gDJkA8nqTYo0rFMqiK3EZKOP7sKhgqBJ0Cp9CkXlB9dLumOXtx7c6dcTVrENDSzN4z5x GzpvTUu+LJF+VKVLSkoY46f22NPAEcG54BLtY= Received: by 10.227.61.79 with SMTP id s15mr1068853wbh.85.1306429025831; Thu, 26 May 2011 09:57:05 -0700 (PDT) Received: from DEV ([82.193.208.173]) by mx.google.com with ESMTPS id o38sm598358wba.37.2011.05.26.09.57.03 (version=SSLv3 cipher=OTHER); Thu, 26 May 2011 09:57:04 -0700 (PDT) Message-ID: <20110526.165703.671.1@DEV> From: rank1seeker@gmail.com To: freebsd-hackers@freebsd.org Date: Thu, 26 May 2011 18:57:03 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20110516.183617.687.1@DEV> X-Mailer: POP Peeper (3.7.0.0) Subject: Re: MD ROOT and image size limitation (makes kernel panic) 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, 26 May 2011 16:57:07 -0000 Ok now, all works great IF md root, isn't statically compiled, into the = kernel.=0D=0A=0D=0AWhen I statically compile it, into the kernel, I get = ROOT MOUNT error.=0D=0AWhen I list available devices via '?', md0 does = exist!=0D=0A=0D=0AI point mountroot to it, but nada, I get MOUNT ROOT = ERROR.=0D=0AI've tried to statically compile, BOTH gzip-ed image (~87 Mb) = and non compressed image (~197 Mb), of md root.=0D=0A=0D=0AWith both, md0 = exist at mountroot, but when manually pointed to md0, I get MOUNT ROOT = ERROR=0D=0A=0D=0AIs this a bug?=0D=0AAs it doesn't expect so huge kernel = of i.e; ~220 Mb=0D=0A=0D=0AJust to say, that md0, DOESN'T have a = partition or bsdlabel, just UFS=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6 From owner-freebsd-hackers@FreeBSD.ORG Thu May 26 21:31:35 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2F31106566B for ; Thu, 26 May 2011 21:31:35 +0000 (UTC) (envelope-from lgj@usenix.org) Received: from lonestar.usenix.org (lonestar.usenix.org [131.106.3.102]) by mx1.freebsd.org (Postfix) with ESMTP id B539C8FC08 for ; Thu, 26 May 2011 21:31:35 +0000 (UTC) Received: from negroni.usenix.org (negroni.usenix.org [131.106.3.145]) (authenticated bits=0) by lonestar.usenix.org (8.14.2/8.14.2) with ESMTP id p4QLVYZA015407 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 26 May 2011 14:31:35 -0700 (PDT) From: Lionel Garth Jones Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 26 May 2011 14:31:34 -0700 Message-Id: <0C2C247E-8958-49F2-9D09-59EA6CF08145@usenix.org> To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-DCC-USENIX-Metrics: lonestar; whitelist X-Spam-Status: No, score=0.7 required=6.0 tests=ALL_TRUSTED, FH_DATE_PAST_20XX autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on lonestar X-Mailman-Approved-At: Thu, 26 May 2011 22:18:57 +0000 Subject: USENIX WebApps '11 Early Bird Registration Deadline Extended 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, 26 May 2011 21:31:36 -0000 There's still time! Join us in Portland, OR, June 15-16, 2011, for the 2nd USENIX Conference on Web Application Development. The Early Bird Registration Deadline has been extended. Register by Tuesday, May 31, 2011, for the greatest savings. http://www.usenix.org/events/fcw11/registration/ WebApps '11 is designed to bring together experts in all aspects of developing and deploying Web applications. The program features cutting-edge research that advances the state of the art, not only on novel Web applications but also on infrastructure, tools, and techniques that support the development, analysis/testing, operation, or deployment of those applications. Take advantage of this opportunity for interaction and synergy across these areas. The technical program includes: * Invited Talks: -- "Software G Forces: The Effects of Acceleration," by Kent Beck of Facebook, the inventor of Extreme Programming -- Panel on "The Future of Client-side Web Apps," moderated by Michael Maximilien, IBM Research; including panelists: Patrick Chanezon, Google, Inc.; Charles Ying, Flipboard, Inc.; Erik Meijer, Microsoft Corp.; Raffi Krikorian, Twitter, Inc. -- Keynote Address: "An Agenda for Empirical Cyber Crime Research," by Stefan Savage, UCSD -- Plenary Talk: "Dead Media: What the Obsolete, Unsuccessful, Experimental, and Avant-Garde Can Teach Us About the Future of Media," by Finn Brunton, NYU -- "Helping Humanity with Phones and Clouds," by Matthew Faulkner and Michael Olson, Caltech -- "Linux PC Robot," by Mark Woodward, Mohawksoft * Refereed papers that present the latest research in developing and deploying Web applications. * A Poster Session and Happy Hour held jointly with USENIX ATC '11. The poster session provides a great way to let other people know about your work and to get useful feedback from the community. Poster submissions are due Monday, May 30, at 9:00 p.m. PDT. Find out more here: http://www.usenix.org/events/atc11/poster.html Check out the full program here: http://www.usenix.org/events/webapps11/tech/ Plus, don't miss the opportunity to mingle with colleagues and leading experts in the combined Birds-of-a-Feather sessions (BoFs) and at the other evening social events, vendor BoFs, and receptions. Because WebApps '11 is part of the USENIX Federated Conferences Week, you can create your own conference experience. Your daily registration gets you into all the events happening that day: tutorials, talks, workshops--you name it. Plus, registration packages offer expanded discounts: the more days you attend, the more you save! I look forward to seeing you in Portland! Armando Fox, University of California, Berkeley WebApps '11 Program Chair webapps11chair@usenix.org ------------------------------------------------------------------------ 2nd USENIX Conference on Web Application Development (WebApps '11) June 15-16, 2011 Portland, OR Part of USENIX Federated Conferences Week, June 14-17, 2011 http://www.usenix.org/webapps11/progb/ Early Bird Registration Extended Deadline: May 31, 2011 ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 00:03:33 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FD93106564A for ; Fri, 27 May 2011 00:03:33 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id CF19D8FC14 for ; Fri, 27 May 2011 00:03:32 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QPkWZ-0003IF-LL for freebsd-hackers@freebsd.org; Fri, 27 May 2011 02:03:31 +0200 Received: from 201.82.186.242 ([201.82.186.242]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2011 02:03:31 +0200 Received: from kubito by 201.82.186.242 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2011 02:03:31 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Raphael Kubo da Costa Date: Thu, 26 May 2011 21:03:19 -0300 Lines: 26 Message-ID: <87pqn557so.fsf@gmail.com> References: <87pqn6jo33.fsf@gmail.com> <4DDE0329.9030208@FreeBSD.org> <201105260933.19077.jhb@freebsd.org> <4DDE5762.8060901@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 201.82.186.242 User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (berkeley-unix) Cancel-Lock: sha1:v1QRHplP1kF/gL5JQUteneUAy6k= Subject: Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread) 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, 27 May 2011 00:03:33 -0000 Andriy Gapon writes: > on 26/05/2011 16:33 John Baldwin said the following: >> On Thursday, May 26, 2011 3:37:13 am Andriy Gapon wrote: >>> on 26/05/2011 03:35 Raphael Kubo da Costa said the following: >>>> If I compile the port myself, I can't run any binary (PR ports/152896, >>>> which has been unanswered despite my efforts): >>>> >>>> Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't >>>> do that. Symbol format `elf64-x86-64-freebsd' unknown. >>>> >>> >>> This is a somewhat known issue that John was going to fix a while ago. >> >> Actually, it's not really fixable if you have libreadline installed from ports >> and binutils installed from ports. I'd like to just remove the hack to use >> libreadline from ports if possible. > > I referred to this option as a fix. Thanks, removing readline from ports worked like a charm after I recompiled devel/gdb. Installing it from the package still doesn't work, though. Shouldn't the hack in the port be reversed, ie. if readline from ports is installed the port is marked as BROKEN? From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 01:20:12 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBC38106564A for ; Fri, 27 May 2011 01:20:12 +0000 (UTC) (envelope-from grog@lemis.com) Received: from w3.lemis.com (w3.lemis.com [208.86.224.149]) by mx1.freebsd.org (Postfix) with ESMTP id BE08C8FC0A for ; Fri, 27 May 2011 01:20:12 +0000 (UTC) Received: from dereel.lemis.com (1032.x.rootbsd.net [208.86.224.149]) by w3.lemis.com (Postfix) with ESMTP id E41283BAC1; Fri, 27 May 2011 01:02:23 +0000 (UTC) Received: by dereel.lemis.com (Postfix, from userid 1004) id 724C4DAC9E; Fri, 27 May 2011 11:02:21 +1000 (EST) Date: Fri, 27 May 2011 11:02:21 +1000 From: Greg 'groggy' Lehey To: Andrew Duane Message-ID: <20110527010221.GE77148@dereel.lemis.com> References: <4DDD3021.1000109@my.gd> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="t0UkRYy7tHLRMCai" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Organization: The FreeBSD Project Phone: +61-3-5346-1370 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: "freebsd-hackers@freebsd.org" Subject: Re: DEBUG - analysing core dumps 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, 27 May 2011 01:20:13 -0000 --t0UkRYy7tHLRMCai Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wednesday, 25 May 2011 at 13:20:31 -0400, Andrew Duane wrote: > Damien Fleuriot wrote: >> >> Sadly, getting a backtrace with "bt" gives me more lines with "??", >> which is totally not helpful: >> [SNIP] >> #13 0x00007fffff1f9d70 in ?? () >> #14 0x0000000000000000 in ?? () >> #15 0x6f70732f7261762f in ?? () >> #16 0x6c737973722f6c6f in ?? () >> #17 0x5f6e70766f2f676f in ?? () >> #18 0x746174732e676f6c in ?? () >> #19 0x0000000000000065 in ?? () >> #20 0x0000000000000000 in ?? () >> [SNIP] > > For what it's worth, the addresses shown in frames 15, 16, 17, and > 18 are ASCII: > > ops/rav/ > lsysr/lo > _npvo/go > tats.gol This smells of a smashed stack. Something has overwritten parts of it with text. Greg -- See complete headers for address and phone numbers. This message is digitally signed. See http://www.lemis.com/grog/email/signed-mail.php for more details. If your Microsoft MUA reports problems, please read http://tinyurl.com/broken-mua --t0UkRYy7tHLRMCai Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk3e+B0ACgkQIubykFB6QiOmRQCePa+dIEVl3h9OEteMUphnH6js Xi4An3dHkftfp15bYAPc8fSg16jieZ1Y =fqCZ -----END PGP SIGNATURE----- --t0UkRYy7tHLRMCai-- From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 11:51:47 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 7F29E1065688; Fri, 27 May 2011 11:51:47 +0000 (UTC) Date: Fri, 27 May 2011 11:51:47 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20110527115147.GA73802@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="rwEMma7ioTxnRzrJ" Content-Disposition: inline Cc: freebsd-toolchain@freebsd.org Subject: [rfc] a few kern.mk and bsd.sys.mk related changes 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, 27 May 2011 11:51:47 -0000 --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hi there, i would like to hear people's opinion regarding the following patch. it features the following semantic changes: 1) -W is now called -Wextra 2) move -fformat-extensions and -fdiagnostics-show-option out of CWARNFLAGS, since they aren't really warnings. this will now let anybody use custom CWARNFLAGS without having to remember to add -fformat-extensions in order not to break buildworld. 3) rearrange "\" characters, as to avoid double spaces 4) when building kernel modules, -fstack-protector was added to CFLAGS twice. this should now be solved. cheers. alex -- a13x --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="kern.mk-bsy.sys.mk.patch" diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 796d169..eec7408 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -36,7 +36,7 @@ CWARNFLAGS += -Werror CWARNFLAGS += -Wall -Wno-format-y2k . endif . if ${WARNS} >= 3 -CWARNFLAGS += -W -Wno-unused-parameter -Wstrict-prototypes\ +CWARNFLAGS += -Wextra -Wno-unused-parameter -Wstrict-prototypes\ -Wmissing-prototypes -Wpointer-arith . endif . if ${WARNS} >= 4 diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index a0a595f..0806b0b 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -3,10 +3,9 @@ # # Warning flags for compiling the kernel and components of the kernel: # -CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ - -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - -Wundef -Wno-pointer-sign -fformat-extensions \ - -Wmissing-include-dirs -fdiagnostics-show-option +CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes\ + -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual\ + -Wundef -Wno-pointer-sign -Wmissing-include-dirs # # The following flags are next up for working on: # -Wextra @@ -83,7 +82,7 @@ CFLAGS+= -mno-sse .else CFLAGS+= -mno-aes -mno-avx .endif -CFLAGS+= -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float \ +CFLAGS+= -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float\ -fno-asynchronous-unwind-tables INLINE_LIMIT?= 8000 .endif @@ -120,11 +119,17 @@ INLINE_LIMIT?= 8000 CFLAGS+= -ffreestanding # +# Enable FreeBSD kernel-specific printf format specifiers. Also instruct gcc to +# enable some diagnostics, which make it easier to pinpoint tinderbox failures. +CFLAGS+= -fformat-extensions -fdiagnostics-show-option + +# # GCC SSP support # .if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \ ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" -CFLAGS+= -fstack-protector +SSP_CFLAGS?= -fstack-protector +CFLAGS+= ${SSP_CFLAGS} .endif # --rwEMma7ioTxnRzrJ-- From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 12:02:37 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B743410656A4 for ; Fri, 27 May 2011 12:02:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8E3D38FC0A for ; Fri, 27 May 2011 12:02:37 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2941346B0A; Fri, 27 May 2011 08:02:37 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BE8648A04F; Fri, 27 May 2011 08:02:36 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 27 May 2011 07:43:32 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <4DDE5762.8060901@FreeBSD.org> <87pqn557so.fsf@gmail.com> In-Reply-To: <87pqn557so.fsf@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201105270743.32725.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 27 May 2011 08:02:36 -0400 (EDT) Cc: Raphael Kubo da Costa Subject: Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread) 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, 27 May 2011 12:02:37 -0000 On Thursday, May 26, 2011 8:03:19 pm Raphael Kubo da Costa wrote: > Andriy Gapon writes: > > > on 26/05/2011 16:33 John Baldwin said the following: > >> On Thursday, May 26, 2011 3:37:13 am Andriy Gapon wrote: > >>> on 26/05/2011 03:35 Raphael Kubo da Costa said the following: > >>>> If I compile the port myself, I can't run any binary (PR ports/152896, > >>>> which has been unanswered despite my efforts): > >>>> > >>>> Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't > >>>> do that. Symbol format `elf64-x86-64-freebsd' unknown. > >>>> > >>> > >>> This is a somewhat known issue that John was going to fix a while ago. > >> > >> Actually, it's not really fixable if you have libreadline installed from ports > >> and binutils installed from ports. I'd like to just remove the hack to use > >> libreadline from ports if possible. > > > > I referred to this option as a fix. > > Thanks, removing readline from ports worked like a charm after I > recompiled devel/gdb. Installing it from the package still doesn't work, > though. > > Shouldn't the hack in the port be reversed, ie. if readline from ports > is installed the port is marked as BROKEN? Well, if you have readline from ports but don't have binutils in ports it actually works ok. No idea why the package built in the package cluster is busted though. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 12:45:57 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F97B1065670 for ; Fri, 27 May 2011 12:45:57 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2257A8FC0A for ; Fri, 27 May 2011 12:45:56 +0000 (UTC) Received: by wyf23 with SMTP id 23so1646309wyf.13 for ; Fri, 27 May 2011 05:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:from:to:subject:date:content-type :content-transfer-encoding:x-mailer; bh=KmH2oKOu+6nF4kE+JfeFfYGNpycG3QInM5loPexDiuc=; b=WtcsmMwri8YGCwpUuaAs5wFGZlb2ofXpajhzDz/eOuLvoKqlUGD3KTNQ5oUg8sm7ev 2iCUVM7UBbOQ1kWqDp/uno8ln7SUw3Sv0GOQckmg81qdAayxox6TDIC0bQNtRPAAi3k9 IV4af8Svd/eFUKseVJWwiQpjx8E7PfMqn3rkw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:x-mailer; b=SMdtx0KJsbyXGx2HPM4vAT4x5B0LlpCFugqP+nvbmn/Z3+7r9ekMcIf2edNoBRwqGv pafK0jv9ky0tD0S91E061QLoz9CzpFp12IWW760g85geHPpF/deo44NNDrtuA/0hEdCL mU2W8fQhRJcQubxvCzxwwVeN8C6XSuFt/zuIQ= Received: by 10.216.197.168 with SMTP id t40mr2028459wen.55.1306500356162; Fri, 27 May 2011 05:45:56 -0700 (PDT) Received: from DEV ([82.193.208.173]) by mx.google.com with ESMTPS id 74sm947584wem.41.2011.05.27.05.45.52 (version=SSLv3 cipher=OTHER); Fri, 27 May 2011 05:45:55 -0700 (PDT) Message-ID: <20110527.124553.718.1@DEV> From: rank1seeker@gmail.com To: hackers@freebsd.org Date: Fri, 27 May 2011 14:45:53 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable X-Mailer: POP Peeper (3.7.0.0) Cc: Subject: Active slice, only for a next boot 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, 27 May 2011 12:45:57 -0000 Idea is ...=0D=0AI have i.e; 3 slices, of which first is active.=0D=0ANow I = wana set slice 2 active, but only for a one/next boot.=0D=0AOnce slice 2 = is booted and system is shutdown or rebooted, once again, first slice is = active and booted, without user's intervention.=0D=0A=0D=0AIs this = possible or should be implemented?=0D=0A=0D=0A=0D=0ADomagoj = Smol=E8i=E6=0D=0A=0D=0A From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 13:47:54 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id CE08F1065670; Fri, 27 May 2011 13:47:54 +0000 (UTC) Date: Fri, 27 May 2011 13:47:54 +0000 From: Alexander Best To: rank1seeker@gmail.com Message-ID: <20110527134754.GA94769@freebsd.org> References: <20110527.124553.718.1@DEV> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110527.124553.718.1@DEV> Cc: hackers@freebsd.org Subject: Re: Active slice, only for a next boot 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, 27 May 2011 13:47:54 -0000 On Fri May 27 11, rank1seeker@gmail.com wrote: > Idea is ... > I have i.e; 3 slices, of which first is active. > Now I wana set slice 2 active, but only for a one/next boot. > Once slice 2 is booted and system is shutdown or rebooted, once again, first slice is active and booted, without user's intervention. > > Is this possible or should be implemented? take a look at the gpart(8) manual, expecially the ATTRIBUTES section. if you are running with a GPT scheme you can use the "bootonce" attribute to do exactly what you asked for. cheers. alex > > > Domagoj Smol?i? > > -- a13x From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 16:47:28 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93B1D1065678 for ; Fri, 27 May 2011 16:47:28 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 247968FC1C for ; Fri, 27 May 2011 16:47:26 +0000 (UTC) Received: by wyf23 with SMTP id 23so1877928wyf.13 for ; Fri, 27 May 2011 09:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:from:to:subject:date:in-reply-to :references:x-mailer; bh=mxVwU51VAdTzneFlttyRSxIgigAcDgbx8m5Z6lscKYU=; b=BqdbMAzPvtdqabdRF7cUmYQoTt+upJI/5xiI6zW/vEL1DuHPPkRTP4F6JOiA/TJlLd noLWjlBaHvV3+VpkmxUu3iT0gORD6kZvMXnlP9RTeUV7UHQZKqrVcq9FbHn0hur9evwn zFBRvm6NAby1cRzX7GhMzj6n1gv/3QO+cFtUo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:subject:date:in-reply-to:references:x-mailer; b=wd02H6DZTTmYKMt0J+vlgDhd5naLTgcwLazFvZvRFcBFd+0gZBJYDLkB00KxGoNI7c k0spbGnrlB1P/PDeaqskVth6kX5q5fRxkXu5GRdfebn3lLekMyW0AtUFaOOWD7t2Yqdr klOk6gX/wTEM2yUpkijjmpyGICaqZ104dM+/g= Received: by 10.216.229.82 with SMTP id g60mr7091795weq.70.1306514845942; Fri, 27 May 2011 09:47:25 -0700 (PDT) Received: from DEV ([82.193.208.173]) by mx.google.com with ESMTPS id f73sm1078319wef.19.2011.05.27.09.47.23 (version=SSLv3 cipher=OTHER); Fri, 27 May 2011 09:47:24 -0700 (PDT) Message-ID: <20110527.164723.750.2@DEV> From: rank1seeker@gmail.com To: hackers@freebsd.org Date: Fri, 27 May 2011 18:47:23 +0200 In-Reply-To: <20110527134754.GA94769@freebsd.org> References: <20110527.124553.718.1@DEV> <20110527134754.GA94769@freebsd.org> X-Mailer: POP Peeper (3.7.0.0) Cc: Subject: Re: Active slice, only for a next boot 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, 27 May 2011 16:47:28 -0000 ----- Original Message ----- From: Alexander Best To: rank1seeker@gmail.com Cc: hackers@freebsd.org Date: Fri, 27 May 2011 13:47:54 +0000 Subject: Re: Active slice, only for a next boot > On Fri May 27 11, rank1seeker@gmail.com wrote: > > Idea is ... > > I have i.e; 3 slices, of which first is active. > > Now I wana set slice 2 active, but only for a one/next boot. > > Once slice 2 is booted and system is shutdown or rebooted, once again, first slice is active and booted, without user's intervention. > > > > Is this possible or should be implemented? > > take a look at the gpart(8) manual, expecially the ATTRIBUTES section. if you > are running with a GPT scheme you can use the "bootonce" attribute to do > exactly what you asked for. > > cheers. > alex > Thanls, but I need it for MBR. Domagoj S. From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 17:22:09 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E3AD1065676 for ; Fri, 27 May 2011 17:22:09 +0000 (UTC) (envelope-from lgj@usenix.org) Received: from lonestar.usenix.org (lonestar.usenix.org [131.106.3.102]) by mx1.freebsd.org (Postfix) with ESMTP id 107468FC21 for ; Fri, 27 May 2011 17:22:08 +0000 (UTC) Received: from negroni.usenix.org (negroni.usenix.org [131.106.3.145]) (authenticated bits=0) by lonestar.usenix.org (8.14.2/8.14.2) with ESMTP id p4RHLqHP018849 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 27 May 2011 10:22:08 -0700 (PDT) From: Lionel Garth Jones Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 27 May 2011 10:22:07 -0700 Message-Id: To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-DCC-USENIX-Metrics: lonestar; whitelist X-Spam-Status: No, score=0.7 required=6.0 tests=ALL_TRUSTED, FH_DATE_PAST_20XX autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on lonestar X-Mailman-Approved-At: Fri, 27 May 2011 17:31:22 +0000 Subject: USENIX ATC '11 Early Bird Deadline Now May 31 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, 27 May 2011 17:22:09 -0000 There's still time! Don't miss the 2011 USENIX Annual Technical Conference (USENIX ATC '11) taking place June 15-17, 2011, in Portland, OR. The Early Bird Registration Deadline has been extended. Register by Tuesday, May 31, 2011, for the greatest savings. http://www.usenix.org/events/fcw11/registration/ The technical program begins on Wednesday, June 15, and includes refereed papers, invited talks, and a poster session. http://www.usenix.org/events/atc11/tech/ The impressive slate of invited speakers includes: - Keynote Address: "An Agenda for Empirical Cyber Crime Research," by Stefan Savage, UCSD - Plenary Talk: "Dead Media: What the Obsolete, Unsuccessful, Experimental, and Avant-Garde Can Teach Us About the Future of Media," by Finn Brunton, NYU - "Helping Humanity with Phones and Clouds," by Matthew Faulkner and Michael Olson, Caltech - "Linux PC Robot," by Mark Woodward, Mohawksoft The USENIX ATC '11 Refereed Papers present the latest in groundbreaking systems research. Be among the first to check out the latest innovative work in the systems field. A joint Poster Session and Happy Hour between USENIX ATC '11 and WebApps '11 will be held on the evening of Wednesday, June 15. The poster session is an excellent forum to discuss new ideas and get useful feedback from the community. All poster submissions must be submitted via the Web form. If you have submitted a poster abstract already via email, please re-submit at the submission site. The poster submission deadline has been extended to Monday, May 30, 9:00 p.m. PDT. http://www.usenix.org/events/atc11/poster.html Finally, don't miss the opportunity to mingle with colleagues and leading experts in the combined Birds-of-a-Feather sessions and at the various evening social events, including the joint poster session, vendor BoFs, and receptions. http://www.usenix.org/events/fcw11/activities.html The full program is available at: http://www.usenix.org/events/atc11/tech/ Because USENIX ATC '11 is part of the USENIX Federated Conferences Week, you can create your own conference experience. Your daily registration gets you into all the events happening that day: tutorials, talks, workshops--you name it. Plus, registration packages offer expanded discounts: the more days you attend, the more you save! USENIX ATC '11 promises to be an exciting showcase for the latest in innovative research and cutting-edge practices in technology. We look forward to seeing you in Portland. On behalf of the USENIX ATC '11 Program Committee, Jason Nieh, Columbia University Carl Waldspurger USENIX ATC '11 Program Chairs atc11chairs@usenix.org P.S. Connect with other attendees, check out additional discounts, and help spread the word! Facebook: http://www.facebook.com/event.php?eid=176554335729285 Twitter: http://twitter.com/usenix #ATC11 Additional Discounts: http://www.usenix.org/events/fcw11/discounts.html Help Promote: http://www.usenix.org/events/atc11/promote.html ---------------------------------------------- 2011 USENIX Annual Technical Conference June 15-17, 2011, Portland, OR http://www.usenix.org/atc11/progb Early Bird Registration Extended Deadline: May 31, 2011 Part of USENIX Federated Conferences Week http://www.usenix.org/fcw11 ----------------------------------------------- From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 17:38:03 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 736461065672; Fri, 27 May 2011 17:38:03 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2FD678FC0A; Fri, 27 May 2011 17:38:03 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4RHLKUt056377 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 27 May 2011 11:21:24 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20110527115147.GA73802@freebsd.org> Date: Fri, 27 May 2011 11:21:14 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> References: <20110527115147.GA73802@freebsd.org> To: Alexander Best X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Fri, 27 May 2011 11:21:24 -0600 (MDT) Cc: freebsd-hackers@FreeBSD.ORG, freebsd-toolchain@FreeBSD.ORG Subject: Re: [rfc] a few kern.mk and bsd.sys.mk related changes 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, 27 May 2011 17:38:03 -0000 These look generally good. Just one thing I had a question on: # +# Enable FreeBSD kernel-specific printf format specifiers. Also = instruct gcc to +# enable some diagnostics, which make it easier to pinpoint tinderbox = failures. +CFLAGS+=3D -fformat-extensions -fdiagnostics-show-option + Does this put sand in the gears of clang support? Warner On May 27, 2011, at 5:51 AM, Alexander Best wrote: > hi there, >=20 > i would like to hear people's opinion regarding the following patch. = it > features the following semantic changes: >=20 > 1) -W is now called -Wextra > 2) move -fformat-extensions and -fdiagnostics-show-option out of = CWARNFLAGS, > since they aren't really warnings. this will now let anybody use = custom > CWARNFLAGS without having to remember to add -fformat-extensions in = order > not to break buildworld. > 3) rearrange "\" characters, as to avoid double spaces > 4) when building kernel modules, -fstack-protector was added to CFLAGS = twice. > this should now be solved. >=20 > cheers. > alex >=20 > --=20 > a13x > = _______________________________________________ > freebsd-toolchain@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > To unsubscribe, send any mail to = "freebsd-toolchain-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 17:45:21 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EDBD106564A for ; Fri, 27 May 2011 17:45:21 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 106548FC15 for ; Fri, 27 May 2011 17:45:20 +0000 (UTC) Received: by bwz12 with SMTP id 12so2153360bwz.13 for ; Fri, 27 May 2011 10:45:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=DZe0cYPJuyEz0UTjh/L/3DoIgAz7g7z09BQoulqITVM=; b=lWcy9Yg2Zd+wXHxlmhs8L03kqKRyYLfxjp3KculdgMCjKnGqmBz5yb3iYZ4tSo25gV 2vKGS9jq14T5ipVtKdIgCJPI79hz1cHdSTpUpvD/IZZGPpAen+gNt1TnI+175zxKY6GC car+6Ou3sDOhMtEm3cOMalmRx8JOrHaPDGOxg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=cSBZpou0sLNMZR9OD4Y526K0wZ9KwUR35ynPN/v2UKMmf7MSLhGJYxCf1aOYWRuu/6 DQGLETr7/TuzhW5XQNLqzriYbrcpUVBbNLB1Zz+3uqnMDdamStu2Tywf3yo8vy+hSCHO 7Zw1g/YMRvJ4fZkdHPzyJMy1F01HVIFStIQQM= MIME-Version: 1.0 Received: by 10.204.14.144 with SMTP id g16mr2019829bka.34.1306516866046; Fri, 27 May 2011 10:21:06 -0700 (PDT) Received: by 10.204.66.81 with HTTP; Fri, 27 May 2011 10:21:05 -0700 (PDT) Received: by 10.204.66.81 with HTTP; Fri, 27 May 2011 10:21:05 -0700 (PDT) In-Reply-To: <20110527.164723.750.2@DEV> References: <20110527.124553.718.1@DEV> <20110527134754.GA94769@freebsd.org> <20110527.164723.750.2@DEV> Date: Fri, 27 May 2011 18:21:05 +0100 Message-ID: From: Chris Rees To: rank1seeker@gmail.com Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: hackers@freebsd.org Subject: Re: Active slice, only for a next boot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 17:45:21 -0000 On 27 May 2011 17:47, wrote: > > ----- Original Message ----- > From: Alexander Best > To: rank1seeker@gmail.com > Cc: hackers@freebsd.org > Date: Fri, 27 May 2011 13:47:54 +0000 > Subject: Re: Active slice, only for a next boot > > > On Fri May 27 11, rank1seeker@gmail.com wrote: > > > Idea is ... > > > I have i.e; 3 slices, of which first is active. > > > Now I wana set slice 2 active, but only for a one/next boot. > > > Once slice 2 is booted and system is shutdown or rebooted, once again, > first slice is active and booted, without user's intervention. > > > > > > Is this possible or should be implemented? > > > > take a look at the gpart(8) manual, expecially the ATTRIBUTES section. if > you > > are running with a GPT scheme you can use the "bootonce" attribute to do > > exactly what you asked for. > > > > cheers. > > alex > > > > Thanls, but I need it for MBR. > > Domagoj S. MBR has only a one-bit wide field for active status. You'll need logic in the first boot to change the flag, perhaps an fdisk statement. Chris From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 18:14:59 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: by hub.freebsd.org (Postfix, from userid 1233) id 73206106566B; Fri, 27 May 2011 18:14:59 +0000 (UTC) Date: Fri, 27 May 2011 18:14:59 +0000 From: Alexander Best To: Warner Losh Message-ID: <20110527181459.GA29908@freebsd.org> References: <20110527115147.GA73802@freebsd.org> <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> Cc: freebsd-hackers@FreeBSD.ORG, freebsd-toolchain@FreeBSD.ORG Subject: Re: [rfc] a few kern.mk and bsd.sys.mk related changes 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, 27 May 2011 18:14:59 -0000 On Fri May 27 11, Warner Losh wrote: > These look generally good. Just one thing I had a question on: > > # > +# Enable FreeBSD kernel-specific printf format specifiers. Also instruct gcc to > +# enable some diagnostics, which make it easier to pinpoint tinderbox failures. > +CFLAGS+= -fformat-extensions -fdiagnostics-show-option > + > > Does this put sand in the gears of clang support? i don't think so. the code that features -fformat-extensions support is freebsd specific and gets plugged into the vendor code during every new import. dim@ and rdivacky@ have been discussing the possibility of getting this committed upstream as something like -ffreebsd-extensions, but they haven't decided, yet. regarding -fdiagnostics-show-option: this is intended purely for gcc, since it is disabled per default. under clang the flag exists, too, but it is enabled by default. so specifying it under clang is pretty much a nop. cheers. alex > > Warner > > > On May 27, 2011, at 5:51 AM, Alexander Best wrote: > > > hi there, > > > > i would like to hear people's opinion regarding the following patch. it > > features the following semantic changes: > > > > 1) -W is now called -Wextra > > 2) move -fformat-extensions and -fdiagnostics-show-option out of CWARNFLAGS, > > since they aren't really warnings. this will now let anybody use custom > > CWARNFLAGS without having to remember to add -fformat-extensions in order > > not to break buildworld. > > 3) rearrange "\" characters, as to avoid double spaces > > 4) when building kernel modules, -fstack-protector was added to CFLAGS twice. > > this should now be solved. > > > > cheers. > > alex > > > > -- > > a13x > > _______________________________________________ > > freebsd-toolchain@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > > To unsubscribe, send any mail to "freebsd-toolchain-unsubscribe@freebsd.org" -- a13x From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 18:29:06 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: by hub.freebsd.org (Postfix, from userid 1233) id 7105C1065673; Fri, 27 May 2011 18:29:06 +0000 (UTC) Date: Fri, 27 May 2011 18:29:06 +0000 From: Alexander Best To: Warner Losh Message-ID: <20110527182906.GA31871@freebsd.org> References: <20110527115147.GA73802@freebsd.org> <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> <20110527181459.GA29908@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110527181459.GA29908@freebsd.org> Cc: freebsd-hackers@FreeBSD.ORG, freebsd-toolchain@FreeBSD.ORG Subject: Re: [rfc] a few kern.mk and bsd.sys.mk related changes 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, 27 May 2011 18:29:06 -0000 On Fri May 27 11, Alexander Best wrote: > On Fri May 27 11, Warner Losh wrote: > > These look generally good. Just one thing I had a question on: > > > > # > > +# Enable FreeBSD kernel-specific printf format specifiers. Also instruct gcc to > > +# enable some diagnostics, which make it easier to pinpoint tinderbox failures. > > +CFLAGS+= -fformat-extensions -fdiagnostics-show-option > > + > > > > Does this put sand in the gears of clang support? i've improved the above comment so as to note that clang won't be affected by -fdiagnostics-show-option. the new patch is available here: http://people.freebsd.org/~arundel/patches/kern.mk-bsy.sys.mk.patch another "issue" i've come across is the fact that on amd64, -O2 is always being set, no matter, if debugging is enabled or disabled. i think amd64 should also (just like all the other archs) be using -O, when debugging was enabled. changing this is quite easy. so if people think this is something worth changing i can integrate it into my existing patch. cheers. alex > > i don't think so. the code that features -fformat-extensions support is freebsd > specific and gets plugged into the vendor code during every new import. dim@ > and rdivacky@ have been discussing the possibility of getting this committed > upstream as something like -ffreebsd-extensions, but they haven't decided, yet. > > regarding -fdiagnostics-show-option: this is intended purely for gcc, since it > is disabled per default. under clang the flag exists, too, but it is enabled by > default. so specifying it under clang is pretty much a nop. > > cheers. > alex > > > > > Warner > > > > > > On May 27, 2011, at 5:51 AM, Alexander Best wrote: > > > > > hi there, > > > > > > i would like to hear people's opinion regarding the following patch. it > > > features the following semantic changes: > > > > > > 1) -W is now called -Wextra > > > 2) move -fformat-extensions and -fdiagnostics-show-option out of CWARNFLAGS, > > > since they aren't really warnings. this will now let anybody use custom > > > CWARNFLAGS without having to remember to add -fformat-extensions in order > > > not to break buildworld. > > > 3) rearrange "\" characters, as to avoid double spaces > > > 4) when building kernel modules, -fstack-protector was added to CFLAGS twice. > > > this should now be solved. > > > > > > cheers. > > > alex > > > > > > -- > > > a13x > > > _______________________________________________ > > > freebsd-toolchain@freebsd.org mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > > > To unsubscribe, send any mail to "freebsd-toolchain-unsubscribe@freebsd.org" > > -- > a13x -- a13x From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 18:39:56 2011 Return-Path: Delivered-To: hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A90D1065672 for ; Fri, 27 May 2011 18:39:56 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9BE5E8FC49 for ; Fri, 27 May 2011 18:39:55 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4RIYTW5057397 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 27 May 2011 12:34:33 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20110527.164723.750.2@DEV> Date: Fri, 27 May 2011 12:34:23 -0600 Content-Transfer-Encoding: 7bit Message-Id: <496B0C04-7777-458D-A116-27944A4006BB@bsdimp.com> References: <20110527.124553.718.1@DEV> <20110527134754.GA94769@freebsd.org> <20110527.164723.750.2@DEV> To: rank1seeker@gmail.com X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Fri, 27 May 2011 12:34:33 -0600 (MDT) Cc: hackers@FreeBSD.ORG Subject: Re: Active slice, only for a next boot 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, 27 May 2011 18:39:56 -0000 On May 27, 2011, at 10:47 AM, rank1seeker@gmail.com wrote: > ----- Original Message ----- > From: Alexander Best > To: rank1seeker@gmail.com > Cc: hackers@freebsd.org > Date: Fri, 27 May 2011 13:47:54 +0000 > Subject: Re: Active slice, only for a next boot > >> On Fri May 27 11, rank1seeker@gmail.com wrote: >>> Idea is ... >>> I have i.e; 3 slices, of which first is active. >>> Now I wana set slice 2 active, but only for a one/next boot. >>> Once slice 2 is booted and system is shutdown or rebooted, once again, > first slice is active and booted, without user's intervention. >>> >>> Is this possible or should be implemented? >> >> take a look at the gpart(8) manual, expecially the ATTRIBUTES section. if > you >> are running with a GPT scheme you can use the "bootonce" attribute to do >> exactly what you asked for. >> >> cheers. >> alex >> > > Thanls, but I need it for MBR. gpart works with MBR. Warner From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 18:40:52 2011 Return-Path: Delivered-To: hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A1D01065679 for ; Fri, 27 May 2011 18:40:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 570778FC49 for ; Fri, 27 May 2011 18:40:52 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4RIZqV4057413 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 27 May 2011 12:35:53 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Fri, 27 May 2011 12:35:46 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20110527.124553.718.1@DEV> <20110527134754.GA94769@freebsd.org> <20110527.164723.750.2@DEV> To: utisoft@gmail.com X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Fri, 27 May 2011 12:35:53 -0600 (MDT) Cc: rank1seeker@gmail.com, hackers@FreeBSD.ORG Subject: Re: Active slice, only for a next boot 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, 27 May 2011 18:40:52 -0000 On May 27, 2011, at 11:21 AM, Chris Rees wrote: > On 27 May 2011 17:47, wrote: >>=20 >> ----- Original Message ----- >> From: Alexander Best >> To: rank1seeker@gmail.com >> Cc: hackers@freebsd.org >> Date: Fri, 27 May 2011 13:47:54 +0000 >> Subject: Re: Active slice, only for a next boot >>=20 >>> On Fri May 27 11, rank1seeker@gmail.com wrote: >>>> Idea is ... >>>> I have i.e; 3 slices, of which first is active. >>>> Now I wana set slice 2 active, but only for a one/next boot. >>>> Once slice 2 is booted and system is shutdown or rebooted, once = again, >> first slice is active and booted, without user's intervention. >>>>=20 >>>> Is this possible or should be implemented? >>>=20 >>> take a look at the gpart(8) manual, expecially the ATTRIBUTES = section. > if >> you >>> are running with a GPT scheme you can use the "bootonce" attribute = to do >>> exactly what you asked for. >>>=20 >>> cheers. >>> alex >>>=20 >>=20 >> Thanls, but I need it for MBR. >>=20 >> Domagoj S. >=20 > MBR has only a one-bit wide field for active status. You'll need logic = in > the first boot to change the flag, perhaps an fdisk statement. I should have said You can create scripts that keeps state in /, or unconditionally = switches back. gpart works with mbr partitions, but it would have to be = cooperative with the thing booted... Warner= From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 19:32:27 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDB821065675; Fri, 27 May 2011 19:32:27 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6E20F8FC1C; Fri, 27 May 2011 19:32:27 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4RJQFl2057829 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 27 May 2011 13:26:19 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20110527181459.GA29908@freebsd.org> Date: Fri, 27 May 2011 13:26:09 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <4B1CE52B-68E9-4AB4-82FA-FB1F8C622BF0@bsdimp.com> References: <20110527115147.GA73802@freebsd.org> <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> <20110527181459.GA29908@freebsd.org> To: Alexander Best X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Fri, 27 May 2011 13:26:19 -0600 (MDT) Cc: freebsd-hackers@freebsd.org, freebsd-toolchain@freebsd.org Subject: Re: [rfc] a few kern.mk and bsd.sys.mk related changes 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, 27 May 2011 19:32:27 -0000 On May 27, 2011, at 12:14 PM, Alexander Best wrote: > On Fri May 27 11, Warner Losh wrote: >> These look generally good. Just one thing I had a question on: >>=20 >> # >> +# Enable FreeBSD kernel-specific printf format specifiers. Also = instruct gcc to >> +# enable some diagnostics, which make it easier to pinpoint = tinderbox failures. >> +CFLAGS+=3D -fformat-extensions -fdiagnostics-show-option >> + >>=20 >> Does this put sand in the gears of clang support? >=20 > i don't think so. the code that features -fformat-extensions support = is freebsd > specific and gets plugged into the vendor code during every new = import. dim@ > and rdivacky@ have been discussing the possibility of getting this = committed > upstream as something like -ffreebsd-extensions, but they haven't = decided, yet. OK. I have a bunch of uncommitted changes to support external = toolchains, and this sort of thing might bite me when them... But I'll = fight with that when I get there. > regarding -fdiagnostics-show-option: this is intended purely for gcc, = since it > is disabled per default. under clang the flag exists, too, but it is = enabled by > default. so specifying it under clang is pretty much a nop. Cool. This is less of a concern, since it will be present in most = external toolchains I care about. Warner > cheers. > alex >=20 >>=20 >> Warner >>=20 >>=20 >> On May 27, 2011, at 5:51 AM, Alexander Best wrote: >>=20 >>> hi there, >>>=20 >>> i would like to hear people's opinion regarding the following patch. = it >>> features the following semantic changes: >>>=20 >>> 1) -W is now called -Wextra >>> 2) move -fformat-extensions and -fdiagnostics-show-option out of = CWARNFLAGS, >>> since they aren't really warnings. this will now let anybody use = custom >>> CWARNFLAGS without having to remember to add -fformat-extensions in = order >>> not to break buildworld. >>> 3) rearrange "\" characters, as to avoid double spaces >>> 4) when building kernel modules, -fstack-protector was added to = CFLAGS twice. >>> this should now be solved. >>>=20 >>> cheers. >>> alex >>>=20 >>> --=20 >>> a13x >>> = _______________________________________________ >>> freebsd-toolchain@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain >>> To unsubscribe, send any mail to = "freebsd-toolchain-unsubscribe@freebsd.org" >=20 > --=20 > a13x >=20 >=20 From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 20:02:18 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E7A5106567C for ; Fri, 27 May 2011 20:02:18 +0000 (UTC) (envelope-from lgj@usenix.org) Received: from lonestar.usenix.org (lonestar.usenix.org [131.106.3.102]) by mx1.freebsd.org (Postfix) with ESMTP id 1E88F8FC15 for ; Fri, 27 May 2011 20:02:17 +0000 (UTC) Received: from negroni.usenix.org (negroni.usenix.org [131.106.3.145]) (authenticated bits=0) by lonestar.usenix.org (8.14.2/8.14.2) with ESMTP id p4RK1cpn020249 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 27 May 2011 13:02:17 -0700 (PDT) From: Lionel Garth Jones Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 27 May 2011 13:02:17 -0700 Message-Id: <69BD2B50-00E0-47D3-AB32-328FD0DD2334@usenix.org> To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-DCC-USENIX-Metrics: lonestar; whitelist X-Spam-Status: No, score=0.7 required=6.0 tests=ALL_TRUSTED, FH_DATE_PAST_20XX autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on lonestar X-Mailman-Approved-At: Fri, 27 May 2011 21:30:28 +0000 Subject: USENIX WIOV '11 Early Bird Registration Deadline Extended 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, 27 May 2011 20:02:18 -0000 There's still time! Don't miss the 3rd Workshop on I/O Virtualization (WIOV '11), taking place in Portland, OR, on June 14, 2011. The Early Bird Registration Deadline has been extended. Register by Tuesday, May 31, 2011, for the greatest savings. http://www.usenix.org/events/fcw11/registration/ The program includes refereed papers on topics such as I/O virtualization architectures and performance management in IOV systems, a panel on "Challenges for Virtualized I/O in the Cloud," and an invited talk. Plus, don't miss the opportunity to mingle with colleagues and leading experts in the combined Birds-of-a-Feather sessions (BoFs) and at the various evening social events, vendor BoFs, and receptions. The full program is available at http://www.usenix.org/wiov11/progb Because WIOV '11 is part of the USENIX Federated Conferences Week, you can create your own conference experience. Your daily registration gets you into all the events happening that day: tutorials, talks, workshops--you name it. Registration packages offer expanded discounts: the more days you attend, the more you save! We look forward to seeing you in Portland, OR. On behalf of the WIOV '11 organizers, Sanjay Kumar, Intel Labs Himanshu Raj, Microsoft Research Karsten Schwan, Georgia Institute of Technology WIOV '11 Program Co-Chairs wiov11chairs@usenix.org P.S. Connect with other attendees, check out additional discounts, and help spread the word! Facebook: http://www.facebook.com/event.php?eid=176554335729285 Twitter: http://twitter.com/usenix #WIOV11 Additional Discounts: http://www.usenix.org/events/fcw11/discounts.html Help Promote: http://www.usenix.org/events/wiov11/promote.html ---------------------------------------------- 3rd Workshop on I/O Virtualization (WIOV '11) June 14, 2011, Portland, OR http://www.usenix.org/wiov11/progb Early Bird Registration Extended Deadline: May 31, 2011 Part of 2011 USENIX Federated Conferences Week http://www.usenix.org/fcw11/ ----------------------------------------------- From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 21:50:18 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07619106564A for ; Fri, 27 May 2011 21:50:18 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id CB7778FC0C for ; Fri, 27 May 2011 21:50:17 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id p4RL8GbZ017478 for ; Fri, 27 May 2011 14:08:17 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <4DE01421.7080902@rawbw.com> Date: Fri, 27 May 2011 14:14:09 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.16) Gecko/20101211 Thunderbird/3.0.11 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: ndis driver presents the valid WiFi network as having the name 0x000000 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, 27 May 2011 21:50:18 -0000 Underlying card is Broadcom BCM94312MCGSG (mini-card for laptop) with Windows driver. This same card and driver work fine with pretty much any other network I tried. But this one particular network shows as 0x000000 and I can't connect to it. Another FreeBSD desktop with native ath driver and apple both connect to it fine. What might be causing such weird behavior? Is this a known problem? Any way to troubleshoot this? Yuri From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 22:53:47 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EE79106566C for ; Fri, 27 May 2011 22:53:47 +0000 (UTC) (envelope-from lgj@usenix.org) Received: from lonestar.usenix.org (lonestar.usenix.org [131.106.3.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6F6708FC15 for ; Fri, 27 May 2011 22:53:47 +0000 (UTC) Received: from negroni.usenix.org (negroni.usenix.org [131.106.3.145]) (authenticated bits=0) by lonestar.usenix.org (8.14.2/8.14.2) with ESMTP id p4RMrSnb021617 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 27 May 2011 15:53:46 -0700 (PDT) From: Lionel Garth Jones Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 27 May 2011 15:53:46 -0700 Message-Id: <1D10E7C2-A729-4EC9-9AC8-3B6FDBE1F0DE@usenix.org> To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-DCC-USENIX-Metrics: lonestar; whitelist X-Spam-Status: No, score=0.7 required=6.0 tests=ALL_TRUSTED, FH_DATE_PAST_20XX autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on lonestar X-Mailman-Approved-At: Fri, 27 May 2011 23:08:18 +0000 Subject: USENIX HotCloud '11 Early Bird Registration Deadline Extended 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, 27 May 2011 22:53:47 -0000 There's still time! Don't miss the 3rd USENIX Workshop on Hot Topics in Cloud Computing (HotCloud '11), taking place in Portland, OR, June 14-15, 2011. The Early Bird Registration Deadline has been extended. Register by Tuesday, May 31, 2011, for the greatest savings. http://www.usenix.org/events/fcw11/registration/ HotCloud '11 will discuss challenges in the cloud computing paradigm, including the design, implementation, and deployment of virtualized clouds. The program includes: -- Refereed paper sessions on scheduling and resource management, economics, security, OSes and frameworks, and more -- Joint ATC, WebApps, and HotCloud Keynote Address: "An Agenda for Empirical Cyber Crime Research," by Stefan Savage, UCSD -- Joint ATC, WebApps, and HotCloud Invited Talk: "Helping Humanity with Phones and Clouds" by Matthew Faulkner and Michael Olson, Caltech -- Panel -- Poster Session: This session provides an opportunity to present early-stage work and receive feedback from the community. Posters provide a great way to have more in-depth conversations between authors and audience--so much so that we are automatically granting each accepted paper a poster slot. We welcome submissions from those who are not paper authors also. The submission deadline is Monday, May 30, 2011, at 3:00 p.m. PDT. Find out more at: http://www.usenix.org/events/hotcloud11/poster.html The full program can be found at http://www.usenix.org/hotcloud11/progb Because HotCloud '11 is part of the USENIX Federated Conferences Week, you can create your own conference experience. Your daily registration gets you into all the events happening that day: tutorials, talks, workshops--you name it. Plus, registration packages offer expanded discounts: the more days you attend, the more you save! Don't miss this opportunity to engage in dynamic discussion on key topics in the cloud computing community. Register today at http://www.usenix.org/events/fcw11/registration/ We look forward to seeing you in Portland! Ion Stoica, University of California, Berkeley John Wilkes, Google HotCloud '11 Program Co-Chairs hotcloud11chairs@usenix.org ---------------------------------- 3rd USENIX Workshop on Hot Topics in Cloud Computing (HotCloud '11) June 14-15, 2011 Portland, OR Sponsored by USENIX in cooperation with ACM SIGOPS Early Bird Registration Extended Deadline: May 31, 2011 http://www.usenix.org/hotcloud11/progb ---------------------------------- From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 23:40:32 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8036A106564A for ; Fri, 27 May 2011 23:40:32 +0000 (UTC) (envelope-from vasanth.raonaik@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 581D28FC15 for ; Fri, 27 May 2011 23:40:32 +0000 (UTC) Received: by pzk27 with SMTP id 27so1228981pzk.13 for ; Fri, 27 May 2011 16:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=sJC1wyx4rjKtMqT7vcwDGPlcI2tybjTCW7OuVCe1RSw=; b=jt/tvHdlJJbW4TFZXUhRGOamlqxqol2swOb8cs0Oxnwm/bmL7QY1jQYjwMnin8wlWO VZJJGJT2QqqRw1l22S09FpOimIjsSlwvWT6Kx0PnqcSkYC9NkXYl9DIN/o66rlE5jwKT zKtE0nEWSuAflH/unSxewrTFB5n8CXra9NBR4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=kCFjIPy/1ZJVkDZhTtbbzuMwvMwBVpbebNEccqi1UArIeK0ef5L9hqzqMaJWa3Yq9Q lEkrZIILDeLNxKH4M8ev4WyaiWo4zmRXNCtsKBIBu6g5Yf9e+J0BK0J+3R3yEoncVStU 8xw3TQNhoxrDP4LTgmTll9Qg9nJTnaCKB7x+0= MIME-Version: 1.0 Received: by 10.68.14.202 with SMTP id r10mr1068100pbc.492.1306538209288; Fri, 27 May 2011 16:16:49 -0700 (PDT) Received: by 10.68.48.67 with HTTP; Fri, 27 May 2011 16:16:49 -0700 (PDT) Date: Fri, 27 May 2011 19:16:49 -0400 Message-ID: From: vasanth raonaik To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: double fault panic while using gdb amd64 (remote debugging) 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, 27 May 2011 23:40:32 -0000 Hello hackers, I see a "double fault" error on the console while remote debugging a freebsd kernel 6.1 on amd64 the moment I press continue on a break point. I googled and found similar query but couldn't find a solution to this issue. Is this a known issue? Has there been any fix made for this issue in the latest freebsd? here is the email that I found while searching. http://forum.nginx.org/read.php?23,183241 ================= Hi, I have looked at archives but with no output. I am running freebsd7.2 amd64 as a virtual machine(VM) in vmware ESX server. I have configured remote gdb to debug the kernel modules. My problem is that whenever the breakpoint is hit and the I issue next or step kernel panics with "double fault" error. This configuration was working for 32-bit machine very well. I am trying to debug the tmpfs module. Panic message on console is: Fatal double fault rip = 0xffffffff80552be1 rsp = 0xffffffff006f5000 rbp = 0xffffffff006f5000 cpuid = 0; apic id = 00 panic: double fault cpuid = 0 Uptime: 1h16m8s Physical memory: 4555 MB Dumping 207 MB: 192 176 160 144 128 112 96 80 64 48 32 16 Dump complete I tried searching this problem on google also but with no help. Any help will be appreciated. Thanks, Mayank ================= From owner-freebsd-hackers@FreeBSD.ORG Sat May 28 09:04:05 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 832AF106566B for ; Sat, 28 May 2011 09:04:05 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 208C78FC08 for ; Sat, 28 May 2011 09:04:04 +0000 (UTC) Received: from julian-mac.elischer.org (home-nat.elischer.org [67.100.89.137]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id p4S93rjc066918 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 28 May 2011 02:03:55 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4DE0BA7C.8080707@freebsd.org> Date: Sat, 28 May 2011 02:03:56 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Warner Losh References: <20110527.124553.718.1@DEV> <20110527134754.GA94769@freebsd.org> <20110527.164723.750.2@DEV> <496B0C04-7777-458D-A116-27944A4006BB@bsdimp.com> In-Reply-To: <496B0C04-7777-458D-A116-27944A4006BB@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: rank1seeker@gmail.com, hackers@freebsd.org Subject: Re: Active slice, only for a next boot 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, 28 May 2011 09:04:05 -0000 On 5/27/11 11:34 AM, Warner Losh wrote: > On May 27, 2011, at 10:47 AM, rank1seeker@gmail.com wrote: > >> ----- Original Message ----- >> From: Alexander Best >> To: rank1seeker@gmail.com >> Cc: hackers@freebsd.org >> Date: Fri, 27 May 2011 13:47:54 +0000 >> Subject: Re: Active slice, only for a next boot >> >>> On Fri May 27 11, rank1seeker@gmail.com wrote: >>>> Idea is ... >>>> I have i.e; 3 slices, of which first is active. >>>> Now I wana set slice 2 active, but only for a one/next boot. >>>> Once slice 2 is booted and system is shutdown or rebooted, once again, >> first slice is active and booted, without user's intervention. >>>> Is this possible or should be implemented? nextboot(8) USED to do this before it was broken by someone to "look into the filesystem" for it's next boot hint which is obviously broken if you are trying to get to another filesystem because the main one is broken. >>> take a look at the gpart(8) manual, expecially the ATTRIBUTES section. if >> you >>> are running with a GPT scheme you can use the "bootonce" attribute to do >>> exactly what you asked for. >>> >>> cheers. >>> alex >>> >> Thanls, but I need it for MBR. > gpart works with MBR. > > Warner > > _______________________________________________ > 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 May 28 09:34:31 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id DFBB21065686; Sat, 28 May 2011 09:34:31 +0000 (UTC) Date: Sat, 28 May 2011 09:34:31 +0000 From: Alexander Best To: Warner Losh Message-ID: <20110528093431.GA15636@freebsd.org> References: <20110527115147.GA73802@freebsd.org> <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> <20110527181459.GA29908@freebsd.org> <4B1CE52B-68E9-4AB4-82FA-FB1F8C622BF0@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B1CE52B-68E9-4AB4-82FA-FB1F8C622BF0@bsdimp.com> Cc: freebsd-hackers@freebsd.org, freebsd-toolchain@freebsd.org Subject: Re: [rfc] a few kern.mk and bsd.sys.mk related changes 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, 28 May 2011 09:34:32 -0000 On Fri May 27 11, Warner Losh wrote: > > On May 27, 2011, at 12:14 PM, Alexander Best wrote: > > > On Fri May 27 11, Warner Losh wrote: > >> These look generally good. Just one thing I had a question on: > >> > >> # > >> +# Enable FreeBSD kernel-specific printf format specifiers. Also instruct gcc to > >> +# enable some diagnostics, which make it easier to pinpoint tinderbox failures. > >> +CFLAGS+= -fformat-extensions -fdiagnostics-show-option > >> + > >> > >> Does this put sand in the gears of clang support? > > > > i don't think so. the code that features -fformat-extensions support is freebsd > > specific and gets plugged into the vendor code during every new import. dim@ > > and rdivacky@ have been discussing the possibility of getting this committed > > upstream as something like -ffreebsd-extensions, but they haven't decided, yet. > > OK. I have a bunch of uncommitted changes to support external toolchains, and this sort of thing might bite me when them... But I'll fight with that when I get there. well the main problem imho is -fformat-extensions. the code that supports this flag has not been pushed upstream neither to clang, nor to gcc. so compiling the freebsd kernel with anything external, like clang tot or gcc 4.6 will fail to recognise the special printf formatting. personally i think getting this committed upsteam to clang as -ffreebsd-extensions would be a nice thing to have. however it's not my decision to make. ;) the -fdiagnostics-show-option flag is a standard clang and gcc flag and won't cause any problems. the only difference between gcc and clang is: gcc has it disabled by default; clang has it enabled by default. i've reworked my patch yet again. it now features these changes: 1) -W is now called -Wextra 2) move -fformat-extensions and -fdiagnostics-show-option out of CWARNFLAGS, since they aren't really warnings. this will now let anybody use custom CWARNFLAGS without having to remember to add -fformat-extensions in order not to break buildworld. 3) rearrange "\" characters, as to avoid double spaces 4) when building kernel modules, -fstack-protector was added to CFLAGS twice. this should now be solved. 5) only enable -frename-registers, when gcc is used, since clang doesn't understand this flag 6) when debugging is enabled, also use the -O flag for amd64 and not -O2. when people enable debugging they don't really want optimisations such as -O2 turned on. the patch is available here: http://people.freebsd.org/~arundel/patches/kern.mk-bsd.sys.mk.patch NB: regarding point 2), i'd like to encurrage people to play around with CWARNFLAGS a bit. maybe we find some nice -Wwarning options which are reasonable to have and - most importantly - don't break tinderbox. for far i've played around with the following flags and can verify that they break tinderbox: -Wshadow, -Wwrite-strings, -Wextra, -Wbad-function-cast and -Wmissing-declarations -Wmissing-declarations almost works, but there are ~ 20 undeclared functions in the dtrace code. if those could be fixed it would be possible to add that flag to CWARNFLAGS. cheers. alex > > > regarding -fdiagnostics-show-option: this is intended purely for gcc, since it > > is disabled per default. under clang the flag exists, too, but it is enabled by > > default. so specifying it under clang is pretty much a nop. > > Cool. This is less of a concern, since it will be present in most external toolchains I care about. > > Warner > > > cheers. > > alex > > > >> > >> Warner > >> > >> > >> On May 27, 2011, at 5:51 AM, Alexander Best wrote: > >> > >>> hi there, > >>> > >>> i would like to hear people's opinion regarding the following patch. it > >>> features the following semantic changes: > >>> > >>> 1) -W is now called -Wextra > >>> 2) move -fformat-extensions and -fdiagnostics-show-option out of CWARNFLAGS, > >>> since they aren't really warnings. this will now let anybody use custom > >>> CWARNFLAGS without having to remember to add -fformat-extensions in order > >>> not to break buildworld. > >>> 3) rearrange "\" characters, as to avoid double spaces > >>> 4) when building kernel modules, -fstack-protector was added to CFLAGS twice. > >>> this should now be solved. > >>> > >>> cheers. > >>> alex > >>> > >>> -- > >>> a13x > >>> _______________________________________________ > >>> freebsd-toolchain@freebsd.org mailing list > >>> http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > >>> To unsubscribe, send any mail to "freebsd-toolchain-unsubscribe@freebsd.org" > > > > -- > > a13x > > > > -- a13x From owner-freebsd-hackers@FreeBSD.ORG Sat May 28 11:06:48 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 461C6106566B for ; Sat, 28 May 2011 11:06:48 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id BBD658FC13 for ; Sat, 28 May 2011 11:06:47 +0000 (UTC) Received: by bwz12 with SMTP id 12so2727719bwz.13 for ; Sat, 28 May 2011 04:06:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=xImvqhDbjU9ng867tQJyiCJQgO8VhGCnP1R4AO3wHrY=; b=j3ZSFDv9QRD5SWMDEDGlTs6EANgVpfnvHJYBC7Dc55MIds2EUN0M0hPYunRpYK7iNP ZHg+WQw+aLk/12Izlgdeb8OYPN+OiEZ7R28IzPa5wowlU1Iy9i/CLAHiLWuaW+j4EKc0 BFYjeA8Q64slN6Zwi1QnHB5oJAi/KSqZYQkLg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=vqw7WuNaPISn8GWHYGwy49d2xzhZ0DkdmSibj+asd5xWtNq/okSuBWyqQSIVKp/C4Z HIh2IjEcNCrxiwiFOUyrnHNVbtai67BYSUjiczOU1QtcUqQhtmr9S6v66pvyDgKSv/Nu BJgbAkihxC6ohmnlwiB19qOp4A5mINICc4BkA= MIME-Version: 1.0 Received: by 10.204.82.149 with SMTP id b21mr2525360bkl.196.1306580806363; Sat, 28 May 2011 04:06:46 -0700 (PDT) Received: by 10.204.66.81 with HTTP; Sat, 28 May 2011 04:06:46 -0700 (PDT) Received: by 10.204.66.81 with HTTP; Sat, 28 May 2011 04:06:46 -0700 (PDT) In-Reply-To: <4DE0BA7C.8080707@freebsd.org> References: <20110527.124553.718.1@DEV> <20110527134754.GA94769@freebsd.org> <20110527.164723.750.2@DEV> <496B0C04-7777-458D-A116-27944A4006BB@bsdimp.com> <4DE0BA7C.8080707@freebsd.org> Date: Sat, 28 May 2011 12:06:46 +0100 Message-ID: From: Chris Rees To: Julian Elischer Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: rank1seeker@gmail.com, hackers@freebsd.org Subject: Re: Active slice, only for a next boot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 11:06:48 -0000 On 28 May 2011 10:04, "Julian Elischer" wrote: > > On 5/27/11 11:34 AM, Warner Losh wrote: >> >> On May 27, 2011, at 10:47 AM, rank1seeker@gmail.com wrote: >> >>> ----- Original Message ----- >>> From: Alexander Best >>> To: rank1seeker@gmail.com >>> Cc: hackers@freebsd.org >>> Date: Fri, 27 May 2011 13:47:54 +0000 >>> Subject: Re: Active slice, only for a next boot >>> >>>> On Fri May 27 11, rank1seeker@gmail.com wrote: >>>>> >>>>> Idea is ... >>>>> I have i.e; 3 slices, of which first is active. >>>>> Now I wana set slice 2 active, but only for a one/next boot. >>>>> Once slice 2 is booted and system is shutdown or rebooted, once again, >>> >>> first slice is active and booted, without user's intervention. >>>>> >>>>> Is this possible or should be implemented? > > > nextboot(8) USED to do this before it was broken by someone to "look into the filesystem" > for it's next boot hint which is obviously broken if you are trying to get to another filesystem > because the main one is broken. > Doesn't sound that useful to me- I think of the main use for nextboot being to try new kernels on a one-time basis. If you're rescuing a broken filesystem surely it's better to just set another slice active? Chris From owner-freebsd-hackers@FreeBSD.ORG Sat May 28 13:06:43 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1107A106564A for ; Sat, 28 May 2011 13:06:43 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 96E378FC08 for ; Sat, 28 May 2011 13:06:42 +0000 (UTC) Received: by wwc33 with SMTP id 33so2556367wwc.31 for ; Sat, 28 May 2011 06:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=P0BLnd8Bcukb94jeKV7j+j+Z+SjgWvcqnPRak9iCoSU=; b=cTiajkstCwoBnS1LslV1E8ZohCVmie+oEc6zKPhdvy35D735WVfA7ZeSuOoO1bQ/Cv yqqqzMnO909VIADvG8zlpgBRtEPP4RCNYNQR7ZaTuMuW/Z+LqxcfuZRfAKg0184twFZ4 WfgaFtDGmApRxS2cREhlYHORDg0Ej1Y+mdWsg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; b=ec579S8QrkPf6hP3iR/mcgNxeP1Hvt2No6MspAwWQnXjPY+8BKG76k2vssV4BpgewZ PTjkOdisp1GcNrcZFsMf9zzHQ/wtKU6qMz0ZhSb7zno2OlRqjFeU0LqU4UJuQpP2xS9L na9fUiDgmgZujaIHKEXwwOB09x6GZebtTTuto= Received: by 10.216.35.76 with SMTP id t54mr732155wea.26.1306588001696; Sat, 28 May 2011 06:06:41 -0700 (PDT) Received: from DEV ([82.193.208.173]) by mx.google.com with ESMTPS id o19sm1830833wbh.4.2011.05.28.06.06.15 (version=SSLv3 cipher=OTHER); Sat, 28 May 2011 06:06:40 -0700 (PDT) Message-ID: <20110528.130639.921.1@DEV> From: rank1seeker@gmail.com To: hackers@freebsd.org Date: Sat, 28 May 2011 15:06:39 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20110527.124553.718.1@DEV> <20110527134754.GA94769@freebsd.org> <20110527.164723.750.2@DEV> <496B0C04-7777-458D-A116-27944A4006BB@bsdimp.com> <4DE0BA7C.8080707@freebsd.org> X-Mailer: POP Peeper (3.7.0.0) Cc: Subject: Re: Active slice, only for a next boot 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, 28 May 2011 13:06:43 -0000 And how about this:=0D=0A=0D=0A# boot0cfg -o noupdate -s 1=0D=0ANow when = you choose to hit slice 2, it is only for a this one boot.=0D=0ANext and = each boot, defaults to slice 1=0D=0A=0D=0AProblem is, that you must see, = early bootstrap, to manually choose, so this won't work on a remote = server.=0D=0AThis requires:=0D=0Aa) physicall access =0D=0A or=0D=0Ab) = ssh access to the remote box, which is conected via serial cable, to your = server.=0D=0A=0D=0AAnyone has any idea, for a case of a remote server, = which is accessible over ssh, only when it is = "up"?=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6 From owner-freebsd-hackers@FreeBSD.ORG Sat May 28 16:33:11 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F05811065672; Sat, 28 May 2011 16:33:11 +0000 (UTC) (envelope-from inyaoo@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4A8D58FC15; Sat, 28 May 2011 16:33:10 +0000 (UTC) Received: by fxm11 with SMTP id 11so2642255fxm.13 for ; Sat, 28 May 2011 09:33:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=OdAP1NTgAiylZpv6hXVgYbovWDxShxEJbRRn8+WtRqE=; b=spG+wEeNiQ4+zSaFaEZ1xkqyAtiwRGkjR/+5gJptO7ekWIE3MDHrGa/XJhGIeZp3xi o86G/RP2d4FOefAJHH2bkSMDKcvGJWuycui4goMcRBQFroGt/AUa4AgIRdGDFujjG8fU 0Knznn+yUksYohlDsYY7Dp0JsjO4C/nBOod7w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=OhmakvxrDIQ4qQj2yFd7duXIv6oSbA6Cr+c9CdQLu3lMKZ7U2lCywzZoS6KqeJG05+ 0eOWQQVLqT3w9ikZmIE3gTe5odSRzrmC1YurdXF8WwHy1s/+2hSGJZneZdaeRjK32TsC P/e41SGBEJbB5XjCxzvuN0FSRZave4YlPtNSc= Received: by 10.223.103.3 with SMTP id i3mr3637964fao.110.1306598894355; Sat, 28 May 2011 09:08:14 -0700 (PDT) Received: from localhost ([173.212.227.12]) by mx.google.com with ESMTPS id l26sm199140fah.14.2011.05.28.09.08.09 (version=SSLv3 cipher=OTHER); Sat, 28 May 2011 09:08:13 -0700 (PDT) From: Pan Tsu To: Alexander Best References: <20110527115147.GA73802@freebsd.org> <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> <20110527181459.GA29908@freebsd.org> <20110527182906.GA31871@freebsd.org> Date: Sat, 28 May 2011 20:08:05 +0400 In-Reply-To: <20110527182906.GA31871@freebsd.org> (Alexander Best's message of "Fri, 27 May 2011 18:29:06 +0000") Message-ID: <86oc2mlsey.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: freebsd-hackers@FreeBSD.ORG, freebsd-toolchain@FreeBSD.ORG Subject: Re: [rfc] a few kern.mk and bsd.sys.mk related changes 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, 28 May 2011 16:33:12 -0000 Alexander Best writes: > On Fri May 27 11, Alexander Best wrote: >> On Fri May 27 11, Warner Losh wrote: >> > These look generally good. Just one thing I had a question on: >> > >> > # >> > +# Enable FreeBSD kernel-specific printf format specifiers. Also instruct gcc to >> > +# enable some diagnostics, which make it easier to pinpoint tinderbox failures. >> > +CFLAGS+= -fformat-extensions -fdiagnostics-show-option >> > + >> > >> > Does this put sand in the gears of clang support? > > i've improved the above comment so as to note that clang won't be affected by > -fdiagnostics-show-option. the new patch is available here: > > http://people.freebsd.org/~arundel/patches/kern.mk-bsy.sys.mk.patch > > another "issue" i've come across is the fact that on amd64, -O2 is always being > set, no matter, if debugging is enabled or disabled. i think amd64 should also > (just like all the other archs) be using -O, when debugging was enabled. Any reason a kernel with symbols (DEBUG) *must* be pessimized to -O1 level? Looking at r140606 it's not clear how symbols are related to a bump from -O1 to -O2 for non-amd64 archs. And -RELEASE kernels since at least 6.0R have `makeoptions DEBUG=-g' uncommented in GENERIC. > changing this is quite easy. so if people think this is something worth > changing i can integrate it into my existing patch. From owner-freebsd-hackers@FreeBSD.ORG Sat May 28 18:07:11 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DBD7106564A for ; Sat, 28 May 2011 18:07:11 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id CB17E8FC0A for ; Sat, 28 May 2011 18:07:06 +0000 (UTC) Received: from julian-mac.elischer.org (home-nat.elischer.org [67.100.89.137]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id p4SI6vhb069219 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 28 May 2011 11:06:59 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4DE139C9.2080808@freebsd.org> Date: Sat, 28 May 2011 11:07:05 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: rank1seeker@gmail.com References: <20110527.124553.718.1@DEV> <20110527134754.GA94769@freebsd.org> <20110527.164723.750.2@DEV> <496B0C04-7777-458D-A116-27944A4006BB@bsdimp.com> <4DE0BA7C.8080707@freebsd.org> <20110528.130639.921.1@DEV> In-Reply-To: <20110528.130639.921.1@DEV> Content-Type: text/plain; charset=windows-1250; format=flowed Content-Transfer-Encoding: 8bit Cc: Doug Ambrisko , hackers@freebsd.org Subject: Re: Active slice, only for a next boot 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, 28 May 2011 18:07:11 -0000 On 5/28/11 6:06 AM, rank1seeker@gmail.com wrote: > And how about this: > > # boot0cfg -o noupdate -s 1 > Now when you choose to hit slice 2, it is only for a this one boot. > Next and each boot, defaults to slice 1 > > Problem is, that you must see, early bootstrap, to manually choose, so this won't work on a remote server. > This requires: > a) physicall access > or > b) ssh access to the remote box, which is conected via serial cable, to your server. > > Anyone has any idea, for a case of a remote server, which is accessible over ssh, only when it is "up"? pull the old bootblocks from about 2000 and use them. and nextboot as well they do exactly what you want. OR ask Doug Ambrisko (cc'd) for a copy of them that he still uses at work. He may have updates to make them work with modern systems that would save you time. the old nextboot(8) stored instructions as to what to do on block 1 of the drive (you can make it a small 1 block partition if you want). Actually it stored a series of them, NULL separated. On each boot the boot 0 bloter would read the first (after skipping any nulls) and then write Nulls over what it just read and write it back to block 1. so it would progress gradualy boot by boot over the sequence written by nextboot. it would pass on the stack, what it had read to boot1. the format was "hd(1,a)/boot/loader" (for example) personally I would like to hav ethis capabiltiy back because it's stupid rely on a possibly dead filesystem to get around booting from the possibly dead filesystem. by default we used to have a /etc/rc entry that would rewrite the 'current' setup several times on successful boot, followed by a couple of alternate boot targets. If boot failed a coupke of times it would automatically boot from the second drive or from another partition, .. > > Domagoj Smolčić > _______________________________________________ > 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 May 28 18:10:26 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDAEE106566C for ; Sat, 28 May 2011 18:10:26 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id AF7098FC08 for ; Sat, 28 May 2011 18:10:26 +0000 (UTC) Received: from julian-mac.elischer.org (home-nat.elischer.org [67.100.89.137]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id p4SIAEj7069232 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 28 May 2011 11:10:16 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4DE13A8D.8030101@freebsd.org> Date: Sat, 28 May 2011 11:10:21 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: utisoft@gmail.com References: <20110527.124553.718.1@DEV> <20110527134754.GA94769@freebsd.org> <20110527.164723.750.2@DEV> <496B0C04-7777-458D-A116-27944A4006BB@bsdimp.com> <4DE0BA7C.8080707@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: rank1seeker@gmail.com, hackers@freebsd.org Subject: Re: Active slice, only for a next boot 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, 28 May 2011 18:10:27 -0000 On 5/28/11 4:06 AM, Chris Rees wrote: > > > On 28 May 2011 10:04, "Julian Elischer" > wrote: > > > > On 5/27/11 11:34 AM, Warner Losh wrote: > >> > >> On May 27, 2011, at 10:47 AM, rank1seeker@gmail.com > wrote: > >> > >>> ----- Original Message ----- > >>> From: Alexander Best > > >>> To: rank1seeker@gmail.com > >>> Cc: hackers@freebsd.org > >>> Date: Fri, 27 May 2011 13:47:54 +0000 > >>> Subject: Re: Active slice, only for a next boot > >>> > >>>> On Fri May 27 11, rank1seeker@gmail.com > wrote: > >>>>> > >>>>> Idea is ... > >>>>> I have i.e; 3 slices, of which first is active. > >>>>> Now I wana set slice 2 active, but only for a one/next boot. > >>>>> Once slice 2 is booted and system is shutdown or rebooted, > once again, > >>> > >>> first slice is active and booted, without user's intervention. > >>>>> > >>>>> Is this possible or should be implemented? > > > > > > nextboot(8) USED to do this before it was broken by someone to > "look into the filesystem" > > for it's next boot hint which is obviously broken if you are > trying to get to another filesystem > > because the main one is broken. > > > > Doesn't sound that useful to me- I think of the main use for > nextboot being to try new kernels on a one-time basis. If you're > rescuing a broken filesystem surely it's better to just set another > slice active? > try using it on an appliance it has to recover on its own from a complete filesystem screwup. > Chris > From owner-freebsd-hackers@FreeBSD.ORG Sat May 28 18:17:08 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ED69106566B for ; Sat, 28 May 2011 18:17:08 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 37F218FC0C for ; Sat, 28 May 2011 18:17:07 +0000 (UTC) Received: from julian-mac.elischer.org (home-nat.elischer.org [67.100.89.137]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id p4SIH4wQ069257 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 28 May 2011 11:17:06 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4DE13C28.8070702@freebsd.org> Date: Sat, 28 May 2011 11:17:12 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: utisoft@gmail.com References: <20110527.124553.718.1@DEV> <20110527134754.GA94769@freebsd.org> <20110527.164723.750.2@DEV> <496B0C04-7777-458D-A116-27944A4006BB@bsdimp.com> <4DE0BA7C.8080707@freebsd.org> <4DE13A8D.8030101@freebsd.org> In-Reply-To: <4DE13A8D.8030101@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: rank1seeker@gmail.com, hackers@freebsd.org Subject: Re: Active slice, only for a next boot 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, 28 May 2011 18:17:08 -0000 On 5/28/11 11:10 AM, Julian Elischer wrote: > On 5/28/11 4:06 AM, Chris Rees wrote: >> >> >> On 28 May 2011 10:04, "Julian Elischer" > > wrote: >> > >> > On 5/27/11 11:34 AM, Warner Losh wrote: >> >> >> >> On May 27, 2011, at 10:47 AM, rank1seeker@gmail.com >> wrote: >> >> >> >>> ----- Original Message ----- >> >>> From: Alexander Best> > >> >>> To: rank1seeker@gmail.com >> >>> Cc: hackers@freebsd.org >> >>> Date: Fri, 27 May 2011 13:47:54 +0000 >> >>> Subject: Re: Active slice, only for a next boot >> >>> >> >>>> On Fri May 27 11, rank1seeker@gmail.com >> wrote: >> >>>>> >> >>>>> Idea is ... >> >>>>> I have i.e; 3 slices, of which first is active. >> >>>>> Now I wana set slice 2 active, but only for a one/next boot. >> >>>>> Once slice 2 is booted and system is shutdown or rebooted, >> once again, >> >>> >> >>> first slice is active and booted, without user's intervention. >> >>>>> >> >>>>> Is this possible or should be implemented? >> > >> > >> > nextboot(8) USED to do this before it was broken by someone to >> "look into the filesystem" >> > for it's next boot hint which is obviously broken if you are >> trying to get to another filesystem >> > because the main one is broken. >> > >> >> Doesn't sound that useful to me- I think of the main use for >> nextboot being to try new kernels on a one-time basis. If you're >> rescuing a broken filesystem surely it's better to just set another >> slice active? >> > > try using it on an appliance > > it has to recover on its own from a complete filesystem screwup. i.e. a 100% recovery with NO HUMAN INTERVENTION. even in the case of a dead/dieing drive. (requires that bios has drive boot order feature) I will add that this functionality is so useful that several companies still maintain the old bootblocks internally (e.g. cisco) The new functionality was introduced without an consultation and the old functionality just 'lost'. Which was just bad design and project management.. > >> Chris >> > > _______________________________________________ > 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 May 28 18:23:26 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: by hub.freebsd.org (Postfix, from userid 1233) id 3A5E0106566C; Sat, 28 May 2011 18:23:26 +0000 (UTC) Date: Sat, 28 May 2011 18:23:26 +0000 From: Alexander Best To: Pan Tsu Message-ID: <20110528182326.GA75447@freebsd.org> References: <20110527115147.GA73802@freebsd.org> <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> <20110527181459.GA29908@freebsd.org> <20110527182906.GA31871@freebsd.org> <86oc2mlsey.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86oc2mlsey.fsf@gmail.com> Cc: freebsd-hackers@FreeBSD.ORG, freebsd-toolchain@FreeBSD.ORG Subject: Re: [rfc] a few kern.mk and bsd.sys.mk related changes 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, 28 May 2011 18:23:26 -0000 On Sat May 28 11, Pan Tsu wrote: > Alexander Best writes: > > > On Fri May 27 11, Alexander Best wrote: > >> On Fri May 27 11, Warner Losh wrote: > >> > These look generally good. Just one thing I had a question on: > >> > > >> > # > >> > +# Enable FreeBSD kernel-specific printf format specifiers. Also instruct gcc to > >> > +# enable some diagnostics, which make it easier to pinpoint tinderbox failures. > >> > +CFLAGS+= -fformat-extensions -fdiagnostics-show-option > >> > + > >> > > >> > Does this put sand in the gears of clang support? > > > > i've improved the above comment so as to note that clang won't be affected by > > -fdiagnostics-show-option. the new patch is available here: > > > > http://people.freebsd.org/~arundel/patches/kern.mk-bsy.sys.mk.patch > > > > another "issue" i've come across is the fact that on amd64, -O2 is always being > > set, no matter, if debugging is enabled or disabled. i think amd64 should also > > (just like all the other archs) be using -O, when debugging was enabled. > > Any reason a kernel with symbols (DEBUG) *must* be pessimized to -O1 level? > Looking at r140606 it's not clear how symbols are related to a bump > from -O1 to -O2 for non-amd64 archs. And -RELEASE kernels since at least > 6.0R have `makeoptions DEBUG=-g' uncommented in GENERIC. well i'm not an expert on this. but are we 100% sure that a kernel on amd64 compiled with -O2 frename-registers can be debugged the same way as one with -O? if that is the case: sure...-O2 is fine. ;) however i've often read messages - mostly by bruce evans - claiming that anything greater than -O will in fact decrease a kernel's ability to be debugged just as well as a kernel with -O. cheers. alex > > > changing this is quite easy. so if people think this is something worth > > changing i can integrate it into my existing patch. -- a13x From owner-freebsd-hackers@FreeBSD.ORG Sat May 28 18:36:23 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: by hub.freebsd.org (Postfix, from userid 1233) id 5E48F1065674; Sat, 28 May 2011 18:36:23 +0000 (UTC) Date: Sat, 28 May 2011 18:36:23 +0000 From: Alexander Best To: Pan Tsu Message-ID: <20110528183623.GA77277@freebsd.org> References: <20110527115147.GA73802@freebsd.org> <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> <20110527181459.GA29908@freebsd.org> <20110527182906.GA31871@freebsd.org> <86oc2mlsey.fsf@gmail.com> <20110528182326.GA75447@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110528182326.GA75447@freebsd.org> Cc: freebsd-hackers@FreeBSD.ORG, freebsd-toolchain@FreeBSD.ORG Subject: Re: [rfc] a few kern.mk and bsd.sys.mk related changes 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, 28 May 2011 18:36:23 -0000 On Sat May 28 11, Alexander Best wrote: > On Sat May 28 11, Pan Tsu wrote: > > Alexander Best writes: > > > > > On Fri May 27 11, Alexander Best wrote: > > >> On Fri May 27 11, Warner Losh wrote: > > >> > These look generally good. Just one thing I had a question on: > > >> > > > >> > # > > >> > +# Enable FreeBSD kernel-specific printf format specifiers. Also instruct gcc to > > >> > +# enable some diagnostics, which make it easier to pinpoint tinderbox failures. > > >> > +CFLAGS+= -fformat-extensions -fdiagnostics-show-option > > >> > + > > >> > > > >> > Does this put sand in the gears of clang support? > > > > > > i've improved the above comment so as to note that clang won't be affected by > > > -fdiagnostics-show-option. the new patch is available here: > > > > > > http://people.freebsd.org/~arundel/patches/kern.mk-bsy.sys.mk.patch > > > > > > another "issue" i've come across is the fact that on amd64, -O2 is always being > > > set, no matter, if debugging is enabled or disabled. i think amd64 should also > > > (just like all the other archs) be using -O, when debugging was enabled. > > > > Any reason a kernel with symbols (DEBUG) *must* be pessimized to -O1 level? > > Looking at r140606 it's not clear how symbols are related to a bump > > from -O1 to -O2 for non-amd64 archs. And -RELEASE kernels since at least > > 6.0R have `makeoptions DEBUG=-g' uncommented in GENERIC. > > well i'm not an expert on this. but are we 100% sure that a kernel on amd64 > compiled with -O2 frename-registers can be debugged the same way as one with > -O? if that is the case: sure...-O2 is fine. ;) > > however i've often read messages - mostly by bruce evans - claiming that > anything greater than -O will in fact decrease a kernel's ability to be > debugged just as well as a kernel with -O. ok. so here are two seperate patches: http://people.freebsd.org/~arundel/patches/kern.mk-bsd.sys.mk.patch ^^ this one will trigger -O on amd64, when debugging was enabled. http://people.freebsd.org/~arundel/patches/kern.mk-bsd.sys.mk-O2.patch ^^ this one will leave the semantics as they are, so even when debugging was enabled, -O2 gets set under amd64. cheers. alex > > cheers. > alex > > > > > > changing this is quite easy. so if people think this is something worth > > > changing i can integrate it into my existing patch. > > -- > a13x -- a13x From owner-freebsd-hackers@FreeBSD.ORG Sat May 28 20:26:21 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D411106566C; Sat, 28 May 2011 20:26:21 +0000 (UTC) (envelope-from brucec@muon.cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id B0C558FC16; Sat, 28 May 2011 20:26:20 +0000 (UTC) Received: by muon.cran.org.uk (Postfix, from userid 1001) id B0FC1E6300; Sat, 28 May 2011 21:26:19 +0100 (BST) Date: Sat, 28 May 2011 21:26:19 +0100 From: Bruce Cran To: Alexander Best Message-ID: <20110528202619.GA27204@muon.cran.org.uk> References: <20110527115147.GA73802@freebsd.org> <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> <20110527181459.GA29908@freebsd.org> <20110527182906.GA31871@freebsd.org> <86oc2mlsey.fsf@gmail.com> <20110528182326.GA75447@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110528182326.GA75447@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@FreeBSD.ORG, freebsd-toolchain@FreeBSD.ORG, Pan Tsu Subject: Re: [rfc] a few kern.mk and bsd.sys.mk related changes 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, 28 May 2011 20:26:21 -0000 On Sat, May 28, 2011 at 06:23:26PM +0000, Alexander Best wrote: > > well i'm not an expert on this. but are we 100% sure that a kernel on amd64 > compiled with -O2 frename-registers can be debugged the same way as one with > -O? if that is the case: sure...-O2 is fine. ;) > > however i've often read messages - mostly by bruce evans - claiming that > anything greater than -O will in fact decrease a kernel's ability to be > debugged just as well as a kernel with -O. > The critical option when -O2 is used is -fno-omit-frame-pointers, since removing frame pointers makes debugging impossible (on i386). With -O2 code is moved around and removed, so debugging is more difficult, but can still provide useful information. -- Bruce Cran From owner-freebsd-hackers@FreeBSD.ORG Sat May 28 20:39:24 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: by hub.freebsd.org (Postfix, from userid 1233) id A854C1065670; Sat, 28 May 2011 20:39:24 +0000 (UTC) Date: Sat, 28 May 2011 20:39:24 +0000 From: Alexander Best To: Bruce Cran Message-ID: <20110528203924.GA88186@freebsd.org> References: <20110527115147.GA73802@freebsd.org> <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> <20110527181459.GA29908@freebsd.org> <20110527182906.GA31871@freebsd.org> <86oc2mlsey.fsf@gmail.com> <20110528182326.GA75447@freebsd.org> <20110528202619.GA27204@muon.cran.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110528202619.GA27204@muon.cran.org.uk> Cc: freebsd-hackers@FreeBSD.ORG, freebsd-toolchain@FreeBSD.ORG, Pan Tsu Subject: Re: [rfc] a few kern.mk and bsd.sys.mk related changes 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, 28 May 2011 20:39:24 -0000 On Sat May 28 11, Bruce Cran wrote: > On Sat, May 28, 2011 at 06:23:26PM +0000, Alexander Best wrote: > > > > well i'm not an expert on this. but are we 100% sure that a kernel on amd64 > > compiled with -O2 frename-registers can be debugged the same way as one with > > -O? if that is the case: sure...-O2 is fine. ;) > > > > however i've often read messages - mostly by bruce evans - claiming that > > anything greater than -O will in fact decrease a kernel's ability to be > > debugged just as well as a kernel with -O. > > > > The critical option when -O2 is used is -fno-omit-frame-pointers, since removing > frame pointers makes debugging impossible (on i386). With -O2 code is moved around and > removed, so debugging is more difficult, but can still provide useful > information. how about making -fno-omit-frame-pointers mandatory for all builds with an optimisation level higher than -O? something like .if !empty(COPTFLAGS:M-O[234sz]) && empty(COPTFLAGS:M-fno-omit-frame-pointers) COPTFLAGS+= -fno-omit-frame-pointers .endif (-O4 and -Oz are clang specific, but it won't hurt having them in there) cheers. alex > > -- > Bruce Cran -- a13x From owner-freebsd-hackers@FreeBSD.ORG Sat May 28 21:32:44 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: by hub.freebsd.org (Postfix, from userid 1233) id C99031065674; Sat, 28 May 2011 21:32:44 +0000 (UTC) Date: Sat, 28 May 2011 21:32:44 +0000 From: Alexander Best To: Bruce Cran Message-ID: <20110528213244.GA93335@freebsd.org> References: <20110527115147.GA73802@freebsd.org> <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> <20110527181459.GA29908@freebsd.org> <20110527182906.GA31871@freebsd.org> <86oc2mlsey.fsf@gmail.com> <20110528182326.GA75447@freebsd.org> <20110528202619.GA27204@muon.cran.org.uk> <20110528203924.GA88186@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110528203924.GA88186@freebsd.org> Cc: freebsd-hackers@FreeBSD.ORG, freebsd-toolchain@FreeBSD.ORG, Pan Tsu Subject: Re: [rfc] a few kern.mk and bsd.sys.mk related changes 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, 28 May 2011 21:32:44 -0000 On Sat May 28 11, Alexander Best wrote: > On Sat May 28 11, Bruce Cran wrote: > > On Sat, May 28, 2011 at 06:23:26PM +0000, Alexander Best wrote: > > > > > > well i'm not an expert on this. but are we 100% sure that a kernel on amd64 > > > compiled with -O2 frename-registers can be debugged the same way as one with > > > -O? if that is the case: sure...-O2 is fine. ;) > > > > > > however i've often read messages - mostly by bruce evans - claiming that > > > anything greater than -O will in fact decrease a kernel's ability to be > > > debugged just as well as a kernel with -O. > > > > > > > The critical option when -O2 is used is -fno-omit-frame-pointers, since removing > > frame pointers makes debugging impossible (on i386). With -O2 code is moved around and > > removed, so debugging is more difficult, but can still provide useful > > information. > > how about making -fno-omit-frame-pointers mandatory for all builds with an > optimisation level higher than -O? man this is confusing. why must the freebsd make skeleton be so complicated. :( it seems -fno-omit-frame-pointers gets set in sys/conf/Makefile.amd64 and sys/conf/Makefile.powerpc already. also for modules in sys/conf/kmod.mk. i guess somebody with a better in deth knowledge should investigate this matter. this is a bit too complicated for me. cheers. alex > > something like > > .if !empty(COPTFLAGS:M-O[234sz]) && empty(COPTFLAGS:M-fno-omit-frame-pointers) > COPTFLAGS+= -fno-omit-frame-pointers > .endif > > (-O4 and -Oz are clang specific, but it won't hurt having them in there) > > cheers. > alex > > > > > -- > > Bruce Cran > > -- > a13x -- a13x