From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6939 64.71.128.0/18 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.raindrops.general Subject: weird /proc/net/unix issue on CentOS 5.7 / 2.6.18-274.7.1.el5 Date: Wed, 20 Jun 2012 17:44:02 -0700 Message-ID: <20120621004402.GA7450@dcvr.yhbt.net> References: <20120621004402.GA7450@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1340239469 24471 80.91.229.3 (21 Jun 2012 00:44:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2012 00:44:29 +0000 (UTC) To: raindrops@librelist.org Original-X-From: raindrops@librelist.org Thu Jun 21 02:44:28 2012 Return-path: Envelope-to: gclrrg-raindrops@m.gmane.org In-Reply-To: <20120621004402.GA7450@dcvr.yhbt.net> List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: raindrops@librelist.org Xref: news.gmane.org gmane.comp.lang.ruby.raindrops.general:93 Archived-At: Received: from zedshaw.xen.prgmr.com ([64.71.167.205]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ShVVa-0006IF-MF for gclrrg-raindrops@m.gmane.org; Thu, 21 Jun 2012 02:44:27 +0200 Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id F217321DF54 for ; Thu, 21 Jun 2012 00:52:47 +0000 (UTC) Hey all, I encountered a strange bug on CentOS 5.7 servers running the 2.6.18-274.7.1.el5 kernel. I'm not sure if/which newer versions fix this and will report back if/when I find this. I can't reproduce the issue on a vanilla 3.4.2 Linux kernel nor on older CentOS 5.4 machines. (Pointers to repositories appreciated, RH doesn't it seem to make it easy to find their kernel git repositories (if they're public at all)) The regression is caused by attempting to read unix listener stats. Here's the relevant strace output: open("/proc/net/unix", O_RDONLY) = 9 fstat(9, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 fstat(9, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 ioctl(9, SNDCTL_TMR_TIMEBASE or TCGETS, 0x40d2a6a0) = -1 ENOTTY (Inappropriate ioctl for device) fstat(9, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 lseek(9, 0, SEEK_CUR) = 0 read(9, "Num RefCount Protocol Flag"..., 8192) = 4023 ppoll([{fd=9, events=POLLIN}], 1, NULL, NULL, 8 /* hangs forever */ This is on Ruby 1.9.3-p194 on x86_64 I've also tried different versions of Ruby and forcing select() (instead of ppoll()): ruby -e 'IO.select([File.open("/proc/net/unix")],nil,nil,0.1) Ruby returned nil after timing out with select, too. It's arguable Ruby is being dumb about calling ppoll() (or select()) on a file in /proc/, especially since we haven't hit EAGAIN, but really, select/ppoll/poll/pselect/epoll_wait should all return immediately on "regular" files