GNU bug report logs - #21424
guile-2.0: SIGALRM signal handler does not get called when guile blocks on I/O

Previous Next

Package: guile;

Reported by: Rob Browning <rlb <at> defaultvalue.org>

Date: Sun, 6 Sep 2015 17:19:02 UTC

Severity: normal

To reply to this bug, email your comments to 21424 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#21424; Package guile. (Sun, 06 Sep 2015 17:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rob Browning <rlb <at> defaultvalue.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sun, 06 Sep 2015 17:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rob Browning <rlb <at> defaultvalue.org>
To: bug-guile <at> gnu.org
Cc: Panu Kalliokoski <panu.kalliokoski <at> gmail.com>, 685919 <at> bugs.debian.org,
 685919-forwarded <at> bugs.debian.org
Subject: Re: 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
[If possible, please preserve the -forwarded address in any replies.]

Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765497

Panu Kalliokoski <panu.kalliokoski <at> gmail.com> 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 <at> karaihin ~/proj/psyk]$ guile
> guile> (alarm 2)
> 0
> guile> Herätyskello
> [atehwa <at> 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!
> <unnamed port>: In expression now:
> <unnamed port>: 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
-- 
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




Information forwarded to bug-guile <at> gnu.org:
bug#21424; Package guile. (Sun, 06 Sep 2015 17:50:02 GMT) Full text and rfc822 format available.

Message #8 received at 21424 <at> debbugs.gnu.org (full text, mbox):

From: Rob Browning <rlb <at> defaultvalue.org>
To: 21424 <at> debbugs.gnu.org, 765497-forwarded <at> bugs.debian.org
Cc: control <at> debbugs.gnu.org
Subject: Re: bug#21424: Acknowledgement (Bug#685919: guile-1.6: SIGALRM signal
 handler does not get called when guile blocks on I/O)
Date: Sun, 06 Sep 2015 12:49:46 -0500
retitle 21424 guile-2.0: SIGALRM signal handler does not get called when guile blocks on I/O
thanks

GNU bug Tracking System <help-debbugs <at> gnu.org> writes:

> Thank you for filing a new bug report with debbugs.gnu.org.

Note: I used the wrong bug number (the old guile-1.6 clone) in the
original forwarding.

It should have been 765497, and so the Debian forwarded address would be
765497-forwarded <at> bugs.debian.org, as in the headers above.

Thanks
-- 
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




Changed bug title to 'guile-2.0: SIGALRM signal handler does not get called when guile blocks on I/O' from 'Bug#685919: guile-1.6: SIGALRM signal handler does not get called when guile blocks on I/O' Request was from Rob Browning <rlb <at> defaultvalue.org> to control <at> debbugs.gnu.org. (Sun, 06 Sep 2015 17:50:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-guile <at> gnu.org:
bug#21424; Package guile. (Fri, 24 Jun 2016 09:18:02 GMT) Full text and rfc822 format available.

Message #13 received at 21424 <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> pobox.com>
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: 21424 <at> debbugs.gnu.org, Panu Kalliokoski <panu.kalliokoski <at> gmail.com>,
 685919 <at> bugs.debian.org, 685919-forwarded <at> bugs.debian.org
Subject: Re: 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
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 <rlb <at> defaultvalue.org> writes:

> [If possible, please preserve the -forwarded address in any replies.]
>
> Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765497
>
> Panu Kalliokoski <panu.kalliokoski <at> gmail.com> 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 <at> karaihin ~/proj/psyk]$ guile
>> guile> (alarm 2)
>> 0
>> guile> Herätyskello
>> [atehwa <at> 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!
>> <unnamed port>: In expression now:
>> <unnamed port>: 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




This bug report was last modified 7 years and 330 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.