From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 2 22:32:40 2012 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 90AB81065672 for ; Mon, 2 Jul 2012 22:32:40 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 44C448FC17 for ; Mon, 2 Jul 2012 22:32:40 +0000 (UTC) Received: by qcsg15 with SMTP id g15so3714963qcs.13 for ; Mon, 02 Jul 2012 15:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=LegKp5JGlTVeKHCbT6z5CDC45jIvEff5NFU64DotEDI=; b=lp+LYwhPZFV2YFojEIERffNlKqrpySGVPBJoDiI8iaZSREo7gvt3tEclbjVKLmoKmI 0CJiinLqMsX5aHDyLSRy9IQloIETBCFQ1BZdxJE1I+9AAvY3MajnJHKVytqdev5HBwlX TP2RpSXvI0n2LYvhdsXn5irh9kaR2/Xx/0fA31erffJcllsGYqLiC/INUAFw3kKwu9k1 FaE35wyKRvxgQXYmYh7h4oTw2Ij9WqRilQp/cdjrVvoSRybCOG0tOzKdQDIFZKD4aXSx fyvVrgRSfKGp3cZ2SK+AmQ14TK18HFKubdD/lIK0FjXFWxjdhiTOJqLJduJtAEQ++4/H hZPA== Received: by 10.229.134.203 with SMTP id k11mr7434417qct.146.1341268359735; Mon, 02 Jul 2012 15:32:39 -0700 (PDT) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id gy9sm34048068qab.22.2012.07.02.15.32.38 (version=SSLv3 cipher=OTHER); Mon, 02 Jul 2012 15:32:39 -0700 (PDT) Date: Mon, 2 Jul 2012 18:32:32 -0400 From: Alexander Kabaev To: Yuri Message-ID: <20120702183232.037dda59@kan.dyndns.org> In-Reply-To: <4FEE0D2F.4010808@rawbw.com> References: <4FEE0D2F.4010808@rawbw.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/LxNGpS6jFIS.aanY2qxGxc="; protocol="application/pgp-signature" Cc: freebsd-hackers@FreeBSD.org Subject: Re: System is flooded with failed read(2) calls: Resource temporarily unavailable (errno=35) coming from xorg unix socket 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, 02 Jul 2012 22:32:40 -0000 --Sig_/LxNGpS6jFIS.aanY2qxGxc= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 29 Jun 2012 13:16:47 -0700 Yuri wrote: > # Declare DTrace script > # > if ($COUNT) { # aggregate style > $dtrace =3D < /usr/sbin/dtrace -n ' > #pragma D option quiet > syscall:::return > /errno !=3D 0 && pid !=3D \$pid $FILTER/ > { > \@Errs[execname, probefunc, errno] =3D count(); > } > dtrace:::END { > printa("%s %s %d %\@d\\n", \@Errs); > }' > END Pardon my possibly naive question, but isn't using errno to detect whether the syscall is succesful a wrong techique? Syscall will NOT change errno unless unless it actually failed, so unless dtrace's errno emulation is more magic than I thought, your script will mistakenly attribute error code coming from a distant past to syscalls just complete with no errors? --=20 Alexander Kabaev --Sig_/LxNGpS6jFIS.aanY2qxGxc= Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iD8DBQFP8iGFQ6z1jMm+XZYRArNDAJ9oo+vJ6KbVEWIlYrI7K0sx7KaQ2gCdHKUs 0KRbUNhVYkzCXZ2dE1xIaII= =VMIB -----END PGP SIGNATURE----- --Sig_/LxNGpS6jFIS.aanY2qxGxc=--