From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#75292: 31.0.50; igc: (file-error "Doing vfork" "Bad address") Date: Fri, 03 Jan 2025 18:24:47 +0000 Message-ID: <87bjwnkb81.fsf@protonmail.com> References: <87pll5qexm.fsf@localhost> <87cyh5kksp.fsf@protonmail.com> <87y0zrg4om.fsf@localhost> Reply-To: Pip Cet Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2947"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75292@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 03 19:25:19 2025 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 1tTmMH-0000Vt-3b for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jan 2025 19:25:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTmM6-0004oA-2Q; Fri, 03 Jan 2025 13:25:07 -0500 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 1tTmM2-0004o1-Bz for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 13:25:02 -0500 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 1tTmM2-0001Al-2O for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 13:25:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=6EO1jt/q1NyKyNFGenscSmtKfBDrwUmPHt2a/z6V6Ks=; b=tzNm918MSZy2yHBHESn77ksKp25K++fwuwOFi+J+u9mR1kpdV01M8PvY0mRAQlFpgWef8iAE15uOuGhImgJ3Zy+8EYYfZiMpv7u2U9vatYwqA6Icy2gdtEiaXKpVwexQ1cDBZtdv4EA1AxIuQJKMxBjifyyWcrupjOsBWg11xz4EY7MC2lpcS3Ms+yMk8P5LNitMRkZpv1vbwwt0YBeMTA/cVE0dXiMbmTJxJdkAb9O0cWuCaUsS0u22unvH8kAuPDLSAeEyA+IZ02MffCAmrB+fI50liHVK52rYvmmklrtNmhxQee5Ujr2tyUoJiCcc/t4xuLaRLw/CCrWJ5HDiRw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTmM1-0007ir-QP for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 13:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jan 2025 18:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75292 X-GNU-PR-Package: emacs Original-Received: via spool by 75292-submit@debbugs.gnu.org id=B75292.173592870129679 (code B ref 75292); Fri, 03 Jan 2025 18:25:01 +0000 Original-Received: (at 75292) by debbugs.gnu.org; 3 Jan 2025 18:25:01 +0000 Original-Received: from localhost ([127.0.0.1]:52021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTmM0-0007iS-HH for submit@debbugs.gnu.org; Fri, 03 Jan 2025 13:25:01 -0500 Original-Received: from mail-10628.protonmail.ch ([79.135.106.28]:63225) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTmLx-0007i0-B3 for 75292@debbugs.gnu.org; Fri, 03 Jan 2025 13:24:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1735928690; x=1736187890; bh=6EO1jt/q1NyKyNFGenscSmtKfBDrwUmPHt2a/z6V6Ks=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=ipXI/PV8RV6bswp/RGoUL69ljSNPmkobaw7wl+9dWJhrdB11kTAgMm12go4P31u6p pCu6ABSbmdtwYet0Tnv5WeuZbwR0K42DCpD3p8HClhikcqoRCGZ5m4bngU2gSdqIQH dto5b+G94wLmNdpaHTsgG98z8AY9Gf/pnfaJsgIOdAX/tZAHJXmdmX45xtkCG/IzES XewYsLJdMQdgL45X19j14ysCBZF9vGMAfbd2IV3qvKhxDVuIKLnMCjPdWZ2CvlJLpl 9odHpLKoZJbk7H3+9b0SyP+uoTY0TCnajJ886XJqhsH3KCXIRhvBuM2Z64ZhKpYjiw HSfu3AEpVpsaA== In-Reply-To: <87y0zrg4om.fsf@localhost> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 9d8557782c13d1988d8c9ff1dcb257a6d7454cc2 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:298296 Archived-At: "Ihor Radchenko" writes: > Pip Cet writes: > >> After checking Eli's suggestion, an strace would be nice to find out >> which of the pointers has gone bad. > > It can sometimes take one day to get the error. I am not sure if have > enough disk space to record strace for so long. (I never used strace thou= gh) Ouch. I didn't manage to reproduce it; maybe I didn't try for long enough. For the record, Emacs still defaults to -O if no optimization option is specified. I fixed that in my tree a long time ago, and I forgot. You are running with optimization so it's entirely possible an automatic variable which should have kept alive the string disappeared. My suggestion would be (strace -ff ...emacs... 2>&1) | egrep -50 '(fork|clone|spawn|exec)' (grep -e on most distros, but you use gentoo, right?) Note that this will attach to all of emacs's child processes recursively, so there still might be a lot of output. You can also attach to a running emacs process with strace -p; this should allow you to kill the strace and attach gdb to emacs afterwards for inspection purposes. However, we have three possible explanations for this bug that we already know about; maybe it's best to fix those three and see whether the bug went away? I've opened bug#75322 for the almost definitely buggy usage of SAFE_ALLOCA in process.c and callproc.c, which might explain this (but I don't think it does, TBH, because SAFE_ALLOCA would use alloca on your system in this case, I think). I don't think it's the 64KB stack allocation of call_process, either, but that's also something we shouldn't do and there is a tiny chance we somehow fail to mark a large C stack. The most likely candidate right now is make_environment_block, which happily stuffs string data pointers into an xmalloc'd block and goes about its merry way without letting GC know about them. I think it would cause the problem you observed, but haven't managed to reproduce it yet. If I manage to do so, I'll push a fix. Pip