unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master fa52782f5c: Make timer_check even more resilient
       [not found] ` <20220429121523.D82E8C06322@vcs2.savannah.gnu.org>
@ 2022-04-29 12:40   ` Po Lu
  2022-04-29 12:53     ` Po Lu
  2022-04-29 13:19     ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Po Lu @ 2022-04-29 12:40 UTC (permalink / raw)
  To: emacs-devel; +Cc: Pip Cet

Lars Ingebrigtsen <larsi@gnus.org> writes:

> +  block_input ();
> +  turn_on_atimers (false);
>  
>    /* We use copies of the timers' lists to allow a timer to add itself
>       again, without locking up Emacs if the newly added timer is
> @@ -4646,6 +4648,8 @@ timer_check (void)
>    else
>      idle_timers = Qnil;
>  
> +  turn_on_atimers (true);
> +  unblock_input ();

Does input really have to be blocked around this?

The call to `unblock_input' will end up reading async input, which might
not be safe at that spot.  (The X11 drag and drop code used to suffer
from this problem, and debugging the resulting crashes was not easy.)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master fa52782f5c: Make timer_check even more resilient
  2022-04-29 12:40   ` master fa52782f5c: Make timer_check even more resilient Po Lu
@ 2022-04-29 12:53     ` Po Lu
  2022-04-29 13:19     ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Po Lu @ 2022-04-29 12:53 UTC (permalink / raw)
  To: emacs-devel; +Cc: Pip Cet

Po Lu <luangruo@yahoo.com> writes:

> Does input really have to be blocked around this?

I read the bug report again, and please ignore that.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master fa52782f5c: Make timer_check even more resilient
  2022-04-29 12:40   ` master fa52782f5c: Make timer_check even more resilient Po Lu
  2022-04-29 12:53     ` Po Lu
@ 2022-04-29 13:19     ` Lars Ingebrigtsen
  2022-04-29 13:24       ` Po Lu
  1 sibling, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-29 13:19 UTC (permalink / raw)
  To: Po Lu; +Cc: Pip Cet, emacs-devel

Po Lu <luangruo@yahoo.com> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> +  block_input ();
>> +  turn_on_atimers (false);
>>  
>>    /* We use copies of the timers' lists to allow a timer to add itself
>>       again, without locking up Emacs if the newly added timer is
>> @@ -4646,6 +4648,8 @@ timer_check (void)
>>    else
>>      idle_timers = Qnil;
>>  
>> +  turn_on_atimers (true);
>> +  unblock_input ();
>
> Does input really have to be blocked around this?
>
> The call to `unblock_input' will end up reading async input, which might
> not be safe at that spot.  (The X11 drag and drop code used to suffer
> from this problem, and debugging the resulting crashes was not easy.)

There was apparently a segfault due to an atimer being called while the
copy-sequence was doing done, but it does indeed seem very unlikely.
The inhibit_quit there also seems unlikely to actually do anything.

Can you have a look at the bug thread and see what you think?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master fa52782f5c: Make timer_check even more resilient
  2022-04-29 13:19     ` Lars Ingebrigtsen
@ 2022-04-29 13:24       ` Po Lu
  0 siblings, 0 replies; 4+ messages in thread
From: Po Lu @ 2022-04-29 13:24 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel, Pip Cet

Lars Ingebrigtsen <larsi@gnus.org> writes:

> There was apparently a segfault due to an atimer being called while the
> copy-sequence was doing done, but it does indeed seem very unlikely.
> The inhibit_quit there also seems unlikely to actually do anything.
>
> Can you have a look at the bug thread and see what you think?

I already did and asked a question there.  AFAIK atimers cannot run
Lisp, so it's probably the call to inhibit atimers that's extraneous.

Thanks.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-29 13:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <165123452355.15775.3995648788143039474@vcs2.savannah.gnu.org>
     [not found] ` <20220429121523.D82E8C06322@vcs2.savannah.gnu.org>
2022-04-29 12:40   ` master fa52782f5c: Make timer_check even more resilient Po Lu
2022-04-29 12:53     ` Po Lu
2022-04-29 13:19     ` Lars Ingebrigtsen
2022-04-29 13:24       ` Po Lu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).