From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS: native comp Date: Tue, 30 Apr 2024 10:08:32 +0200 Message-ID: References: <86le4wsj14.fsf@gnu.org> 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="27031"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org, Helmut Eller To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 30 10:09:19 2024 Return-path: Envelope-to: ged-emacs-devel@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 1s1iY9-0006k8-Qq for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Apr 2024 10:09:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1iXY-0003Wu-Hu; Tue, 30 Apr 2024 04:08:40 -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 1s1iXW-0003Uf-SV for emacs-devel@gnu.org; Tue, 30 Apr 2024 04:08:38 -0400 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s1iXU-0000ti-W3; Tue, 30 Apr 2024 04:08:38 -0400 Original-Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-41b5e74fa83so35831765e9.0; Tue, 30 Apr 2024 01:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714464514; x=1715069314; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zSpe4BtnEDSW0RtXLZUlz+V2sPpQHeItIqs4NqZ+GDU=; b=FHayjyXLVh/8N/aAHGYB/TupG+wTKG8uACW79E/EVoPOONt1vmMk63rHlMz61ho7D6 d4MQJFONbhOwCjTHsDBxHl00AEvETTwt4Kt2iK+L/cZBU41IOWWERx31AF5g2yFpyVey ADfWhweJayzTPHrPv4yUD/TnaPzYHbOyeBJd4gONZMV1mi2nXJsQ5+is3RS0ef+L1W/q WXqlJ4sedUQ79t87d8kP5zMkbBxSOs5CdnF+hZNkIGeHIUkwV2+i++babQ85LWcjEUD5 dWy2sUf9I2ZyhoQLWs+65k5NzlvdVHwQZElE2MYV8V6Qqkb1Muw7JYt+Lgg0GnwpmVja vFNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714464514; x=1715069314; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zSpe4BtnEDSW0RtXLZUlz+V2sPpQHeItIqs4NqZ+GDU=; b=egYyMdZHl5hDONvU74kMJmyPCaPOE0kRlG8Sa7DcertaIw/Hmw7T+ZjxDYvvMeGkpi jHdJvbYPOhwR2gsVW5OHXbbuSomvJ14sOljIhYer0ra7d1/6miNqc9Rfr0ofidRTS9pv MVhCytnQDjQLN8RAQKgh708UiomFlJo+6Y9gE3ypHuO0kUJ8tS+Jl156sXjcKVAsd105 Zx3R9UI2d9Kt8mY4SEiTmBeRxjNi1rtuaDi8+3D9qqwVKtmxOiCv6/3uxHYvl9ox9RFp f6qZiMtP3ihLSqTFGsOCnY9kaL7NMN00PIn7iUlPpTs8D8sBPT1dVtdpUj5PzROM+XI6 Fcng== X-Forwarded-Encrypted: i=1; AJvYcCU74ndTWMr2gQJcn+eT8DebXUfXsRMBxAdtL9ELeoO0yxCMmJSK6amSNmIjyHjfZVzo7ZUNceSCW3LzzQEay27lJx3F X-Gm-Message-State: AOJu0YzEvZ1wDnpKeC2MCqMr87NUK9RBDeYdJklEonaCm/sGTQxAR+YM 2TxLLvR0VlWvj/0zlhNIyKrVUe3w6Xbzs7QmFOaDMkMDgTp7LSVjaVy4QA== X-Google-Smtp-Source: AGHT+IGSs+6ekoKutu95pWN/H5s/Q21xcaSXqIsdrvmQZ1yYeZfIAOrQBmUcbsATgo5IpTMHi/+Hhw== X-Received: by 2002:a05:600c:4f8e:b0:419:ec38:f34b with SMTP id n14-20020a05600c4f8e00b00419ec38f34bmr7544927wmq.20.1714464514115; Tue, 30 Apr 2024 01:08:34 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3ae18.dip0.t-ipconnect.de. [79.227.174.24]) by smtp.gmail.com with ESMTPSA id v17-20020a05600c445100b0041c130520f3sm8759206wmn.6.2024.04.30.01.08.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 01:08:33 -0700 (PDT) In-Reply-To: (Andrea Corallo's message of "Tue, 30 Apr 2024 03:40:30 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=gerd.moellmann@gmail.com; helo=mail-wm1-x334.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:318404 Archived-At: Andrea Corallo writes: > Gerd M=C3=B6llmann writes: > >> Gerd M=C3=B6llmann writes: >> >>> That promises to become fun :-/ >> >> Sometimes one needs a bit of luck. Another try landed me in an abort in >> set_internal, and I could see that we have another case of a symbol >> pointing to a tombstone. So, we have another reference in the >> compilation unit that we don't trace. > > Maybe you can make it more reproducible building at -J1? I meanwhile suspect it's ASLR. When I run things under LLDB, ASLR is off (LLDB does that). When I gmake (with -j1), ASLR on. >> @Andrea: Any intuition where else references could lurk, perhaps? I'm >> currently doing this: >> >> static mps_res_t >> fix_comp_unit (mps_ss_t ss, struct Lisp_Native_Comp_Unit *u) >> { >> MPS_SCAN_BEGIN (ss) >> { >> IGC_FIX_CALL_FN (ss, struct Lisp_Vector, u, fix_vectorlike); >> if (u->data_imp_relocs) >> { >> size_t n =3D ASIZE (u->data_impure_vec); >> IGC_FIX12_NOBJS (ss, u->data_imp_relocs, n); >> } >> if (u->data_relocs) >> { >> size_t n =3D ASIZE (u->data_vec); >> IGC_FIX12_NOBJS (ss, u->data_relocs, n); >> } >> } >> MPS_SCAN_END (ss); >> return MPS_RES_OK; >> } >> >> Maybe there's something wrong with that (the ASIZEs maybe?) > > I think the size should be fine,=20 Thanks. > it would be very interesting to know which one is the symbol that was > actually killed by the GC. This would give us strong indications. > Maybe we can use the watchpoint strategy to identify it? It's the symbol that leads to the setting-constant error in the eager macro expansion error. You can see that in the debug org file I attached to another mail. data =3D 0x000000010f0eb008 "byte-compile-form-stack" The problem is apparently similar to what we had before: The symbol has been moved in memory (not freed), and a reference to the symbol was not updated because we don't trace it. So a watchpoint won't help - the problem is that nothing changes :-). Next strategy or tactic, I think, could be to produce a C file for macroexp.eln, and see where the symbol appears. I would imagine that I can deduce from the text representaton of the constants in C what index correspondons to the symbol, and then see if it is used in surprising ways. Maybe. WDYT?