From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 24 00:48:41 2010 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 A706B1065672 for ; Sun, 24 Jan 2010 00:48:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 815748FC08 for ; Sun, 24 Jan 2010 00:48:41 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 3090E46B03; Sat, 23 Jan 2010 19:48:41 -0500 (EST) Date: Sun, 24 Jan 2010 00:48:41 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Sherin George In-Reply-To: <7f14551c1001230119r65464667t6d6b604118101419@mail.gmail.com> Message-ID: References: <7f14551c1001230119r65464667t6d6b604118101419@mail.gmail.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Strange network issue in freebsd 8 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, 24 Jan 2010 00:48:42 -0000 On Sat, 23 Jan 2010, Sherin George wrote: > i am facing some sort of strange network issue in a freebsd server > occasionally. > > OS: FreeBSD 8.0-RELEASE - amd64 > > The servers loses network connection once in a few days. I logged into > console and verified that network is up. I even restarted network service > using following command. I'd suggest sending this e-mail to freebsd-net; there have been significant link layer changes in 8.0, and it's possible this is a side effect (and bug) from that. The appropriate people will pick it up on that list. Also, I notice you're running 8.0-RELEASE, rather than the latest patch level (which included some important security impovements and stability improvements); you may want to slide forward using freebsd-update or a manual rebuild. You will need to reboot to pick up some of the improvements. Robert N M Watson Computer Laboratory University of Cambridge > > /etc/rc.d/netif restart > > Still, it didn't fix. > > I checked /var/log/messages, but I am not getting any clue. > > ============== > Jan 19 12:10:20 myserver kernel: GEOM_MIRROR: Device gm0: rebuilding > provider ad0 finished. > Jan 19 20:20:23 myserver nfsd[732]: select failed: Interrupted system call > Jan 19 20:21:07 myserver nfsd[732]: select failed: Interrupted system call > Jan 23 02:14:33 myserver login: ROOT LOGIN (root) ON ttyv0 > Jan 23 02:19:51 myserver kernel: ifa_del_loopback_route: deletion failed > Jan 23 02:19:57 myserver kernel: em0: link state changed to DOWN > Jan 23 02:20:02 myserver kernel: em0: link state changed to UP > Jan 23 02:29:58 myserver reboot: rebooted by root > Jan 23 02:29:58 myserver syslogd: exiting on signal 15 > Jan 23 02:31:31 myserver syslogd: kernel boot file is /boot/kernel/kernel > Jan 23 02:31:31 myserver kernel: Copyright (c) 1992-2009 The FreeBSD > Project. > Jan 23 02:31:31 myserver kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, > 1989, 1991, 1992, 1993, 1994 > Jan 23 02:31:31 myserver kernel: The Regents of the University of > California. All rights reserved. > Jan 23 02:31:31 myserver kernel: FreeBSD is a registered trademark of The > FreeBSD Foundation. > Jan 23 02:31:31 myserver kernel: FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 > UTC 2009 > Jan 23 02:31:31 myserver kernel: root@mason.cse.buffalo.edu: > /usr/obj/usr/src/sys/GENERIC > Jan 23 02:31:31 myserver kernel: Timecounter "i8254" frequency 1193182 Hz > quality 0 > ============== > > Network, TCP stack all were up. It was pinging gateway even. But, traceroute > was not going beyond gateway. > > I believe the issue is not related to anything outside server since a reboot > always fixes the issue. > > I will be grateful for any advise that can help me in troubleshooting this > problem. > > -- > Best Regards, > Sherin > _______________________________________________ > 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 Sun Jan 24 03:06:07 2010 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 374501065670 for ; Sun, 24 Jan 2010 03:06:07 +0000 (UTC) (envelope-from list@sheringeorge.co.cc) Received: from mail-pz0-f202.google.com (mail-pz0-f202.google.com [209.85.222.202]) by mx1.freebsd.org (Postfix) with ESMTP id 11BE18FC18 for ; Sun, 24 Jan 2010 03:06:06 +0000 (UTC) Received: by pzk40 with SMTP id 40so113918pzk.7 for ; Sat, 23 Jan 2010 19:06:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.141.2.2 with SMTP id e2mr3435433rvi.274.1264302366627; Sat, 23 Jan 2010 19:06:06 -0800 (PST) In-Reply-To: References: <7f14551c1001230119r65464667t6d6b604118101419@mail.gmail.com> Date: Sun, 24 Jan 2010 08:36:06 +0530 Message-ID: <7f14551c1001231906w17e2372av75e3d8e1e84c6ae4@mail.gmail.com> From: Sherin George To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Strange network issue in freebsd 8 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, 24 Jan 2010 03:06:07 -0000 Hello Robert, Thanks for the advice. I have upgrade OS to FreeBSD 8.0-RELEASE-p2. I have also requested the help of freebsd-net. -- Regards, Sherin On Sun, Jan 24, 2010 at 6:18 AM, Robert Watson wrote: > > On Sat, 23 Jan 2010, Sherin George wrote: > > i am facing some sort of strange network issue in a freebsd server >> occasionally. >> >> OS: FreeBSD 8.0-RELEASE - amd64 >> >> The servers loses network connection once in a few days. I logged into >> console and verified that network is up. I even restarted network service >> using following command. >> > > I'd suggest sending this e-mail to freebsd-net; there have been significant > link layer changes in 8.0, and it's possible this is a side effect (and bug) > from that. The appropriate people will pick it up on that list. > > Also, I notice you're running 8.0-RELEASE, rather than the latest patch > level (which included some important security impovements and stability > improvements); you may want to slide forward using freebsd-update or a > manual rebuild. You will need to reboot to pick up some of the > improvements. > > Robert N M Watson > Computer Laboratory > University of Cambridge > > >> /etc/rc.d/netif restart >> >> Still, it didn't fix. >> >> I checked /var/log/messages, but I am not getting any clue. >> >> ============== >> Jan 19 12:10:20 myserver kernel: GEOM_MIRROR: Device gm0: rebuilding >> provider ad0 finished. >> Jan 19 20:20:23 myserver nfsd[732]: select failed: Interrupted system call >> Jan 19 20:21:07 myserver nfsd[732]: select failed: Interrupted system call >> Jan 23 02:14:33 myserver login: ROOT LOGIN (root) ON ttyv0 >> Jan 23 02:19:51 myserver kernel: ifa_del_loopback_route: deletion failed >> Jan 23 02:19:57 myserver kernel: em0: link state changed to DOWN >> Jan 23 02:20:02 myserver kernel: em0: link state changed to UP >> Jan 23 02:29:58 myserver reboot: rebooted by root >> Jan 23 02:29:58 myserver syslogd: exiting on signal 15 >> Jan 23 02:31:31 myserver syslogd: kernel boot file is /boot/kernel/kernel >> Jan 23 02:31:31 myserver kernel: Copyright (c) 1992-2009 The FreeBSD >> Project. >> Jan 23 02:31:31 myserver kernel: Copyright (c) 1979, 1980, 1983, 1986, >> 1988, >> 1989, 1991, 1992, 1993, 1994 >> Jan 23 02:31:31 myserver kernel: The Regents of the University of >> California. All rights reserved. >> Jan 23 02:31:31 myserver kernel: FreeBSD is a registered trademark of The >> FreeBSD Foundation. >> Jan 23 02:31:31 myserver kernel: FreeBSD 8.0-RELEASE #0: Sat Nov 21 >> 15:02:08 >> UTC 2009 >> Jan 23 02:31:31 myserver kernel: root@mason.cse.buffalo.edu: >> /usr/obj/usr/src/sys/GENERIC >> Jan 23 02:31:31 myserver kernel: Timecounter "i8254" frequency 1193182 Hz >> quality 0 >> ============== >> >> Network, TCP stack all were up. It was pinging gateway even. But, >> traceroute >> was not going beyond gateway. >> >> I believe the issue is not related to anything outside server since a >> reboot >> always fixes the issue. >> >> I will be grateful for any advise that can help me in troubleshooting this >> problem. >> >> -- >> Best Regards, >> Sherin >> _______________________________________________ >> 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 Sun Jan 24 06:03:55 2010 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 5014F106566B for ; Sun, 24 Jan 2010 06:03:55 +0000 (UTC) (envelope-from list@sheringeorge.co.cc) Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mx1.freebsd.org (Postfix) with ESMTP id 308258FC14 for ; Sun, 24 Jan 2010 06:03:55 +0000 (UTC) Received: by pwi15 with SMTP id 15so1789254pwi.3 for ; Sat, 23 Jan 2010 22:03:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.56.19 with SMTP id e19mr3546591rva.12.1264313034836; Sat, 23 Jan 2010 22:03:54 -0800 (PST) In-Reply-To: References: <7f14551c1001230119r65464667t6d6b604118101419@mail.gmail.com> Date: Sun, 24 Jan 2010 11:33:54 +0530 Message-ID: <7f14551c1001232203r78a5df26n9f9092fbcdfb85c@mail.gmail.com> From: Sherin George To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Strange network issue in freebsd 8 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, 24 Jan 2010 06:03:55 -0000 Hello Thiago, I have configured NFS clients to use TCP. Here is the present output of "netstat -m". Right now, server is working fine. ============ myserver# netstat -m 2907/4908/7815 mbufs in use (current/cache/total) 2255/4551/6806/25600 mbuf clusters in use (current/cache/total/max) 1312/2272 mbuf+clusters out of packet secondary zone in use (current/cache) 0/119/119/12800 4k (page size) jumbo clusters in use (current/cache/total/max) 0/0/0/6400 9k jumbo clusters in use (current/cache/total/max) 0/0/0/3200 16k jumbo clusters in use (current/cache/total/max) 5236K/10805K/16041K bytes allocated to network (current/cache/total) 0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters) 0/0/0 requests for jumbo clusters denied (4k/9k/16k) 0/0/0 sfbufs in use (current/peak/max) 0 requests for sfbufs denied 0 requests for sfbufs delayed 0 requests for I/O initiated by sendfile 0 calls to protocol drain routines ============ -- Regards, Sherin On Sat, Jan 23, 2010 at 7:12 PM, Thiago Damas wrote: > Hi > Nfsd as udp or tcp? I had the same problem, mbuf exaustion. Check netstat > -m > I solved using nfs over tcp on nfs client machine. > > Thiago > > 2010/1/23, Sherin George : > > Hello, > > > > i am facing some sort of strange network issue in a freebsd server > > occasionally. > > > > OS: FreeBSD 8.0-RELEASE - amd64 > > > > The servers loses network connection once in a few days. I logged into > > console and verified that network is up. I even restarted network service > > using following command. > > > > /etc/rc.d/netif restart > > > > Still, it didn't fix. > > > > I checked /var/log/messages, but I am not getting any clue. > > > > ============== > > Jan 19 12:10:20 myserver kernel: GEOM_MIRROR: Device gm0: rebuilding > > provider ad0 finished. > > Jan 19 20:20:23 myserver nfsd[732]: select failed: Interrupted system > call > > Jan 19 20:21:07 myserver nfsd[732]: select failed: Interrupted system > call > > Jan 23 02:14:33 myserver login: ROOT LOGIN (root) ON ttyv0 > > Jan 23 02:19:51 myserver kernel: ifa_del_loopback_route: deletion failed > > Jan 23 02:19:57 myserver kernel: em0: link state changed to DOWN > > Jan 23 02:20:02 myserver kernel: em0: link state changed to UP > > Jan 23 02:29:58 myserver reboot: rebooted by root > > Jan 23 02:29:58 myserver syslogd: exiting on signal 15 > > Jan 23 02:31:31 myserver syslogd: kernel boot file is /boot/kernel/kernel > > Jan 23 02:31:31 myserver kernel: Copyright (c) 1992-2009 The FreeBSD > > Project. > > Jan 23 02:31:31 myserver kernel: Copyright (c) 1979, 1980, 1983, 1986, > 1988, > > 1989, 1991, 1992, 1993, 1994 > > Jan 23 02:31:31 myserver kernel: The Regents of the University of > > California. All rights reserved. > > Jan 23 02:31:31 myserver kernel: FreeBSD is a registered trademark of The > > FreeBSD Foundation. > > Jan 23 02:31:31 myserver kernel: FreeBSD 8.0-RELEASE #0: Sat Nov 21 > 15:02:08 > > UTC 2009 > > Jan 23 02:31:31 myserver kernel: root@mason.cse.buffalo.edu: > > /usr/obj/usr/src/sys/GENERIC > > Jan 23 02:31:31 myserver kernel: Timecounter "i8254" frequency 1193182 Hz > > quality 0 > > ============== > > > > Network, TCP stack all were up. It was pinging gateway even. But, > traceroute > > was not going beyond gateway. > > > > I believe the issue is not related to anything outside server since a > reboot > > always fixes the issue. > > > > I will be grateful for any advise that can help me in troubleshooting > this > > problem. > > > > -- > > Best Regards, > > Sherin > > _______________________________________________ > > 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" > > > > -- > Enviado do meu celular > From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 24 20:17:45 2010 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 8B1131065679 for ; Sun, 24 Jan 2010 20:17:45 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 3C5878FC15 for ; Sun, 24 Jan 2010 20:17:44 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so106645qwd.7 for ; Sun, 24 Jan 2010 12:17:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=pM9ohRiTDiOEN5+JFb7t/6TRwHuaBxBp8I/6P97TRFg=; b=RVbMhUJzkFghEcwsK6WeECdE4pr70CF4UCSKRlMjAH3iUqWcN9a20d0TrTTOFqLQFL Q9BWOQixrdaZEY7eA1mSN3xyvh/v9+AkWn6rVXMM+IicExvZhvgDgUVKNOJmt3FyvhUB FmT3ZvnQSI/Ti20gkHU6S+8Q3r9K+I1FSxYws= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=i2EiwrYOWUKMIWBH1WZDIOuaJqqOi3hZAA8r8HruZqOXhvKTl+pzVZBiITLlyKFpYr tKJK4qmrXAnfhJK90Fn6LG7d1m0giEmjb+371MPczFu6jGlC4V806THune88jnRhuGi4 67nryG63bAPmPNfbh7FnDuxE6pON/nUpTT9nk= Received: by 10.224.82.144 with SMTP id b16mr3585840qal.193.1264364264171; Sun, 24 Jan 2010 12:17:44 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 23sm1757007qyk.15.2010.01.24.12.17.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 24 Jan 2010 12:17:42 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Sun, 24 Jan 2010 12:17:40 -0800 From: Pyun YongHyeon Date: Sun, 24 Jan 2010 12:17:40 -0800 To: zloidemon Message-ID: <20100124201739.GA1187@michelle.cdnetworks.com> References: <201001240101.54360.g.veniamin@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001240101.54360.g.veniamin@googlemail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: ethernet SiS(190/191) problem driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 20:17:45 -0000 On Sun, Jan 24, 2010 at 01:01:53AM +0700, zloidemon wrote: > Hi all! > > zlobook# uname -a > FreeBSD zlobook.local 8.0-STABLE FreeBSD 8.0-STABLE #22: Sun Jan 3 12:17:19 > KRAT 2010 root@zlobook.local:/usr/obj/usr/src/sys/zlobook i386 > > none0@pci0:0:4:0: class=0x020000 card=0x08021558 chip=0x01911039 > rev=0x02 hdr=0x00 > vendor = 'Silicon Integrated Systems (SiS)' > device = 'SIS190 (SIS190)' > class = network > subclass = ethernet > > this is chip=0x01911039 real SiS191 ethernet card > I'm not sure but SiS191 is gigabit controller so I guess you have a variant of SiS190. > i downloaded this is driver for sis 190 from http://pohoyda.gmxhome.de/sis190- > freebsd-7.tar.gz > > a problem when compiling.... > > zlobook# make > Warning: Object directory not changed from original /root/123/sis190-FreeBSD-7 > @ -> /usr/src/sys > machine -> /usr/src/sys/i386/include > awk -f @/tools/makeobjops.awk @/kern/device_if.m -h > awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h > awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h > awk -f @/tools/makeobjops.awk @/dev/mii/miibus_if.m -h > cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc - > I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 -- > param large-function-growth=1000 -fno-common -mno-align-long-strings - > mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 > -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall - > Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes - > Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat- > extensions -c if_sis19x.c > cc1: warnings being treated as errors > if_sis19x.c:148: warning: pointer type mismatch in conditional expression > *** Error code 1 > > Stop in /root/sis190-FreeBSD-7. > > I made a patch for the driver. Now support SiS 191 and SiS 190. Tested only > SiS 191 > [...] > i see a problem every 10-30 seconds > > sis19x0: error_bits=0x40020001 > sis19x0: watchdog timeout > sis19x0: watchdog timeout > sis19x0: watchdog timeout > sis19x0: watchdog timeout > sis19x0: watchdog timeout > sis19x0: watchdog timeout > sis19x0: error_bits=0x40020001 > sis19x0: watchdog timeout > > 64 bytes from 192.168.3.100: icmp_seq=52 ttl=128 time=0.256 ms > 64 bytes from 192.168.3.100: icmp_seq=53 ttl=128 time=0.272 ms > 64 bytes from 192.168.3.100: icmp_seq=54 ttl=128 time=0.294 ms > 64 bytes from 192.168.3.100: icmp_seq=55 ttl=128 time=4148.943 ms > 64 bytes from 192.168.3.100: icmp_seq=56 ttl=128 time=3150.245 ms > 64 bytes from 192.168.3.100: icmp_seq=57 ttl=128 time=2148.678 ms > 64 bytes from 192.168.3.100: icmp_seq=58 ttl=128 time=1148.346 ms > 64 bytes from 192.168.3.100: icmp_seq=59 ttl=128 time=147.464 ms > 64 bytes from 192.168.3.100: icmp_seq=60 ttl=128 time=0.111 ms > > somehow fix this possible? Because I'm not familiar with the code, I'm not sure whether this change is enough or not. If I remember correctly there were a couple of request for SiS190/SiS191 support and Alexander Pohoyda already wrote the driver for FreeBSD. The problem is I have no way to test his driver because there seems to be no way to buy stand-alone PCI/PCIe SiS190/SiS191 controller in market. All I can find was LOM implementation. Linux also has driver for SiS190/SiS191 and it has minimal support code as SiS didn't release datasheet to open source developers. But the code is relatively simple except using some magic values so I guess Alexander Pohoyda can help you. From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 24 23:59:08 2010 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 CF841106566C for ; Sun, 24 Jan 2010 23:59:08 +0000 (UTC) (envelope-from cronfy@gmail.com) Received: from mail-fx0-f226.google.com (mail-fx0-f226.google.com [209.85.220.226]) by mx1.freebsd.org (Postfix) with ESMTP id 68EA48FC19 for ; Sun, 24 Jan 2010 23:59:06 +0000 (UTC) Received: by fxm26 with SMTP id 26so547010fxm.13 for ; Sun, 24 Jan 2010 15:59:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=zDMHhv3641GK7wAxiZpc6LTohSL/pB131OACu47q9no=; b=IDdPLKqTCtBt+CNzXnWlD4Oss4iwYmuPiri65BE58jKaStb1djeH7rUiqUh1jjEcWP wZ+MJ6+kGsM7HRnxmlhthM885OO/l2yObQG8yAQIJlea/jNVcaciyFWAmDnSS5JVNy5Y oyvPLWUOrGCy3e67DU6RVldeoAcCf9epzDzT8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=Zj16a0P4goJaWsDFnBYEi1+T0qho5psSldTOnT/nhnz2z+R5SdJdKKTp32DlPHFbtb GU85R6/w+u2s2l12YcU1flNRzu6SVm96dndRNDndvDLn2dAFU69qgWIDVC0QJBPbCKiP Cvr3umRV7Ti4MKoIs0qbhFkSqd7RbVeK2bQPE= MIME-Version: 1.0 Received: by 10.223.63.193 with SMTP id c1mr6020791fai.80.1264376035103; Sun, 24 Jan 2010 15:33:55 -0800 (PST) From: cronfy Date: Mon, 25 Jan 2010 02:33:35 +0300 Message-ID: To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Unique process id (not pid) and accounting daemon 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, 24 Jan 2010 23:59:08 -0000 Hello. Sorry for the crosspost, I intended to post this to freebsd-hackers@, but sent first copy to freebsd-questions@ by mistake. I am trying to create an accounting daemon that would be more precise than usual BSD system accounting. It should read the whole process tree from time to time (say, every 10 seconds) and log changes in usage of CPU, I/O operations and memory per process. After daemon notices process exit, it should read /var/account/acct to get a last portion of accounting data and make a last entry for the process. Also daemon should read /var/account/acct to find information about processes that had been running between taking process tree snapshots. There is a problem: it is not always possible to link a process in a process tree against matching process in an accounting file. Only command name, user/group id and start time will match, but: * start time may change (i. e. after ntpdate); * command name saved in /var/account/acct is 15 characters max (AC_COMM_LEN in sys/sys/acct.h), while command name in the process tree is 19 characters max (MAXCOMLEN in sys/sys/param.h). To ensure that process in the process tree and process in the accounting file are the same, I want to add unique process identifier (uint64_t) to 'proc' struct in sys/sys/proc.h and increment it for every process fork. I see it is possible to do this just before sx_sunlock() in fork1() in sys/kern/kern_fork.c. I'll have to add saving of this identifier in kern_acct.c, of course. This way I will be extremely easy to remember a process in the process tree and find a matching one in the accounting file after it finishes. Am I looking in a right direction or should I try some other way? Thanks in advance. -- // cronfy From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 25 00:05:49 2010 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 6236D106568B for ; Mon, 25 Jan 2010 00:05:49 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id 11C888FC14 for ; Mon, 25 Jan 2010 00:05:48 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so137536qwd.7 for ; Sun, 24 Jan 2010 16:05:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=T1V75wkY5ERHw3mKC3hC7F1algpwZpZk+IraY0MrWZ0=; b=MdFKB5Ft872aOS7kxBYRwh3N1jKgXFwK/vOCcwdmCn7OSOjUTyCnsx8fFrJ5UddIDC ICrfCHsVBwwZ0mleWG7idIPFWGHl98A1sLl7jbbOQJDNuwL2drl3wJviWHPPSOyUl0bQ WcZD0o4T9p6rEtBzO9S2drvz2JsmcHq+cG+Qk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=fbpv+KsNokoyJQeHPD/dBINKexMjZ6ffvo84RBurKfb1AjDSfTzg04bqT+0r+2Zul8 zg0cwZ/LroSLcMS/Ue19C8Sz4Lpq43lzlE5D4ML8n7EeuQMRdgHW/R4g0MPwEL1pCy7B RqDti81ScGIff0gl9PZtN2wAVJRbSnkiNH8BA= Received: by 10.224.66.82 with SMTP id m18mr3728367qai.25.1264377947464; Sun, 24 Jan 2010 16:05:47 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 4sm15174957qwe.15.2010.01.24.16.05.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 24 Jan 2010 16:05:46 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Sun, 24 Jan 2010 16:05:44 -0800 From: Pyun YongHyeon Date: Sun, 24 Jan 2010 16:05:44 -0800 To: Nikolay Denev Message-ID: <20100125000544.GD1187@michelle.cdnetworks.com> References: <201001240101.54360.g.veniamin@googlemail.com> <20100124201739.GA1187@michelle.cdnetworks.com> <67E62F9E-3CEA-403D-A042-E7C552615EFC@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67E62F9E-3CEA-403D-A042-E7C552615EFC@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, zloidemon Subject: Re: ethernet SiS(190/191) problem driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 00:05:49 -0000 On Mon, Jan 25, 2010 at 01:26:46AM +0200, Nikolay Denev wrote: > On 24 Jan, 2010, at 22:17 , Pyun YongHyeon wrote: > > > On Sun, Jan 24, 2010 at 01:01:53AM +0700, zloidemon wrote: > >> Hi all! > >> > >> zlobook# uname -a > >> FreeBSD zlobook.local 8.0-STABLE FreeBSD 8.0-STABLE #22: Sun Jan 3 12:17:19 > >> KRAT 2010 root@zlobook.local:/usr/obj/usr/src/sys/zlobook i386 > >> > >> none0@pci0:0:4:0: class=0x020000 card=0x08021558 chip=0x01911039 > >> rev=0x02 hdr=0x00 > >> vendor = 'Silicon Integrated Systems (SiS)' > >> device = 'SIS190 (SIS190)' > >> class = network > >> subclass = ethernet > >> > >> this is chip=0x01911039 real SiS191 ethernet card > >> > > > > I'm not sure but SiS191 is gigabit controller so I guess you have a > > variant of SiS190. > > > >> i downloaded this is driver for sis 190 from http://pohoyda.gmxhome.de/sis190- > >> freebsd-7.tar.gz > >> > >> a problem when compiling.... > >> > >> zlobook# make > >> Warning: Object directory not changed from original /root/123/sis190-FreeBSD-7 > >> @ -> /usr/src/sys > >> machine -> /usr/src/sys/i386/include > >> awk -f @/tools/makeobjops.awk @/kern/device_if.m -h > >> awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h > >> awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h > >> awk -f @/tools/makeobjops.awk @/dev/mii/miibus_if.m -h > >> cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc - > >> I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 -- > >> param large-function-growth=1000 -fno-common -mno-align-long-strings - > >> mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 > >> -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall - > >> Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes - > >> Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat- > >> extensions -c if_sis19x.c > >> cc1: warnings being treated as errors > >> if_sis19x.c:148: warning: pointer type mismatch in conditional expression > >> *** Error code 1 > >> > >> Stop in /root/sis190-FreeBSD-7. > >> > >> I made a patch for the driver. Now support SiS 191 and SiS 190. Tested only > >> SiS 191 > >> > > > > [...] > > > >> i see a problem every 10-30 seconds > >> > >> sis19x0: error_bits=0x40020001 > >> sis19x0: watchdog timeout > >> sis19x0: watchdog timeout > >> sis19x0: watchdog timeout > >> sis19x0: watchdog timeout > >> sis19x0: watchdog timeout > >> sis19x0: watchdog timeout > >> sis19x0: error_bits=0x40020001 > >> sis19x0: watchdog timeout > >> > >> 64 bytes from 192.168.3.100: icmp_seq=52 ttl=128 time=0.256 ms > >> 64 bytes from 192.168.3.100: icmp_seq=53 ttl=128 time=0.272 ms > >> 64 bytes from 192.168.3.100: icmp_seq=54 ttl=128 time=0.294 ms > >> 64 bytes from 192.168.3.100: icmp_seq=55 ttl=128 time=4148.943 ms > >> 64 bytes from 192.168.3.100: icmp_seq=56 ttl=128 time=3150.245 ms > >> 64 bytes from 192.168.3.100: icmp_seq=57 ttl=128 time=2148.678 ms > >> 64 bytes from 192.168.3.100: icmp_seq=58 ttl=128 time=1148.346 ms > >> 64 bytes from 192.168.3.100: icmp_seq=59 ttl=128 time=147.464 ms > >> 64 bytes from 192.168.3.100: icmp_seq=60 ttl=128 time=0.111 ms > >> > >> somehow fix this possible? > > > > Because I'm not familiar with the code, I'm not sure whether this > > change is enough or not. If I remember correctly there were a > > couple of request for SiS190/SiS191 support and Alexander Pohoyda > > already wrote the driver for FreeBSD. The problem is I have no way > > to test his driver because there seems to be no way to buy > > stand-alone PCI/PCIe SiS190/SiS191 controller in market. All I can > > find was LOM implementation. > > Linux also has driver for SiS190/SiS191 and it has minimal support > > code as SiS didn't release datasheet to open source developers. But > > the code is relatively simple except using some magic values so I > > guess Alexander Pohoyda can help you. > > _______________________________________________ > > 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" > > I have a hacked up sis191 driver[*] based on Alexander Pohoyda's work and with some other additions from > Open Solaris and Linux. > It has many ugly hacks right now, but It works (sort of) on my HP EX470 (there are hardcoded values for gbit speed right now). > One of the problems I have is with the MTU, and I think this was fixed in Linux so there may be hope. > But unfortunately the whole driver is full of magic values and the lack of documentation really doesn't help. > I don't know what you're suffering from MTU but I wouldn't care much about supporting jumbo frame unless controller hangs on receiving jumbo frames. Last time I checked Alexander's driver, there were some locking issues. If you're familiar with other ethernet controller/drivers it would not be hard to guess meaning from the magic value. Fluctuating ICMP ECHO response time indicates there are some problems in TX path including interrupt handling. > [*] http://ndenev.ath.cx/if_sge/ > Thanks, I'll look over the code. > > Regards, > Niki From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 25 03:54:48 2010 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 7429C1065696 for ; Mon, 25 Jan 2010 03:54:48 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 651968FC22 for ; Mon, 25 Jan 2010 03:54:48 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id 4917D1A3C40; Sun, 24 Jan 2010 19:54:48 -0800 (PST) Date: Sun, 24 Jan 2010 19:54:48 -0800 From: Alfred Perlstein To: cronfy Message-ID: <20100125035448.GW71374@elvis.mu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: Unique process id (not pid) and accounting daemon X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 03:54:48 -0000 * cronfy [100124 15:59] wrote: > Hello. > > Sorry for the crosspost, I intended to post this to freebsd-hackers@, but > sent first copy to freebsd-questions@ by mistake. > > > I am trying to create an accounting daemon that would be more precise > than usual BSD system accounting. It should read the whole process > tree from time to time (say, every 10 seconds) and log changes in > usage of CPU, I/O operations and memory per process. After daemon > notices process exit, it should read /var/account/acct to get a last > portion of accounting data and make a last entry for the process. Also > daemon should read /var/account/acct to find information about > processes that had been running between taking process tree snapshots. > > There is a problem: it is not always possible to link a process in a > process tree against matching process in an accounting file. Only > command name, user/group id and start time will match, but: > > * start time may change (i. e. after ntpdate); > * command name saved in /var/account/acct is 15 characters max > (AC_COMM_LEN in sys/sys/acct.h), while command name in the process > tree is 19 characters max (MAXCOMLEN in sys/sys/param.h). > > To ensure that process in the process tree and process in the > accounting file are the same, I want to add unique process identifier > (uint64_t) to 'proc' struct in sys/sys/proc.h and increment it for > every process fork. I see it is possible to do this just before > sx_sunlock() in fork1() in sys/kern/kern_fork.c. I'll have to add > saving of this identifier in kern_acct.c, of course. > > This way I will be extremely easy to remember a process in the process > tree and find a matching one in the accounting file after it finishes. > > Am I looking in a right direction or should I try some other way? > Thanks in advance. I've thought of this a few times, specifically how to ensure not sending a signal to a process by accident, specifically adding a version of kill(2) that took process start time. It's interesting that you bring up that start time can change, I did not know this. Now that I know this, I would suggest simply recording the start time as the serial number, then using pid+recorded_start_time as your serial number. Just an idea. -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250 .- FreeBSD committer From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 25 05:29:46 2010 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 4B64F1065670 for ; Mon, 25 Jan 2010 05:29:46 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id CE9F48FC18 for ; Mon, 25 Jan 2010 05:29:45 +0000 (UTC) Received: (qmail 23666 invoked by uid 399); 25 Jan 2010 05:29:45 -0000 Received: from localhost (HELO ?192.168.0.110?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 25 Jan 2010 05:29:45 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Date: Sun, 24 Jan 2010 21:29:42 -0800 (PST) From: Doug Barton To: Kostik Belousov In-Reply-To: <20100123150817.GJ59590@deviant.kiev.zoral.com.ua> Message-ID: References: <20100123133419.GI59590@deviant.kiev.zoral.com.ua> <20100123150817.GJ59590@deviant.kiev.zoral.com.ua> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-message-flag: Outlook -- Not just for spreading viruses anymore! X-OpenPGP-Key-ID: 0xD5B2F0FB Organization: http://SupersetSolutions.com/ MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Alexander Best , freebsd-hackers@freebsd.org Subject: Re: [patch] extending/completing brandelf's OS knowledge X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 05:29:46 -0000 On Sat, 23 Jan 2010, Kostik Belousov wrote: > I do not see a need for such rudimentary ELF editor in the base at all. So, perhaps it's time to move brandelf out of the base? And if so, perhaps Alexander's contribution could be incorporated into a port for it? > After the work of dchagin@/bz@, brandelf is needed only for the corner > cases, if at all. Hmm, I was fooling around with some linux'y stuff the other day and needed to brandelf it (don't remember what, obviously wasn't that important). :) If this happens again in the future, is it worth reporting somewhere? (-emulation@ ?) Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 25 07:41:09 2010 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 43B081065676 for ; Mon, 25 Jan 2010 07:41:09 +0000 (UTC) (envelope-from julian@elischer.org) Received: from utility-0.aerioconnect.net (utility-0.aerioconnect.net [216.240.32.11]) by mx1.freebsd.org (Postfix) with ESMTP id 0ED018FC0C for ; Mon, 25 Jan 2010 07:41:08 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by utility-0.aerioconnect.net (8.13.1/8.13.1) with ESMTP id o0P7f7gR017156; Sun, 24 Jan 2010 23:41:07 -0800 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id D0B5E2D601C; Sun, 24 Jan 2010 23:41:06 -0800 (PST) Message-ID: <4B5D4B27.90604@elischer.org> Date: Sun, 24 Jan 2010 23:41:27 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Kostik Belousov References: <20100123133419.GI59590@deviant.kiev.zoral.com.ua> In-Reply-To: <20100123133419.GI59590@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Best , freebsd-hackers@freebsd.org Subject: Re: [patch] extending/completing brandelf's OS knowledge X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 07:41:09 -0000 Kostik Belousov wrote: > On Sat, Jan 23, 2010 at 01:07:44PM +0100, Alexander Best wrote: >> patch is pretty self explanatory i guess. brandelf should now be able to >> handle all OSes defined in the current SCO elf specs (26.10.2009). > [...] >> #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ >> > > This does not make a sense. brandelf(1) is (was) used as a way to specify > hint for the FreeBSD kernel under which ABI emulation the binary should > be activated. > > We do not support, and I believe never will, ABIs added in the patch. but it might be useful in a cross development environment. From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 25 08:58:38 2010 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 23572106568D; Mon, 25 Jan 2010 08:58:38 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (unknown [IPv6:2001:470:1f09:679::1]) by mx1.freebsd.org (Postfix) with ESMTP id E12CB8FC0C; Mon, 25 Jan 2010 08:58:37 +0000 (UTC) Received: from unknown (87-194-158-129.bethere.co.uk [87.194.158.129]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id DE28D8311; Mon, 25 Jan 2010 08:58:53 +0000 (UTC) Date: Mon, 25 Jan 2010 08:58:38 +0000 From: Bruce Cran To: Ed Schouten Message-ID: <20100125085838.0000060d@unknown> In-Reply-To: <20100122151035.GX77705@hoeg.nl> References: <9bbcef731001220527u5bbec479n59143b6631c6e2d8@mail.gmail.com> <20100122151035.GX77705@hoeg.nl> X-Mailer: Claws Mail 3.7.2cvs27 (GTK+ 2.16.0; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers , Ivan Voras , Randall Stewart Subject: Re: Greetings... a patch I would like your comments on... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 08:58:38 -0000 On Fri, 22 Jan 2010 16:10:35 +0100 Ed Schouten wrote: > * Ivan Voras wrote: > > This is a good and useful addition! I think Windows has implemented > > a generalization of this (called "wait objects" or something like > > that), which effectively allows a select()- (or in this case > > kqueue())-like syscall to wait on both file descriptors and > > condvars (as well as probably other MS-style objects). It's useful > > for multiplexing events for dissimilar sources. > > NtWaitForSingleObject(), NtWaitForMultipleObjects(), etc. :-) Just to avoid any possible confusion, Microsoft have stopped documenting the Nt* functions, or have marked them as obsolete: in userland you call WaitForSingleObject, WaitForMultipleObjects etc. while in the kernel you use KeWaitForSingleObject, KeWaitForMutlipleObjects etc. -- Bruce Cran From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 25 09:16:32 2010 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 77168106566C; Mon, 25 Jan 2010 09:16:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 2332F8FC08; Mon, 25 Jan 2010 09:16:30 +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 o0P9GPIK071611 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 Jan 2010 11:16:25 +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.3/8.14.3) with ESMTP id o0P9GPc1017974; Mon, 25 Jan 2010 11:16:25 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0P9GPK7017973; Mon, 25 Jan 2010 11:16:25 +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: Mon, 25 Jan 2010 11:16:25 +0200 From: Kostik Belousov To: Alexander Leidinger Message-ID: <20100125091625.GJ3877@deviant.kiev.zoral.com.ua> References: <20100123133419.GI59590@deviant.kiev.zoral.com.ua> <20100123150817.GJ59590@deviant.kiev.zoral.com.ua> <20100125100129.92067vdtphv8owes@webmail.leidinger.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWOmaDnDlrCGjNh4" Content-Disposition: inline In-Reply-To: <20100125100129.92067vdtphv8owes@webmail.leidinger.net> 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=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Alexander Best , Doug Barton , freebsd-hackers@freebsd.org Subject: Re: [patch] extending/completing brandelf's OS knowledge X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 09:16:32 -0000 --pWOmaDnDlrCGjNh4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 25, 2010 at 10:01:29AM +0100, Alexander Leidinger wrote: > Quoting Doug Barton (from Sun, 24 Jan 2010 =20 > 21:29:42 -0800 (PST)): >=20 > >On Sat, 23 Jan 2010, Kostik Belousov wrote: > > > >>I do not see a need for such rudimentary ELF editor in the base at all. > > > >So, perhaps it's time to move brandelf out of the base? And if so, =20 > >perhaps Alexander's contribution could be incorporated into a port =20 > >for it? >=20 > Personally I do not see a reason why his work can not go into the base = =20 > system. From a feature point of view the patch is giving brandelf a =20 > little bit more freedom what it is allowed to change. When I look at =20 > what I do/did with various tools in FreeBSD which where not intended =20 > to be used like this but where useful in some cases, I do not think we = =20 > should enforce the policy to allow only stuff in brandelf which we are = =20 > able to emulate. >=20 > >>After the work of dchagin@/bz@, brandelf is needed only for the corner > >>cases, if at all. > > > >Hmm, I was fooling around with some linux'y stuff the other day and =20 > >needed to brandelf it (don't remember what, obviously wasn't that =20 > >important). :) > >If this happens again in the future, is it worth reporting =20 > >somewhere? (-emulation@ ?) >=20 > If it was to brandelf a static linux executable so that the FreeBSD =20 > system does not reboot when executing the static linux executable, =20 > then I would say it does not need to be reported and we still need =20 > brandelf in the base system. >=20 > If someone says that exactly this case has been fixed recently: it =20 > would be great to hear on emulation@ about cases where brandelf is =20 > still needed. If static linux binary contains .note.ABI-tag section, and I believe that relatively modern binaries do, then brand is autodetected. --pWOmaDnDlrCGjNh4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktdYWgACgkQC3+MBN1Mb4jTFgCfRcBg44IfIESGhJGRiVKqdQzO ceMAn3bOoWnk1HvIfXEA1/EgOez0chvR =O3wi -----END PGP SIGNATURE----- --pWOmaDnDlrCGjNh4-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 25 09:26:19 2010 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 39A341065670 for ; Mon, 25 Jan 2010 09:26:19 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.sonnenberger.org [92.79.50.50]) by mx1.freebsd.org (Postfix) with ESMTP id EBF7D8FC20 for ; Mon, 25 Jan 2010 09:26:18 +0000 (UTC) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id 4F663667EE for ; Mon, 25 Jan 2010 10:26:16 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id F37B615C51; Mon, 25 Jan 2010 10:24:53 +0100 (CET) Date: Mon, 25 Jan 2010 10:24:53 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20100125092453.GD16829@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20100123133419.GI59590@deviant.kiev.zoral.com.ua> <20100123150817.GJ59590@deviant.kiev.zoral.com.ua> <20100125100129.92067vdtphv8owes@webmail.leidinger.net> <20100125091625.GJ3877@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100125091625.GJ3877@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [patch] extending/completing brandelf's OS knowledge X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 09:26:19 -0000 On Mon, Jan 25, 2010 at 11:16:25AM +0200, Kostik Belousov wrote: > If static linux binary contains .note.ABI-tag section, and I believe > that relatively modern binaries do, then brand is autodetected. "Relatively modern" means by default anything using glibc. Also a bunch of newer libc5 versions, I think. Joerg From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 25 09:01:39 2010 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 7F400106568F; Mon, 25 Jan 2010 09:01:39 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0B39E8FC1C; Mon, 25 Jan 2010 09:01:38 +0000 (UTC) Received: from outgoing.leidinger.net (pD954F71F.dip.t-dialin.net [217.84.247.31]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id AAF7184403B; Mon, 25 Jan 2010 10:01:33 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 52A3A2368E8; Mon, 25 Jan 2010 10:01:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1264410090; bh=8NKoL/FzkYQxXFL58kSspVx4xLF9qJmyZu1WUtDn/PY=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=UXPw+0faSETtOZ1bpSjA/Tj/akGTWBApWpu1UjclWylPYPIGy1hLPJNIX6m6uSHHe 1q8sgRJac2P3pfdcDs5fYS762h3DTJCnd1WmeH8eaQ5sYLXrLk8Rbz99yl2PJjQA2Y jrfDQI0CaiWzOC3u1oQianBD2dCKKlEt5VA6R32wQki7+nShO9YW/baqbGqzug2L0N FZ9fAISmOn/q/tHieHqvzihuzFMy9NxsMjKQWot1R5O36BfS0S/3RZcKbx5b/BqFZo t7QENt4eHmhGs23MD6Ws0uR/sAnALMDoH0fh2rBpQeJdGAG6w6Qxu/zDl2lGUTtPyF Y1ByoPIle/Ffg== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o0P91TG0044242; Mon, 25 Jan 2010 10:01:29 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Mon, 25 Jan 2010 10:01:29 +0100 Message-ID: <20100125100129.92067vdtphv8owes@webmail.leidinger.net> Date: Mon, 25 Jan 2010 10:01:29 +0100 From: Alexander Leidinger To: Doug Barton References: <20100123133419.GI59590@deviant.kiev.zoral.com.ua> <20100123150817.GJ59590@deviant.kiev.zoral.com.ua> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: AAF7184403B.3C720 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.84, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, J_CHICKENPOX_51 0.60) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1265014894.51327@dioTt3NdcQktrXmdUk65Kw X-EBL-Spam-Status: No X-Mailman-Approved-At: Mon, 25 Jan 2010 12:33:07 +0000 Cc: Kostik Belousov , Alexander Best , freebsd-hackers@FreeBSD.org Subject: Re: [patch] extending/completing brandelf's OS knowledge X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 09:01:39 -0000 Quoting Doug Barton (from Sun, 24 Jan 2010 21:29:42 -0800 (PST)): > On Sat, 23 Jan 2010, Kostik Belousov wrote: > >> I do not see a need for such rudimentary ELF editor in the base at all. > > So, perhaps it's time to move brandelf out of the base? And if so, > perhaps Alexander's contribution could be incorporated into a port > for it? Personally I do not see a reason why his work can not go into the base system. From a feature point of view the patch is giving brandelf a little bit more freedom what it is allowed to change. When I look at what I do/did with various tools in FreeBSD which where not intended to be used like this but where useful in some cases, I do not think we should enforce the policy to allow only stuff in brandelf which we are able to emulate. >> After the work of dchagin@/bz@, brandelf is needed only for the corner >> cases, if at all. > > Hmm, I was fooling around with some linux'y stuff the other day and > needed to brandelf it (don't remember what, obviously wasn't that > important). :) > If this happens again in the future, is it worth reporting > somewhere? (-emulation@ ?) If it was to brandelf a static linux executable so that the FreeBSD system does not reboot when executing the static linux executable, then I would say it does not need to be reported and we still need brandelf in the base system. If someone says that exactly this case has been fixed recently: it would be great to hear on emulation@ about cases where brandelf is still needed. Bye, Alexander. -- Ferengi Rule of Acquisition #217: You can't free a fish from water. -- ST:DS9, "Past Tense, Part I" http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 25 09:45:49 2010 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 F1135106566C; Mon, 25 Jan 2010 09:45:48 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 7C74B8FC12; Mon, 25 Jan 2010 09:45:48 +0000 (UTC) Received: from outgoing.leidinger.net (pD954F71F.dip.t-dialin.net [217.84.247.31]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 7E12F84403B; Mon, 25 Jan 2010 10:45:42 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 1EC23236A34; Mon, 25 Jan 2010 10:45:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1264412739; bh=Q93iGwPk3mQr7076/egX78kACtgi8H0qZPO8nf3ih/8=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=d6VaAlUsnazdG0H0SaXzap11U5ZgX/5IiorucBba3cd4V73SLgPRHMxrbUihYp82F WOV2cHfTG9MSs3bupmzghHx8+dr6NlFjJSpyyO/1Sn34dIqg7kWN9JC6H9KZRZUTuI +9HpYeFrwN1NLOkEHSghIGPdp3zm/gjkBkKm2cfwM7jZPqn+yKJfvPtWkPClahKnMg It66Rp/JYad8wV8k+yRSE8ba9pS5Oxx2RyC/8do6c4xh8ttwxFMDuoubBVnjjIO3zb Dw17UpWzpal+Bo61huRoK1Yb+vYjJvPKYipKPKH0Dkdk0JA0WdUq8uK/wbsNTAlJR6 kDF516iHYJSxg== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o0P9jckZ056335; Mon, 25 Jan 2010 10:45:38 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Mon, 25 Jan 2010 10:45:38 +0100 Message-ID: <20100125104538.31651ntuzhoyg3no@webmail.leidinger.net> Date: Mon, 25 Jan 2010 10:45:38 +0100 From: Alexander Leidinger To: Kostik Belousov References: <20100123133419.GI59590@deviant.kiev.zoral.com.ua> <20100123150817.GJ59590@deviant.kiev.zoral.com.ua> <20100125100129.92067vdtphv8owes@webmail.leidinger.net> <20100125091625.GJ3877@deviant.kiev.zoral.com.ua> In-Reply-To: <20100125091625.GJ3877@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 7E12F84403B.A4DB7 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.44, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1265017544.14696@aZwiRZGzYcrdnKbJ/IQDVQ X-EBL-Spam-Status: No X-Mailman-Approved-At: Mon, 25 Jan 2010 12:33:20 +0000 Cc: Alexander Best , Doug Barton , freebsd-hackers@freebsd.org Subject: Re: [patch] extending/completing brandelf's OS knowledge X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 09:45:49 -0000 Quoting Kostik Belousov (from Mon, 25 Jan 2010 11:16:25 +0200): > On Mon, Jan 25, 2010 at 10:01:29AM +0100, Alexander Leidinger wrote: >> If it was to brandelf a static linux executable so that the FreeBSD >> system does not reboot when executing the static linux executable, >> then I would say it does not need to be reported and we still need >> brandelf in the base system. >> >> If someone says that exactly this case has been fixed recently: it >> would be great to hear on emulation@ about cases where brandelf is >> still needed. > > If static linux binary contains .note.ABI-tag section, and I believe > that relatively modern binaries do, then brand is autodetected. Our linuxulator is not restricted to modern binaries. I remember reports from people which run or try to run binaries (proprietary stuff, all limitations of non-open-source software applies) from linux 2.2 or even older. It's been a while since I've seen such a report, but as it typically just works, I can not tell that we can be sure that nobody wants to run binaries which do not fit your definition of "relatively modern". Bye, Alexander. -- "No, don't protest. I'm telling you their thoughts, not mine." -- Vito Corleone, "Chapter 2", page 74 http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 26 15:20:27 2010 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 A6D33106566C; Tue, 26 Jan 2010 15:20:27 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6B2948FC13; Tue, 26 Jan 2010 15:20:27 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 7B8CA1FFC51; Tue, 26 Jan 2010 15:20:26 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 5AED98449F; Tue, 26 Jan 2010 16:20:26 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ivan Voras References: Date: Tue, 26 Jan 2010 16:20:26 +0100 In-Reply-To: (Ivan Voras's message of "Sat, 23 Jan 2010 01:05:29 +0100") Message-ID: <86ljfkj3k5.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: A 7 vs 8 db benchmark X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 15:20:27 -0000 Ivan Voras writes: > This is a bit old, I forgot to post it earlier: > > http://suckit.blog.hu/2009/10/05/freebsd_8_is_it_worth_to_upgrade > > Some interesting graphs there. Jeff Roberson said the bogus CPU > topology shouldn't influence end-performance much. He thinks the > lockmgr rewrite was responsible for most of the big performance > difference. Were the benchmarks run with or without the topology patch? If without, could you ask the author to re-run them with the patch? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 26 16:08:05 2010 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 D67B8106568D for ; Tue, 26 Jan 2010 16:08:05 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 688C58FC15 for ; Tue, 26 Jan 2010 16:08:04 +0000 (UTC) Received: by bwz5 with SMTP id 5so3770172bwz.3 for ; Tue, 26 Jan 2010 08:08:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=8Et4p1LO0RyI6/LqhRQxKWgF66tqzUcP0sACTpj+i6o=; b=LUmo8FOo1HISX8T7/TteSaEZiRZ6ZnNmZ96tXsrHe+kkhJoqIx+f/+e2XjhZwuBCah u00WnQflD9HS6uPyi/aFiO216u4ZzK3PRR5YfiuI6Iw5YJyT0t8JYmnIuIqCNKKha0Mj snDOwkPdb8ByhXJsy+HmZHE+zSCleXSmqNCBc= 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 :content-transfer-encoding; b=b/OPLJzLoX/88nuPr6XNUN/OQuYWf46tX7na7fp7FAzZtIJiiIUUTUDmffdzd4uiqS oli3Rokg1zThWo9J4Z68k9B4ZJNwhyxGzplfIY/dlddNSplo6W89GbNC0p8A32g16Iit ETijQpVgh6wzg7hMzq99rtg5WcyCLrNgN4UJ4= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.87.206 with SMTP id y56mr945163wee.207.1264522083909; Tue, 26 Jan 2010 08:08:03 -0800 (PST) In-Reply-To: <86ljfkj3k5.fsf@ds4.des.no> References: <86ljfkj3k5.fsf@ds4.des.no> From: Ivan Voras Date: Tue, 26 Jan 2010 17:07:43 +0100 X-Google-Sender-Auth: 20f567f40a63a487 Message-ID: <9bbcef731001260807x674cf22cl484c6d06c235406a@mail.gmail.com> To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: A 7 vs 8 db benchmark X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 16:08:05 -0000 2010/1/26 Dag-Erling Sm=C3=B8rgrav : > Ivan Voras writes: >> This is a bit old, I forgot to post it earlier: >> >> http://suckit.blog.hu/2009/10/05/freebsd_8_is_it_worth_to_upgrade >> >> Some interesting graphs there. Jeff Roberson said the bogus CPU >> topology shouldn't influence end-performance much. He thinks the >> lockmgr rewrite was responsible for most of the big performance >> difference. > > Were the benchmarks run with or without the topology patch? =C2=A0If with= out, > could you ask the author to re-run them with the patch? With - the benchmark author created the patch. From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 26 19:17:33 2010 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 76756106566B for ; Tue, 26 Jan 2010 19:17:33 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id 089038FC08 for ; Tue, 26 Jan 2010 19:17:30 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,347,1262559600"; d="scan'208";a="294698028" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER05.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 26 Jan 2010 20:17:29 +0100 Received: by ZIVMAILUSER05.UNI-MUENSTER.DE (Postfix, from userid 149459) id 9D4411B07E7; Tue, 26 Jan 2010 20:17:29 +0100 (CET) Date: Tue, 26 Jan 2010 20:17:23 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=+permail-20100126191723f7e55a9d00001a52-a_best01+ Cc: Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 19:17:33 -0000 This is a MIME encoded multipart message. --+permail-20100126191723f7e55a9d00001a52-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit hi there, because of kern/140752 i looked through a discussion back in 2009 (http://lists.freebsd.org/pipermail/freebsd-hackers/2009-March/027879.html) concerning freebsd's hdd spin down procedure. right now ATA_FLUSHCACHE is being used although the hitachi hdd specs referenced in the pr say that this will not cause proper load/unload and thus an emergency unload will occur which reduces the life expectancy of hdds dramatically (20.000 shutdowns vs. 600.000 shutdowns). unfortunately the discussion back then didn't come up with any sort of decision/patch. attached you'll find a very simple patch which issues ATA_STANDBY_IMMEDIATE instead of ATA_FLUSHCACHE during hdd spin down. could somebody with hdd knowledge comment on this? this matter seems quite important since there may be a chance that the current spin down mechanism in freebsd damages hdds! cheers. alex --+permail-20100126191723f7e55a9d00001a52-a_best01+ Content-Type: text/x-patch Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="atadisk.c.patch" SW5kZXg6IHN5cy9kZXYvYXRhL2F0YS1kaXNrLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2Rldi9hdGEv YXRhLWRpc2suYyAgICAgIChyZXZpc2lvbiAyMDI4NDgpCisrKyBzeXMvZGV2L2F0YS9hdGEtZGlz ay5jICAgICAgKHdvcmtpbmcgY29weSkKQEAgLTE5MSw4ICsxOTEsOSBAQAogewogICAgIHN0cnVj dCBhdGFfZGV2aWNlICphdGFkZXYgPSBkZXZpY2VfZ2V0X3NvZnRjKGRldik7CiAKLSAgICBpZiAo YXRhZGV2LT5wYXJhbS5zdXBwb3J0LmNvbW1hbmQyICYgQVRBX1NVUFBPUlRfRkxVU0hDQUNIRSkK LSAgICAgICBhdGFfY29udHJvbGNtZChkZXYsIEFUQV9GTFVTSENBQ0hFLCAwLCAwLCAwKTsKKyAg ICBpZiAoYXRhZGV2LT5wYXJhbS5zdXBwb3J0LmNvbW1hbmQyICYgQVRBX1NVUFBPUlRfU1RBTkRC WSkKKyAgICAgICBhdGFfY29udHJvbGNtZChkZXYsIEFUQV9TVEFOREJZX0lNTUVESUFURSwgMCwg MCwgMCk7CisKICAgICByZXR1cm4gMDsKIH0KCg== --+permail-20100126191723f7e55a9d00001a52-a_best01+-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 26 21:52:39 2010 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 7FC83106566C for ; Tue, 26 Jan 2010 21:52:39 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-ew0-f218.google.com (mail-ew0-f218.google.com [209.85.219.218]) by mx1.freebsd.org (Postfix) with ESMTP id E43F08FC33 for ; Tue, 26 Jan 2010 21:52:37 +0000 (UTC) Received: by ewy10 with SMTP id 10so488676ewy.3 for ; Tue, 26 Jan 2010 13:52:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=0Eo+JS08/EM3TjjnxVZzOPsiKGpV8Ajd0mNUdj/toT4=; b=CaLkkWm7cnXCGiBusPCOAYAI0ssYwNP0ZKBGC/INuzFrwqk2y0BDJBGPlTMCKu9kK1 O0xddfjUTxuUFOjB0dE+vmjiN/sa+6j2n81xqbzc5tTW5dZc4a+IrOXBjnLPEs8joY9v ChA5l2u66vuzNnGPQR+MlqHvQDuuddwi4+yLE= 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=YUDZ4Ezcy3p44iDpAtvMX+Ea1OMmi7KxUxNVOWgI+Dk4rNAeFRpN4Sy3IE13mENBVJ o6un4cPcspZy+TKw2g4QHX6A4p5dD3ooptyXcqQ8ULo19eVgWmPEjki+al6ecDRRNe1k MkbhZiXNK/Pes97dh8HY+PeyW6hFIPH4UG+J0= MIME-Version: 1.0 Received: by 10.213.43.81 with SMTP id v17mr2467313ebe.0.1264542755707; Tue, 26 Jan 2010 13:52:35 -0800 (PST) In-Reply-To: <201001151110.29417.jhb@freebsd.org> References: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> <201001151110.29417.jhb@freebsd.org> Date: Tue, 26 Jan 2010 22:52:35 +0100 Message-ID: <1bd550a01001261352h1ecc22dbh8fd2dcf9c8ac51c5@mail.gmail.com> From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] linprocfs dofilesystems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 21:52:39 -0000 2010/1/15 John Baldwin : > On Friday 08 January 2010 12:19:29 pm Fernando Apestegu=EDa wrote: >> Hi all, >> >> This patch implements the "filesystems" file in the linux proc fs. >> I have used it for some time without seeing any problems. Let me >> know in case this is useful. >> >> Tested against 8.0-RELEASE-p1 > > This patch is not correct. =A0It seems that /proc/filesystems is a list o= f > available filesystems, not a list of mounted filesystems. =A0E.g.: > >> cat /proc/filesystems > nodev =A0 sysfs > nodev =A0 rootfs > nodev =A0 bdev > nodev =A0 proc > nodev =A0 sockfs > nodev =A0 binfmt_misc > nodev =A0 usbfs > nodev =A0 usbdevfs > nodev =A0 futexfs > nodev =A0 tmpfs > nodev =A0 pipefs > nodev =A0 eventpollfs > nodev =A0 devpts > =A0 =A0 =A0 =A0ext2 > nodev =A0 ramfs > nodev =A0 hugetlbfs > =A0 =A0 =A0 =A0iso9660 > nodev =A0 relayfs > nodev =A0 mqueue > =A0 =A0 =A0 =A0ext3 > nodev =A0 rpc_pipefs > nodev =A0 nfs > nodev =A0 nfs4 > nodev =A0 autofs > > To do the same thing in FreeBSD you would need to walk the vfsconf list > instead. =A0However, I'm not sure it is worth it to add this unless there > are apps people commonly use that need it. You are right. I have another patch to do the right thing. However as you pointed out maybe it is not useful after all. Is it possible to delete the PR? Sorry for the noise PS: My current patch does not distinguish between common filesystems and pseudo filesystems, where could I find that info? Cheers > > -- > John Baldwin > From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 04:36:17 2010 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 8DACE1065672 for ; Wed, 27 Jan 2010 04:36:17 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 109BE8FC0A for ; Wed, 27 Jan 2010 04:36:16 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.3/8.14.3) with ESMTP id o0R4Jk7h032140; Tue, 26 Jan 2010 21:19:46 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.3/8.14.3/Submit) with ESMTP id o0R4JkRP032137; Tue, 26 Jan 2010 21:19:46 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Tue, 26 Jan 2010 21:19:46 -0700 (MST) From: Warren Block To: Alexander Best In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; format=flowed Content-ID: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (wonkity.com [127.0.0.1]); Tue, 26 Jan 2010 21:19:46 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 04:36:18 -0000 On Tue, 26 Jan 2010, Alexander Best wrote: > because of kern/140752 i looked through a discussion back in 2009 > (http://lists.freebsd.org/pipermail/freebsd-hackers/2009-March/027879.html) > concerning freebsd's hdd spin down procedure. right now ATA_FLUSHCACHE is > being used although the hitachi hdd specs referenced in the pr say that this > will not cause proper load/unload and thus an emergency unload will occur > which reduces the life expectancy of hdds dramatically (20.000 shutdowns vs. > 600.000 shutdowns). unfortunately the discussion back then didn't come up with > any sort of decision/patch. > > attached you'll find a very simple patch which issues ATA_STANDBY_IMMEDIATE > instead of ATA_FLUSHCACHE during hdd spin down. > > could somebody with hdd knowledge comment on this? this matter seems quite > important since there may be a chance that the current spin down mechanism in > freebsd damages hdds! Does the shutdown sound different with that patch? On a couple of different notebooks here, unpatched FreeBSD makes a "GLINK!" sound when the drive parks, much louder than other operating systems on the same notebooks. -Warren Block * Rapid City, South Dakota USA From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 04:43:09 2010 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 00E771065676 for ; Wed, 27 Jan 2010 04:43:09 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-ew0-f218.google.com (mail-ew0-f218.google.com [209.85.219.218]) by mx1.freebsd.org (Postfix) with ESMTP id 88CAD8FC2D for ; Wed, 27 Jan 2010 04:43:08 +0000 (UTC) Received: by ewy10 with SMTP id 10so821446ewy.3 for ; Tue, 26 Jan 2010 20:43:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=dJuowWH7txyjRavuZiNAJ4h0pRHfibYSaOqnA72o5E0=; b=UXV+15KkykAb9WhCvFaqzkusUchi/uYDrSKXkYup+MNoKbu/9sDaRzOWta8aM3Tgf0 SHF1lxpRbavxBpJ8l8KpYVHjwB3scXTwSDJCMCOK6ufObXKLJXBDhoHzKr6VCkRb9L/O 22eHnBzzXqPTwqtWH07QPGxgw1RlkyB+rvbMo= 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=AtVLsQyjvwpmmnHyU2exoBzJWGhXaGBcOOFJI4U7b24EpufWsA8WJoEPKB8Nj12MZm VBOKBfh71TTFCEbchuStDCEo5btEwlnya4fBKeys45e0muU1CbT21QNzvzaJVABJBbuV 2lIvf4iiW8Gwv87UpZV7Hm1SE/EvEJEkylgKY= MIME-Version: 1.0 Sender: mozolevsky@gmail.com Received: by 10.213.15.19 with SMTP id i19mr4858037eba.65.1264567387221; Tue, 26 Jan 2010 20:43:07 -0800 (PST) In-Reply-To: References: From: Igor Mozolevsky Date: Wed, 27 Jan 2010 04:42:47 +0000 X-Google-Sender-Auth: ffa19f6b2b59f552 Message-ID: To: Alexander Best Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 04:43:09 -0000 2010/1/26 Alexander Best : > attached you'll find a very simple patch which issues ATA_STANDBY_IMMEDIATE > instead of ATA_FLUSHCACHE during hdd spin down. Hold on, does STANDBY IMMEDIATE not abort the previous command within some short timeframe? What if there are pending writes? Cheers, -- Igor From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 04:44:43 2010 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 7A5401065694 for ; Wed, 27 Jan 2010 04:44:43 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-ew0-f218.google.com (mail-ew0-f218.google.com [209.85.219.218]) by mx1.freebsd.org (Postfix) with ESMTP id 0F5988FC23 for ; Wed, 27 Jan 2010 04:44:42 +0000 (UTC) Received: by ewy10 with SMTP id 10so822237ewy.3 for ; Tue, 26 Jan 2010 20:44:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=Ewj4QGdIFRPSp1aX+hVVZ3HarGlsUFmooyiMZyS+en0=; b=Sn11oDRdSk5tKGK7kjwx80x7EWJL+NME6Pk6yI9UVDw1WsAtawr9YIoXIj2GpjjNbb 0GC5OPiN42C6w/7Tl0cfvjtO9LFM83ABEN8jHyM+FmT0xkPR0rtYs9hEsxIa30ObXhp4 kK0/2VVlNIXk49mnFpZMEiy/ptb0J8BncGgNA= 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=GDaCU5zstA5uJZx1EKUh4B2msp68dEaDr9SdhKCohO0PVOUoHkuTrUJJCaBfvJCuat AWBtGqwZBMUYdORCVdgWpdk2UdcBjVN2mwD5ssaYZR2rrqX34Kvq+QJXwQqi3LDQEhSV 6fjqRBHrVPLS2ow9jJ7nL1DwfgHVdJnyZqtEg= MIME-Version: 1.0 Sender: mozolevsky@gmail.com Received: by 10.213.41.210 with SMTP id p18mr421200ebe.97.1264567482152; Tue, 26 Jan 2010 20:44:42 -0800 (PST) In-Reply-To: References: From: Igor Mozolevsky Date: Wed, 27 Jan 2010 04:44:22 +0000 X-Google-Sender-Auth: 65aa60eee083e927 Message-ID: To: Alexander Best Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 04:44:43 -0000 2010/1/27 Igor Mozolevsky : > Hold on, does STANDBY IMMEDIATE not abort the previous command within > some short timeframe? What if there are pending writes? Nope, ignore me... From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 08:51:43 2010 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 34750106566C for ; Wed, 27 Jan 2010 08:51:43 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id BAAAB8FC1B for ; Wed, 27 Jan 2010 08:51:42 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,352,1262559600"; d="scan'208";a="24426966" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 27 Jan 2010 09:51:40 +0100 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id E0F6A1B07C0; Wed, 27 Jan 2010 09:51:40 +0100 (CET) Date: Wed, 27 Jan 2010 09:51:40 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Warren Block Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 08:51:43 -0000 i believe the sound you hear is due to the emergency unload sequence. i'm not 100% sure, but i think after applying the patch the sound is gone. i recently replaced my old IDE hdd (which made a very loud "click!" during shutdown) with a new SATA hdd. the new one is very quiet and so it's not that easy to recognise any changes in the spin down procedure. would be very nice if you could try the patch on one of the notebooks you're referring to in order to see if the patch makes a difference. cheers. alex Warren Block schrieb am 2010-01-27: > On Tue, 26 Jan 2010, Alexander Best wrote: > >because of kern/140752 i looked through a discussion back in 2009 > >(http://lists.freebsd.org/pipermail/freebsd-hackers/2009-March/02787 > >9.html) > >concerning freebsd's hdd spin down procedure. right now > >ATA_FLUSHCACHE is > >being used although the hitachi hdd specs referenced in the pr say > >that this > >will not cause proper load/unload and thus an emergency unload will > >occur > >which reduces the life expectancy of hdds dramatically (20.000 > >shutdowns vs. > >600.000 shutdowns). unfortunately the discussion back then didn't > >come up with > >any sort of decision/patch. > >attached you'll find a very simple patch which issues > >ATA_STANDBY_IMMEDIATE > >instead of ATA_FLUSHCACHE during hdd spin down. > >could somebody with hdd knowledge comment on this? this matter > >seems quite > >important since there may be a chance that the current spin down > >mechanism in > >freebsd damages hdds! > Does the shutdown sound different with that patch? On a couple of > different notebooks here, unpatched FreeBSD makes a "GLINK!" sound > when the drive parks, much louder than other operating systems on > the same notebooks. > -Warren Block * Rapid City, South Dakota USA From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 09:44:35 2010 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 49DB0106566B for ; Wed, 27 Jan 2010 09:44:35 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout5.freenet.de (mout5.freenet.de [IPv6:2001:748:100:40::2:7]) by mx1.freebsd.org (Postfix) with ESMTP id D5CF78FC1E for ; Wed, 27 Jan 2010 09:44:34 +0000 (UTC) Received: from [195.4.92.26] (helo=16.mx.freenet.de) by mout5.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.70 #1) id 1Na4Rt-0007U4-Ja; Wed, 27 Jan 2010 10:44:33 +0100 Received: from p57ae1733.dip0.t-ipconnect.de ([87.174.23.51]:24704 helo=ernst.jennejohn.org) by 16.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #94) id 1Na4Rt-0002ka-BT; Wed, 27 Jan 2010 10:44:33 +0100 Date: Wed, 27 Jan 2010 10:44:32 +0100 From: Gary Jennejohn To: Alexander Best Message-ID: <20100127104432.5de75be7@ernst.jennejohn.org> In-Reply-To: References: X-Mailer: Claws Mail 3.7.4 (GTK+ 2.16.2; 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: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 09:44:35 -0000 On Tue, 26 Jan 2010 20:17:23 +0100 (CET) Alexander Best wrote: > hi there, > > because of kern/140752 i looked through a discussion back in 2009 > (http://lists.freebsd.org/pipermail/freebsd-hackers/2009-March/027879.html) > concerning freebsd's hdd spin down procedure. right now ATA_FLUSHCACHE is > being used although the hitachi hdd specs referenced in the pr say that this > will not cause proper load/unload and thus an emergency unload will occur > which reduces the life expectancy of hdds dramatically (20.000 shutdowns vs. > 600.000 shutdowns). unfortunately the discussion back then didn't come up with > any sort of decision/patch. > > attached you'll find a very simple patch which issues ATA_STANDBY_IMMEDIATE > instead of ATA_FLUSHCACHE during hdd spin down. > > could somebody with hdd knowledge comment on this? this matter seems quite > important since there may be a chance that the current spin down mechanism in > freebsd damages hdds! > What if the disk doesn't support ATA_STANDBY_IMMEDIATE? Your patch then negates the benefit of calling ad_shutdown(), namely flushing the cache, if possible. I suggest putting your new code at the top and leaving the old code in an else-if clause. --- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 12:35:15 2010 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 1EEA7106566B for ; Wed, 27 Jan 2010 12:35:15 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 99FB48FC1A for ; Wed, 27 Jan 2010 12:35:14 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o0RCYvh7040071; Wed, 27 Jan 2010 13:35:12 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o0RCYvbe040070; Wed, 27 Jan 2010 13:34:57 +0100 (CET) (envelope-from olli) Date: Wed, 27 Jan 2010 13:34:57 +0100 (CET) Message-Id: <201001271234.o0RCYvbe040070@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, alexbestms@wwu.de In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 27 Jan 2010 13:35:12 +0100 (CET) Cc: Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, alexbestms@wwu.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 12:35:15 -0000 Alexander Best wrote: > because of kern/140752 i looked through a discussion back in 2009 > (http://lists.freebsd.org/pipermail/freebsd-hackers/2009-March/027879.html) > concerning freebsd's hdd spin down procedure. right now ATA_FLUSHCACHE is > being used although the hitachi hdd specs referenced in the pr say that this > will not cause proper load/unload and thus an emergency unload will occur > which reduces the life expectancy of hdds dramatically (20.000 shutdowns vs. > 600.000 shutdowns). unfortunately the discussion back then didn't come up with > any sort of decision/patch. > > attached you'll find a very simple patch which issues ATA_STANDBY_IMMEDIATE > instead of ATA_FLUSHCACHE during hdd spin down. A few comments ... First, you should not *replace* ATA_FLUSHCACHE. Rather, you should issue *both* commands, first ATA_FLUSHCACHE and then ATA_STANDBY_IMMEDIATE (maybe with a short delay between, just to be on the safe side). Second, you should make sure that ATA_STANDBY_IMMEDIATE is only used when a poweroff is requested, but not in other cases. Of course, ATA_FLUSHCACHE should *always* be sent. Finally, it would be nice if it is put under a sysctl or similar, so the feature can be switched on and off. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Above all, they contribute to the genetic diversity in the operating system pool. Which is a good thing." -- Ruben van Staveren, on the question which BSD OS is the best one. From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 13:14:42 2010 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 5135E106566B for ; Wed, 27 Jan 2010 13:14:42 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-ew0-f218.google.com (mail-ew0-f218.google.com [209.85.219.218]) by mx1.freebsd.org (Postfix) with ESMTP id D90F28FC21 for ; Wed, 27 Jan 2010 13:14:41 +0000 (UTC) Received: by ewy10 with SMTP id 10so1236065ewy.3 for ; Wed, 27 Jan 2010 05:14:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type:content-transfer-encoding; bh=fEKlc6lrZ5Cz7/Jv+QoSDmCrtS/OZ/G72fYgiSJEBZ4=; b=OFL6y3Q+wM3pj1rJHOQ1EH63hD+Qhpamv3eCIsyoJZ1ecwXxsbsdZhQBlEdxEsEdIt 7YcplK2LlWM1m5uwXf1cfunYb0MalacwEk1ctJRrUZkGBdpFF4dxGkXlD47RW936JDDZ bKE2PvXIugWnGPcJ2yLlN2EM1r5JpZjOv3h3Y= 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:content-type :content-transfer-encoding; b=QFKiyhWuRkWN/R3KeiakfcmhN2/dyI7B3U/1ujrirE3Kcmc2tT0m+v3hn7C6zh/H34 HAbHq1WcabcYLq5FUJkkrERMOD1WnOr/ZPuL5KuIVGklIfnpacpqy8YPOnDE+Zo0Jnth 1g+qfw6HnJAIscI0164vdp5EsP3yLl6+mZer8= MIME-Version: 1.0 Sender: mozolevsky@gmail.com Received: by 10.213.15.19 with SMTP id i19mr5370904eba.65.1264598080346; Wed, 27 Jan 2010 05:14:40 -0800 (PST) In-Reply-To: <201001271234.o0RCYvbe040070@lurza.secnetix.de> References: <201001271234.o0RCYvbe040070@lurza.secnetix.de> From: Igor Mozolevsky Date: Wed, 27 Jan 2010 13:14:20 +0000 X-Google-Sender-Auth: cb4112010eac87e1 Message-ID: To: freebsd-hackers@freebsd.org, alexbestms@wwu.de Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 13:14:42 -0000 2010/1/27 Oliver Fromme : > Second, you should make sure that ATA_STANDBY_IMMEDIATE is > only used when a poweroff is requested, but not in other > cases. =C2=A0Of course, ATA_FLUSHCACHE should *always* be sent. Would SLEEP not be a better option than STANBY IMMEDIATE, as SLEEP actually turns the disk's interface off so the disk cannot be woken up by any command other than RESET? Cheers, -- Igor From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 13:27:50 2010 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 C24CB106566C for ; Wed, 27 Jan 2010 13:27:50 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4D8C18FC1C for ; Wed, 27 Jan 2010 13:27:50 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o0RDRX7r045029; Wed, 27 Jan 2010 14:27:49 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o0RDRXBT045028; Wed, 27 Jan 2010 14:27:33 +0100 (CET) (envelope-from olli) Date: Wed, 27 Jan 2010 14:27:33 +0100 (CET) Message-Id: <201001271327.o0RDRXBT045028@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, alexbestms@wwu.de In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 27 Jan 2010 14:27:49 +0100 (CET) Cc: Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, alexbestms@wwu.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 13:27:50 -0000 Alexander Best wrote: > i believe the sound you hear is due to the emergency unload sequence. > i'm not 100% sure, but i think after applying the patch the sound > is gone. i recently replaced my old IDE hdd (which made a very loud > "click!" during shutdown) with a new SATA hdd. the new one is very > quiet and so it's not that easy to recognise any changes in the spin > down procedure. There are hard disk drives that (still) have a reasonable auto-park feature and don't require a special command. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 14:45:00 2010 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 767F4106566B for ; Wed, 27 Jan 2010 14:45:00 +0000 (UTC) (envelope-from falkman@gamozo.org) Received: from epicblunt.blendfresh.net (epicblunt.blendfresh.net [97.107.136.32]) by mx1.freebsd.org (Postfix) with ESMTP id 3B3078FC19 for ; Wed, 27 Jan 2010 14:44:59 +0000 (UTC) Received: from [192.168.1.131] (75-134-26-91.dhcp.mdsn.wi.charter.com [75.134.26.91]) (authenticated bits=0) by epicblunt.blendfresh.net (8.14.3/8.14.3) with ESMTP id o0REJ9iN028182 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 27 Jan 2010 08:19:18 -0600 Message-ID: <4B604B43.7010203@gamozo.org> Date: Wed, 27 Jan 2010 08:18:43 -0600 From: Brandon Falk User-Agent: Thunderbird 2.0.0.23 (X11/20100126) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Leaks in libc? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 14:45:00 -0000 The simple program: #include #include int main() { puts("Apple cider"); return 0; } Yields the following result in valgrind: ==4703== Memcheck, a memory error detector ==4703== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==4703== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info ==4703== Command: ./a.out ==4703== Apple cider ==4703== ==4703== HEAP SUMMARY: ==4703== in use at exit: 4,096 bytes in 1 blocks ==4703== total heap usage: 1 allocs, 0 frees, 4,096 bytes allocated ==4703== ==4703== LEAK SUMMARY: ==4703== definitely lost: 0 bytes in 0 blocks ==4703== indirectly lost: 0 bytes in 0 blocks ==4703== possibly lost: 0 bytes in 0 blocks ==4703== still reachable: 0 bytes in 0 blocks ==4703== suppressed: 4,096 bytes in 1 blocks ==4703== ==4703== For counts of detected and suppressed errors, rerun with: -v ==4703== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Any ideas why the standard libraries are leaking like this? Is it perhaps a bug with valgrind, or maybe FreeBSD automatically cleans up so they took the cleanup out of their libc? FreeBSD 8.0 x86_64 Thanks, Brandon From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 14:46:34 2010 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 B63A51065694 for ; Wed, 27 Jan 2010 14:46:34 +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 862DB8FC1D for ; Wed, 27 Jan 2010 14:46:34 +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 312A346B2C; Wed, 27 Jan 2010 09:46:34 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 595898A024; Wed, 27 Jan 2010 09:46:33 -0500 (EST) From: John Baldwin To: Fernando =?iso-8859-1?q?Apestegu=EDa?= Date: Wed, 27 Jan 2010 08:56:24 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> <201001151110.29417.jhb@freebsd.org> <1bd550a01001261352h1ecc22dbh8fd2dcf9c8ac51c5@mail.gmail.com> In-Reply-To: <1bd550a01001261352h1ecc22dbh8fd2dcf9c8ac51c5@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201001270856.24324.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 27 Jan 2010 09:46:33 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] linprocfs dofilesystems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 14:46:34 -0000 On Tuesday 26 January 2010 4:52:35 pm Fernando Apestegu=EDa wrote: > 2010/1/15 John Baldwin : > > On Friday 08 January 2010 12:19:29 pm Fernando Apestegu=EDa wrote: > >> Hi all, > >> > >> This patch implements the "filesystems" file in the linux proc fs. > >> I have used it for some time without seeing any problems. Let me > >> know in case this is useful. > >> > >> Tested against 8.0-RELEASE-p1 > > > > This patch is not correct. It seems that /proc/filesystems is a list of > > available filesystems, not a list of mounted filesystems. E.g.: > > > >> cat /proc/filesystems > > nodev sysfs > > nodev rootfs > > nodev bdev > > nodev proc > > nodev sockfs > > nodev binfmt_misc > > nodev usbfs > > nodev usbdevfs > > nodev futexfs > > nodev tmpfs > > nodev pipefs > > nodev eventpollfs > > nodev devpts > > ext2 > > nodev ramfs > > nodev hugetlbfs > > iso9660 > > nodev relayfs > > nodev mqueue > > ext3 > > nodev rpc_pipefs > > nodev nfs > > nodev nfs4 > > nodev autofs > > > > To do the same thing in FreeBSD you would need to walk the vfsconf list > > instead. However, I'm not sure it is worth it to add this unless there > > are apps people commonly use that need it. >=20 > You are right. I have another patch to do the right thing. However as > you pointed > out maybe it is not useful after all. Is it possible to delete the PR? >=20 > Sorry for the noise >=20 > PS: My current patch does not distinguish between common filesystems > and pseudo filesystems, where could I find that info? >=20 > Cheers Hmm, I'm not sure if there is an easy way to distinguish psuedo filesystems= =20 from device-backed filesystems. Hmm, maybe the VFCF_SYNTHETIC flag? If you have an updated patch I'm ok with reviewing it. What programs are you using that use this file in linprocfs? =2D-=20 John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 15:43:19 2010 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 704C01065692 for ; Wed, 27 Jan 2010 15:43:19 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout6.freenet.de (mout6.freenet.de [IPv6:2001:748:100:40::2:8]) by mx1.freebsd.org (Postfix) with ESMTP id 08B7C8FC15 for ; Wed, 27 Jan 2010 15:43:19 +0000 (UTC) Received: from [195.4.92.17] (helo=7.mx.freenet.de) by mout6.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.70 #1) id 1NaA32-000883-Vw; Wed, 27 Jan 2010 16:43:16 +0100 Received: from p57ae1733.dip0.t-ipconnect.de ([87.174.23.51]:20459 helo=ernst.jennejohn.org) by 7.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #94) id 1NaA2y-0004Q9-Ce; Wed, 27 Jan 2010 16:43:15 +0100 Date: Wed, 27 Jan 2010 16:42:56 +0100 From: Gary Jennejohn To: Brandon Falk Message-ID: <20100127164256.2a06177a@ernst.jennejohn.org> In-Reply-To: <4B604B43.7010203@gamozo.org> References: <4B604B43.7010203@gamozo.org> X-Mailer: Claws Mail 3.7.4 (GTK+ 2.16.2; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Leaks in libc? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 15:43:19 -0000 On Wed, 27 Jan 2010 08:18:43 -0600 Brandon Falk wrote: > The simple program: >=20 > #include > #include >=20 > int main() > { > puts("Apple cider"); > return 0; > } >=20 > Yields the following result in valgrind: >=20 > =3D=3D4703=3D=3D Memcheck, a memory error detector > =3D=3D4703=3D=3D Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward= et al. > =3D=3D4703=3D=3D Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyr= ight info > =3D=3D4703=3D=3D Command: ./a.out > =3D=3D4703=3D=3D > Apple cider > =3D=3D4703=3D=3D > =3D=3D4703=3D=3D HEAP SUMMARY: > =3D=3D4703=3D=3D in use at exit: 4,096 bytes in 1 blocks > =3D=3D4703=3D=3D total heap usage: 1 allocs, 0 frees, 4,096 bytes alloc= ated > =3D=3D4703=3D=3D > =3D=3D4703=3D=3D LEAK SUMMARY: > =3D=3D4703=3D=3D definitely lost: 0 bytes in 0 blocks > =3D=3D4703=3D=3D indirectly lost: 0 bytes in 0 blocks > =3D=3D4703=3D=3D possibly lost: 0 bytes in 0 blocks > =3D=3D4703=3D=3D still reachable: 0 bytes in 0 blocks > =3D=3D4703=3D=3D suppressed: 4,096 bytes in 1 blocks > =3D=3D4703=3D=3D > =3D=3D4703=3D=3D For counts of detected and suppressed errors, rerun with= : -v > =3D=3D4703=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 f= rom 0) >=20 > Any ideas why the standard libraries are leaking like this? Is it=20 > perhaps a bug with valgrind, or maybe FreeBSD automatically cleans up so= =20 > they took the cleanup out of their libc? >=20 > FreeBSD 8.0 x86_64 >=20 =46rom the valgrind FAQ "suppressed" means that a leak error has been suppressed. There are some suppressions in the default suppression files. You can ignore suppressed errors. AFAIK all variants of U*X recover memory used by applications when the applications exit. This is not a real leak. --- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 20:32:20 2010 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 986631065672; Wed, 27 Jan 2010 20:32:20 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-ew0-f218.google.com (mail-ew0-f218.google.com [209.85.219.218]) by mx1.freebsd.org (Postfix) with ESMTP id 05E508FC1B; Wed, 27 Jan 2010 20:32:19 +0000 (UTC) Received: by ewy10 with SMTP id 10so1698475ewy.3 for ; Wed, 27 Jan 2010 12:32:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=p/j/3wfDA/B/2SKpzM55MErA90cR4t/MdvUrpmUSflk=; b=axj0G4zwPZKwg9r1QizyEl/7gExlw/Gse3gImfvXqjJ8Fr0K7Rf6jkxwhivLnznwde aZ+rVLi9l3lAY2wQLpED+F0yzG3lCQPCI3+0+4mrXdTGBg9xvXI2L9+kktgQUaLVXjv2 uwj3lBdkSDex0xc3S+LihaoT6KeXAEboioNTU= 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=Wl62pMFsLTGB9smoid1Om+rY4TNSlACLAfIhO197hsCy4yLmMzNduYsqAlumPuLE1o eM4R4A2h9NXa5CxhRXTFdy6FaIoYcxnhFyYa8zF3SRmt8OHrUkxmiRBAU7nV39RG0x1r voejx52UmBXfN6Rsqt94uH7RaG2TQ1ja3D5pQ= MIME-Version: 1.0 Received: by 10.213.46.82 with SMTP id i18mr1486731ebf.50.1264624338011; Wed, 27 Jan 2010 12:32:18 -0800 (PST) In-Reply-To: <201001270856.24324.jhb@freebsd.org> References: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> <201001151110.29417.jhb@freebsd.org> <1bd550a01001261352h1ecc22dbh8fd2dcf9c8ac51c5@mail.gmail.com> <201001270856.24324.jhb@freebsd.org> Date: Wed, 27 Jan 2010 21:32:17 +0100 Message-ID: <1bd550a01001271232r3131a00ci8cf08e0a4ff21816@mail.gmail.com> From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] linprocfs dofilesystems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 20:32:20 -0000 2010/1/27 John Baldwin : > On Tuesday 26 January 2010 4:52:35 pm Fernando Apestegu=EDa wrote: >> 2010/1/15 John Baldwin : >> > On Friday 08 January 2010 12:19:29 pm Fernando Apestegu=EDa wrote: >> >> Hi all, >> >> >> >> This patch implements the "filesystems" file in the linux proc fs. >> >> I have used it for some time without seeing any problems. Let me >> >> know in case this is useful. >> >> >> >> Tested against 8.0-RELEASE-p1 >> > >> > This patch is not correct. =A0It seems that /proc/filesystems is a lis= t of >> > available filesystems, not a list of mounted filesystems. =A0E.g.: >> > >> >> cat /proc/filesystems >> > nodev =A0 sysfs >> > nodev =A0 rootfs >> > nodev =A0 bdev >> > nodev =A0 proc >> > nodev =A0 sockfs >> > nodev =A0 binfmt_misc >> > nodev =A0 usbfs >> > nodev =A0 usbdevfs >> > nodev =A0 futexfs >> > nodev =A0 tmpfs >> > nodev =A0 pipefs >> > nodev =A0 eventpollfs >> > nodev =A0 devpts >> > =A0 =A0 =A0 =A0ext2 >> > nodev =A0 ramfs >> > nodev =A0 hugetlbfs >> > =A0 =A0 =A0 =A0iso9660 >> > nodev =A0 relayfs >> > nodev =A0 mqueue >> > =A0 =A0 =A0 =A0ext3 >> > nodev =A0 rpc_pipefs >> > nodev =A0 nfs >> > nodev =A0 nfs4 >> > nodev =A0 autofs >> > >> > To do the same thing in FreeBSD you would need to walk the vfsconf lis= t >> > instead. =A0However, I'm not sure it is worth it to add this unless th= ere >> > are apps people commonly use that need it. >> >> You are right. I have another patch to do the right thing. However as >> you pointed >> out maybe it is not useful after all. Is it possible to delete the PR? >> >> Sorry for the noise >> >> PS: My current patch does not distinguish between common filesystems >> and pseudo filesystems, where could I find that info? >> >> Cheers > > Hmm, I'm not sure if there is an easy way to distinguish psuedo filesyste= ms > from device-backed filesystems. =A0Hmm, maybe the VFCF_SYNTHETIC flag? = =A0If > you have an updated patch I'm ok with reviewing it. =A0What programs are = you > using that use this file in linprocfs? I don't need the file right now. I did it for completeness although it could help to procinfo[1] gsysinfo[2] and a personal application I wrote some time ago[3]= . I am not a kernel developer, but I found this interesting as an exercise. That is the main reason I tried to implement this file. The new patch is attached. VFCF_SYNTHETIC seems to work fine as this patch = shows in my system: $ cat /compat/linux/proc/filesystems nodev procfs cd9660 nfs nodev devfs ufs msdosfs nodev linprocfs ntfs I suspect using procfs is not the most portable way of gathering information in a UNIX system Am I right? If so, what is the preferred way? Using sysctl? Thanks. /* Patch begin */ --- linprocfs.c.orig 2009-10-25 02:10:29.000000000 +0100 +++ linprocfs.c 2010-01-27 21:10:08.000000000 +0100 @@ -1227,6 +1227,24 @@ return (0); } +/* + * Filler function for proc/filesystems + */ + +static int +linprocfs_dofilesystems(PFS_FILL_ARGS) +{ + struct vfsconf *vfsp; + + TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { + if (vfsp->vfc_flags & VFCF_SYNTHETIC) + sbuf_printf(sb, "nodev"); + sbuf_printf(sb, "\t%s\n", vfsp->vfc_name); + } + + return(0); +} + #if 0 /* * Filler function for proc/modules @@ -1266,6 +1284,8 @@ NULL, NULL, NULL, PFS_RD); pfs_create_file(root, "meminfo", &linprocfs_domeminfo, NULL, NULL, NULL, PFS_RD); + pfs_create_file(root, "filesystems", &linprocfs_dofilesystems, + NULL, NULL, NULL, PFS_RD); #if 0 pfs_create_file(root, "modules", &linprocfs_domodules, NULL, NULL, NULL, PFS_RD); /* Patch end*/ [1] http://linux.die.net/man/8/procinfo [2] http://sourceforge.net/projects/gsysinfo/ [3] http://lkmonitor.sf.net > > -- > John Baldwin > From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 21:30:46 2010 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 496811065670 for ; Wed, 27 Jan 2010 21:30:46 +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 07F708FC12 for ; Wed, 27 Jan 2010 21:30:46 +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 9A16046B38; Wed, 27 Jan 2010 16:30:45 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id D20FD8A01F; Wed, 27 Jan 2010 16:30:44 -0500 (EST) From: John Baldwin To: Fernando =?iso-8859-1?q?Apestegu=EDa?= Date: Wed, 27 Jan 2010 16:10:33 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> <201001270856.24324.jhb@freebsd.org> <1bd550a01001271232r3131a00ci8cf08e0a4ff21816@mail.gmail.com> In-Reply-To: <1bd550a01001271232r3131a00ci8cf08e0a4ff21816@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201001271610.33621.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 27 Jan 2010 16:30:44 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] linprocfs dofilesystems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 21:30:46 -0000 On Wednesday 27 January 2010 3:32:17 pm Fernando Apestegu=EDa wrote: > 2010/1/27 John Baldwin : > > On Tuesday 26 January 2010 4:52:35 pm Fernando Apestegu=EDa wrote: > >> 2010/1/15 John Baldwin : > >> > On Friday 08 January 2010 12:19:29 pm Fernando Apestegu=EDa wrote: > >> >> Hi all, > >> >> > >> >> This patch implements the "filesystems" file in the linux proc fs. > >> >> I have used it for some time without seeing any problems. Let me > >> >> know in case this is useful. > >> >> > >> >> Tested against 8.0-RELEASE-p1 > >> > > >> > This patch is not correct. It seems that /proc/filesystems is a lis= t of > >> > available filesystems, not a list of mounted filesystems. E.g.: > >> > > >> >> cat /proc/filesystems > >> > nodev sysfs > >> > nodev rootfs > >> > nodev bdev > >> > nodev proc > >> > nodev sockfs > >> > nodev binfmt_misc > >> > nodev usbfs > >> > nodev usbdevfs > >> > nodev futexfs > >> > nodev tmpfs > >> > nodev pipefs > >> > nodev eventpollfs > >> > nodev devpts > >> > ext2 > >> > nodev ramfs > >> > nodev hugetlbfs > >> > iso9660 > >> > nodev relayfs > >> > nodev mqueue > >> > ext3 > >> > nodev rpc_pipefs > >> > nodev nfs > >> > nodev nfs4 > >> > nodev autofs > >> > > >> > To do the same thing in FreeBSD you would need to walk the vfsconf l= ist > >> > instead. However, I'm not sure it is worth it to add this unless th= ere > >> > are apps people commonly use that need it. > >> > >> You are right. I have another patch to do the right thing. However as > >> you pointed > >> out maybe it is not useful after all. Is it possible to delete the PR? > >> > >> Sorry for the noise > >> > >> PS: My current patch does not distinguish between common filesystems > >> and pseudo filesystems, where could I find that info? > >> > >> Cheers > > > > Hmm, I'm not sure if there is an easy way to distinguish psuedo filesys= tems > > from device-backed filesystems. Hmm, maybe the VFCF_SYNTHETIC flag? If > > you have an updated patch I'm ok with reviewing it. What programs are = you > > using that use this file in linprocfs? >=20 > I don't need the file right now. I did it for completeness although it > could help to > procinfo[1] gsysinfo[2] and a personal application I wrote some time ago[= 3]. > I am not a kernel developer, but I found this interesting as an exercise. > That is the main reason I tried to implement this file. >=20 > The new patch is attached. VFCF_SYNTHETIC seems to work fine as this patc= h shows > in my system: >=20 > $ cat /compat/linux/proc/filesystems > nodev procfs > cd9660 > nfs > nodev devfs > ufs > msdosfs > nodev linprocfs > ntfs >=20 > I suspect using procfs is not the most portable way of gathering > information in a UNIX system > Am I right? If so, what is the preferred way? Using sysctl? I'm not aware of a portable way to obtain this information across all UNIX variants. For FreeBSD, there isn't a way for userland to obtain the list of filesystems cleanly. The patch looks good to me. I'll probably commit = it after some testing it locally. =2D-=20 John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 21:41:30 2010 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 A7F3D1065679 for ; Wed, 27 Jan 2010 21:41:30 +0000 (UTC) (envelope-from fergleiser@yahoo.com) Received: from web31707.mail.mud.yahoo.com (web31707.mail.mud.yahoo.com [68.142.201.187]) by mx1.freebsd.org (Postfix) with SMTP id 72ED68FC0C for ; Wed, 27 Jan 2010 21:41:30 +0000 (UTC) Received: (qmail 57240 invoked by uid 60001); 27 Jan 2010 21:14:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1264626889; bh=ifdaCmLGlp2n/1xPa2V52wT0BqJaqk/PohJm1N7DlvY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=HuKIFiLnBb2L8UKGLA9wQ1Gbyppp2l+xD2QKD8bO/AbNans3PxYvGecLNBT0GK5nNgXU6qD23P2ksalNnMM/D2IVuYNic7nBJAPJQ4rohZKJa+ZG2c4pqFWXPkh56gxthd9rZOJ710PsuAoJ8rkeSR8lb16Mq/SuIFlglAO/YOE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=D9hPNsuE6rYXznNR676+Hl7nrlHnKqa0PB+8bPjCZJ8pRrEK/Hg/cYTyDsqY1KNwZtRgByh7voAZ4aLycxoMCCnFKck+jR2U8KyB0ECE4MyfXP5Akizzv9WeZDRCXj1Ywycbdlo4opGnPZmkTI9+lUR3M7DVgwULne0v0efY+ec=; Message-ID: <6207.54233.qm@web31707.mail.mud.yahoo.com> X-YMail-OSG: JgS2Q3wVM1nIZLInq1vlZqs35v1b4pquRllcmtIn4ZRDlzH7fHd2ilGscZQiNs51J1eNCdvbIyfkCV2878QnMAZX.ChmVBLgLw3Rx2ZXX2KQe_OYwVczQkZCcNceYgtvLJ35ZnGclxcfgJDpWWGHtTE9OP4cCvOCrcsIAOUt0kH_m5ETYSsyfDO2xtcIf_X_2AxE2LzBn76aDCjm7f7MX8cm4ZCSjG8FXYXUzSVptsH5f02BxZhs_0Yw4gf7dwD.692V0y14.PQ9kd3CyxhovIqRh5TXnBDLNlQF6hJvwwate5h45L_bCLarrYOOjNBOftO3hu0D28fwXOoktiEDYXQ8 Received: from [190.231.141.13] by web31707.mail.mud.yahoo.com via HTTP; Wed, 27 Jan 2010 13:14:48 PST X-Mailer: YahooMailRC/272.7 YahooMailWebService/0.8.100.260964 Date: Wed, 27 Jan 2010 13:14:48 -0800 (PST) From: Fernando Gleiser To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: repeteable panics on a 7.2-RELEASE box X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 21:41:30 -0000 Hi. we're using a 7.2 box as a firewall/nat/ipsec machine with ipfilter/ipnat and ipsec-tools This box is crashing a lot, and all the panics are identical: root@firewall /var/crash]# uname -a FreeBSD firewall. 7.2-RELEASE-p5 FreeBSD 7.2-RELEASE-p5 #3: Mon Dec 28 16:45:47 ART 2009 root@firewall.:/usr/obj/usr/src/sys/DTRACE i386 [root@firewall /var/crash]# kgdb /boot/kernel/kernel.symbols /var/crash/vmcore.16 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... Unread portion of the kernel message buffer: Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x4 fault code = supervisor read, page not present instruction pointer = 0x20:0xc33ac8ab stack pointer = 0x28:0xc2f909bc frame pointer = 0x28:0xc2f90a38 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 21 (irq17: xl1) trap number = 12 panic: page fault cpuid = 0 Uptime: 11d22h28m55s Physical memory: 499 MB Dumping 115 MB: 100 84 68 52 36 20 4 Reading symbols from /boot/kernel/ipl.ko...Reading symbols from /boot/kernel/ipl.ko.symbols...done. done. Loaded symbols for /boot/kernel/ipl.ko Reading symbols from /boot/kernel/ng_socket.ko...Reading symbols from /boot/kernel/ng_socket.ko.symbols...done. done. Loaded symbols for /boot/kernel/ng_socket.ko Reading symbols from /boot/kernel/netgraph.ko...Reading symbols from /boot/kernel/netgraph.ko.symbols...done. done. Loaded symbols for /boot/kernel/netgraph.ko Reading symbols from /boot/kernel/ng_iface.ko...Reading symbols from /boot/kernel/ng_iface.ko.symbols...done. done. Loaded symbols for /boot/kernel/ng_iface.ko Reading symbols from /boot/kernel/ng_ppp.ko...Reading symbols from /boot/kernel/ng_ppp.ko.symbols...done. done. Loaded symbols for /boot/kernel/ng_ppp.ko Reading symbols from /boot/kernel/ng_bpf.ko...Reading symbols from /boot/kernel/ng_bpf.ko.symbols...done. done. Loaded symbols for /boot/kernel/ng_bpf.ko Reading symbols from /boot/kernel/ng_vjc.ko...Reading symbols from /boot/kernel/ng_vjc.ko.symbols...done. done. Loaded symbols for /boot/kernel/ng_vjc.ko Reading symbols from /boot/kernel/logo_saver.ko...Reading symbols from /boot/kernel/logo_saver.ko.symbols...done. done. Loaded symbols for /boot/kernel/logo_saver.ko Reading symbols from /boot/kernel/ng_pptpgre.ko...Reading symbols from /boot/kernel/ng_pptpgre.ko.symbols...done. done. Loaded symbols for /boot/kernel/ng_pptpgre.ko Reading symbols from /boot/kernel/ng_ksocket.ko...Reading symbols from /boot/kernel/ng_ksocket.ko.symbols...done. done. Loaded symbols for /boot/kernel/ng_ksocket.ko Reading symbols from /boot/kernel/ng_mppc.ko...Reading symbols from /boot/kernel/ng_mppc.ko.symbols...done. done. Loaded symbols for /boot/kernel/ng_mppc.ko Reading symbols from /boot/kernel/rc4.ko...Reading symbols from /boot/kernel/rc4.ko.symbols...done. done. Loaded symbols for /boot/kernel/rc4.ko #0 doadump () at pcpu.h:196 196 pcpu.h: No such file or directory. in pcpu.h (kgdb) bt #0 doadump () at pcpu.h:196 #1 0xc07ec1f7 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418 #2 0xc07ec4c9 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:574 #3 0xc0b18f2c in trap_fatal (frame=0xc2f9097c, eva=4) at /usr/src/sys/i386/i386/trap.c:939 #4 0xc0b191b0 in trap_pfault (frame=0xc2f9097c, usermode=0, eva=4) at /usr/src/sys/i386/i386/trap.c:852 #5 0xc0b19c2c in trap (frame=0xc2f9097c) at /usr/src/sys/i386/i386/trap.c:530 #6 0xc0afe20b in calltrap () at /usr/src/sys/i386/i386/exception.s:159 #7 0xc33ac8ab in nat_new () from /boot/kernel/ipl.ko #8 0xc33b0574 in fr_checknatin () from /boot/kernel/ipl.ko #9 0xc33c9723 in fr_check () from /boot/kernel/ipl.ko #10 0xc33c170e in fr_check_wrapper () from /boot/kernel/ipl.ko #11 0xc0897418 in pfil_run_hooks (ph=0xc0d03100, mp=0xc2f90be8, ifp=0xc3191400, dir=1, inp=0x0) at /usr/src/sys/net/pfil.c:78 #12 0xc08d76e2 in ip_input (m=0xc34ef200) at /usr/src/sys/netinet/ip_input.c:416 #13 0xc0895bb5 in netisr_dispatch (num=2, m=0xc34ef200) at /usr/src/sys/net/netisr.c:185 #14 0xc088bb51 in ether_demux (ifp=0xc3191400, m=0xc34ef200) at /usr/src/sys/net/if_ethersubr.c:834 #15 0xc088bf43 in ether_input (ifp=0xc3191400, m=0xc34ef200) at /usr/src/sys/net/if_ethersubr.c:692 #16 0xc09ec818 in xl_rxeof (sc=0xc3199000) at /usr/src/sys/pci/if_xl.c:2022 #17 0xc09eed24 in xl_intr (arg=0xc3199000) at /usr/src/sys/pci/if_xl.c:2257 #18 0xc07c9f5b in ithread_loop (arg=0xc3190300) at /usr/src/sys/kern/kern_intr.c:1088 #19 0xc07c6a59 in fork_exit (callout=0xc07c9da0 , arg=0xc3190300, frame=0xc2f90d38) at /usr/src/sys/kern/kern_fork.c:810 #20 0xc0afe2b0 in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:264 the panic always happens inside nat_new. Most of the "fatal trap 12"s I saw were hardware-related, but they happened in random places, This one always happens in the same place, the stack traces are identical in all the dumps. any pointers on what can be the cause of the panic, would be greatly apreciated. thanks in advance, Fer From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 21:48:00 2010 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 B7C341065676; Wed, 27 Jan 2010 21:48:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 283188FC19; Wed, 27 Jan 2010 21:47:59 +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 o0RLltwc024664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 27 Jan 2010 23:47:55 +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.3/8.14.3) with ESMTP id o0RLltT6029460; Wed, 27 Jan 2010 23:47:55 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0RLltSU029459; Wed, 27 Jan 2010 23:47:55 +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: Wed, 27 Jan 2010 23:47:55 +0200 From: Kostik Belousov To: John Baldwin Message-ID: <20100127214755.GK3877@deviant.kiev.zoral.com.ua> References: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> <201001270856.24324.jhb@freebsd.org> <1bd550a01001271232r3131a00ci8cf08e0a4ff21816@mail.gmail.com> <201001271610.33621.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zsp0GYBMzHfleR3l" Content-Disposition: inline In-Reply-To: <201001271610.33621.jhb@freebsd.org> 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=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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, Fernando Apestegu?a Subject: Re: [PATCH] linprocfs dofilesystems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 21:48:00 -0000 --zsp0GYBMzHfleR3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jan 27, 2010 at 04:10:33PM -0500, John Baldwin wrote: > I'm not aware of a portable way to obtain this information across all UNIX > variants. For FreeBSD, there isn't a way for userland to obtain the list > of filesystems cleanly. The patch looks good to me. I'll probably commit it > after some testing it locally. There is sysctl vfs.conflist. Cleanness of it can be argued. --zsp0GYBMzHfleR3l Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktgtIoACgkQC3+MBN1Mb4gQYwCgl2wQzN+eUeuGqHks0kb/NkKL S4wAoKT/6KzxbrJYSDYlii9oKeox7xt9 =vcp0 -----END PGP SIGNATURE----- --zsp0GYBMzHfleR3l-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 21:58:27 2010 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 DD69E1065672 for ; Wed, 27 Jan 2010 21:58:27 +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 AEBD28FC1C for ; Wed, 27 Jan 2010 21:58:27 +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 670AB46B2C; Wed, 27 Jan 2010 16:58:27 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 9A8998A01F; Wed, 27 Jan 2010 16:58:26 -0500 (EST) From: John Baldwin To: Kostik Belousov Date: Wed, 27 Jan 2010 16:55:26 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <1bd550a01001080919p20ec1b20t82b3761705cd1ff3@mail.gmail.com> <201001271610.33621.jhb@freebsd.org> <20100127214755.GK3877@deviant.kiev.zoral.com.ua> In-Reply-To: <20100127214755.GK3877@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201001271655.26703.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 27 Jan 2010 16:58:26 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, Fernando Apestegu?a Subject: Re: [PATCH] linprocfs dofilesystems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 21:58:27 -0000 On Wednesday 27 January 2010 4:47:55 pm Kostik Belousov wrote: > On Wed, Jan 27, 2010 at 04:10:33PM -0500, John Baldwin wrote: > > I'm not aware of a portable way to obtain this information across all UNIX > > variants. For FreeBSD, there isn't a way for userland to obtain the list > > of filesystems cleanly. The patch looks good to me. I'll probably commit it > > after some testing it locally. > > There is sysctl vfs.conflist. Cleanness of it can be argued. Ahh, I had missed that because it wasn't in vfs_init.c with the other code that uses the vfsconf list. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 28 02:05:52 2010 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 2B07D1065670; Thu, 28 Jan 2010 02:05:52 +0000 (UTC) (envelope-from list@sheringeorge.co.cc) Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mx1.freebsd.org (Postfix) with ESMTP id F006E8FC16; Thu, 28 Jan 2010 02:05:51 +0000 (UTC) Received: by pwi15 with SMTP id 15so156269pwi.3 for ; Wed, 27 Jan 2010 18:05:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.141.107.6 with SMTP id j6mr7099399rvm.288.1264644351037; Wed, 27 Jan 2010 18:05:51 -0800 (PST) In-Reply-To: <4B60E157.9090200@ip6.com.au> References: <7f14551c1001231916s1c142b21j916ae406ea71bd97@mail.gmail.com> <4B60E157.9090200@ip6.com.au> Date: Thu, 28 Jan 2010 07:35:51 +0530 Message-ID: <7f14551c1001271805w758c3e95s569365ad468ab9ae@mail.gmail.com> From: Sherin George To: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Strange network issue in freebsd 8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 02:05:52 -0000 Hello Sam, The problem happened today again. I am getting this message on traceroute =============== traceroute: findsaddr: write: No such process ================ When running a ping to 8.8.8.8, it says following. =================== ping: sendto: No route to host ==================== Please see the result of "netstat -rn" command. ============ myserver# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default XXX.XXX.XXX.241 UGS 62 209247 em0 127.0.0.1 link#3 UH 0 0 lo0 XXX.XXX.XXX.240/29 link#1 U 0 0 em0 XXX.XXX.XXX.242 link#1 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%lo0/64 link#3 U lo0 fe80::1%lo0 link#3 UHS lo0 ff01:3::/32 fe80::1%lo0 U lo0 ff02::%lo0/32 fe80::1%lo0 U lo0 ============= Note: I have replaced first three octets. I have checked netstat -m also. It is also not showing any problem. Could anyone please help me to sort out this issue. -- Thanks, Sherin On Thu, Jan 28, 2010 at 6:29 AM, sam wrote: > Hi, > > Is this problem still happening? > > Cheers > Sam > > > On 24/01/2010 2:16 PM, Sherin George wrote: > >> Hello, >> >> I am facing some sort of strange network issue in a freebsd server >> occasionally. >> >> OS: FreeBSD 8.0-RELEASE - amd64 >> >> Now, I have updated to FreeBSD 8.0-RELEASE-p2 >> >> The servers loses network connection once in a few days. I logged into >> console and verified that network is up. I even restarted network service >> using following command. >> >> /etc/rc.d/netif restart >> >> Still, it didn't fix. >> >> I checked /var/log/messages, but I am not getting any clue. >> >> ============== >> Jan 19 12:10:20 myserver kernel: GEOM_MIRROR: Device gm0: rebuilding >> provider ad0 finished. >> Jan 19 20:20:23 myserver nfsd[732]: select failed: Interrupted system call >> Jan 19 20:21:07 myserver nfsd[732]: select failed: Interrupted system call >> Jan 23 02:14:33 myserver login: ROOT LOGIN (root) ON ttyv0 >> Jan 23 02:19:51 myserver kernel: ifa_del_loopback_route: deletion failed >> Jan 23 02:19:57 myserver kernel: em0: link state changed to DOWN >> Jan 23 02:20:02 myserver kernel: em0: link state changed to UP >> Jan 23 02:29:58 myserver reboot: rebooted by root >> Jan 23 02:29:58 myserver syslogd: exiting on signal 15 >> Jan 23 02:31:31 myserver syslogd: kernel boot file is /boot/kernel/kernel >> Jan 23 02:31:31 myserver kernel: Copyright (c) 1992-2009 The FreeBSD >> Project. >> Jan 23 02:31:31 myserver kernel: Copyright (c) 1979, 1980, 1983, 1986, >> 1988, >> 1989, 1991, 1992, 1993, 1994 >> Jan 23 02:31:31 myserver kernel: The Regents of the University of >> California. All rights reserved. >> Jan 23 02:31:31 myserver kernel: FreeBSD is a registered trademark of The >> FreeBSD Foundation. >> Jan 23 02:31:31 myserver kernel: FreeBSD 8.0-RELEASE #0: Sat Nov 21 >> 15:02:08 >> UTC 2009 >> Jan 23 02:31:31 myserver kernel: root@mason.cse.buffalo.edu: >> /usr/obj/usr/src/sys/GENERIC >> Jan 23 02:31:31 myserver kernel: Timecounter "i8254" frequency 1193182 Hz >> quality 0 >> ============== >> >> Network, TCP stack all were up. It was pinging gateway even. But, >> traceroute >> was not going beyond gateway. >> >> I believe the issue is not related to anything outside server since a >> reboot >> always fixes the issue. >> >> I will be grateful for any advice that can help me in troubleshooting this >> problem. >> >> -- >> Best Regards, >> Sherin >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> >> >> > > From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 28 03:06:11 2010 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 DE7CE106566B; Thu, 28 Jan 2010 03:06:11 +0000 (UTC) (envelope-from qing.li@bluecoat.com) Received: from whisker.bluecoat.com (whisker.bluecoat.com [216.52.23.28]) by mx1.freebsd.org (Postfix) with ESMTP id 91FD18FC13; Thu, 28 Jan 2010 03:06:11 +0000 (UTC) Received: from bcs-mail03.internal.cacheflow.com ([10.2.2.95]) by whisker.bluecoat.com (8.14.2/8.14.2) with ESMTP id o0S2tWBW015092; Wed, 27 Jan 2010 18:55:32 -0800 (PST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 27 Jan 2010 18:52:41 -0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Strange network issue in freebsd 8 Thread-Index: AcqfvpM4rcqcQAOsSbKHSGYJksHSPgABmJy+ References: <7f14551c1001231916s1c142b21j916ae406ea71bd97@mail.gmail.com><4B60E157.9090200@ip6.com.au> <7f14551c1001271805w758c3e95s569365ad468ab9ae@mail.gmail.com> From: "Li, Qing" To: "Sherin George" , , , X-Mailman-Approved-At: Thu, 28 Jan 2010 03:22:09 +0000 Cc: Subject: RE: Strange network issue in freebsd 8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 03:06:12 -0000 I have been consumed by day job 200% of my time. I have some free time tonight and can work with you off-line. Is it possible for you to update to the latest stable-8 kernel=20 and we start from there ? -- Qing -----Original Message----- From: owner-freebsd-net@freebsd.org on behalf of Sherin George Sent: Wed 1/27/2010 6:05 PM To: freebsd-net@freebsd.org; freebsd-hackers@freebsd.org; = freebsd-questions@freebsd.org Subject: Re: Strange network issue in freebsd 8 =20 Hello Sam, The problem happened today again. I am getting this message on traceroute =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D traceroute: findsaddr: write: No such process =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D When running a ping to 8.8.8.8, it says following. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ping: sendto: No route to host =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Please see the result of "netstat -rn" command. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D myserver# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif = Expire default XXX.XXX.XXX.241 UGS 62 209247 em0 127.0.0.1 link#3 UH 0 0 lo0 XXX.XXX.XXX.240/29 link#1 U 0 0 em0 XXX.XXX.XXX.242 link#1 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%lo0/64 link#3 U lo0 fe80::1%lo0 link#3 UHS lo0 ff01:3::/32 fe80::1%lo0 U lo0 ff02::%lo0/32 fe80::1%lo0 U lo0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Note: I have replaced first three octets. I have checked netstat -m also. It is also not showing any problem. Could anyone please help me to sort out this issue. -- Thanks, Sherin On Thu, Jan 28, 2010 at 6:29 AM, sam wrote: > Hi, > > Is this problem still happening? > > Cheers > Sam > > > On 24/01/2010 2:16 PM, Sherin George wrote: > >> Hello, >> >> I am facing some sort of strange network issue in a freebsd server >> occasionally. >> >> OS: FreeBSD 8.0-RELEASE - amd64 >> >> Now, I have updated to FreeBSD 8.0-RELEASE-p2 >> >> The servers loses network connection once in a few days. I logged = into >> console and verified that network is up. I even restarted network = service >> using following command. >> >> /etc/rc.d/netif restart >> >> Still, it didn't fix. >> >> I checked /var/log/messages, but I am not getting any clue. >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> Jan 19 12:10:20 myserver kernel: GEOM_MIRROR: Device gm0: rebuilding >> provider ad0 finished. >> Jan 19 20:20:23 myserver nfsd[732]: select failed: Interrupted system = call >> Jan 19 20:21:07 myserver nfsd[732]: select failed: Interrupted system = call >> Jan 23 02:14:33 myserver login: ROOT LOGIN (root) ON ttyv0 >> Jan 23 02:19:51 myserver kernel: ifa_del_loopback_route: deletion = failed >> Jan 23 02:19:57 myserver kernel: em0: link state changed to DOWN >> Jan 23 02:20:02 myserver kernel: em0: link state changed to UP >> Jan 23 02:29:58 myserver reboot: rebooted by root >> Jan 23 02:29:58 myserver syslogd: exiting on signal 15 >> Jan 23 02:31:31 myserver syslogd: kernel boot file is = /boot/kernel/kernel >> Jan 23 02:31:31 myserver kernel: Copyright (c) 1992-2009 The FreeBSD >> Project. >> Jan 23 02:31:31 myserver kernel: Copyright (c) 1979, 1980, 1983, = 1986, >> 1988, >> 1989, 1991, 1992, 1993, 1994 >> Jan 23 02:31:31 myserver kernel: The Regents of the University of >> California. All rights reserved. >> Jan 23 02:31:31 myserver kernel: FreeBSD is a registered trademark of = The >> FreeBSD Foundation. >> Jan 23 02:31:31 myserver kernel: FreeBSD 8.0-RELEASE #0: Sat Nov 21 >> 15:02:08 >> UTC 2009 >> Jan 23 02:31:31 myserver kernel: root@mason.cse.buffalo.edu: >> /usr/obj/usr/src/sys/GENERIC >> Jan 23 02:31:31 myserver kernel: Timecounter "i8254" frequency = 1193182 Hz >> quality 0 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> >> Network, TCP stack all were up. It was pinging gateway even. But, >> traceroute >> was not going beyond gateway. >> >> I believe the issue is not related to anything outside server since a >> reboot >> always fixes the issue. >> >> I will be grateful for any advice that can help me in troubleshooting = this >> problem. >> >> -- >> Best Regards, >> Sherin >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to = "freebsd-net-unsubscribe@freebsd.org" >> >> >> > > _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 28 03:28:47 2010 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 114F9106566B; Thu, 28 Jan 2010 03:28:47 +0000 (UTC) (envelope-from list@sheringeorge.co.cc) Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mx1.freebsd.org (Postfix) with ESMTP id D57138FC0C; Thu, 28 Jan 2010 03:28:46 +0000 (UTC) Received: by pwi15 with SMTP id 15so199584pwi.3 for ; Wed, 27 Jan 2010 19:28:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.55.5 with SMTP id d5mr6619876rva.177.1264649325606; Wed, 27 Jan 2010 19:28:45 -0800 (PST) In-Reply-To: References: <7f14551c1001231916s1c142b21j916ae406ea71bd97@mail.gmail.com> <4B60E157.9090200@ip6.com.au> <7f14551c1001271805w758c3e95s569365ad468ab9ae@mail.gmail.com> Date: Thu, 28 Jan 2010 08:58:45 +0530 Message-ID: <7f14551c1001271928k112321e4s1338979bfb1e7d44@mail.gmail.com> From: Sherin George To: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Strange network issue in freebsd 8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 03:28:47 -0000 Hello, Thanks Qing. I have already upgraded to latest patch as per per the advise of "freebsd-hackers" ============================== myserver# uname -a FreeBSD myserver.server.net 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan 5 21:11:58 UTC 2010 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 myserver# freebsd-update fetch Looking up update.FreeBSD.org mirrors... 3 mirrors found. Fetching metadata signature for 8.0-RELEASE from update4.FreeBSD.org... done. Fetching metadata index... done. Inspecting system... done. Preparing to download files... done. No updates needed to update system to 8.0-RELEASE-p2. ============================== -- Regards, Sherin On Thu, Jan 28, 2010 at 8:22 AM, Li, Qing wrote: > > I have been consumed by day job 200% of my time. > > I have some free time tonight and can work with you off-line. > Is it possible for you to update to the latest stable-8 kernel > and we start from there ? > > -- Qing > > > -----Original Message----- > From: owner-freebsd-net@freebsd.org on behalf of Sherin George > Sent: Wed 1/27/2010 6:05 PM > To: freebsd-net@freebsd.org; freebsd-hackers@freebsd.org; > freebsd-questions@freebsd.org > Subject: Re: Strange network issue in freebsd 8 > > Hello Sam, > > The problem happened today again. > > I am getting this message on traceroute > > =============== > traceroute: findsaddr: write: No such process > ================ > > When running a ping to 8.8.8.8, it says following. > > =================== > ping: sendto: No route to host > ==================== > > Please see the result of "netstat -rn" command. > > ============ > myserver# netstat -rn > Routing tables > > Internet: > Destination Gateway Flags Refs Use Netif Expire > default XXX.XXX.XXX.241 UGS 62 209247 em0 > 127.0.0.1 link#3 UH 0 0 lo0 > XXX.XXX.XXX.240/29 link#1 U 0 0 em0 > XXX.XXX.XXX.242 link#1 UHS 0 0 lo0 > > Internet6: > Destination Gateway Flags > Netif Expire > ::1 ::1 UH > lo0 > fe80::%lo0/64 link#3 U > lo0 > fe80::1%lo0 link#3 UHS > lo0 > ff01:3::/32 fe80::1%lo0 U > lo0 > ff02::%lo0/32 fe80::1%lo0 U > lo0 > ============= > > Note: I have replaced first three octets. > > I have checked netstat -m also. It is also not showing any problem. > > Could anyone please help me to sort out this issue. > > -- > Thanks, > Sherin > > On Thu, Jan 28, 2010 at 6:29 AM, sam wrote: > > > Hi, > > > > Is this problem still happening? > > > > Cheers > > Sam > > > > > > On 24/01/2010 2:16 PM, Sherin George wrote: > > > >> Hello, > >> > >> I am facing some sort of strange network issue in a freebsd server > >> occasionally. > >> > >> OS: FreeBSD 8.0-RELEASE - amd64 > >> > >> Now, I have updated to FreeBSD 8.0-RELEASE-p2 > >> > >> The servers loses network connection once in a few days. I logged into > >> console and verified that network is up. I even restarted network > service > >> using following command. > >> > >> /etc/rc.d/netif restart > >> > >> Still, it didn't fix. > >> > >> I checked /var/log/messages, but I am not getting any clue. > >> > >> ============== > >> Jan 19 12:10:20 myserver kernel: GEOM_MIRROR: Device gm0: rebuilding > >> provider ad0 finished. > >> Jan 19 20:20:23 myserver nfsd[732]: select failed: Interrupted system > call > >> Jan 19 20:21:07 myserver nfsd[732]: select failed: Interrupted system > call > >> Jan 23 02:14:33 myserver login: ROOT LOGIN (root) ON ttyv0 > >> Jan 23 02:19:51 myserver kernel: ifa_del_loopback_route: deletion failed > >> Jan 23 02:19:57 myserver kernel: em0: link state changed to DOWN > >> Jan 23 02:20:02 myserver kernel: em0: link state changed to UP > >> Jan 23 02:29:58 myserver reboot: rebooted by root > >> Jan 23 02:29:58 myserver syslogd: exiting on signal 15 > >> Jan 23 02:31:31 myserver syslogd: kernel boot file is > /boot/kernel/kernel > >> Jan 23 02:31:31 myserver kernel: Copyright (c) 1992-2009 The FreeBSD > >> Project. > >> Jan 23 02:31:31 myserver kernel: Copyright (c) 1979, 1980, 1983, 1986, > >> 1988, > >> 1989, 1991, 1992, 1993, 1994 > >> Jan 23 02:31:31 myserver kernel: The Regents of the University of > >> California. All rights reserved. > >> Jan 23 02:31:31 myserver kernel: FreeBSD is a registered trademark of > The > >> FreeBSD Foundation. > >> Jan 23 02:31:31 myserver kernel: FreeBSD 8.0-RELEASE #0: Sat Nov 21 > >> 15:02:08 > >> UTC 2009 > >> Jan 23 02:31:31 myserver kernel: root@mason.cse.buffalo.edu: > >> /usr/obj/usr/src/sys/GENERIC > >> Jan 23 02:31:31 myserver kernel: Timecounter "i8254" frequency 1193182 > Hz > >> quality 0 > >> ============== > >> > >> Network, TCP stack all were up. It was pinging gateway even. But, > >> traceroute > >> was not going beyond gateway. > >> > >> I believe the issue is not related to anything outside server since a > >> reboot > >> always fixes the issue. > >> > >> I will be grateful for any advice that can help me in troubleshooting > this > >> problem. > >> > >> -- > >> Best Regards, > >> Sherin > >> _______________________________________________ > >> freebsd-net@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-net > >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > >> > >> > >> > > > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 28 03:20:08 2010 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 731681065696; Thu, 28 Jan 2010 03:20:08 +0000 (UTC) (envelope-from sam@ip6.com.au) Received: from mail01.ip6.com.au (ns1.ip6.com.au [125.255.112.202]) by mx1.freebsd.org (Postfix) with ESMTP id 2071A8FC0C; Thu, 28 Jan 2010 03:20:08 +0000 (UTC) Received: from mail01.ip6.com.au (localhost [127.0.0.1]) by mail01.ip6.com.au (Postfix) with ESMTP id 06F132882E; Thu, 28 Jan 2010 14:03:38 +1100 (EST) Received: by mail01.ip6.com.au (Postfix, from userid 500) id D48472882D; Thu, 28 Jan 2010 14:03:37 +1100 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail01.ip6.com.au X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, FH_DATE_PAST_20XX autolearn=no version=3.2.5 Received: from [10.250.250.37] (unknown [203.41.110.193]) by mail01.ip6.com.au (Postfix) with ESMTPA id 2CDF928538; Thu, 28 Jan 2010 14:03:37 +1100 (EST) Message-ID: <4B60FE95.7040209@ip6.com.au> Date: Thu, 28 Jan 2010 14:03:49 +1100 From: sam User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: Sherin George References: <7f14551c1001231916s1c142b21j916ae406ea71bd97@mail.gmail.com> <4B60E157.9090200@ip6.com.au> <7f14551c1001271805w758c3e95s569365ad468ab9ae@mail.gmail.com> In-Reply-To: <7f14551c1001271805w758c3e95s569365ad468ab9ae@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Mailman-Approved-At: Thu, 28 Jan 2010 03:55:56 +0000 Cc: freebsd-net@freebsd.org, freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Strange network issue in freebsd 8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 03:20:08 -0000 that s why I 've been so in doubt using freebsd AMD64 release. On 28/01/2010 1:05 PM, Sherin George wrote: > Hello Sam, > > The problem happened today again. > > I am getting this message on traceroute > > =============== > traceroute: findsaddr: write: No such process > ================ > > When running a ping to 8.8.8.8, it says following. > > =================== > ping: sendto: No route to host > ==================== > > Please see the result of "netstat -rn" command. > > ============ > myserver# netstat -rn > Routing tables > > Internet: > Destination Gateway Flags Refs Use Netif Expire > default XXX.XXX.XXX.241 UGS 62 209247 em0 > 127.0.0.1 link#3 UH 0 0 lo0 > XXX.XXX.XXX.240/29 link#1 U 0 0 em0 > XXX.XXX.XXX.242 link#1 UHS 0 0 lo0 > > Internet6: > Destination Gateway Flags > Netif Expire > ::1 ::1 UH > lo0 > fe80::%lo0/64 link#3 U > lo0 > fe80::1%lo0 link#3 UHS > lo0 > ff01:3::/32 fe80::1%lo0 U > lo0 > ff02::%lo0/32 fe80::1%lo0 U > lo0 > ============= > > Note: I have replaced first three octets. > > I have checked netstat -m also. It is also not showing any problem. > > Could anyone please help me to sort out this issue. > > -- > Thanks, > Sherin > > On Thu, Jan 28, 2010 at 6:29 AM, sam wrote: > > >> Hi, >> >> Is this problem still happening? >> >> Cheers >> Sam >> >> >> On 24/01/2010 2:16 PM, Sherin George wrote: >> >> >>> Hello, >>> >>> I am facing some sort of strange network issue in a freebsd server >>> occasionally. >>> >>> OS: FreeBSD 8.0-RELEASE - amd64 >>> >>> Now, I have updated to FreeBSD 8.0-RELEASE-p2 >>> >>> The servers loses network connection once in a few days. I logged into >>> console and verified that network is up. I even restarted network service >>> using following command. >>> >>> /etc/rc.d/netif restart >>> >>> Still, it didn't fix. >>> >>> I checked /var/log/messages, but I am not getting any clue. >>> >>> ============== >>> Jan 19 12:10:20 myserver kernel: GEOM_MIRROR: Device gm0: rebuilding >>> provider ad0 finished. >>> Jan 19 20:20:23 myserver nfsd[732]: select failed: Interrupted system call >>> Jan 19 20:21:07 myserver nfsd[732]: select failed: Interrupted system call >>> Jan 23 02:14:33 myserver login: ROOT LOGIN (root) ON ttyv0 >>> Jan 23 02:19:51 myserver kernel: ifa_del_loopback_route: deletion failed >>> Jan 23 02:19:57 myserver kernel: em0: link state changed to DOWN >>> Jan 23 02:20:02 myserver kernel: em0: link state changed to UP >>> Jan 23 02:29:58 myserver reboot: rebooted by root >>> Jan 23 02:29:58 myserver syslogd: exiting on signal 15 >>> Jan 23 02:31:31 myserver syslogd: kernel boot file is /boot/kernel/kernel >>> Jan 23 02:31:31 myserver kernel: Copyright (c) 1992-2009 The FreeBSD >>> Project. >>> Jan 23 02:31:31 myserver kernel: Copyright (c) 1979, 1980, 1983, 1986, >>> 1988, >>> 1989, 1991, 1992, 1993, 1994 >>> Jan 23 02:31:31 myserver kernel: The Regents of the University of >>> California. All rights reserved. >>> Jan 23 02:31:31 myserver kernel: FreeBSD is a registered trademark of The >>> FreeBSD Foundation. >>> Jan 23 02:31:31 myserver kernel: FreeBSD 8.0-RELEASE #0: Sat Nov 21 >>> 15:02:08 >>> UTC 2009 >>> Jan 23 02:31:31 myserver kernel: root@mason.cse.buffalo.edu: >>> /usr/obj/usr/src/sys/GENERIC >>> Jan 23 02:31:31 myserver kernel: Timecounter "i8254" frequency 1193182 Hz >>> quality 0 >>> ============== >>> >>> Network, TCP stack all were up. It was pinging gateway even. But, >>> traceroute >>> was not going beyond gateway. >>> >>> I believe the issue is not related to anything outside server since a >>> reboot >>> always fixes the issue. >>> >>> I will be grateful for any advice that can help me in troubleshooting this >>> problem. >>> >>> -- >>> Best Regards, >>> Sherin >>> _______________________________________________ >>> freebsd-net@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-net >>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >>> >>> >>> >>> >> >> > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 28 07:00:21 2010 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 D51871065670 for ; Thu, 28 Jan 2010 07:00:21 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id A1B278FC17 for ; Thu, 28 Jan 2010 07:00:21 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.3/8.14.3) id o0S70Qjh096395; Thu, 28 Jan 2010 07:00:26 GMT (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id fuxieqtccgfgu9j7nnhb35drme; Thu, 28 Jan 2010 07:00:26 +0000 (UTC) (envelope-from kientzle@freebsd.org) Message-ID: <4B613630.6090307@freebsd.org> Date: Wed, 27 Jan 2010 23:01:04 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.21) Gecko/20090601 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Brandon Falk References: <4B604B43.7010203@gamozo.org> In-Reply-To: <4B604B43.7010203@gamozo.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "'freebsd-hackers@freebsd.org'" Subject: Re: Leaks in libc? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 07:00:21 -0000 Brandon Falk wrote: > The simple program: > > int main() > { > puts("Apple cider"); > > Yields the following result in valgrind: > > ==4703== HEAP SUMMARY: > ==4703== in use at exit: 4,096 bytes in 1 blocks > ==4703== total heap usage: 1 allocs, 0 frees, 4,096 bytes allocated > ==4703== > ==4703== suppressed: 4,096 bytes in 1 blocks > > Any ideas why the standard libraries are leaking like this? Is it > perhaps a bug with valgrind, or maybe FreeBSD automatically cleans up so > they took the cleanup out of their libc? This particular leak is not at all a cause for concern. Many parts of the system libraries use malloc() to allocate working memory that they deliberately never free. In this particular case, you're seeing a 4096-byte buffer that the stdio system allocates the first time you use it. If you use valgrind a lot, you'll soon learn to just ignore this and several other standard "memory leaks." Generally, memory leaks are a cause for concern only when they accumulate over time. This usually happens only when you have code that leaks memory every time it is used (this particular example doesn't qualify since this buffer is only allocated once regardless of how many times you use the stdio calls) and that code is then used in a very long-running program (such as a window manager or web server). Cheers, Tim From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 28 13:40:39 2010 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 97400106566B; Thu, 28 Jan 2010 13:40:39 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 540418FC08; Thu, 28 Jan 2010 13:40:37 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA19216; Thu, 28 Jan 2010 15:40:26 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4B6193CA.1040702@icyb.net.ua> Date: Thu, 28 Jan 2010 15:40:26 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: sam References: <7f14551c1001231916s1c142b21j916ae406ea71bd97@mail.gmail.com> <4B60E157.9090200@ip6.com.au> <7f14551c1001271805w758c3e95s569365ad468ab9ae@mail.gmail.com> <4B60FE95.7040209@ip6.com.au> In-Reply-To: <4B60FE95.7040209@ip6.com.au> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, Sherin George , freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Strange network issue in freebsd 8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 13:40:39 -0000 on 28/01/2010 05:03 sam said the following: > that s why I 've been so in doubt using freebsd AMD64 release. Why again? -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 28 14:16:30 2010 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 6EFFB106568B for ; Thu, 28 Jan 2010 14:16:30 +0000 (UTC) (envelope-from cronfy@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 05D928FC1C for ; Thu, 28 Jan 2010 14:16:28 +0000 (UTC) Received: by fxm27 with SMTP id 27so232468fxm.3 for ; Thu, 28 Jan 2010 06:16:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=uGuvU6kChEQJBvXCafToSJhNpYQttCLlV3FsvgLmZ7k=; b=GqItYPgUfTa+Dbktphh4vZRvIpFgZ1gR7PxD1xvmO3NaHTGTz0fgzmEsdgPahVhfJU AKUDS4Re4w89d/Vuh/oN0Bf3yFwF7y1U7+4w8NCxcVblsm3pVWsysfkIp1vAp4u8qh6E IN9xldQbvr/NNvNS1AI5smzlyY4U+hFLsZqC8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=ehjxqcO6E/HiYpsa1GfWyRrGx9zsA5yKtIe6Z+lB+y0GvcHfm1IsXjpLnIpMEw0r2r 6cIwcMtrLgrPj/AFSoiHWsH/KG0UZFjvSweda7tzL7CjZfYtYKOoNSyjrSV867xDFlfS 98N6P1QzCCnkT5wQW1jTmfS0O2rsaHOczuX9I= MIME-Version: 1.0 Received: by 10.223.77.155 with SMTP id g27mr10677364fak.2.1264688188167; Thu, 28 Jan 2010 06:16:28 -0800 (PST) In-Reply-To: <20100125035448.GW71374@elvis.mu.org> References: <20100125035448.GW71374@elvis.mu.org> From: cronfy Date: Thu, 28 Jan 2010 17:16:08 +0300 Message-ID: To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: Unique process id (not pid) and accounting daemon X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 14:16:30 -0000 >> To ensure that process in the process tree and process in the >> accounting file are the same, I want to add unique process identifier >> (uint64_t) to 'proc' struct in sys/sys/proc.h and increment it for >> every process fork. I see it is possible to do this just before >> sx_sunlock() in fork1() in sys/kern/kern_fork.c. > Now that I know this, I would suggest simply recording the start > time as the serial number, then using pid+recorded_start_time as > your serial number. This may lead to duplicate ids: pid may be reused and time may be shifted to give exactly the same start_time as it was used with this pid earlier. Simple increment will work fine. Ok, as far as no one else commented at my idea, I assume it is not completely stupid and will try to implement this :) -- // cronfy From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 28 17:26:13 2010 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 6FA82106566C for ; Thu, 28 Jan 2010 17:26:13 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay008.isp.belgacom.be (mailrelay008.isp.belgacom.be [195.238.6.174]) by mx1.freebsd.org (Postfix) with ESMTP id 004638FC0C for ; Thu, 28 Jan 2010 17:26:12 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap0EAIZWYUtQyBlC/2dsb2JhbACBNNhghDwEhX4 Received: from 66.25-200-80.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([80.200.25.66]) by relay.skynet.be with ESMTP; 28 Jan 2010 18:26:11 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.3/8.14.3) with ESMTP id o0SHQAxF005219; Thu, 28 Jan 2010 18:26:11 +0100 (CET) (envelope-from tijl@coosemans.org) From: Tijl Coosemans To: freebsd-hackers@freebsd.org, Alexander Best Date: Thu, 28 Jan 2010 18:26:09 +0100 User-Agent: KMail/1.9.10 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201001281826.10472.tijl@coosemans.org> Cc: Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2010 17:26:13 -0000 On Tuesday 26 January 2010 20:17:23 Alexander Best wrote: > because of kern/140752 i looked through a discussion back in 2009 > (http://lists.freebsd.org/pipermail/freebsd-hackers/2009-March/027879.html) > concerning freebsd's hdd spin down procedure. right now > ATA_FLUSHCACHE is being used although the hitachi hdd specs > referenced in the pr say that this will not cause proper load/unload > and thus an emergency unload will occur which reduces the life > expectancy of hdds dramatically (20.000 shutdowns vs. 600.000 > shutdowns). unfortunately the discussion back then didn't come up > with any sort of decision/patch. > > attached you'll find a very simple patch which issues > ATA_STANDBY_IMMEDIATE instead of ATA_FLUSHCACHE during hdd spin down. > > could somebody with hdd knowledge comment on this? this matter seems > quite important since there may be a chance that the current spin > down mechanism in freebsd damages hdds! > Index: sys/dev/ata/ata-disk.c > =================================================================== > --- sys/dev/ata/ata-disk.c (revision 202848) > +++ sys/dev/ata/ata-disk.c (working copy) > @@ -191,8 +191,9 @@ > { > struct ata_device *atadev = device_get_softc(dev); > > - if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE) > - ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0); > + if (atadev->param.support.command2 & ATA_SUPPORT_STANDBY) This is the wrong bit. ATA_SUPPORT_STANDBY indicates whether a drive can be powered up straight into standby mode. The ATA_STANDBY_IMMEDIATE command is part of the standard power management feature set, so this line should be: if (atadev->param.support.command1 & ATA_SUPPORT_POWERMGT) > + ata_controlcmd(dev, ATA_STANDBY_IMMEDIATE, 0, 0, 0); > + > return 0; > } From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 29 13:53:06 2010 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 897A51065676 for ; Fri, 29 Jan 2010 13:53:06 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms173005pub.verizon.net (vms173005pub.verizon.net [206.46.173.5]) by mx1.freebsd.org (Postfix) with ESMTP id 6E4D28FC17 for ; Fri, 29 Jan 2010 13:53:06 +0000 (UTC) Received: from verizon.net ([unknown] [173.54.27.21]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0KX000GTDEFT2J3B@vms173005.mailsrvcs.net> for hackers@freebsd.org; Fri, 29 Jan 2010 06:52:44 -0600 (CST) Sender: root Message-id: <4B62A93D.A31AEE49@verizon.net> Date: Fri, 29 Jan 2010 04:24:13 -0500 From: Sergey Babkin X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.7-RELEASE i386) X-Accept-Language: en, ru MIME-version: 1.0 To: hackers@freebsd.org Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailman-Approved-At: Fri, 29 Jan 2010 13:55:36 +0000 Cc: Subject: book on parallel programming X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 13:53:06 -0000 Hi guys, I wrote a book, "The Practice of Parallel Programming". However the publishing part didn't work out, so I've put it on the web: SourceForge page: https://sourceforge.net/projects/tpopp/ read online: http://members.verizon.net/~babkin/tpopp/ BTW, looks like DamonNews is dead? All there is left is the emblem and some strange blog. All the rest is gone, including the archives of old issues. -SB From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 29 14:25:19 2010 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 5669D1065670 for ; Fri, 29 Jan 2010 14:25:19 +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 11A148FC18 for ; Fri, 29 Jan 2010 14:25:18 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Narme-0003Yx-8m for freebsd-hackers@freebsd.org; Fri, 29 Jan 2010 15:25:16 +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, 29 Jan 2010 15:25:16 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Jan 2010 15:25:16 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Fri, 29 Jan 2010 15:25:07 +0100 Lines: 26 Message-ID: References: <4B62A93D.A31AEE49@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.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.1.5) Gecko/20100118 Thunderbird/3.0 In-Reply-To: <4B62A93D.A31AEE49@verizon.net> Sender: news Subject: Re: book on parallel programming X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 14:25:19 -0000 On 01/29/10 10:24, Sergey Babkin wrote: > Hi guys, > > I wrote a book, "The Practice of Parallel Programming". > However the publishing part didn't work out, so I've put > it on the web: Sorry for the publishing part, but thanks for writing something like this! Have you considered some kind of online publishing? E.g. Amazon offers on-line publishing for Kindle (the authors get a share of the profits, etc.) > SourceForge page: https://sourceforge.net/projects/tpopp/ > read online: http://members.verizon.net/~babkin/tpopp/ > > BTW, looks like DamonNews is dead? All there is left is the > emblem and some strange blog. All the rest is gone, including > the archives of old issues. > > -SB > _______________________________________________ > 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 Jan 29 22:38:54 2010 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 AAAC7106566C for ; Fri, 29 Jan 2010 22:38:54 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 458738FC18 for ; Fri, 29 Jan 2010 22:38:53 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.3/8.14.3) with ESMTP id o0TMcrOM047233; Fri, 29 Jan 2010 15:38:53 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.3/8.14.3/Submit) with ESMTP id o0TMcq5b047230; Fri, 29 Jan 2010 15:38:53 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 29 Jan 2010 15:38:52 -0700 (MST) From: Warren Block To: Alexander Best In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (wonkity.com [127.0.0.1]); Fri, 29 Jan 2010 15:38:53 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 22:38:54 -0000 On Wed, 27 Jan 2010, Alexander Best wrote: > i believe the sound you hear is due to the emergency unload sequence. i'm not > 100% sure, but i think after applying the patch the sound is gone. i recently > replaced my old IDE hdd (which made a very loud "click!" during shutdown) with > a new SATA hdd. the new one is very quiet and so it's not that easy to > recognise any changes in the spin down procedure. > > would be very nice if you could try the patch on one of the notebooks you're > referring to in order to see if the patch makes a difference. Based on followups to this thread, here's the modified patch I've tested: --- sys/dev/ata/ata-disk.c.orig 2010-01-28 10:47:57.000000000 -0700 +++ sys/dev/ata/ata-disk.c 2010-01-28 11:49:32.000000000 -0700 @@ -191,6 +191,10 @@ { struct ata_device *atadev = device_get_softc(dev); + if (atadev->param.support.command2 & ATA_SUPPORT_POWERMGT) + ata_controlcmd(dev, ATA_STANDBY_IMMEDIATE, 0, 0, 0); + return 0; + if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE) ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0); return 0; This uses the POWERMGT bit and adds it before the existing code. On a desktop system with an 80G drive, it's hard to tell if there's an audible difference. On an Acer notebook with a WD drive, it does change the sound. Without the patch, the drive shutdown sounds like power has been pulled, with a GLINK! head park followed by a decreasing-pitch spindown whir. With the patch, there's a quieter glink with nearly no spindown whir. Because this is subjective, I recorded the shutdown sounds with a microphone underneath the notebook hard drive: http://wonkity.com/~wblock/sounds/unpatchedglink.wav http://wonkity.com/~wblock/sounds/patchedglink.wav Can't speak to the safety of this, but it definitely sounds better. -Warren Block * Rapid City, South Dakota USA From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 29 22:58:32 2010 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 F4082106566C; Fri, 29 Jan 2010 22:58:31 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 52DD88FC19; Fri, 29 Jan 2010 22:58:30 +0000 (UTC) Received: by fxm27 with SMTP id 27so819352fxm.3 for ; Fri, 29 Jan 2010 14:58:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:x-enigmail-version:content-type :content-transfer-encoding; bh=2k8+4l3Yg/0zvW1bOdz0HOrERSM3U5XWnbUKlamQvPI=; b=huahRTR2a/+2G/Kx9uG1eohPGwICYPai0Ay3BDSGG4RYNdInL4xuwmSKpAOY81I7sE X3Zp8qGkzsPD0pT5AoPz2v0XMI2V5dLGDx1x/4XqWRgWaXKpOpgg45MJcFdKuWkZzt4O ToXbqOT/qq7Yc+C1fZf5LBXDqYPykS1u419Wo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; b=EZPbPuxpe6DKKyEH+DhdVj0ReXSu38dGBl+sC0jyJNp9QW1kgPMFrqzFh+sMoAEe11 okimhtvH7vtto9EHwl5cB+wzXrXQudCWMgMw5OqP5XmfESUHejGngceK9iUzE5Vte7/M 2dwpv2i26raPQ2tilvYD9FLcymXlGYZq4M3gg= Received: by 10.102.200.17 with SMTP id x17mr657326muf.125.1264805909944; Fri, 29 Jan 2010 14:58:29 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id y37sm1759033mug.8.2010.01.29.14.58.28 (version=SSLv3 cipher=RC4-MD5); Fri, 29 Jan 2010 14:58:29 -0800 (PST) Sender: Alexander Motin Message-ID: <4B636812.8060403@FreeBSD.org> Date: Sat, 30 Jan 2010 00:58:26 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: freebsd-geom@freebsd.org, freebsd-hackers@freebsd.org, FreeBSD-Current X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: Subject: Deadlock between GEOM and devfs device destroy and process exit. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 22:58:32 -0000 Hi. Experimenting with SATA hot-plug I've found quite repeatable deadlock case. Problem observed when several SATA devices, opened via devfs, disappear at exactly same time. In my case, at time of unplugging SATA Port Multiplier with several disks beyond it. All I have to do is to run several `dd if=/dev/adaX of=/dev/null bs=1m &` commands and unplug multiplier. That causes predictable I/O errors and devices destruction. But with high probability several dd processes getting stuck in kernel. I've discovered such pieces of problem: - CAM receives disconnect event and starts device destruction. But as device is still opened, it can't do it immediately. - dd receives I/O error and exits. - exit1() call closes all descriptors, including adaX device. It triggers final device destruction, by sending event to geom_dev. adaclose(4571fa00,4,40c16576,76,0,...) at 0x4049c521 g_disk_access(457e2200,ffffffff,0,0,0,...) at 0x4080b9a4 g_access(45643d80,ffffffff,0,0,2000,...) at 0x40810ccb g_dev_close(45766500,1,2000,4569fd80,4569fd80,...) at 0x4080a425 devfs_close(7b604aa8,80000,457f8000,80000,7b604acc,...) at 0x407f2762 VOP_CLOSE_APV(40d03180,7b604aa8,40c2e681,128,0,...) at 0x40b6da55 vn_close(457f8000,1,45624300,4569fd80,451271e0,...) at 0x40912750 vn_closefile(4566da48,4569fd80,4566da48,0,7b604b58,...) at 0x40912854 devfs_close_f(4566da48,4569fd80,3,0,4566da48,...) at 0x407f235b _fdrop(4566da48,4569fd80,7b604b8c,408b5cec,0,4569fe24,40eb23a8,40d10460,40c1a8bb,4560672c,721,40c1a8b2,7b604bb4,40878220,4560672c,8,40c1a8b2,721) at 0x40836da3 closef(4566da48,4569fd80,721,71e,4569fe24,...) at 0x40838ad0 fdfree(4569fd80,0,40c1b1a9,107,7b604c80,...) at 0x408394da exit1(4569fd80,100,7b604d2c,40b565c0,4569fd80,...) at 0x40844423 sys_exit(4569fd80,7b604cf8,40c59d34,40c26be4,4569d2a8,...) at 0x408450fd syscall(7b604d38) at 0x40b565c0 - GEOM event thread tries to destroy /dev/adaX device (which should be already free at this moment), but for some reason freezes, waiting for device to be freed: 0 2 0 0 -8 0 0 8 devdrn DL ?? 0:02.89 [g_event] - as GEOM event is still not handled, exit1() waits for it: kdb_backtrace(40c16bc4,0,40c16ab1,56,4540e640,...) at 0x408a2909 g_waitidle(4569fd80,0,40c1b1a9,107,7b604c80,...) at 0x4080cd1f exit1(4569fd80,100,7b604d2c,40b565c0,4569fd80,...) at 0x40844431 sys_exit(4569fd80,7b604cf8,40c59d34,40c26be4,4569d2a8,...) at 0x408450fd syscall(7b604d38) at 0x40b565c0 - system stationary. GEOM frozen. No way to get out of this, except pushing reset. 0 1065 1055 0 44 0 5344 3040 g_wait DE 0 0:00.43 dd if=/dev/ada1 of=/dev/null bs=1m 0 1066 1055 0 44 0 5344 3040 GEOM t DE 0 0:00.07 dd if=/dev/ada2 of=/dev/null bs=1m So, does anybody have good idea why destroy_dev() can't complete? -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 29 23:11:15 2010 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 904FD106566B; Fri, 29 Jan 2010 23:11:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 1F0FA8FC0C; Fri, 29 Jan 2010 23:11:14 +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 o0TNBAIS088873 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Jan 2010 01:11:10 +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.3/8.14.3) with ESMTP id o0TNBA01055788; Sat, 30 Jan 2010 01:11:10 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0TNBAGH055787; Sat, 30 Jan 2010 01:11:10 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Jan 2010 01:11:10 +0200 From: Kostik Belousov To: Alexander Motin Message-ID: <20100129231110.GS3877@deviant.kiev.zoral.com.ua> References: <4B636812.8060403@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zhl+qcI0cpCDfCbW" Content-Disposition: inline In-Reply-To: <4B636812.8060403@FreeBSD.org> 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=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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-Current , freebsd-geom@freebsd.org Subject: Re: Deadlock between GEOM and devfs device destroy and process exit. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 23:11:15 -0000 --zhl+qcI0cpCDfCbW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 30, 2010 at 12:58:26AM +0200, Alexander Motin wrote: > Hi. >=20 > Experimenting with SATA hot-plug I've found quite repeatable deadlock > case. Problem observed when several SATA devices, opened via devfs, > disappear at exactly same time. In my case, at time of unplugging SATA > Port Multiplier with several disks beyond it. All I have to do is to run > several `dd if=3D/dev/adaX of=3D/dev/null bs=3D1m &` commands and unplug > multiplier. That causes predictable I/O errors and devices destruction. > But with high probability several dd processes getting stuck in kernel. >=20 > I've discovered such pieces of problem: > - CAM receives disconnect event and starts device destruction. But as > device is still opened, it can't do it immediately. > - dd receives I/O error and exits. > - exit1() call closes all descriptors, including adaX device. It > triggers final device destruction, by sending event to geom_dev. >=20 > adaclose(4571fa00,4,40c16576,76,0,...) at 0x4049c521 > g_disk_access(457e2200,ffffffff,0,0,0,...) at 0x4080b9a4 > g_access(45643d80,ffffffff,0,0,2000,...) at 0x40810ccb > g_dev_close(45766500,1,2000,4569fd80,4569fd80,...) at 0x4080a425 > devfs_close(7b604aa8,80000,457f8000,80000,7b604acc,...) at 0x407f2762 > VOP_CLOSE_APV(40d03180,7b604aa8,40c2e681,128,0,...) at 0x40b6da55 > vn_close(457f8000,1,45624300,4569fd80,451271e0,...) at 0x40912750 > vn_closefile(4566da48,4569fd80,4566da48,0,7b604b58,...) at 0x40912854 > devfs_close_f(4566da48,4569fd80,3,0,4566da48,...) at 0x407f235b > _fdrop(4566da48,4569fd80,7b604b8c,408b5cec,0,4569fe24,40eb23a8,40d10460,4= 0c1a8bb,4560672c,721,40c1a8b2,7b604bb4,40878220,4560672c,8,40c1a8b2,721) > at 0x40836da3 > closef(4566da48,4569fd80,721,71e,4569fe24,...) at 0x40838ad0 > fdfree(4569fd80,0,40c1b1a9,107,7b604c80,...) at 0x408394da > exit1(4569fd80,100,7b604d2c,40b565c0,4569fd80,...) at 0x40844423 > sys_exit(4569fd80,7b604cf8,40c59d34,40c26be4,4569d2a8,...) at 0x408450fd > syscall(7b604d38) at 0x40b565c0 >=20 > - GEOM event thread tries to destroy /dev/adaX device (which should be > already free at this moment), but for some reason freezes, waiting for > device to be freed: >=20 > 0 2 0 0 -8 0 0 8 devdrn DL ?? 0:02.89 > [g_event] >=20 > - as GEOM event is still not handled, exit1() waits for it: >=20 > kdb_backtrace(40c16bc4,0,40c16ab1,56,4540e640,...) at 0x408a2909 > g_waitidle(4569fd80,0,40c1b1a9,107,7b604c80,...) at 0x4080cd1f > exit1(4569fd80,100,7b604d2c,40b565c0,4569fd80,...) at 0x40844431 > sys_exit(4569fd80,7b604cf8,40c59d34,40c26be4,4569d2a8,...) at 0x408450fd > syscall(7b604d38) at 0x40b565c0 >=20 > - system stationary. GEOM frozen. No way to get out of this, except > pushing reset. >=20 > 0 1065 1055 0 44 0 5344 3040 g_wait DE 0 0:00.43 dd > if=3D/dev/ada1 of=3D/dev/null bs=3D1m > 0 1066 1055 0 44 0 5344 3040 GEOM t DE 0 0:00.07 dd > if=3D/dev/ada2 of=3D/dev/null bs=3D1m >=20 >=20 > So, does anybody have good idea why destroy_dev() can't complete? The devdrn state means that thread performing the device destruction, i.e. the thread called destroy_dev(), is waiting for threads to leave the cdevsw d_* methods. The thread that notified the destruction thread did that from d_close() method. This resulted in the deadlock. I introduced destroy_dev_sched(9) KPI to handle this and similar issues. Note that race-free use of destroy_dev_sched(9) is quite hard. --zhl+qcI0cpCDfCbW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktjaw0ACgkQC3+MBN1Mb4g4CgCg5qoXeNLMYgbyuZhwAZYQtX/g F4UAoOF3rYGBwcwwsat2EykHAGqEog0e =Rkef -----END PGP SIGNATURE----- --zhl+qcI0cpCDfCbW-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 29 23:23:32 2010 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 32C39106568D; Fri, 29 Jan 2010 23:23:32 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 63F688FC13; Fri, 29 Jan 2010 23:23:31 +0000 (UTC) Received: by fxm27 with SMTP id 27so832917fxm.3 for ; Fri, 29 Jan 2010 15:23:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=LtEFmPGthK3fbozT5A2Sd4pzqLPAYGeXNOpggIFXl2I=; b=MUY3bZha8/l9HHbORTWYd2BY5netrT3cp8mlnJ9DzXa1zrCLS/WZbtvNxmnzgM/amI 1in7h8GkAMobFPtHDPB2LkuhcKcuM8ilgbQKofB3C00kSkt22oAbJMCPmSyG3D6BcbE/ G1Mc2QvKtz8Q9ESfQQipBlGwkWnV5aTKfnrw4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=JtZBYRduj2DfrG22ICVJ82hPr/6ebOuzGIS8PkRtaxQP5ZHAvlTD4UOcpH0KDajazt SeCL+3+IEzbxXtyH2Ew2riLWSE2PLmKpNtKEoJBJyDJUne65Bu5ldIRsRFBoFPoSjl19 gtTVO1gQtzy4W4ODEO0FI7FtGH442efU23ip0= Received: by 10.102.235.36 with SMTP id i36mr747418muh.56.1264807410244; Fri, 29 Jan 2010 15:23:30 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id j9sm11120931mue.6.2010.01.29.15.23.29 (version=SSLv3 cipher=RC4-MD5); Fri, 29 Jan 2010 15:23:29 -0800 (PST) Sender: Alexander Motin Message-ID: <4B636DEA.2060901@FreeBSD.org> Date: Sat, 30 Jan 2010 01:23:22 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Kostik Belousov References: <4B636812.8060403@FreeBSD.org> <20100129231110.GS3877@deviant.kiev.zoral.com.ua> In-Reply-To: <20100129231110.GS3877@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current , freebsd-geom@freebsd.org Subject: Re: Deadlock between GEOM and devfs device destroy and process exit. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 23:23:32 -0000 Kostik Belousov wrote: > On Sat, Jan 30, 2010 at 12:58:26AM +0200, Alexander Motin wrote: >> Hi. >> >> Experimenting with SATA hot-plug I've found quite repeatable deadlock >> case. Problem observed when several SATA devices, opened via devfs, >> disappear at exactly same time. In my case, at time of unplugging SATA >> Port Multiplier with several disks beyond it. All I have to do is to run >> several `dd if=/dev/adaX of=/dev/null bs=1m &` commands and unplug >> multiplier. That causes predictable I/O errors and devices destruction. >> But with high probability several dd processes getting stuck in kernel. >> >> I've discovered such pieces of problem: >> - CAM receives disconnect event and starts device destruction. But as >> device is still opened, it can't do it immediately. >> - dd receives I/O error and exits. >> - exit1() call closes all descriptors, including adaX device. It >> triggers final device destruction, by sending event to geom_dev. >> >> adaclose(4571fa00,4,40c16576,76,0,...) at 0x4049c521 >> g_disk_access(457e2200,ffffffff,0,0,0,...) at 0x4080b9a4 >> g_access(45643d80,ffffffff,0,0,2000,...) at 0x40810ccb >> g_dev_close(45766500,1,2000,4569fd80,4569fd80,...) at 0x4080a425 >> devfs_close(7b604aa8,80000,457f8000,80000,7b604acc,...) at 0x407f2762 >> VOP_CLOSE_APV(40d03180,7b604aa8,40c2e681,128,0,...) at 0x40b6da55 >> vn_close(457f8000,1,45624300,4569fd80,451271e0,...) at 0x40912750 >> vn_closefile(4566da48,4569fd80,4566da48,0,7b604b58,...) at 0x40912854 >> devfs_close_f(4566da48,4569fd80,3,0,4566da48,...) at 0x407f235b >> _fdrop(4566da48,4569fd80,7b604b8c,408b5cec,0,4569fe24,40eb23a8,40d10460,40c1a8bb,4560672c,721,40c1a8b2,7b604bb4,40878220,4560672c,8,40c1a8b2,721) >> at 0x40836da3 >> closef(4566da48,4569fd80,721,71e,4569fe24,...) at 0x40838ad0 >> fdfree(4569fd80,0,40c1b1a9,107,7b604c80,...) at 0x408394da >> exit1(4569fd80,100,7b604d2c,40b565c0,4569fd80,...) at 0x40844423 >> sys_exit(4569fd80,7b604cf8,40c59d34,40c26be4,4569d2a8,...) at 0x408450fd >> syscall(7b604d38) at 0x40b565c0 >> >> - GEOM event thread tries to destroy /dev/adaX device (which should be >> already free at this moment), but for some reason freezes, waiting for >> device to be freed: >> >> 0 2 0 0 -8 0 0 8 devdrn DL ?? 0:02.89 >> [g_event] >> >> - as GEOM event is still not handled, exit1() waits for it: >> >> kdb_backtrace(40c16bc4,0,40c16ab1,56,4540e640,...) at 0x408a2909 >> g_waitidle(4569fd80,0,40c1b1a9,107,7b604c80,...) at 0x4080cd1f >> exit1(4569fd80,100,7b604d2c,40b565c0,4569fd80,...) at 0x40844431 >> sys_exit(4569fd80,7b604cf8,40c59d34,40c26be4,4569d2a8,...) at 0x408450fd >> syscall(7b604d38) at 0x40b565c0 >> >> - system stationary. GEOM frozen. No way to get out of this, except >> pushing reset. >> >> 0 1065 1055 0 44 0 5344 3040 g_wait DE 0 0:00.43 dd >> if=/dev/ada1 of=/dev/null bs=1m >> 0 1066 1055 0 44 0 5344 3040 GEOM t DE 0 0:00.07 dd >> if=/dev/ada2 of=/dev/null bs=1m >> >> >> So, does anybody have good idea why destroy_dev() can't complete? > > The devdrn state means that thread performing the device destruction, > i.e. the thread called destroy_dev(), is waiting for threads to leave > the cdevsw d_* methods. The thread that notified the destruction thread > did that from d_close() method. This resulted in the deadlock. d_close() doesn't call destroy_dev() directly. It schedules different thread to do it. destroy_dev() should run after d_close() already complete. Though I haven't checked how it is locked. > I introduced destroy_dev_sched(9) KPI to handle this and similar issues. > Note that race-free use of destroy_dev_sched(9) is quite hard. I think it should work without it here. Shouldn't it? -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 29 23:32:39 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 800681065672; Fri, 29 Jan 2010 23:32:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-hackers@freebsd.org Date: Fri, 29 Jan 2010 18:32:05 -0500 User-Agent: KMail/1.6.2 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_NA3YLEXEScty5nJ" Message-Id: <201001291832.29086.jkim@FreeBSD.org> Cc: Alexander Best Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 23:32:39 -0000 --Boundary-00=_NA3YLEXEScty5nJ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 29 January 2010 05:38 pm, Warren Block wrote: > On Wed, 27 Jan 2010, Alexander Best wrote: > > i believe the sound you hear is due to the emergency unload > > sequence. i'm not 100% sure, but i think after applying the patch > > the sound is gone. i recently replaced my old IDE hdd (which made > > a very loud "click!" during shutdown) with a new SATA hdd. the > > new one is very quiet and so it's not that easy to recognise any > > changes in the spin down procedure. > > > > would be very nice if you could try the patch on one of the > > notebooks you're referring to in order to see if the patch makes > > a difference. > > Based on followups to this thread, here's the modified patch I've > tested: > > --- sys/dev/ata/ata-disk.c.orig 2010-01-28 10:47:57.000000000 -0700 > +++ sys/dev/ata/ata-disk.c 2010-01-28 11:49:32.000000000 -0700 > @@ -191,6 +191,10 @@ > { > struct ata_device *atadev = device_get_softc(dev); > > + if (atadev->param.support.command2 & ATA_SUPPORT_POWERMGT) > + ata_controlcmd(dev, ATA_STANDBY_IMMEDIATE, 0, 0, 0); > + return 0; > + > if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE) > ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0); > return 0; I am not 100% sure but I think it should be something like the attached patch. Jung-uk Kim --Boundary-00=_NA3YLEXEScty5nJ Content-Type: text/plain; charset="iso-8859-1"; name="ata-disk.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ata-disk.diff" --- sys/dev/ata/ata-disk.c 2009-12-14 17:02:42.000000000 -0500 +++ sys/dev/ata/ata-disk.c 2010-01-29 17:58:12.000000000 -0500 @@ -187,16 +187,6 @@ ad_detach(device_t dev) } static int -ad_shutdown(device_t dev) -{ - struct ata_device *atadev = device_get_softc(dev); - - if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE) - ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0); - return 0; -} - -static int ad_reinit(device_t dev) { struct ata_channel *ch = device_get_softc(device_get_parent(dev)); @@ -241,6 +231,16 @@ ad_spindown(void *priv) ata_queue_request(request); } +static int +ad_shutdown(device_t dev) +{ + struct ata_device *atadev = device_get_softc(dev); + + if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE) + ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0); + ad_spindown(dev); + return 0; +} static void ad_strategy(struct bio *bp) --Boundary-00=_NA3YLEXEScty5nJ-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 30 00:01:09 2010 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 EE4991065679 for ; Sat, 30 Jan 2010 00:01:09 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id B401A8FC13 for ; Sat, 30 Jan 2010 00:01:09 +0000 (UTC) Received: from toad.stack.nl (toad.stack.nl [IPv6:2001:610:1108:5010::135]) by mx1.stack.nl (Postfix) with ESMTP id 92A6B1DD684; Sat, 30 Jan 2010 01:01:08 +0100 (CET) Received: by toad.stack.nl (Postfix, from userid 1677) id 86D6873F9D; Sat, 30 Jan 2010 01:01:08 +0100 (CET) Date: Sat, 30 Jan 2010 01:01:08 +0100 From: Jilles Tjoelker To: cronfy Message-ID: <20100130000108.GB95021@stack.nl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: Unique process id (not pid) and accounting daemon X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 00:01:10 -0000 On Mon, Jan 25, 2010 at 02:33:35AM +0300, cronfy wrote: > I am trying to create an accounting daemon that would be more precise > than usual BSD system accounting. It should read the whole process > tree from time to time (say, every 10 seconds) and log changes in > usage of CPU, I/O operations and memory per process. After daemon > notices process exit, it should read /var/account/acct to get a last > portion of accounting data and make a last entry for the process. Also > daemon should read /var/account/acct to find information about > processes that had been running between taking process tree snapshots. > There is a problem: it is not always possible to link a process in a > process tree against matching process in an accounting file. Only > command name, user/group id and start time will match, but: > * start time may change (i. e. after ntpdate); > * command name saved in /var/account/acct is 15 characters max > (AC_COMM_LEN in sys/sys/acct.h), while command name in the process > tree is 19 characters max (MAXCOMLEN in sys/sys/param.h). > To ensure that process in the process tree and process in the > accounting file are the same, I want to add unique process identifier > (uint64_t) to 'proc' struct in sys/sys/proc.h and increment it for > every process fork. I see it is possible to do this just before > sx_sunlock() in fork1() in sys/kern/kern_fork.c. I'll have to add > saving of this identifier in kern_acct.c, of course. > This way I will be extremely easy to remember a process in the process > tree and find a matching one in the accounting file after it finishes. > Am I looking in a right direction or should I try some other way? > Thanks in advance. Have you looked at audit(4)? -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 30 01:29:19 2010 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 7B15B106566B for ; Sat, 30 Jan 2010 01:29:19 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 114A88FC26 for ; Sat, 30 Jan 2010 01:29:18 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.3/8.14.3) with ESMTP id o0U1TIvK047789; Fri, 29 Jan 2010 18:29:18 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.3/8.14.3/Submit) with ESMTP id o0U1THtQ047786; Fri, 29 Jan 2010 18:29:17 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 29 Jan 2010 18:29:17 -0700 (MST) From: Warren Block To: Jung-uk Kim In-Reply-To: <201001291832.29086.jkim@FreeBSD.org> Message-ID: References: <201001291832.29086.jkim@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-902635197-664214867-1264814958=:47497" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (wonkity.com [127.0.0.1]); Fri, 29 Jan 2010 18:29:18 -0700 (MST) Cc: freebsd-hackers@FreeBSD.org, Alexander Best Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 01:29:19 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---902635197-664214867-1264814958=:47497 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII On Fri, 29 Jan 2010, Jung-uk Kim wrote: > On Friday 29 January 2010 05:38 pm, Warren Block wrote: > > I am not 100% sure but I think it should be something like the > attached patch. Yes, I had the two commands backwards. So let me try to summarize: ad_shutdown uses ATA_FLUSHCACHE writes out any cached data, but does not park the heads. At powerdown, the heads do an emergency park, which is louder than a normal park and possibly damaging. Adding ATA_STANDBY_IMMEDIATE after the ATA_FLUSHCACHE will park the heads more quietly and possibly more safely. Should do no harm, at least. ad_spindown looks like it's meant to spin the disk down for sleep operations, and does some higher-level things. I suspect flushcache and standby should be as close together as possible to avoid the chance of anything getting back into the cache or spinning the disk back up. Anyway, testing this use of ad_spindown inside ad_shutdown brought back the GLINK on shutdown. A fixed version of the earlier patch that does flushcache and then standbyimmediate is attached. -Warren Block * Rapid City, South Dakota USA ---902635197-664214867-1264814958=:47497 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=patch-ata-disk.c Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=patch-ata-disk.c LS0tIHN5cy9kZXYvYXRhL2F0YS1kaXNrLmMub3JpZwkyMDEwLTAxLTI5IDE4 OjE1OjQ5LjAwMDAwMDAwMCAtMDcwMA0KKysrIHN5cy9kZXYvYXRhL2F0YS1k aXNrLmMJMjAxMC0wMS0yOSAxODoxNjo0Ny4wMDAwMDAwMDAgLTA3MDANCkBA IC0xOTMsNyArMTkzLDEwIEBADQogDQogICAgIGlmIChhdGFkZXYtPnBhcmFt LnN1cHBvcnQuY29tbWFuZDIgJiBBVEFfU1VQUE9SVF9GTFVTSENBQ0hFKQ0K IAlhdGFfY29udHJvbGNtZChkZXYsIEFUQV9GTFVTSENBQ0hFLCAwLCAwLCAw KTsNCi0gICAgcmV0dXJuIDA7DQorDQorICAgIGlmIChhdGFkZXYtPnBhcmFt LnN1cHBvcnQuY29tbWFuZDIgJiBBVEFfU1VQUE9SVF9QT1dFUk1HVCkNCisJ YXRhX2NvbnRyb2xjbWQoZGV2LCBBVEFfU1RBTkRCWV9JTU1FRElBVEUsIDAs IDAsIDApOw0KKyAgICByZXR1cm4gMDsgICAgDQogfQ0KIA0KIHN0YXRpYyBp bnQNCg== ---902635197-664214867-1264814958=:47497-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 30 11:28:02 2010 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 E7846106566C; Sat, 30 Jan 2010 11:28:02 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id 3A4E08FC14; Sat, 30 Jan 2010 11:28:00 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id B76FE45685; Sat, 30 Jan 2010 12:27:58 +0100 (CET) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 1197145683; Sat, 30 Jan 2010 12:27:52 +0100 (CET) Date: Sat, 30 Jan 2010 12:27:49 +0100 From: Pawel Jakub Dawidek To: Alexander Motin Message-ID: <20100130112749.GA1660@garage.freebsd.pl> References: <4B636812.8060403@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <4B636812.8060403@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-hackers@freebsd.org, FreeBSD-Current , kib@FreeBSD.org, freebsd-geom@freebsd.org Subject: Re: Deadlock between GEOM and devfs device destroy and process exit. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 11:28:03 -0000 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 30, 2010 at 12:58:26AM +0200, Alexander Motin wrote: > Hi. >=20 > Experimenting with SATA hot-plug I've found quite repeatable deadlock > case. Problem observed when several SATA devices, opened via devfs, > disappear at exactly same time. In my case, at time of unplugging SATA > Port Multiplier with several disks beyond it. All I have to do is to run > several `dd if=3D/dev/adaX of=3D/dev/null bs=3D1m &` commands and unplug > multiplier. That causes predictable I/O errors and devices destruction. > But with high probability several dd processes getting stuck in kernel. [...] I observed the same thing yesterday while stress-testing HAST: 3659 2504 3659 0 DE+ GEOM top 0x8079a348 dd 3658 2102 2102 0 DE+ GEOM top 0x8079a348 hastd 2 0 0 0 DL devdrn 0x85b1bc68 [g_event] Both dd(1) and hastd(8) wait for the GEOM topology lock in the exit path, which is already held by the g_event thread. Interesting backtraces: db> bt 2 [...] _sleep(85b1bc68,8079aab8,4c,80711ab3,64,...) at _sleep+0x339 destroy_devl(5,0,80711c53,85b1bcb0,804945cd,...) at destroy_devl+0x20f destroy_dev(86a10a00,8070ea93,86a09800,860888e0,0,...) at destroy_dev+0x2f g_dev_orphan(86a09800,8070f424,871038d8,90,6,...) at g_dev_orphan+0x6d g_run_events(8079a378,0,4c,8070c221,64,...) at g_run_events+0x1c0 g_event_procbody(0,85b1bd38,80713228,343,85d0b7f8,...) at g_event_procbody+= 0x8a [...] db> bt 3658 [...] sleepq_wait(8079a348,0,8070f822,3,0,...) at sleepq_wait+0x63 _sx_xlock_hard(8079a348,86974240,0,8070ea66,c8,...) at _sx_xlock_hard+0x496 _sx_xlock(8079a348,0,8070ea66,c8,2000,...) at _sx_xlock+0xc0 g_dev_close(85f8ee00,4003,2000,86974240,86974240,...) at g_dev_close+0xbd devfs_close(dc49eaac,80745707,80000,80000,868be984,...) at devfs_close+0x2b2 VOP_CLOSE_APV(80753ac0,dc49eaac,80726500,128,2,...) at VOP_CLOSE_APV+0xc5 vn_close(868be984,4003,85fd5500,86974240,0,...) at vn_close+0x190 vn_closefile(86a20968,86974240,86a20968,0,dc49eb5c,...) at vn_closefile+0xe4 devfs_close_f(86a20968,86974240,0,0,86a20968,...) at devfs_close_f+0x2b _fdrop(86a20968,86974240,14,80719d1a,0,dc49eb98,1,86975000,8635c22c,8635c22= c,721,8071264b,dc49ebb8,804f87d0,8635c22c,8,8071264b,721) at _fdrop+0x43 closef(86a20968,86974240,721,71e,869742e4,...) at closef+0x290 fdfree(86974240,0,80712fdd,107,864c4330,...) at fdfree+0x3ea exit1(86974240,0,dc49ed2c,806d830a,86974240,...) at exit1+0x513 sys_exit(86974240,dc49ecf8,86974240,dc49ed2c,202,...) at sys_exit+0x1d [...] db> bt 3659 [...] sleepq_wait(8079a348,0,8070f822,3,0,...) at sleepq_wait+0x63 _sx_xlock_hard(8079a348,863e06c0,0,8070ea66,c8,...) at _sx_xlock_hard+0x496 _sx_xlock(8079a348,0,8070ea66,c8,2000,...) at _sx_xlock+0xc0 g_dev_close(86a10a00,3,2000,863e06c0,863e06c0,...) at g_dev_close+0xbd devfs_close(dc4f6aac,80745707,80000,80000,86aa6c3c,...) at devfs_close+0x2b2 VOP_CLOSE_APV(80753ac0,dc4f6aac,80726500,128,2,...) at VOP_CLOSE_APV+0xc5 vn_close(86aa6c3c,3,870d4080,863e06c0,80cbac08,...) at vn_close+0x190 vn_closefile(871028f8,863e06c0,871028f8,0,dc4f6b5c,...) at vn_closefile+0xe4 devfs_close_f(871028f8,863e06c0,0,0,871028f8,...) at devfs_close_f+0x2b _fdrop(871028f8,863e06c0,8071809c,40e,0,805354ab,8071809c,8071df19,8635d42c= ,8635d42c,721,8071264b,dc4f6bb8,804f87d0,8635d42c,8,8071264b,721) at _fdrop= +0x43 closef(871028f8,863e06c0,721,71e,863e0764,...) at closef+0x290 fdfree(863e06c0,0,80712fdd,107,86153088,...) at fdfree+0x3ea exit1(863e06c0,100,dc4f6d2c,806d830a,863e06c0,...) at exit1+0x513 sys_exit(863e06c0,dc4f6cf8,863e06c0,dc4f6d2c,202,...) at sys_exit+0x1d [...] db> show lock 0x8079a348 class: sx name: GEOM topology state: XLOCK: 0x85d0d000 (tid 100008, pid 2, "g_event") waiters: exclusive --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFLZBe1ForvXbEpPzQRArJDAKCIvEtVTvwLwDjFJFcK1wxfJjq/NACeIR/M lEoKsO8kDLty3lh8oeG/aHg= =/n19 -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 30 11:45:01 2010 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 A4FC5106566B; Sat, 30 Jan 2010 11:45:01 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id DE63A8FC16; Sat, 30 Jan 2010 11:45:00 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 0B20145E9C; Sat, 30 Jan 2010 12:44:59 +0100 (CET) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id D5DA145CAC; Sat, 30 Jan 2010 12:44:53 +0100 (CET) Date: Sat, 30 Jan 2010 12:44:51 +0100 From: Pawel Jakub Dawidek To: Alexander Motin Message-ID: <20100130114451.GB1660@garage.freebsd.pl> References: <4B636812.8060403@FreeBSD.org> <20100130112749.GA1660@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EuxKj2iCbKjpUGkD" Content-Disposition: inline In-Reply-To: <20100130112749.GA1660@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-hackers@freebsd.org, FreeBSD-Current , kib@FreeBSD.org, freebsd-geom@freebsd.org Subject: Re: Deadlock between GEOM and devfs device destroy and process exit. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 11:45:01 -0000 --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 30, 2010 at 12:27:49PM +0100, Pawel Jakub Dawidek wrote: > On Sat, Jan 30, 2010 at 12:58:26AM +0200, Alexander Motin wrote: > > Hi. > >=20 > > Experimenting with SATA hot-plug I've found quite repeatable deadlock > > case. Problem observed when several SATA devices, opened via devfs, > > disappear at exactly same time. In my case, at time of unplugging SATA > > Port Multiplier with several disks beyond it. All I have to do is to run > > several `dd if=3D/dev/adaX of=3D/dev/null bs=3D1m &` commands and unplug > > multiplier. That causes predictable I/O errors and devices destruction. > > But with high probability several dd processes getting stuck in kernel. > [...] >=20 > I observed the same thing yesterday while stress-testing HAST: >=20 > 3659 2504 3659 0 DE+ GEOM top 0x8079a348 dd > 3658 2102 2102 0 DE+ GEOM top 0x8079a348 hastd > 2 0 0 0 DL devdrn 0x85b1bc68 [g_event] >=20 > Both dd(1) and hastd(8) wait for the GEOM topology lock in the exit path, > which is already held by the g_event thread. Maybe I'll add how I understand what's going on: GEOM calls destroy_dev() while holding the topology lock. Destroy_dev() wants to destroy device, but can't because there are threads that still have it open. The threads can't close it, because to close it they need the topology lock. The deadlock is quite obvious, IMHO. I believe the problem could be solved by dropping the topology lock in g_dev_orphan() when calling destroy_dev(dev), but it is hard to say if it is safe to drop the topology lock there. Maybe Poul-Henning could take a look. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --EuxKj2iCbKjpUGkD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFLZBuyForvXbEpPzQRAoaLAJ9X1IIhEfBcTNHc2CYBkh4RAzc/twCgj6x0 y1PsqIMgcFnE/ILC2kevD28= =hEg0 -----END PGP SIGNATURE----- --EuxKj2iCbKjpUGkD-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 30 13:51:40 2010 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 C270E1065676; Sat, 30 Jan 2010 13:51:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 42BD58FC1B; Sat, 30 Jan 2010 13:51:39 +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 o0UDpQC3053952 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Jan 2010 15:51:26 +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.3/8.14.3) with ESMTP id o0UDpQU4073478; Sat, 30 Jan 2010 15:51:26 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0UDpQZu073477; Sat, 30 Jan 2010 15:51:26 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Jan 2010 15:51:26 +0200 From: Kostik Belousov To: Pawel Jakub Dawidek Message-ID: <20100130135126.GV3877@deviant.kiev.zoral.com.ua> References: <4B636812.8060403@FreeBSD.org> <20100130112749.GA1660@garage.freebsd.pl> <20100130114451.GB1660@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2HdWiV8iqzNK3pYB" Content-Disposition: inline In-Reply-To: <20100130114451.GB1660@garage.freebsd.pl> 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=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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, Alexander Motin , FreeBSD-Current , freebsd-geom@freebsd.org Subject: Re: Deadlock between GEOM and devfs device destroy and process exit. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 13:51:41 -0000 --2HdWiV8iqzNK3pYB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 30, 2010 at 12:44:51PM +0100, Pawel Jakub Dawidek wrote: > On Sat, Jan 30, 2010 at 12:27:49PM +0100, Pawel Jakub Dawidek wrote: > > On Sat, Jan 30, 2010 at 12:58:26AM +0200, Alexander Motin wrote: > > > Hi. > > >=20 > > > Experimenting with SATA hot-plug I've found quite repeatable deadlock > > > case. Problem observed when several SATA devices, opened via devfs, > > > disappear at exactly same time. In my case, at time of unplugging SATA > > > Port Multiplier with several disks beyond it. All I have to do is to = run > > > several `dd if=3D/dev/adaX of=3D/dev/null bs=3D1m &` commands and unp= lug > > > multiplier. That causes predictable I/O errors and devices destructio= n. > > > But with high probability several dd processes getting stuck in kerne= l. > > [...] > >=20 > > I observed the same thing yesterday while stress-testing HAST: > >=20 > > 3659 2504 3659 0 DE+ GEOM top 0x8079a348 dd > > 3658 2102 2102 0 DE+ GEOM top 0x8079a348 hastd > > 2 0 0 0 DL devdrn 0x85b1bc68 [g_event] > >=20 > > Both dd(1) and hastd(8) wait for the GEOM topology lock in the exit pat= h, > > which is already held by the g_event thread. >=20 > Maybe I'll add how I understand what's going on: >=20 > GEOM calls destroy_dev() while holding the topology lock. >=20 > Destroy_dev() wants to destroy device, but can't because there are > threads that still have it open. >=20 > The threads can't close it, because to close it they need the topology > lock. >=20 > The deadlock is quite obvious, IMHO. >=20 > I believe the problem could be solved by dropping the topology lock in > g_dev_orphan() when calling destroy_dev(dev), but it is hard to say if > it is safe to drop the topology lock there. Maybe Poul-Henning could > take a look. As I already said, if you cannot drop a lock, destroy_dev_sched() is designed to handle this. You should be careful to not allow any further activitity on the device scheduled for destruction. --2HdWiV8iqzNK3pYB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktkOV0ACgkQC3+MBN1Mb4geLQCg3v+nX9pTfbMUUpasQBDnMwnd B7EAoN5oA9K9nFfI62P4vwKRzIUyAMO7 =15Wt -----END PGP SIGNATURE----- --2HdWiV8iqzNK3pYB-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 30 18:51:33 2010 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 3B4BF106568B; Sat, 30 Jan 2010 18:51:33 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by mx1.freebsd.org (Postfix) with ESMTP id DA62F8FC15; Sat, 30 Jan 2010 18:51:31 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id e21so473520fga.13 for ; Sat, 30 Jan 2010 10:51:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=dEXZ1Vj0P9wqQ2ZosrktV+LFjbF33lwlRYQktMttHto=; b=B562ljXk9MSAlrEc3CcjbqRtts1ajmsJoWmCi7LTVICuHDBZBmZ+cZJMK/s0loPN2p 3bb3eLGKfa3AI0Y5rNaD0uLyeADXwG2033Hs3CCqpXrM1n0P3AUCEfljKaI2Y8YbHERt hlY3g2RXvFxGO+3EokysMnYY2Ia9nGugm5ywk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=TOyD6AFwyTsGKverlDiI6053vcBcTXxzXBoZfm7CHWvtasDeCGJUFe9AisXO097Z0o oIieYmLjqgJc+79tNGmf7dmPfi5O3sNoX+/7O1GgM5mFPXfAUc07q56AgWbnoxbffUaa uNlDUTmS5uI7Al5T1naqFsozGZ9ugxO+hKWz4= Received: by 10.103.35.5 with SMTP id n5mr1155025muj.132.1264877490919; Sat, 30 Jan 2010 10:51:30 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 23sm3341149mun.41.2010.01.30.10.51.29 (version=SSLv3 cipher=RC4-MD5); Sat, 30 Jan 2010 10:51:30 -0800 (PST) Sender: Alexander Motin Message-ID: <4B647FAF.4090409@FreeBSD.org> Date: Sat, 30 Jan 2010 20:51:27 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <4B636812.8060403@FreeBSD.org> <20100130112749.GA1660@garage.freebsd.pl> <20100130114451.GB1660@garage.freebsd.pl> In-Reply-To: <20100130114451.GB1660@garage.freebsd.pl> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current , kib@FreeBSD.org, freebsd-geom@freebsd.org Subject: Re: Deadlock between GEOM and devfs device destroy and process exit. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 18:51:33 -0000 Pawel Jakub Dawidek wrote: > On Sat, Jan 30, 2010 at 12:27:49PM +0100, Pawel Jakub Dawidek wrote: >> On Sat, Jan 30, 2010 at 12:58:26AM +0200, Alexander Motin wrote: >>> Experimenting with SATA hot-plug I've found quite repeatable deadlock >>> case. Problem observed when several SATA devices, opened via devfs, >>> disappear at exactly same time. In my case, at time of unplugging SATA >>> Port Multiplier with several disks beyond it. All I have to do is to run >>> several `dd if=/dev/adaX of=/dev/null bs=1m &` commands and unplug >>> multiplier. That causes predictable I/O errors and devices destruction. >>> But with high probability several dd processes getting stuck in kernel. >> [...] >> >> I observed the same thing yesterday while stress-testing HAST: >> >> 3659 2504 3659 0 DE+ GEOM top 0x8079a348 dd >> 3658 2102 2102 0 DE+ GEOM top 0x8079a348 hastd >> 2 0 0 0 DL devdrn 0x85b1bc68 [g_event] >> >> Both dd(1) and hastd(8) wait for the GEOM topology lock in the exit path, >> which is already held by the g_event thread. > > Maybe I'll add how I understand what's going on: > > GEOM calls destroy_dev() while holding the topology lock. > > Destroy_dev() wants to destroy device, but can't because there are > threads that still have it open. > > The threads can't close it, because to close it they need the topology > lock. > > The deadlock is quite obvious, IMHO. You are right, but as it happens not every time I was interested why. After closer look I found two different scenarios. In first case application receives I/O error and closes device. On device close CAM calls disk_destroy(), which schedules device destruction. When destroy_dev() called, device already free and there is no problem, as these events are always asynchronous. In second case, application also receives I/O error, but before it is able to react, GEOM starts handling of disk_gone(), called by CAM. As result, destroy_dev() called with device still opened, and it can't ever be closed due to topology lock held. I've played a bit with destroy_dev_sched(), but locking indeed looks not to be easy. Is there some known good practice? destroy_dev_sched_cb() looks a bit more promising. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 30 19:34:08 2010 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 C7A64106568D; Sat, 30 Jan 2010 19:34:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 976E88FC12; Sat, 30 Jan 2010 19:34:07 +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 o0UJY32S077289 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Jan 2010 21:34:03 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o0UJY2js006692; Sat, 30 Jan 2010 21:34:02 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0UJY2pt006691; Sat, 30 Jan 2010 21:34:02 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Jan 2010 21:34:02 +0200 From: Kostik Belousov To: Alexander Motin Message-ID: <20100130193402.GB3877@deviant.kiev.zoral.com.ua> References: <4B636812.8060403@FreeBSD.org> <20100130112749.GA1660@garage.freebsd.pl> <20100130114451.GB1660@garage.freebsd.pl> <4B647FAF.4090409@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Vu7hzOi38yxTgbOc" Content-Disposition: inline In-Reply-To: <4B647FAF.4090409@FreeBSD.org> 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=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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-Current , Pawel Jakub Dawidek , freebsd-geom@freebsd.org Subject: Re: Deadlock between GEOM and devfs device destroy and process exit. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 19:34:08 -0000 --Vu7hzOi38yxTgbOc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 30, 2010 at 08:51:27PM +0200, Alexander Motin wrote: > Pawel Jakub Dawidek wrote: > > On Sat, Jan 30, 2010 at 12:27:49PM +0100, Pawel Jakub Dawidek wrote: > >> On Sat, Jan 30, 2010 at 12:58:26AM +0200, Alexander Motin wrote: > >>> Experimenting with SATA hot-plug I've found quite repeatable deadlock > >>> case. Problem observed when several SATA devices, opened via devfs, > >>> disappear at exactly same time. In my case, at time of unplugging SATA > >>> Port Multiplier with several disks beyond it. All I have to do is to = run > >>> several `dd if=3D/dev/adaX of=3D/dev/null bs=3D1m &` commands and unp= lug > >>> multiplier. That causes predictable I/O errors and devices destructio= n. > >>> But with high probability several dd processes getting stuck in kerne= l. > >> [...] > >> > >> I observed the same thing yesterday while stress-testing HAST: > >> > >> 3659 2504 3659 0 DE+ GEOM top 0x8079a348 dd > >> 3658 2102 2102 0 DE+ GEOM top 0x8079a348 hastd > >> 2 0 0 0 DL devdrn 0x85b1bc68 [g_event] > >> > >> Both dd(1) and hastd(8) wait for the GEOM topology lock in the exit pa= th, > >> which is already held by the g_event thread. > >=20 > > Maybe I'll add how I understand what's going on: > >=20 > > GEOM calls destroy_dev() while holding the topology lock. > >=20 > > Destroy_dev() wants to destroy device, but can't because there are > > threads that still have it open. > >=20 > > The threads can't close it, because to close it they need the topology > > lock. > >=20 > > The deadlock is quite obvious, IMHO. >=20 > You are right, but as it happens not every time I was interested why. > After closer look I found two different scenarios. >=20 > In first case application receives I/O error and closes device. On > device close CAM calls disk_destroy(), which schedules device > destruction. When destroy_dev() called, device already free and there is > no problem, as these events are always asynchronous. >=20 > In second case, application also receives I/O error, but before it is > able to react, GEOM starts handling of disk_gone(), called by CAM. As > result, destroy_dev() called with device still opened, and it can't ever > be closed due to topology lock held. >=20 > I've played a bit with destroy_dev_sched(), but locking indeed looks not > to be easy. Is there some known good practice? destroy_dev_sched_cb() > looks a bit more promising. What do you mean by not easy locking ? destroy_dev_sched(dev) =3D=3D destroy_dev_sched_cb(dev, NULL, NULL). There is even a man page describing the interface. Main issue with destroy_dev_sched is the window between a moment when device is scheduled for destruction and thus kept in half-demolished state, and actual removal of devfs node. My exemplary case has been snp(4) before tty got rewritten, see r. 1.107 of sys/dev/snp/snp.c. No calls to destroy_dev_sched() that I placed in the src/ a kept around, that is good because corresponding subsystems got serious rewrite. --Vu7hzOi38yxTgbOc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktkiaoACgkQC3+MBN1Mb4igcACeI1FTL2MKQZW5g92KEk1V6PJD CsEAoKaG2t3br7mDNjSSVcfGA9zA0Khp =rl8T -----END PGP SIGNATURE----- --Vu7hzOi38yxTgbOc-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 30 20:07:42 2010 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 C36131065694; Sat, 30 Jan 2010 20:07:42 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 64BE08FC14; Sat, 30 Jan 2010 20:07:42 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 81C851CEF1; Sat, 30 Jan 2010 21:07:41 +0100 (CET) Date: Sat, 30 Jan 2010 21:07:41 +0100 From: Ed Schouten To: Kostik Belousov Message-ID: <20100130200741.GG77705@hoeg.nl> References: <4B636812.8060403@FreeBSD.org> <20100130112749.GA1660@garage.freebsd.pl> <20100130114451.GB1660@garage.freebsd.pl> <4B647FAF.4090409@FreeBSD.org> <20100130193402.GB3877@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="213B/23bCmw+8GSd" Content-Disposition: inline In-Reply-To: <20100130193402.GB3877@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org, Alexander Motin , FreeBSD-Current , Pawel Jakub Dawidek , freebsd-geom@freebsd.org Subject: Re: Deadlock between GEOM and devfs device destroy and process exit. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 20:07:42 -0000 --213B/23bCmw+8GSd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, * Kostik Belousov wrote: > My exemplary case has been snp(4) before tty got rewritten, see r. 1.107 > of sys/dev/snp/snp.c. No calls to destroy_dev_sched() that I placed in > the src/ a kept around, that is good because corresponding subsystems > got serious rewrite. The current TTY code still uses destroy_dev_sched_cb(). In a very old version of the new TTY code, close() on a pseudo-terminal master device would also end up calling destroy_dev(), which meant it blocked until the TTY was closed as well, which is obviously not what it should do. I changed the TTY code to destroy_dev_sched_cb(), which means tty_gone() doesn't block. The TTY layer later calls a callback function, so the pts driver can deallocate the softc and reclaim the unit number (pts/%d). --=20 Ed Schouten WWW: http://80386.nl/ --213B/23bCmw+8GSd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktkkY0ACgkQ52SDGA2eCwWflQCdFWmTG3J08ANqTv7nfWwvgTqB B48An2Pi0/1RaRXOzwYoGOXgGBYinlHo =VEWu -----END PGP SIGNATURE----- --213B/23bCmw+8GSd-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 30 22:13:53 2010 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 1DABC1065672 for ; Sat, 30 Jan 2010 22:13:53 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 0D2F38FC14 for ; Sat, 30 Jan 2010 22:13:52 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id DA0DB1A3C6F; Sat, 30 Jan 2010 14:13:52 -0800 (PST) Date: Sat, 30 Jan 2010 14:13:52 -0800 From: Alfred Perlstein To: cronfy Message-ID: <20100130221352.GM71374@elvis.mu.org> References: <20100125035448.GW71374@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: Unique process id (not pid) and accounting daemon X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 22:13:53 -0000 * cronfy [100128 06:16] wrote: > >> To ensure that process in the process tree and process in the > >> accounting file are the same, I want to add unique process identifier > >> (uint64_t) to 'proc' struct in sys/sys/proc.h and increment it for > >> every process fork. I see it is possible to do this just before > >> sx_sunlock() in fork1() in sys/kern/kern_fork.c. > > Now that I know this, I would suggest simply recording the start > > time as the serial number, then using pid+recorded_start_time as > > your serial number. > > This may lead to duplicate ids: pid may be reused and time may be > shifted to give exactly the same start_time as it was used with this > pid earlier. Simple increment will work fine. You're right. I was still stuck in "start time doesn't change" mode. (assuming that if the time changed that the "start time" used to tag processes would be incremented akin to your increasing number). meh :) > Ok, as far as no one else commented at my idea, I assume it is not > completely stupid and will try to implement this :) It sounds good! -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250 .- FreeBSD committer From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 30 23:16:06 2010 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 D98AB1065672 for ; Sat, 30 Jan 2010 23:16:06 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from fallbackmx09.syd.optusnet.com.au (fallbackmx09.syd.optusnet.com.au [211.29.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id 4CB608FC13 for ; Sat, 30 Jan 2010 23:16:06 +0000 (UTC) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by fallbackmx09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0UL7eNk014918 for ; Sun, 31 Jan 2010 08:07:40 +1100 Received: from server.vk2pj.dyndns.org (c122-106-232-148.belrs3.nsw.optusnet.com.au [122.106.232.148]) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0UL7b3V015613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 31 Jan 2010 08:07:38 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o0UL7aAt005604; Sun, 31 Jan 2010 08:07:36 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o0UL7akb005603; Sun, 31 Jan 2010 08:07:36 +1100 (EST) (envelope-from peter) Date: Sun, 31 Jan 2010 08:07:36 +1100 From: Peter Jeremy To: Sergey Babkin Message-ID: <20100130210736.GD41329@server.vk2pj.dyndns.org> References: <4B62A93D.A31AEE49@verizon.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zjcmjzIkjQU2rmur" Content-Disposition: inline In-Reply-To: <4B62A93D.A31AEE49@verizon.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: hackers@freebsd.org Subject: Re: book on parallel programming X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 23:16:06 -0000 --zjcmjzIkjQU2rmur Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Jan-29 04:24:13 -0500, Sergey Babkin wrote: >BTW, looks like DamonNews is dead? All there is left is the >emblem and some strange blog. All the rest is gone, including >the archives of old issues. Seems it's been taken over by a squatter. Archives are available via the Wayback Machine at http://web.archive.org --=20 Peter Jeremy --zjcmjzIkjQU2rmur Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAktkn5gACgkQ/opHv/APuIfqVQCZAZ/O/QCCI0qaso483r+x7ngx HZ8AoLlYKY8RI/przULFZZHJgwyyOxtk =XcZF -----END PGP SIGNATURE----- --zjcmjzIkjQU2rmur--