From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 28 10:33:03 2024 Received: (at submit) by debbugs.gnu.org; 28 Feb 2024 15:33:03 +0000 Received: from localhost ([127.0.0.1]:49090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfLvX-0007OF-B7 for submit@debbugs.gnu.org; Wed, 28 Feb 2024 10:33:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:56222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfLvQ-0007Nt-Q6 for submit@debbugs.gnu.org; Wed, 28 Feb 2024 10:32:57 -0500 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 1rfLut-0000Hf-Ns for bug-gnu-emacs@gnu.org; Wed, 28 Feb 2024 10:32:23 -0500 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rfLuo-000278-7r for bug-gnu-emacs@gnu.org; Wed, 28 Feb 2024 10:32:18 -0500 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a36126ee41eso709717366b.2 for ; Wed, 28 Feb 2024 07:32:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709134331; x=1709739131; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=eYJNCPcEoGdVlCgaHjbgfsJlgZLb1ML5/v2tIwikEEY=; b=HFwKZWoflRa5B4LXU+M6aOvg+k1Utay2O64thtqxPyd0Z767R3srs+d2DRZfSYcBja nwVcQSOQYnkVXCr1Md+vaaVsnF1Q+Ki+94oHsc0900DCXRssI9h3ouy1ZYhsqAiJZ6Pe 2kXyUPgHq+E0i9J7w8f1/mST6ataetVtV44QebxqDwH4/GKaYnwLvGJQbfNn4Tra9GAi 44vZ6WcUvVEw5VD6gxmN9HpA1PCflc6K7OkEqS+yqh03DfM+s6ywIpf6QfVgFlSGX4CL 3ov8an8bFFknm9oxHWBrHTPyoEDakIVH6dbbyQlOfJ5kDfCNxFDVI28aVjDvp0OqiRLl 8agA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709134331; x=1709739131; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=eYJNCPcEoGdVlCgaHjbgfsJlgZLb1ML5/v2tIwikEEY=; b=kfs0AcSWhlH6P0QtBnxTkdk8apmhZmDD3fHSyHn+8TOYYxSwBWw3Q9okWo/g5HTCnr B9HayWJCsV1CdmMyzsSAssm8QGrbIz7ak64w0FfLgU7o/byibSROY0g0B+jh8t3Lw7Po AKZeMJ/tdt88ExXsG7qdwNjgeODxOBy49ZXi7DPCKytQB1cTZIdIGvjsxb/2J5BchN2V rhA2K4rkBBHyEUvByOVC0gK/F8VEc+hjQVLpvyzTFBkI25TfXxd6OA/C6Gbe50V3ZYX6 TWUB1u76oX37Qb/t71HDemAEuyWD9jbY7RDqVoAz+G0fjOZhNH6IAis4MuY3NGmYyWm7 oUYw== X-Gm-Message-State: AOJu0YwHwNl2nJWnr44aQoQq7bDGcWHffk6SbcZIQS6FOT/1eSVdEN/b WrAD4luuWlEY2lOS3kAUOHreccW7vx5nTPdVIpFfgz8ICEqCcCu3P9i0/1Yg X-Google-Smtp-Source: AGHT+IHBQE0/IK94ofh82k/EOuPaEl6pZ7hkDrmOve/LnSCyr2LUETXRQf54fXVuTnyXcPHbOA9qdw== X-Received: by 2002:a17:906:7c44:b0:a43:bf12:e8a0 with SMTP id g4-20020a1709067c4400b00a43bf12e8a0mr20914ejp.15.1709134331257; Wed, 28 Feb 2024 07:32:11 -0800 (PST) Received: from Pro.fritz.box (p4fe3abca.dip0.t-ipconnect.de. [79.227.171.202]) by smtp.gmail.com with ESMTPSA id h5-20020a1709063c0500b00a432f3bc3a5sm1971105ejg.76.2024.02.28.07.32.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 07:32:10 -0800 (PST) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: bug-gnu-emacs@gnu.org Subject: 30.0.50; temacs, SEGV while pdumping X-Debbugs-Cc: Date: Wed, 28 Feb 2024 16:32:09 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x62c.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-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 (--) This is with my heavily modified local Emacs, which is based on master. I think it applies to an unmodified master as well. I got a SEGV in temacs while dumping a bootstrap.pdmp: * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x7fd9893b8a34) frame #0: 0x00000001002cb20c temacs`hash_table_index_size(h=0x00007fd9893b89f8) at lisp.h:2717:26 frame #1: 0x00000001002cc4ad temacs`sweep_weak_table(h=0x00007fd9893b89f8, remove_entries_p=false) at fns.c:4980:17 frame #2: 0x0000000100265c5d temacs`mark_and_sweep_weak_table_contents at alloc.c:6303:19 frame #3: 0x000000010026502b temacs`garbage_collect at alloc.c:6554:3 frame #4: 0x0000000100264b26 temacs`maybe_garbage_collect at alloc.c:6390:5 frame #5: 0x00000001002b17ea temacs`maybe_gc at lisp.h:5870:5 frame #6: 0x00000001002abd34 temacs`Ffuncall(nargs=3, args=(struct Lisp_Symbol *) $158 = 0x00007ff8c0a9f000) at eval.c:3073:3 frame #7: 0x00000001002d4388 temacs`inorder(predicate=(struct Lisp_Subr *) $165 = 0x0000000100b51348, a=(struct Lisp_Subr *) $171 = 0x0000000100b4d3a0, b=(struct Lisp_Subr *) $177 = 0x0000000100b55520) at sort.c:116:11 frame #8: 0x00000001002d3987 temacs`count_run(ms=0x00007ff7bfefb9f0, lo=(struct Lisp_Symbol *) $187 = 0x00007fd9895f74e8, hi=(struct Lisp_Symbol *) $198 = 0x00007fd9895fd298, descending=0x00007ff7bfefb9d7) at sort.c:180:7 frame #9: 0x00000001002d308e temacs`tim_sort(predicate=(struct Lisp_Subr *) $205 = 0x0000000100b51348, seq=(struct Lisp_Symbol *) $215 = 0x00007fd9895f74e0, length=2999) at sort.c:943:19 frame #10: 0x00000001002c4070 temacs`sort_list(list=(struct Lisp_Cons *) $222 = 0x00000001763e9a60, predicate=(struct Lisp_Symbol *) $240 = 0x0000000100ba97d0) at fns.c:2362:7 frame #11: 0x00000001002c3e74 temacs`Fsort(seq=(struct Lisp_Cons *) $249 = 0x00000001763e9a60, predicate=(struct Lisp_Symbol *) $267 = 0x0000000100ba97d0) at fns.c:2399:11 frame #12: 0x000000010026f7c6 temacs`dump_sort_copied_objects(ctx=0x00007ff7bfefca78) at pdumper.c:3325:5 * frame #13: 0x000000010026e1df temacs`Fdump_emacs_portable(filename=(struct Lisp_String *) $276 = 0x00007fd88d0326e0, track_referrers=(struct Lisp_Symbol *) $294 = 0x0000000100ba36e0) at pdumper.c:4249:3 As one can see, a GC can run while dumping. Fdump_emacs_portable uses a struct dump_context ctx_buf, which is allocated on the stack (the local variable ctx is a pointer to the local variable ctx_buf). 1. While dumping, pdump creates new Lisp_Objects (hash-tables, conses, ...) that are stored in dump_context or subobjects of it, hash-tables for example. 2. I can't find a function that marks a struct dump_context for GC. If I'm right, nothing protects the objects that pdump creates from GC. As a fix I propose to inhibit GC while pdumping. Would be nice if someone could check if (2) is right. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 28 23:23:19 2024 Received: (at 69459) by debbugs.gnu.org; 29 Feb 2024 04:23:19 +0000 Received: from localhost ([127.0.0.1]:46505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfXx0-0007iO-2P for submit@debbugs.gnu.org; Wed, 28 Feb 2024 23:23:19 -0500 Received: from mail-lf1-f43.google.com ([209.85.167.43]:52473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfXwx-0007i0-Ko for 69459@debbugs.gnu.org; Wed, 28 Feb 2024 23:23:17 -0500 Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-512d19e2cb8so495886e87.0 for <69459@debbugs.gnu.org>; Wed, 28 Feb 2024 20:22:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709180502; x=1709785302; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JihFLFYUXpaNm2IvSA196YPTT07afucv7bkaQXyzc58=; b=FJHu8e5keSN1HofMa8P7up7TNAzKch+eVwZ52nrzbd8K1d8iZIDcRfWaPQoJ7Gr+EO iZanG/PWOml/tBF3aRcjjYaheCfGzd12O/Kb8jegXaXy/2YjUOui45JgvcgdaB7kbk6O QEU8pKHJBiscGUJxQVmO2jdxYljza6pXCTE1Znf7BIRHBtf6Lc2RnKdeof0YjUCDiG/1 ABY0D8x7TgWamrnOfx3SSa2duYOswQuKfPjPqEm5pURft52GoV59W8MbzW11sQ/O256i UVAi7CuMG93ottPNnSlA86DomL5HZpd0lOi5Ox8ABquXv/AyrWCV77YIbspo9UyfCzrR 66uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709180502; x=1709785302; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=JihFLFYUXpaNm2IvSA196YPTT07afucv7bkaQXyzc58=; b=KSiRsixjxfysp8/jrGUmrm8uOcvX+C1MVFhQTRM47g/N7KkY+JiEmgMlTKjuEQcHCU WAet+dmnXk35baryJ+p/vjU0jpCAlhLS3OmvACWFgJ47qDLEY+kAbH5hzrNTRCfW0/iQ g7CfI9XWmpk7JoHh4pS+B8cuB3lPj2F/mcwFp8fwVT50BdJ7VXu1k5jxhka+EHh9GHLg n61r3W878ILCk+GSANF8l6HNlhrUKK9BjsbChVDFQAL+Cq30pP+fchOKvRXaKY+JWXq+ a9SWx/4oPqsKiZbE+9ESnjQmbXdE+LeaH1Y5KtJ7+zRFBZA2K+rb6nwqss+Qfp6dRvjp iDhA== X-Gm-Message-State: AOJu0YxWTO0BMt96N09w5BYc/Tld5FYtHKc9P0x8g4hSGI59bMTVQK0S zlFleHOujDp+z5hQZFo0QUKFXl/aERkAF6rLD6PZZUy9jN0CBXNWeq/TpQGg X-Google-Smtp-Source: AGHT+IE5L0E3zpgyjoRySGrkEo2PyCvhbN/6VNmnyjHfqeRRVC/qneIaPOXxcOpM7Vi1cChKF1oRKQ== X-Received: by 2002:ac2:518d:0:b0:513:544:903e with SMTP id u13-20020ac2518d000000b005130544903emr520347lfi.29.1709180502234; Wed, 28 Feb 2024 20:21:42 -0800 (PST) Received: from Pro.fritz.box (pd9e362b2.dip0.t-ipconnect.de. [217.227.98.178]) by smtp.gmail.com with ESMTPSA id fj21-20020a1709069c9500b00a3f218aed03sm235315ejc.120.2024.02.28.20.21.41 for <69459@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 20:21:41 -0800 (PST) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: 69459@debbugs.gnu.org Subject: Re: bug#69459: 30.0.50; temacs, SEGV while pdumping In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llmann?= =?utf-8?Q?=22's?= message of "Wed, 28 Feb 2024 16:32:09 +0100") References: Date: Thu, 29 Feb 2024 05:21:40 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) 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: 69459 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 (-) Gerd M=C3=B6llmann writes: > 1. While dumping, pdump creates new Lisp_Objects (hash-tables, conses, ..= .) > that are stored in dump_context or subobjects of it, hash-tables for > example. > > 2. I can't find a function that marks a struct dump_context for GC. If > I'm right, nothing protects the objects that pdump creates from GC.=20 > > As a fix I propose to inhibit GC while pdumping. Would be nice if > someone could check if (2) is right. (2) is false: because ctx_buf is on the stack, stack scanning makes it an ambiguous root. So I'm closing this, because I haven't seen something like this SEGV in an unmpdified Emacs. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 28 23:23:33 2024 Received: (at control) by debbugs.gnu.org; 29 Feb 2024 04:23:33 +0000 Received: from localhost ([127.0.0.1]:46519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfXxD-0007jI-Qe for submit@debbugs.gnu.org; Wed, 28 Feb 2024 23:23:33 -0500 Received: from mail-ed1-f42.google.com ([209.85.208.42]:60701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfXx8-0007ie-PR for control@debbugs.gnu.org; Wed, 28 Feb 2024 23:23:30 -0500 Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5645960cd56so754527a12.1 for ; Wed, 28 Feb 2024 20:22:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709180514; x=1709785314; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:subject:from:to:message-id :date:from:to:cc:subject:date:message-id:reply-to; bh=ifcC9UkrFqhezw5+ZhBc4SCz7ox3r5Z3E0RLpxsIAOA=; b=aNhvlVymc4sF2kr35CxuFP+cflZcAYySZtnFLZ27meFTE6dBLuqhlCL3IoiceGrSgO KpmZeM1DDTuXvKwovLgtFuNKzulD4xfp8hLbBxS/jBhx0qJ/gl+5hX+ShvjoKh/L7NCn 2VFjrkwrNbKcZMsxKhyZivDjflpt7CvQIHwutBK2QaxhqaUg3gSybUiZgmGRQqQA51fj tHILA0AgS2xLU2h45XyRbFAO6k2UXsZ19XlKAy9l0FWYLtqF7NdWHpvXUR0QrQ9kmCjN wNQOnd38Ih4GpaAuDWDO6rPEBxes4xnpzVuB3/81tbBxbK3vvNMoFIGgUNoAKP28gLDY pN0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709180514; x=1709785314; h=content-transfer-encoding:mime-version:subject:from:to:message-id :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ifcC9UkrFqhezw5+ZhBc4SCz7ox3r5Z3E0RLpxsIAOA=; b=kVCgxBFj9NN6Z85nwMrdoPq06Pi0sARo0TemqT9N0j2A6YWo23vH7RGD426jgYHtTb mrBB0qyw6VYDrl53axz/AICQ9ojVIg3Q61e7Ze+2UTA0MkwD81T6Ix6vINtMO6VX7gc/ 3a3dHFB3zt3oPbEkjNcOfch1XzyCX6c/KEzdQ3trEGtcL4NcCZIFNPC4nKLx1Khk0w8c xA7i1VwCw56XVh3yXfhjRmTrsjGQI2EyhZgyRHjba6Cm0pr5pXb5NoNc9nlxu+OADaBg EQ0pvdg7jScp1UMN+dDJmd47UphXErLT74MN5fNtBm7eBc/vaaQ09+Q0hqDB+4t6clmm fD0Q== X-Gm-Message-State: AOJu0YyG2DRGRuTmQNyy1Y66GK0O6Te5nu/Abp3xhl9nIwwHZwM9LJp0 i51Yv8Z3SCVqsFO2uwLMrrIUoUkeeTdaYAytndsHFhec7y5mi8RirF4Sj+Ro X-Google-Smtp-Source: AGHT+IGxxLE2+YU2g+dO1yEhwAIAlXksofU60U4S+RT0tc/oIlL5h8LfAOuNZEkPjV/rOPmXHhQoMg== X-Received: by 2002:a17:906:3954:b0:a43:ff1a:4970 with SMTP id g20-20020a170906395400b00a43ff1a4970mr383371eje.43.1709180513802; Wed, 28 Feb 2024 20:21:53 -0800 (PST) Received: from Pro.fritz.box (pd9e362b2.dip0.t-ipconnect.de. [217.227.98.178]) by smtp.gmail.com with ESMTPSA id x11-20020a170906710b00b00a4434e9938asm242476ejj.84.2024.02.28.20.21.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 20:21:53 -0800 (PST) Date: Thu, 29 Feb 2024 05:21:52 +0100 Message-Id: To: control@debbugs.gnu.org From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Subject: control message for bug #69459 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control 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 (-) close 69459 30.1 quit From unknown Mon Aug 11 18:18:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 28 Mar 2024 11:24:09 +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