X-Loop: help-debbugs@HIDDEN Subject: bug#56487: xgselect race condition leading to abort when USE_GTK not defined Resent-From: Tom Gillespie <tgbugs@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 10 Jul 2022 21:07:02 +0000 Resent-Message-ID: <handler.56487.B.165748717722558 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 56487 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 56487 <at> debbugs.gnu.org X-Debbugs-Original-To: Emacs Bug Report <bug-gnu-emacs@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.165748717722558 (code B ref -1); Sun, 10 Jul 2022 21:07:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Jul 2022 21:06:17 +0000 Received: from localhost ([127.0.0.1]:37855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oAe88-0005rl-QR for submit <at> debbugs.gnu.org; Sun, 10 Jul 2022 17:06:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:38322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <tgbugs@HIDDEN>) id 1oAe87-0005re-Os for submit <at> debbugs.gnu.org; Sun, 10 Jul 2022 17:06:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <tgbugs@HIDDEN>) id 1oAe87-000452-Jc for bug-gnu-emacs@HIDDEN; Sun, 10 Jul 2022 17:06:15 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:39813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <tgbugs@HIDDEN>) id 1oAe85-0003k1-S7 for bug-gnu-emacs@HIDDEN; Sun, 10 Jul 2022 17:06:15 -0400 Received: by mail-pg1-x52b.google.com with SMTP id q82so3192563pgq.6 for <bug-gnu-emacs@HIDDEN>; Sun, 10 Jul 2022 14:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=QdW4G5jgY+0M6g0IIJTyL0E7kTrVLgBIY+sRCh9lctw=; b=lILcMUrdg4fN2q/psOKUu3pSebGkUEuPBHaQTz8Pg2tsPyfuMqdQ/WQ+kw6woI+8d1 xRd6E87KZLFH2rd2L03xCp6ORvSuWL0p/0c9NyDh+MjNw5zt+jiC4Kpw/5afsP5mD4Dp Pn3vWLI1T7c35fAumd0Uu/zzdU5ipwmr+oLqYudtEav93jH1loFc4S44/6cV/e0tEW/i V2bqnqOgIMCXFAb8eSB1f1ktC2CB5kGVzQIZWHYp3ORQoFT+P9zRoxlm4DXKPYu55L2i fx1TKYCxdiQ2/D11lSNNJ3+1uzH0957aJlAS7uCYpBxi6lK42iPtip17sNkNLGb10nyb J50w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=QdW4G5jgY+0M6g0IIJTyL0E7kTrVLgBIY+sRCh9lctw=; b=3Z/pXvXv87AcUvYroTwjTNsW1qlFJ5fFP0bvVd3s9VYY+I/ztawBZWilyxI4uN62Aw tgnEhSI0w1MMCYHgRY4N+n0gWKXH4I+/mBW9ZyC8C0+ZDOV+8ue8TL0y1CBvEnTjD7UE L2mj5AI8UOAw6hqmQGXl2oqY1sDK+fukQLAzfW01JIA4FSkAvy8o1qWKWROKBMlDFEZP Jr66A9t4p25Wx7Qp+Hn18EfC+lXQBoR2sV3TL5gV0wKhDqHjzsBT5NRgbnvjpTGMNOT+ 3IfqiUBWuEQjn+pzZggw82/3AOpcKf41fTMSatqPBMdBJz4ATkEzJZuS1X/+IED3fB2G VbHA== X-Gm-Message-State: AJIora/hudXTn2QunkVy9N8cNEaueX/SU7g/u+0Lr6Tqf2IOfrx1Yja4 WWrm5JvZP7L0IkssdtJXye0GObYO/CfFfDQb88PtsAFMs5o= X-Google-Smtp-Source: AGRyM1uVa62EfQpWMRvUbMPSeX1SXezus9o9O+6AqnYSeQeyhMjyGGxg980sh/S+KNCifuPYxB/azaQ5EK3PvoycXO4= X-Received: by 2002:a05:6a00:ad2:b0:4f1:2734:a3d9 with SMTP id c18-20020a056a000ad200b004f12734a3d9mr15367813pfl.61.1657487169570; Sun, 10 Jul 2022 14:06:09 -0700 (PDT) MIME-Version: 1.0 From: Tom Gillespie <tgbugs@HIDDEN> Date: Sun, 10 Jul 2022 14:05:58 -0700 Message-ID: <CA+G3_PM8-aF+OdLrBg+PPFOmvCMYcVr-VHsASRt0xe4b9E5FYQ@HIDDEN> Content-Type: multipart/mixed; boundary="000000000000f6fe4405e379cd90" Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=tgbugs@HIDDEN; helo=mail-pg1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --000000000000f6fe4405e379cd90 Content-Type: text/plain; charset="UTF-8" There is a race condition in xgselect.c leading to an abort being raised in glib code. I have attached a patch that fixes the issue. It took an absurd amount of time to track this down and debug. The patch and repro file contain more information. This is not the easiest bug to test for because the race condition is non-deterministic, I have attached the elisp file that I use to explore and reproduce the issue. Ensure that you have glib installed and that you are building --with-x so that the code in xgselect is enabled. Run configure as ./configure --with-x-toolkit=lucid (or anything except gtk), and then run make. Assuming process-thread-bugs.el is in the top level of the emacs repo define the following function function loop-abort () { while true; do src/emacs -Q -batch -l \ ./process-thread-bugs.el will abort 1 || return $?; done } You can then run loop-abort; echo $? and when the patch is not applied Emacs will eventually abort. You can also add a call to fputs in thread.c at the location of the comment and you will almost immediately see the abort behavior, even when building with gtk. --000000000000f6fe4405e379cd90 Content-Type: application/x-patch; name="0001-xgselect.c-avoid-race-condition-leading-to-abort.patch" Content-Disposition: attachment; filename="0001-xgselect.c-avoid-race-condition-leading-to-abort.patch" Content-Transfer-Encoding: base64 Content-ID: <f_l5fsxmod0> X-Attachment-Id: f_l5fsxmod0 RnJvbSBlMTIwNzUxYjlkZTc5YmU1MjFmNDkwZjhjMmY5OTU5Nzg2OGIzMjA4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBUb20gR2lsbGVzcGllIDx0Z2J1Z3NAZ21haWwuY29tPgpEYXRl OiBUdWUsIDUgSnVsIDIwMjIgMTM6NDM6MjUgLTA3MDAKU3ViamVjdDogW1BBV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MaWIgc3VicHJvY2Vzc2VzLCB3aGljaCBhZGQgdGhlaXIgb3duCiAgICAgIFNJ R0NITEQgaGFuZGxlciBhdCBhcmJpdHJhcnkgbG9jYXRpb25zLiAgVGhhdCBkb2Vzbid0IHBsYXkg d2VsbAotLSAKMi4zNS4xCgo= --000000000000f6fe4405e379cd90 Content-Type: application/x-lisp; name="process-thread-bugs.el" Content-Disposition: attachment; filename="process-thread-bugs.el" Content-Transfer-Encoding: base64 Content-ID: <f_l5ft0dop1> X-Attachment-Id: f_l5ft0dop1 OzsgLSotIGxleGljYWwtYmluZGluZzogdDsgLSotCgo7OyBtYXhpbXVtIGhlaXNlbmJ1Z3MgaGVy ZQoKOzsgZW1hY3MgMjggYW5kIDI5IHdpbGwgaGFuZyBhbmQgYWJvcnQKOzsgZW1hY3MgMjcgd2ls bCBoYW5nIGJ1dCB3aWxsIG5vdCBhYm9ydCwgYnV0IHRoZSBkZWFkbG9ja3MgaW4gMjcgaGF2ZSBu byB0aW1lb3V0Cgo7OyB0aGVyZSBhcmUgdHdvIGJ1Z3MsIGEgaGFuZyBidWcgYW5kIGFuIGFib3J0 IGJ1Zwo7OyBmb3IgdGhlIGhhbmcgYnVnIGB1cmwtaHR0cC1hc3luYy1zZW50aW5lbCcgYW5kIGB1 cmwtaHR0cC1nZW5lcmljLWZpbHRlcicKOzsgbmV2ZXIgZmlyZSBkdXJpbmcgdGhlIGhhbmcsIHlv dSBjYW4gY29weSB0aGVpciBkZWZpbnRpb25zIGludG8gdGhpcyBmaWxlCjs7IGFuZCBhZGQgYSBt ZXNzYWdlIHdoZW4gdGhleSBmaXJlIHRvIHNlZSB0aGF0IHRoaXMgaXMgdGhlIGNhc2UgaWYgeW91 IHdhbnQKOzsgdG8gdmVyaWZ5IG9uIHlvdXIgc3lzdGVtCgo7OyBoYXBwZW5zIG9uIGdlbnRvbyBt dXNsIHdpdGggeG9yZwo7OyBoYXBwZW5zIG9uIGFscGluZSB3aGVuIGdsaWIgQU5EIHhvcm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ICJwczogJVMiIChwcm9j ZXNzLXNlbnRpbmVsIHByb2Nlc3MpKSkKICAgICh3aGlsZSAobm90IGRvbmUpIChzbGVlcC1mb3Ig MC4xKSAobWVzc2FnZSBtZXNzYWdlKSkKICAgIChjbC1sb29wIGZvciBwIGluIChwcm9jZXNzLWxp c3QpIGRvCiAgICAgICAgICAgICAod2hlbiAoZXEgKHByb2Nlc3MtdHlwZSBwKSAnbmV0d29yaykK ICAgICAgICAgICAgICAgKHN0b3AtcHJvY2VzcyBwKQogICAgICAgICAgICAgICAoZGVsZXRlLXBy b2Nlc3MgcCkpKSkpCgooZGVmdW4gaW5zdWZmaWNpZW50LXRvLWVuYWJsZS1hYm9ydC0wICgpCiAg KGxldCogKChwZXJyIChtYWtlLXBpcGUtcHJvY2VzcwogICAgICAgICAgICAgICAgOm5hbWUgInBl cnIgcHJvY2VzcyBpbmVhLTAiKSkKICAgICAgICAgKHBvdXQgKG1ha2UtcHJvY2VzcwogICAgICAg ICAgICAgICAgOm5hbWUgInBvdXQgcHJvY2VzcyBpbmVhLTAiCiAgICAgICAgICAgICAgICA6c3Rk ZXJyIHBlcnIKICAgICAgICAgICAgICAgIDpjb21tYW5kICcoInRydWUiKSkpKQogICAgKGxldCAo KHRvdXQgKG1ha2UtdGhyZWFkIChsYW1iZGEgKCkgKHdoaWxlIChhY2NlcHQtcHJvY2Vzcy1vdXRw dXQgcG91dCkpKSkpCiAgICAgICAgICAodGVyciAobWFrZS10aHJlYWQgKGxhbWJkYSAoKSAod2hp bGUgKGFjY2VwdC1wcm9jZXNzLW91dHB1dCBwZXJyKSkpKSkpKSkpCgooZGVmdW4gaW5zdWZmaWNp ZW50LXRvLWVuYWJsZS1hYm9ydC0xICgpCiAgKGxldCogKChwZXJyIChtYWtlLXBpcGUtcHJvY2Vz cwogICAgICAgICAgICAgICAgOm5hbWUgInBlcnIgcHJvY2VzcyBpbmVhLTEiKSkKICAgICAgICAg KHBvdXQgKG1ha2UtcHJvY2VzcwogICAgICAgICAgICAgICAgOm5hbWUgInBvdXQgcHJvY2VzcyBp bmVhLTEiCiAgICAgICAgICAgICAgICA6c3RkZXJyIHBlcnIKICAgICAgICAgICAgICAgIDpjb21t YW5kICcoInRydWUiKSkpKQogICAgKGxldCAoKHRvdXQgKG1ha2UtdGhyZWFkIChsYW1iZGEgKCkg KHdoaWxlIChhY2NlcHQtcHJvY2Vzcy1vdXRwdXQgcG91dCkpKSkpCiAgICAgICAgICAodGVyciAo bWFrZS10aHJlYWQgKGxhbWJkYSAoKSAod2hpbGUgKGFjY2VwdC1wcm9jZXNzLW91dHB1dCBwZXJy KSkpKSkpCiAgICAgIChzZXQtcHJvY2Vzcy10aHJlYWQgcG91dCB0b3V0KSkpKQoKKGRlZnVuIGVu YWJsZS1hYm9ydCAoKQogIChsZXQqICgocGVyciAobWFrZS1waXBlLXByb2Nlc3MKICAgICAgICAg ICAgICAgIDpuYW1lICJwZXJyIHByb2Nlc3MgYWJvcnQiKSkKICAgICAgICAgKHBvdXQgKG1ha2Ut cHJvY2VzcwogICAgICAgICAgICAgICAgOm5hbWUgInBvdXQgcHJvY2VzcyBhYm9ydCIKICAgICAg ICAgICAgICAgIDpzdGRlcnIgcGVycgogICAgICAgICAgICAgICAgOmNvbW1hbmQgJygidHJ1ZSIp KSkpCiAgICAobGV0ICgodG91dCAobWFrZS10aHJlYWQgKGxhbWJkYSAoKSAod2hpbGUgKGFjY2Vw dC1wcm9jZXNzLW91dHB1dCBwb3V0KSkpKSkKICAgICAgICAgICh0ZXJyIChtYWtlLXRocmVhZCAo bGFtYmRhICgpICh3aGlsZSAoYWNjZXB0LXByb2Nlc3Mtb3V0cHV0IHBlcnIpKSkpKSkKICAgICAo c2V0LXByb2Nlc3MtdGhyZWFkIHBlcnIgdGVycikpKSkKCihkZWZ1biBlbmFibGUtYWJvcnQtMiAo KQogIChsZXQqICgocGVyciAobWFrZS1waXBlLXByb2Nlc3MKICAgICAgICAgICAgICAgIDpuYW1l ICJwZXJyIHByb2Nlc3MgZW5hYmxlIGFib3J0IDIiKSkKICAgICAgICAgKHBvdXQgKG1ha2UtcHJv Y2VzcwogICAgICAgICAgICAgICAgOm5hbWUgInBvdXQgcHJvY2VzcyBlbmFibGUgYWJvcnQgMiIK ICAgICAgICAgICAgICAgIDpzdGRlcnIgcGVycgogICAgICAgICAgICAgICAgOmNvbW1hbmQgJygi dHJ1ZSIpKSkpCiAgICAobGV0ICgodG91dCAobWFrZS10aHJlYWQgKGxhbWJkYSAoKSAod2hpbGUg KGFjY2VwdC1wcm9jZXNzLW91dHB1dCBwb3V0KSkpKSkKICAgICAgICAgICh0ZXJyIChtYWtlLXRo cmVhZCAobGFtYmRhICgpICh3aGlsZSAoYWNjZXB0LXByb2Nlc3Mtb3V0cHV0IHBlcnIpKSkpKQog ICAgICAgICAgKHRsb2wgKG1ha2UtdGhyZWFkIChsYW1iZGEgKCkgbmlsKSkpKQogICAgICAoc2V0 LXByb2Nlc3MtdGhyZWFkIHBvdXQgdG91dCkKICAgICAgKHNldC1wcm9jZXNzLXRocmVhZCBwZXJy IHRlcnIpCiAgICAgIDs7IHR1cm5zIG91dCBBTlkgdGhyZWFkLWpvaW4gd2lsbCBkbz8KICAgICAg OzsgYXQgbGVhc3QgZm9yIGEgY29tbWFuZCB0aGF0IHJldHVybnMgYXMgcXVpY2tseSBhcyAidHJ1 ZSIKICAgICAgKHRocmVhZC1qb2luIHRsb2wpKSkpCgooZGVmdW4gbWF5YmUtdHJpZ2dlci1hYm9y dCAoKQogIChsZXQqICgocGVyciAobWFrZS1waXBlLXByb2Nlc3MKICAgICAgICAgICAgICAgIDpu YW1lICJwZXJyIHByb2Nlc3MiKSkKICAgICAgICAgKHBvdXQgKG1ha2UtcHJvY2VzcwogICAgICAg ICAgICAgICAgOm5hbWUgInBvdXQgcHJvY2VzcyIKICAgICAgICAgICAgICAgIDpzdGRlcnIgcGVy cgogICAgICAgICAgICAgICAgOzsgdHVybnMgb3V0IG5vIGRlbGF5IGlzIHJlcXVpcmVkIC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B1cCB0aGUgbmV0d29yayBwcm9jZXNzIHNv IHRoYXQgYnJhbmNoIGlzIHJlbW92ZWQKICA7OyBhIGNhbGwgdG8gYG1ha2UtbmV0d29yay1wcm9j ZXNzJyBkb2VzIG5vdCBoYXZlIHRoZSBlZmZlY3QsIGV2ZW4gaWYgYHVybC1odHRwJyBkb2Vzbid0 IGVpdGhlcgogIChtYXliZS10cmlnZ2VyLWhhbmcgImh0dHA6Ly9leGFtcGxlLm9yZy8iICJwcm90 ZWN0aXZlIikpCgooY29uZAogKChjbGljYXNlICJ3b250IiAiaGFuZyIpICAgICAgKHdvbnQtaGFu ZykpCiAoKGNsaWNhc2UgIndpbGwiICJoYW5nIiAiMSIpICAod2lsbC1oYW5nLTEpKQogKChjbGlj YXNlICJ3aWxsIiAiaGFuZyIgIjIiKSAgKHdpbGwtaGFuZy0yKSkKCiAoKGNsaWNhc2UgIndvbnQi ICJhYm9ydCIgIjEiKSAod29udC1hYm9ydC0xKSkKICgoY2xpY2FzZSAid29udCIgImFib3J0IiAi MiIpICh3b250LWFib3J0LTIpKQogKChjbGljYXNlICJ3b250IiAiYWJvcnQiICIzIikgKHdvbnQt YWJvcnQtMykpCgogOzsgdGhpcyB3aWxsIGhhbmcgd2hlbiBwcm90ZWN0ZWQgdmlhIHdvbnQtaGFu ZwogKChjbGljYXNlICJ3aWxsIiAiYWJvcnQiICIxIikgKHdpbGwtYWJvcnQtMSkpCiA7OyB0aGlz IHdpbGwgTk9UIGhhbmcgd2hlbiBwcm90ZWN0ZWQgdmlhIHdvbnQtaGFuZyBwcm9iYWJseSBiZWNh dXNlIHRoZXJlIGlzIG9ubHkgb25lIGFjY2VwdD8KICgoY2xpY2FzZSAid2lsbCIgImFib3J0IiAi MiIpICh3aWxsLWFib3J0LTIpKQogKHQgKGVycm9yICJ1bmtub3duIHRlc3QgY2FzZSIpKSkK --000000000000f6fe4405e379cd90--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Tom Gillespie <tgbugs@HIDDEN> Subject: bug#56487: Acknowledgement (xgselect race condition leading to abort when USE_GTK not defined) Message-ID: <handler.56487.B.165748717722558.ack <at> debbugs.gnu.org> References: <CA+G3_PM8-aF+OdLrBg+PPFOmvCMYcVr-VHsASRt0xe4b9E5FYQ@HIDDEN> X-Gnu-PR-Message: ack 56487 X-Gnu-PR-Package: emacs Reply-To: 56487 <at> debbugs.gnu.org Date: Sun, 10 Jul 2022 21:07:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 56487 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 56487: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D56487 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#56487: xgselect race condition leading to abort when USE_GTK not defined Resent-From: Po Lu <luangruo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 11 Jul 2022 01:54:02 +0000 Resent-Message-ID: <handler.56487.B56487.165750442018514 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 56487 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tom Gillespie <tgbugs@HIDDEN> Cc: 56487 <at> debbugs.gnu.org Received: via spool by 56487-submit <at> debbugs.gnu.org id=B56487.165750442018514 (code B ref 56487); Mon, 11 Jul 2022 01:54:02 +0000 Received: (at 56487) by debbugs.gnu.org; 11 Jul 2022 01:53:40 +0000 Received: from localhost ([127.0.0.1]:38053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oAicG-0004oX-3u for submit <at> debbugs.gnu.org; Sun, 10 Jul 2022 21:53:40 -0400 Received: from sonic315-21.consmr.mail.ne1.yahoo.com ([66.163.190.147]:42533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <luangruo@HIDDEN>) id 1oAicD-0004o5-Ml for 56487 <at> debbugs.gnu.org; Sun, 10 Jul 2022 21:53:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657504411; bh=Def8Z0A+rD0BIRvc7x++VtiMkHowZ5hy3mNms14rrEU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=ZGe+mvdt+QxF2G6bhiIZ9WzJJsbLH+wIhKxtX11Vek9NSsBfu+RulC7o8AMZDHOBalqB75YItHYh6u+7+tioxjMWlMuUZFlpfFBVLb9+ZXoE4AzukD/5H7C+wc5YvAhPVX0a0kb586WdE+1pEfz++c+XqKf6fD9QyCTFIYrftfRteSGNyRwO5esAfsyq/SgBAu6zRxPKA0NP/y7qsqj68XWkYQmtSUoa9b42eWN4SwyO4R9IRjLxqKxcU2PtK5+JJBQLio7mZs5lIxWgY+/ia9KrKHw132z+c7rEwmrKdUGMXz1xKCuj90PYah98kVdjP0lpqSAhdQnqWxPnK9ZsEA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657504411; bh=M7Y5jxmWmYAnJc9DPKojVHcwUPfBvIjzEolNlRli4eU=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=EheJkCbEJFB9gI54ncB5kZRIxmyJTgaPg8nw/yTysFP4lis2dXny1YH8eiLEp3WHXwtZ/6RzZ6PExoCg972iIiWgHWFfHiUTIPLS4oaodXqST+sk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K88stp.xkUBD...qU4sXuIRTDikk6LkRExSJYVBVba2N1caFztSFovAqPxxmwkHm pU4qpKr3WNw1QVB9hGVWaIy7jvt5TOQNxCUA8kGxinDd0F2DiYNM0LsY2jtAPzM2DlqKjKeaga6L 405pwJjoh8cAMmY.oLqAQWDI5hliqXLg5pjgl.nOPYqppG_j7K08Gq.uCzzMTBOwB6rtwwPhsfF7 k5biU1EVmyHqu6sxOeF79ghZDIGSl718oFHudQu0M82pgvalyxD9HNzrsR6ZTyeRtKgMpBKjVLMo 3clBUYXJhlv0rmhQ98VKuLIzruYnG1FEnSMo_nXR8O5cMXRRNRnOTCpe7ckmpm0ZsdepTAqQw5qm KqiNd7vNuydxLnp13TBdTCC52ese7FhxAmEtCmIXeUk35Lz0TU0X6XEZn1qAdJw-- X-Sonic-MF: <luangruo@HIDDEN> Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.ne1.yahoo.com with HTTP; Mon, 11 Jul 2022 01:53:31 +0000 Received: by hermes--canary-production-sg3-67975bbd4b-hh5lh (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 01e1a68af9875030d08f6c6f5590b579; Mon, 11 Jul 2022 01:53:26 +0000 (UTC) From: Po Lu <luangruo@HIDDEN> References: <CA+G3_PM8-aF+OdLrBg+PPFOmvCMYcVr-VHsASRt0xe4b9E5FYQ@HIDDEN> Date: Mon, 11 Jul 2022 09:53:22 +0800 In-Reply-To: <CA+G3_PM8-aF+OdLrBg+PPFOmvCMYcVr-VHsASRt0xe4b9E5FYQ@HIDDEN> (Tom Gillespie's message of "Sun, 10 Jul 2022 14:05:58 -0700") Message-ID: <871qus1kkt.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20381 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 2484 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Tom Gillespie <tgbugs@HIDDEN> writes: > From e120751b9de79be521f490f8c2f99597868b3208 Mon Sep 17 00:00:00 2001 > From: Tom Gillespie <tgbugs@HIDDEN> > Date: Tue, 5 Jul 2022 13:43:25 -0700 > Subject: [PATCH] xgselect.c: avoid race condition leading to abort > > xgselect.c (xg_select): Remove ifdefs that were previously USE_GTK > specific to be unconditional. This prevents a race condition caused by > a call to release_select_lock from triggering when configuring Emacs > with any toolkit other than gtk. > > xgselect.c (release_select_lock): Add a branch to check whether > threads_holding_glib_lock has gone negative, and if so, restore to zero. > In the case where there are multiple threads, threads_holding_glib_lock > could become and stay negative, prevending g_main_context_release from > ever being called, even when it should have been. > > As far as I can tell the way that the thread.c and xgselect.c code was > written was with the intention of avoiding additional locks. This means > that this code is exquisitely senstivie to slight changes in timing. A > comment in thread.c has been added at one location where this happens. > > It is entirely possible that the removal of the ifdefs branching on > USE_GTK resolves this issue by slightly changing the timings when > using other/no toolkits so that the abort does not trigger. In all > cases aborts can be induced by adding something like fputs in thread.c > at the location of the new comment. > > For the record, the abort behavior is not present in Emacs 27, and was > introduced by 9c62ffb08262c82b7e38e6eb5767f2087424aa47 (the bisect was > quite a pain, so hopefully no one ever needs to do it again). Thanks. The commit message does not really comply with our style, however. The ChangeLog entries should look like this instead: * src/xgselect.c (xg_select): Remove ifdefs that were previously USE_GTK specific to be unconditional. This prevents a race condition caused by a call to release_select_lock from triggering when configuring Emacs with any toolkit other than GTK. (release_select_lock): Add a branch to check whether threads_holding_glib_lock has gone negative, and if so, restore to zero. In the case where there are multiple threads, threads_holding_glib_lock could become and stay negative, prevending g_main_context_release from ever being called, even when it should have been. You can use C-c C-w inside a *vc-log* buffer to generate an appropriately formatted commit message.
X-Loop: help-debbugs@HIDDEN Subject: bug#56487: xgselect race condition leading to abort when USE_GTK not defined Resent-From: Tom Gillespie <tgbugs@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 11 Jul 2022 02:51:02 +0000 Resent-Message-ID: <handler.56487.B56487.165750782824013 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 56487 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 56487 <at> debbugs.gnu.org Cc: Po Lu <luangruo@HIDDEN> Received: via spool by 56487-submit <at> debbugs.gnu.org id=B56487.165750782824013 (code B ref 56487); Mon, 11 Jul 2022 02:51:02 +0000 Received: (at 56487) by debbugs.gnu.org; 11 Jul 2022 02:50:28 +0000 Received: from localhost ([127.0.0.1]:38090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oAjVE-0006FD-0c for submit <at> debbugs.gnu.org; Sun, 10 Jul 2022 22:50:28 -0400 Received: from mail-pl1-f172.google.com ([209.85.214.172]:40715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <tgbugs@HIDDEN>) id 1oAjVC-0006Ev-WC for 56487 <at> debbugs.gnu.org; Sun, 10 Jul 2022 22:50:27 -0400 Received: by mail-pl1-f172.google.com with SMTP id b2so3325993plx.7 for <56487 <at> debbugs.gnu.org>; Sun, 10 Jul 2022 19:50:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fK1IRhNmUzOAZsBQaBEwJQloklV9QpgFaBPkjKkIewo=; b=eYIhFd9ZyRlJqzRced/9HnaiWynZPyFUxvu0CUG7zpxRz1i40RxPjXgphUXpoqQSZt PJgcU37yL037w7AIozdZ3UrSAyiBq/Kf+GnT/rTvM4AynGgAnZQ5nTosrRnLI45r7GuH GgjhHIPPaHUjbciJSiYG9PKig1xP7AkEg/OIgubFLh2E1NaYm4FxgmKgxyX2Gdu6HQWb eFbiluwKfyZBO1JMBtxjDaFMPSUCtmRPlqPogwiy/6JzC4WU07K58Or2RueteTACjO4U Gf2iUIuBPg2VgSn6bfhB3PUSqWrJ/zekPY/Po/6RxSSbMhQL5/kmvezfn3MRiB6fakwq wcmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fK1IRhNmUzOAZsBQaBEwJQloklV9QpgFaBPkjKkIewo=; b=eyWA0gcNmEUtSyTIyAbmCKkO+8VOVo3azKhCx3QYE5BnjU7Bg9ZdQWQS/Sa9B/QAPW Wo1dP1WcPSYXmGYUaKS9ckENeBmybGzA8ExJRhFNh20cig9zeLJgHJqruurMrMnMz8q5 r/tF2nP+ur55h8FUaGzWubLcH9cMKPm6ThZ0vkD4Fr8+I+Fdwzq2lx/INtCjUr4T8kNZ YmX6mlQvW8DHDo3juMddj0JqGrISaXc2NatauRbYH/ygsmG1j1YU6N6TEubfBNCcv9kh rmRsAAKHSUiwvZehXkgs9aKh0eLR3q+dDzGVChGn74R3NujRC+IUm4kxypzgBFqKUwk/ briw== X-Gm-Message-State: AJIora94vA8Yi6Ud6xc2jR3ZHQLOVwlnpqLylo2+ZZv174OqfTr6z6es T+xzPFdFpkzzIPPfHgHGaFlbrVwke4z5osmgYw19t/mg X-Google-Smtp-Source: AGRyM1vuahhVFTWs0E6nB1eWpiO1DGhFjY9DngGdBwRfureOZST7m7NrlXGN/grs9vwu/oDOo3+u+5OyoK5mkw9GUIY= X-Received: by 2002:a17:902:7244:b0:16b:d4a8:b92e with SMTP id c4-20020a170902724400b0016bd4a8b92emr16511275pll.16.1657507820731; Sun, 10 Jul 2022 19:50:20 -0700 (PDT) MIME-Version: 1.0 References: <CA+G3_PM8-aF+OdLrBg+PPFOmvCMYcVr-VHsASRt0xe4b9E5FYQ@HIDDEN> <871qus1kkt.fsf@HIDDEN> In-Reply-To: <871qus1kkt.fsf@HIDDEN> From: Tom Gillespie <tgbugs@HIDDEN> Date: Sun, 10 Jul 2022 19:50:08 -0700 Message-ID: <CA+G3_PP-xUHs-XtoiV_xvnFVydY7-LQqTSL3BUGj_Vg=iWaCmg@HIDDEN> Content-Type: multipart/mixed; boundary="000000000000de4b4305e37e9c30" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --000000000000de4b4305e37e9c30 Content-Type: text/plain; charset="UTF-8" Here is (I think) the patch with correctly formatted change log entries. --000000000000de4b4305e37e9c30 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-xgselect.c-avoid-race-condition-leading-to-abort.patch" Content-Disposition: attachment; filename="0001-xgselect.c-avoid-race-condition-leading-to-abort.patch" Content-Transfer-Encoding: base64 Content-ID: <f_l5g5cdc50> X-Attachment-Id: f_l5g5cdc50 RnJvbSBiM2E3YzU3MTViMTk5YzljZTkzNWE5MDFkMmViMDJmMjM4YWYwNzY5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBUb20gR2lsbGVzcGllIDx0Z2J1Z3NAZ21haWwuY29tPgpEYXRl OiBUdWUsIDUgSnVsIDIwMjIgMTM6NDM6MjUgLTA3MDAKU3ViamVjdDogW1BBVENIXSB4Z3NlbGVj dC5jOiBhdm9pZCByYWNlIGNvbmRpdGlvbiBsZWFkaW5nIHRvIGFib3J0CgoqIHNyYy94Z3NlbGVj dC5jICh4Z19zZWxlY3QpOiBSZW1vdmUgaWZkZWZzIHRoYXQgd2VyZSBwcmV2aW91c2x5IFVTRV9H VEsKc3BlY2lmaWMgdG8gYmUgdW5jb25kaXRpb25hbC4gVGhpcyBwcmV2ZW50cyBhIHJhY2UgY29u ZGl0aW9uIGNhdXNlZCBieQphIGNhbGwgdG8gcmVsZWFzZV9zZWxlY3RfbG9jayBmcm9tIHRyaWdn ZXJpbmcgd2hlbiBjb25maWd1cmluZyBFbWFjcwp3aXRoIGFueSB0b29sa2l0IG90aGVyIHRoYW4g Z3RrLgoocmVsZWFzZV9zZWxlY3RfbG9jayk6IEFkZCBhIGJyYW5jaCB0byBjaGVjayB3aGV0aGVy CnRocmVhZHNfaG9sZGluZ19nbGliX2xvY2sgaGFzIGdvbmUgbmVnYXRpdmUsIGFuZCBpZiBzbywg cmVzdG9yZSB0bwp6ZXJvLiAgSW4gdGhlIGNhc2Ugd2hlcmUgdGhlcmUgYXJlIG11bHRp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CkKICAgICByZXR2YWwgPSBuZmRzOwpAQCAtMjQ4LDExICsyNDcsNyBAQCB4Z19zZWxlY3Qg KGludCBmZHNfbGltLCBmZF9zZXQgKnJmZHMsIGZkX3NldCAqd2ZkcywgZmRfc2V0ICplZmRzLAog CiAgIC8qIElmIEd0aysgaXMgaW4gdXNlIGV2ZW50dWFsbHkgZ3RrX21haW5faXRlcmF0aW9uIHdp bGwgYmUgY2FsbGVkLAogICAgICB1bmxlc3MgcmV0dmFsIGlzIHplcm8uICAqLwotI2lmZGVmIFVT RV9HVEsKICAgbmVlZF90b19kaXNwYXRjaCA9IHJldHZhbCA9PSAwOwotI2Vsc2UKLSAgbmVlZF90 b19kaXNwYXRjaCA9IHRydWU7Ci0jZW5kaWYKIAogICAvKiB4d2lkZ2V0cyBtYWtlIGhlYXZ5IHVz ZSBvZiBHTGliIHN1YnByb2Nlc3Nlcywgd2hpY2ggYWRkIHRoZWlyIG93bgogICAgICBTSUdDSExE IGhhbmRsZXIgYXQgYXJiaXRyYXJ5IGxvY2F0aW9ucy4gIFRoYXQgZG9lc24ndCBwbGF5IHdlbGwK LS0gCjIuMzUuMQoK --000000000000de4b4305e37e9c30--
X-Loop: help-debbugs@HIDDEN Subject: bug#56487: xgselect race condition leading to abort when USE_GTK not defined Resent-From: Po Lu <luangruo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 11 Jul 2022 03:14:01 +0000 Resent-Message-ID: <handler.56487.B56487.165750920426130 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 56487 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tom Gillespie <tgbugs@HIDDEN> Cc: 56487 <at> debbugs.gnu.org Received: via spool by 56487-submit <at> debbugs.gnu.org id=B56487.165750920426130 (code B ref 56487); Mon, 11 Jul 2022 03:14:01 +0000 Received: (at 56487) by debbugs.gnu.org; 11 Jul 2022 03:13:24 +0000 Received: from localhost ([127.0.0.1]:38097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oAjrQ-0006nO-4N for submit <at> debbugs.gnu.org; Sun, 10 Jul 2022 23:13:24 -0400 Received: from sonic304-20.consmr.mail.ne1.yahoo.com ([66.163.191.146]:44781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <luangruo@HIDDEN>) id 1oAjrN-0006n9-Ps for 56487 <at> debbugs.gnu.org; Sun, 10 Jul 2022 23:13:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657509195; bh=DFexJaCi9aOJVXP9J3BmcOsGw8jOAa+CnQg0g5+Smis=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=CHT7L8S5BpkWC+3Jwk5XH5yuMWmEFMs4LkSDUBqX3ZSovDcScc3KbtzRRDNw2k6gq/bfFjr/Pq2PquhheK+jQw2qba5wC4kqAdVruhQ6XxMYYghcmjFiW/aLDZ7Xp4P5leSvMzqskalf3K2NdYQLYHcqrJ097xk5RbRxpT65+NW8OuqaajRsv4hs0VS9EnBlxwASLcS0JUpfmD6ZeBig0zyv9QMTAcTwnQNgjDSnGmkxvfYsRv7qNN41A9irm3/V0IPJ9zHHkdsx3h+vMUD+DXw9/79WXjxb97QsLcK0ssqvd60IjXV4iurZzi/2U3+PNCP0/zwaV2VOmbG8P4HzMA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657509195; bh=14U6JrkWOhC/YzRtytpm8msAj8XHw5dkVAjSJEGd72o=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=ZQ3FEXfMGYvoO9Hl3idgVznbK4eWE5gwOr1+gtFgHoh617c/zsESruqCL/VBU5LJUAypnhWfHu3y6lM0YoK2B6lV7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iRKw_WWWjP59eq2H_E rOUPoUKGje6nDUaC2uRyhauFiC9Ulff51BR2tOspGuP24oceqvWoZAr5RaoiT60j2nx6ljmHBmn8 5DSR5uwB9WJIqzAdLNearVst95k23mceRnklGBDyp8B_3B_vpRtQzvMpJw9TDugz5Oo_w1bYMEFu Rzs4eFisrGAMaxpgqvQl9DnOGgQC9yPtJNl9_MGzeWW4.41WawYUWlJ2ijSEROO0AK3KnSkmqqIh hMm5hoziTSdPPDv95XbTR0HmHTlm.3PN7F2aGbNuE9PRBm1VErRT7jnOHhNKg9J4WbcPV94K126W ddk6cIGKw6kLboRY1xtUMfcalxABZ52jNeOXB0oErcixH0jkW4twUApu5JNbQyQQhPSnHHZmeoA9 noc_J4jmit.yTkb6YWe0I4DX.Yy3yEFWqVeuAhV293ZnjpdD5NqhUfUH_ZWfMhQ-- X-Sonic-MF: <luangruo@HIDDEN> Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Mon, 11 Jul 2022 03:13:15 +0000 Received: by hermes--canary-production-sg3-67975bbd4b-w2clr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 2ed4ea7632ac2e7c9bb6dc343d46ac18; Mon, 11 Jul 2022 03:13:08 +0000 (UTC) From: Po Lu <luangruo@HIDDEN> References: <CA+G3_PM8-aF+OdLrBg+PPFOmvCMYcVr-VHsASRt0xe4b9E5FYQ@HIDDEN> <871qus1kkt.fsf@HIDDEN> <CA+G3_PP-xUHs-XtoiV_xvnFVydY7-LQqTSL3BUGj_Vg=iWaCmg@HIDDEN> Date: Mon, 11 Jul 2022 11:13:04 +0800 In-Reply-To: <CA+G3_PP-xUHs-XtoiV_xvnFVydY7-LQqTSL3BUGj_Vg=iWaCmg@HIDDEN> (Tom Gillespie's message of "Sun, 10 Jul 2022 19:50:08 -0700") Message-ID: <87v8s4z6in.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20381 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1737 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Tom Gillespie <tgbugs@HIDDEN> writes: > -#ifdef USE_GTK > bool already_has_events; > -#endif > > if (xg_select_suppress_count) > return pselect (fds_lim, rfds, wfds, efds, timeout, sigmask); > @@ -126,8 +132,8 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, > context = g_main_context_default (); > acquire_select_lock (context); > > -#ifdef USE_GTK > already_has_events = g_main_context_pending (context); > +#ifdef USE_GTK > #ifndef HAVE_PGTK > already_has_events = already_has_events && x_gtk_use_native_input; > #endif > @@ -179,12 +185,6 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, > tmop = &tmo; > } > > -#ifndef USE_GTK > - fds_lim = max_fds + 1; > - nfds = thread_select (pselect, fds_lim, > - &all_rfds, have_wfds ? &all_wfds : NULL, efds, > - tmop, sigmask); > -#else > /* On PGTK, when you type a key, the key press event are received, > and one more key press event seems to be received internally. > > @@ -217,7 +217,6 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, > FD_ZERO (efds); > our_fds++; > } > -#endif > > if (nfds < 0) > retval = nfds; > @@ -248,11 +247,7 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, > > /* If Gtk+ is in use eventually gtk_main_iteration will be called, > unless retval is zero. */ > -#ifdef USE_GTK > need_to_dispatch = retval == 0; > -#else > - need_to_dispatch = true; > -#endif > > /* xwidgets make heavy use of GLib subprocesses, which add their own > SIGCHLD handler at arbitrary locations. That doesn't play well Thanks. Why did the code previously under !USE_GTK have to be removed?
X-Loop: help-debbugs@HIDDEN Subject: bug#56487: xgselect race condition leading to abort when USE_GTK not defined Resent-From: Tom Gillespie <tgbugs@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 11 Jul 2022 03:42:02 +0000 Resent-Message-ID: <handler.56487.B56487.165751086328901 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 56487 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Po Lu <luangruo@HIDDEN> Cc: 56487 <at> debbugs.gnu.org Received: via spool by 56487-submit <at> debbugs.gnu.org id=B56487.165751086328901 (code B ref 56487); Mon, 11 Jul 2022 03:42:02 +0000 Received: (at 56487) by debbugs.gnu.org; 11 Jul 2022 03:41:03 +0000 Received: from localhost ([127.0.0.1]:38111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oAkIA-0007W1-Ng for submit <at> debbugs.gnu.org; Sun, 10 Jul 2022 23:41:03 -0400 Received: from mail-pl1-f176.google.com ([209.85.214.176]:47033) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <tgbugs@HIDDEN>) id 1oAkI8-0007VR-NO for 56487 <at> debbugs.gnu.org; Sun, 10 Jul 2022 23:41:01 -0400 Received: by mail-pl1-f176.google.com with SMTP id l12so3372572plk.13 for <56487 <at> debbugs.gnu.org>; Sun, 10 Jul 2022 20:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BQq/IhS5WMCA5erEgzUX3aF6CUyKEFCtYOK1APcW1wI=; b=UPABnzWIdnAhkdafiM1Pj0clxv8ExB+IOtEvANY79YcgC/+PjQGD7gF3fmn88CwK1a nKJDM9dmAGi3yFpPWxmNEwDa70cLbbngD0YBTsmQcE4hNp2+5Yd9RWRRiKE+SZWtqo2B 6lI88ybN6wtxXU25HxJmYilm1kAL0YxF6UwV2MWncU/D7Xhi2TNX93ET0K4K3r7TCME3 q0tWeV2XwDjwAlNN5IVmDxWd4nxuVFyqRhcGAWPQvfgNLxzsmZPyTvLyX9qpFvHUxW1f Fl3eweQlBr4R3uZnFOI3pfpySKzX2Myf+CBABAHRFinE6qOLLXS9xKBCXnMA8o72Vcm0 hbzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BQq/IhS5WMCA5erEgzUX3aF6CUyKEFCtYOK1APcW1wI=; b=DXTlUro8y3mEtYRKxfXQeLRZbNTP4ifjmifYixNwrkrbyaGA39Wd0xn5jUu3yP79z6 Tv/seTeAQY05QHk15sy3ivw0VWPU/vP3moDo6QmP9Ge+R5IlAo1YbF+4QoACoTpykQnC qGc+rouBShBVt4cUshdNci26r7X0jz53oWaolV8uYtREfITFGsrwTHZVPuEg/axHdp2Q A/gDLLwa/Y1jZz+BlFwCAi74Lbsv27W0JFcK/epbtHeiHlbwbtPenA8W1fP/GvWepNri LbPTc2YAXOIHkekz8RuLgOsXaJ5AfKzCWcbnawdYpNP+hDjNkKMBYEd4Jtg/hH8UxTzR 8vrg== X-Gm-Message-State: AJIora8oVCIxjZbbo6cLoXDeikjVBkWumOkfuA1l1ralSbk6/VYqJFet 2TbbdKeheV7AF4Q3dqlOG2dFHNwpKX332HavvUI= X-Google-Smtp-Source: AGRyM1vmjw/QVdrXr7XuCCZdS02cgytGScvUF3Tpu0zlAH2cELEPXXx+e9WqRYsxzf3BJgh/PNucpKkCdWxfLHGCSq4= X-Received: by 2002:a17:902:7c13:b0:16a:4e69:a5c3 with SMTP id x19-20020a1709027c1300b0016a4e69a5c3mr16621120pll.132.1657510854834; Sun, 10 Jul 2022 20:40:54 -0700 (PDT) MIME-Version: 1.0 References: <CA+G3_PM8-aF+OdLrBg+PPFOmvCMYcVr-VHsASRt0xe4b9E5FYQ@HIDDEN> <871qus1kkt.fsf@HIDDEN> <CA+G3_PP-xUHs-XtoiV_xvnFVydY7-LQqTSL3BUGj_Vg=iWaCmg@HIDDEN> <87v8s4z6in.fsf@HIDDEN> In-Reply-To: <87v8s4z6in.fsf@HIDDEN> From: Tom Gillespie <tgbugs@HIDDEN> Date: Sun, 10 Jul 2022 20:40:43 -0700 Message-ID: <CA+G3_PPBPD-sM2Trtw0818wX=VfCU2ULTV+25TVuKh1t1Qouvw@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > Thanks. Why did the code previously under !USE_GTK have to be removed? When the !USE_GTK code is used an abort in glib will happen stochastically due to an out-of-sync call to release_select_lock in thread.c. This happens on my system somewhere between approximately 1 in 10 and 1 in 10000 times that the test file is run. As far as I can tell from testing there is no difference in behavior between the USE_GTK and !USE_GTK code. Also, as far as I can tell from reading, the behavior should be almost identical. The only addition is to check for already_has_events before calling thread_select, which may be enough to shift the timing to prevent a race. I have not been able to figure out what the actual underlying cause is (I tried). All I can say for sure is that there is something that calls into g_main_context_release and context->owner_count has a negative overflow to 4294967295. I do not think that it is because something somehow sneaks in between the calls to the atomics in acquire_select_lock and relese_select_lock. If you would like I can send along a couple of patches that include changes I made to try to see what is going on. The real underlying issue would seem to be that there is a missing lock somewhere and that the use of atomics is not sufficient, but I could be wrong about that.
Received: (at control) by debbugs.gnu.org; 11 Jul 2022 10:03:54 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 11 06:03:54 2022 Received: from localhost ([127.0.0.1]:38315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oAqGg-0003Lc-Jh for submit <at> debbugs.gnu.org; Mon, 11 Jul 2022 06:03:54 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <larsi@HIDDEN>) id 1oAqGe-0003LL-FE for control <at> debbugs.gnu.org; Mon, 11 Jul 2022 06:03:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1DzMNDJmYdx4eOSjbNwzy+/REAnaieAt5qvn8sIZGFY=; b=VdfsWypLeFi/Wem7yfx4d1GNsC SOpBnK6AofhDwR9mrhXcGHkrSTjDTqfzxMoQS5R2TCV1TSfrPbOwOlavSRykwMJC+RXZcAxEi3l3w X0HbVzavoOwGkPZF4+oK3mFS/kVHiERS/l6skx+QNN7EYChTHdY1wqZqFHhIDz+H15TQ=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1oAqGW-0001XA-HL for control <at> debbugs.gnu.org; Mon, 11 Jul 2022 12:03:46 +0200 Date: Mon, 11 Jul 2022 12:03:44 +0200 Message-Id: <87pmic0xvj.fsf@HIDDEN> To: control <at> debbugs.gnu.org From: Lars Ingebrigtsen <larsi@HIDDEN> Subject: control message for bug #56487 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 56487 + patch quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) tags 56487 + patch quit
X-Loop: help-debbugs@HIDDEN Subject: bug#56487: xgselect race condition leading to abort when USE_GTK not defined Resent-From: Po Lu <luangruo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 11 Jul 2022 10:17:01 +0000 Resent-Message-ID: <handler.56487.B56487.165753461120993 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 56487 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tom Gillespie <tgbugs@HIDDEN> Cc: 56487 <at> debbugs.gnu.org Received: via spool by 56487-submit <at> debbugs.gnu.org id=B56487.165753461120993 (code B ref 56487); Mon, 11 Jul 2022 10:17:01 +0000 Received: (at 56487) by debbugs.gnu.org; 11 Jul 2022 10:16:51 +0000 Received: from localhost ([127.0.0.1]:38380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oAqTD-0005SD-5z for submit <at> debbugs.gnu.org; Mon, 11 Jul 2022 06:16:51 -0400 Received: from sonic307-56.consmr.mail.ne1.yahoo.com ([66.163.190.31]:46512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <luangruo@HIDDEN>) id 1oAqTB-0005ML-D8 for 56487 <at> debbugs.gnu.org; Mon, 11 Jul 2022 06:16:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657534603; bh=KXfcXy2VdJNLGY4YFpTMptZ2VN9qKklzTtSiMvkmaX4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=YAyhFfpU5oAb90adx8efNv/N/53tlJcPdahnUWR9vaQl0TrGPr/D3Wn7uXmkZXnkkaan4uS+oDtQH3oQ1jJeqjTbIU9yGnDnOXi2aDut3qeb3KtlaATBkaFoJpHgjmq/UGGx1w8JqDcJALh6nc24P0LsZBA8mxJKpCiqCaz2HkaJKcUS/5vVaKoTgDMwCGq9OBlqLZAyWyjnCWAj3uGy1NTvgtpcATTWYmYk++029k4XBqgD4ghVd29iTUh6QGej2rQZyfpSZ2HWwcOEuNUcnzgWQqACm/v5BwuOIcClZFKMCpipiMxzSEsPfVlIyxBDcTCgW0C+wh4bgqi4Jskh8w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657534603; bh=ScJoAeV1v0Htw+MgUfwgmmzAGHpA5WPCRMb1b6e4rhF=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=ahjAUPhGH7jmFcZ7eEYmEbYqcGN0PiAhOJgR5naSdEc752FDdPtJugC/6iPkCHUWF2Tr2GKYRebty0JJqIk3VZriRd2tUzayGzPVVgm6p2plYXpnYK/EHwMLZY9+Px3z53m8NwmQ3h5iu/3UueW0zDByy9C9/gLiiqIv0LDVJ2tZMQvUvZG5SZaLz6TC21ZicXmS3E6MSjkJDbOilnt8y1yk9QcbdrlL5nD+fDmrawjzHnkejvVO/vTfK8pMU96QlwtxaTCoccqnF8gkDHSp5nCNDhw4AeyZ+qENRi5UvWS2C+sPvvhTyMypqOZbwb9/8BX9aPD8bWCbHe51m1mviA== X-YMail-OSG: tTiryDEVM1lOTFQFzGPzRbN44e4Askovc00oWNJNRlMu2PqlP0fjozkZGtUEG47 KCV3wD8S5QOsycyJ2C9qC_qZXZSNg6qxo3oy53aYLpscIhIQc8hBbUzTp29THVF3SiynnCVSj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jsGRvnbJqO_liSO9W9UkymJ8nnDsUibgg9vW1qPCoStcQjVxW9KuK X-Sonic-MF: <luangruo@HIDDEN> Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Mon, 11 Jul 2022 10:16:43 +0000 Received: by hermes--canary-production-sg3-67975bbd4b-v4p6m (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 5c6c0f594010044d1260fc6a81d507cf; Mon, 11 Jul 2022 10:16:40 +0000 (UTC) From: Po Lu <luangruo@HIDDEN> References: <CA+G3_PM8-aF+OdLrBg+PPFOmvCMYcVr-VHsASRt0xe4b9E5FYQ@HIDDEN> <871qus1kkt.fsf@HIDDEN> <CA+G3_PP-xUHs-XtoiV_xvnFVydY7-LQqTSL3BUGj_Vg=iWaCmg@HIDDEN> <87v8s4z6in.fsf@HIDDEN> <CA+G3_PPBPD-sM2Trtw0818wX=VfCU2ULTV+25TVuKh1t1Qouvw@HIDDEN> Date: Mon, 11 Jul 2022 18:16:36 +0800 In-Reply-To: <CA+G3_PPBPD-sM2Trtw0818wX=VfCU2ULTV+25TVuKh1t1Qouvw@HIDDEN> (Tom Gillespie's message of "Sun, 10 Jul 2022 20:40:43 -0700") Message-ID: <87o7xwymwr.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20381 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1606 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Tom Gillespie <tgbugs@HIDDEN> writes: >> Thanks. Why did the code previously under !USE_GTK have to be removed? > > When the !USE_GTK code is used an abort in glib will happen > stochastically due to an out-of-sync call to release_select_lock > in thread.c. This happens on my system somewhere between > approximately 1 in 10 and 1 in 10000 times that the test file > is run. > > As far as I can tell from testing there is no difference in behavior > between the USE_GTK and !USE_GTK code. Also, as far as > I can tell from reading, the behavior should be almost identical. > The only addition is to check for already_has_events before > calling thread_select, which may be enough to shift the timing > to prevent a race. > > I have not been able to figure out what the actual underlying > cause is (I tried). All I can say for sure is that there is > something that calls into g_main_context_release and > context->owner_count has a negative overflow to 4294967295. > > I do not think that it is because something somehow sneaks > in between the calls to the atomics in acquire_select_lock > and relese_select_lock. If you would like I can send along > a couple of patches that include changes I made to try to > see what is going on. > > The real underlying issue would seem to be that there is a > missing lock somewhere and that the use of atomics is not > sufficient, but I could be wrong about that. So I suggest that someone find that problem instead. Any attempt to "fix" a race condition by moving code around so that the timings are slightly different is simply deluding oneself. Thanks.
X-Loop: help-debbugs@HIDDEN Subject: bug#56487: xgselect race condition leading to abort when USE_GTK not defined Resent-From: Tom Gillespie <tgbugs@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 11 Jul 2022 16:10:02 +0000 Resent-Message-ID: <handler.56487.B56487.165755579711662 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 56487 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Po Lu <luangruo@HIDDEN> Cc: 56487 <at> debbugs.gnu.org Received: via spool by 56487-submit <at> debbugs.gnu.org id=B56487.165755579711662 (code B ref 56487); Mon, 11 Jul 2022 16:10:02 +0000 Received: (at 56487) by debbugs.gnu.org; 11 Jul 2022 16:09:57 +0000 Received: from localhost ([127.0.0.1]:40809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oAvyv-000322-2u for submit <at> debbugs.gnu.org; Mon, 11 Jul 2022 12:09:57 -0400 Received: from mail-pg1-f177.google.com ([209.85.215.177]:39806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <tgbugs@HIDDEN>) id 1oAvyr-00031j-ID for 56487 <at> debbugs.gnu.org; Mon, 11 Jul 2022 12:09:56 -0400 Received: by mail-pg1-f177.google.com with SMTP id q82so5111299pgq.6 for <56487 <at> debbugs.gnu.org>; Mon, 11 Jul 2022 09:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6K896cEJOqMSVyOPuZhGbf5w2xx50JbzR4nYnlZMUnA=; b=nwhxdny6UJHaUzg7WwiC+3sTOH2mj/YPFebZawBnKMc6CB2VWPWCAyoSPIW7e2RDcd o0Ee4XCLfyMBUFKHsQi4eOoX0XauHF8WV/0JVxFuZXYOFWMuEcMRPhbMfHQiJrC0HFNW syTc3PVpiKJrW9woaWZ5Gu3lUyLCrWiKaDdfrdlIhqBYFXii/2C4yposKaS8dnO3q/Bn N1F72l4l3+/yGmPdwPZkajT81qGIpPWFG10QL04Zu6HoRsCe07drEmAPCBiwKllKH/Oy rcssw/M6h408naRoCUfpJu2isCI8u6YS7tfyOCNaKJODe+cwJlVEwm9A6ykNkXGfBuvV YVMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6K896cEJOqMSVyOPuZhGbf5w2xx50JbzR4nYnlZMUnA=; b=KyBtQTxf23ynotIzCWaly2NcqfOa3IVBfdLMDzIZNJ8SgKoAzMaRgycnhhmLrO3sMT 5tOzCSU5GrPaHdHIaRoR0sN0F/OlTmdcnvPs4T4FWH5MG/SRw9B9ruvgDuZy4neQ05VI UX+AcyaTaeSFI/BXOWpp+Ra3NP2rUCzLwFTgeZ0oqpERWo4IJKabD82dIEsFTKfth1Wu BCu667bVc1Y5eKtsfU5SZy7aF9JVLrL6Tukk8+SXb6NHK7nRPkbwBhLdkCqmNZ0cS7wb R/n35jzymmUebf4mV6cphnbJGAKvGUozLzt7ops9UtQLMhAhMlfraKyqoLpN+e7lRWOC ec1A== X-Gm-Message-State: AJIora/QwtmwI3CJRLASAW8fIoJz8TNc3AHlAZBdaJXcozrU+e74eGjX A/kUMcbf0mwtDGUKEqDx/5L44Dk94bqUjT6Oahw= X-Google-Smtp-Source: AGRyM1uPyFSYkqday20tYPR1SjUF6eTy+pIq29FbCUxG51LSqAd2uIA2t+qKLlIlUnQagl9luwHZI/isvF/dT4KUljU= X-Received: by 2002:a63:e90f:0:b0:415:9dcf:c641 with SMTP id i15-20020a63e90f000000b004159dcfc641mr16458742pgh.476.1657555787761; Mon, 11 Jul 2022 09:09:47 -0700 (PDT) MIME-Version: 1.0 References: <CA+G3_PM8-aF+OdLrBg+PPFOmvCMYcVr-VHsASRt0xe4b9E5FYQ@HIDDEN> <871qus1kkt.fsf@HIDDEN> <CA+G3_PP-xUHs-XtoiV_xvnFVydY7-LQqTSL3BUGj_Vg=iWaCmg@HIDDEN> <87v8s4z6in.fsf@HIDDEN> <CA+G3_PPBPD-sM2Trtw0818wX=VfCU2ULTV+25TVuKh1t1Qouvw@HIDDEN> <87o7xwymwr.fsf@HIDDEN> In-Reply-To: <87o7xwymwr.fsf@HIDDEN> From: Tom Gillespie <tgbugs@HIDDEN> Date: Mon, 11 Jul 2022 09:09:36 -0700 Message-ID: <CA+G3_PN==03yKtR-=jDp8qU9PY2Dfx4t6bbudLSxdhzL3ARMCg@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > So I suggest that someone find that problem instead. Any attempt to > "fix" a race condition by moving code around so that the timings are > slightly different is simply deluding oneself. I agree. However that means that the current GTK implementation is itself fundamentally broken/inadequate. Bringing the other toolkits up to its level of brokenness seems reasonable in this case?
X-Loop: help-debbugs@HIDDEN Subject: bug#56487: xgselect race condition leading to abort when USE_GTK not defined Resent-From: Po Lu <luangruo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 12 Jul 2022 02:05:02 +0000 Resent-Message-ID: <handler.56487.B56487.16575914468269 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 56487 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tom Gillespie <tgbugs@HIDDEN> Cc: 56487 <at> debbugs.gnu.org Received: via spool by 56487-submit <at> debbugs.gnu.org id=B56487.16575914468269 (code B ref 56487); Tue, 12 Jul 2022 02:05:02 +0000 Received: (at 56487) by debbugs.gnu.org; 12 Jul 2022 02:04:06 +0000 Received: from localhost ([127.0.0.1]:41294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oB5Fu-00029I-36 for submit <at> debbugs.gnu.org; Mon, 11 Jul 2022 22:04:06 -0400 Received: from sonic308-10.consmr.mail.ne1.yahoo.com ([66.163.187.33]:32924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <luangruo@HIDDEN>) id 1oB5Fr-00028m-P9 for 56487 <at> debbugs.gnu.org; Mon, 11 Jul 2022 22:04:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657591436; bh=54jwwEuw8yYoEbwcP+anTs/OztD2hRwds6k+ouwzGRs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=ekXm1ArHyR5iBrp5OH0ILC8kySQui8FiXE4NLD6mHNpLFDK4ROlXO34E8Y3n3weCOsZGX8ijq0WE68G4+s9Mw25sHcNe674Rd/Qf/zUAGZaxj3e8qf/89n3OMC9rSP7deXK19JLwcmfU8mYsOq8DYkuvV9NOKa+VDVbMgRum/zgcYfTmopc15HbMZQfgMyGgGPmLn9vF2sRVzqEPGOjfoip2Dsrct31Br7ALgsXbbONKKi3rfmWsMkqnwVOdkmBzsmAq0Gfb+Jwsap3TsqXoWLY4+1MhuenInFSCvllV8Yip5/rfP17uAgwhzD3j2ELtzZsw5fE1itEGoMKBxHI/mA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657591436; bh=HuAedfHTtw2g0pN+FMU05AuPI4/5ysrJhsyU4f8CamP=; h=X-Sonic-MF:From:To:Subject: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b9EVsofA_i14rN.kKXM3neDMeI9d2xX kTpTkTxua9AsWGz0nqBF1xKvnIFSACz_B_RzzMQ8deM963et5IGHjVUVhRm5HeTEq.qcG48nhot7 N7y6aXM9eA2Cd_oFxP7C2wbIdD2KZ77XhZ8wSI6B.6BmwH9pT8ODX_BUMXcrURgK6BLLVGg7AIQE 9pzdQb8g6s6uFule2d3clseZByAaoVYd.WpS2RdFhMNaZ8MybgDRS8t3gcxkS2JguUlwnwDWI2Ag qiV7PuMaWyvATt1sR0zNZNTxmN.HPLusXRqTOljAC9oxPUQN8NjIB2Psx0kmLWUwOUg2d0FJmC9p BDWsmdzrKLbA7nL8noMriqMvdoGwOERfby60at0oWdVWbRhhgvqhSxYdJ02LMalDqUzb4qdu6w6L sZuYGYdV.5ve7nMvNTvbnVbNurkmnioI4WZ0Cn95rHToraqIvQmAcPYpyR_uj.oojC2nek7tPKq1 qJkUcvGruR1E4mlsiv3_PDrcEr9doTQVhaeUQPvVYZ4rBKB_z53_KrU8- X-Sonic-MF: <luangruo@HIDDEN> Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Tue, 12 Jul 2022 02:03:56 +0000 Received: by hermes--canary-production-sg3-67975bbd4b-hh5lh (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 9cbb8b39c192ed3e73fc61f3db274313; Tue, 12 Jul 2022 02:03:49 +0000 (UTC) From: Po Lu <luangruo@HIDDEN> References: <CA+G3_PM8-aF+OdLrBg+PPFOmvCMYcVr-VHsASRt0xe4b9E5FYQ@HIDDEN> <871qus1kkt.fsf@HIDDEN> <CA+G3_PP-xUHs-XtoiV_xvnFVydY7-LQqTSL3BUGj_Vg=iWaCmg@HIDDEN> <87v8s4z6in.fsf@HIDDEN> <CA+G3_PPBPD-sM2Trtw0818wX=VfCU2ULTV+25TVuKh1t1Qouvw@HIDDEN> <87o7xwymwr.fsf@HIDDEN> <CA+G3_PN==03yKtR-=jDp8qU9PY2Dfx4t6bbudLSxdhzL3ARMCg@HIDDEN> Date: Tue, 12 Jul 2022 10:03:43 +0800 In-Reply-To: <CA+G3_PN==03yKtR-=jDp8qU9PY2Dfx4t6bbudLSxdhzL3ARMCg@HIDDEN> (Tom Gillespie's message of "Mon, 11 Jul 2022 09:09:36 -0700") Message-ID: <87zghfxf28.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20407 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 356 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Tom Gillespie <tgbugs@HIDDEN> writes: > I agree. However that means that the current GTK implementation is > itself fundamentally broken/inadequate. Bringing the other toolkits up > to its level of brokenness seems reasonable in this case? No, because we don't want the different GLib event dispatch behavior outside of GTK with native input enabled.
X-Loop: help-debbugs@HIDDEN Subject: bug#56487: xgselect race condition leading to abort when USE_GTK not defined Resent-From: Tom Gillespie <tgbugs@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 12 Jul 2022 02:21:02 +0000 Resent-Message-ID: <handler.56487.B56487.16575924219876 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 56487 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Po Lu <luangruo@HIDDEN> Cc: 56487 <at> debbugs.gnu.org Received: via spool by 56487-submit <at> debbugs.gnu.org id=B56487.16575924219876 (code B ref 56487); Tue, 12 Jul 2022 02:21:02 +0000 Received: (at 56487) by debbugs.gnu.org; 12 Jul 2022 02:20:21 +0000 Received: from localhost ([127.0.0.1]:41315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oB5Vd-0002ZD-9t for submit <at> debbugs.gnu.org; Mon, 11 Jul 2022 22:20:21 -0400 Received: from mail-pj1-f53.google.com ([209.85.216.53]:38888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <tgbugs@HIDDEN>) id 1oB5Vc-0002Yz-13 for 56487 <at> debbugs.gnu.org; Mon, 11 Jul 2022 22:20:20 -0400 Received: by mail-pj1-f53.google.com with SMTP id 89-20020a17090a09e200b001ef7638e536so10041066pjo.3 for <56487 <at> debbugs.gnu.org>; Mon, 11 Jul 2022 19:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WBZxlt9YkcCsmWXUnMyTYTJLTrYvXcPpsAjQI/VYfLQ=; b=TQQNHyMzHOfJueksnacqjyEsVXvwfQWjc1qUb47gEdp0yrnKHytFIdZZZR3Hv70vV9 pF/ExzkpAPeVIdbGpnLqGGaXJ7p8ogjLHnB1plVj3IgMc1PuYBRW2C6Xu/RN6oNmTzC7 fpvd4c+o7CMkx8URYk5qLMumlLs2I9/ZAxOOA6CUsjeend77MLR2kdjbZqPXYD4BUw7a ynNJCF2j9Wwk/vuHlfySX++agNsJVmeApmLX085qu0BTqKAyKyl8ZXB48cjYyE3C79Hd 5iYPAvCCMwZovKHLVQvvJAq/pvgV6/KrMUYOYrlFas98/0+DcA09GpazNkrVXBRjTg0g rxng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WBZxlt9YkcCsmWXUnMyTYTJLTrYvXcPpsAjQI/VYfLQ=; b=a7p4jqCH0amkBxIfaWXeHvByuCLw9R3TJsWRmwKwYJcnvGmvmRPiS8ttL010A09eLd 1izJOG8g93ZYEuJH+edCmqzEUNayi4trm4YDBJSJlCI4fAbtC6+2yMtX2fh+j/yYlyMS 2cySwL227W1e/W5O3aUHC7k3Gnbz2hUGXphcRMhUFZLdcUpeLCXQ+dCBWi0Gbxp5oKxk i0k6uyhF/jsRVAVrzi7ZDJAl4UMaxMUMI9FqdUZwHjY8KM1R7ICh2oTJq/JbIHzM1ktw +c08oxDGzl971nDwI8xVKeHkKIuJvtWI3qJuTG9Mp7/bNI28QHKuDf1DZAaVWh6k/xKQ F0yA== X-Gm-Message-State: AJIora+Nxmy2e/RL8bJHzjW1+JXJbklHVs3ktZTp3u3tXR2NtqcfTqtn Nd/ENAi+f7mudeglLSdGIICZaNC/aQ8vbPrTwfk= X-Google-Smtp-Source: AGRyM1sEKWaIcIRwZ8BKqT1fVFuzxSgz8H9WVBhNJYEmeHLonXczc6PEtILHR0z3QOMJ7VHPIAwJEnLbUvyIiD2+4tY= X-Received: by 2002:a17:902:f642:b0:169:714:b079 with SMTP id m2-20020a170902f64200b001690714b079mr21204900plg.117.1657592414169; Mon, 11 Jul 2022 19:20:14 -0700 (PDT) MIME-Version: 1.0 References: <CA+G3_PM8-aF+OdLrBg+PPFOmvCMYcVr-VHsASRt0xe4b9E5FYQ@HIDDEN> <871qus1kkt.fsf@HIDDEN> <CA+G3_PP-xUHs-XtoiV_xvnFVydY7-LQqTSL3BUGj_Vg=iWaCmg@HIDDEN> <87v8s4z6in.fsf@HIDDEN> <CA+G3_PPBPD-sM2Trtw0818wX=VfCU2ULTV+25TVuKh1t1Qouvw@HIDDEN> <87o7xwymwr.fsf@HIDDEN> <CA+G3_PN==03yKtR-=jDp8qU9PY2Dfx4t6bbudLSxdhzL3ARMCg@HIDDEN> <87zghfxf28.fsf@HIDDEN> In-Reply-To: <87zghfxf28.fsf@HIDDEN> From: Tom Gillespie <tgbugs@HIDDEN> Date: Mon, 11 Jul 2022 19:20:02 -0700 Message-ID: <CA+G3_PNNha+YY8=P8DjknSxsc+jJ99+sBR4hrNusK9tf45_X9Q@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > No, because we don't want the different GLib event dispatch behavior > outside of GTK with native input enabled. Ok, got it. I'll see if I can figure out an alternate solution with that constraint in mind. Should I split out the release_select_lock change into a separate patch so that we can get that merged independent of a fix for the abort behavior?
X-Loop: help-debbugs@HIDDEN Subject: bug#56487: xgselect race condition leading to abort when USE_GTK not defined Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 12 Jul 2022 12:45:02 +0000 Resent-Message-ID: <handler.56487.B56487.165762985927809 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 56487 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tom Gillespie <tgbugs@HIDDEN> Cc: luangruo@HIDDEN, 56487 <at> debbugs.gnu.org Received: via spool by 56487-submit <at> debbugs.gnu.org id=B56487.165762985927809 (code B ref 56487); Tue, 12 Jul 2022 12:45:02 +0000 Received: (at 56487) by debbugs.gnu.org; 12 Jul 2022 12:44:19 +0000 Received: from localhost ([127.0.0.1]:41849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oBFFT-0007ET-Cz for submit <at> debbugs.gnu.org; Tue, 12 Jul 2022 08:44:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1oBFFR-0007ED-AY for 56487 <at> debbugs.gnu.org; Tue, 12 Jul 2022 08:44:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1oBFFM-0007xX-1p; Tue, 12 Jul 2022 08:44:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=K0Yc4aYKRTFJCFX37SS7GNXB9XEQqYNNWo6mHaCprrU=; b=Ti6qlfge+4Ey 7TrOa1nqwiMsXd2vVzRJ+xeDf1Sr8bfCNoRV7czVAYc3BTL2X9HfZ1G0Mxx0A925ShDOUWa32LwsH XwFS2LsOTEX6jYqw4xOIdJ8VoUeU42xgSV9nxG3IIi2LO2NApZmm9Nr1tNMI3huHKTORyOzRKq9xF /YhLF//RYG5+H1S8d/4CkvqYLdTlCQVt6/w4f2OglePhBEzwMDwk9bfAVYKKZR2BaUQKP0JBq5NGg iutsss+JvfSoPiouYUaVmbS346sTWDeM9bzTMfjcymDVkbiKoNXYRGXrFQueNlRk/bF6AMvVxQxj6 +gtGV47Msy7y99pZNDJHzA==; Received: from [87.69.77.57] (port=4550 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1oBFFL-0005qt-Gp; Tue, 12 Jul 2022 08:44:11 -0400 Date: Tue, 12 Jul 2022 15:44:01 +0300 Message-Id: <83tu7mxzzi.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <CA+G3_PNNha+YY8=P8DjknSxsc+jJ99+sBR4hrNusK9tf45_X9Q@HIDDEN> (message from Tom Gillespie on Mon, 11 Jul 2022 19:20:02 -0700) References: <CA+G3_PM8-aF+OdLrBg+PPFOmvCMYcVr-VHsASRt0xe4b9E5FYQ@HIDDEN> <871qus1kkt.fsf@HIDDEN> <CA+G3_PP-xUHs-XtoiV_xvnFVydY7-LQqTSL3BUGj_Vg=iWaCmg@HIDDEN> <87v8s4z6in.fsf@HIDDEN> <CA+G3_PPBPD-sM2Trtw0818wX=VfCU2ULTV+25TVuKh1t1Qouvw@HIDDEN> <87o7xwymwr.fsf@HIDDEN> <CA+G3_PN==03yKtR-=jDp8qU9PY2Dfx4t6bbudLSxdhzL3ARMCg@HIDDEN> <87zghfxf28.fsf@HIDDEN> <CA+G3_PNNha+YY8=P8DjknSxsc+jJ99+sBR4hrNusK9tf45_X9Q@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Cc: 56487 <at> debbugs.gnu.org > From: Tom Gillespie <tgbugs@HIDDEN> > Date: Mon, 11 Jul 2022 19:20:02 -0700 > > > No, because we don't want the different GLib event dispatch behavior > > outside of GTK with native input enabled. > > Ok, got it. I'll see if I can figure out an alternate solution with that > constraint in mind. TIA. > Should I split out the release_select_lock change into a separate > patch so that we can get that merged independent of a fix for the > abort behavior? Yes, I think that's a good idea.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.