From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70544: 30.0.50; The primitive-function "call-process-region" returns "internal error" and causes high cpu usage on win10 Date: Wed, 24 Apr 2024 11:25:15 +0300 Message-ID: <86r0ev2mms.fsf@gnu.org> References: <86zftj2szq.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10498"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70544@debbugs.gnu.org To: leuven65 Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 24 10:26:10 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rzXxB-0002UV-PJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Apr 2024 10:26:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzXwt-0001mH-LY; Wed, 24 Apr 2024 04:25:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzXwr-0001lp-R5 for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2024 04:25:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzXwq-0008Kq-PO for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2024 04:25:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rzXx6-0000sa-TO for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2024 04:26:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Apr 2024 08:26:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70544 X-GNU-PR-Package: emacs Original-Received: via spool by 70544-submit@debbugs.gnu.org id=B70544.17139471593311 (code B ref 70544); Wed, 24 Apr 2024 08:26:04 +0000 Original-Received: (at 70544) by debbugs.gnu.org; 24 Apr 2024 08:25:59 +0000 Original-Received: from localhost ([127.0.0.1]:57217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzXwy-0000qs-KW for submit@debbugs.gnu.org; Wed, 24 Apr 2024 04:25:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzXws-0000oX-6e for 70544@debbugs.gnu.org; Wed, 24 Apr 2024 04:25:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzXwV-0008FQ-3H; Wed, 24 Apr 2024 04:25:27 -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=+sNFt9AT/RCbzM0ocNLtLiUHQx8an8o4yJhHUnfB5mk=; b=gMNvXMN/BdBS HyMGj3COSpzPGesOz3+1bdGISO7zWwXRJiwAab7y1HLwU4Cpy8J4AjKW5Z+RuNVoGn/ryuV9kj8iO 2iwu8p/hVCv0/3tK2IRZ56cnz6KRov3ztqm6IHyewXvPRjUMrKRNTgUYO3YPBWiL5kdR14Qlw8E4g sGRu4IWg5asyCEdbTPl++wQpoMG4QjjhaqJmhKAwegrW2/nIZx8dYxqM/f2GOmGrAl6HCb/Ov1c5N dFlfWS7wMSsIh3MduZ3Eqfzyln+IIOt/JTOLTbSJaC1Z8CFXNgsHsbpaxSedd2A9wOEIGY46tVHpn I0Pl+Nsu8bFcF6pJ818VCA==; In-Reply-To: (message from leuven65 on Wed, 24 Apr 2024 10:12:10 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283911 Archived-At: > From: leuven65 > Date: Wed, 24 Apr 2024 10:12:10 +0200 > Cc: 70544@debbugs.gnu.org > > I use the latest version > "[[https://github.com/git-for-windows/git/releases/tag/v2.44.0.windows.1]]", > in which "a couple of bugs that could cause Git Bash to hang in > certain scenarios were fixed", it might cause the exit behavior of > "gitk.exe" changed. > > The program gitk is "${git-installation-folder}/cmd/gitk.exe". > > The issue only pops up when I set "(setq-default shell-file-name "cmdproxy.exe")", if set to "bash.exe", no such > problem. Maybe this gitk was supposed to be invoked only from the MSYS Bash? If so, this is not really a problem with Emacs. > When the issue happens, emacs is not blocked, I can smoothly input > in emacs, but the cpu usage of emacs is very high forever. As I > built emacs without debug information, what I can see so far is that > most of time seems to be spent on "MsgWaitForMultipleObjects". > > I use "shell-command" (M-!) to run "gitk.exe", the correct behavior is to run "gitk" and block emacs, or exit with > error, in my case, it prints out error "(Shell command killed by signal internal error)" and cpu usage goes up. I guess these all are related to the fact that gitk is not a console problem, but a GUI problem, and therefore should not be invoked from shell-command, at least not safely. It was probably meant to be invoked from a shell directly, and perhaps specifically from the MSYS Bash which comes with Git for Windows. Bottom line: I'm not convinced this is an Emacs problem, and I still don't understand why you gitk from Emacs in this manner. In any case, to do anything with this problem, we need either a way to reproduce it on the system of one of our developers, or a detailed information regarding the reasons why Emacs is spinning calling MsgWaitForMultipleObjects.