GNU bug report logs - #55628
debug-timer-check fails on macOS 11.6.6

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Wed, 25 May 2022 10:47:02 UTC

Severity: normal

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


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

From: Mattias Engdegård <mattiase <at> acm.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 55628 <at> debbugs.gnu.org
Subject: Re: bug#55628: debug-timer-check fails on macOS 11.6.6
Date: Wed, 25 May 2022 15:05:32 +0200
[Message part 1 (text/plain, inline)]
25 maj 2022 kl. 14.20 skrev Lars Ingebrigtsen <larsi <at> gnus.org>:
> 
> Mattias Engdegård <mattiase <at> acm.org> writes:
> 
>> Built with enable-checking, (debug-timer-check) returns nil.
>> It turns out that debug_timer_callback is never actually called, but I
>> haven't dug further than that.
>> 
>> This is on macOS 11.6.6 and HAVE_TIMERFD is not defined. Does this
>> code path work on other systems?
> 
> I tried this on Debian/bookworm (with nativecomp, but that probably
> doesn't make a difference), and I got nil there, too.

Thanks for checking. Apparently pending_signals is never set; handle_alarm_signal is never called.
More digging shows that set_alarm always sets the interval timer to at least 1 ms in the future even if the timer has expired.

The attached patch makes set_alarm signal SIGALRM immediately if the timer is due. We could call the signal handler directly but this way it should work correctly if the signal is masked at the moment. What do you think?

[set_alarm.diff (application/octet-stream, attachment)]

This bug report was last modified 3 years and 50 days ago.

Previous Next


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