From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#57751: 29.0.50; crash in GC Date: Wed, 14 Sep 2022 07:46:00 +0200 Message-ID: References: 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="13181"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) Cc: 57751@debbugs.gnu.org To: Sam Steingold Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 14 07:48:07 2022 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 1oYLFm-0003G5-DW for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 07:48:06 +0200 Original-Received: from localhost ([::1]:55594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYLFk-0000NR-VU for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 01:48:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYLEk-0008Vm-Fj for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 01:47:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36514) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYLEj-00073m-Sv for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 01:47:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYLEj-0001iC-Og for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 01:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2022 05:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57751 X-GNU-PR-Package: emacs Original-Received: via spool by 57751-submit@debbugs.gnu.org id=B57751.16631343766520 (code B ref 57751); Wed, 14 Sep 2022 05:47:01 +0000 Original-Received: (at 57751) by debbugs.gnu.org; 14 Sep 2022 05:46:16 +0000 Original-Received: from localhost ([127.0.0.1]:53446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYLDy-0001h4-GK for submit@debbugs.gnu.org; Wed, 14 Sep 2022 01:46:16 -0400 Original-Received: from mail-ej1-f47.google.com ([209.85.218.47]:40472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYLDu-0001gn-BD for 57751@debbugs.gnu.org; Wed, 14 Sep 2022 01:46:12 -0400 Original-Received: by mail-ej1-f47.google.com with SMTP id l14so32195601eja.7 for <57751@debbugs.gnu.org>; Tue, 13 Sep 2022 22:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date; bh=BTpEg7wCqCZp3Mu08wXemMH/sGG9QKQQ1TvE0JXqbO0=; b=Hb4kRtHXpPqh7omkytYoNwF15BtXjsvEWlkyspa4c6egna6yVtHH03mzQ/ofhZoJmG AIxcUcwepjxCQc/45aq3fQDVW8nX6c3qXT2CEKNYoT/rbr0NarhQWs1akX59J7IPCR3P c3iSG5nfHPXZeBv0FwK60vRyCeEkTKVt9eo90jQ+DeMKFcL/Ugz4Zt0I2eQo3MjOK+zZ rIvXguxUPTkPg5HVtNMUV5xcfjIrxFDKZNkPOFGRhxHGQKsAU5JOhJ9B3g1GbWh5C74X B217QzdRzYAXvvw4S/nfmfjo2OVRn+WHPKITp1JZ8NjfSxGQqZ56bFY1nPuyTWtXijQI SY3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=BTpEg7wCqCZp3Mu08wXemMH/sGG9QKQQ1TvE0JXqbO0=; b=t2SDaXBs3Iz8ALCvelZMXmtukTogTG+b6Kr50kTkk7cv6I4/stW551k+YfXDT4AYmR P0NkjmQhHvHsHkgzMejZxfXRzUU0OVyS+EQ9BBke57bzoYFPh9HU6Xs24NczEz7AGTWA QKbCo/ib56IfFXQBluJ9OGmvrl4HUIxexUuOPjp0pFlkxpASWbOSHaC3rVB4SsBDwb8r S2z8itRI8JED8EldJQNnYMJqTTifUJson0dt0HJVLpO5ZzJ+W1WCjlTP4PjvyfoIOD5b emOIP8sjfq0P2DFdCPdfPQK/txZN+OACOeI3wQp7vSEoErW947xYGuC52rOk8hP34E5b 6M0w== X-Gm-Message-State: ACgBeo1sEp/IGB9Nkg+IMyMsGPFcnmnmzbnExms9C1Mhv6hx844ON3eQ PWTFwGZ9DTwWaMPnFj5vVbYEdlm8LYpCug== X-Google-Smtp-Source: AA6agR5l5jYs5326mLAfqHqSIO/DdQzlVkIR6hC/4Yn0ksXVNZWM7IaMLDtup0Ntrxpg1QPPZmgzmw== X-Received: by 2002:a17:907:7d8f:b0:780:37e7:d3b4 with SMTP id oz15-20020a1709077d8f00b0078037e7d3b4mr533964ejc.594.1663134362820; Tue, 13 Sep 2022 22:46:02 -0700 (PDT) Original-Received: from Mini.fritz.box (pd9e36a8e.dip0.t-ipconnect.de. [217.227.106.142]) by smtp.gmail.com with ESMTPSA id c26-20020a056402101a00b0044792480994sm9000597edu.68.2022.09.13.22.46.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 22:46:01 -0700 (PDT) In-Reply-To: (Sam Steingold's message of "Tue, 13 Sep 2022 10:51:12 -0400") 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" Xref: news.gmane.io gmane.emacs.bugs:242432 Archived-At: Sam Steingold writes: >> (If you use it for building Emacs, you'll need to "brew install bear", >> or remove the call to bear in the script. Also, you might want to use >> --elc if you don't use native compilatin.) > > I think native compilation is disabled on mac by default. That's correct. I was mentioning --elc only because make-emacs defaults to configuring --with-native-compilation, because I'm using that 99% of the time. > I build my normal Emacs out of the tree, so the source tree is already > clean, thus I just did > > ./autogen.sh=20 > ./configure LDFLAGS=3D"-fsanitize=3Daddress -fno-omit-frame-pointer" > CFLAGS=3D"-g -O0 -fsanitize=3Daddress -fno-omit-frame-pointer" Looks good. > and `make' which printed, inter alia, > ld: warning: dylib > (/usr/local/Cellar/little-cms2/2.13.1_1/lib/liblcms2.dylib) was > built for newer macOS version (12.0) than being linked (11.1) AFAIK these warnings are annoying but harmless. > 2022-09-13 10:48:30.934108-0400 emacs[18589:5791720] SecTaskCopyDebugDesc= ription: emacs[18589]/0#-1 LF=3D0 > Process 18589 stopped > * thread #1, queue =3D 'com.apple.main-thread', stop reason =3D > EXC_BAD_ACCESS (code=3D1, address=3D0x7ff8c11d6f70) That's not so good. It means the address sanitizer couldn't catch anything before Emacs crashed. I'm afraid now it's going to get tedious, without some divine inspiration. > frame #0: 0x00000001006dc4e5 emacs`symbol_marked_p(s=3D0x00007ff8c11d= 6f70) at alloc.c:4020:14 > 4017 { > 4018 return pdumper_object_p (s) > 4019 ? pdumper_marked_p (s) > -> 4020 : s->u.s.gcmarkbit; > 4021 } > 4022 > 4023 static void > Target 0: (emacs) stopped. Hm, it's a fake Lisp symbol this time. Last time it was a fake float. Which fits the hypothesis of something writing "randomly" to the heap.=20=20 Or it could be uninitialized memory, maybe. > (lldb) bt > * thread #1, queue =3D 'com.apple.main-thread', stop reason =3D > EXC_BAD_ACCESS (code=3D1, address=3D0x7ff8c11d6f70) > * frame #0: 0x00000001006dc4e5 emacs`symbol_marked_p(s=3D0x00007ff8c11d= 6f70) at alloc.c:4020:14 > frame #1: 0x00000001006db869 emacs`process_mark_stack(base_sp=3D0) at= alloc.c:6943:10 > frame #2: 0x00000001006d9a79 emacs`mark_object(obj=3D0x00007ff7bfee99= d0) at alloc.c:7035:3 > frame #3: 0x000000010052bf20 emacs`mark_kboards at > keyboard.c:13266:4 Last time there was also a mark_kboards on the stack. I wonder if that tells us something. > what do I do next? Good question ;-). Could you please check the following: - Does it also crash when you run emacs on a terminal (-nw)? If not, it could be a hint that the cu=C3=B6prit is in the NS GUI code. - Could you please see if it crashes consistently in different runs? What I mean is that is crashes in the same function with the same backtrace and the same pointer value of the symbol in frame#0? I guess I would quit LLDB between between runs, for no good reason :-), just to make sure it's reproducible that way. - I think you mentioned that the crashes started not so long ago? Do you perhaps know a commit which is still "good"? Or maybe a time, like 4 weeks ago, or so? We would need a good commit for git bisect anyway. > Would you like to get on the phone to drive my fingers? ;-) Hehe, that could only be helpful if I knew what I'm doing :-). (If I'm trying the be too "helpful", please just tekk ne. I Know that I'm sometimes doing that. No problem.)