From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.bugs Subject: bug#54677: Creating core files on macOS (Monterey) Date: Fri, 1 Apr 2022 18:54:56 -0500 Message-ID: <1DAC996D-BBF6-4E3E-A0FB-EBD05CC9AFD2@easesoftware.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) 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="1880"; mail-complaints-to="usenet@ciao.gmane.io" To: 54677@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 02 03:31:31 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 1naSbz-0000JW-21 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Apr 2022 03:31:31 +0200 Original-Received: from localhost ([::1]:39600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naSbx-00055u-GV for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 21:31:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naSbW-00055U-Ga for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 21:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50120) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naSbW-0001vZ-7u for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 21:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1naSbW-00076E-3W for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 21:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Perry Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Apr 2022 01:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54677 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.164886301127212 (code B ref -1); Sat, 02 Apr 2022 01:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Apr 2022 01:30:11 +0000 Original-Received: from localhost ([127.0.0.1]:44016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naSah-00074q-0V for submit@debbugs.gnu.org; Fri, 01 Apr 2022 21:30:11 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:36094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naR6f-0004OY-Qd for submit@debbugs.gnu.org; Fri, 01 Apr 2022 19:55:06 -0400 Original-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 ) id 1naR6f-000324-DR for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 19:55:05 -0400 Original-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 ) id 1naR6d-0006FB-Do for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 19:55:05 -0400 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5C1CE1213C7 for ; Fri, 1 Apr 2022 23:54:58 +0000 (UTC) Original-Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id C47231214DE for ; 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@easesoftware.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Original-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@mi3-ss4.a2hosting.com 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==; Original-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 ) id 1naR6W-0000jM-TN for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 19:54:56 -0400 X-Mailer: Apple Mail (2.3696.80.82.1.1) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com Received-SPF: pass client-ip=23.83.212.17; envelope-from=pedz@easesoftware.com; 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-Mailman-Approved-At: Fri, 01 Apr 2022 21:30:10 -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:229248 Archived-At: 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