From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.bugs Subject: bug#21424: Bug#685919: guile-1.6: SIGALRM signal handler does not get called when guile blocks on I/O Date: Sun, 06 Sep 2015 12:18:43 -0500 Message-ID: <87vbbnv53g.fsf@trouble.defaultvalue.org> References: <20120826131404.6959.57720.reportbug@localhost.localdomain> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1441559970 28174 80.91.229.3 (6 Sep 2015 17:19:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Sep 2015 17:19:30 +0000 (UTC) Cc: Panu Kalliokoski , 685919@bugs.debian.org, 685919-forwarded@bugs.debian.org To: 21424@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Sep 06 19:19:17 2015 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZYdb1-0004hB-Ik for guile-bugs@m.gmane.org; Sun, 06 Sep 2015 19:19:15 +0200 Original-Received: from localhost ([::1]:49688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYdaw-0007Yo-JF for guile-bugs@m.gmane.org; Sun, 06 Sep 2015 13:19:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYdas-0007VF-3q for bug-guile@gnu.org; Sun, 06 Sep 2015 13:19:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYdao-0006B0-Vj for bug-guile@gnu.org; Sun, 06 Sep 2015 13:19:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYdao-0006Al-TV for bug-guile@gnu.org; Sun, 06 Sep 2015 13:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZYdao-0000zJ-Ja for bug-guile@gnu.org; Sun, 06 Sep 2015 13:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rob Browning Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 06 Sep 2015 17:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21424 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14415599333771 (code B ref -1); Sun, 06 Sep 2015 17:19:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Sep 2015 17:18:53 +0000 Original-Received: from localhost ([127.0.0.1]:50880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYdaf-0000yl-3h for submit@debbugs.gnu.org; Sun, 06 Sep 2015 13:18:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49114) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYdad-0000yc-5y for submit@debbugs.gnu.org; Sun, 06 Sep 2015 13:18:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYdac-00065o-1j for submit@debbugs.gnu.org; Sun, 06 Sep 2015 13:18:51 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:41880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYdab-00065k-VF for submit@debbugs.gnu.org; Sun, 06 Sep 2015 13:18:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYdaa-00079z-KQ for bug-guile@gnu.org; Sun, 06 Sep 2015 13:18:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYdaX-00062v-0i for bug-guile@gnu.org; Sun, 06 Sep 2015 13:18:48 -0400 Original-Received: from defaultvalue.org ([70.85.129.156]:45972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYdaW-00062Z-Rq for bug-guile@gnu.org; Sun, 06 Sep 2015 13:18:44 -0400 Original-Received: from trouble.defaultvalue.org (localhost [127.0.0.1]) (Authenticated sender: rlb@defaultvalue.org) by defaultvalue.org (Postfix) with ESMTPSA id D8D1A2014F; Sun, 6 Sep 2015 12:18:43 -0500 (CDT) Original-Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id 6EA1514E070; Sun, 6 Sep 2015 12:18:43 -0500 (CDT) In-Reply-To: <20120826131404.6959.57720.reportbug@localhost.localdomain> User-Agent: Notmuch/0.20.1 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7850 Archived-At: [If possible, please preserve the -forwarded address in any replies.] Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D765497 Panu Kalliokoski writes: > While playing with guile on my system, I discovered a weird anomaly > which I could not reproduce on other systems running guile. If I > install a signal handler for SIGALRM, it won't get called while guile is > making an I/O system call. To demonstrate: > > [atehwa@karaihin ~/proj/psyk]$ guile > guile> (alarm 2) > 0 > guile> Her=C3=A4tyskello > [atehwa@karaihin ~/proj/psyk]$ guile > guile> (sigaction SIGALRM (lambda (x) (display "now!") (newline))) > (0 . 335544320) > guile> (alarm 2) > 0 > guile> now a lot more than two seconds has passed, while I wrote this > now! > : In expression now: > : Unbound variable: now > ABORT: (unbound-variable) > [...] > > As you can see, the signal handler gets called as soon as guile returns > from read(2), already before calling (eval). > > I can't get to understand what causes this on my system, because another > Debian system with exact same versions of guile-1.6, libc6 and > libguile-ltdl-1 seems to work fine, and interrupts the read(2) call with > the signal handler. This appears to still be the case with at least Debian's 2.0.11+1-10 package, and setting the handler to something that doesn't perform IO has the same effect (i.e. no alarm until you hit return): (sigaction SIGALRM (lambda (x) (exit 1))) Thanks --=20 Rob Browning rlb @defaultvalue.org and @debian.org GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4