From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.bugs Subject: bug#60220: 29.0.60; macOS 13.1 crash shortly after starting Emacs Date: Thu, 29 Dec 2022 18:46:54 -0500 Message-ID: References: <24A595DF-81D8-47E7-90BC-FCDDB27315E8@gmail.com> <83ilhz2r14.fsf@gnu.org> <83r0wl0z6g.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39391"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, eggert@cs.ucla.edu, 60220@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 30 00:48:16 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 1pB2dE-000A2z-LH for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Dec 2022 00:48:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pB2d2-0000Xp-Ci; Thu, 29 Dec 2022 18:48:04 -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 1pB2d1-0000XU-0A for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 18:48:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pB2d0-00074U-Mp for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 18:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pB2d0-0002vr-2O for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 18:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Dec 2022 23:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60220 X-GNU-PR-Package: emacs Original-Received: via spool by 60220-submit@debbugs.gnu.org id=B60220.167235763511194 (code B ref 60220); Thu, 29 Dec 2022 23:48:02 +0000 Original-Received: (at 60220) by debbugs.gnu.org; 29 Dec 2022 23:47:15 +0000 Original-Received: from localhost ([127.0.0.1]:33168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pB2cE-0002uT-9h for submit@debbugs.gnu.org; Thu, 29 Dec 2022 18:47:15 -0500 Original-Received: from mail-pf1-f170.google.com ([209.85.210.170]:45934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pB2cC-0002uE-BZ for 60220@debbugs.gnu.org; Thu, 29 Dec 2022 18:47:13 -0500 Original-Received: by mail-pf1-f170.google.com with SMTP id c7so13529661pfc.12 for <60220@debbugs.gnu.org>; Thu, 29 Dec 2022 15:47:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=STD/J/Rer+O3JXnxglSfpUzhEMAUdvWLKd/C8k40Tco=; b=frioalvhs+TmlCGF/Se0f1mgW4SwZROPBjoUKJrzeptZK2SylzFBixZ6AgUEF8G3sS mt0LAw3UwYu/aF3MSsCwB/fcGlttmfoXIndM0pEWv+QhKLMMDjJGh/YU18VO2+VEASK/ Le1z84X/+Hd/pfB/oEqGH8qjvN9tfmjp/RGkzoPyjWttzKcW2BKsxxuPEwb3xSmAefEM G5xHh5eKreRaVTGkC83ig8WKeGGp1mZRujS8haj2TAVtu8ocza538VN6CLfrN8wWMa0P YqvJejB0Ons4vNtsQUgoBbGJ5usczX210StvUObRwlxMgOzWKgNKLpI13VVv2um44/gR panQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=STD/J/Rer+O3JXnxglSfpUzhEMAUdvWLKd/C8k40Tco=; b=zk2ZQWX3fLroiik0euaCsjkJc65JQOwKLlYFvAWM5mrCJ65HC8wx0ymYQ850s0rffh 1uX6fgYrN8rIanWEGvEM0y6Yy7IRM6DkBEWWHf1JL8A/JMp7ZQCHhhJJ+rwtFoduumcP mxFcXEV8rD0h9b7iT/0qYeoCdTNY1KCiFcKgq1we33xdRNdb6bS28CipPksbZHernL0+ wiI0VGtP7/9qaPejuHrWMKl+XYv7JYYNaozpyaU6NApcN78BY7pCzdIO/iJWiMtNYC3Y VDi5tED+eXyxN8ivh5RPcG4wfCCKKXeybe+NLvweXb9quVGbRZ/noxF4jSoi8aWhx83P fDNA== X-Gm-Message-State: AFqh2kpl13VMXz5Tla1tXzgdtfB/kAfjT2eKxDNC3izsWQOBYuwcsoGm 2yT5GsHs+VgVjDg9ZgJPAqXoW7Qbns9N2WmROIA= X-Google-Smtp-Source: AMrXdXs/RCZb7Y7X22PHn0/EF145e6zTpC4qUKubyVvIHyAWjCyMxDH6gA7osVCAH4D7Wjkg7kY0eChbrV3tlZBmysU= X-Received: by 2002:a65:4c81:0:b0:486:f3bf:822e with SMTP id m1-20020a654c81000000b00486f3bf822emr1791557pgt.482.1672357625238; Thu, 29 Dec 2022 15:47:05 -0800 (PST) In-Reply-To: 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:252071 Archived-At: On Thu, Dec 29, 2022 at 5:47 PM Aaron Jensen wrote: > > On Tue, Dec 27, 2022 at 8:11 AM Eli Zaretskii wrote: > > > > > From: Aaron Jensen > > > Date: Tue, 27 Dec 2022 06:12:35 -0500 > > > Cc: gerd.moellmann@gmail.com, eggert@cs.ucla.edu, 60220@debbugs.gnu.org > > > > > > I found a similar issue in another program: > > > https://forum.xojo.com/t/xojo-2022r3-1-crashes-galore/72887/142 > > > > Maybe, maybe not. Your crashes always happen after restarting, right? > > You don't see crashes inside dlopen if you never restart, correct? > > > > But yes, it could be something related. My production session has 260 > > *.eln files loaded, for example. So if macOS 13 has problems with > > loading many shared libraries, maybe this is one of the symptoms. > > I can't say that with 100% certainty. Sometimes the crashes are hours > after I started Emacs and I don't know if I had ever restarted that > session. I do seem to be crashing a lot less frequently after the > signal patch, which is probably just a coincidence, but who knows. > > Aaron I just got a crash on a fresh start, so I now know it is not related to restarts. Interestingly enough, this crash and the one just before show the eln that is being loaded. The first time it was: vc-hg-69e20438-d4ba19ca.eln and the second time it was: magit-status-6f9334e6-b672845f.eln It seems to happen more often when I immediately start doing something in Emacs. One thing of note is that I have something that eagerly loads packages on an idle timer (it caches what was loaded when Emacs is quit). That's possibly why there is usually a timer_event_handler in the trace. I don't know if that gives us any clues as to what may be happening here. ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: Emacs [19874] Path: /opt/homebrew/*/Emacs.app/Contents/MacOS/Emacs Identifier: org.gnu.Emacs Version: Version 29.0.60 (9.0) Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2022-12-29 18:41:27.1385 -0500 OS Version: macOS 13.1 (22C65) Report Version: 12 Anonymous UUID: CD1F31D7-5E61-2935-643D-55F58CD29C12 Sleep/Wake UUID: FC867C11-7B4D-45DA-A2FF-FE03A9A69EF4 Time Awake Since Boot: 210000 seconds Time Since Wake: 5671 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_PROTECTION_FAILURE at 0x000000013b1940f8 Exception Codes: 0x0000000000000002, 0x000000013b1940f8 VM Region Info: 0x13b1940f8 is in 0x13b194000-0x13b1ac000; bytes after start: 248 bytes before end: 98055 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL dyld private memory 13b154000-13b194000 [ 256K] rw-/rwx SM=PRV ---> __TEXT 13b194000-13b1ac000 [ 96K] r-x/rwx SM=COW ...-b672845f.eln __DATA_CONST 13b1ac000-13b1b0000 [ 16K] r--/rwx SM=COW ...-b672845f.eln Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x1a6d621b0 __pthread_kill + 8 1 libsystem_pthread.dylib 0x1a6d98cec pthread_kill + 288 2 libsystem_c.dylib 0x1a6c9aa50 raise + 32 3 Emacs 0x100d69aec terminate_due_to_signal + 204 4 Emacs 0x100d6a2f0 emacs_abort + 20 5 Emacs 0x100d38db0 ns_term_shutdown + 132 6 Emacs 0x100c24b94 shut_down_emacs + 332 7 Emacs 0x100d69ab4 terminate_due_to_signal + 148 8 Emacs 0x100c47084 handle_fatal_signal + 16 9 Emacs 0x100c47100 deliver_thread_signal + 124 10 Emacs 0x100c45700 deliver_fatal_thread_signal + 12 11 libsystem_platform.dylib 0x1a6dc72a4 _sigtramp + 56 12 dyld 0x1a6a9c1b4 lsl::BTree::NodeCore<15u, 10u>::splitChild(unsigned char, lsl::Allocator&) + 172 13 dyld 0x1a6a9c1b4 lsl::BTree::NodeCore<15u, 10u>::splitChild(unsigned char, lsl::Allocator&) + 172 14 dyld 0x1a6a9bf78 lsl::BTree::const_iterator::prepareForInsertion(lsl::Allocator&) + 532 15 dyld 0x1a6a9bbb0 lsl::BTree::insert_internal(lsl::BTree::const_iterator&&, lsl::Allocator::Buffer&&) + 452 16 dyld 0x1a6a99a90 lsl::PersistentAllocator::reserveRange(lsl::BTree::const_iterator&, lsl::Allocator::Buffer) + 412 17 dyld 0x1a6a9a0b0 lsl::PersistentAllocator::allocate_buffer(unsigned long, unsigned long, unsigned long, lsl::Allocator**) + 624 18 dyld 0x1a6a991e0 lsl::Allocator::aligned_alloc(unsigned long, unsigned long) + 180 19 dyld 0x1a6a99230 lsl::Allocator::strdup(char const*) + 48 20 dyld 0x1a6a968b8 dyld4::FileManager::fileRecordForPath(char const*) + 40 21 dyld 0x1a6ab4624 dyld4::Atlas::ProcessSnapshot::Serializer::readMappedFileInfo(std::__1::span&, unsigned long long&, lsl::UUID&, dyld4::FileRecord&) + 132 22 dyld 0x1a6ab3170 dyld4::Atlas::ProcessSnapshot::Serializer::deserialize(std::__1::span) + 928 23 dyld 0x1a6ab2cec dyld4::Atlas::ProcessSnapshot::ProcessSnapshot(lsl::Allocator&, dyld4::FileManager&, bool, std::__1::span) + 304 24 dyld 0x1a6a7ef64 lsl::UniquePtr lsl::Allocator::makeUnique const&>(lsl::EphemeralAllocator&, dyld4::FileManager&, bool&&, std::__1::span const&) + 80 25 dyld 0x1a6a7bafc dyld4::RuntimeState::getCurrentProcessSnapshot() + 96 26 dyld 0x1a6a7b8cc dyld4::RuntimeState::notifyDebuggerLoad(std::__1::span const&) + 72 27 dyld 0x1a6aaaf3c dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const + 748 28 dyld 0x1a6aa4968 dyld4::APIs::dlopen_from(char const*, int, void*) + 892 29 Emacs 0x100cecdb0 Fnative_elisp_load + 356 30 Emacs 0x100cc888c Fload + 2104 31 Emacs 0x100cca5f0 save_match_data_load + 92 32 Emacs 0x100ca4928 load_with_autoload_queue + 120 33 Emacs 0x100cb0d84 Frequire + 560 34 Emacs 0x100ca0a30 eval_sub + 2236 35 Emacs 0x100ca3158 internal_lisp_condition_case + 884 36 Emacs 0x100ca089c eval_sub + 1832 37 Emacs 0x100ca0bac Fprogn + 48 38 Emacs 0x100ca23a8 Fwhile + 80 39 Emacs 0x100ca089c eval_sub + 1832 40 Emacs 0x100ca0bac Fprogn + 48 41 Emacs 0x100ca610c funcall_lambda + 1316 42 Emacs 0x100ca2724 Ffuncall + 316 43 Emacs 0x100ca2724 Ffuncall + 316 44 timer-3ee7cfd9-d55357b5.eln 0x107b40e44 F74696d65722d6576656e742d68616e646c6572_timer_event_handler_0 + 832 45 Emacs 0x100ca2724 Ffuncall + 316 46 Emacs 0x100c31288 timer_check + 892 47 Emacs 0x100c2f634 readable_events + 36 48 Emacs 0x100c30eb4 get_input_pending + 56 49 Emacs 0x100c2f364 detect_input_pending_run_timers + 48 50 Emacs 0x100cf7064 wait_reading_process_output + 3824 51 Emacs 0x100b6d4d8 sit_for + 376 52 Emacs 0x100c2ca74 read_char + 6756 53 Emacs 0x100c29548 read_key_sequence + 1056 54 Emacs 0x100c27db8 command_loop_1 + 700 55 Emacs 0x100ca332c internal_condition_case + 96 56 Emacs 0x100c27ae8 command_loop_2 + 52 57 Emacs 0x100ca2d50 internal_catch + 88 58 Emacs 0x100d69f18 command_loop.cold.1 + 80 59 Emacs 0x100c27488 command_loop + 152 60 Emacs 0x100c27344 recursive_edit_1 + 148 61 Emacs 0x100c275a8 Frecursive_edit + 264 62 Emacs 0x100c26924 main + 7484 63 dyld 0x1a6a6fe50 start + 2544