From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: master fa52782f5c: Make timer_check even more resilient Date: Fri, 29 Apr 2022 15:19:17 +0200 Message-ID: <87bkwkdo2y.fsf@gnus.org> References: <165123452355.15775.3995648788143039474@vcs2.savannah.gnu.org> <20220429121523.D82E8C06322@vcs2.savannah.gnu.org> <87v8usvz9y.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23980"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Pip Cet , emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 29 15:21:11 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkQYX-0005rZ-GI for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Apr 2022 15:21:09 +0200 Original-Received: from localhost ([::1]:49512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkQYS-0004Om-Rz for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Apr 2022 09:21:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkQWr-0002Zp-OY for emacs-devel@gnu.org; Fri, 29 Apr 2022 09:19:25 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:55700) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkQWq-0002gV-2W for emacs-devel@gnu.org; Fri, 29 Apr 2022 09:19:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VMyb6gp5r+zg0TZzkxCIsvntLpYTvCMY1yoZJpbweao=; b=CcXRpzfI3fhqU2I77xDXE8Co9b zymp2UWjvFvdTOLyY0t28e2YLkGGtKFzAyyJNhiDhbyb9p1Hb+xs7mpMbjkM94sFzNC4AZFgaztAv yLTH8u1uC0ob+WpQn1xOb7KWUk5Mxeh9qyR7IWbeMRd+7YoQyozQEj9oojUwhS8ZB2pY=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkQWl-0000K1-4u; Fri, 29 Apr 2022 15:19:21 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEXMzMv6+vrh4N7g 3t28vLq/vr3AwL7////BuSkCAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+YEHQ0PDjPC2SYAAAGqSURB VDjLdZM7kqQwDIZ/jJvYMr0TW+YCNlzANU11vEHvxkR9/yOMDJhH76KAKutDbwkVZQFAVj51GPLT i4YW8Z4seWbLq6KAXfgKZLFXoN2BgzpacAGdZMQ7MAW0okdFrnJLVhswGSiLqIaTBWapnCIs9bYn EKOk8BHD5W5wDvUBTAICSyg9nIP/SmHSFZlJUohHoJOBmujeQI3x0JI2DTkKaQToDNq4AKP6WwaA R5gVBXgvzkFJsVPH4MY7jYeyCf6crvGoyZGdJs/zoDZXzbP3wVvdxHboebfQr3Gs8caYOoTHDrjW rz8YRYAU6lzw6gq32/TKYHzWnfSM7itwD/f3jQnvCTzgAKh30sVaqpcqHB2A9fgNuLkfrdqBtWzG MTW6LEQBRv6r8S09Xrfkq1TOstHeJTZruzdXObNRFsGQfc6DWy3a/Akx98h8n0Yby5KzO89cXtzN qp7WbFDWftG1cUm3WMwbm3X1f+7D5uDV9jwcDi99Ou7uZlQMzAcoBtug/pFPi02+rsD9ylUuEI3c q73JXHmLEDQvV+YZvkPJdVAGVzGIrsEP4ndbqT8qWnQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjIt MDQtMjlUMTM6MTU6MTQrMDA6MDD9ZIE4AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA0LTI5VDEz OjE1OjE0KzAwOjAwjDk5hAAAAABJRU5ErkJggg== X-Now-Playing: Julia Holter's _Tragedy_: "Godess Eyes" In-Reply-To: <87v8usvz9y.fsf@yahoo.com> (Po Lu's message of "Fri, 29 Apr 2022 20:40:09 +0800") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:288988 Archived-At: Po Lu writes: > Lars Ingebrigtsen 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