From owner-freebsd-current@FreeBSD.ORG Fri May 6 06:28:49 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6B8F1065670 for ; Fri, 6 May 2011 06:28:49 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 87CE18FC0A for ; Fri, 6 May 2011 06:28:49 +0000 (UTC) Received: by qyk35 with SMTP id 35so4748981qyk.13 for ; Thu, 05 May 2011 23:28:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Ss/UB+GleyAoHVm5MIjZPDHFq9BWvQ8+owc1Dxh6aOE=; b=HH7msDY/j31XUC8bUU0qeoGS6BDnL2zs0Wp8SZ5DQD4ewZfZG+b0ueQBxlZZm/bwM+ UQp6BeV8TkAK6qgws6xEIGA8xOVJ6sL9K06GYrLC+W0jp/AYyU0mTEAZpkJvNTByAjJ0 TcG3HDEOQ6J2zr9XKV0yHERA1A9WWI8YvAPV8= 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=lwVx7PIf7fVLxWg5/nK8v5EkTGlBx+tGgX+0qrLf/WEhUPHJn6LqDi9yd9PwRXezyE EIx31M7wM71P4mpkrcVLGRLR+r07Ti00CN6kmb0epdiDNAqsguEnMI1jFqRUG8z/Q/cY 90WBytyYFK6o3IEFX+MNSmUWfQbsstu7/1vGU= MIME-Version: 1.0 Received: by 10.229.41.70 with SMTP id n6mr2221520qce.252.1304663328556; Thu, 05 May 2011 23:28:48 -0700 (PDT) Received: by 10.229.95.19 with HTTP; Thu, 5 May 2011 23:28:48 -0700 (PDT) In-Reply-To: References: Date: Fri, 6 May 2011 10:28:48 +0400 Message-ID: From: Sergey Kandaurov To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Current Subject: Re: Processes in swapped out states in recent CURRENT? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 06:28:49 -0000 On 6 May 2011 00:33, Garrett Cooper wrote: > =A0 =A0I was watching top output on my dev box and I noticed that there > are more swapped out processes present on the system, shortly after > boot (which doesn't make sense given that I'm not low on resources on > the box). Also, the os when I run os.waitpid() in python claims that > the child doesn't exist, so I'm wondering if there's an issue with the > processes reported via ps, top, etc. > =A0 =A0I'm noting this because it's a behavior change over my > 'stable'-ish workstation, running CURRENT/r220089/amd64, which is > spec'ed out the same as the dev box, minus some multimedia hardware. > Thanks, > -Garrett > > # uname -a > FreeBSD fallout.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r221219M: Thu > May =A05 12:09:37 PDT 2011 > root@fallout.local:/usr/obj/usr/src/sys/FALLOUT =A0amd6 > # fstat -p 1832 > USER =A0 =A0 CMD =A0 =A0 =A0 =A0 =A0PID =A0 FD MOUNT =A0 =A0 =A0INUM MODE= =A0 =A0 =A0 =A0 SZ|DV R/W > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 root / =A0 =A0 =A0 =A0 =A0 =A0 2 dr= wxr-xr-x =A0 =A01024 =A0r > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 wd / =A0 =A0 =A0 =A0 =A0 =A0 2 = drwxr-xr-x =A0 =A01024 =A0r > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 text /usr =A0 =A0 730118 -r-xr-xr-x= =A0240944 =A0r > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 =A00 /dev =A0 =A0 =A0 =A0 =A06 = crw-rw-rw- =A0 =A0null =A0r > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 =A01 /dev =A0 =A0 =A0 =A0 =A06 = crw-rw-rw- =A0 =A0null rw > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 =A02 /dev =A0 =A0 =A0 =A0 =A06 = crw-rw-rw- =A0 =A0null rw > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 =A03* internet stream tcp fffff= e01e56cf000 > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 =A04* pseudo-terminal master = =A0 =A0 =A0pts/1 rw > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 =A05* local stream fffffe0008f7= 9960 <-> > fffffe0008f79a50 > # fstat -p 149 > USER =A0 =A0 CMD =A0 =A0 =A0 =A0 =A0PID =A0 FD MOUNT =A0 =A0 =A0INUM MODE= =A0 =A0 =A0 =A0 SZ|DV R/W > root =A0 =A0 adjkerntz =A0 =A0149 root / =A0 =A0 =A0 =A0 =A0 =A0 2 drwxr-= xr-x =A0 =A01024 =A0r > root =A0 =A0 adjkerntz =A0 =A0149 =A0 wd / =A0 =A0 =A0 =A0 =A0 =A0 2 drwx= r-xr-x =A0 =A01024 =A0r > root =A0 =A0 adjkerntz =A0 =A0149 text / =A0 =A0 =A0 =A0329805 -r-xr-xr-x= =A0 =A08792 =A0r > root =A0 =A0 adjkerntz =A0 =A0149 =A0 =A00 /dev =A0 =A0 =A0 =A0 =A06 crw-= rw-rw- =A0 =A0null rw > root =A0 =A0 adjkerntz =A0 =A0149 =A0 =A01 /dev =A0 =A0 =A0 =A0 =A06 crw-= rw-rw- =A0 =A0null rw > root =A0 =A0 adjkerntz =A0 =A0149 =A0 =A02 /dev =A0 =A0 =A0 =A0 =A06 crw-= rw-rw- =A0 =A0null rw > # fstat -p 1479 > USER =A0 =A0 CMD =A0 =A0 =A0 =A0 =A0PID =A0 FD MOUNT =A0 =A0 =A0INUM MODE= =A0 =A0 =A0 =A0 SZ|DV R/W > root =A0 =A0 syslogd =A0 =A0 1479 root / =A0 =A0 =A0 =A0 =A0 =A0 2 drwxr-= xr-x =A0 =A01024 =A0r > root =A0 =A0 syslogd =A0 =A0 1479 =A0 wd / =A0 =A0 =A0 =A0 =A0 =A0 2 drwx= r-xr-x =A0 =A01024 =A0r > root =A0 =A0 syslogd =A0 =A0 1479 text /usr =A0 =A0 739002 -r-xr-xr-x =A0= 39008 =A0r > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A00 /dev =A0 =A0 =A0 =A0 =A06 crw-= rw-rw- =A0 =A0null rw > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A01 /dev =A0 =A0 =A0 =A0 =A06 crw-= rw-rw- =A0 =A0null rw > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A02 /dev =A0 =A0 =A0 =A0 =A06 crw-= rw-rw- =A0 =A0null rw > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A03 /var =A0 =A0 353301 -rw-------= =A0 =A0 =A0 4 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A04* local dgram fffffe0008cd31e0 > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A05* local dgram fffffe0008cd30f0 > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A06* internet6 dgram udp fffffe000= 8ced540 > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A07* internet dgram udp fffffe0008= ced3f0 > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A08 /dev =A0 =A0 =A0 =A0 29 crw---= ---- =A0 =A0klog =A0r > root =A0 =A0 syslogd =A0 =A0 1479 =A0 10 /var =A0 =A0 1389613 -rw-r--r-- = =A0 25389 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 11 /var =A0 =A0 1389579 -rw------- = =A0 =A0 =A062 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 12 /var =A0 =A0 1389572 -rw------- = =A0 10164 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 13 /var =A0 =A0 1389601 -rw-r----- = =A0 =A02814 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 14 /var =A0 =A0 1389575 -rw-r--r-- = =A0 =A0 =A062 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 15 /var =A0 =A0 1389580 -rw------- = =A0 =A0 =A062 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 16 /var =A0 =A0 1389577 -rw------- = =A0 57212 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 17 /var =A0 =A0 1389606 -rw------- = =A0 38046 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 18 /var =A0 =A0 1389578 -rw-r----- = =A0 =A0 =A062 =A0w > # fstat -p 1829 > USER =A0 =A0 CMD =A0 =A0 =A0 =A0 =A0PID =A0 FD MOUNT =A0 =A0 =A0INUM MODE= =A0 =A0 =A0 =A0 SZ|DV R/W > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 root / =A0 =A0 =A0 =A0 =A0 =A0 2 dr= wxr-xr-x =A0 =A01024 =A0r > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 =A0 wd /usr =A0 =A0 1884160 drwxr-x= r-x =A0 =A01024 =A0r > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 text / =A0 =A0 =A0 =A0212057 -r-xr-= xr-x =A0131784 =A0r > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 =A0 =A00 /dev =A0 =A0 =A0 =A0127 cr= w--w---- =A0 pts/0 rw > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 =A0 =A01 /dev =A0 =A0 =A0 =A0127 cr= w--w---- =A0 pts/0 rw > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 =A0 =A02 /dev =A0 =A0 =A0 =A0127 cr= w--w---- =A0 pts/0 rw > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 =A0 10 /dev =A0 =A0 =A0 =A0127 crw-= -w---- =A0 pts/0 rw > > # python -c 'import os; os.waitpid(1825, 0)' > Traceback (most recent call last): > =A0File "", line 1, in > OSError: [Errno 10] No child processes But pid 1825 (sshd) is not a child process of the python process , isn't it= ? from waitpid(2): [ECHILD] The calling process has no existing unwaited-for ch= ild processes. Look at /sys/kern/kern_exit.c:kern_wait(). The function returns ECHILD if a specified process was not found among p->p_children children group. > # ps auxww | grep 1825 > root =A0 =A0 1825 =A0 0.0 =A00.0 =A047952 =A0 =A0 =A00 =A0?? =A0IWs =A0- = =A0 =A0 =A0 =A0 0:00.00 > sshd: gcooper [priv] (sshd) > root =A0 =A088213 =A0 0.0 =A00.0 =A016340 =A0 1356 =A0 3 =A0S+ =A0 =A01:2= 5PM =A0 0:00.00 grep 1825 > # top -b > last pid: 96740; =A0load averages: =A01.07, =A00.98, =A00.92 =A0up 0+01:1= 5:32 =A0 =A013:27:04 > 50 processes: =A02 running, 48 sleeping > > Mem: 56M Active, 23M Inact, 795M Wired, 1848K Cache, 1237M Buf, 11G Free > Swap: 24G Total, 832K Used, 24G Free > > > =A0PID USERNAME =A0THR PRI NICE =A0 SIZE =A0 =A0RES STATE =A0 C =A0 TIME = =A0 WCPU > COMMAND > =A01828 gcooper =A0 =A0 1 =A020 =A0 =A00 47952K =A03372K select =A06 =A0 = 0:02 =A00.00% sshd > 26295 root =A0 =A0 =A0 =A01 =A020 =A0 =A00 =A09972K =A0 888K kqread =A02 = =A0 0:01 =A00.00% tail > 95888 root =A0 =A0 =A0 =A01 =A052 =A0 =A00 14472K =A08092K wait =A0 =A01 = =A0 0:00 =A00.00% make > =A01729 root =A0 =A0 =A0 =A01 =A020 =A0 =A00 20368K =A03000K select =A02 = =A0 0:00 =A00.00% sendmail > 59474 gcooper =A0 =A0 1 =A020 =A0 =A00 47952K =A03768K select =A07 =A0 0:= 00 =A00.00% sshd > 57339 root =A0 =A0 =A0 =A01 =A052 =A0 =A00 =A06280K =A01168K wait =A0 =A0= 1 =A0 0:00 =A00.00% make > 75210 gcooper =A0 =A0 1 =A020 =A0 =A00 47952K =A03816K select =A05 =A0 0:= 00 =A00.00% sshd > 82431 root =A0 =A0 =A0 =A01 =A052 =A0 =A00 =A06280K =A01148K wait =A0 =A0= 2 =A0 0:00 =A00.00% make > 94797 root =A0 =A0 =A0 =A01 =A052 =A0 =A00 =A06280K =A01164K wait =A0 =A0= 2 =A0 0:00 =A00.00% make > 59441 root =A0 =A0 =A0 =A01 =A021 =A0 =A00 47952K =A03772K sbwait =A04 = =A0 0:00 =A00.00% sshd > =A01825 root =A0 =A0 =A0 =A01 =A021 =A0 =A00 47952K =A0 =A0 0K sbwait =A0= 1 =A0 0:00 =A00.00% > 75167 root =A0 =A0 =A0 =A01 =A021 =A0 =A00 47952K =A03820K sbwait =A01 = =A0 0:00 =A00.00% sshd > =A01832 root =A0 =A0 =A0 =A01 =A020 =A0 =A00 47952K =A0 =A0 0K sbwait =A0= 1 =A0 0:00 =A00.00% > 96738 root =A0 =A0 =A0 =A01 =A072 =A0 =A00 17184K =A09756K CPU0 =A0 =A00 = =A0 0:00 =A00.00% cc1 > =A01479 root =A0 =A0 =A0 =A01 =A020 =A0 =A00 12228K =A01372K select =A04 = =A0 0:00 =A00.00% syslogd > 75237 root =A0 =A0 =A0 =A01 =A020 =A0 =A00 17612K =A02424K ttyin =A0 4 = =A0 0:00 =A00.00% bash > =A01835 gcooper =A0 =A0 1 =A020 =A0 =A00 47952K =A03284K select =A02 =A0 = 0:00 =A00.00% sshd > 57233 root =A0 =A0 =A0 =A01 =A052 =A0 =A00 =A06280K =A0 756K wait =A0 =A0= 2 =A0 0:00 =A00.00% make --=20 wbr, pluknet