From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo 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: Fri, 24 Jun 2016 11:17:33 +0200 Message-ID: <87y45veyj6.fsf@pobox.com> References: <20120826131404.6959.57720.reportbug@localhost.localdomain> <87vbbnv53g.fsf@trouble.defaultvalue.org> 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 1466759910 24548 80.91.229.3 (24 Jun 2016 09:18:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2016 09:18:30 +0000 (UTC) Cc: 21424@debbugs.gnu.org, Panu Kalliokoski , 685919@bugs.debian.org, 685919-forwarded@bugs.debian.org To: Rob Browning Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Jun 24 11:18:19 2016 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 1bGNFh-0004Bj-08 for guile-bugs@m.gmane.org; Fri, 24 Jun 2016 11:18:17 +0200 Original-Received: from localhost ([::1]:42113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNFg-0001c4-3m for guile-bugs@m.gmane.org; Fri, 24 Jun 2016 05:18:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNFZ-0001by-HV for bug-guile@gnu.org; Fri, 24 Jun 2016 05:18:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGNFS-0002xt-BM for bug-guile@gnu.org; Fri, 24 Jun 2016 05:18:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNFS-0002xn-6o for bug-guile@gnu.org; Fri, 24 Jun 2016 05:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bGNFS-0003Dr-2v for bug-guile@gnu.org; Fri, 24 Jun 2016 05:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 24 Jun 2016 09:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21424 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 21424-submit@debbugs.gnu.org id=B21424.146675986512365 (code B ref 21424); Fri, 24 Jun 2016 09:18:02 +0000 Original-Received: (at 21424) by debbugs.gnu.org; 24 Jun 2016 09:17:45 +0000 Original-Received: from localhost ([127.0.0.1]:53425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGNFA-0003DN-SW for submit@debbugs.gnu.org; Fri, 24 Jun 2016 05:17:45 -0400 Original-Received: from pb-sasl2.pobox.com ([64.147.108.67]:56069 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGNF8-0003DE-M1 for 21424@debbugs.gnu.org; Fri, 24 Jun 2016 05:17:43 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 6908B1A155; Fri, 24 Jun 2016 05:17:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=rGPnH2BpzRCp kJNwiScRc8m1ya4=; b=jGPDHhONB79wmoGziwtOItxDRO7uBwst5uzMKyb7p58H HIyQU8K2HIwhKoLJ+vqYn+VuQ+IOz6rQmibLtnmipb2RR9F4p5Ng+ntI51C5jOHH VnSBOVOb3/5XWH1mDTEV/LQx05pXbFAV5DMuTb9Rdy6KX3mh3PddbHjNLIAhkeM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=YEiIig hcP3uAuo1FjaGMiOd4z+4WP18m2XqzxGM646tfA7nihf0MFdRSTxYS5wARV65QVQ Nr0ldwd0eLJVg3cdx1X28ig34bzCkh8g1uXh8JsPHbSZOwDi8mRt40srBgWG2LAP E63NQ9+ktdttwbNmdcDqnZ5gnXN+7EDO3AIgY= Original-Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 61F011A154; Fri, 24 Jun 2016 05:17:41 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl2.pobox.com (Postfix) with ESMTPSA id 820961A152; Fri, 24 Jun 2016 05:17:40 -0400 (EDT) In-Reply-To: <87vbbnv53g.fsf@trouble.defaultvalue.org> (Rob Browning's message of "Sun, 06 Sep 2015 12:18:43 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: 8040BE7C-39EC-11E6-A082-28A6F1301B6D-02397024!pb-sasl2.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.lisp.guile.bugs:8216 Archived-At: It does seem clear that we have a bug here; evidently signals do not wake up the reader, neither with readline nor without. Andy On Sun 06 Sep 2015 19:18, Rob Browning writes: > [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