From unknown Mon Sep 08 15:20:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11884: 24.1.50; a regression with pselect(2) on FreeBSD after r108687 Resent-From: Jan Beich Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Jul 2012 06:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11884 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11884@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13418167273398 (code B ref -1); Mon, 09 Jul 2012 06:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jul 2012 06:52:07 +0000 Received: from localhost ([127.0.0.1]:57345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1So7pG-0000sk-3p for submit@debbugs.gnu.org; Mon, 09 Jul 2012 02:52:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38494) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1So4On-0002em-UQ for submit@debbugs.gnu.org; Sun, 08 Jul 2012 23:12:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1So4Ji-0006Hi-Kn for submit@debbugs.gnu.org; Sun, 08 Jul 2012 23:07:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:54401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1So4Ji-0006He-FB for submit@debbugs.gnu.org; Sun, 08 Jul 2012 23:07:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1So4Jg-0007sI-OH for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 23:07:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1So4Je-0006HJ-Pt for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 23:07:16 -0400 Received: from server2.allsitecontrol.com ([63.143.36.210]:46105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1So4Je-0006H7-Fk for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 23:07:14 -0400 Received: from tor20.anonymizer.ccc.de ([31.172.30.3]:41769 helo=internal.tormail.org) by server2.allsitecontrol.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.77) (envelope-from ) id 1So4JN-001lQ8-AR for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 23:07:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:Date:Subject:To:From; bh=t4N78sc9+lQEXHfibw6WKA2SdApy/SW/i3S0hAfMtgw=; b=LojusYkqeUYno//5Z60hm4pcfaWRF7wcWX632E6V0Apw1zmgcaOPFZd13JqPD4zWQjkQS/tFxohfW0mxC6HC2a2Vc3eZHRYEhNgUNllYnMwW6x0cBTuvNETwfI1jML5KOKjyCgbRHBkfuDpSlv2kObKzmrbb7AYGNHvRQi4ZA9E=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1So4HZ-0008Y7-6X for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 03:05:06 +0000 From: Jan Beich Date: Sun, 08 Jul 2012 16:04:08 -1100 MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1So4HZ-0008Y7-6X@internal.tormail.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server2.allsitecontrol.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tormail.org X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Mailman-Approved-At: Mon, 09 Jul 2012 02:52:05 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Trying to use anything that waits for a process turns emacs into a cpu hog, e.g. browse-url or vc-annotate. A simple test case is: $ emacs -Q (start-process "dummy" "*dummy*" "/usr/bin/true") It does nothing on r108686 but degrades on r108707 (intermediate revisions do not compile). list-processes still shows `true' despite the process is long gone: Process [v] Status Buffer TTY Command dummy run *dummy* /dev/pts/8 /usr/bin/true in ktrace(1) it looks like this (repeatedly) 911 emacs CALL ioctl(0x3,FIONREAD,0x7fffffffb47c) 911 emacs RET ioctl 0 911 emacs CALL pselect(0x5,0x7fffffffc850,0x7fffffffc7d0,0,0x7fffffffc7c0,0) 911 emacs RET pselect 1 911 emacs CALL ioctl(0x3,FIONREAD,0x7fffffffb46c) 911 emacs RET ioctl 0 911 emacs CALL read(0x4,0x7fffffffb550,0x1000) 911 emacs GIO fd 4 read 0 bytes "" 911 emacs RET read 0 -- FreeBSD 10.0-CURRENT r237800 amd64 From unknown Mon Sep 08 15:20:44 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jan Beich Subject: bug#11884: closed (Re: 24.1.50; a regression with pselect(2) on FreeBSD after r108687) Message-ID: References: <5004CBFA.7040906@cs.ucla.edu> <1So4HZ-0008Y7-6X@internal.tormail.org> X-Gnu-PR-Message: they-closed 11884 X-Gnu-PR-Package: emacs Reply-To: 11884@debbugs.gnu.org Date: Tue, 17 Jul 2012 02:28:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1342492082-17750-1" This is a multi-part message in MIME format... ------------=_1342492082-17750-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #11884: 24.1.50; a regression with pselect(2) on FreeBSD after r108687 which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 11884@debbugs.gnu.org. --=20 11884: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11884 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1342492082-17750-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 11884-done) by debbugs.gnu.org; 17 Jul 2012 02:27:03 +0000 Received: from localhost ([127.0.0.1]:44898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SqxV8-0004ax-LV for submit@debbugs.gnu.org; Mon, 16 Jul 2012 22:27:02 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:51305) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SqxV5-0004aQ-1h for 11884-done@debbugs.gnu.org; Mon, 16 Jul 2012 22:27:00 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 1EE0EA6000C; Mon, 16 Jul 2012 19:20:57 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8X4YDcDDKJgr; Mon, 16 Jul 2012 19:20:53 -0700 (PDT) Received: from [192.168.1.4] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id E8F8239E810A; Mon, 16 Jul 2012 19:20:40 -0700 (PDT) Message-ID: <5004CBFA.7040906@cs.ucla.edu> Date: Mon, 16 Jul 2012 19:20:42 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Jan Beich Subject: Re: 24.1.50; a regression with pselect(2) on FreeBSD after r108687 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11884-done Cc: "Herbert J. Skuhra" , 11884-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Thanks for that bug report. Herbert J. Skuhra also privately reported the same bug, and was gracious enough to give me a login on a FreeBSD host where I could reproduce your test case and debug the problem. I found two related bugs. First, Emacs's 'configure' script incorrectly assumed that pthread_sigmask wasn't working on FreeBSD; this is fixed in Emacs trunk bzr 109107. Second, the gnulib fallback code for pthread_sigmask incorrectly assumed that FreeBSD's pthread_sigmask (1729, NULL, NULL) returns a nonzero error number, which it does not -- it returns 0. This is arguably a POSIX-compliance bug in FreeBSD, but a bug like this is something that should not make Emacs hang. This is fixed by Emacs trunk bzr 109099. I'm marking the bug as done; please feel free to reopen it if this fix does not work for you. Here's some URLs if you want to see diffs: http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/109099 http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/109107 ------------=_1342492082-17750-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Jul 2012 06:52:07 +0000 Received: from localhost ([127.0.0.1]:57345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1So7pG-0000sk-3p for submit@debbugs.gnu.org; Mon, 09 Jul 2012 02:52:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38494) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1So4On-0002em-UQ for submit@debbugs.gnu.org; Sun, 08 Jul 2012 23:12:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1So4Ji-0006Hi-Kn for submit@debbugs.gnu.org; Sun, 08 Jul 2012 23:07:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:54401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1So4Ji-0006He-FB for submit@debbugs.gnu.org; Sun, 08 Jul 2012 23:07:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1So4Jg-0007sI-OH for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 23:07:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1So4Je-0006HJ-Pt for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 23:07:16 -0400 Received: from server2.allsitecontrol.com ([63.143.36.210]:46105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1So4Je-0006H7-Fk for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 23:07:14 -0400 Received: from tor20.anonymizer.ccc.de ([31.172.30.3]:41769 helo=internal.tormail.org) by server2.allsitecontrol.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.77) (envelope-from ) id 1So4JN-001lQ8-AR for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 23:07:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:Date:Subject:To:From; bh=t4N78sc9+lQEXHfibw6WKA2SdApy/SW/i3S0hAfMtgw=; b=LojusYkqeUYno//5Z60hm4pcfaWRF7wcWX632E6V0Apw1zmgcaOPFZd13JqPD4zWQjkQS/tFxohfW0mxC6HC2a2Vc3eZHRYEhNgUNllYnMwW6x0cBTuvNETwfI1jML5KOKjyCgbRHBkfuDpSlv2kObKzmrbb7AYGNHvRQi4ZA9E=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1So4HZ-0008Y7-6X for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 03:05:06 +0000 From: Jan Beich To: bug-gnu-emacs@gnu.org Subject: 24.1.50; a regression with pselect(2) on FreeBSD after r108687 Date: Sun, 08 Jul 2012 16:04:08 -1100 MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1So4HZ-0008Y7-6X@internal.tormail.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server2.allsitecontrol.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tormail.org X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 09 Jul 2012 02:52:05 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Trying to use anything that waits for a process turns emacs into a cpu hog, e.g. browse-url or vc-annotate. A simple test case is: $ emacs -Q (start-process "dummy" "*dummy*" "/usr/bin/true") It does nothing on r108686 but degrades on r108707 (intermediate revisions do not compile). list-processes still shows `true' despite the process is long gone: Process [v] Status Buffer TTY Command dummy run *dummy* /dev/pts/8 /usr/bin/true in ktrace(1) it looks like this (repeatedly) 911 emacs CALL ioctl(0x3,FIONREAD,0x7fffffffb47c) 911 emacs RET ioctl 0 911 emacs CALL pselect(0x5,0x7fffffffc850,0x7fffffffc7d0,0,0x7fffffffc7c0,0) 911 emacs RET pselect 1 911 emacs CALL ioctl(0x3,FIONREAD,0x7fffffffb46c) 911 emacs RET ioctl 0 911 emacs CALL read(0x4,0x7fffffffb550,0x1000) 911 emacs GIO fd 4 read 0 bytes "" 911 emacs RET read 0 -- FreeBSD 10.0-CURRENT r237800 amd64 ------------=_1342492082-17750-1--