From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 29 23:56:13 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 3F8F6106566B; Sat, 29 Jan 2011 23:56:13 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id B36198FC0C; Sat, 29 Jan 2011 23:56:12 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 988791E00161; Sun, 30 Jan 2011 00:56:11 +0100 (CET) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.3) with ESMTP id p0TNsnmQ016964; Sun, 30 Jan 2011 00:54:49 +0100 (CET) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.4/8.14.3/Submit) id p0TNsn1p016963; Sun, 30 Jan 2011 00:54:49 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Sun, 30 Jan 2011 00:54:48 +0100 To: Kostik Belousov Message-ID: <20110129235448.GA15788@triton8.kn-bremen.de> References: <20110129201000.GA10774@triton8.kn-bremen.de> <20110129205105.GI2518@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110129205105.GI2518@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Sun, 30 Jan 2011 00:45:33 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, Juergen Lock Subject: Re: Can vm_mmap()/vm_map_remove() be called with giant held? (linuxolator dvb patches) 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, 29 Jan 2011 23:56:13 -0000 On Sat, Jan 29, 2011 at 10:51:05PM +0200, Kostik Belousov wrote: > On Sat, Jan 29, 2011 at 09:10:00PM +0100, Juergen Lock wrote: > > Hi! > > > > I was kinda hoping to be able to post a correct patch in public but > > getting an answer to ${Subject} seems to be more difficult than I > > thought... :) So, does anyone here know? copyout_map() and > You do not need Giant locked for vm_map* functions. > The question was more do I need to drop it first before calling them... > > copyout_unmap() are copied from ksyms_map() from sys/dev/ksyms/ksyms.c > > - should there maybe be global versions instead of two static copies > > each, and what would be good names? And giant is taken by linux_ioctl() > Would you make a patch for this ? > Heh if you want me to... Where should they go and are my name choices ok? > > in the same source file before calling the parts I added. So here > > comes the patch, it is to add support for dvb ioctls to the linuxolator > > as discussed on -emulation earlier in this thread: > > > > http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-January/011575.html > > > > (patch also at: > > > > http://people.freebsd.org/~nox/dvb/linux-dvb.patch > > > > and a version for 8, which is what I tested with w_scan on dvb-s2 > > and dvb-t, and Andrew Gallatin also tested it with SageTV: > > > > http://people.freebsd.org/~nox/dvb/linux-dvb-8.patch > > > > ) > > > > Thanx! > > Juergen > > > > Index: src/sys/compat/linux/linux_ioctl.c > > =================================================================== > > RCS file: /home/scvs/src/sys/compat/linux/linux_ioctl.c,v > > retrieving revision 1.167 > > diff -u -p -r1.167 linux_ioctl.c > > --- src/sys/compat/linux/linux_ioctl.c 30 Dec 2010 02:18:04 -0000 1.167 > > +++ src/sys/compat/linux/linux_ioctl.c 18 Jan 2011 17:10:21 -0000 > > @@ -59,6 +59,14 @@ __FBSDID("$FreeBSD: src/sys/compat/linux > > #include > > #include > > #include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > > > #include > > #include > > @@ -83,6 +91,9 @@ __FBSDID("$FreeBSD: src/sys/compat/linux > > #include > > #include > > > > +#include > > +#include > > + > > CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); > > > > static linux_ioctl_function_t linux_ioctl_cdrom; > > @@ -97,6 +108,7 @@ static linux_ioctl_function_t linux_ioct > > static linux_ioctl_function_t linux_ioctl_drm; > > static linux_ioctl_function_t linux_ioctl_sg; > > static linux_ioctl_function_t linux_ioctl_v4l; > > +static linux_ioctl_function_t linux_ioctl_dvb; > > static linux_ioctl_function_t linux_ioctl_special; > > static linux_ioctl_function_t linux_ioctl_fbsd_usb; > > > > @@ -124,6 +136,8 @@ static struct linux_ioctl_handler sg_han > > { linux_ioctl_sg, LINUX_IOCTL_SG_MIN, LINUX_IOCTL_SG_MAX }; > > static struct linux_ioctl_handler video_handler = > > { linux_ioctl_v4l, LINUX_IOCTL_VIDEO_MIN, LINUX_IOCTL_VIDEO_MAX }; > > +static struct linux_ioctl_handler dvb_handler = > > +{ linux_ioctl_dvb, LINUX_IOCTL_DVB_MIN, LINUX_IOCTL_DVB_MAX }; > > static struct linux_ioctl_handler fbsd_usb = > > { linux_ioctl_fbsd_usb, FBSD_LUSB_MIN, FBSD_LUSB_MAX }; > > > > @@ -139,6 +153,7 @@ DATA_SET(linux_ioctl_handler_set, privat > > DATA_SET(linux_ioctl_handler_set, drm_handler); > > DATA_SET(linux_ioctl_handler_set, sg_handler); > > DATA_SET(linux_ioctl_handler_set, video_handler); > > +DATA_SET(linux_ioctl_handler_set, dvb_handler); > > DATA_SET(linux_ioctl_handler_set, fbsd_usb); > > > > struct handler_element > > @@ -2989,6 +3004,251 @@ linux_ioctl_special(struct thread *td, s > > } > > > > /* > > + * Map some anonymous memory in user space of size sz, rounded up to the page > > + * boundary. > > + */ > > +static int > > +copyout_map(struct thread *td, vm_offset_t *addr, size_t sz) > > +{ > > + struct vmspace *vms = td->td_proc->p_vmspace; > Style recommends not to initialize in the declaration section. > [I do not repeat systematic style violations notes below]. > Heh as I said copyout_map() and copyout_unmap() are exact copies from ksyms_map() out of sys/dev/ksyms/ksyms.c so I didnt change those other than the names... > > + int error; > > + vm_size_t size; > > + > > + > One empty line is enough. > > > + /* > > + * Map somewhere after heap in process memory. > > + */ > > + PROC_LOCK(td->td_proc); > > + *addr = round_page((vm_offset_t)vms->vm_daddr + > > + lim_max(td->td_proc, RLIMIT_DATA)); > > + PROC_UNLOCK(td->td_proc); > Are you sure that this is needed ? Why not leave the address selection > to the VM ? > I don't know, maybe sys/dev/ksyms/ksyms.c has a reason? > > + > > + /* round size up to page boundry */ > > + size = (vm_size_t) round_page(sz); > > + > > + error = vm_mmap(&vms->vm_map, addr, size, PROT_READ | PROT_WRITE, > > + VM_PROT_ALL, MAP_PRIVATE | MAP_ANON, OBJT_DEFAULT, NULL, 0); > > + > > + return (error); > > +} > > + > > +/* > > + * Unmap memory in user space. > > + */ > > +static int > > +copyout_unmap(struct thread *td, vm_offset_t addr, size_t sz) > > +{ > > + vm_map_t map; > > + vm_size_t size; > > + > > + map = &td->td_proc->p_vmspace->vm_map; > > + size = (vm_size_t) round_page(sz); > > + > > + if (!vm_map_remove(map, addr, addr + size)) > Better do if (vm_map_remove(...) != KERN_SUCCESS) > > > + return (EINVAL); > > + > > + return (0); > > +} > > + > > +static int > > +linux_to_bsd_dtv_properties(struct l_dtv_properties *lvps, struct dtv_properties *vps) > > +{ > Empty line between (empty) declaration section and executable statements. > Ok. > > + vps->num = lvps->num; > > + vps->props = PTRIN(lvps->props); /* possible pointer size conversion */ > > + return (0); > > +} > > + > > +static int > > +linux_to_bsd_dtv_property(struct l_dtv_property *lvp, struct dtv_property *vp) > > +{ > > + /* > > + * everything until u.buffer.reserved2 is fixed size so > > + * just memcpy it. > > + */ > > + memcpy(vp, lvp, offsetof(struct l_dtv_property, u.buffer.reserved2)); > > + /* > > + * the pointer may be garbage since it's part of a union, > > + * currently no Linux code uses it so just set it to NULL. > > + */ > > + vp->u.buffer.reserved2 = NULL; > > + vp->result = lvp->result; > > + return (0); > > +} > > + > > +static int > > +bsd_to_linux_dtv_property(struct dtv_property *vp, struct l_dtv_property *lvp) > > +{ > > + /* > > + * everything until u.buffer.reserved2 is fixed size so > > + * just memcpy it. > > + */ > > + memcpy(lvp, vp, offsetof(struct l_dtv_property, u.buffer.reserved2)); > > + /* > > + * the pointer may be garbage since it's part of a union, > > + * currently no Linux code uses it so just set it to NULL. > > + */ > > + lvp->u.buffer.reserved2 = PTROUT(NULL); > > + lvp->result = vp->result; > > + return (0); > > +} > > + > > +static int > > +linux_ioctl_dvb(struct thread *td, struct linux_ioctl_args *args) > > +{ > > + struct file *fp; > > + int error, i; > > + struct l_dtv_properties l_vps; > > + struct dtv_properties vps; > > + struct l_dtv_property *l_vp = NULL, *l_p; > > + struct dtv_property *vp = NULL, *p; > > + size_t l_propsiz, propsiz; > > + vm_offset_t uvp; > > + > > + switch (args->cmd & 0xffff) { > > + case LINUX_AUDIO_STOP: > > + case LINUX_AUDIO_PLAY: > > + case LINUX_AUDIO_PAUSE: > > + case LINUX_AUDIO_CONTINUE: > > + case LINUX_AUDIO_SELECT_SOURCE: > > + case LINUX_AUDIO_SET_MUTE: > > + case LINUX_AUDIO_SET_AV_SYNC: > > + case LINUX_AUDIO_SET_BYPASS_MODE: > > + case LINUX_AUDIO_CHANNEL_SELECT: > > + case LINUX_AUDIO_CLEAR_BUFFER: > > + case LINUX_AUDIO_SET_ID: > > + case LINUX_AUDIO_SET_STREAMTYPE: > > + case LINUX_AUDIO_SET_EXT_ID: > > + case LINUX_AUDIO_BILINGUAL_CHANNEL_SELECT: > > + case LINUX_DMX_START: > > + case LINUX_DMX_STOP: > > + case LINUX_DMX_SET_BUFFER_SIZE: > > + case LINUX_NET_REMOVE_IF: > > + case LINUX_FE_DISEQC_RESET_OVERLOAD: > > + case LINUX_FE_DISEQC_SEND_BURST: > > + case LINUX_FE_SET_TONE: > > + case LINUX_FE_SET_VOLTAGE: > > + case LINUX_FE_ENABLE_HIGH_LNB_VOLTAGE: > > + case LINUX_FE_DISHNETWORK_SEND_LEGACY_CMD: > > + case LINUX_FE_SET_FRONTEND_TUNE_MODE: > > + case LINUX_CA_RESET: > > + if ((args->cmd & IOC_DIRMASK) != LINUX_IOC_VOID) > > + return ENOIOCTL; > > + args->cmd = (args->cmd & 0xffff) | IOC_VOID; > > + break; > > + > > + case LINUX_DMX_REMOVE_PID: > > + /* overlaps with LINUX_NET_ADD_IF */ > > + if ((args->cmd & IOC_DIRMASK) == LINUX_IOC_INOUT) > > + goto net_add_if; > > + /* FALLTHRU */ > > + case LINUX_AUDIO_SET_MIXER: > > + case LINUX_AUDIO_SET_ATTRIBUTES: > > + case LINUX_AUDIO_SET_KARAOKE: > > + case LINUX_DMX_SET_FILTER: > > + case LINUX_DMX_SET_PES_FILTER: > > + case LINUX_DMX_SET_SOURCE: > > + case LINUX_DMX_ADD_PID: > > + case LINUX_FE_DISEQC_SEND_MASTER_CMD: > > + case LINUX_FE_SET_FRONTEND: > > + case LINUX_CA_SEND_MSG: > > + case LINUX_CA_SET_DESCR: > > + case LINUX_CA_SET_PID: > > + args->cmd = (args->cmd & ~IOC_DIRMASK) | IOC_IN; > > + break; > > + > > + case LINUX_AUDIO_GET_STATUS: > > + case LINUX_AUDIO_GET_CAPABILITIES: > > + case LINUX_AUDIO_GET_PTS: > > + case LINUX_DMX_GET_PES_PIDS: > > + case LINUX_DMX_GET_CAPS: > > + case LINUX_FE_GET_INFO: > > + case LINUX_FE_DISEQC_RECV_SLAVE_REPLY: > > + case LINUX_FE_READ_STATUS: > > + case LINUX_FE_READ_BER: > > + case LINUX_FE_READ_SIGNAL_STRENGTH: > > + case LINUX_FE_READ_SNR: > > + case LINUX_FE_READ_UNCORRECTED_BLOCKS: > > + case LINUX_FE_GET_FRONTEND: > > + case LINUX_FE_GET_EVENT: > > + case LINUX_CA_GET_CAP: > > + case LINUX_CA_GET_SLOT_INFO: > > + case LINUX_CA_GET_DESCR_INFO: > > + case LINUX_CA_GET_MSG: > > + args->cmd = (args->cmd & ~IOC_DIRMASK) | IOC_OUT; > > + break; > > + > > + case LINUX_DMX_GET_STC: > > + case LINUX_NET_GET_IF: > > + net_add_if: > > + args->cmd = (args->cmd & ~IOC_DIRMASK) | IOC_INOUT; > > + break; > > + > > + case LINUX_FE_SET_PROPERTY: > > + case LINUX_FE_GET_PROPERTY: > > + error = copyin((void *) args->arg, &l_vps, sizeof(l_vps)); > > + if (error) > > + return (error); > > + linux_to_bsd_dtv_properties(&l_vps, &vps); > > + if ((vps.num == 0) || vps.num > DTV_IOCTL_MAX_MSGS) > > + return EINVAL; > > + > > + l_propsiz = vps.num * sizeof(*l_vp); > > + propsiz = vps.num * sizeof(*vp); > > + if (((l_vp = malloc(l_propsiz, M_LINUX, M_WAITOK)) == NULL) || > > + (vp = malloc(propsiz, M_LINUX, M_WAITOK)) == NULL) { > Malloc(M_WAITOK) is guaranteed to never return NULL, you do not need the > checks. > Ok. > > + error = ENOMEM; > > + goto out2; > > + } > > + error = copyin((void *) vps.props, l_vp, l_propsiz); > > + if (error) > > + goto out2; > > + for (i = vps.num, l_p = l_vp, p = vp; i--; ++l_p, ++p) > > + linux_to_bsd_dtv_property(l_p, p); > > + > > + error = copyout_map(td, &uvp, propsiz); > > + if (error) > > + goto out2; > > + copyout(vp, (void *) uvp, propsiz); > > + > > + if ((error = fget(td, args->fd, &fp)) != 0) { > > + (void) copyout_unmap(td, uvp, propsiz); > > + goto out2; > > + } > > + vps.props = (void *) uvp; > > + if ((args->cmd & 0xffff) == LINUX_FE_SET_PROPERTY) > > + error = fo_ioctl(fp, FE_SET_PROPERTY, &vps, td->td_ucred, td); > > + else > > + error = fo_ioctl(fp, FE_GET_PROPERTY, &vps, td->td_ucred, td); > > + if (error) { > > + (void) copyout_unmap(td, uvp, propsiz); > > + goto out; > > + } > > + error = copyin((void *) uvp, vp, propsiz); > > + (void) copyout_unmap(td, uvp, propsiz); > No need in space between cast and expression. Bigger issue is that I > do not understand this fragment. You do copyout_map(), and then > immediately call copyout_unmap() for the address range returned > by copyout_map(), or am I missing something ? > The vm allocated by copyout_map() is only needed for the fo_ioctl() call because the struct passed to FE_[GS]ET_PROPERTY describes an array that the drivers then copyin() and (possibly) copyout() themselves. So that array needs to be translated from/to the 32bit Linux version to (possibly) 64bit on the host (linux_to_bsd_dtv_property), and the 64bit version is larger so it doesn't fit in the original place in the userland vm. (One optimization here would be to only do this when the sizes differ i.e. in the 32bit-on-64 case...) Thanx! Juergen From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 02:00:58 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 38082106566B for ; Sun, 30 Jan 2011 02:00:58 +0000 (UTC) (envelope-from dhesser@accima.com) Received: from mail.odessaoffice.com (mail.odessaoffice.com [64.146.146.8]) by mx1.freebsd.org (Postfix) with ESMTP id 16D478FC08 for ; Sun, 30 Jan 2011 02:00:57 +0000 (UTC) Received: from belinda.androcles.org ([::ffff:199.204.207.9]) (AUTH: CRAM-MD5 dhesser@accima.com, TLS: TLSv1/SSLv3, 256bits, AES256-SHA) by mail.odessaoffice.com with esmtp; Sat, 29 Jan 2011 18:00:57 -0800 id 0036C00C.4D44C659.000004F8 Date: Sat, 29 Jan 2011 18:00:56 -0800 From: "Duane H. Hesser" To: Doug Barton Message-Id: <20110129180056.ca03c0f9.dhesser@accima.com> In-Reply-To: <4D447B26.3030100@FreeBSD.org> References: <20110128124312.a837f288.dhesser@accima.com> <20110129.064924.078.1@DEV> <20110129123530.0f4586d8.dhesser@accima.com> <4D447B26.3030100@FreeBSD.org> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.22.1; i386-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, dhesser@accima.com Subject: Re: NVIDIA (port) driver fails to create /dev/nvidactl; 8.2Prerelease X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dhesser@accima.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2011 02:00:58 -0000 On Sat, 29 Jan 2011 12:40:06 -0800 Doug Barton wrote: > Sorry if I missed it, but I haven't seen an answer to the question of > whether you've kldload'ed the nvidia module. When you type 'kldstat' > does the nvidia module show up in the list? If not, type 'kldload > nvidia' and try again. > You missed it, but it wasn't your fault. I hit the wrong reply button on may mailer, and the list was thus not included in the reply. Sorry about that. I 'have' exercised the "kldload" and "kldstat" commands so often in the past few days that I'm wearing out the 'k' key on a brand new keyboard. The 'nvidia' module IS loaded. I have loaded it manually and I have modified loader.conf to do it for me on reboot. I have compiled the driver port with and without acpi, with and without FreeBSD agp support, and I have recompiled my kernel to remove 'agp' when compiling the port with nvidia "internal" agp support. If you missed the original post, I have uploaded files which answer this question and just about any you might want to ask about my system. The files were upladed to my ISP's member website and if you are interested, you can see them at http://accima.com/members/dhesser/fbsd8.2P-nvidia-driver/ I would like to make it plausible that I might know what I'm doing, at least enough to check that a module I'm having trouble with has been loaded, by pointing out that I have been running freebsd versions since the fall of 1996. I've installed, managed, designed and otherwise dealt with about 90% of the unix/hardware combinations which have existed over the past 30+ years. I have read this (and several other freebsd lists) EVERY DAY since about September of that year. I realize that questions such as 'have you kldloaded..." are asked in a helpful spirit, and I don't expect you to be unduly impressed by my resume, but perhaps you will understand if I find such questions mildly insulting...*anyone* repeatedly failing to load a troublesome module must be too busy wiping drool from his chin to post messages to these lists. I am aware that installed modules must be loaded, and I have recently learned that I must zip up my pants *every time* I put them on. I remember, too, most of the time. I want to be sure, at this point, that *you* do not take umbrage at what I have written...it would not be the first time that someone took offense (at something I said) where none is intended. I continue to insist that there is a significant regression in the stable code, and I would be much happier if the responses indicated some concern about that by those who might be responsible. No one has even noticed yet that the stable sources are uncompilable again, for the second time in as many weeks. Insulting someone without even reading their message seems...unrewarding. But maybe not. You may not have expected "War and Peace" as a reply to your question, but I am currently attempting to sort out in my mind the need to abandon FreeBSD, and these musings may help to sort things out for me...thanks for listening. A switch to some other OS (probably NetBSD) would be a big step for me, but I currently have two machines for which FreeBSD is unable to provide display drivers which will accomodate my needs, and I need to start *using* the machines...in addition, the steady drift of FreeBSD away from unix and toward linux has had me thinking about switching for some time. There is one thing for which you and the rest of the lists can be thankful...I will never again post to a freebsd mailing list, either to offer or ask for help. Some of the noxious, egocentric, and arrogant replies I have received (not yours) to my original email have completely sated my appetite for childish drivel. Thanks again for your interst, Doug. -- Duane H. Hesser -- Duane H. Hesser From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 00:54: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 53249106564A; Sun, 30 Jan 2011 00:54:15 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id BEBFA8FC0C; Sun, 30 Jan 2011 00:54:12 +0000 (UTC) Received: by wyf19 with SMTP id 19so4584012wyf.13 for ; Sat, 29 Jan 2011 16:54:11 -0800 (PST) Received: by 10.216.142.224 with SMTP id i74mr4461938wej.83.1296348851592; Sat, 29 Jan 2011 16:54:11 -0800 (PST) Received: from [192.168.0.6] (angel.c-mal.com [82.241.189.111]) by mx.google.com with ESMTPS id j49sm9933620wer.38.2011.01.29.16.54.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 Jan 2011 16:54:09 -0800 (PST) References: <20110129222400.R39951@maildrop.int.zabbadoz.net> In-Reply-To: <20110129222400.R39951@maildrop.int.zabbadoz.net> Mime-Version: 1.0 (iPhone Mail 8A293) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <031F0ED3-42C0-4033-8DCB-A4AD4998DEDF@my.gd> X-Mailer: iPhone Mail (8A293) From: Damien Fleuriot Date: Sun, 30 Jan 2011 01:54:00 +0100 To: "Bjoern A. Zeeb" X-Mailman-Approved-At: Sun, 30 Jan 2011 02:02:22 +0000 Cc: "freebsd-hackers@freebsd.org" , "freebsd-stable@freebsd.org" Subject: Re: KERN - mfi driver for Dell raid h200 on r210 servers 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, 30 Jan 2011 00:54:15 -0000 On 29 Jan 2011, at 23:24, "Bjoern A. Zeeb" w= rote: > On Sat, 29 Jan 2011, Damien Fleuriot wrote: >=20 >> Hello lists, >>=20 >>=20 >> I'm trying to get FreeBSD 8.0 or 8.1 to run on a Dell poweredge r210 serv= er. >>=20 >> It ships with a SATA/SAS h200 RAID controller. >>=20 >>=20 >> Sadly, the MFI driver doesn't seem to register for this card... >>=20 >>=20 >> Find below the pciconf -lcvb >>=20 >> -- >> none6@pci0:1:0:0: class=3D0x010700 card=3D0x1f1d1028 chip=3D0x00721= 000 >> rev=3D0x02 hdr=3D0x00 >> vendor =3D 'LSI Logic (Was: Symbios Logic, NCR)' >> class =3D mass storage >> subclass =3D SAS >> bar [10] =3D type I/O Port, range 32, base 0xfc00, size 256, enabled >> bar [14] =3D type Memory, range 64, base 0xdf2b0000, size 65536, enab= led >> bar [1c] =3D type Memory, range 64, base 0xdf2c0000, size 262144, ena= bled >> cap 01[50] =3D powerspec 3 supports D0 D1 D2 D3 current D0 >> cap 10[68] =3D PCI-Express 2 endpoint max data 256(4096) link x8(x8) >> cap 03[d0] =3D VPD >> cap 05[a8] =3D MSI supports 1 message, 64 bit >> cap 11[c0] =3D MSI-X supports 15 messages in map 0x14 >> -- >>=20 >>=20 >> I have added the following to /usr/src/sys/dev/mfi/mfi_pci.c at line 119:= >> -- >> {0x1000, 0x0072, 0x1028, 0x1f1e, MFI_FLAGS_GEN2, "Dell PERC H200 Integra= ted"}, >> -- >=20 > It's 1f1d not 1f1e. I hope it was only a paste problem into email? >=20 Nope no copy paste problem, I shall try again tomorrow with 1f1d then. I found this line on the nginx site where the issue was being discussed. Will post back my results asap. >=20 >>=20 From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 00:56:19 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 11F38106567A; Sun, 30 Jan 2011 00:56:19 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5A1A18FC0A; Sun, 30 Jan 2011 00:56:18 +0000 (UTC) Received: by wyf19 with SMTP id 19so4584740wyf.13 for ; Sat, 29 Jan 2011 16:56:17 -0800 (PST) Received: by 10.227.146.213 with SMTP id i21mr1045432wbv.15.1296348977300; Sat, 29 Jan 2011 16:56:17 -0800 (PST) Received: from [192.168.0.6] (angel.c-mal.com [82.241.189.111]) by mx.google.com with ESMTPS id o6sm2282797wbo.21.2011.01.29.16.56.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 Jan 2011 16:56:16 -0800 (PST) References: In-Reply-To: Mime-Version: 1.0 (iPhone Mail 8A293) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <6FA437D9-BCA4-4B47-869D-184EF14C2A62@my.gd> X-Mailer: iPhone Mail (8A293) From: Damien Fleuriot Date: Sun, 30 Jan 2011 01:56:13 +0100 To: Andrew Thompson X-Mailman-Approved-At: Sun, 30 Jan 2011 02:02:31 +0000 Cc: "freebsd-hackers@freebsd.org" , "freebsd-stable@freebsd.org" Subject: Re: KERN - mfi driver for Dell raid h200 on r210 servers 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, 30 Jan 2011 00:56:19 -0000 On 29 Jan 2011, at 20:26, Andrew Thompson wrote: > On 30 January 2011 06:20, Damien Fleuriot wrote: >> Hello lists, >>=20 >>=20 >>=20 >> I'm trying to get FreeBSD 8.0 or 8.1 to run on a Dell poweredge r210 serv= er. >>=20 >> It ships with a SATA/SAS h200 RAID controller. >>=20 >=20 > This card may need the mps(4) driver which is only in HEAD at the moment. >=20 >=20 > Andrew Will give this a try if Bjoern's advice doesn't work for me, although I'll c= ome back for directions on how to cleanly port mps on 8.x then.= From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 00:58:50 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 C9F27106564A; Sun, 30 Jan 2011 00:58:50 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 422368FC14; Sun, 30 Jan 2011 00:58:49 +0000 (UTC) Received: by wyf19 with SMTP id 19so4585532wyf.13 for ; Sat, 29 Jan 2011 16:58:49 -0800 (PST) Received: by 10.227.133.5 with SMTP id d5mr4450056wbt.90.1296349128387; Sat, 29 Jan 2011 16:58:48 -0800 (PST) Received: from [192.168.0.6] (angel.c-mal.com [82.241.189.111]) by mx.google.com with ESMTPS id u9sm3840074wbg.0.2011.01.29.16.58.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 Jan 2011 16:58:47 -0800 (PST) References: <74e2d52b6ce67708a1bb42955b6370fb.squirrel@mail.experts-exchange.com> In-Reply-To: <74e2d52b6ce67708a1bb42955b6370fb.squirrel@mail.experts-exchange.com> Mime-Version: 1.0 (iPhone Mail 8A293) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <594AAF26-1359-4969-AC89-1C59A12D00E9@my.gd> X-Mailer: iPhone Mail (8A293) From: Damien Fleuriot Date: Sun, 30 Jan 2011 01:58:44 +0100 To: "jhelfman@e-e.com" X-Mailman-Approved-At: Sun, 30 Jan 2011 02:02:45 +0000 Cc: "freebsd-hackers@freebsd.org" , "freebsd-stable@freebsd.org" Subject: Re: KERN - mfi driver for Dell raid h200 on r210 servers 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, 30 Jan 2011 00:58:50 -0000 On 29 Jan 2011, at 19:00, jhelfman@e-e.com wrote: >> Hello lists, >>=20 >>=20 >>=20 >> I'm trying to get FreeBSD 8.0 or 8.1 to run on a Dell poweredge r210 >> server. >>=20 >> It ships with a SATA/SAS h200 RAID controller. >>=20 >>=20 >> Sadly, the MFI driver doesn't seem to register for this card... >>=20 >>=20 >> Find below the pciconf -lcvb >>=20 >> -- >> none6@pci0:1:0:0: class=3D0x010700 card=3D0x1f1d1028 chip=3D0x00721= 000 >> rev=3D0x02 hdr=3D0x00 >> vendor =3D 'LSI Logic (Was: Symbios Logic, NCR)' >> class =3D mass storage >> subclass =3D SAS >> bar [10] =3D type I/O Port, range 32, base 0xfc00, size 256, enabled= >> bar [14] =3D type Memory, range 64, base 0xdf2b0000, size 65536, >> enabled >> bar [1c] =3D type Memory, range 64, base 0xdf2c0000, size 262144, >> enabled >> cap 01[50] =3D powerspec 3 supports D0 D1 D2 D3 current D0 >> cap 10[68] =3D PCI-Express 2 endpoint max data 256(4096) link x8(x8) >> cap 03[d0] =3D VPD >> cap 05[a8] =3D MSI supports 1 message, 64 bit >> cap 11[c0] =3D MSI-X supports 15 messages in map 0x14 >> -- >>=20 >>=20 >> I have added the following to /usr/src/sys/dev/mfi/mfi_pci.c at line 119:= >> -- >> {0x1000, 0x0072, 0x1028, 0x1f1e, MFI_FLAGS_GEN2, "Dell PERC H200 >> Integrated"}, >> -- >>=20 >>=20 >> Rebuilt the kernel, tried it on the server, still no luck recognizing >> the RAID card. >>=20 >> As a last resort I'll be setting the drives to passthrough and using a >> software RAID, but I'd much rather this worked out. >>=20 >> Note that mfi actually recognizes Dell's h700 and h800 cards. >>=20 >>=20 >>=20 >>=20 >> Anyone managed to get the h200 card working yet ? >>=20 >>=20 >>=20 >>=20 >> @hackers: please keep me cc'd, I'm not subscribed to this list. >>=20 >>=20 >>=20 >> Regards, >>=20 >> -- >> dfl >> _______________________________________________ >> freebsd-stable@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"= >>=20 >>=20 > Hi Damien, >=20 > I would suspect that you would need to compile the 'mpt' driver to get > this to work. I found the same issue in the r310, however I already had > mpt compiled in my kernel for another hardware platform. >=20 > Good Luck! > Jason >=20 Hi, I'm not sure, afaik mpt comes with GENERIC which is the kernel I put in the m= fsbsd image I tried to boot, and which failed to properly register any drive= r for the h200 card.= From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 02:34:42 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 0767E106566B for ; Sun, 30 Jan 2011 02:34:42 +0000 (UTC) (envelope-from duane.hesser@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id BA8CA8FC08 for ; Sun, 30 Jan 2011 02:34:41 +0000 (UTC) Received: by iwn39 with SMTP id 39so4399684iwn.13 for ; Sat, 29 Jan 2011 18:34:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:to:subject:in-reply-to :references:reply-to:x-mailer:mime-version:content-type :content-transfer-encoding; bh=osQukuMIGAGFl4Mmr+VPn+07DqjatTLUABQ1CE/Z98c=; b=snVzDGDvwWHE19FcfyQTSHejkePxgsbGdH66PRF6uAZJD4uBDJe0QBifjKFhUpWqWX 77FydW3W7LsRitURWKP+ZXjHDn+GacZ5M9M94IN3owkoUjCz4g/ljJv4lEg9SUrKtoAv KGyJzc5rwsHwHFFyNYKIYdrTlHRvLTY5WIs70= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=wlKBO4MV6uPmLvHdEbAKmVd7QVUtyKI56Vnf446IVjE/GdaboeN8uVdHeJtkaW1mh0 s92QEVvOfInw1e+Z4zJv2iRMPKTi4Fa11ssnLCsHc3+bautIwR0iAQmW618+k76rw8Az AyGuoPEgom1OxTZwamVYLKaZqrWgmyKtRUJSg= Received: by 10.42.224.198 with SMTP id ip6mr5964090icb.402.1296353076003; Sat, 29 Jan 2011 18:04:36 -0800 (PST) Received: from belinda.androcles.org ([199.204.207.9]) by mx.google.com with ESMTPS id gy41sm16356172ibb.11.2011.01.29.18.04.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 Jan 2011 18:04:33 -0800 (PST) Received: from belinda.androcles.org (localhost [127.0.0.1]) by belinda.androcles.org (8.14.4/8.14.4/8.13.3/1) with SMTP id p0U24Vp3003823 for ; Sat, 29 Jan 2011 18:04:31 -0800 (PST) (envelope-from duane.hesser@gmail.com) Message-Id: <201101300204.p0U24Vp3003823@belinda.androcles.org> Date: Sat, 29 Jan 2011 18:04:31 -0800 From: "Duane H. Hesser" To: freebsd-hackers@freebsd.org In-Reply-To: <201101291752.12285.lobo@bsd.com.br> References: <20110128124312.a837f288.dhesser@accima.com> <20110129123530.0f4586d8.dhesser@accima.com> <4D447B26.3030100@FreeBSD.org> <201101291752.12285.lobo@bsd.com.br> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.22.1; i386-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sun, 30 Jan 2011 02:43:37 +0000 Subject: Re: NVIDIA (port) driver fails to create /dev/nvidactl; 8.2Prerelease X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Duane.Hesser@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2011 02:34:42 -0000 On Sat, 29 Jan 2011 17:52:11 -0300 Mario Lobo wrote: > > Why don't you try the driver from the nvidia site? It's always the latest > version, compiles and install perfectly on i386 or amd64. > > -- > Mario Lobo > http://www.mallavoodoo.com.br I have downloaded that file (260.19.36) but have not yet tried it. A good suggestion. -- Duane H. Hesser From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 10:33: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 E315C106566B; Sun, 30 Jan 2011 10:33:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 7CBC08FC0A; Sun, 30 Jan 2011 10:33:33 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p0UAXKMD069428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 30 Jan 2011 12:33:20 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p0UAXKNS056180; Sun, 30 Jan 2011 12:33:20 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p0UAXKl6056179; Sun, 30 Jan 2011 12:33:20 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 30 Jan 2011 12:33:20 +0200 From: Kostik Belousov To: Juergen Lock Message-ID: <20110130103320.GO2518@deviant.kiev.zoral.com.ua> References: <20110129201000.GA10774@triton8.kn-bremen.de> <20110129205105.GI2518@deviant.kiev.zoral.com.ua> <20110129235448.GA15788@triton8.kn-bremen.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5XswgcLA9HHGPOFO" Content-Disposition: inline In-Reply-To: <20110129235448.GA15788@triton8.kn-bremen.de> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org Subject: Re: Can vm_mmap()/vm_map_remove() be called with giant held? (linuxolator dvb patches) 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, 30 Jan 2011 10:33:34 -0000 --5XswgcLA9HHGPOFO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 30, 2011 at 12:54:48AM +0100, Juergen Lock wrote: > On Sat, Jan 29, 2011 at 10:51:05PM +0200, Kostik Belousov wrote: > > On Sat, Jan 29, 2011 at 09:10:00PM +0100, Juergen Lock wrote: > > > Hi! > > >=20 > > > I was kinda hoping to be able to post a correct patch in public but > > > getting an answer to ${Subject} seems to be more difficult than I > > > thought... :) So, does anyone here know? copyout_map() and > > You do not need Giant locked for vm_map* functions. > >=20 > The question was more do I need to drop it first before calling them... No, you do not need to drop Giant. [snip] > > > + error =3D ENOMEM; > > > + goto out2; > > > + } > > > + error =3D copyin((void *) vps.props, l_vp, l_propsiz); > > > + if (error) > > > + goto out2; > > > + for (i =3D vps.num, l_p =3D l_vp, p =3D vp; i--; ++l_p, ++p) > > > + linux_to_bsd_dtv_property(l_p, p); > > > + > > > + error =3D copyout_map(td, &uvp, propsiz); > > > + if (error) > > > + goto out2; > > > + copyout(vp, (void *) uvp, propsiz); > > > + > > > + if ((error =3D fget(td, args->fd, &fp)) !=3D 0) { > > > + (void) copyout_unmap(td, uvp, propsiz); > > > + goto out2; > > > + } > > > + vps.props =3D (void *) uvp; > > > + if ((args->cmd & 0xffff) =3D=3D LINUX_FE_SET_PROPERTY) > > > + error =3D fo_ioctl(fp, FE_SET_PROPERTY, &vps, td->td_ucred, td); > > > + else > > > + error =3D fo_ioctl(fp, FE_GET_PROPERTY, &vps, td->td_ucred, td); > > > + if (error) { > > > + (void) copyout_unmap(td, uvp, propsiz); > > > + goto out; > > > + } > > > + error =3D copyin((void *) uvp, vp, propsiz); > > > + (void) copyout_unmap(td, uvp, propsiz); > > No need in space between cast and expression. Bigger issue is that I > > do not understand this fragment. You do copyout_map(), and then > > immediately call copyout_unmap() for the address range returned > > by copyout_map(), or am I missing something ? > >=20 > The vm allocated by copyout_map() is only needed for the fo_ioctl() > call because the struct passed to FE_[GS]ET_PROPERTY describes an > array that the drivers then copyin() and (possibly) copyout() > themselves. So that array needs to be translated from/to the 32bit > Linux version to (possibly) 64bit on the host (linux_to_bsd_dtv_property), > and the 64bit version is larger so it doesn't fit in the original > place in the userland vm. And am I right that the drivers can only take this array from the usermode ? How is the compatibility for 32/64 bit mode is handled by native FE_SET_PROPERTY handlers ? I could only say that the hack is atrocious. Might be, you indeed have no choice there. >=20 > (One optimization here would be to only do this when the sizes > differ i.e. in the 32bit-on-64 case...) >=20 > Thanx! > Juergen --5XswgcLA9HHGPOFO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk1FPnAACgkQC3+MBN1Mb4gfFwCg84gjU/HrRn1o1TBh/nVWiNfb BBsAn3UlNnalAXADys/Lfz0/Qmkwtxdv =wnoG -----END PGP SIGNATURE----- --5XswgcLA9HHGPOFO-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 10:20:29 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 E028B1065672 for ; Sun, 30 Jan 2011 10:20:29 +0000 (UTC) (envelope-from mremski@comcast.net) Received: from qmta12.westchester.pa.mail.comcast.net (qmta12.westchester.pa.mail.comcast.net [76.96.59.227]) by mx1.freebsd.org (Postfix) with ESMTP id A633E8FC08 for ; Sun, 30 Jan 2011 10:20:29 +0000 (UTC) Received: from omta24.westchester.pa.mail.comcast.net ([76.96.62.76]) by qmta12.westchester.pa.mail.comcast.net with comcast id 1m4r1g0021ei1Bg5Cm7EgU; Sun, 30 Jan 2011 10:07:14 +0000 Received: from payne2.remski.net ([75.67.219.182]) by omta24.westchester.pa.mail.comcast.net with comcast id 1m7B1g0043wit233km7EQQ; Sun, 30 Jan 2011 10:07:14 +0000 Date: Sun, 30 Jan 2011 05:07:09 -0500 (EST) From: Michael Remski To: dhesser@accima.com Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Mailman-Approved-At: Sun, 30 Jan 2011 13:21:11 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: NVIDIA (port) driver fails to create /dev/nvidactl; 8.2Prerelease 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, 30 Jan 2011 10:20:30 -0000 Duane: As a datapoint, I installed the ports/x11/nvidia-driver on a system running 8.2 Pre Release from a /usr/src that picked up things from yesterday. FreeBSD payne.remski.net 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #3: Sat Jan 29 05:26:40 EST 2011 root@payne.remski.net:/usr/obj/usr/src/sys/PAYNE amd64 The video card is a GeForce 210 PCIE card, the version in the Makefile is 256.53. I did nothing more than make install the port and adjust my xorg.conf. m From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 11:30:56 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 B10E31065673; Sun, 30 Jan 2011 11:30:56 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2BCD08FC18; Sun, 30 Jan 2011 11:30:55 +0000 (UTC) Received: by fxm16 with SMTP id 16so4942866fxm.13 for ; Sun, 30 Jan 2011 03:30:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.70.136 with SMTP id d8mr3565953faj.3.1296387055087; Sun, 30 Jan 2011 03:30:55 -0800 (PST) Received: by 10.223.118.84 with HTTP; Sun, 30 Jan 2011 03:30:55 -0800 (PST) In-Reply-To: <20110129222400.R39951@maildrop.int.zabbadoz.net> References: <20110129222400.R39951@maildrop.int.zabbadoz.net> Date: Sun, 30 Jan 2011 12:30:55 +0100 Message-ID: From: Damien Fleuriot To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Sun, 30 Jan 2011 13:21:21 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: KERN - mfi driver for Dell raid h200 on r210 servers 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, 30 Jan 2011 11:30:56 -0000 On 29 January 2011 23:24, Bjoern A. Zeeb w= rote: > On Sat, 29 Jan 2011, Damien Fleuriot wrote: > >> Hello lists, >> >> >> >> I'm trying to get FreeBSD 8.0 or 8.1 to run on a Dell poweredge r210 >> server. >> >> It ships with a SATA/SAS h200 RAID controller. >> >> >> Sadly, the MFI driver doesn't seem to register for this card... >> >> >> Find below the pciconf -lcvb >> >> -- >> none6@pci0:1:0:0: =A0 =A0 =A0 class=3D0x010700 card=3D0x1f1d1028 chip=3D= 0x00721000 >> rev=3D0x02 hdr=3D0x00 >> =A0 vendor =A0 =A0 =3D 'LSI Logic (Was: Symbios Logic, NCR)' >> =A0 class =A0 =A0 =A0=3D mass storage >> =A0 subclass =A0 =3D SAS >> =A0 bar =A0 [10] =3D type I/O Port, range 32, base 0xfc00, size 256, ena= bled >> =A0 bar =A0 [14] =3D type Memory, range 64, base 0xdf2b0000, size 65536,= enabled >> =A0 bar =A0 [1c] =3D type Memory, range 64, base 0xdf2c0000, size 262144= , >> enabled >> =A0 cap 01[50] =3D powerspec 3 =A0supports D0 D1 D2 D3 =A0current D0 >> =A0 cap 10[68] =3D PCI-Express 2 endpoint max data 256(4096) link x8(x8) >> =A0 cap 03[d0] =3D VPD >> =A0 cap 05[a8] =3D MSI supports 1 message, 64 bit >> =A0 cap 11[c0] =3D MSI-X supports 15 messages in map 0x14 >> -- >> >> >> I have added the following to /usr/src/sys/dev/mfi/mfi_pci.c at line 119= : >> -- >> {0x1000, 0x0072, 0x1028, 0x1f1e, MFI_FLAGS_GEN2, =A0"Dell PERC H200 >> Integrated"}, >> -- > > It's 1f1d not 1f1e. =A0I hope it was only a paste problem into email? > Ok I've loaded the newly patched mfi.ko and booted a MFS image. Here's the relevant snip from dmesg.run : at mfi0: port 0xfc00-0xfcff mem 0xdf2b0000-0xdf2bffff,0xdf2c0000-0xdf2fffff irq 16 at device 0.0 on pci1 mfi0: Megaraid SAS driver Ver 3.00 mfi0: firmware stuck in state 0 mfi0: Firmware not in READY state, error 6 I'll have to try mps then, unless someone has an idea about this "stuck in state 0" thing. From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 12:10:13 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 00938106566B; Sun, 30 Jan 2011 12:10:13 +0000 (UTC) (envelope-from roberto@keltia.net) Received: from keltia.net (centre.keltia.net [IPv6:2a01:240:fe5c::41]) by mx1.freebsd.org (Postfix) with ESMTP id A64938FC13; Sun, 30 Jan 2011 12:10:12 +0000 (UTC) Received: from [193.56.58.73] (snuadh.freenix.org [193.56.58.73]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: roberto) by keltia.net (Postfix/TLS) with ESMTPSA id CE6E7CBC6; Sun, 30 Jan 2011 13:10:09 +0100 (CET) References: <6FA437D9-BCA4-4B47-869D-184EF14C2A62@my.gd> In-Reply-To: <6FA437D9-BCA4-4B47-869D-184EF14C2A62@my.gd> Mime-Version: 1.0 (iPhone Mail 8C148a) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Message-Id: <8F19AFD0-7F1A-43E1-AECB-071E4BBB59C3@keltia.net> X-Mailer: iPhone Mail (8C148a) From: Ollivier Robert Date: Sun, 30 Jan 2011 13:10:09 +0100 To: Damien Fleuriot X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (keltia.net); Sun, 30 Jan 2011 13:10:09 +0100 (CET) X-Mailman-Approved-At: Sun, 30 Jan 2011 13:21:31 +0000 Cc: "freebsd-hackers@freebsd.org" , "freebsd-stable@freebsd.org" , Andrew Thompson Subject: Re: KERN - mfi driver for Dell raid h200 on r210 servers 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, 30 Jan 2011 12:10:13 -0000 I've "backported" the mps driver to 8.2 (I used cp -r :)) and I have generat= ed an img suited to the dedibox (that's what you are targeting, right? :)) I tried to test it in vmware but I have a password issue right now. It is also a ZFSv28 image. Le 30 janv. 2011 =C3=A0 01:56, Damien Fleuriot a =C3=A9crit : > On 29 Jan 2011, at 20:26, Andrew Thompson wrote: >=20 >> On 30 January 2011 06:20, Damien Fleuriot wrote: >>> Hello lists, >>>=20 >>>=20 >>>=20 >>> I'm trying to get FreeBSD 8.0 or 8.1 to run on a Dell poweredge r210 ser= ver. >>>=20 >>> It ships with a SATA/SAS h200 RAID controller. >>>=20 >>=20 >> This card may need the mps(4) driver which is only in HEAD at the moment.= >>=20 >>=20 >> Andrew >=20 >=20 > Will give this a try if Bjoern's advice doesn't work for me, although I'll= come back for directions on how to cleanly port mps on 8.x then.___________= ____________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >=20 From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 12:40: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 043C1106564A; Sun, 30 Jan 2011 12:40:21 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 45F2E8FC17; Sun, 30 Jan 2011 12:40:19 +0000 (UTC) Received: by wyf19 with SMTP id 19so4835979wyf.13 for ; Sun, 30 Jan 2011 04:40:19 -0800 (PST) Received: by 10.216.205.213 with SMTP id j63mr9404401weo.60.1296391218860; Sun, 30 Jan 2011 04:40:18 -0800 (PST) Received: from [192.168.0.6] (angel.c-mal.com [82.241.189.111]) by mx.google.com with ESMTPS id b54sm6010914wer.21.2011.01.30.04.40.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Jan 2011 04:40:18 -0800 (PST) References: <6FA437D9-BCA4-4B47-869D-184EF14C2A62@my.gd> <8F19AFD0-7F1A-43E1-AECB-071E4BBB59C3@keltia.net> In-Reply-To: <8F19AFD0-7F1A-43E1-AECB-071E4BBB59C3@keltia.net> Mime-Version: 1.0 (iPhone Mail 8A293) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Message-Id: <2E795DBB-0507-4E6A-8691-328752F5AC6B@my.gd> X-Mailer: iPhone Mail (8A293) From: Damien Fleuriot Date: Sun, 30 Jan 2011 13:40:13 +0100 To: Ollivier Robert X-Mailman-Approved-At: Sun, 30 Jan 2011 13:21:39 +0000 Cc: "freebsd-hackers@freebsd.org" , "freebsd-stable@freebsd.org" , Andrew Thompson Subject: Re: KERN - mfi driver for Dell raid h200 on r210 servers 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, 30 Jan 2011 12:40:21 -0000 Indeed that is, the bsd install is aimed at a r210 EG server :) Is there any place one can get your image ? --- Fleuriot Damien On 30 Jan 2011, at 13:10, Ollivier Robert wrote: > I've "backported" the mps driver to 8.2 (I used cp -r :)) and I have gener= ated an img suited to the dedibox (that's what you are targeting, right? :))= >=20 > I tried to test it in vmware but I have a password issue right now. >=20 > It is also a ZFSv28 image. >=20 > Le 30 janv. 2011 =C3=A0 01:56, Damien Fleuriot a =C3=A9crit : >=20 >> On 29 Jan 2011, at 20:26, Andrew Thompson wrote: >>=20 >>> On 30 January 2011 06:20, Damien Fleuriot wrote: >>>> Hello lists, >>>>=20 >>>>=20 >>>>=20 >>>> I'm trying to get FreeBSD 8.0 or 8.1 to run on a Dell poweredge r210 se= rver. >>>>=20 >>>> It ships with a SATA/SAS h200 RAID controller. >>>>=20 >>>=20 >>> This card may need the mps(4) driver which is only in HEAD at the moment= . >>>=20 >>>=20 >>> Andrew >>=20 >>=20 >> Will give this a try if Bjoern's advice doesn't work for me, although I'l= l come back for directions on how to cleanly port mps on 8.x then.__________= _____________________________________ >> freebsd-stable@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"= >>=20 From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 15:25: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 B6CD61065675; Sun, 30 Jan 2011 15:25:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 45F0B8FC22; Sun, 30 Jan 2011 15:25:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 4805241C7A4; Sun, 30 Jan 2011 16:25:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id pf5gXZOAizqh; Sun, 30 Jan 2011 16:25:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id DE1F741C7A3; Sun, 30 Jan 2011 16:25:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 5DBDC4448F3; Sun, 30 Jan 2011 15:24:44 +0000 (UTC) Date: Sun, 30 Jan 2011 15:24:43 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Damien Fleuriot In-Reply-To: Message-ID: <20110130152315.P39951@maildrop.int.zabbadoz.net> References: <20110129222400.R39951@maildrop.int.zabbadoz.net> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: KERN - mfi driver for Dell raid h200 on r210 servers 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, 30 Jan 2011 15:25:07 -0000 On Sun, 30 Jan 2011, Damien Fleuriot wrote: > Ok I've loaded the newly patched mfi.ko and booted a MFS image. > Here's the relevant snip from dmesg.run : > at > mfi0: port 0xfc00-0xfcff mem > 0xdf2b0000-0xdf2bffff,0xdf2c0000-0xdf2fffff irq 16 at device 0.0 on > pci1 > mfi0: Megaraid SAS driver Ver 3.00 > mfi0: firmware stuck in state 0 > mfi0: Firmware not in READY state, error 6 > > > I'll have to try mps then, unless someone has an idea about this > "stuck in state 0" thing. it means that you should ask Dell for the information as the mfi(4) driver needs some special handling to support that exact chip. Probably needs some special initialization and a couple of if ()s, as usual. LSI/Dell are the people to talk to. /bz -- Bjoern A. Zeeb You have to have visions! Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 15:01:50 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 84D02106566C; Sun, 30 Jan 2011 15:01:50 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id 172D18FC14; Sun, 30 Jan 2011 15:01:49 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 099361E0015E; Sun, 30 Jan 2011 16:01:49 +0100 (CET) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.3) with ESMTP id p0UErgVi037042; Sun, 30 Jan 2011 15:53:42 +0100 (CET) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.4/8.14.3/Submit) id p0UErgt0037041; Sun, 30 Jan 2011 15:53:42 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Sun, 30 Jan 2011 15:53:41 +0100 To: Kostik Belousov Message-ID: <20110130145341.GA36312@triton8.kn-bremen.de> References: <20110129201000.GA10774@triton8.kn-bremen.de> <20110129205105.GI2518@deviant.kiev.zoral.com.ua> <20110129235448.GA15788@triton8.kn-bremen.de> <20110130103320.GO2518@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110130103320.GO2518@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Sun, 30 Jan 2011 15:31:42 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, Juergen Lock Subject: Re: Can vm_mmap()/vm_map_remove() be called with giant held? (linuxolator dvb patches) 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, 30 Jan 2011 15:01:50 -0000 On Sun, Jan 30, 2011 at 12:33:20PM +0200, Kostik Belousov wrote: > On Sun, Jan 30, 2011 at 12:54:48AM +0100, Juergen Lock wrote: > > On Sat, Jan 29, 2011 at 10:51:05PM +0200, Kostik Belousov wrote: > > > On Sat, Jan 29, 2011 at 09:10:00PM +0100, Juergen Lock wrote: > > > > Hi! > > > > > > > > I was kinda hoping to be able to post a correct patch in public but > > > > getting an answer to ${Subject} seems to be more difficult than I > > > > thought... :) So, does anyone here know? copyout_map() and > > > You do not need Giant locked for vm_map* functions. > > > > > The question was more do I need to drop it first before calling them... > No, you do not need to drop Giant. > Ok, thanx! > [snip] > > > > + error = ENOMEM; > > > > + goto out2; > > > > + } > > > > + error = copyin((void *) vps.props, l_vp, l_propsiz); > > > > + if (error) > > > > + goto out2; > > > > + for (i = vps.num, l_p = l_vp, p = vp; i--; ++l_p, ++p) > > > > + linux_to_bsd_dtv_property(l_p, p); > > > > + > > > > + error = copyout_map(td, &uvp, propsiz); > > > > + if (error) > > > > + goto out2; > > > > + copyout(vp, (void *) uvp, propsiz); > > > > + > > > > + if ((error = fget(td, args->fd, &fp)) != 0) { > > > > + (void) copyout_unmap(td, uvp, propsiz); > > > > + goto out2; > > > > + } > > > > + vps.props = (void *) uvp; > > > > + if ((args->cmd & 0xffff) == LINUX_FE_SET_PROPERTY) > > > > + error = fo_ioctl(fp, FE_SET_PROPERTY, &vps, td->td_ucred, td); > > > > + else > > > > + error = fo_ioctl(fp, FE_GET_PROPERTY, &vps, td->td_ucred, td); > > > > + if (error) { > > > > + (void) copyout_unmap(td, uvp, propsiz); > > > > + goto out; > > > > + } > > > > + error = copyin((void *) uvp, vp, propsiz); > > > > + (void) copyout_unmap(td, uvp, propsiz); > > > No need in space between cast and expression. Bigger issue is that I > > > do not understand this fragment. You do copyout_map(), and then > > > immediately call copyout_unmap() for the address range returned > > > by copyout_map(), or am I missing something ? > > > > > The vm allocated by copyout_map() is only needed for the fo_ioctl() > > call because the struct passed to FE_[GS]ET_PROPERTY describes an > > array that the drivers then copyin() and (possibly) copyout() > > themselves. So that array needs to be translated from/to the 32bit > > Linux version to (possibly) 64bit on the host (linux_to_bsd_dtv_property), > > and the 64bit version is larger so it doesn't fit in the original > > place in the userland vm. > And am I right that the drivers can only take this array from the usermode ? Yes. And it's a Linux api and Linux code too (running in webcamd) so I changing it wouldn't make too much sense. > How is the compatibility for 32/64 bit mode is handled by native > FE_SET_PROPERTY handlers ? > I'm not sure but my impression is this currently isn't handled at all even on Linux. (And neither on FreeBSD.) > I could only say that the hack is atrocious. Might be, you indeed have > no choice there. > > I'm not going to disagree there... (This is actually the second api for this, i.e. FE_[GS]ET_PROPERTY are an api extension introduced to add dvb-s2 support to the Linux dvb api, the original proposal was different but wasn't accepted by the Linux people in charge. The array is an array of `commands' that are executed by the ioctl, and the unused pointer that's in there on top of the uint32_t reserved1[3] and that causes the sizes to differ between 32/64 bits looks like it has been added later too because without it I think each array element would have been exactly 64 bytes...) Cheers, Juergen From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 17:10: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 BB2961065673 for ; Sun, 30 Jan 2011 17:10:43 +0000 (UTC) (envelope-from dhesser@accima.com) Received: from mail.odessaoffice.com (mail.odessaoffice.com [64.146.146.8]) by mx1.freebsd.org (Postfix) with ESMTP id A1D108FC0C for ; Sun, 30 Jan 2011 17:10:37 +0000 (UTC) Received: from belinda.androcles.org ([::ffff:199.204.207.9]) (AUTH: CRAM-MD5 dhesser@accima.com, TLS: TLSv1/SSLv3, 256bits, AES256-SHA) by mail.odessaoffice.com with esmtp; Sun, 30 Jan 2011 09:10:36 -0800 id 002CC00A.4D459B8C.0000181D Date: Sun, 30 Jan 2011 09:10:37 -0800 From: "Duane H. Hesser" To: Michael Remski Message-Id: <20110130091037.da14eccc.dhesser@accima.com> In-Reply-To: References: X-Mailer: Sylpheed 3.0.3 (GTK+ 2.22.1; i386-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, dhesser@accima.com Subject: Re: NVIDIA (port) driver fails to create /dev/nvidactl; 8.2Prerelease X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dhesser@accima.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2011 17:10:43 -0000 On Sun, 30 Jan 2011 05:07:09 -0500 (EST) Michael Remski wrote: > Duane: > As a datapoint, I installed the ports/x11/nvidia-driver on a system > running 8.2 Pre Release from a /usr/src that picked up things from > yesterday. > FreeBSD payne.remski.net 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #3: Sat Jan > 29 05:26:40 EST 2011 root@payne.remski.net:/usr/obj/usr/src/sys/PAYNE > amd64 > > The video card is a GeForce 210 PCIE card, the version in the Makefile is > 256.53. I did nothing more than make install the port and adjust my > xorg.conf. > > m Thanks. That changes things a bit for me. I'll try updating my sources again (they're only 3 days old, but who knows?) build a new kernel, and re-install the port. This is the sort of report I needed; thanks. -- Duane H. Hesser -- Duane H. Hesser From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 17:29:41 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 1E1141065673; Sun, 30 Jan 2011 17:29:41 +0000 (UTC) Date: Sun, 30 Jan 2011 17:29:41 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20110130172941.GA10701@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: empty function macros 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, 30 Jan 2011 17:29:41 -0000 hi there, i noticed freebsd has a few of the following macros: #define FUNC(sb) when you do something like if (cond) FUNC(i) the compiler complains about an if statement with an empty body. any sensible way of dealing with this issue? i saw some reiserfs code which does the following to silence compilers: #define FUNC(sb) do { } while (0) cheers. alex -- a13x From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 18:37: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 C7CD3106566C for ; Sun, 30 Jan 2011 18:37:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 5A0038FC0A for ; Sun, 30 Jan 2011 18:37:15 +0000 (UTC) Received: (qmail 8866 invoked by uid 399); 30 Jan 2011 18:37:13 -0000 Received: from localhost (HELO doug-optiplex.ka9q.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 30 Jan 2011 18:37:13 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4D45AFD8.9070507@FreeBSD.org> Date: Sun, 30 Jan 2011 10:37:12 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20110129 Thunderbird/3.1.7 MIME-Version: 1.0 To: dhesser@accima.com References: <20110128124312.a837f288.dhesser@accima.com> <20110129.064924.078.1@DEV> <20110129123530.0f4586d8.dhesser@accima.com> <4D447B26.3030100@FreeBSD.org> <20110129180056.ca03c0f9.dhesser@accima.com> In-Reply-To: <20110129180056.ca03c0f9.dhesser@accima.com> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: NVIDIA (port) driver fails to create /dev/nvidactl; 8.2Prerelease 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, 30 Jan 2011 18:37:15 -0000 On 01/29/2011 18:00, Duane H. Hesser wrote: > I realize that questions such as 'have you kldloaded..." > are asked in a helpful spirit, and I don't expect you to be unduly > impressed by my resume, but perhaps you will understand if I find > such questions mildly insulting... No, I don't understand that at all. If you've read the lists as often as you claim to you'd know a few things: 1. These problems usually ARE something simple, and if the OP doesn't cover the simple bases, those questions will be asked. 2. The nvidia driver is quite popular, so a widespread failure of the driver on a -stable branch would have gotten a lot of notice. 3. The right list to post your report to is freebsd-stable@, not -hackers. Now please understand, I am not *intending* to be insulting, and as someone who has struggled with the nvidia driver myself I'd like to see you get your problem resolved. In any case, good luck. Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 19:11: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 DDE8A106564A for ; Sun, 30 Jan 2011 19:11:46 +0000 (UTC) (envelope-from gljennjohn@googlemail.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 6E8C98FC17 for ; Sun, 30 Jan 2011 19:11:45 +0000 (UTC) Received: by fxm16 with SMTP id 16so5166347fxm.13 for ; Sun, 30 Jan 2011 11:11:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:x-mailer:mime-version:content-type :content-transfer-encoding; bh=FD959gPTmp43jeCHligZyT3fitB0xVGk5gpa09qKOyQ=; b=pBRrhj70aQAZpYnrXknJ7AdG8JB/MbBHtO4wyoaTnEVUF+8NpuXfP859cZanFJP+id 86efoKVLKAUXGEyyR4Oud6dwYlvWTVvKiauleCWNMImryIBbTviFJrZNUA9yeYIkmdBX 1ZaKGTWggyJvSE6XsL411XYvg2JV2MoRXPNeE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=IibphcUfCNYqZ+UDr70uaBP4GFhHZKK8MXt+X1ggMbdD1opvxN2meUNzDVotvoDxqH 1iFTNrgdeXIOL5vA26eMpbOf+UkueELhIkRWA6Adx+L1fmm4IQYrxzJ55vEHIeT5o0p9 K+ACziNUCZXFoe27zi0QVNAiIK7BreTmNF//o= Received: by 10.223.71.199 with SMTP id i7mr5286586faj.57.1296414704781; Sun, 30 Jan 2011 11:11:44 -0800 (PST) Received: from ernst.jennejohn.org (p578E1A47.dip.t-dialin.net [87.142.26.71]) by mx.google.com with ESMTPS id o17sm7087997fal.25.2011.01.30.11.11.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Jan 2011 11:11:44 -0800 (PST) Date: Sun, 30 Jan 2011 20:11:42 +0100 From: Gary Jennejohn To: Alexander Best Message-ID: <20110130201142.09f4b998@ernst.jennejohn.org> In-Reply-To: <20110130172941.GA10701@freebsd.org> References: <20110130172941.GA10701@freebsd.org> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: empty function macros X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2011 19:11:46 -0000 On Sun, 30 Jan 2011 17:29:41 +0000 Alexander Best wrote: > hi there, > > i noticed freebsd has a few of the following macros: > > #define FUNC(sb) > > when you do something like > > if (cond) > FUNC(i) > > the compiler complains about an if statement with an empty body. any sensible > way of dealing with this issue? > > i saw some reiserfs code which does the following to silence compilers: > > #define FUNC(sb) do { } while (0) > What happens if you treat it like a real function call and put ';' after it? -- Gary Jennejohn (gj@) From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 30 22:37:07 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id DBDFE1065672; Sun, 30 Jan 2011 22:37:07 +0000 (UTC) Date: Sun, 30 Jan 2011 22:37:07 +0000 From: Alexander Best To: Gary Jennejohn Message-ID: <20110130223707.GA40378@freebsd.org> References: <20110130172941.GA10701@freebsd.org> <20110130201142.09f4b998@ernst.jennejohn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110130201142.09f4b998@ernst.jennejohn.org> Cc: freebsd-hackers@freebsd.org Subject: Re: empty function macros 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, 30 Jan 2011 22:37:07 -0000 On Sun Jan 30 11, Gary Jennejohn wrote: > On Sun, 30 Jan 2011 17:29:41 +0000 > Alexander Best wrote: > > > hi there, > > > > i noticed freebsd has a few of the following macros: > > > > #define FUNC(sb) > > > > when you do something like > > > > if (cond) > > FUNC(i) > > > > the compiler complains about an if statement with an empty body. any sensible > > way of dealing with this issue? > > > > i saw some reiserfs code which does the following to silence compilers: > > > > #define FUNC(sb) do { } while (0) > > > > What happens if you treat it like a real function call and put ';' > after it? sorry this was my fault. it should have actually been: if (cond) FUNC(i); basically, since FUNC evaluates to nothing this results in if (cond) ; while gcc doesn't complain, clang does. cheers. alex > > -- > Gary Jennejohn (gj@) -- a13x From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 31 08:10: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 1A039106564A for ; Mon, 31 Jan 2011 08:10:18 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id CE1408FC0A for ; Mon, 31 Jan 2011 08:10:17 +0000 (UTC) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id AF68D9CB0C3; Mon, 31 Jan 2011 08:54:40 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by lev.vlakno.cz (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qTMD0LBHvhg3; Mon, 31 Jan 2011 08:54:40 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 1F7F69CB87D; Mon, 31 Jan 2011 08:54:40 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.4/8.14.4/Submit) id p0V7seo2049807; Mon, 31 Jan 2011 08:54:40 +0100 (CET) (envelope-from rdivacky) Date: Mon, 31 Jan 2011 08:54:39 +0100 From: Roman Divacky To: Alexander Best Message-ID: <20110131075439.GA49765@freebsd.org> References: <20110130172941.GA10701@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110130172941.GA10701@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: empty function macros 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, 31 Jan 2011 08:10:18 -0000 no problem with this with clang :) On Sun, Jan 30, 2011 at 05:29:41PM +0000, Alexander Best wrote: > hi there, > > i noticed freebsd has a few of the following macros: > > #define FUNC(sb) > > when you do something like > > if (cond) > FUNC(i) > > the compiler complains about an if statement with an empty body. any sensible > way of dealing with this issue? > > i saw some reiserfs code which does the following to silence compilers: > > #define FUNC(sb) do { } while (0) > > cheers. > alex > > -- > a13x > _______________________________________________ > 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 Jan 31 08:56: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 2DF161065670; Mon, 31 Jan 2011 08:56:21 +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 008A98FC13; Mon, 31 Jan 2011 08:56:20 +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 p0V8N6E8040556 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 31 Jan 2011 00:23:07 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <4D46716E.6070500@freebsd.org> Date: Mon, 31 Jan 2011 00:23:10 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Roman Divacky References: <20110130172941.GA10701@freebsd.org> <20110131075439.GA49765@freebsd.org> In-Reply-To: <20110131075439.GA49765@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Best , freebsd-hackers@freebsd.org Subject: Re: empty function macros 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, 31 Jan 2011 08:56:21 -0000 On 1/30/11 11:54 PM, Roman Divacky wrote: > no problem with this with clang :) > > On Sun, Jan 30, 2011 at 05:29:41PM +0000, Alexander Best wrote: >> hi there, >> >> i noticed freebsd has a few of the following macros: >> >> #define FUNC(sb) >> >> when you do something like >> >> if (cond) >> FUNC(i) you missed an important part.... it's probably if (cond) FUNC(i); (note the ';') THAT would be ok.... without the ';' you just made whatever comes next conditional. >> the compiler complains about an if statement with an empty body. any sensible >> way of dealing with this issue? >> >> i saw some reiserfs code which does the following to silence compilers: >> >> #define FUNC(sb) do { } while (0) yeah we do that too in some places. (certainly at work I have done so) >> cheers. >> alex >> >> -- >> a13x >> _______________________________________________ >> 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" > _______________________________________________ > 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 Jan 31 09:42:53 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 943591065673; Mon, 31 Jan 2011 09:42:53 +0000 (UTC) Date: Mon, 31 Jan 2011 09:42:53 +0000 From: Alexander Best To: Julian Elischer Message-ID: <20110131094253.GA98011@freebsd.org> References: <20110130172941.GA10701@freebsd.org> <20110131075439.GA49765@freebsd.org> <4D46716E.6070500@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D46716E.6070500@freebsd.org> Cc: freebsd-hackers@freebsd.org, Roman Divacky Subject: Re: empty function macros 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, 31 Jan 2011 09:42:53 -0000 On Mon Jan 31 11, Julian Elischer wrote: > On 1/30/11 11:54 PM, Roman Divacky wrote: > >no problem with this with clang :) > > > >On Sun, Jan 30, 2011 at 05:29:41PM +0000, Alexander Best wrote: > >>hi there, > >> > >>i noticed freebsd has a few of the following macros: > >> > >>#define FUNC(sb) > >> > >>when you do something like > >> > >>if (cond) > >> FUNC(i) > > you missed an important part.... > > it's probably > if (cond) > FUNC(i); > (note the ';') > THAT would be ok.... > without the ';' you just made whatever comes next conditional. ... still clang outputs a warning. sorry if i was unclear: there's no issue with clang generating wrong code. i just thought we might be able to stop clang from complaining. basically int main(int argc, char **argv) { if (1 > 2) ; } produces a warning in clang, whereas with gcc (base) it doesn't. cheers. alex > > >>the compiler complains about an if statement with an empty body. any > >>sensible > >>way of dealing with this issue? > >> > >>i saw some reiserfs code which does the following to silence compilers: > >> > >>#define FUNC(sb) do { } while (0) > > yeah we do that too in some places. > (certainly at work I have done so) > > > >>cheers. > >>alex > >> > >>-- > >>a13x > >>_______________________________________________ > >>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" > >_______________________________________________ > >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" > > -- a13x From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 31 09:51:58 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 5952B1065673; Mon, 31 Jan 2011 09:51:58 +0000 (UTC) Date: Mon, 31 Jan 2011 09:51:58 +0000 From: Alexander Best To: Roman Divacky Message-ID: <20110131095158.GC98011@freebsd.org> References: <20110130172941.GA10701@freebsd.org> <20110131075439.GA49765@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110131075439.GA49765@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: empty function macros 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, 31 Jan 2011 09:51:58 -0000 On Mon Jan 31 11, Roman Divacky wrote: > no problem with this with clang :) hmmmmm....so compiling the following code int main(int argc, char **argv) { if (1<2) ; } with clang -Werror code.c -o code works for you? cheers. alex > > On Sun, Jan 30, 2011 at 05:29:41PM +0000, Alexander Best wrote: > > hi there, > > > > i noticed freebsd has a few of the following macros: > > > > #define FUNC(sb) > > > > when you do something like > > > > if (cond) > > FUNC(i) > > > > the compiler complains about an if statement with an empty body. any sensible > > way of dealing with this issue? > > > > i saw some reiserfs code which does the following to silence compilers: > > > > #define FUNC(sb) do { } while (0) > > > > cheers. > > alex > > > > -- > > a13x > > _______________________________________________ > > 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" -- a13x From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 31 10:49:31 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 11813106564A for ; Mon, 31 Jan 2011 10:49:31 +0000 (UTC) (envelope-from mremski@comcast.net) Received: from qmta14.westchester.pa.mail.comcast.net (qmta14.westchester.pa.mail.comcast.net [76.96.59.212]) by mx1.freebsd.org (Postfix) with ESMTP id B49C28FC0C for ; Mon, 31 Jan 2011 10:49:30 +0000 (UTC) Received: from omta17.westchester.pa.mail.comcast.net ([76.96.62.89]) by qmta14.westchester.pa.mail.comcast.net with comcast id 2Aob1g0051vXlb85EApW2J; Mon, 31 Jan 2011 10:49:30 +0000 Received: from payne2.remski.net ([75.67.219.182]) by omta17.westchester.pa.mail.comcast.net with comcast id 2ApU1g0053wit233dApWsp; Mon, 31 Jan 2011 10:49:30 +0000 Date: Mon, 31 Jan 2011 05:49:26 -0500 (EST) From: Michael Remski To: "Duane H. Hesser" In-Reply-To: <20110130091037.da14eccc.dhesser@accima.com> Message-ID: References: <20110130091037.da14eccc.dhesser@accima.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Mon, 31 Jan 2011 12:26:49 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: NVIDIA (port) driver fails to create /dev/nvidactl; 8.2Prerelease 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, 31 Jan 2011 10:49:31 -0000 Duane, just a thought. I built the driver without the AGP support, did you build that in? Some of the notes/post install message talks about loading agp.ko first and potential issues with a SHM setting. On Sun, 30 Jan 2011, Duane H. Hesser wrote: > On Sun, 30 Jan 2011 05:07:09 -0500 (EST) > Michael Remski wrote: > >> Duane: >> As a datapoint, I installed the ports/x11/nvidia-driver on a system >> running 8.2 Pre Release from a /usr/src that picked up things from >> yesterday. >> FreeBSD payne.remski.net 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #3: Sat Jan >> 29 05:26:40 EST 2011 root@payne.remski.net:/usr/obj/usr/src/sys/PAYNE >> amd64 >> >> The video card is a GeForce 210 PCIE card, the version in the Makefile is >> 256.53. I did nothing more than make install the port and adjust my >> xorg.conf. >> >> m > > Thanks. That changes things a bit for me. I'll try updating > my sources again (they're only 3 days old, but who knows?) build > a new kernel, and re-install the port. > > This is the sort of report I needed; thanks. > -- > Duane H. Hesser > -- > Duane H. Hesser > From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 31 16:40:39 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 1D3C3106566C for ; Mon, 31 Jan 2011 16:40:39 +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 E3AE68FC1C for ; Mon, 31 Jan 2011 16:40:38 +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 767EE46B45; Mon, 31 Jan 2011 11:40:38 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.10]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E13558A009; Mon, 31 Jan 2011 11:40:36 -0500 (EST) From: John Baldwin To: dhesser@accima.com Date: Mon, 31 Jan 2011 11:36:41 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <20110128124312.a837f288.dhesser@accima.com> In-Reply-To: <20110128124312.a837f288.dhesser@accima.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201101311136.41694.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 31 Jan 2011 11:40:37 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=0.5 required=4.2 tests=BAYES_00,MAY_BE_FORGED, RDNS_DYNAMIC autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: hackers@freebsd.org Subject: Re: NVIDIA (port) driver fails to create /dev/nvidactl; 8.2Prerelease 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, 31 Jan 2011 16:40:39 -0000 On Friday, January 28, 2011 3:43:12 pm Duane H. Hesser wrote: > I am attempting to replace the 'nv' X11 driver with the "official" > nvidia driver from ithe x11/nvidia-driver port, in order to handle > the AVCHD video files from my Canon HF S20. > > I have been trying for several days now, having read the nvidia > README file in /usr/local/share and everything Google has to offer. > > Unfortunately devilfs is smarter and meaner than I. > > The 'xorg.conf' file is created by nividia-xconfig. The console > output when calling 'startx' to begin the frustration is > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > X.Org X Server 1.7.5 > Release Date: 2010-02-16 > X Protocol Version 11, Revision 0 > Build Operating System: FreeBSD 8.1-RELEASE i386 > Current Operating System: FreeBSD belinda.androcles.org 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #3: Thu Jan 27 13:45:06 PST 2011 root@belinda.androcles.org:/usr/obj/usr/src/sys/BELINDA i386 > Build Date: 08 January 2011 05:52:50PM > > Current version of pixman: 0.18.4 > Before reporting problems, check http://wiki.x.org > to make sure that you have the latest version. > Markers: (--) probed, (**) from config file, (==) default setting, > (++) from command line, (!!) notice, (II) informational, > (WW) warning, (EE) error, (NI) not implemented, (??) unknown. > (==) Log file: "/var/log/Xorg.0.log", Time: Fri Jan 28 11:32:46 2011 > (==) Using config file: "/etc/X11/xorg.conf" > NVIDIA: could not open the device file /dev/nvidiactl (No such file or directory). > (EE) Jan 28 11:32:46 NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the > (EE) Jan 28 11:32:46 NVIDIA(0): system's kernel log for additional error messages and > (EE) Jan 28 11:32:46 NVIDIA(0): consult the NVIDIA README for details. > (EE) NVIDIA(0): *** Aborting *** > (EE) Screen(s) found, but none have a usable configuration. > > Fatal server error: > no screens found You don't have an nvidia0 device attached to vgapci0. I would suggest adding printfs to the nvidia driver's probe routine to find out why it failed to probe. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 31 23:00:24 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 485511065675 for ; Mon, 31 Jan 2011 23:00:24 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id C617B8FC13 for ; Mon, 31 Jan 2011 23:00:23 +0000 (UTC) Received: from park.js.berklix.net (p5B22F01B.dip.t-dialin.net [91.34.240.27]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id p0VMJOh6084623; Mon, 31 Jan 2011 22:19:25 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id p0VMJ4I2046326; Mon, 31 Jan 2011 23:19:04 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id p0VMIs90003417; Mon, 31 Jan 2011 23:18:59 +0100 (CET) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201101312218.p0VMIs90003417@fire.js.berklix.net> To: hackers@freebsd.org, netbsd-users@NetBSD.org From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Linux Unix Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com/~jhs/cv/ Date: Mon, 31 Jan 2011 23:18:54 +0100 Sender: jhs@berklix.com Cc: Subject: usr.bin/tar/ ignores error codes from read() just silently pads nulls 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, 31 Jan 2011 23:00:24 -0000 Hi hackers@freebsd.org & netbsd-users@NetBSD.org usr.bin/tar ignores device error codes from read() & silently pads nulls. See FreeBSD 6.2 6.4 7.3, 8.0, 8.1, & current src/usr.bin/tar/write.c NetBSD 5.1 & current src/external/bsd/libarchive/dist/tar/write.c ^write_file_data( last 3 lines ... bytes_read = read I filed a send-pr yesterday Mon, 31 Jan 2011 04:52:29 +0100 (CET) http://www.freebsd.org/cgi/query-pr.cgi?pr=154407 diffs slightly cleaned up here: http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/usr.bin/tar/ Tar author will probably issue cleaner code as soon as he has time. Meantime, if you may have copied in data without realising media was flakey, bsdtar will not have warned (though /var/log/messages does), so you may want to scan with find & a detector eg http://berklix.com/~jhs/src/bsd/jhs/bin/public/8f/ Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail plain text; Not quoted-printable, Not HTML, Not base 64. Reply below text sections not at top, to avoid breaking cumulative context. From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 02:45:30 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 7AF59106566B for ; Tue, 1 Feb 2011 02:45:30 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 3BA6F8FC1C for ; Tue, 1 Feb 2011 02:45:30 +0000 (UTC) Received: from lstewart.caia.swin.edu.au (lstewart.caia.swin.edu.au [136.186.229.95]) by lauren.room52.net (Postfix) with ESMTPSA id E50467E8DB; Tue, 1 Feb 2011 13:45:28 +1100 (EST) Message-ID: <4D4773C8.9040203@freebsd.org> Date: Tue, 01 Feb 2011 13:45:28 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101215 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Neel Natu References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lauren.room52.net Cc: FreeBSD Hackers , Ali Mashtizadeh Subject: Re: Exporting kernel symbols 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, 01 Feb 2011 02:45:30 -0000 On 01/24/11 15:25, Neel Natu wrote: > Hi Ali, > > On Sat, Jan 22, 2011 at 7:20 PM, Ali Mashtizadeh wrote: >> Hi Folks, >> >> I tried to build a geom kernel module that uses the alq(9) facility to >> log some data. The module builds fine but it seems that the kernel >> isn't exporting the alq(9) symbols. Could someone point me how I can >> export particular symbols? >> > > Do you have the kernel compiled with the 'alq' option defined? FreeBSD > 8.1 GENERIC does not define this by default. Which version of FreeBSD are you running? I modified ALQ last year to be able to be loaded as a kernel module. Assuming you can "kldload alq" on your system, you should then be able to load your geom module. Alternatively as Neel suggests, you can add "options ALQ" to your kernel config if you don't want to use modules. Cheers, Lawrence From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 04:23: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 3481B106566B for ; Tue, 1 Feb 2011 04:23:43 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 91A948FC13 for ; Tue, 1 Feb 2011 04:23:42 +0000 (UTC) Received: by eyf6 with SMTP id 6so3062185eyf.13 for ; Mon, 31 Jan 2011 20:23:41 -0800 (PST) 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; bh=gGbYCeqc2mYWIv6LRJ4cCNiQPq72YmKN8T3gMI5dPWo=; b=feAy/9nqlG6Qjt7/H5GEIuHckBvh1mr84tBN9aa0Wbk1Xe0NP0C2wbTx1NBmr8Nw1s Ec1VWMEdtP+IVALc+fjKDJ7YDJM1lXgjtCh5Ca1RnUnBc4ax9wd0iq5RU4xNipdLFC4k eiih+A7gCBflWIDiaPMAnMVguocagDUahHVts= 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; b=qsQVE/kYRAl6QTBFoMZ7EO6DppVJIbRt7kMHyM5CFs9IUZEUUsf4Na4RhN0TkzQhUR mXHcjsXA2tQySJtZB7HmYSeZlZoHCf0ix6qRpwa25J/y+ughliNK7IWpDAu7XYdK6GJF heneury+9lclnZ7bl9jv5jlA/A2KWKq3h0Ims= MIME-Version: 1.0 Received: by 10.213.22.133 with SMTP id n5mr9663677ebb.39.1296534221251; Mon, 31 Jan 2011 20:23:41 -0800 (PST) Received: by 10.213.113.198 with HTTP; Mon, 31 Jan 2011 20:23:41 -0800 (PST) In-Reply-To: <4D4773C8.9040203@freebsd.org> References: <4D4773C8.9040203@freebsd.org> Date: Mon, 31 Jan 2011 23:23:41 -0500 Message-ID: From: Ryan Stone To: Lawrence Stewart Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Hackers , Ali Mashtizadeh , Neel Natu Subject: Re: Exporting kernel symbols 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, 01 Feb 2011 04:23:43 -0000 Make sure that your module uses MODULE_DEPEND to note its dependency on altq. If altq is loaded as a module the kernel linker will only be able to resolve symbols from altq if your module uses MODULE_DEPEND properly. From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 05:32: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 75EFC106566B for ; Tue, 1 Feb 2011 05:32:02 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 344718FC14 for ; Tue, 1 Feb 2011 05:32:01 +0000 (UTC) Received: from lstewart.caia.swin.edu.au (lstewart.caia.swin.edu.au [136.186.229.95]) by lauren.room52.net (Postfix) with ESMTPSA id 40A417E8D5; Tue, 1 Feb 2011 16:32:00 +1100 (EST) Message-ID: <4D479ACF.1090203@freebsd.org> Date: Tue, 01 Feb 2011 16:31:59 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101215 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Ryan Stone References: <4D4773C8.9040203@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lauren.room52.net Cc: FreeBSD Hackers , Ali Mashtizadeh , Neel Natu Subject: Re: Exporting kernel symbols 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, 01 Feb 2011 05:32:02 -0000 On 02/01/11 15:23, Ryan Stone wrote: > Make sure that your module uses MODULE_DEPEND to note its dependency > on altq. If altq is loaded as a module the kernel linker will only be > able to resolve symbols from altq if your module uses MODULE_DEPEND > properly. What you say is correct, but note for the record that we're discussing alq(9), not altq(4) (not that it makes your advice incorrect). Cheers, Lawrence From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 08:12: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 16EA01065672; Tue, 1 Feb 2011 08:12:39 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id C7BC28FC18; Tue, 1 Feb 2011 08:12:38 +0000 (UTC) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id A59E79CB117; Tue, 1 Feb 2011 09:12:36 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by lev.vlakno.cz (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iIt3l1iQ80Xb; Tue, 1 Feb 2011 09:12:36 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 2A94D9CB882; Tue, 1 Feb 2011 09:12:36 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.4/8.14.4/Submit) id p118Ca91063453; Tue, 1 Feb 2011 09:12:36 +0100 (CET) (envelope-from rdivacky) Date: Tue, 1 Feb 2011 09:12:36 +0100 From: Roman Divacky To: Alexander Best Message-ID: <20110201081236.GA63338@freebsd.org> References: <20110130172941.GA10701@freebsd.org> <20110131075439.GA49765@freebsd.org> <20110131095158.GC98011@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110131095158.GC98011@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: empty function macros 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, 01 Feb 2011 08:12:39 -0000 On Mon, Jan 31, 2011 at 09:51:58AM +0000, Alexander Best wrote: > On Mon Jan 31 11, Roman Divacky wrote: > > no problem with this with clang :) > > hmmmmm....so compiling the following code > > int > main(int argc, char **argv) > { > if (1<2) > ; > } > > with clang -Werror code.c -o code works for you? if (1<2) ; gives a warning (and it should), on the other hand #define NOTHING if (1<2) NOTHING; does not warn, which is what you want right? From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 11:25:01 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id E840C106566C; Tue, 1 Feb 2011 11:25:01 +0000 (UTC) Date: Tue, 1 Feb 2011 11:25:01 +0000 From: Alexander Best To: Roman Divacky Message-ID: <20110201112501.GA99666@freebsd.org> References: <20110130172941.GA10701@freebsd.org> <20110131075439.GA49765@freebsd.org> <20110131095158.GC98011@freebsd.org> <20110201081236.GA63338@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110201081236.GA63338@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: empty function macros 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, 01 Feb 2011 11:25:02 -0000 On Tue Feb 1 11, Roman Divacky wrote: > On Mon, Jan 31, 2011 at 09:51:58AM +0000, Alexander Best wrote: > > On Mon Jan 31 11, Roman Divacky wrote: > > > no problem with this with clang :) > > > > hmmmmm....so compiling the following code > > > > int > > main(int argc, char **argv) > > { > > if (1<2) > > ; > > } > > > > with clang -Werror code.c -o code works for you? > > if (1<2) > ; > > gives a warning (and it should), on the other hand > > #define NOTHING > > if (1<2) > NOTHING; > > does not warn, which is what you want right? actually #define NOTHING int main(int argc, char **argv) { if (1<2) NOTHING; return (0); } *does* warn for me: otaku% clang test.c -o test test.c:7:12: warning: if statement has empty body [-Wempty-body] NOTHING; ^ 1 warning generated. ..gcc on the otherhand will only warn with -Wextra. so the questions still stands: should #define NOTHING be replaced with #define NOTHING do { } while (0) ? cheers. alex -- a13x From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 12:24:32 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id B0CEA1065679; Tue, 1 Feb 2011 12:24:32 +0000 (UTC) Date: Tue, 1 Feb 2011 12:24:32 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20110201122432.GA6786@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: weird characters in top(1) output 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, 01 Feb 2011 12:24:32 -0000 hi there, i was doing the following: top inf > ~/output when i noticed that this was missing the overall statistics line. so i went ahead and did: top -d2 inf > ~/output funny thing is that for the second output some weird characters seem to get spammed into the overall statistics line: last pid: 14320; load averages: 0.42, 0.44, 0.37 up 1+14:02:02 13:21:05 249 processes: 1 running, 248 sleeping CPU: ^[[3;6H 7.8% user, 0.0% nice, 10.6% system, 0.6% interrupt, 81.0% idle Mem: 1271M Active, 205M Inact, 402M Wired, 67M Cache, 212M Buf, 18M Free Swap: 18G Total, 782M Used, 17G Free, 4% Inuse this only seems to happen when i redirect the top(1) output to a file. if i do: top -d2 inf ...everything works fine. i verified the issue under zsh(1) and sh(1). cheers. alex -- a13x From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 12:52: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 05F0D106564A; Tue, 1 Feb 2011 12:52:12 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 7FA1C8FC08; Tue, 1 Feb 2011 12:52:11 +0000 (UTC) Received: by qyk8 with SMTP id 8so3995406qyk.13 for ; Tue, 01 Feb 2011 04:52:10 -0800 (PST) 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=tTT7T5LVnHvmSN/F2ufdfxihgYWCE9VZDKV8qBcoyAA=; b=grf6KvfjdufavcpJfvnWaJ8lNl7bnr+bNpZVOf90NwavddtbhEPneFZhLBEhZL7n15 nX+MbrJEKlcII191To7kHJxYWvxXNsUSOTYjxuTOxmeH1mrf+XSS1Xi/mP6ieU4BGd9t X9BtZPfIQ8UNcaXatRnwZQNGHl/FNlbTQOI7s= 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=pIWL/gAVWeb19MaXq6wEML+S/i3hgk34bCe5SwXZs6S/3vYYZIrCT/zV67fXjcqTlE hDuB9Pd0tzDuePuvADpQtuh+kG635ALEHLWejNvxLEKkBQT7wYt//euH08DLrL2571K2 0a1KsoMGjfCcsu/ydw/tJz3o8EsvuQHSQ3QpQ= MIME-Version: 1.0 Received: by 10.229.83.198 with SMTP id g6mr5263022qcl.157.1296564730650; Tue, 01 Feb 2011 04:52:10 -0800 (PST) Received: by 10.229.102.87 with HTTP; Tue, 1 Feb 2011 04:52:10 -0800 (PST) In-Reply-To: <20110201122432.GA6786@freebsd.org> References: <20110201122432.GA6786@freebsd.org> Date: Tue, 1 Feb 2011 15:52:10 +0300 Message-ID: From: Sergey Kandaurov To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: weird characters in top(1) output 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, 01 Feb 2011 12:52:12 -0000 On 1 February 2011 15:24, Alexander Best wrote: > hi there, > > i was doing the following: > > top inf > ~/output > > when i noticed that this was missing the overall statistics line. so i we= nt > ahead and did: > > top -d2 inf > ~/output > > funny thing is that for the second output some weird characters seem to g= et > spammed into the overall statistics line: > > last pid: 14320; =A0load averages: =A00.42, =A00.44, =A00.37 =A0up 1+14:0= 2:02 =A0 =A013:21:05 > 249 processes: 1 running, 248 sleeping > CPU: ^[[3;6H 7.8% user, =A00.0% nice, 10.6% system, =A00.6% interrupt, 81= .0% idle > Mem: 1271M Active, 205M Inact, 402M Wired, 67M Cache, 212M Buf, 18M Free > Swap: 18G Total, 782M Used, 17G Free, 4% Inuse > > this only seems to happen when i redirect the top(1) output to a file. if= i do: > > top -d2 inf > > ...everything works fine. i verified the issue under zsh(1) and sh(1). My quick check shows that this is a regression between 7.2 and 7.3. Reverting r196382 fixes this bug for me. --=20 wbr, pluknet From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 13:11:54 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 8E0351065670; Tue, 1 Feb 2011 13:11:54 +0000 (UTC) Date: Tue, 1 Feb 2011 13:11:54 +0000 From: Alexander Best To: Sergey Kandaurov Message-ID: <20110201131154.GA14569@freebsd.org> References: <20110201122432.GA6786@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Cc: freebsd-hackers@freebsd.org Subject: Re: weird characters in top(1) output 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, 01 Feb 2011 13:11:54 -0000 On Tue Feb 1 11, Sergey Kandaurov wrote: > On 1 February 2011 15:24, Alexander Best wrote: > > hi there, > > > > i was doing the following: > > > > top inf > ~/output > > > > when i noticed that this was missing the overall statistics line. so i went > > ahead and did: > > > > top -d2 inf > ~/output > > > > funny thing is that for the second output some weird characters seem to get > > spammed into the overall statistics line: > > > > last pid: 14320;  load averages:  0.42,  0.44,  0.37  up 1+14:02:02    13:21:05 > > 249 processes: 1 running, 248 sleeping > > CPU: ^[[3;6H 7.8% user,  0.0% nice, 10.6% system,  0.6% interrupt, 81.0% idle > > Mem: 1271M Active, 205M Inact, 402M Wired, 67M Cache, 212M Buf, 18M Free > > Swap: 18G Total, 782M Used, 17G Free, 4% Inuse > > > > this only seems to happen when i redirect the top(1) output to a file. if i do: > > > > top -d2 inf > > > > ...everything works fine. i verified the issue under zsh(1) and sh(1). > > My quick check shows that this is a regression between 7.2 and 7.3. > Reverting r196382 fixes this bug for me. thanks for the help. indeed reverting r196382 fixes the issue. cheers. alex > > -- > wbr, > pluknet -- a13x From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 14:53:13 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 D0D0A10656EC; Tue, 1 Feb 2011 14:53:13 +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 909598FC15; Tue, 1 Feb 2011 14:53:13 +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 3144046B03; Tue, 1 Feb 2011 09:53:13 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.10]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 47A468A02B; Tue, 1 Feb 2011 09:53:12 -0500 (EST) From: John Baldwin To: Alexander Best Date: Tue, 1 Feb 2011 09:39:38 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <20110201122432.GA6786@freebsd.org> <20110201131154.GA14569@freebsd.org> In-Reply-To: <20110201131154.GA14569@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201102010939.38474.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 01 Feb 2011 09:53:12 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=0.5 required=4.2 tests=BAYES_00,MAY_BE_FORGED, RDNS_DYNAMIC autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, Sergey Kandaurov Subject: Re: weird characters in top(1) output 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, 01 Feb 2011 14:53:14 -0000 On Tuesday, February 01, 2011 8:11:54 am Alexander Best wrote: > On Tue Feb 1 11, Sergey Kandaurov wrote: > > On 1 February 2011 15:24, Alexander Best wrote: > > > hi there, > > > > > > i was doing the following: > > > > > > top inf > ~/output > > > > > > when i noticed that this was missing the overall statistics line. so i went > > > ahead and did: > > > > > > top -d2 inf > ~/output > > > > > > funny thing is that for the second output some weird characters seem to get > > > spammed into the overall statistics line: > > > > > > last pid: 14320; load averages: 0.42, 0.44, 0.37 up 1+14:02:02 13:21:05 > > > 249 processes: 1 running, 248 sleeping > > > CPU: ^[[3;6H 7.8% user, 0.0% nice, 10.6% system, 0.6% interrupt, 81.0% idle > > > Mem: 1271M Active, 205M Inact, 402M Wired, 67M Cache, 212M Buf, 18M Free > > > Swap: 18G Total, 782M Used, 17G Free, 4% Inuse > > > > > > this only seems to happen when i redirect the top(1) output to a file. if i do: > > > > > > top -d2 inf > > > > > > ...everything works fine. i verified the issue under zsh(1) and sh(1). > > > > My quick check shows that this is a regression between 7.2 and 7.3. > > Reverting r196382 fixes this bug for me. > > thanks for the help. indeed reverting r196382 fixes the issue. Hmm, you need more than 10 CPUs to understand the reason for that fix. Without it all of the updated per-CPU states are off by one column so you get weird screen effects. The "garbage" characters are actually just a terminal sequence to move the cursor. top uses these things a _lot_ to move the cursor around. You can try this instead though, it figures out the appropriate number of spaces rather than using Move_to() for these two routines: Index: display.c =================================================================== --- display.c (revision 218032) +++ display.c (working copy) @@ -447,12 +447,14 @@ /* print tag and bump lastline */ if (num_cpus == 1) printf("\nCPU: "); - else - printf("\nCPU %d: ", cpu); + else { + value = printf("\nCPU %d: ", cpu); + while (value++ <= cpustates_column) + printf(" "); + } lastline++; /* now walk thru the names and print the line */ - Move_to(cpustates_column, y_cpustates + cpu); while ((thisname = *names++) != NULL) { if (*thisname != '\0') @@ -532,7 +534,7 @@ register char **names; register char *thisname; register int *lp; - int cpu; + int cpu, value; for (cpu = 0; cpu < num_cpus; cpu++) { names = cpustate_names; @@ -540,11 +542,13 @@ /* show tag and bump lastline */ if (num_cpus == 1) printf("\nCPU: "); - else - printf("\nCPU %d: ", cpu); + else { + value = printf("\nCPU %d: ", cpu); + while (value++ <= cpustates_column) + printf(" "); + } lastline++; - Move_to(cpustates_column, y_cpustates + cpu); while ((thisname = *names++) != NULL) { if (*thisname != '\0') -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 15:17:20 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id EAE92106566C; Tue, 1 Feb 2011 15:17:20 +0000 (UTC) Date: Tue, 1 Feb 2011 15:17:20 +0000 From: Alexander Best To: John Baldwin Message-ID: <20110201151720.GA34590@freebsd.org> References: <20110201122432.GA6786@freebsd.org> <20110201131154.GA14569@freebsd.org> <201102010939.38474.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201102010939.38474.jhb@freebsd.org> Cc: freebsd-hackers@freebsd.org, Sergey Kandaurov Subject: Re: weird characters in top(1) output 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, 01 Feb 2011 15:17:21 -0000 On Tue Feb 1 11, John Baldwin wrote: > On Tuesday, February 01, 2011 8:11:54 am Alexander Best wrote: > > On Tue Feb 1 11, Sergey Kandaurov wrote: > > > On 1 February 2011 15:24, Alexander Best wrote: > > > > hi there, > > > > > > > > i was doing the following: > > > > > > > > top inf > ~/output > > > > > > > > when i noticed that this was missing the overall statistics line. so i went > > > > ahead and did: > > > > > > > > top -d2 inf > ~/output > > > > > > > > funny thing is that for the second output some weird characters seem to get > > > > spammed into the overall statistics line: > > > > > > > > last pid: 14320; load averages: 0.42, 0.44, 0.37 up 1+14:02:02 13:21:05 > > > > 249 processes: 1 running, 248 sleeping > > > > CPU: ^[[3;6H 7.8% user, 0.0% nice, 10.6% system, 0.6% interrupt, 81.0% idle > > > > Mem: 1271M Active, 205M Inact, 402M Wired, 67M Cache, 212M Buf, 18M Free > > > > Swap: 18G Total, 782M Used, 17G Free, 4% Inuse > > > > > > > > this only seems to happen when i redirect the top(1) output to a file. if i do: > > > > > > > > top -d2 inf > > > > > > > > ...everything works fine. i verified the issue under zsh(1) and sh(1). > > > > > > My quick check shows that this is a regression between 7.2 and 7.3. > > > Reverting r196382 fixes this bug for me. > > > > thanks for the help. indeed reverting r196382 fixes the issue. > > Hmm, you need more than 10 CPUs to understand the reason for that fix. > Without it all of the updated per-CPU states are off by one column so you > get weird screen effects. The "garbage" characters are actually just a > terminal sequence to move the cursor. top uses these things a _lot_ to > move the cursor around. > > You can try this instead though, it figures out the appropriate number of > spaces rather than using Move_to() for these two routines: the patch works for me: last pid: 15311; load averages: 0.13, 0.54, 0.73 up 1+16:56:18 16:15:21 276 processes: 2 running, 273 sleeping, 1 zombie CPU: 9.8% user, 0.0% nice, 16.5% system, 2.2% interrupt, 71.6% idle Mem: 1329M Active, 135M Inact, 417M Wired, 79M Cache, 212M Buf, 1608K Free Swap: 18G Total, 1414M Used, 17G Free, 7% Inuse, 4K In #CPU cores == 2 on my system btw. cheers. alex > > Index: display.c > =================================================================== > --- display.c (revision 218032) > +++ display.c (working copy) > @@ -447,12 +447,14 @@ > /* print tag and bump lastline */ > if (num_cpus == 1) > printf("\nCPU: "); > - else > - printf("\nCPU %d: ", cpu); > + else { > + value = printf("\nCPU %d: ", cpu); > + while (value++ <= cpustates_column) > + printf(" "); > + } > lastline++; > > /* now walk thru the names and print the line */ > - Move_to(cpustates_column, y_cpustates + cpu); > while ((thisname = *names++) != NULL) > { > if (*thisname != '\0') > @@ -532,7 +534,7 @@ > register char **names; > register char *thisname; > register int *lp; > - int cpu; > + int cpu, value; > > for (cpu = 0; cpu < num_cpus; cpu++) { > names = cpustate_names; > @@ -540,11 +542,13 @@ > /* show tag and bump lastline */ > if (num_cpus == 1) > printf("\nCPU: "); > - else > - printf("\nCPU %d: ", cpu); > + else { > + value = printf("\nCPU %d: ", cpu); > + while (value++ <= cpustates_column) > + printf(" "); > + } > lastline++; > > - Move_to(cpustates_column, y_cpustates + cpu); > while ((thisname = *names++) != NULL) > { > if (*thisname != '\0') > > -- > John Baldwin -- a13x From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 15:19:49 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 BA77510656A3; Tue, 1 Feb 2011 15:19:49 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 75AA88FC18; Tue, 1 Feb 2011 15:19:48 +0000 (UTC) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 8E9199CB0C7; Tue, 1 Feb 2011 16:19:47 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by lev.vlakno.cz (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cBURRJl3gXjB; Tue, 1 Feb 2011 16:19:47 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id F2B7C9CB882; Tue, 1 Feb 2011 16:19:46 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.4/8.14.4/Submit) id p11FJkYf028316; Tue, 1 Feb 2011 16:19:46 +0100 (CET) (envelope-from rdivacky) Date: Tue, 1 Feb 2011 16:19:46 +0100 From: Roman Divacky To: Alexander Best Message-ID: <20110201151946.GA28197@freebsd.org> References: <20110130172941.GA10701@freebsd.org> <20110131075439.GA49765@freebsd.org> <20110131095158.GC98011@freebsd.org> <20110201081236.GA63338@freebsd.org> <20110201112501.GA99666@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110201112501.GA99666@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: empty function macros 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, 01 Feb 2011 15:19:49 -0000 On Tue, Feb 01, 2011 at 11:25:01AM +0000, Alexander Best wrote: > On Tue Feb 1 11, Roman Divacky wrote: > > On Mon, Jan 31, 2011 at 09:51:58AM +0000, Alexander Best wrote: > > > On Mon Jan 31 11, Roman Divacky wrote: > > > > no problem with this with clang :) > > > > > > hmmmmm....so compiling the following code > > > > > > int > > > main(int argc, char **argv) > > > { > > > if (1<2) > > > ; > > > } > > > > > > with clang -Werror code.c -o code works for you? > > > > if (1<2) > > ; > > > > gives a warning (and it should), on the other hand > > > > #define NOTHING > > > > if (1<2) > > NOTHING; > > > > does not warn, which is what you want right? > > actually > > #define NOTHING > > int > main(int argc, char **argv) > { > if (1<2) > NOTHING; > > return (0); > } > > *does* warn for me: > > otaku% clang test.c -o test > test.c:7:12: warning: if statement has empty body [-Wempty-body] > NOTHING; > ^ > 1 warning generated. are you using clang2.8? if so this is 2.9 feature then :) From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 15:24:40 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 75F74106566B; Tue, 1 Feb 2011 15:24:40 +0000 (UTC) Date: Tue, 1 Feb 2011 15:24:40 +0000 From: Alexander Best To: Roman Divacky Message-ID: <20110201152440.GA35573@freebsd.org> References: <20110130172941.GA10701@freebsd.org> <20110131075439.GA49765@freebsd.org> <20110131095158.GC98011@freebsd.org> <20110201081236.GA63338@freebsd.org> <20110201112501.GA99666@freebsd.org> <20110201151946.GA28197@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110201151946.GA28197@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: empty function macros 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, 01 Feb 2011 15:24:40 -0000 On Tue Feb 1 11, Roman Divacky wrote: > On Tue, Feb 01, 2011 at 11:25:01AM +0000, Alexander Best wrote: > > On Tue Feb 1 11, Roman Divacky wrote: > > > On Mon, Jan 31, 2011 at 09:51:58AM +0000, Alexander Best wrote: > > > > On Mon Jan 31 11, Roman Divacky wrote: > > > > > no problem with this with clang :) > > > > > > > > hmmmmm....so compiling the following code > > > > > > > > int > > > > main(int argc, char **argv) > > > > { > > > > if (1<2) > > > > ; > > > > } > > > > > > > > with clang -Werror code.c -o code works for you? > > > > > > if (1<2) > > > ; > > > > > > gives a warning (and it should), on the other hand > > > > > > #define NOTHING > > > > > > if (1<2) > > > NOTHING; > > > > > > does not warn, which is what you want right? > > > > actually > > > > #define NOTHING > > > > int > > main(int argc, char **argv) > > { > > if (1<2) > > NOTHING; > > > > return (0); > > } > > > > *does* warn for me: > > > > otaku% clang test.c -o test > > test.c:7:12: warning: if statement has empty body [-Wempty-body] > > NOTHING; > > ^ > > 1 warning generated. > > are you using clang2.8? if so this is 2.9 feature then :) indeed only clang 2.8 generates the warning: otaku% clang test.c -o test test.c:7:15: warning: if statement has empty body [-Wempty-body] NOTHING(1); ^ 1 warning generated. otaku% /usr/local/bin/clang test.c -o test otaku% thanks for the hint. so there's no need to remove any #define NOTHING lines, since gcc doesn't complain and with the import of clang 2.9 clang will no longer complain about it. cheers. alex -- a13x From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 1 17:26:09 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 47BBC1065670; Tue, 1 Feb 2011 17:26:09 +0000 (UTC) Date: Tue, 1 Feb 2011 17:26:09 +0000 From: Alexander Best To: John Baldwin Message-ID: <20110201172609.GA51818@freebsd.org> References: <20110201122432.GA6786@freebsd.org> <20110201131154.GA14569@freebsd.org> <201102010939.38474.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201102010939.38474.jhb@freebsd.org> Cc: freebsd-hackers@freebsd.org, Sergey Kandaurov Subject: Re: weird characters in top(1) output 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, 01 Feb 2011 17:26:09 -0000 On Tue Feb 1 11, John Baldwin wrote: > On Tuesday, February 01, 2011 8:11:54 am Alexander Best wrote: > > On Tue Feb 1 11, Sergey Kandaurov wrote: > > > On 1 February 2011 15:24, Alexander Best wrote: > > > > hi there, > > > > > > > > i was doing the following: > > > > > > > > top inf > ~/output > > > > > > > > when i noticed that this was missing the overall statistics line. so i went > > > > ahead and did: > > > > > > > > top -d2 inf > ~/output > > > > > > > > funny thing is that for the second output some weird characters seem to get > > > > spammed into the overall statistics line: > > > > > > > > last pid: 14320; load averages: 0.42, 0.44, 0.37 up 1+14:02:02 13:21:05 > > > > 249 processes: 1 running, 248 sleeping > > > > CPU: ^[[3;6H 7.8% user, 0.0% nice, 10.6% system, 0.6% interrupt, 81.0% idle > > > > Mem: 1271M Active, 205M Inact, 402M Wired, 67M Cache, 212M Buf, 18M Free > > > > Swap: 18G Total, 782M Used, 17G Free, 4% Inuse > > > > > > > > this only seems to happen when i redirect the top(1) output to a file. if i do: > > > > > > > > top -d2 inf > > > > > > > > ...everything works fine. i verified the issue under zsh(1) and sh(1). > > > > > > My quick check shows that this is a regression between 7.2 and 7.3. > > > Reverting r196382 fixes this bug for me. > > > > thanks for the help. indeed reverting r196382 fixes the issue. > > Hmm, you need more than 10 CPUs to understand the reason for that fix. > Without it all of the updated per-CPU states are off by one column so you > get weird screen effects. The "garbage" characters are actually just a > terminal sequence to move the cursor. top uses these things a _lot_ to > move the cursor around. > > You can try this instead though, it figures out the appropriate number of > spaces rather than using Move_to() for these two routines: btw: shouldn't top(1) switch to batch mode when redirecting the output to a file? because right now it seems to stay in interactive mode. doing `top -b -d2 inf > output` works even without your changes. cheers. alex > > Index: display.c > =================================================================== > --- display.c (revision 218032) > +++ display.c (working copy) > @@ -447,12 +447,14 @@ > /* print tag and bump lastline */ > if (num_cpus == 1) > printf("\nCPU: "); > - else > - printf("\nCPU %d: ", cpu); > + else { > + value = printf("\nCPU %d: ", cpu); > + while (value++ <= cpustates_column) > + printf(" "); > + } > lastline++; > > /* now walk thru the names and print the line */ > - Move_to(cpustates_column, y_cpustates + cpu); > while ((thisname = *names++) != NULL) > { > if (*thisname != '\0') > @@ -532,7 +534,7 @@ > register char **names; > register char *thisname; > register int *lp; > - int cpu; > + int cpu, value; > > for (cpu = 0; cpu < num_cpus; cpu++) { > names = cpustate_names; > @@ -540,11 +542,13 @@ > /* show tag and bump lastline */ > if (num_cpus == 1) > printf("\nCPU: "); > - else > - printf("\nCPU %d: ", cpu); > + else { > + value = printf("\nCPU %d: ", cpu); > + while (value++ <= cpustates_column) > + printf(" "); > + } > lastline++; > > - Move_to(cpustates_column, y_cpustates + cpu); > while ((thisname = *names++) != NULL) > { > if (*thisname != '\0') > > -- > John Baldwin -- a13x From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 2 14:46: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 24C65106566C; Wed, 2 Feb 2011 14:46:46 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id B31248FC0A; Wed, 2 Feb 2011 14:46:45 +0000 (UTC) Received: by qyk8 with SMTP id 8so5312900qyk.13 for ; Wed, 02 Feb 2011 06:46:44 -0800 (PST) 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=wZg3BMK55vt/oXi7wxW5kQN0M9YQ13ffFFrw/La1Bd8=; b=T9fmu0vKlJhO0KPq6QcwOUi1/L5qLNJasgRcoZ+/lLXLm2XCICOve6/8loxz+JPnOu yTRFHHUwjqIRwom9SkjiJvjI6GSamRl3AA1ZEw3yRcknXF3d6kiGeJhG2jZG/DqGcZtv ThQnch08HpZAEX5+yu0243z6fBWgFE5pgQX3Y= 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=lMtsCmd0zv7D81cjf0DBoG4mffy1hB+B9HfEIM8H0Us9WTns3la6V2CYMrguCXWMvC 4jm4/8CKupdI27WbjddGC9qxqy+lFzxWk4Qz2PoBxDf/xvvYIfLJj34Cd5ALSSACz4WU UdaQQC95OWoA3JCSPwnbenuJUPnKKGXletchE= MIME-Version: 1.0 Received: by 10.224.19.139 with SMTP id a11mr8498193qab.286.1296658003509; Wed, 02 Feb 2011 06:46:43 -0800 (PST) Received: by 10.229.102.87 with HTTP; Wed, 2 Feb 2011 06:46:43 -0800 (PST) In-Reply-To: <20110106014046.GA324@freebsd.org> References: <20110106014046.GA324@freebsd.org> Date: Wed, 2 Feb 2011 17:46:43 +0300 Message-ID: From: Sergey Kandaurov To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: broken INCLUDE in sys/conf/kern.pre.mk for opensolaris code? 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, 02 Feb 2011 14:46:46 -0000 On 6 January 2011 04:40, Alexander Best wrote: > hi there, > > while building target buildkernel with 'clang -v' i noticed a lot of thes= e > lines: > > ignoring nonexistent directory "/usr/subversion-src/sys/contrib/opensolar= is/compat" > > i checked sys/conf/kern.pre.mk and there's a line refering to a non-exist= ing > directory: > > # ... =A0and OpenSolaris > INCLUDES+=3D -I$S/contrib/opensolaris/compat Hi, I just removed that path in r218189. > > is suspect this should actually be: > > # ... =A0and OpenSolaris > INCLUDES+=3D -I$S/cddl/compat/opensolaris > > but i'm not sure of it. > I found that instead it's included in modules' Makefile (e.g. as done for /sys/modules/cyclic). --=20 wbr, pluknet From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 2 17:20:10 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 9F4C91065672; Wed, 2 Feb 2011 17:20:10 +0000 (UTC) Date: Wed, 2 Feb 2011 17:20:10 +0000 From: Alexander Best To: Sergey Kandaurov Message-ID: <20110202172010.GA17563@freebsd.org> References: <20110106014046.GA324@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Cc: freebsd-hackers@freebsd.org Subject: Re: broken INCLUDE in sys/conf/kern.pre.mk for opensolaris code? 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, 02 Feb 2011 17:20:10 -0000 On Wed Feb 2 11, Sergey Kandaurov wrote: > On 6 January 2011 04:40, Alexander Best wrote: > > hi there, > > > > while building target buildkernel with 'clang -v' i noticed a lot of these > > lines: > > > > ignoring nonexistent directory "/usr/subversion-src/sys/contrib/opensolaris/compat" > > > > i checked sys/conf/kern.pre.mk and there's a line refering to a non-existing > > directory: > > > > # ...  and OpenSolaris > > INCLUDES+= -I$S/contrib/opensolaris/compat > > Hi, I just removed that path in r218189. thanks a bunch. :) i might do a 'make universe' build at some point with clang -v in order to check, if there are more cases where non-existing include paths exist in the freebsd src. > > > > > is suspect this should actually be: > > > > # ...  and OpenSolaris > > INCLUDES+= -I$S/cddl/compat/opensolaris > > > > but i'm not sure of it. > > > > I found that instead it's included in modules' Makefile > (e.g. as done for /sys/modules/cyclic). > > -- > wbr, > pluknet -- a13x From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 2 18:15:56 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 914711065673; Wed, 2 Feb 2011 18:15:56 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 324DB8FC0A; Wed, 2 Feb 2011 18:15:55 +0000 (UTC) Received: by qwj9 with SMTP id 9so255451qwj.13 for ; Wed, 02 Feb 2011 10:15:55 -0800 (PST) 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=7XK5AneJOet/pFQYmrSiJByD7GaTe/sF8i/ZoUGhecI=; b=m2hLwlP440NITtNSHBT9ABicRPMxfxZ6+FhFVApC7xMOGL8IyuFI4CBVcmKiK9hHu1 aAlkpbmoCeELa6wKjoHGnk3v9QmL5Iz4hH3SmfyyeNaS2PBrgCab5nIVOQ8KbVox7IRC eSSwheZ3kCBFWI3Kn1ZB2LTBEDdrW2Wka6L0E= 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=sjDfYcquBRrZ1V3QYoxOqGx7+hf+WRLtSNsysJGGq/vDAKiwbi4FZ5yauKFd9QuMY/ l4wBbhHVG+23LBejJw0YEuwzml+c3ljulS3HO6bx7rWrefHVnkp3A2kYiI5hLWrPkg1B VDY4Erva3UaiIpNpsOT4rbZ+LKWUsT8ahZcUU= MIME-Version: 1.0 Received: by 10.229.185.1 with SMTP id cm1mr6711046qcb.81.1296670555254; Wed, 02 Feb 2011 10:15:55 -0800 (PST) Received: by 10.229.102.87 with HTTP; Wed, 2 Feb 2011 10:15:55 -0800 (PST) In-Reply-To: <20110202172010.GA17563@freebsd.org> References: <20110106014046.GA324@freebsd.org> <20110202172010.GA17563@freebsd.org> Date: Wed, 2 Feb 2011 21:15:55 +0300 Message-ID: From: Sergey Kandaurov To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: broken INCLUDE in sys/conf/kern.pre.mk for opensolaris code? 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, 02 Feb 2011 18:15:56 -0000 On 2 February 2011 20:20, Alexander Best wrote: > On Wed Feb =A02 11, Sergey Kandaurov wrote: >> On 6 January 2011 04:40, Alexander Best wrote: >> > hi there, >> > >> > while building target buildkernel with 'clang -v' i noticed a lot of t= hese >> > lines: >> > >> > ignoring nonexistent directory "/usr/subversion-src/sys/contrib/openso= laris/compat" >> > >> > i checked sys/conf/kern.pre.mk and there's a line refering to a non-ex= isting >> > directory: >> > >> > # ... =A0and OpenSolaris >> > INCLUDES+=3D -I$S/contrib/opensolaris/compat >> >> Hi, I just removed that path in r218189. > > thanks a bunch. :) > > i might do a 'make universe' build at some point with clang -v in order t= o > check, if there are more cases where non-existing include paths exist in = the > freebsd src. Thanks a lot. That would be great, I think. --=20 wbr, pluknet From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 2 18:31:36 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 B0FE7106566B for ; Wed, 2 Feb 2011 18:31:36 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og114.obsmtp.com (exprod7og114.obsmtp.com [64.18.2.215]) by mx1.freebsd.org (Postfix) with ESMTP id 30F168FC19 for ; Wed, 2 Feb 2011 18:31:35 +0000 (UTC) Received: from source ([66.129.224.36]) (using TLSv1) by exprod7ob114.postini.com ([64.18.6.12]) with SMTP ID DSNKTUmjB1MvYfuiFiZYkEm5p/VKmEP0RyMT@postini.com; Wed, 02 Feb 2011 10:31:36 PST Received: from p-emfe02-wf.jnpr.net (172.28.145.25) by P-EMHUB02-HQ.jnpr.net (172.24.192.36) with Microsoft SMTP Server (TLS) id 8.2.254.0; Wed, 2 Feb 2011 10:06:21 -0800 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, 2 Feb 2011 13:08:25 -0500 From: Andrew Duane To: "freebsd-hackers@freebsd.org" Date: Wed, 2 Feb 2011 13:04:15 -0500 Thread-Topic: Strange problems in the old libc malloc routines Thread-Index: AQHLwwQvLmaqR8SdCk+zAeqiMD/Fmg== Message-ID: 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 Subject: Strange problems in the old libc malloc routines 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, 02 Feb 2011 18:31:36 -0000 We are still using the FreeBSD 6 malloc routines, and are rather suddenly h= aving a large number of problems with one or two of our programs. Before I = dig into the 100+ crash dumps I have, I thought I'd see if anyone else has = ever encountered this. The problems all seem to stem from some case of malloc returning the pointe= r "1" instead of either NULL or a valid pointer. Always exactly "1". Where = this goes bad depends on where it happens (in the program or inside malloc = itself), but that pointer value of "1" is always involved. Some of the stru= ctures like page_dir look corrupted too. It seems as if maybe the "1" is co= ming from sbrk(0) which is just returning the value of curbrk (which is cor= rect, and not even close to "1").=20 Does this ring any bells? -- Andrew Duane Juniper Networks 978-589-0551 10 Technology Park Dr aduane@juniper.net Westford, MA 01886-3418 From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 2 18:48:59 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 F158A106564A for ; Wed, 2 Feb 2011 18:48:59 +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 C10F18FC19 for ; Wed, 2 Feb 2011 18:48:59 +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 79D0146B32 for ; Wed, 2 Feb 2011 13:48:59 -0500 (EST) Received: from kavik.baldwin.cx (c-68-36-150-83.hsd1.nj.comcast.net [68.36.150.83]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 964588A01D for ; Wed, 2 Feb 2011 13:48:58 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 2 Feb 2011 13:48:56 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-RC1; KDE/4.5.5; i386; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102021348.57102.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 02 Feb 2011 13:48:58 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-0.9 required=4.2 tests=BAYES_00,RDNS_DYNAMIC autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Subject: Re: Strange problems in the old libc malloc routines 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, 02 Feb 2011 18:49:00 -0000 On Wednesday, February 02, 2011 01:04:15 pm Andrew Duane wrote: > We are still using the FreeBSD 6 malloc routines, and are rather suddenly > having a large number of problems with one or two of our programs. Before > I dig into the 100+ crash dumps I have, I thought I'd see if anyone else > has ever encountered this. > > The problems all seem to stem from some case of malloc returning the > pointer "1" instead of either NULL or a valid pointer. Always exactly "1". > Where this goes bad depends on where it happens (in the program or inside > malloc itself), but that pointer value of "1" is always involved. Some of > the structures like page_dir look corrupted too. It seems as if maybe the > "1" is coming from sbrk(0) which is just returning the value of curbrk > (which is correct, and not even close to "1"). Could it be related to calls to malloc(0) perhaps? phkmalloc uses a constant for those that defaults to the last byte in a page (e.g. 4095 on x86). I'm not sure what platform you are using malloc on, but is it possible that you have ZEROSIZEPTR set to 1 somehow? Even so, if that is true free() should just ignore that pointer and not corrupt its internal state. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 2 18:56: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 7A109106566C for ; Wed, 2 Feb 2011 18:56:35 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 074648FC22 for ; Wed, 2 Feb 2011 18:56:34 +0000 (UTC) Received: by eyf6 with SMTP id 6so258187eyf.13 for ; Wed, 02 Feb 2011 10:56:34 -0800 (PST) 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=5fXJWCtiZSiGSdeB9whkxytPJE++BV4L22cDBfJHRVs=; b=USmS78Ogmp3dvVo1XiP8ZaTEvxh+QWKAwcE6GB7WWjtMIsH8dNMHT0QsxkOY+yHb6h HaWMyd+Vx+zZrqqIwppUKDZvf6z1rkK3x9zoLxh6d0PTkW+1Whiebt+NheYkm+0nemtR bI1Gs+CRstCd6pxXXjVTkgNfTiO9KZ41AaFTE= 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=iAUC0LzLgw/4K1EcXDSxFi9ynY1DFzVb85JprDTvOQKF4QHsMmD39uvQd4wMpiES3n 7N+5negln25DDW46L+/Na9USV2eM4Yz9klcdS9lFc8NudQY6nDYc7atVq1thgjA0JKR+ RGgKb9cA7bA2j0ET3+s9crJaePZ0b8cZRqBnk= Received: by 10.213.35.209 with SMTP id q17mr11551779ebd.53.1296671481733; Wed, 02 Feb 2011 10:31:21 -0800 (PST) Received: from localhost (tor-exit-readme.hands.com [83.142.228.14]) by mx.google.com with ESMTPS id t50sm18424577eeh.6.2011.02.02.10.31.17 (version=SSLv3 cipher=RC4-MD5); Wed, 02 Feb 2011 10:31:20 -0800 (PST) From: Anonymous To: Alexander Best References: <20110106014046.GA324@freebsd.org> <20110202172010.GA17563@freebsd.org> Date: Wed, 02 Feb 2011 21:30:55 +0300 In-Reply-To: <20110202172010.GA17563@freebsd.org> (Alexander Best's message of "Wed, 2 Feb 2011 17:20:10 +0000") Message-ID: <867hdijnkw.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, Sergey Kandaurov Subject: Re: broken INCLUDE in sys/conf/kern.pre.mk for opensolaris code? 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, 02 Feb 2011 18:56:35 -0000 Alexander Best writes: > On Wed Feb 2 11, Sergey Kandaurov wrote: >> On 6 January 2011 04:40, Alexander Best wrote: >> > hi there, >> > >> > while building target buildkernel with 'clang -v' i noticed a lot of these >> > lines: >> > >> > ignoring nonexistent directory "/usr/subversion-src/sys/contrib/opensolaris/compat" >> > >> > i checked sys/conf/kern.pre.mk and there's a line refering to a non-existing >> > directory: >> > >> > # ... and OpenSolaris >> > INCLUDES+= -I$S/contrib/opensolaris/compat >> >> Hi, I just removed that path in r218189. > > thanks a bunch. :) > > i might do a 'make universe' build at some point with clang -v in order to > check, if there are more cases where non-existing include paths exist in the > freebsd src. -Wmissing-include-dirs (with -Werror) is there to catch such cases. Try to add it to CWARNFLAGS and see if universe build passes. Note, clang doesn't support it and it's broken in our gcc but there is a simple fix, unfortunately, under gplv3. From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 3 11:37:01 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 204D4106566C; Thu, 3 Feb 2011 11:37:01 +0000 (UTC) Date: Thu, 3 Feb 2011 11:37:01 +0000 From: Alexander Best To: Anonymous Message-ID: <20110203113701.GA97747@freebsd.org> References: <20110106014046.GA324@freebsd.org> <20110202172010.GA17563@freebsd.org> <867hdijnkw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <867hdijnkw.fsf@gmail.com> Cc: freebsd-hackers@freebsd.org, Sergey Kandaurov Subject: Re: broken INCLUDE in sys/conf/kern.pre.mk for opensolaris code? 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, 03 Feb 2011 11:37:01 -0000 On Wed Feb 2 11, Anonymous wrote: > Alexander Best writes: > > > On Wed Feb 2 11, Sergey Kandaurov wrote: > >> On 6 January 2011 04:40, Alexander Best wrote: > >> > hi there, > >> > > >> > while building target buildkernel with 'clang -v' i noticed a lot of these > >> > lines: > >> > > >> > ignoring nonexistent directory "/usr/subversion-src/sys/contrib/opensolaris/compat" > >> > > >> > i checked sys/conf/kern.pre.mk and there's a line refering to a non-existing > >> > directory: > >> > > >> > # ... and OpenSolaris > >> > INCLUDES+= -I$S/contrib/opensolaris/compat > >> > >> Hi, I just removed that path in r218189. > > > > thanks a bunch. :) > > > > i might do a 'make universe' build at some point with clang -v in order to > > check, if there are more cases where non-existing include paths exist in the > > freebsd src. > > -Wmissing-include-dirs (with -Werror) is there to catch such cases. > Try to add it to CWARNFLAGS and see if universe build passes. > > Note, clang doesn't support it and it's broken in our gcc but there is a > simple fix, unfortunately, under gplv3. could you point me to that gcc gplv3 fix? i don't quite get why clang is missing this feature. -Wmissing-include-dirs was set to be a noop in r86059 by chris lattner. since clang -v documents missing include directories, the functionality already exists within llv/clang. cheers. alex -- a13x From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 3 13:04:52 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 3A6391065672; Thu, 3 Feb 2011 13:04:52 +0000 (UTC) (envelope-from swell.k@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 8D2298FC14; Thu, 3 Feb 2011 13:04:51 +0000 (UTC) Received: by bwz12 with SMTP id 12so1609811bwz.13 for ; Thu, 03 Feb 2011 05:04:50 -0800 (PST) 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=WGdXtJYYM83HFKcdzbxqSblL9YIOiw9IzdzJpz7dhrI=; b=hXBIqj6X04D6ywSWiXD19KjEEfc9En4kVXVKzVUB0aR3C2RE95gFcLs85IvMrhHdEn vcRF7JsdIVV/KI2xA4m0jLHiUX6PHOtkbp3xnblERs3Zs/3dPaLq9nOx+0gG7tfhqIM4 fKGPwDzPZdXzDGmYHVC9jFnzM9CMBVGQ64rcA= 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=r2yXt0295MJ7BYdxaH8WACTVmVXzl5Kk5eS2+K1gPr3Od2T5IwG/Tw4J+nOEgjq705 T1ciC0HH7wIy8y2YmkRA7iTpnYXCPEGu21Zb8Z7xMgrI6uUSXQbFS1VYxdqCw5zFp2w3 kLVCg2/+U2CePMGgSXgiaQWYesTgt99WvBUCQ= Received: by 10.204.103.196 with SMTP id l4mr4884530bko.209.1296738290295; Thu, 03 Feb 2011 05:04:50 -0800 (PST) Received: from localhost (tor-exit-router38-readme.formlessnetworking.net [199.48.147.38]) by mx.google.com with ESMTPS id b6sm421223bkb.22.2011.02.03.05.04.42 (version=SSLv3 cipher=RC4-MD5); Thu, 03 Feb 2011 05:04:48 -0800 (PST) From: Anonymous To: Alexander Best References: <20110106014046.GA324@freebsd.org> <20110202172010.GA17563@freebsd.org> <867hdijnkw.fsf@gmail.com> <20110203113701.GA97747@freebsd.org> Date: Thu, 03 Feb 2011 16:04:03 +0300 In-Reply-To: <20110203113701.GA97747@freebsd.org> (Alexander Best's message of "Thu, 3 Feb 2011 11:37:01 +0000") Message-ID: <8639o5gth8.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, Sergey Kandaurov Subject: Re: broken INCLUDE in sys/conf/kern.pre.mk for opensolaris code? 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, 03 Feb 2011 13:04:52 -0000 Alexander Best writes: > On Wed Feb 2 11, Anonymous wrote: >> -Wmissing-include-dirs (with -Werror) is there to catch such cases. >> Try to add it to CWARNFLAGS and see if universe build passes. >> >> Note, clang doesn't support it and it's broken in our gcc but there is a >> simple fix, unfortunately, under gplv3. > > could you point me to that gcc gplv3 fix? I can't reproduce the bug on /head anymore, e.g. unlike on 8.2-RC2. http://docs.freebsd.org/cgi/mid.cgi?20081021054625.GA66977 From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 3 13:15:28 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 7B85B1065672; Thu, 3 Feb 2011 13:15:28 +0000 (UTC) Date: Thu, 3 Feb 2011 13:15:28 +0000 From: Alexander Best To: Anonymous Message-ID: <20110203131528.GA13597@freebsd.org> References: <20110106014046.GA324@freebsd.org> <20110202172010.GA17563@freebsd.org> <867hdijnkw.fsf@gmail.com> <20110203113701.GA97747@freebsd.org> <8639o5gth8.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8639o5gth8.fsf@gmail.com> Cc: freebsd-hackers@freebsd.org, Sergey Kandaurov Subject: Re: broken INCLUDE in sys/conf/kern.pre.mk for opensolaris code? 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, 03 Feb 2011 13:15:28 -0000 On Thu Feb 3 11, Anonymous wrote: > Alexander Best writes: > > > On Wed Feb 2 11, Anonymous wrote: > >> -Wmissing-include-dirs (with -Werror) is there to catch such cases. > >> Try to add it to CWARNFLAGS and see if universe build passes. > >> > >> Note, clang doesn't support it and it's broken in our gcc but there is a > >> simple fix, unfortunately, under gplv3. > > > > could you point me to that gcc gplv3 fix? > > I can't reproduce the bug on /head anymore, e.g. unlike on 8.2-RC2. thanks for the link. neither can i reproduce the segfault. i've already found some broken include paths and fixed them. i'll post a patch to current@ in a few days when i'm done fixing the include paths for all archs (kernel & world). so in fact -Wmissing-include-dirs seems to work correctly in HEAD. cheers. alex > > http://docs.freebsd.org/cgi/mid.cgi?20081021054625.GA66977 -- a13x From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 3 19:43:06 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id BA07B10656AE; Thu, 3 Feb 2011 19:43:06 +0000 (UTC) Date: Thu, 3 Feb 2011 19:43:06 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20110203194306.GA55376@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: insufficient flag handling in tools/install.sh 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, 03 Feb 2011 19:43:06 -0000 hi there, i stumbled upon two interesting lines in the amd64 tinderbox output [1]: [...] sh /src/tools/install.sh -d -o root -g wheel -m 755 /obj/src/tmp/usr/include/x86; cd /src/include/../sys/x86/include; for h in *.h; do ln -fs ../../../sys/x86/include/$h /obj/src/tmp/usr/include/x86; done install: chown 0:0 /obj/src/tmp/usr/include/x86: Operation not permitted [...] sh /src/tools/install.sh -d -o root -g wheel -m 755 /obj/src/lib32/usr/include/x86; cd /src/include/../sys/x86/include; sh /src/tools/install.sh -C -o root -g wheel -m 444 *.h /obj/src/lib32/usr/include/x86 install: chown 0:0 /obj/src/lib32/usr/include/x86: Operation not permitted [...] it seems the -d flag breaks the semantics of tools/install.sh entirely and using the script in such a case simply passes all args over to install(1). simply adding the -d flag to the first switch statement won't work, since we need to tell install(1) that it should only expect a single directory as argument. so the -d flag needs to be passed over to install(1), while options such as -o X, -g X, etc. need to be stripped away. any thoughts on how to fix this? cheers. alex [1] http://tinderbox.freebsd.org/tinderbox-head-HEAD-amd64-amd64.full -- a13x From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 3 21:24:05 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 2B8DC106566B for ; Thu, 3 Feb 2011 21:24:05 +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 3880E8FC12 for ; Thu, 3 Feb 2011 21:24:00 +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 p13LM3tG007013 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 3 Feb 2011 13:23:59 -0800 (PST) From: Lionel Garth Jones Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 3 Feb 2011 13:23:59 -0800 Message-Id: <129AAE74-7CAD-48CA-9C25-0610525D2624@usenix.org> To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) 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, 03 Feb 2011 21:47:55 +0000 Subject: USENIX HotCloud '11 Call for Papers Now Open 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, 03 Feb 2011 21:24:05 -0000 The Call for Papers for the 3rd USENIX Workshop on Hot Topics in Cloud Computing (HotCloud '11) is now available. On behalf of the HotCloud '11 Program Committee, we invite you to submit papers that describe novel research directions, as well as practical experiences, in the area of cloud computing. HotCloud brings together researchers and practitioners from academia and industry working on cloud computing technologies. There are many challenges in the design, implementation, and deployment of cloud computing, such as automated service provisioning, service monitoring and management, resource elasticity and interference/isolation between users, cloud programming models, economic models, charging and accounting, and service creation using virtual appliances. We believe that cloud computing will benefit from close interaction between researchers and industry practitioners, so that the research can inform current deployments and deployment challenges can inform new research. In support of this, HotCloud will provide a forum for both academics and practitioners to share their experience, leverage each other's perspectives, and identify new/emerging "hot" trends in this important area. Topics of interest include but are not limited to the following: * Platform as a service * Software as a service * Infrastructure as a service * Elasticity and availability in a cloud * Multi-tenancy * Storage cloud * Charging models and economics * Power-efficient ("green") computing for clouds * Monitoring, troubleshooting, and failure recovery * Cloud management and configuration * Programming models * Virtual appliance management and composition * Security and privacy in clouds * New applications for clouds * Mobile clouds * Cloud usage scenarios Submissions are due March 7, 2011, at 11:59 p.m. EST. For more details on the submission process, please see the complete Call for Papers at http://www.usenix.org/hotcloud11/cfpa We look forward to receiving your submissions! Ion Stoica, University of California, Berkeley John Wilkes, Google HotCloud '11 Program Co-Chairs hotcloud11chairs@usenix.org --------------------------------- Call for Papers 3rd USENIX Workshop on Hot Topics in Cloud Computing (HotCloud '11) June 14, 2011 Portland, OR, USA Part of USENIX Federated Conferences Week, June 12-17, 2011 http://www.usenix.org/hotcloud11/cfpa Submissions Deadline: March 7, 2011, 11:59 p.m. EST --------------------------------- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 4 02:56:13 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 A677F106564A for ; Fri, 4 Feb 2011 02:56:13 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 122898FC0C for ; Fri, 4 Feb 2011 02:56:12 +0000 (UTC) Received: from ur.gsoft.com.au (Ur.gsoft.com.au [203.31.81.44]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p142uAar028439 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 4 Feb 2011 13:26:10 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Fri, 4 Feb 2011 13:26:09 +1030 To: freebsd-hackers Hackers Message-Id: <53A394ED-7C2E-4E4B-A9A7-CB5F1B27DBE3@gsoft.com.au> Mime-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) X-Spam-Score: -2.51 () ALL_TRUSTED,BAYES_00,T_RP_MATCHES_RCVD X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Subject: Scheduler question 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, 04 Feb 2011 02:56:13 -0000 Hi, I am writing a program which reads from a data acquisition chassis = connected to a radar via USB. The interface is a Cypress FX2 and I am = communicating via libusb. The program starts a thread which sits in a loop doing nothing but = libusb_handle_events_timeout() which in turn runs a callback if a = transfer is complete. Each transfer is in a struct which has a mutex and = a 'done' flag (the former protects the later) which is set when the = callback is run by libusb. The main thread sits in a loop waiting for the next transfer to be done = and when it is copying data out to be further processed and then written = out to disk and/or another process for some further mangling. After each USB transfer is done with (ie the main thread has passed it = all out for further processing) the main thread re-submits it to libusb. I only have about 10 milliseconds of buffering (96kbyte FIFO, = 8Mbyte/sec) in the hardware, however I have about 128Mb of USB requests = queued up to libusb. hps@ informed me that libusb will only queue = 16kbyte (2msec) in the kernel at one time although I have increased = this. I hooked up a logic analyser and I can see most of the time it's fairly = regularly transferring 16k of data every 2msec. If I load up the disk by, eg, tar -cf /dev/null /local0 I find it drops = out and I can see gaps in the transfers until eventually the FIFO fills = up and it stops. I am wondering if this is a scheduler problem (or I am expecting too = much :) in that it is not running my libusb thread reliably under load. = The other possibility is that it is a USB issue, although I am looking = at using isochronous transfers instead of bulk. I just noticed that the USB controller and ATA controller share an IRQ, = but I wouldn't expect that to cause a problem.. This is running on FreeBSD 8.1-STABLE, Core 2 Duo with ICH9 chipset. Thanks. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 4 07:13:49 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 615B0106564A for ; Fri, 4 Feb 2011 07:13:49 +0000 (UTC) (envelope-from rea@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id EED6B8FC12 for ; Fri, 4 Feb 2011 07:13:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codelabs.ru; s=two; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=seNwvpAs2AiR79Rir7ddhFsKgSK5QM9gC5edDC2wbNE=; b=prNJ4BZ+B87J5Dbm23Jy1vMxw0lL2YaDS+DQLb6fEN1pyKa3RiMkL2Df8s02lfS5jpfPOoSBZ6V5GqM9PSumcCF3XbGPHYxD1kffkApqk2HIL/FjMTraHDTOtuyZ67z6qz4XTRA96Z8gwuzQpbfHbEB9OFb5tswbPcp8M/qoZp7WKb0e2KfCT2Kexgb41oHIfAobKwETlo0QyMRgNHeC50I0oSy7fNWRvOOC23aKZxVu3eKOnf5BrIrfKMk3sO2DQVjX23o00ZyWAXY/+TOj+06+n7reiv2IY3/CPq3XLbSEEo0+SfCO+KCX9E3AfpvC6+YKjAalp/Pp/BMnL7ZRJg==; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1PlFrX-0002gu-UW; Fri, 04 Feb 2011 10:13:48 +0300 Date: Fri, 4 Feb 2011 10:13:45 +0300 From: Eygene Ryabinkin To: Alexander Best Message-ID: References: <20110203194306.GA55376@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hxkXGo8AKqTJ+9QI" Content-Disposition: inline In-Reply-To: <20110203194306.GA55376@freebsd.org> Sender: rea@codelabs.ru Cc: freebsd-hackers@freebsd.org Subject: Re: insufficient flag handling in tools/install.sh 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, 04 Feb 2011 07:13:49 -0000 --hxkXGo8AKqTJ+9QI Content-Type: multipart/mixed; boundary="Bu8it7iiRSEf40bY" Content-Disposition: inline --Bu8it7iiRSEf40bY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Alexander, good day. Thu, Feb 03, 2011 at 07:43:06PM +0000, Alexander Best wrote: > it seems the -d flag breaks the semantics of tools/install.sh entirely and > using the script in such a case simply passes all args over to install(1). >=20 > simply adding the -d flag to the first switch statement won't work, since= we > need to tell install(1) that it should only expect a single directory as > argument. so the -d flag needs to be passed over to install(1), while opt= ions > such as -o X, -g X, etc. need to be stripped away. The attached patch should fix this: {{{ $ sh install.sh.orig -d -m 700 `pwd`/a-test $ ls -ld a-test drwx------ 2 rea rea 512 4 Feb 10:03 a-test $ sh install.sh -d -m 700 `pwd`/a-test $ ls -ld a-test drwxr-xr-x 2 rea rea 512 4 Feb 10:03 a-test }}} It also adds some proper quoting for the remaining arguments (plain $* vs quoted "$@") to the install.sh (this is a pathological case, but it is better to fix this too, while we're on topic): {{{ $ rm -rf 1; mkdir 1; cd 1; sh -x ../install.sh.orig -d -m 512 "this is a te= st"; ls -l; cd .. + [ 4 -gt 0 ] + break + exec install -p -d -m 512 this is a test total 8 dr-x--x-w- 2 rea rea 512 Feb 4 10:10 a dr-x--x-w- 2 rea rea 512 Feb 4 10:10 is dr-x--x-w- 2 rea rea 512 Feb 4 10:10 test dr-x--x-w- 2 rea rea 512 Feb 4 10:10 this $ rm -rf 1; mkdir 1; cd 1; sh -x ../install.sh -d -m 512 "this is a test"; = ls -l; cd .. + dirmode=3D'' + [ 4 -gt 0 ] + dirmode=3DYES + shift + [ 3 -gt 0 ] + shift + shift + [ 1 -gt 0 ] + break + [ 1 -eq 0 ] + [ -z YES ] + install -d 'this is a test' total 2 drwxr-xr-x 2 rea rea 512 Feb 4 10:10 this is a test }}} --=20 Eygene Ryabinkin ,,,^..^,,, [ Life's unfair - but root password helps! | codelabs.ru ] [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ] --Bu8it7iiRSEf40bY Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="9.x-install.sh-process-d.diff" Content-Transfer-Encoding: quoted-printable --- install.sh.orig 2011-02-04 09:57:39.000000000 +0300 +++ install.sh 2011-02-04 10:03:05.000000000 +0300 @@ -29,8 +29,10 @@ # $FreeBSD$ =20 # parse install's options and ignore them completely. +dirmode=3D"" while [ $# -gt 0 ]; do case $1 in + -d) dirmode=3D"YES"; shift;; -[bCcMpSs]) shift;; -[Bfgmo]) shift; shift;; -[Bfgmo]*) shift;; @@ -38,5 +40,16 @@ esac done =20 +if [ "$#" -eq 0 ]; then + echo "Nothing to do: no files/dirs specified" >&2 + exit 1 +fi + # the remaining arguments are assumed to be files/dirs only. -exec install -p $* +if [ -z "$dirmode" ]; then + exec install -p "$@" +else + for d in "$@"; do + install -d "$d" + done +fi --Bu8it7iiRSEf40bY-- --hxkXGo8AKqTJ+9QI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iF4EAREIAAYFAk1LpykACgkQFq+eroFS7PvocAD/UP7/1NAIiDUPyxar0C6EXXD0 b96psw+lazyoUCp8Zr4BAIV/9tTiBO29tFH9mzTh7xOKIWIBJrUiMJ5VibIDJMdj =xt/9 -----END PGP SIGNATURE----- --hxkXGo8AKqTJ+9QI-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 4 07:20: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 2EFDE106566C for ; Fri, 4 Feb 2011 07:20:46 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id D5FA38FC08 for ; Fri, 4 Feb 2011 07:20:45 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1PlFyG-000FEb-7w for freebsd-hackers@freebsd.org; Fri, 04 Feb 2011 09:20:44 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: freebsd-hackers Hackers Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 04 Feb 2011 09:20:44 +0200 From: Daniel Braniss Message-ID: Subject: harmless zfs warnings? 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, 04 Feb 2011 07:20:46 -0000 I asked this on stable, and since there were no takers, trying my luck here. I see these messages: ZFS WARNING: Unable to attach to gpt/r0/swap. ZFS WARNING: Unable to attach to mfid0p3. I have 2 'disks' /dev/label/r0 and /dev/label/r5, the r0 is gparted such: => 34 1952448445 mfid0 GPT (931G) 34 128 1 freebsd-boot (64K) 162 4194304 2 freebsd-ufs (2.0G) 4194466 100663296 3 freebsd-swap (48G) 104857762 1847590717 4 freebsd-zfs (881G) when doing zpool import [z and or h] all is ok, except for the above WARNINGs, are they harmless? thanks, danny From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 4 08:56: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 214D5106566C for ; Fri, 4 Feb 2011 08:56:43 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id B68E58FC13 for ; Fri, 4 Feb 2011 08:56:41 +0000 (UTC) Received: by wyf19 with SMTP id 19so2079698wyf.13 for ; Fri, 04 Feb 2011 00:56:40 -0800 (PST) Received: by 10.227.157.148 with SMTP id b20mr980wbx.141.1296809800254; Fri, 04 Feb 2011 00:56:40 -0800 (PST) Received: from [10.118.159.153] ([92.90.20.45]) by mx.google.com with ESMTPS id w25sm329398wbd.23.2011.02.04.00.56.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 04 Feb 2011 00:56:39 -0800 (PST) References: In-Reply-To: Mime-Version: 1.0 (iPhone Mail 8A293) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: X-Mailer: iPhone Mail (8A293) From: Damien Fleuriot Date: Fri, 4 Feb 2011 09:56:27 +0100 To: Daniel Braniss Cc: freebsd-hackers Hackers Subject: Re: harmless zfs warnings? 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, 04 Feb 2011 08:56:43 -0000 Hi Daniel, I'm afraid many people subscribed to stable are also hanging here and you ma= y not have much more luck. If that is the case, you may wanna try freebsd-fs@ You will also want to: - increase geom's verbosity - provide your uname -a + zfs version - run dmesg -a for any additional info - show your zpool list - show your swapinfo for completion's sake - show your "mount" output, again for completion --- Fleuriot Damien On 4 Feb 2011, at 08:20, Daniel Braniss wrote: > I asked this on stable, and since there were no takers, trying my luck her= e. >=20 > I see these messages: > ZFS WARNING: Unable to attach to gpt/r0/swap. > ZFS WARNING: Unable to attach to mfid0p3. >=20 > I have 2 'disks' /dev/label/r0 and /dev/label/r5, > the r0 is gparted such: > =3D> 34 1952448445 mfid0 GPT (931G) > 34 128 1 freebsd-boot (64K) > 162 4194304 2 freebsd-ufs (2.0G) > 4194466 100663296 3 freebsd-swap (48G) > 104857762 1847590717 4 freebsd-zfs (881G) >=20 > when doing zpool import [z and or h] all is ok, except for > the above WARNINGs, are they harmless? >=20 > thanks, > danny >=20 >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"= From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 4 10:22:21 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 88B911065675; Fri, 4 Feb 2011 10:22:21 +0000 (UTC) Date: Fri, 4 Feb 2011 10:22:21 +0000 From: Alexander Best To: Eygene Ryabinkin Message-ID: <20110204102221.GA41464@freebsd.org> References: <20110203194306.GA55376@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="EVF5PPMfhYS0aIcm" Content-Disposition: inline In-Reply-To: Cc: freebsd-hackers@freebsd.org Subject: Re: insufficient flag handling in tools/install.sh 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, 04 Feb 2011 10:22:21 -0000 --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri Feb 4 11, Eygene Ryabinkin wrote: > Alexander, good day. hi eygene. thanks a lot for your patch. i made two changes: 1) also catch the -v option for install(1). 2) install(1) accepts multiple directories as arguments, when he -d flag has been specified. so i don't think it's necessary to iterate through all the directories passed to install.sh and invoke install(1) with only one argument at a time. could you take a look at the attached patch? thanks. alex > > Thu, Feb 03, 2011 at 07:43:06PM +0000, Alexander Best wrote: > > it seems the -d flag breaks the semantics of tools/install.sh entirely and > > using the script in such a case simply passes all args over to install(1). > > > > simply adding the -d flag to the first switch statement won't work, since we > > need to tell install(1) that it should only expect a single directory as > > argument. so the -d flag needs to be passed over to install(1), while options > > such as -o X, -g X, etc. need to be stripped away. > > The attached patch should fix this: > {{{ > $ sh install.sh.orig -d -m 700 `pwd`/a-test > $ ls -ld a-test > drwx------ 2 rea rea 512 4 Feb 10:03 a-test > $ sh install.sh -d -m 700 `pwd`/a-test > $ ls -ld a-test > drwxr-xr-x 2 rea rea 512 4 Feb 10:03 a-test > }}} > > It also adds some proper quoting for the remaining arguments (plain $* > vs quoted "$@") to the install.sh (this is a pathological case, but it > is better to fix this too, while we're on topic): > {{{ > $ rm -rf 1; mkdir 1; cd 1; sh -x ../install.sh.orig -d -m 512 "this is a test"; ls -l; cd .. > + [ 4 -gt 0 ] > + break > + exec install -p -d -m 512 this is a test > total 8 > dr-x--x-w- 2 rea rea 512 Feb 4 10:10 a > dr-x--x-w- 2 rea rea 512 Feb 4 10:10 is > dr-x--x-w- 2 rea rea 512 Feb 4 10:10 test > dr-x--x-w- 2 rea rea 512 Feb 4 10:10 this > > $ rm -rf 1; mkdir 1; cd 1; sh -x ../install.sh -d -m 512 "this is a test"; ls -l; cd .. > + dirmode='' > + [ 4 -gt 0 ] > + dirmode=YES > + shift > + [ 3 -gt 0 ] > + shift > + shift > + [ 1 -gt 0 ] > + break > + [ 1 -eq 0 ] > + [ -z YES ] > + install -d 'this is a test' > total 2 > drwxr-xr-x 2 rea rea 512 Feb 4 10:10 this is a test > }}} > -- > Eygene Ryabinkin ,,,^..^,,, > [ Life's unfair - but root password helps! | codelabs.ru ] > [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ] -- a13x --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="install.sh.diff" Index: tools/install.sh =================================================================== --- tools/install.sh (revision 218217) +++ tools/install.sh (working copy) @@ -29,14 +29,25 @@ # $FreeBSD$ # parse install's options and ignore them completely. +dirmode="" while [ $# -gt 0 ]; do case $1 in - -[bCcMpSs]) shift;; + -d) dirmode="YES"; shift;; + -[bCcMpSsv]) shift;; -[Bfgmo]) shift; shift;; -[Bfgmo]*) shift;; *) break; esac done +if [ "$#" -eq 0 ]; then + echo "Nothing to do: no files/dirs specified" >&2 + exit 1 +fi + # the remaining arguments are assumed to be files/dirs only. -exec install -p $* +if [ -z "$dirmode" ]; then + exec install -p "$@" +else + exec install -d "$@" +fi --EVF5PPMfhYS0aIcm-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 4 10:27:48 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 DFFB8106564A; Fri, 4 Feb 2011 10:27:48 +0000 (UTC) (envelope-from rea@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 017318FC1D; Fri, 4 Feb 2011 10:27:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codelabs.ru; s=two; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=O3zByGMcubrcRQfKAvkbExnA5TZ+F+8t2acnpT0H/jU=; b=kgKBgxgsDurflpBbT8nMzWRHKioMraQ4mfz6g2WJ3wzyu7vYxSyaDSxHrrFueOquXVs4FarjHXt6tK8oebamUJrHC8jno3w39tmO3fGud4u9U854WP1OUYEqs3fv9BXlpx+MYxq6HoGF+lw2AR9Z+4yFjxTLuUNDzP665PmmSdN354ugZzd22ur0ilD2bqGzzEsa9i/d6AgkMw4fPge3EqpRJcUycy3uiIZKJuRgzVmEwxLftPCyOmGxTxEORGf0DgSjLfeVUs4sYTJZGIC+isEAsQgkZad69A9FwgHGNAnV0JcTzRs9f3KRtFs8qw+LCY1AZDqTBvb3TsOB61DFAg==; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1PlItH-000Ibv-0b; Fri, 04 Feb 2011 13:27:47 +0300 Date: Fri, 4 Feb 2011 13:27:44 +0300 From: Eygene Ryabinkin To: Alexander Best Message-ID: References: <20110203194306.GA55376@freebsd.org> <20110204102221.GA41464@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Q8BnQc91gJZX4vDc" Content-Disposition: inline In-Reply-To: <20110204102221.GA41464@freebsd.org> Sender: rea@codelabs.ru Cc: freebsd-hackers@freebsd.org Subject: Re: insufficient flag handling in tools/install.sh 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, 04 Feb 2011 10:27:49 -0000 --Q8BnQc91gJZX4vDc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Alexander, good day. Fri, Feb 04, 2011 at 10:22:21AM +0000, Alexander Best wrote: > hi eygene. thanks a lot for your patch. You're welcome ;)) > i made two changes: >=20 > 1) also catch the -v option for install(1). Yep. > 2) install(1) accepts multiple directories as arguments, when he -d flag = has > been specified. so i don't think it's necessary to iterate through all= the > directories passed to install.sh and invoke install(1) with only one > argument at a time. I had overlooked that, thanks for spotting. > could you take a look at the attached patch? Looks fine and works for me, thanks! --=20 Eygene Ryabinkin ,,,^..^,,, [ Life's unfair - but root password helps! | codelabs.ru ] [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ] --Q8BnQc91gJZX4vDc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iF4EAREIAAYFAk1L1KAACgkQFq+eroFS7PuCRAD8DzZ4ABG+tENiUlcsUHAlZXxc hYGmr2H2dYePvPFZfXEA/1aAF7azCnbRYisBd7dvIplwQ4hLjmPrl6NK9KQUTRwq =52Cf -----END PGP SIGNATURE----- --Q8BnQc91gJZX4vDc-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 4 10:32:13 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 1C8711065672; Fri, 4 Feb 2011 10:32:13 +0000 (UTC) Date: Fri, 4 Feb 2011 10:32:13 +0000 From: Alexander Best To: Eygene Ryabinkin Message-ID: <20110204103213.GA45096@freebsd.org> References: <20110203194306.GA55376@freebsd.org> <20110204102221.GA41464@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-hackers@freebsd.org Subject: Re: insufficient flag handling in tools/install.sh 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, 04 Feb 2011 10:32:13 -0000 On Fri Feb 4 11, Eygene Ryabinkin wrote: > Alexander, good day. > > Fri, Feb 04, 2011 at 10:22:21AM +0000, Alexander Best wrote: > > hi eygene. thanks a lot for your patch. > > You're welcome ;)) > > > i made two changes: > > > > 1) also catch the -v option for install(1). > > Yep. > > > 2) install(1) accepts multiple directories as arguments, when he -d flag has > > been specified. so i don't think it's necessary to iterate through all the > > directories passed to install.sh and invoke install(1) with only one > > argument at a time. > > I had overlooked that, thanks for spotting. > > > could you take a look at the attached patch? > > Looks fine and works for me, thanks! cool. :) any committer volunteering to commit these changes? ;) cheers. alex > -- > Eygene Ryabinkin ,,,^..^,,, > [ Life's unfair - but root password helps! | codelabs.ru ] > [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ] -- a13x From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 4 11:19: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 898EB106564A for ; Fri, 4 Feb 2011 11:19:09 +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 3EAA98FC15 for ; Fri, 4 Feb 2011 11:19:09 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PlJgu-0006rt-Lq for freebsd-hackers@freebsd.org; Fri, 04 Feb 2011 12:19:04 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Feb 2011 12:19:04 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Feb 2011 12:19:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Fri, 04 Feb 2011 12:18:52 +0100 Lines: 25 Message-ID: References: <53A394ED-7C2E-4E4B-A9A7-CB5F1B27DBE3@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101102 Thunderbird/3.1.6 In-Reply-To: <53A394ED-7C2E-4E4B-A9A7-CB5F1B27DBE3@gsoft.com.au> X-Enigmail-Version: 1.1.2 Subject: Re: Scheduler question 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, 04 Feb 2011 11:19:09 -0000 On 04/02/2011 03:56, Daniel O'Connor wrote: > I hooked up a logic analyser and I can see most of the time it's fairly regularly transferring 16k of data every 2msec. > > If I load up the disk by, eg, tar -cf /dev/null /local0 I find it drops out and I can see gaps in the transfers until eventually the FIFO fills up and it stops. > > I am wondering if this is a scheduler problem (or I am expecting too much :) in that it is not running my libusb thread reliably under load. The other possibility is that it is a USB issue, although I am looking at using isochronous transfers instead of bulk. I'm surprised this isn't complained about more often - I also regularly see that file system activity blocks other, non-file-using processes which are mostly CPU and memory intensive (but since I'm not running realtime things, it fell under the "good enough" category). Maybe there is kind of global-ish lock of some kind which the VM or the VFS hold which would interfere with normal operation of other processes (maybe when the processes use malloc() to grow their memory?). Could you try 2 things: 1) instead of doing file IO, could you directly use a disk device (e.g. /dev/ad0), possibly with some more intensive utility than dd (e.g. "diskinfo -vt") and see if there is any difference? 2) if there is a difference in 1), try modifying your program to not use malloc() in the critical path (if applicable) and/or use mlock(2)? From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 4 11:45: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 9A8501065672 for ; Fri, 4 Feb 2011 11:45:27 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 00D848FC0C for ; Fri, 4 Feb 2011 11:45:26 +0000 (UTC) Received: from ur.dons.net.au (ppp203-122-198-32.lns6.adl6.internode.on.net [203.122.198.32]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p14BjOjc061976 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 4 Feb 2011 22:15:24 +1030 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: Date: Fri, 4 Feb 2011 22:15:24 +1030 Content-Transfer-Encoding: quoted-printable Message-Id: References: <53A394ED-7C2E-4E4B-A9A7-CB5F1B27DBE3@gsoft.com.au> To: Ivan Voras X-Mailer: Apple Mail (2.1082) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: Scheduler question 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, 04 Feb 2011 11:45:27 -0000 On 04/02/2011, at 21:48, Ivan Voras wrote: >> I am wondering if this is a scheduler problem (or I am expecting too = much :) in that it is not running my libusb thread reliably under load. = The other possibility is that it is a USB issue, although I am looking = at using isochronous transfers instead of bulk. >=20 > I'm surprised this isn't complained about more often - I also = regularly see that file system activity blocks other, non-file-using = processes which are mostly CPU and memory intensive (but since I'm not = running realtime things, it fell under the "good enough" category). = Maybe there is kind of global-ish lock of some kind which the VM or the = VFS hold which would interfere with normal operation of other processes = (maybe when the processes use malloc() to grow their memory?). I guess for an interactive user anything less than 100msec is probably = not noticeable unless it happens reasonably regularly when watching a = video. > Could you try 2 things: >=20 > 1) instead of doing file IO, could you directly use a disk = device (e.g. /dev/ad0), possibly with some more intensive utility than = dd (e.g. "diskinfo -vt") and see if there is any difference? OK, I'll give it a shot. > 2) if there is a difference in 1), try modifying your program to = not use malloc() in the critical path (if applicable) and/or use = mlock(2)? It doesn't allocate memory once it's going, everything is preallocated = before the data transfer starts. I'll have a go with mlock() and see what happens. Thanks :) -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 4 19:11:19 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 EABD7106566B for ; Fri, 4 Feb 2011 19:11:19 +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 B80798FC1A for ; Fri, 4 Feb 2011 19:11:19 +0000 (UTC) Received: from sidecar.usenix.org (sidecar.usenix.org [131.106.3.144]) (authenticated bits=0) by lonestar.usenix.org (8.14.2/8.14.2) with ESMTP id p14J8pQ5010539 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 4 Feb 2011 11:11:19 -0800 (PST) Message-Id: <56BEC012-0839-4F3C-8DB5-768CABE688FC@usenix.org> From: Lionel Garth Jones To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Fri, 4 Feb 2011 11:11:19 -0800 X-Mailer: Apple Mail (2.936) 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, 04 Feb 2011 19:31:51 +0000 Subject: HotStorage '11 Call for Papers Now Available 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, 04 Feb 2011 19:11:20 -0000 On behalf of the 3rd Workshop on Hot Topics in Storage and File Systems (HotStorage '11) program committee, I would like to invite you to submit papers that present a fresh look at file and storage technologies. Storage systems continue to present important research challenges and opportunities today. The rapid increase in the volume and variety of digital data, the trend toward using commodity components rather than custom-built hardware, the ability to insert new filesystem functionality transparently in hypervisors, the emergence of persistent storage memory technologies, the challenges of "big data," the rise of distributed key-value stores (such as nosql), and the proliferation of storage devices in consumer electronics all offer exciting opportunities and new challenges. We expect the workshop submissions to advocate fresh, unorthodox approaches advancing the state of the art in file and storage systems design. Ideas presented in the workshop should provide a new look at storage technologies and eventually lead to work that will likely appear in top-tier systems conferences. The HotStorage workshop aims to bring together researchers interested in presenting their thoughts and engaging in discussions with their colleagues. Topics of interest include but are not limited to: * Cloud storage * Storage for virtualized datacenters * Clustered storage architectures * Storage for mobile and embedded systems * Key-value and "nosql" storage * Solid-state storage * Archival storage * Storage at home * Search and data retrieval * Storage security * Caching, replication, and data consistency * Interactions of storage systems and databases * The challenges of "big data" * Storage system performance modeling and prediction Submissions are due Wednesday, March 9, 2011, at 9:00 p.m. PST. For more details on the submission process, please see the complete Call for Papers at http://www.usenix.org/hotstorage11/cfpa HotStorage '11 will be part of the USENIX Federated Conferences Week, which will take place June 12-17, 2011. We look forward to receiving your submissions! Irfan Ahmad, VMware HotStorage '11 Program Chair hotstorage11chair@usenix.org --------------------------------- Call for Papers 3rd Workshop on Hot Topics in Storage and File Systems (HotStorage '11) June 14, 2011 Portland, OR Part of USENIX Federated Conferences Week, June 12-17, 2011 http://www.usenix.org/hotstorage11/cfpa Submission Deadline: March 9, 2011, 9:00 p.m. PST. --------------------------------- From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 00:39: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 685D4106564A for ; Sat, 5 Feb 2011 00:39:41 +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 E72F88FC0C for ; Sat, 5 Feb 2011 00:39:40 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PlWBc-0004mn-C6 for freebsd-hackers@freebsd.org; Sat, 05 Feb 2011 01:39:36 +0100 Received: from cpe-188-129-112-64.dynamic.amis.hr ([188.129.112.64]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 05 Feb 2011 01:39:36 +0100 Received: from ivoras by cpe-188-129-112-64.dynamic.amis.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 05 Feb 2011 01:39:36 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Sat, 05 Feb 2011 01:39:24 +0100 Lines: 22 Message-ID: References: <53A394ED-7C2E-4E4B-A9A7-CB5F1B27DBE3@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpe-188-129-112-64.dynamic.amis.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101102 Thunderbird/3.1.6 In-Reply-To: Subject: Re: Scheduler question 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, 05 Feb 2011 00:39:41 -0000 On 04/02/2011 12:45, Daniel O'Connor wrote: > > On 04/02/2011, at 21:48, Ivan Voras wrote: >>> I am wondering if this is a scheduler problem (or I am expecting too much :) in that it is not running my libusb thread reliably under load. The other possibility is that it is a USB issue, although I am looking at using isochronous transfers instead of bulk. >> >> I'm surprised this isn't complained about more often - I also regularly see that file system activity blocks other, non-file-using processes which are mostly CPU and memory intensive (but since I'm not running realtime things, it fell under the "good enough" category). Maybe there is kind of global-ish lock of some kind which the VM or the VFS hold which would interfere with normal operation of other processes (maybe when the processes use malloc() to grow their memory?). > > I guess for an interactive user anything less than 100msec is probably not noticeable unless it happens reasonably regularly when watching a video. > >> Could you try 2 things: >> >> 1) instead of doing file IO, could you directly use a disk device (e.g. /dev/ad0), possibly with some more intensive utility than dd (e.g. "diskinfo -vt") and see if there is any difference? > > OK, I'll give it a shot. > >> 2) if there is a difference in 1), try modifying your program to not use malloc() in the critical path (if applicable) and/or use mlock(2)? > > It doesn't allocate memory once it's going, everything is preallocated before the data transfer starts. > > I'll have a go with mlock() and see what happens. Did you find anything interesting? From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 02:13: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 F132A106566B; Sat, 5 Feb 2011 02:13:07 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 737C28FC12; Sat, 5 Feb 2011 02:13:06 +0000 (UTC) Received: from ur.dons.net.au (ppp203-122-198-174.lns6.adl6.internode.on.net [203.122.198.174]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p152D3Cv028395 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 5 Feb 2011 12:43:04 +1030 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: Date: Sat, 5 Feb 2011 12:43:03 +1030 Content-Transfer-Encoding: quoted-printable Message-Id: <7108E013-77D1-47F8-892E-5027DB7D432B@gsoft.com.au> References: <53A394ED-7C2E-4E4B-A9A7-CB5F1B27DBE3@gsoft.com.au> To: Ivan Voras X-Mailer: Apple Mail (2.1082) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: Scheduler question 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, 05 Feb 2011 02:13:08 -0000 On 05/02/2011, at 11:09, Ivan Voras wrote: >> It doesn't allocate memory once it's going, everything is = preallocated before the data transfer starts. >>=20 >> I'll have a go with mlock() and see what happens. >=20 > Did you find anything interesting? I'll be looking at it on Monday, I will let you know :) -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 18:44: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 045961065670 for ; Sat, 5 Feb 2011 18:44:41 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward13.mail.yandex.net (forward13.mail.yandex.net [95.108.130.120]) by mx1.freebsd.org (Postfix) with ESMTP id 80B0C8FC0A for ; Sat, 5 Feb 2011 18:44:40 +0000 (UTC) Received: from smtp11.mail.yandex.net (smtp11.mail.yandex.net [95.108.130.67]) by forward13.mail.yandex.net (Yandex) with ESMTP id 92F3C1080305; Sat, 5 Feb 2011 21:44:38 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1296931478; bh=7CUCDInMNZUAcE15Fn7cPPeD//sYl+oVbxZXR60LqBo=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=dqkT25JKDDvgrTmWEl7nSnbb4Dg+ublb+43zEevwjSd2wdk9GMTj4xYycz0kK3nXK Ah6BmZ7koowEdxKBvFeAS/alh54iPK6Y5bW647K/0XoIcAK/DuEQceemfc6ONi7QOi g84RoiWTj9y0sNkEuqszpdobaDlR+1QUvuaSelnw= Received: from smeshariki2.local (unknown [213.138.85.225]) by smtp11.mail.yandex.net (Yandex) with ESMTPSA id 43D144CC00B8; Sat, 5 Feb 2011 21:44:38 +0300 (MSK) Message-ID: <4D4D9A4D.2070508@yandex.ru> Date: Sat, 05 Feb 2011 21:43:25 +0300 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110106 Thunderbird/3.1.7 MIME-Version: 1.0 To: Ivan Voras References: <4D3CB2AF.9050003@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: Tracking down a problem with php on FreeBSD 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, 05 Feb 2011 18:44:41 -0000 Hi, Ivan! Thank you much for response and sorry for late answer. We was able to collect some data about the issue to make discussion more objective. See below. 24.01.2011 16:54, Ivan Voras пишет: > On 23.1.2011 23:58, Ruslan Mahmatkhanov wrote: >> >> Good day! >> >> We are using custom php application on FreeBSD 8.1R amd64. It is started >> with php-fpm 5.3.3 from ports as backend and nginx 0.8.54 as frontend. >> Several times per day this app is making self unavailable. > > I think it would be more appropriate to ask this on the stable@ list. I believe that this issue is not related to stable only and problem resolution will involve some debugging and stuff, so this was the reason why i post this to hackers@. > >> Simple php-fpm restart solves the problem, but i need to track it down >> to the cause of this situation and ask for your assistance and >> instructions on how to debug it. Some facts about this: > > On one hand, FPM is said to be very experimental... > > Personally, I've been using apache22-worker or apache22-event + > mod_fcgid for years without trouble. We prefer to avoid using apache at all, because in this it's just adds yet another unneeded link and complexity. > It looks very application-specific, possibly not really an OS problem > (or maybe a problem of different expectations from the OS when porting > from Linux). > >> - `top -mio` shows very high (80000-90000 for VCSW) VCSW/IVCSW values >> for php-fpm processes and LA is more than 120 > > How many "real" user request are in these 120? Do any users at the time > of problem (this doesn't look like a "crash") receive valid responses? This problem is seen on development server too with < 5 users online. And nobody receives valid response, they all get this message: Maximum execution time of 30 seconds exceeded in Unknown on line 0. > >> - user seeing http 502 error code in browser >> - php-fpm log has many of this lines in time of crash: >> Jan 23 17:56:58.176425 [WARNING] [pool world] server reached >> max_children setting (100), consider raising it > > Did you try raising it? Does the error happen ONLY when this limit is > reached? Yes, we did. Nothing changes. I'm not sure about second question, i believe it's not related. > These are some very varied errors, not especially consistent with each > other. > > Did you try some generic socket & TCP tuning like described in > http://serverfault.com/questions/64356/freebsd-performance-tuning-sysctls-loader-conf-kernel > ? Yes we did some on initial stage when server was built. And recently tried to raise kern.ipc.somaxconn, but without success. There is full current sysctl.conf: security.bsd.see_other_uids = 0 security.bsd.see_other_gids = 0 security.bsd.unprivileged_proc_debug=0 security.bsd.unprivileged_read_msgbuf=0 security.bsd.conservative_signals=1 security.bsd.hardlink_check_uid=1 security.bsd.hardlink_check_gid=1 vfs.usermount=0 net.inet.tcp.drop_synfin=1 net.inet.icmp.drop_redirect=1 net.inet.icmp.log_redirect=1 net.inet.icmp.bmcastecho=0 net.inet.icmp.maskrepl=0 net.inet.icmp.icmplim=100 net.link.ether.inet.max_age=800 net.inet.ip.redirect=0 net.inet6.ip6.redirect=0 net.inet.ip.sourceroute=0 net.inet.ip.accept_sourceroute=0 net.inet.tcp.blackhole=2 net.inet.udp.blackhole=1 kern.ps_showallprocs=0 net.inet.ip.random_id=1 kern.corefile=/tmp/%U.%N.%P.core > Other than that, you will probably have to debug the php-fpm processes. > Start by observing in which state they are (top without "-mio"). If the > processes are blocking, try "procstat -k " on them. Thay are not in blocking state: PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 39405 www 1 101 0 108M 14832K RUN 1 0:54 25.39% php-fpm 39544 www 1 101 0 108M 14832K CPU1 1 0:42 25.39% php-fpm 39395 www 1 101 0 108M 14828K CPU1 1 0:57 23.39% php-fpm 39401 www 1 101 0 108M 14832K CPU3 3 0:55 23.19% php-fpm 39481 www 1 101 0 108M 14832K RUN 3 0:55 23.10% php-fpm 13024 www 1 101 0 112M 47156K RUN 0 1:30 23.00% php-fpm 39398 www 1 4 0 108M 14832K accept 0 1:00 13.48% php-fpm 39373 www 1 4 0 108M 14832K accept 0 1:00 10.60% php-fpm 39385 www 1 4 0 108M 14832K accept 1 1:00 9.28% php-fpm 22130 www 1 4 0 111M 40200K accept 1 1:32 7.57% php-fpm There is procstat -k/-t for couple of processes from this list: PID TID COMM TDNAME KSTACK 39405 100110 php-fpm - dmapbase PID TID COMM TDNAME CPU PRI STATE WCHAN 39405 100110 php-fpm - 1 185 run - PID TID COMM TDNAME KSTACK 39398 100154 php-fpm - tdq_cpu PID TID COMM TDNAME CPU PRI STATE WCHAN 39398 100154 php-fpm - 0 88 sleep accept When attaching to any hanging php-fpm proccess with truss, than i see a lot of this calls: sched_yield(0x80516c000,0x1,0x4d4828b6,0x8012ef45c,0xffffffff808bfd80,0x7fffffffa078) = 0 (0x0) sched_yield(0x80516c000,0x1,0x4d4828b6,0x8012ef45c,0xffffffff808bfd80,0x7fffffffa078) = 0 (0x0) sched_yield(0x80516c000,0x1,0x4d4828b6,0x8012ef45c,0xffffffff808bfd80,0x7fffffffa078) = 0 (0x0) sched_yield(0x80516c000,0x1,0x4d4828b6,0x8012ef45c,0xffffffff808bfd80,0x7fffffffa078) = 0 (0x0) Thank you in advance for any tips. -- Regards, Ruslan From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 19:00:04 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 67F3C106564A; Sat, 5 Feb 2011 19:00:04 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward12.mail.yandex.net (forward12.mail.yandex.net [95.108.130.94]) by mx1.freebsd.org (Postfix) with ESMTP id 0CFFC8FC0C; Sat, 5 Feb 2011 19:00:03 +0000 (UTC) Received: from smtp13.mail.yandex.net (smtp13.mail.yandex.net [95.108.130.68]) by forward12.mail.yandex.net (Yandex) with ESMTP id 3A1F66E6835A; Sat, 5 Feb 2011 22:00:02 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1296932402; bh=vXg3CjD5ycOCVFOu3d5qLxWH+18UedI30HoHAFxKbUw=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=HsiLNM7vPGQNspl3rn++tJ4FVdWcQtkk0JUJTjFR76diFITq97deNn5GjfOh0WpZP CJvx2sRkYuoAmkLw6oIuCB7lpmIpt7/6jZ8+/hSfDw3Ht7d3EnJUW7s4Fpyz/4e7Bx HBYFXZ7w7HdvI/65Xba1m0M4hxAEVDl79ZyElhwU= Received: from smeshariki2.local (unknown [213.138.85.225]) by smtp13.mail.yandex.net (Yandex) with ESMTPSA id F330C38980A8; Sat, 5 Feb 2011 22:00:01 +0300 (MSK) Message-ID: <4D4D9DEA.8010502@yandex.ru> Date: Sat, 05 Feb 2011 21:58:50 +0300 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110106 Thunderbird/3.1.7 MIME-Version: 1.0 To: Ivan Voras References: <4D3CB2AF.9050003@yandex.ru> <4D4D9A4D.2070508@yandex.ru> In-Reply-To: <4D4D9A4D.2070508@yandex.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Tracking down a problem with php on FreeBSD 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, 05 Feb 2011 19:00:04 -0000 I just forget to add. We tried to rebuild php and modules with WITHOUT_LINKTHR=false (default is true) w/o any visible changes. I also the this in failures column of vmstat -z, may it be somehow related to the issue? ITEM SIZE LIMIT USED FREE REQUESTS FAILURES 32 Bucket: 280, 0, 263, 3, 263, 1 64 Bucket: 536, 0, 323, 6, 329, 93 128 Bucket:1048, 0, 1937, 1, 8897, 21199 tcptw: 72, 5150, 4256, 894, 4862309, 6966 -- Regards, Ruslan From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 19:30: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 8D33E1065673 for ; Sat, 5 Feb 2011 19:30:11 +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 5A92F8FC0C for ; Sat, 5 Feb 2011 19:30:05 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Plnpc-0005Vl-3t for freebsd-hackers@freebsd.org; Sat, 05 Feb 2011 20:30:04 +0100 Received: from 189.61.208.111 ([189.61.208.111]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 05 Feb 2011 20:30:04 +0100 Received: from kubito by 189.61.208.111 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 05 Feb 2011 20:30:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Raphael Kubo da Costa Date: Sat, 05 Feb 2011 17:27:07 -0200 Lines: 12 Message-ID: <87vd0ys2no.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 189.61.208.111 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (berkeley-unix) Cancel-Lock: sha1:Vpk9EoHocUrmaeZn3zajwkW7y2U= Subject: Missing stdint.h includes? 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, 05 Feb 2011 19:30:11 -0000 Hey there, I was working on some code that used devinfo(3). According to devinfo's man page, #including devinfo.h should be enough to use it. However, a program which only #includes devinfo.h fails due to stdint.h (or sys/types.h) not being included, thus giving me some errors about uint32_t and other types not being defined. A few headers in sys/, such as sys/rman.h, have the same problem. Is it a bug in the headers themselves or are the man pages just incorrect? From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 19:34:24 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 194FD1065672 for ; Sat, 5 Feb 2011 19:34:24 +0000 (UTC) (envelope-from yanegomi@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 9BE398FC14 for ; Sat, 5 Feb 2011 19:34:23 +0000 (UTC) Received: by wwf26 with SMTP id 26so3406379wwf.31 for ; Sat, 05 Feb 2011 11:34:22 -0800 (PST) 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; bh=NvatjbvRQQyauG2pqQ2kOEiT4Auvcw2bOecTXpIXfZs=; b=EfBziKrlpmEwZILuydUPS859OE1HWIewXOBpqxEFA0sFIacAJ7BGOUiV/AVkTNKUmW NsnuDfJAGyKjhPSzUnxtKRyP0jZkBuj1Tsxc9VW8u1njIvr0woFAAmZINbLzzWPEZqdK G+XbSZ9AAL9Ly0aCRl3TUdTxMzAdd0NpiMS68= 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; b=hUDWEWEAz50TsEejBR9CwiNH0ZFOCLm/M3pz9WZseS4IO6FBaB3e6ZgLhWt+GmBksi e4jzq/nJibqXguxfe0LLzgWssm5QbJXpiRXJWHP26HyWyfzjIpOPG3MKwuJx8OLtePD2 PdsO3tG71GnQi7fLsnfFSLs8LMAjb65VJuxqE= MIME-Version: 1.0 Received: by 10.216.51.130 with SMTP id b2mr12748531wec.42.1296934462362; Sat, 05 Feb 2011 11:34:22 -0800 (PST) Received: by 10.216.71.200 with HTTP; Sat, 5 Feb 2011 11:34:22 -0800 (PST) In-Reply-To: <87vd0ys2no.fsf@gmail.com> References: <87vd0ys2no.fsf@gmail.com> Date: Sat, 5 Feb 2011 11:34:22 -0800 Message-ID: From: Garrett Cooper To: Raphael Kubo da Costa Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: Missing stdint.h includes? 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, 05 Feb 2011 19:34:24 -0000 On Sat, Feb 5, 2011 at 11:27 AM, Raphael Kubo da Costa wrote: > Hey there, > > I was working on some code that used devinfo(3). According to devinfo's > man page, #including devinfo.h should be enough to use it. However, a > program which only #includes devinfo.h fails due to stdint.h (or > sys/types.h) not being included, thus giving me some errors about > uint32_t and other types not being defined. > > A few headers in sys/, such as sys/rman.h, have the same problem. > > Is it a bug in the headers themselves or are the man pages just > incorrect? I'd say it's the manpages probably because a lot of the types were changed to POSIX integral types, and the manpages weren't updated. Thanks! -Garrett From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 19:44:38 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 6FE5D106564A for ; Sat, 5 Feb 2011 19:44:38 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 213C28FC13 for ; Sat, 5 Feb 2011 19:44:37 +0000 (UTC) Received: by qwj9 with SMTP id 9so2586778qwj.13 for ; Sat, 05 Feb 2011 11:44:37 -0800 (PST) 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:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=VZiDw3b56cm4XHBxggj5y3AfehGx2dph9OM78i7hX6w=; b=eRHliOu9kDQOYqputB5UJZJefEEzahH5hyq35bBuwgNZHdEn/RhNZ8Ry0FnL6lgLxi mxwAINFh0gMaxFMad9aEwWF1RAfLS8bssVcIikoXbplt0LDgQ0wXwLeWWznHTjTrIKyi ILyhTYh5Ho66GmJ6Yp1fRjP2UeeyFmvyGP5aI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=tj1HMKJk9xfZ7wSxeSzAqEZjAbuK94k+tUsUOonmsKdK/9PCy9zVOrR3Af31Ikiol0 YtoBlibilW2Ak9lobJkNBgFP3ahgQtqTc0els6ftficeXYSWRdLG4SKe7MIa4WMvp+mb edeh7b8DwtlIlAARIPnfqKPi26r+tPdR1Y+88= Received: by 10.229.43.195 with SMTP id x3mr11349860qce.291.1296935076400; Sat, 05 Feb 2011 11:44:36 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.67.2 with HTTP; Sat, 5 Feb 2011 11:43:56 -0800 (PST) In-Reply-To: <4D4D9A4D.2070508@yandex.ru> References: <4D3CB2AF.9050003@yandex.ru> <4D4D9A4D.2070508@yandex.ru> From: Ivan Voras Date: Sat, 5 Feb 2011 20:43:56 +0100 X-Google-Sender-Auth: ZkOzC9YleQpuHFcJ3zp9jScqif0 Message-ID: To: Ruslan Mahmatkhanov Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, davidxu@freebsd.org Subject: Re: Tracking down a problem with php on FreeBSD 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, 05 Feb 2011 19:44:38 -0000 On 5 February 2011 19:43, Ruslan Mahmatkhanov wrote: > Hi, Ivan! > > Thank you much for response and sorry for late answer. We was able to > collect some data about the issue to make discussion more objective. See > below. >>> Simple php-fpm restart solves the problem, but i need to track it down >>> to the cause of this situation and ask for your assistance and >>> instructions on how to debug it. Some facts about this: >> >> On one hand, FPM is said to be very experimental... >> >> Personally, I've been using apache22-worker or apache22-event + >> mod_fcgid for years without trouble. > > We prefer to avoid using apache at all, because in this it's just adds yet > another unneeded link and complexity. I guess it's about tradeoffs beween complexity and stability :) >>> - `top -mio` shows very high (80000-90000 for VCSW) VCSW/IVCSW values >>> for php-fpm processes and LA is more than 120 I think this is significant, especially with this: > When attaching to any hanging php-fpm proccess with truss, than i see a lot > of this calls: > sched_yield(0x80516c000,0x1,0x4d4828b6,0x8012ef45c,0xffffffff808bfd80,0x7fffffffa078) > = 0 (0x0) > sched_yield(0x80516c000,0x1,0x4d4828b6,0x8012ef45c,0xffffffff808bfd80,0x7fffffffa078) > = 0 (0x0) > sched_yield(0x80516c000,0x1,0x4d4828b6,0x8012ef45c,0xffffffff808bfd80,0x7fffffffa078) > = 0 (0x0) > sched_yield(0x80516c000,0x1,0x4d4828b6,0x8012ef45c,0xffffffff808bfd80,0x7fffffffa078) > = 0 (0x0) "Normal" processes of the type PHP is have no need to call sched_yield() arbitrarily, unless they are implementing something they shouldn't - like a synchronization primitive (semaphore/lock). If "a lot" means "of the same order of magnitude as your VCSW rate", this is the reason for it. I've analyzed my php-cgi binary and modules and they don't use sched_yield. And yes, grepping for it in the source finds it only in FPM: sapi/fpm/fpm/fpm_atomic.h:140: sched_yield(); It seems they are trying to implement a spinlock by hand, instead of using what the OS provides. (on the other hand, the implementation might be correct but they may be using it wrong). In any case, this points to bugs in FPM. if so, unfortunately I can't help you further. If you really want to continue using FPM, I guess you should probably replace this hand-made lock implementation by sem(4) or see if "robust" pthreads mutexes can be committed and MFCed (maybe with David Xu). Here is the FPM file: http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_atomic.h?revision=305417&view=markup From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 20:04:31 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 89C6F106564A; Sat, 5 Feb 2011 20:04:31 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward15.mail.yandex.net (forward15.mail.yandex.net [95.108.130.119]) by mx1.freebsd.org (Postfix) with ESMTP id 340658FC14; Sat, 5 Feb 2011 20:04:30 +0000 (UTC) Received: from smtp11.mail.yandex.net (smtp11.mail.yandex.net [95.108.130.67]) by forward15.mail.yandex.net (Yandex) with ESMTP id 61EEA4458C7C; Sat, 5 Feb 2011 23:04:29 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1296936269; bh=+ePWuV8zBhSY2jC4ZlBObVqNXf4+M81jWIeboV5Vg6U=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=VTk0n4pHXMuVMw+Ssld2w7G+wFwHVnoy8PWPww3pEvbL3YAG9vC8Pm3ukMR4gxjoI csPDKzIx8CQcvsmdICOjyanld8ZwiAlc6WkmR2NOXZi6ECO2KWCjADzNPC9M2cCvg8 q20wViYC1aAWwnQcxjjc0W9u8lI0jpWivanz7oqM= Received: from smeshariki2.local (unknown [213.138.85.225]) by smtp11.mail.yandex.net (Yandex) with ESMTPSA id 18E8E4CC0080; Sat, 5 Feb 2011 23:04:29 +0300 (MSK) Message-ID: <4D4DAD05.2070707@yandex.ru> Date: Sat, 05 Feb 2011 23:03:17 +0300 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110106 Thunderbird/3.1.7 MIME-Version: 1.0 To: Ivan Voras References: <4D3CB2AF.9050003@yandex.ru> <4D4D9A4D.2070508@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org, davidxu@freebsd.org Subject: Re: Tracking down a problem with php on FreeBSD 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, 05 Feb 2011 20:04:31 -0000 05.02.2011 22:43, Ivan Voras пишет: >>>> - `top -mio` shows very high (80000-90000 for VCSW) VCSW/IVCSW values >>>> for php-fpm processes and LA is more than 120 > > I think this is significant, especially with this: > >> When attaching to any hanging php-fpm proccess with truss, than i see a lot >> of this calls: >> sched_yield(0x80516c000,0x1,0x4d4828b6,0x8012ef45c,0xffffffff808bfd80,0x7fffffffa078) >> = 0 (0x0) >> sched_yield(0x80516c000,0x1,0x4d4828b6,0x8012ef45c,0xffffffff808bfd80,0x7fffffffa078) >> = 0 (0x0) >> sched_yield(0x80516c000,0x1,0x4d4828b6,0x8012ef45c,0xffffffff808bfd80,0x7fffffffa078) >> = 0 (0x0) >> sched_yield(0x80516c000,0x1,0x4d4828b6,0x8012ef45c,0xffffffff808bfd80,0x7fffffffa078) >> = 0 (0x0) > > "Normal" processes of the type PHP is have no need to call > sched_yield() arbitrarily, unless they are implementing something they > shouldn't - like a synchronization primitive (semaphore/lock). If "a > lot" means "of the same order of magnitude as your VCSW rate", this is > the reason for it. > > I've analyzed my php-cgi binary and modules and they don't use sched_yield. > > And yes, grepping for it in the source finds it only in FPM: > > sapi/fpm/fpm/fpm_atomic.h:140: sched_yield(); > > It seems they are trying to implement a spinlock by hand, instead of > using what the OS provides. (on the other hand, the implementation > might be correct but they may be using it wrong). > > In any case, this points to bugs in FPM. if so, unfortunately I can't > help you further. Ok, thank you. I'll try to ask FPM people once again (i sent them the same message that is in hackers@ but with no response) > If you really want to continue using FPM, I guess you should probably > replace this hand-made lock implementation by sem(4) or see if > "robust" pthreads mutexes can be committed and MFCed (maybe with David > Xu). Can you please tell me more what you mean by ""robust" pthreads mutexes" and if it can help somehow without modifying fpm code? Is there any patches that we can apply to our development server to play with? > > Here is the FPM file: > > http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_atomic.h?revision=305417&view=markup -- Regards, Ruslan From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 20:22: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 E0F1C106566B; Sat, 5 Feb 2011 20:22:41 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 80A688FC15; Sat, 5 Feb 2011 20:22:41 +0000 (UTC) Received: by qyk8 with SMTP id 8so464282qyk.13 for ; Sat, 05 Feb 2011 12:22:40 -0800 (PST) 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:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=OFRTdrBdRTp3fOJf90MuJv8pEr7J/hm88dARl5m7Jjo=; b=DKC91yAaqtapwJ0y3C0g93gVs0nIa/d0bBQzZLUA1F+ZZFCxzveOPodghsU/un6CoI FpZK3iBf6TZos7Iw9KqHRkDZqD3RvP9LzC89Kb900RbmsWQok71Z8Hz7T5jNZ/kP0fRr vj9OuRXWl4Oy6Kvaqkddl7rQC8ozBVPSIYN4o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=ATIp/6MOFlWmbaBg8Z/1Cxy/I1JOzn+AS37u720X3ZzZjjXgd3PVYGbkR/C+YDNG0Z AEJ/7myN03rzDHJ1CZLLH/HTR+9YFTcVBcd4QPoulQAKoDW0/gO+ukR8hVVWDwQcnfZM GJR4SfV2yDd/qlChaRrul3WSBvZZDivXVmoCw= Received: by 10.229.182.196 with SMTP id cd4mr7720156qcb.215.1296937360474; Sat, 05 Feb 2011 12:22:40 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.67.2 with HTTP; Sat, 5 Feb 2011 12:22:00 -0800 (PST) In-Reply-To: <4D4DAD05.2070707@yandex.ru> References: <4D3CB2AF.9050003@yandex.ru> <4D4D9A4D.2070508@yandex.ru> <4D4DAD05.2070707@yandex.ru> From: Ivan Voras Date: Sat, 5 Feb 2011 21:22:00 +0100 X-Google-Sender-Auth: 8mQboi_KWvH2ukjhp_Q-whsUSUo Message-ID: To: Ruslan Mahmatkhanov Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, davidxu@freebsd.org Subject: Re: Tracking down a problem with php on FreeBSD 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, 05 Feb 2011 20:22:42 -0000 On 5 February 2011 21:03, Ruslan Mahmatkhanov wrote: > > Can you please tell me more what you mean by ""robust" pthreads mutexes" and It's just a name for properties of a mutex; actually this is imprecise, what's needed here is process-shared & robust (fpm_shm_slots.c: FPM uses shared memory). From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 20:43: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 CF7D91065672 for ; Sat, 5 Feb 2011 20:43:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 496228FC1B for ; Sat, 5 Feb 2011 20:43:21 +0000 (UTC) Received: (qmail 4773 invoked by uid 399); 5 Feb 2011 20:43:20 -0000 Received: from localhost (HELO doug-optiplex.ka9q.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 5 Feb 2011 20:43:20 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4D4DB666.5070301@FreeBSD.org> Date: Sat, 05 Feb 2011 12:43:18 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20110129 Thunderbird/3.1.7 MIME-Version: 1.0 To: Ruslan Mahmatkhanov References: <4D3CB2AF.9050003@yandex.ru> <4D4D9A4D.2070508@yandex.ru> <4D4D9DEA.8010502@yandex.ru> In-Reply-To: <4D4D9DEA.8010502@yandex.ru> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: Tracking down a problem with php on FreeBSD 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, 05 Feb 2011 20:43:22 -0000 On 02/05/2011 10:58, Ruslan Mahmatkhanov wrote: > I just forget to add. > We tried to rebuild php and modules with WITHOUT_LINKTHR=false Due to the way make works the opposite of WITHOUT_* is WITH_*. The actual value that it's defined to is ignored. In any case, you're better off using 'make config', that's what it's there for. :) Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 21:18:28 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 3DE811065670; Sat, 5 Feb 2011 21:18:28 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward13.mail.yandex.net (forward13.mail.yandex.net [95.108.130.120]) by mx1.freebsd.org (Postfix) with ESMTP id DCD258FC0A; Sat, 5 Feb 2011 21:18:27 +0000 (UTC) Received: from smtp11.mail.yandex.net (smtp11.mail.yandex.net [95.108.130.67]) by forward13.mail.yandex.net (Yandex) with ESMTP id 597EB10804F6; Sun, 6 Feb 2011 00:18:26 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1296940706; bh=LmwIAZSFjXjIf0sE4y7ZFEIR/8/DdPhyoC4qXJ6k9+A=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=nCPJRRQHOhve4zqMLxX+WrEoDTOD+HMXeJot2Y9YUviwLX8qQvhv6/htXhM1eyUVS b5bGucVApOgnkW3NNYYx3qjBV89R1oUQ8XXREXtAmJUF4X05cu8bFa3HcsZb0rexQE Yik9F5TCwCFRHZr5z8LR/Y4ker8eFVVsfhGSHk74= Received: from smeshariki2.local (unknown [213.138.85.225]) by smtp11.mail.yandex.net (Yandex) with ESMTPSA id E67184CC00B1; Sun, 6 Feb 2011 00:18:25 +0300 (MSK) Message-ID: <4D4DBE59.3060104@yandex.ru> Date: Sun, 06 Feb 2011 00:17:13 +0300 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110106 Thunderbird/3.1.7 MIME-Version: 1.0 To: Doug Barton References: <4D3CB2AF.9050003@yandex.ru> <4D4D9A4D.2070508@yandex.ru> <4D4D9DEA.8010502@yandex.ru> <4D4DB666.5070301@FreeBSD.org> In-Reply-To: <4D4DB666.5070301@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: Tracking down a problem with php on FreeBSD 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, 05 Feb 2011 21:18:28 -0000 05.02.2011 23:43, Doug Barton пишет: > On 02/05/2011 10:58, Ruslan Mahmatkhanov wrote: >> I just forget to add. >> We tried to rebuild php and modules with WITHOUT_LINKTHR=false > > Due to the way make works the opposite of WITHOUT_* is WITH_*. The > actual value that it's defined to is ignored. > > In any case, you're better off using 'make config', that's what it's > there for. :) > > > Doug > Yes, i saw the contradiction here, and yes i used make config for enabling this option. Thanks. -- Regards, Ruslan From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 21:40: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 C9FBF1065672; Sat, 5 Feb 2011 21:40:11 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 6B7888FC19; Sat, 5 Feb 2011 21:40:10 +0000 (UTC) Received: by qyk8 with SMTP id 8so491079qyk.13 for ; Sat, 05 Feb 2011 13:40:08 -0800 (PST) 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:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=A1l8gwYWrlD05yIi2lzVHkTOTmgCBLJenDAoYcHSjWM=; b=jB6IyHvOgAH66IFyyUNiXpt8vbQproezMlY06TPR9y7p6HP81IJ75qwdD76+VDWNWa cq+myVZ6nSDgNjtwgaQGl7ByOCqaZyUJB0+2HC2MyV1yDpcQ30wEmhWA+SoickUKr6EB fcxn/yB/9onCF/9OqxuRTpvWJZWxPtF/0r3Kg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=sfUvIwuO6yk02Bqu/cxK3kCmZOpcv14+mlY2lwBE9TLau88majw+qRbKw5H/+rJxbC dGYLkpLdYggQZ2OHTaqBhn2TU7/GW/PuYE5Nn63rVVjuPVaipvV3B1xbeyceKUf8jp8B iP05qNm85Bv2nTx/p48PchlhrSSO5GkGyVd3A= Received: by 10.229.228.2 with SMTP id jc2mr11401380qcb.177.1296942007584; Sat, 05 Feb 2011 13:40:07 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.67.2 with HTTP; Sat, 5 Feb 2011 13:39:26 -0800 (PST) In-Reply-To: References: <4D3CB2AF.9050003@yandex.ru> <4D4D9A4D.2070508@yandex.ru> <4D4DAD05.2070707@yandex.ru> From: Ivan Voras Date: Sat, 5 Feb 2011 22:39:26 +0100 X-Google-Sender-Auth: bI7hc-oS2OADHJx8mAy02IJqqoU Message-ID: To: Ruslan Mahmatkhanov Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, davidxu@freebsd.org Subject: Re: Tracking down a problem with php on FreeBSD 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, 05 Feb 2011 21:40:11 -0000 On 5 February 2011 21:22, Ivan Voras wrote: > On 5 February 2011 21:03, Ruslan Mahmatkhanov wrote: > >> >> Can you please tell me more what you mean by ""robust" pthreads mutexes" and > > It's just a name for properties of a mutex; actually this is > imprecise, what's needed here is process-shared & robust > (fpm_shm_slots.c: FPM uses shared memory). Actually I think "robustness" is the key here (in this context it means that the locks of a thread / processes are released if a thread / process dies unexpectedly (crashes)); It is very likely that in your case the PHP process with FPM SAPI module dies while holding a lock shared between processes and the other processes get stuck waiting for this lock to unlock. From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 22:12: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 1DAE9106566B; Sat, 5 Feb 2011 22:12:41 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward15.mail.yandex.net (forward15.mail.yandex.net [95.108.130.119]) by mx1.freebsd.org (Postfix) with ESMTP id BC8918FC16; Sat, 5 Feb 2011 22:12:40 +0000 (UTC) Received: from smtp14.mail.yandex.net (smtp14.mail.yandex.net [95.108.131.192]) by forward15.mail.yandex.net (Yandex) with ESMTP id 566E9445902D; Sun, 6 Feb 2011 01:12:39 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1296943959; bh=tm2rOyh9SmcLyMMmKDzLPrQYUa9VRW2kCSgD0a/Kw3o=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=ARPX3G3sMNmfeN+ug5c5UQVRYZ39+7+wunsR2IxkyzafUeqbRYELhUDAIbc4fQwmG Zgitsdxe2nFtEn6PCEwLZ0ZZok5/ZaJFn0E/mKdn7VQhi7FtVqKDJEEeizQrwQtfQV Cu5xbwYzP9JZORbboiVYrHa/+EZ4vMsBNHsrWDws= Received: from smeshariki2.local (unknown [213.138.85.225]) by smtp14.mail.yandex.net (Yandex) with ESMTPSA id 1114419B8076; Sun, 6 Feb 2011 01:12:39 +0300 (MSK) Message-ID: <4D4DCB0E.8050706@yandex.ru> Date: Sun, 06 Feb 2011 01:11:26 +0300 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110106 Thunderbird/3.1.7 MIME-Version: 1.0 To: Ivan Voras References: <4D3CB2AF.9050003@yandex.ru> <4D4D9A4D.2070508@yandex.ru> <4D4DAD05.2070707@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org, davidxu@freebsd.org Subject: Re: Tracking down a problem with php on FreeBSD 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, 05 Feb 2011 22:12:41 -0000 06.02.2011 00:39, Ivan Voras пишет: > On 5 February 2011 21:22, Ivan Voras wrote: >> On 5 February 2011 21:03, Ruslan Mahmatkhanov wrote: >> >>> >>> Can you please tell me more what you mean by ""robust" pthreads mutexes" and >> >> It's just a name for properties of a mutex; actually this is >> imprecise, what's needed here is process-shared& robust >> (fpm_shm_slots.c: FPM uses shared memory). > > Actually I think "robustness" is the key here (in this context it > means that the locks of a thread / processes are released if a thread > / process dies unexpectedly (crashes)); It is very likely that in your > case the PHP process with FPM SAPI module dies while holding a lock > shared between processes and the other processes get stuck waiting for > this lock to unlock. Yes, it seems so. But all of this locking/threading is a black magick for me right now, and i don't feel to be able to study out with this fpm issue by myself. So i just sent this last obtained info to php-fpm mailing list. And thank you again, Ivan, for your analysis and explanations. -- Regards, Ruslan From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 22:15:28 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 0C81C1065670 for ; Sat, 5 Feb 2011 22:15:28 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id B5E898FC0A for ; Sat, 5 Feb 2011 22:15:27 +0000 (UTC) Received: by qyk36 with SMTP id 36so2613492qyk.13 for ; Sat, 05 Feb 2011 14:15:27 -0800 (PST) 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:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=7YzT3C6TWB4qycR9kNYvZ8r1POkMFYSKmRv/SnVEw6c=; b=IJRKCBdnTSVDJqUKjoe7TcIM7obzUe2TDFV6UWQ3SNV7LKn4wyrCLbv8Y4rcbbZjHF EnFF2qLYMHaxNARjfex9a/fASR1vmmA+f0N9aPnQycYujo54vjDkPntQ9CaT8W2zs6yn i3+PVyhHJ7d8kDPJtYRZ/k08/Bp3tV7auveow= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=a6O+qOYfHS/GIomR/ndtG1KdRHSr5ae0Wp5LzB4vZQzpGcdK6gbDkopAjM7Zpkgy/f Sk+M0QL4dRkJ28Dg0x7BRbQiPYCGsGtq1EVowGAWLhwefVMmSegn1pEfNJ5vsHcKPgVm sP9dnwSV197zJncIEXD14bRYa4q9X8V2etziM= Received: by 10.229.97.134 with SMTP id l6mr4211449qcn.253.1296944126609; Sat, 05 Feb 2011 14:15:26 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.67.2 with HTTP; Sat, 5 Feb 2011 14:14:46 -0800 (PST) In-Reply-To: <4D4DCB0E.8050706@yandex.ru> References: <4D3CB2AF.9050003@yandex.ru> <4D4D9A4D.2070508@yandex.ru> <4D4DAD05.2070707@yandex.ru> <4D4DCB0E.8050706@yandex.ru> From: Ivan Voras Date: Sat, 5 Feb 2011 23:14:46 +0100 X-Google-Sender-Auth: UF78J-VZ1lu01DSavDYZ9TLU9dU Message-ID: To: Ruslan Mahmatkhanov Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org Subject: Re: Tracking down a problem with php on FreeBSD 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, 05 Feb 2011 22:15:28 -0000 On 5 February 2011 23:11, Ruslan Mahmatkhanov wrote: > Yes, it seems so. But all of this locking/threading is a black magick for me > right now, and i don't feel to be able to study out with this fpm issue by > myself. So i just sent this last obtained info to php-fpm mailing list. And > thank you again, Ivan, for your analysis and explanations. They would likely be more helped if you found a core dump of a crashed PHP process (if that is what's causing it). From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 22:19: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 3C05C1065679; Sat, 5 Feb 2011 22:19:35 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward12.mail.yandex.net (forward12.mail.yandex.net [95.108.130.94]) by mx1.freebsd.org (Postfix) with ESMTP id DAC7C8FC0C; Sat, 5 Feb 2011 22:19:34 +0000 (UTC) Received: from smtp14.mail.yandex.net (smtp14.mail.yandex.net [95.108.131.192]) by forward12.mail.yandex.net (Yandex) with ESMTP id 7A8106E6825A; Sun, 6 Feb 2011 01:19:33 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1296944373; bh=ulUhhync1tyAzl0my1tRmubLeIDt9oftDayUuM/Zqx0=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=a2O24PvQ/db+raMzOR/fdjlUxgksJqmA5u11CHGKCd3awm+qEkO9bVi/p6tJKioNo MV5e8aQ1RWduEc7I0/RCB0jEZMtEUwC00wbiVm6cSNKXo9HXHSmm28oAw8OPJSqnn+ UMBrlJPZTOU2gj/F+aVJL1BFWKIjtGwNWLuNoIvM= Received: from smeshariki2.local (unknown [213.138.85.225]) by smtp14.mail.yandex.net (Yandex) with ESMTPSA id 43F6619B8075; Sun, 6 Feb 2011 01:19:33 +0300 (MSK) Message-ID: <4D4DCCAD.8090809@yandex.ru> Date: Sun, 06 Feb 2011 01:18:21 +0300 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110106 Thunderbird/3.1.7 MIME-Version: 1.0 To: Ivan Voras References: <4D3CB2AF.9050003@yandex.ru> <4D4D9A4D.2070508@yandex.ru> <4D4DAD05.2070707@yandex.ru> <4D4DCB0E.8050706@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: Tracking down a problem with php on FreeBSD 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, 05 Feb 2011 22:19:35 -0000 06.02.2011 01:14, Ivan Voras пишет: > On 5 February 2011 23:11, Ruslan Mahmatkhanov wrote: > >> Yes, it seems so. But all of this locking/threading is a black magick for me >> right now, and i don't feel to be able to study out with this fpm issue by >> myself. So i just sent this last obtained info to php-fpm mailing list. And >> thank you again, Ivan, for your analysis and explanations. > > They would likely be more helped if you found a core dump of a crashed > PHP process (if that is what's causing it). I'll try to find, but it seems they just hanging, not crashing. -- Regards, Ruslan From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 5 23:42: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 9F9F81065672 for ; Sat, 5 Feb 2011 23:42:32 +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 594768FC16 for ; Sat, 5 Feb 2011 23:42:32 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Plrlu-0004aA-Nx for freebsd-hackers@freebsd.org; Sun, 06 Feb 2011 00:42:30 +0100 Received: from 189.61.208.111 ([189.61.208.111]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Feb 2011 00:42:30 +0100 Received: from kubito by 189.61.208.111 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Feb 2011 00:42:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Raphael Kubo da Costa Date: Sat, 05 Feb 2011 21:42:13 -0200 Lines: 27 Message-ID: <87fws2rqui.fsf@gmail.com> References: <87vd0ys2no.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 189.61.208.111 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (berkeley-unix) Cancel-Lock: sha1:L/ycv+q1n0HSamkRgMKYkiNxG4g= Subject: Re: Missing stdint.h includes? 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, 05 Feb 2011 23:42:32 -0000 Garrett Cooper writes: > On Sat, Feb 5, 2011 at 11:27 AM, Raphael Kubo da Costa wrote: >> Hey there, >> >> I was working on some code that used devinfo(3). According to devinfo's >> man page, #including devinfo.h should be enough to use it. However, a >> program which only #includes devinfo.h fails due to stdint.h (or >> sys/types.h) not being included, thus giving me some errors about >> uint32_t and other types not being defined. >> >> A few headers in sys/, such as sys/rman.h, have the same problem. >> >> Is it a bug in the headers themselves or are the man pages just >> incorrect? > > I'd say it's the manpages probably because a lot of the types were > changed to POSIX integral types, and the manpages weren't updated. > Thanks! Hmm. In the case of sys/rman.h, I see that commits using uint32_t and other such types are almost 10 years old. As for devinfo.h, shouldn't it just include stdint.h, sys/types.h or sys/param.h? What's the best way for me to help with this, PR-wise?