X-Loop: help-debbugs@HIDDEN Subject: bug#54677: Creating core files on macOS (Monterey) Resent-From: Perry Smith <pedz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 02 Apr 2022 01:31:02 +0000 Resent-Message-ID: <handler.54677.B.164886301127212 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 54677 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 54677 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.164886301127212 (code B ref -1); Sat, 02 Apr 2022 01:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Apr 2022 01:30:11 +0000 Received: from localhost ([127.0.0.1]:44016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1naSah-00074q-0V for submit <at> debbugs.gnu.org; Fri, 01 Apr 2022 21:30:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:36094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <pedz@HIDDEN>) id 1naR6f-0004OY-Qd for submit <at> debbugs.gnu.org; Fri, 01 Apr 2022 19:55:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pedz@HIDDEN>) id 1naR6f-000324-DR for bug-gnu-emacs@HIDDEN; Fri, 01 Apr 2022 19:55:05 -0400 Received: from bird.elm.relay.mailchannels.net ([23.83.212.17]:50997) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pedz@HIDDEN>) id 1naR6d-0006FB-Do for bug-gnu-emacs@HIDDEN; Fri, 01 Apr 2022 19:55:05 -0400 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@HIDDEN Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5C1CE1213C7 for <bug-gnu-emacs@HIDDEN>; Fri, 1 Apr 2022 23:54:58 +0000 (UTC) Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id C47231214DE for <bug-gnu-emacs@HIDDEN>; Fri, 1 Apr 2022 23:54:57 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1648857297; a=rsa-sha256; cv=none; b=SCjMMaFJRBI+T7cCps8iQ6d1W9n0cDZveXDB5MOxeZzj3nkTD9TJl+/LsMoRqKzmgU5Nb7 zzZMTEdDkllwB9GGy1ITJrT/aMBmVyrPRbfX1YCAYX9IrJA2/urxHSGwvcw9XGSBTH9f7u e7lT9bs/6Ve94pspwO+9PLGaExqavFM69mZKsngZ7eXxAKANVVxxtW1Owahh+DsoV8vH++ i+RCNCUc150eyhphxqBEH0mtX8OgPYIQTxaIHy9j58Flsh3K0txUgAfBeTKjwc+2zHai6L tknE3G6wcm4ywVUxNlT5X5tmz6zu6a/+d8lBzPinHHUrtVdk1OcCICH6J7LN4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1648857297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=poqmwDb5W1NY1Vx3bgJITbGgJqJYSFUwl7E2KCUSGyI=; b=HQUX1LSVFCeiwSx/WvgCv2zLWkRm4noPP+uPzZZL9fhJFAUYZN/pBtwoY8SaioFDevFbtp 7AVy1Qq1ZHKXsIrVMZlFaRnomYdgBL2mGBgUTdx4rwLSW4fQqNVS4CmFicDfGcMXWJRdMy d26PDDNoNFoEGQY4Qu8zmPICRNqMx3zEFQgTC7UtHdeRXtoHzJwHbumarxiJwSCLZHIdAK tIHFkpRm7Oulz4DbPCP66UudohG39Ttm9BXoKkcxQkHGIx3ITceyC4Ml7rNfuLMHk6LCL2 DQDGaCS+hMo5EBnPrWkOHNHfMSDrrlO98lR4xo6oYO7WSOBfw90KksR1k3iSZQ== ARC-Authentication-Results: i=1; rspamd-786f77c8d-9vgs5; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@HIDDEN X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@HIDDEN Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.124.238.97 (trex/6.7.1); Fri, 01 Apr 2022 23:54:58 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@HIDDEN X-MailChannels-Auth-Id: a2hosting X-Attack-Share: 0e49e1e056a62563_1648857298128_3463995116 X-MC-Loop-Signature: 1648857298128:1546667119 X-MC-Ingress-Time: 1648857298128 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=To:Date:Message-Id:Subject:Mime-Version: Content-Transfer-Encoding:Content-Type:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZutN2jPg2/XHRPm/qrlae5YEOMWkAMS6l8Au4ZtkLSI=; b=HySduRHxqF5t8iF0iMUoVSkX1L 7G0/JUtgiswQOcdtAyuXMnQPfe9tMxZn7HuqgCRD0p78BkZPePHc+2PPKY+Y6ef76STsynG/Ypv/8 oLipGLHaPrtV9oiDwBXfOMBaRstjKpbvCZQj+WNju7R5d/mE5vhytB/7K+bEuKJXwlxBl89EdCclk SuUxhH3Tm3pHztZnZXmm696WX7Zkf3OuauDZUjFOMSs4oq/l4nOjVoi9AMlFHyMEr0Fgf6RLkCyVy BXEUEu2Ru8MgMkKOHjiJXcy/Rp7xiteAYWl/2a3bQLl84rC1NJf7+khJGapIYsZSU7yZOWkCVxDad 4Llbev2Q==; Received: from cpe-70-94-128-193.satx.res.rr.com ([70.94.128.193]:50284 helo=smtpclient.apple) by mi3-ss4.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <pedz@HIDDEN>) id 1naR6W-0000jM-TN for bug-gnu-emacs@HIDDEN; Fri, 01 Apr 2022 19:54:56 -0400 From: Perry Smith <pedz@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Message-Id: <1DAC996D-BBF6-4E3E-A0FB-EBD05CC9AFD2@HIDDEN> Date: Fri, 1 Apr 2022 18:54:56 -0500 X-Mailer: Apple Mail (2.3696.80.82.1.1) X-AuthUser: pedz+easesoftware.com@HIDDEN Received-SPF: pass client-ip=23.83.212.17; envelope-from=pedz@HIDDEN; helo=bird.elm.relay.mailchannels.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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-Mailman-Approved-At: Fri, 01 Apr 2022 21:30:10 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) The CONTRIBUTE document says to submit feature requests, etc to this list. I wish I could provide more expertise on this topic but I=E2=80=99m not = a serious macOS developer. I've cobbled together the info below over the past few days. Apple (like AIX) has decided that core files are bad and so has disabled them in the normal activities. So, a few things need to be done to get a core file from a particular applicaiton. Another Apple trait seems to be that if they did it yesterday, it must be changed for today. Thus, what follows is ONLY for Monterey (I've been told). The previous Apple releases require some but not all of these changes. AND... it appears that what is required for the M1 chips (Arm / Apple silicon) is not the same as what is required for Intel chips. So... I know that without these changes core dumps on Monterey with an M1 chip were not created and after these changes they are. As I mentioned in an email on the developers list, making emacs remains a drop dead easy process where ./configure ; make ; make install creates nextstep/Emacs.app ls -ld@ nextstep/Emacs.app shows: drwxr-xr-x@ 3 pedz staff 96 Apr 1 18:08 nextstep/Emacs.app com.apple.quarantine 57=20 To get the Emacs.app to launch, the quarantine needs to be removed and that is done with: sudo xattr -rds com.apple.quarantine nextstep/Emacs.app The app can then be moved to /Applications and it will launch via Finder, etc but will not create a core file. To get an application to create a core file two particular things need to be done. The resource limit for core files needs to be set to the max. And an entitlement needs to be applied to the application. The first I accomplished with this code change: diff -r emacs-orig-27.2/src/emacs.c emacs-new-27.2/src/emacs.c 1226c1226,1234 <=20 --- > #if defined (HAVE_SETRLIMIT) && defined (RLIMIT_CORE) && !defined = (CYGWIN) > if (getrlimit (RLIMIT_CORE, &rlim) =3D=3D 0 > && 0 <=3D rlim.rlim_cur && rlim.rlim_cur <=3D rlim.rlim_max) > { > rlim.rlim_cur =3D rlim.rlim_max; > setrlimit (RLIMIT_CORE, &rlim); /* Error??? */ > } =20 > #endif /* HAVE_SETRLIMIT and RLIMIT_CORE and not CYGWIN */ > =20 The second I accomplished with this small script: #!/bin/zsh EMACS=3D/Applications/Emacs.app if [[ -d nextstep/Emacs.app ]] ; then sudo rm -rf ${EMACS} sudo mv nextstep/Emacs.app ${EMACS} rm -f /tmp/entitlements /usr/libexec/PlistBuddy -c "Add :com.apple.security.get-task-allow = bool true" /tmp/entitlements sudo codesign -s - -f --deep --entitlements tmp.entitlements ${EMACS} else echo nextstep/Emacs.app is not present fi The PlistBuddy command will spew out a message: File Doesn't Exist, Will Create: /tmp/entitlements
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Perry Smith <pedz@HIDDEN> Subject: bug#54677: Acknowledgement (Creating core files on macOS (Monterey)) Message-ID: <handler.54677.B.164886301127212.ack <at> debbugs.gnu.org> References: <1DAC996D-BBF6-4E3E-A0FB-EBD05CC9AFD2@HIDDEN> X-Gnu-PR-Message: ack 54677 X-Gnu-PR-Package: emacs Reply-To: 54677 <at> debbugs.gnu.org Date: Sat, 02 Apr 2022 01:31:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 54677 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 54677: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D54677 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#54677: Creating core files on macOS (Monterey) Resent-From: Lars Ingebrigtsen <larsi@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 02 Apr 2022 14:17:01 +0000 Resent-Message-ID: <handler.54677.B54677.16489090036048 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 54677 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Perry Smith <pedz@HIDDEN> Cc: Alan Third <alan@HIDDEN>, 54677 <at> debbugs.gnu.org Received: via spool by 54677-submit <at> debbugs.gnu.org id=B54677.16489090036048 (code B ref 54677); Sat, 02 Apr 2022 14:17:01 +0000 Received: (at 54677) by debbugs.gnu.org; 2 Apr 2022 14:16:43 +0000 Received: from localhost ([127.0.0.1]:46368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1naeYV-0001ZF-7b for submit <at> debbugs.gnu.org; Sat, 02 Apr 2022 10:16:43 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <larsi@HIDDEN>) id 1naeYT-0001Tf-EE for 54677 <at> debbugs.gnu.org; Sat, 02 Apr 2022 10:16:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GctQ+b5UOPtFh7mmvJIPZN/tKYmFAOy+F4DrJkV+G0M=; b=rKX8/5/U9zLnH5b54HqcpCQIYj XWw6WCSTectVcDheUCoASknuDcVtecgVc6ho5Uf3DqSSB1fG3L2CXYZjDfwhW8GGEvhbgWkMk19C6 junasn+ScSKa3o1kedRSkc9QaJdtzsLb+gDEAR1A0d9GNfQryKdfiorFDEdFdiaBvfhU=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1naeYK-0006SZ-2m; Sat, 02 Apr 2022 16:16:34 +0200 From: Lars Ingebrigtsen <larsi@HIDDEN> References: <1DAC996D-BBF6-4E3E-A0FB-EBD05CC9AFD2@HIDDEN> X-Now-Playing: Pet Shop Boys's _Actually_: "It's a sin" Date: Sat, 02 Apr 2022 16:16:31 +0200 In-Reply-To: <1DAC996D-BBF6-4E3E-A0FB-EBD05CC9AFD2@HIDDEN> (Perry Smith's message of "Fri, 1 Apr 2022 18:54:56 -0500") Message-ID: <87fsmvk1ts.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Perry Smith <pedz@HIDDEN> writes: > As I mentioned in an email on the developers list, making emacs > remains a drop dead easy process where > > ./configure ; make ; make install Note that you don't have to say "make install" -- you can just run it from src/emacs in the build directory (and that's usually a lot more convenient when building things yourself). Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Perry Smith <pedz@HIDDEN> writes: > As I mentioned in an email on the developers list, making emacs > remains a drop dead easy process where > > ./configure ; make ; make install Note that you don't have to say "make install" -- you can just run it from src/emacs in the build directory (and that's usually a lot more convenient when building things yourself). > To get the Emacs.app to launch, the quarantine needs to be removed and > that is done with: > > sudo xattr -rds com.apple.quarantine nextstep/Emacs.app And then you don't have to do this, for instance. > To get an application to create a core file two particular things need > to be done. The resource limit for core files needs to be set to the > max. And an entitlement needs to be applied to the application. > > The first I accomplished with this code change: > > diff -r emacs-orig-27.2/src/emacs.c emacs-new-27.2/src/emacs.c > 1226c1226,1234 > < > --- >> #if defined (HAVE_SETRLIMIT) && defined (RLIMIT_CORE) && !defined (CYGWIN) >> if (getrlimit (RLIMIT_CORE, &rlim) == 0 >> && 0 <= rlim.rlim_cur && rlim.rlim_cur <= rlim.rlim_max) >> { >> rlim.rlim_cur = rlim.rlim_max; >> setrlimit (RLIMIT_CORE, &rlim); /* Error??? */ >> } >> #endif /* HAVE_SETRLIMIT and RLIMIT_CORE and not CYGWIN */ Is this necessary when you're not running installed? I've added Alan to the CCs; perhaps he has some comments. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.