From unknown Sun Jun 22 11:33:29 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#54667 <54667@debbugs.gnu.org> To: bug#54667 <54667@debbugs.gnu.org> Subject: Status: 29.0.50; posix_spawn breaks emacs-gdb Reply-To: bug#54667 <54667@debbugs.gnu.org> Date: Sun, 22 Jun 2025 18:33:29 +0000 retitle 54667 29.0.50; posix_spawn breaks emacs-gdb reassign 54667 emacs submitter 54667 Herman, G=C3=A9za severity 54667 normal tag 54667 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 01 06:51:58 2022 Received: (at submit) by debbugs.gnu.org; 1 Apr 2022 10:51:58 +0000 Received: from localhost ([127.0.0.1]:40984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naEso-0005Zt-2X for submit@debbugs.gnu.org; Fri, 01 Apr 2022 06:51:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:38176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naEsm-0005Zj-80 for submit@debbugs.gnu.org; Fri, 01 Apr 2022 06:51:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naEsl-0000PA-VQ for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 06:51:55 -0400 Received: from [2a00:1450:4864:20::631] (port=45812 helo=mail-ej1-x631.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naEsk-00055Y-1c for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 06:51:55 -0400 Received: by mail-ej1-x631.google.com with SMTP id i16so4937629ejk.12 for ; Fri, 01 Apr 2022 03:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=U/bCCmtDG3t5XgBnZvFUuOFKxaKJouMIGMJK6WbYoqw=; b=b7Xf2jWzv8rH3ECMelutzoXpRYxyMUSJ8Yr14mwf/0MmN5vLJqSHUgKyPMcGn1/9/A kzNjWAw1MN5M3DzO+/MGYIurVcGMU7HfAXFKsDhuNi9V694ADVKkOiF05gqdyGKd9JsY n8HUHGv+b/1hebRwuIwclaqyvYNhtgS6A1nJNzvlnc/6mIxCIpfWp3Z5xGEmjGMhcjCU vuGric+wuKlVabkNGKqO2QZPtcdEhDMp84D9FlNR00IwJh+Ide7OEwEAwl+A+zv0SrQR vCZpilgGfx80bS5fi1rsAn6fg0u9bxFyejQhXVLrBvLPl3osiQLRtUyrCL1Ycme60+k9 dezw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=U/bCCmtDG3t5XgBnZvFUuOFKxaKJouMIGMJK6WbYoqw=; b=EWH3yRXI52II+war3R8eJFsFQaiD2qIX2lMQ5i0GeyYq7kgDV+caarhBNMw4TkP6at C4iimHy1o7Q30thKi5XpQq6Y7Cc3vBpXhP8FTfg4udwkIUkltLu671ZzB9YOYvMLMRgC 0P/tK1OKhReK+tJfwZKJy0VEr9yHyXTCgrNJJmdkzgYPhh9NBPFQMZuWH8NJLdJgeowX EuzLc/LpuwUWsEWdLBRNgOhXU5kFP7SxHuQrciQIKdH+4QWSXLHAmxOQ/OKDkeR3kf+W GzTcfoK5WKg1KqSIUzvTAEWXvE8QlQYK4gzWIKIOL6+1Fqd1b1QzAF4z9dEVrU0qJerk htGw== X-Gm-Message-State: AOAM532HWMqInv6S8smmatSO5GQ6Nsh0l4XB3TSNGIBZMiHu7yVfeiED 6je/ksd+y08Q1oexgAkYcCk= X-Google-Smtp-Source: ABdhPJwCqDLZPBjMsljnD2bK2HezJsG+o+KWZNp57CVBqSGrxjFkLt/iEKc8bWmmgaMugs/VoiHZJA== X-Received: by 2002:a17:907:1b27:b0:6d9:ceb6:7967 with SMTP id mp39-20020a1709071b2700b006d9ceb67967mr9235898ejc.186.1648810305043; Fri, 01 Apr 2022 03:51:45 -0700 (PDT) Received: from [192.168.8.4] (netacc-gpn-104-27-105.pool.telenor.hu. [91.104.27.105]) by smtp.gmail.com with ESMTPSA id b3-20020aa7d483000000b00419209d4c85sm1032152edr.66.2022.04.01.03.51.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Apr 2022 03:51:44 -0700 (PDT) To: bug-gnu-emacs@gnu.org From: =?UTF-8?Q?Herman=2c_G=c3=a9za?= Subject: 29.0.50; posix_spawn breaks emacs-gdb Message-ID: Date: Fri, 1 Apr 2022 12:51:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: sv-FI X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::631 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=geza.herman@gmail.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) There's a gdb frontend: https://github.com/weirdNox/emacs-gdb With the emacs commit "a60053f836 Use posix_spawn if possible.", emacs-gdb doesn't work properly: when starting an executable, gdb says that it's running, but in reality, it doesn't start. The process itself is started, gdb attaches to it, but the process still not run for some reason. You can reproduce this: 1. install emacs-gdb 2. M-x gdb-executable, enter any executable, like "/bin/ls". emacs-gdb should open a new frame. 3. Then press f5 (this executes gdb-run-or-continue), this should start the process in gdb. Before the mentioned commit, this worked, and "ls" was run properly. But with this commit, "ls" isn't started. I checked this with a recent master (bd5d136777ef30f36807c7e690413846ed38fce1), and still happens. Adding #undef USABLE_POSIX_SPAWN #define USABLE_POSIX_SPAWN 0 to callproc.c at line 49 fixes the issue. In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)  of 2022-04-01 built on zetor Repository revision: bd5d136777ef30f36807c7e690413846ed38fce1 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Debian GNU/Linux bullseye/sid Configured using:  'configure --with-native-compilation --without-compress-install  --with-xinput2' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings:   value of $LC_ALL: C.UTF-8   value of $LANG: en_US.UTF-8   value of $XMODIFIERS: @im=none   locale-coding-system: utf-8-unix Major mode: C++//l Minor modes in effect:   gdb-keys-mode: t   tooltip-mode: t   global-eldoc-mode: t   show-paren-mode: t   electric-indent-mode: t   mouse-wheel-mode: t   tool-bar-mode: t   menu-bar-mode: t   file-name-shadow-mode: t   global-font-lock-mode: t   font-lock-mode: t   blink-cursor-mode: t   line-number-mode: t   indent-tabs-mode: t   transient-mark-mode: t   auto-composition-mode: t   auto-encryption-mode: t   auto-compression-mode: t   abbrev-mode: t Load-path shadows: /home/geza/.emacs.d/elpa/transient-20220216.2303/transient hides /usr/local/share/emacs/29.0.50/lisp/transient ~/.emacs.d/lisp/emacs-gdb/gdb-mi hides /usr/local/share/emacs/29.0.50/lisp/progmodes/gdb-mi Features: (shadow sort mail-extr emacsbug message yank-media rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils gdb-mi comp comp-cstr warnings rx cl-extra gdb-module hydra lv comint ansi-color ring help-fns radix-tree cl-print debug backtrace help-mode find-func finder-inf info helm-easymenu advice package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq gv subr-x byte-opt bytecomp byte-compile cconv cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice simple cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray cl-preloaded button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 186444 9283)  (symbols 48 14946 0)  (strings 32 49762 3465)  (string-bytes 1 1931765)  (vectors 16 27008)  (vector-slots 8 517036 11837)  (floats 8 65 232)  (intervals 56 890 0)  (buffers 992 20)) From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 01 08:16:17 2022 Received: (at 54667) by debbugs.gnu.org; 1 Apr 2022 12:16:17 +0000 Received: from localhost ([127.0.0.1]:41071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naGCP-0004MR-1O for submit@debbugs.gnu.org; Fri, 01 Apr 2022 08:16:17 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:45931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naGCL-0004MB-R5 for 54667@debbugs.gnu.org; Fri, 01 Apr 2022 08:16:14 -0400 Received: by mail-wm1-f44.google.com with SMTP id 123-20020a1c1981000000b0038b3616a71aso1356698wmz.4 for <54667@debbugs.gnu.org>; Fri, 01 Apr 2022 05:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:message-id:mime-version :content-transfer-encoding; bh=eQYLvK4Y/lUyOGWwkJNxQyKvWW5zEl32g2FyKsgeOmw=; b=HvNDcuubE4B4kfoHmoT6TM1duUY8F6FI9LC1Y4TMUI5WA0360PvSA5rgTOXCo8QW67 2c4er6rXvG6JBua5n8wd7m3QcQh03CLV40Vpxe7m1rwhuyEI9oI82sVuEN1B4gE9gX47 k7brCKBDVNKgss2x0wyP+TtO3Vw/5t1poKyzPd6ot8H8/TAeLk0Weiambl48XlA8Nn9J 9D/KBuWrkkqljOskYh+t8M3xp5H2GN7V2bcAzwKUNwhnAcJw+i82WhTrwIBed9PRtB+Z Cs1sfahY49X4ibfzM77fnUIT9rPbmAJs+Ibtqm007vQpphbrNF1qFXojDdWCjtaPyG0P 510w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:message-id :mime-version:content-transfer-encoding; bh=eQYLvK4Y/lUyOGWwkJNxQyKvWW5zEl32g2FyKsgeOmw=; b=0AjaTBnE6TuN9+83dqt2bEGsr0oF/WcXzO8zFLJllfSKacpWGQJInu2yEaYQhUQ9JU St1iGwNKwZi3SjPgvEDtgKVTbyVYjbhdfllxCoPaDEsb09KSTc8z+eBLXod5Z5ytaiYU rUZrAWchr8FJ7vmMFRZ94N2ZraYc6zYpuJyWfnkNYshdABbfjPn7NqwPJVMUFvPIPGG+ 1qu4dDL5qVFHDKfoLLfAP4nN0HFoVhEBsOnIQWptYjKGtopkyuQdrBBWLeCeyGyiTMmh GTjO4UEcAS1QtvpvawEWyuYdUL/bdDFdjJydwB9vquFD4M4uTWNQMB4dKSLwmfyTsbxm AQOQ== X-Gm-Message-State: AOAM531kvWr03Y7fYeb2xPDJe7SDkAGu4OID7t6UBw1PiuILwaLoxmUf ODHAyx7V7mTp91KysVOvSH8BUJMt4Gc= X-Google-Smtp-Source: ABdhPJxQA41Cqh/fbSoAqTiJVM+UYnZxzYt+8S7hqPOdxJgyVR5eyzzGcOypKXNkwu7jEVP7NrxFmA== X-Received: by 2002:a05:600c:2948:b0:38c:b3e5:eed3 with SMTP id n8-20020a05600c294800b0038cb3e5eed3mr8526035wmd.168.1648815367303; Fri, 01 Apr 2022 05:16:07 -0700 (PDT) Received: from rltb ([2a01:e0a:3f3:fb50:6248:4d9e:facf:63ef]) by smtp.gmail.com with ESMTPSA id d20-20020a05600c34d400b0038caf684679sm13764837wmq.0.2022.04.01.05.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 05:16:05 -0700 (PDT) From: Robert Pluim To: =?utf-8?Q?G=C3=A9za?= Subject: Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb References: Date: Fri, 01 Apr 2022 14:16:02 +0200 Message-ID: <87fsmx80e5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54667 Cc: 54667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Fri, 1 Apr 2022 12:51:43 +0200, Herman@debbugs.gnu.org, G=C3=A9za = said: Herman> There's a gdb frontend: https://github.com/weirdNox/emacs-gdb Herman> With the emacs commit "a60053f836 Use posix_spawn if possible.", Herman> emacs-gdb doesn't work properly: when starting an executable, g= db says Herman> that it's running, but in reality, it doesn't start. The process Herman> itself is started, gdb attaches to it, but the process still no= t run Herman> for some reason. Herman> You can reproduce this: Herman> 1. install emacs-gdb Herman> 2. M-x gdb-executable, enter any executable, like "/bin/ls". em= acs-gdb Herman> should open a new frame. Herman> 3. Then press f5 (this executes gdb-run-or-continue), this shou= ld Herman> start the process in gdb. Herman> Before the mentioned commit, this worked, and "ls" was run Herman> properly. But with this commit, "ls" isn't started. Herman> I checked this with a recent master Herman> (bd5d136777ef30f36807c7e690413846ed38fce1), and still happens. = Adding Herman> #undef USABLE_POSIX_SPAWN Herman> #define USABLE_POSIX_SPAWN 0 Herman> to callproc.c at line 49 fixes the issue. There=CA=BCs a patch from J=C3=BCrgen H=C3=B6tzel in <86o82mvybj.fsf@hoetze= l.info> on emacs-devel that should fix it (I haven't had a chance to fully test it). Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 01 09:30:00 2022 Received: (at 54667) by debbugs.gnu.org; 1 Apr 2022 13:30:00 +0000 Received: from localhost ([127.0.0.1]:41167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naHLj-0006Ez-Uh for submit@debbugs.gnu.org; Fri, 01 Apr 2022 09:30:00 -0400 Received: from mail-ej1-f48.google.com ([209.85.218.48]:35443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naHLi-0006Ek-Ba for 54667@debbugs.gnu.org; Fri, 01 Apr 2022 09:29:59 -0400 Received: by mail-ej1-f48.google.com with SMTP id yy13so5925568ejb.2 for <54667@debbugs.gnu.org>; Fri, 01 Apr 2022 06:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=iJxBEiN89VugdMEovoR7G3p1s3T2pMwn4/fO/o2M56U=; b=V+P5sm1JtLDJXaUDF0ePDX0aE04YTJ4FUOM0DKZZj805hkLgY+5PxbIrbIzkpKnG5a jTFyXH2NH8Ls5to1yBK3zYvj+ZS+OVoA1ToX02QqaBKH6rJNjkLRmlqZ/fHSmSowWblN HQOADYLQf0hGZhVss9tbESw+uhyL9T291J9I75ETtLaRf4ZoqfcRS0mGqZnqSwvH51Kt g/A6Y19ZL8KijPBxKwOD12owtKnDWQJsKESi8TUtFV82dV5QsdUpQ9dQ84GH5xEK6r5I gRiKaD+Ccek2kB2PEypCzhQhuHTpE5n1eqW8aLX0Q7W2Oap0m4DFeKX9StM6dPGncbJE dmfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=iJxBEiN89VugdMEovoR7G3p1s3T2pMwn4/fO/o2M56U=; b=MZ/w2n7zIH4eyGNayVH/q7DvRkuL0XZhg5Ey/nRM34ZZ8aj1Iwmr3JtQ37RGnSzmWx 0lkv7rzHuGcnnb+9ENdikCRisk4cJBsy7jVsWhyGAl7x3+xAo96CgSukPzIOVHk/7qFF ke8AltAtORSCwTlePxPVon4ownK/j2SBYKzAToAzsmYgDNRmjESMgJDF5W1Jkp+/TcMQ HJUED36Xaln0X1fPPBgFZfy6yOLqvrvwPYqatTL6ng3Ca8kX2lilp3t/Et43DhimwDN2 YQBwl0Ic7OrXukM09ALtobMsrwElbfliw92b/Vbd1cerRZ6EkQEYcYcZOI/jCDtAiuRR ihsA== X-Gm-Message-State: AOAM532g/vpxRtoQQmj8jJchSJdPcvAx5xoj3KZ2OTKFryX6QLAGEZOj TRdZQ/cB+6+B3U80dcBpyU0= X-Google-Smtp-Source: ABdhPJwBNtdq9U+F+izOyz76sTGhmNNXv7C3880Enis6mY3MtPCKwG3TvUwI/1NmqQq7hA4PQsFxog== X-Received: by 2002:a17:906:1be1:b0:6ce:b0a8:17d with SMTP id t1-20020a1709061be100b006ceb0a8017dmr9283282ejg.413.1648819792253; Fri, 01 Apr 2022 06:29:52 -0700 (PDT) Received: from [192.168.8.4] (netacc-gpn-104-27-105.pool.telenor.hu. [91.104.27.105]) by smtp.gmail.com with ESMTPSA id f15-20020a50e08f000000b004134a121ed2sm1224102edl.82.2022.04.01.06.29.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Apr 2022 06:29:51 -0700 (PDT) Subject: Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb To: Robert Pluim References: <87fsmx80e5.fsf@gmail.com> From: =?UTF-8?Q?Herman=2c_G=c3=a9za?= Message-ID: <4d6ef0f6-8ab6-2dce-aa63-d18108fd5f21@gmail.com> Date: Fri, 1 Apr 2022 15:29:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <87fsmx80e5.fsf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: sv-FI X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54667 Cc: 54667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I can confirm that it fixes the problem. For reference, here's the patch: https://lists.gnu.org/archive/html/emacs-devel/2022-03/msg00067.html (Btw., according to this email thread, vfork is faster than posix_spawn on Linux, so maybe it'd make sense to use posix_spawn only on non-Linux platforms?) On 2022-04-01 14:16, Robert Pluim wrote: >>>>>> On Fri, 1 Apr 2022 12:51:43 +0200, Herman@debbugs.gnu.org, Géza said: > Herman> There's a gdb frontend: https://github.com/weirdNox/emacs-gdb > Herman> With the emacs commit "a60053f836 Use posix_spawn if possible.", > Herman> emacs-gdb doesn't work properly: when starting an executable, gdb says > Herman> that it's running, but in reality, it doesn't start. The process > Herman> itself is started, gdb attaches to it, but the process still not run > Herman> for some reason. > > Herman> You can reproduce this: > Herman> 1. install emacs-gdb > Herman> 2. M-x gdb-executable, enter any executable, like "/bin/ls". emacs-gdb > Herman> should open a new frame. > Herman> 3. Then press f5 (this executes gdb-run-or-continue), this should > Herman> start the process in gdb. > > Herman> Before the mentioned commit, this worked, and "ls" was run > Herman> properly. But with this commit, "ls" isn't started. > > Herman> I checked this with a recent master > Herman> (bd5d136777ef30f36807c7e690413846ed38fce1), and still happens. Adding > > Herman> #undef USABLE_POSIX_SPAWN > Herman> #define USABLE_POSIX_SPAWN 0 > > Herman> to callproc.c at line 49 fixes the issue. > > Thereʼs a patch from Jürgen Hötzel in <86o82mvybj.fsf@hoetzel.info> on > emacs-devel that should fix it (I haven't had a chance to fully test > it). > > Robert From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 01 10:44:23 2022 Received: (at 54667) by debbugs.gnu.org; 1 Apr 2022 14:44:23 +0000 Received: from localhost ([127.0.0.1]:42977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naIVi-00008k-TP for submit@debbugs.gnu.org; Fri, 01 Apr 2022 10:44:23 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:50811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naIVh-00008X-6P for 54667@debbugs.gnu.org; Fri, 01 Apr 2022 10:44:21 -0400 Received: by mail-wm1-f46.google.com with SMTP id h16so1865971wmd.0 for <54667@debbugs.gnu.org>; Fri, 01 Apr 2022 07:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=/TzOqYWbf6GVdALqKfi6rCWPsjNuqZd5xmnyq4LlvLM=; b=bXSPzk7H2DOEz/0xpjUG6DrdiTNoiKE0EK8zzG4mSnMAEAxBK38KhCiT39REM3EDkr shqN6ZHfQoYcYJfRaDxqZeDBA37G8FSpLzI1x5LJhirQUQYxomEOBOtQscQE+P4jNRhM cgPNNvL0s4IditZY016K2fFfvv1JpOEhEpEQAsvjrqL2TuF2q40hZbKOZvBvuikFRGa5 kzh5Yp6hcSDS8fJHEhA7ACSstZs+znowOQrj6F4x+JT4Y0ty7ecck3TryMUAlJM6u0B/ jklUDFh6uW9f2Qkn6UYHBIzfuUX4qh8OKFTtAqnKwTYWYvU3q7tXiuWSG7hIKwiOR+X8 aA7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=/TzOqYWbf6GVdALqKfi6rCWPsjNuqZd5xmnyq4LlvLM=; b=ke6gH2NyBYjfkUFDAUfVgQD5BuGl9sJSAK9l6rwwUyE01PdZHEZdGyPGSTjL2623G7 qGvthibtXtjwVnwRw/DMsM5+ZgC1GUPl1lK3m7PM98GDtEpGEtlVqcMtaxUHdwtNPWmz enIuYWlZ4QVIIoc7XiVtVUICWJTb2HtoHX4/Hp9coj1GGiADC0mdbnfGBLcVqQZ3ZkY1 xv3pb0J/OZ8Mg338sHlOclIqtUdz7Ob7fZlKPXZoQph8hN62n3So/Knoi2QmfbJ1GISf 50Ss329/Y6LaujJSYRmpE1/Ox66WoQpFFI+E6zFzTCLfuDcudQS61YdtyZZuxDp5nuEV Us5A== X-Gm-Message-State: AOAM532QtiKOaQyAa6LCUvLkzzdFcrHfvxe0aMS+P8zip7UmKHoNoTYH t3cZ0I9ypX7Re8gsw/uPFhXhNqQ1xO0= X-Google-Smtp-Source: ABdhPJxwuj8ZAYwWaobLdmR/i27DAfKxBJf+6atDpQwmEa+dQ4imWrOiWT7kUWCkjc4KZLzruQJ6dA== X-Received: by 2002:a7b:ce92:0:b0:38b:ed80:9e66 with SMTP id q18-20020a7bce92000000b0038bed809e66mr9194070wmj.82.1648824254695; Fri, 01 Apr 2022 07:44:14 -0700 (PDT) Received: from rltb ([2a01:e0a:3f3:fb50:1300:1d64:c1ad:d858]) by smtp.gmail.com with ESMTPSA id 61-20020adf8043000000b00205e1d92a41sm2379604wrk.74.2022.04.01.07.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 07:44:14 -0700 (PDT) From: Robert Pluim To: =?utf-8?Q?Herman=2C_G=C3=A9za?= Subject: Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb References: <87fsmx80e5.fsf@gmail.com> <4d6ef0f6-8ab6-2dce-aa63-d18108fd5f21@gmail.com> Date: Fri, 01 Apr 2022 16:44:13 +0200 In-Reply-To: <4d6ef0f6-8ab6-2dce-aa63-d18108fd5f21@gmail.com> ("Herman, =?utf-8?Q?G=C3=A9za=22's?= message of "Fri, 1 Apr 2022 15:29:50 +0200") Message-ID: <87bkxk983m.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54667 Cc: 54667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Fri, 1 Apr 2022 15:29:50 +0200, "Herman, G=C3=A9za" said: Herman> I can confirm that it fixes the problem. Thanks, I=CA=BCll see if I can get around to committing it this weekend. Herman> For reference, here's the patch: Herman> https://lists.gnu.org/archive/html/emacs-devel/2022-03/msg00067= .html Herman> (Btw., according to this email thread, vfork is faster than Herman> posix_spawn on Linux, so maybe it'd make sense to use posix_spa= wn only Herman> on non-Linux platforms?) In emacs-28 we only use posix_spawn on macOS because its vork is sub-optimal. I don=CA=BCt remember the rationale for switching to using it everywhere, it=CA=BCs undoubtedly in the archives somewhere. Thanks Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 04 10:12:05 2022 Received: (at 54667) by debbugs.gnu.org; 4 Apr 2022 14:12:05 +0000 Received: from localhost ([127.0.0.1]:52578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbNR7-0005pq-FB for submit@debbugs.gnu.org; Mon, 04 Apr 2022 10:12:05 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:51083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbNR5-0005pG-9i; Mon, 04 Apr 2022 10:12:03 -0400 Received: by mail-wm1-f42.google.com with SMTP id h16so6048113wmd.0; Mon, 04 Apr 2022 07:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=EQ3RUI6j02IOGztFEsm/mSpWI822z6QkBSLY37oKEDE=; b=h8Wyncui2IZXNjd1oco0j/bpqpQYbDPhX3butcn14UT2hhfLXAXiyhCCv9HH4SyV4b i1MXWxirTiXjwchNgwUlnhWfVlzjiMwqqd6NSuoIY3sEFnDf5E5RsZcNOpDZV8EI+Cki yGuO+rNz5K3X6PQoX4g8UbeSugnLLbi8MG/32tFVIDsS7WVla1DNxDpR8Kg4eTkmfMnV ILq7EY1FPqkrbBYNZZmucDeKfNiCa/FRgc2ODXGACMPr3yxkwC5hGGGdwGyNVrpf9wdU zpG4OLtbocmy3tJzqcuvecPlfpNxmSF+4HxDKnmfDq3UT8QHu+8ZNK9rvOGvnL4g4OEy IIGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=EQ3RUI6j02IOGztFEsm/mSpWI822z6QkBSLY37oKEDE=; b=cxO0UTFHmJBbtUmzJbUu9QV4B5rs6Ll2uXQhb+VsI2lsmab3J913dllynsJWv23uHX ZXeY9qmWVlR82gSL5d9+3mjNgMMqzcy/2MaNh90VsqmEfIPyIglPHJGC9PtQZFoBIm99 i/6O8mhxiZqUTzWZwuxF/+kbexKyUvAiAaPXfGef0F/hXn3mRQFbg41zMudBIbFUr5MK Y+CMUgj3rAu7uZprQIIXWvVe57nnCxqDF7MrZ3MlSGh55LfGy0fKgQRFsAJXSL69uD/9 5NeRn27Vptv6phUrGgWXNyo62Qtz2SVAKooUksnjgTAEYwkJRAhvKCOhYWO6JROH4o98 iLog== X-Gm-Message-State: AOAM532TW1fy7K8IxqYvXiJtH/Ld5Y26EU7bEisI+3H2VCx0B11ZGYz1 lK6uIpm0FoRt0GOzjNav0nyEMhgUmgs= X-Google-Smtp-Source: ABdhPJxlEYhazr32XHb/Hdzl3XGj2lQWDFSDYRk3+jPs8LxwzEAsSFB/d8Mr4GyxK+bGB62MzkBHhg== X-Received: by 2002:a7b:cd13:0:b0:38c:9a08:5c62 with SMTP id f19-20020a7bcd13000000b0038c9a085c62mr19411381wmj.154.1649081517006; Mon, 04 Apr 2022 07:11:57 -0700 (PDT) Received: from rltb ([2a01:e0a:3f3:fb50:63d3:852f:6a79:2aa0]) by smtp.gmail.com with ESMTPSA id 2-20020a1c1902000000b00380d3873d6asm9677335wmz.43.2022.04.04.07.11.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 07:11:52 -0700 (PDT) From: Robert Pluim To: =?utf-8?Q?Herman=2C_G=C3=A9za?= Subject: Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb References: <87fsmx80e5.fsf@gmail.com> <4d6ef0f6-8ab6-2dce-aa63-d18108fd5f21@gmail.com> <87bkxk983m.fsf@gmail.com> Date: Mon, 04 Apr 2022 16:11:51 +0200 In-Reply-To: <87bkxk983m.fsf@gmail.com> (Robert Pluim's message of "Fri, 01 Apr 2022 16:44:13 +0200") Message-ID: <87ilrp6iqg.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54667 Cc: 54667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 54667 fixed close 54667 29.1 quit >>>>> On Fri, 01 Apr 2022 16:44:13 +0200, Robert Pluim s= aid: >>>>> On Fri, 1 Apr 2022 15:29:50 +0200, "Herman, G=C3=A9za" said: Herman> I can confirm that it fixes the problem. Robert> Thanks, I=CA=BCll see if I can get around to committing it this= weekend. Herman> For reference, here's the patch: Herman> https://lists.gnu.org/archive/html/emacs-devel/2022-03/msg00067= .html Herman> (Btw., according to this email thread, vfork is faster than Herman> posix_spawn on Linux, so maybe it'd make sense to use posix_spa= wn only Herman> on non-Linux platforms?) Robert> In emacs-28 we only use posix_spawn on macOS because its vork is Robert> sub-optimal. I don=CA=BCt remember the rationale for switching = to using it Robert> everywhere, it=CA=BCs undoubtedly in the archives somewhere. Closing. Committed as 8103b060d8 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 17 14:53:50 2022 Received: (at 54667) by debbugs.gnu.org; 17 Apr 2022 18:53:50 +0000 Received: from localhost ([127.0.0.1]:37226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngA1f-0004ur-Ri for submit@debbugs.gnu.org; Sun, 17 Apr 2022 14:53:50 -0400 Received: from mail-ej1-f44.google.com ([209.85.218.44]:38836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngA1d-0004uc-SO for 54667@debbugs.gnu.org; Sun, 17 Apr 2022 14:53:34 -0400 Received: by mail-ej1-f44.google.com with SMTP id r13so23672416ejd.5; Sun, 17 Apr 2022 11:53:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=MR8n1sOsBVSLnH6/T6N6VrKBOMxhwJBzsNFzlVZCpck=; b=nB/JFi0DAK3Sfe9wTrpAKAop2CRWuVEEjQUg/BiBw7TO30+YlbE8rFCOludwiI5Ai/ dQGYHQqob0QBgXs/3w4SGJFyOqp3nqwue5B0qIQdbx8dcudqz3FwsbjOS0hqHMmpErSn Bc4jvL4cWU6YqSGYnj53ZUMFMFUk6QlBX2E5MkcUJrmBrej/g+h+PXB2+iz0/K4zBYH/ VslS4n6+NWgmEsLNhkVCZFhMg4Nz+KvAjZEvq1r/GAr/Pno78dmAOwHCvjge9Yunhy4t b9kSWZJEAynLVeMbgWqThJbLVoT7wAt5xjNV1jZtQKUsTt/UzN3DjmCperDnc1GRHTTb 8Uog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=MR8n1sOsBVSLnH6/T6N6VrKBOMxhwJBzsNFzlVZCpck=; b=PRBFhTb/QfuoiTaMPo9+8A9nD8mf8WTI6BnIxhRvDWOag+Qsgod0jntmzR/MwETHhd RnhrjW+/fQ6gc4xatoo610tVenhg7KyRQAJTiRJgGWSK3IGWLh62z7ag2bPr8nyMnUZm OMLV2Eua+CG0xXjQpgZkGLKx7mAJxl400VLwj710HQSwPZoLiyXn+T05mFiJiinYwwi5 B5FX6H+aSAGuU/dERCE+NL4au+HrMtJDNM9tjU5GJrVQdYQaPkjRD6JpP0oIab/x2U4f 7rFr+DCLXtqwYcx59tN2KcK8EqWaTvsBZhz8lD280zPxXlfvQCKiYrKXmSa/tfk1eBME g99A== X-Gm-Message-State: AOAM530MeeIZU5sdx6ZhiPrqXyuKpHzzpzRIcMLZpUNjPE9IHIoz61iE vM8+iOxxVPKyE/tzPcnSIhQ= X-Google-Smtp-Source: ABdhPJyGcvEci9RZ1v06XHUy+2SGfPrZ32VQGvQXI50cXNe8r2O+W4EGhHB+iX3sDLvceWBJGcPUSg== X-Received: by 2002:a17:907:1c85:b0:6e8:da11:85cb with SMTP id nb5-20020a1709071c8500b006e8da1185cbmr6356728ejc.678.1650221607796; Sun, 17 Apr 2022 11:53:27 -0700 (PDT) Received: from smtpclient.apple (p57aaf107.dip0.t-ipconnect.de. [87.170.241.7]) by smtp.gmail.com with ESMTPSA id 17-20020a170906059100b006cee1bceddasm3820742ejn.130.2022.04.17.11.53.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Apr 2022 11:53:27 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb From: Philipp Stephani In-Reply-To: <87bkxk983m.fsf@gmail.com> Date: Sun, 17 Apr 2022 20:53:26 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87fsmx80e5.fsf@gmail.com> <4d6ef0f6-8ab6-2dce-aa63-d18108fd5f21@gmail.com> <87bkxk983m.fsf@gmail.com> To: Robert Pluim X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 54667 Cc: 54667@debbugs.gnu.org, =?utf-8?B?R8OpemE=?= , Herman@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) > Am 01.04.2022 um 16:44 schrieb Robert Pluim : >=20 >>>>>> On Fri, 1 Apr 2022 15:29:50 +0200, "Herman, G=C3=A9za" = said: >=20 > Herman> I can confirm that it fixes the problem. >=20 > Thanks, I=CA=BCll see if I can get around to committing it this = weekend. >=20 > Herman> For reference, here's the patch: > Herman> = https://lists.gnu.org/archive/html/emacs-devel/2022-03/msg00067.html >=20 > Herman> (Btw., according to this email thread, vfork is faster than > Herman> posix_spawn on Linux, so maybe it'd make sense to use = posix_spawn only > Herman> on non-Linux platforms?) >=20 > In emacs-28 we only use posix_spawn on macOS because its vork is > sub-optimal. I don=CA=BCt remember the rationale for switching to = using it > everywhere, it=CA=BCs undoubtedly in the archives somewhere. My reasoning back then was: 1. Using fork/vfork has a few pitfalls (can't call async-signal-unsafe = functions in the child process) that posix_spawn avoids (by not allowing = arbitrary code between fork and exec). Therefore, using posix_spawn is = simpler and more obviously correct. 2. Because posix_spawn offers less functionality than fork+exec, it = could be faster than the latter, e.g. by having it implemented in the = kernel and avoiding page table copies. 3. Since we only run CI on GNU/Linux, it's useful to have only one = codepath on all Unix-like systems so that issues that only appear on = macOS are less likely to go unnoticed. These arguments are still mostly correct, but there are some = counterpoints: 1. We need to keep the fork/vfork code path anyway since posix_spawn = doesn't allow us to correctly set up a pseudoterminal, so we still need = to deal with the pitfalls. 2. posix_spawn is indeed much faster on macOS, but not so on GNU/Linux. = (I think it's unnecessarily slowed down on GNU/Linux by what I consider = a bug in the POSIX standard.) 3. This is still true, but I'm not sure how much it matters given that = the implementations of posix_spawn are completely different on GNU/Linux = and macOS.= From unknown Sun Jun 22 11:33:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 16 May 2022 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator