1

I've recently-ish updated from an Intel-based Mac to an M1-based Mac and I was also switching off a beta 12.x OS to regular 12.x macOS.

I have no idea what is going on but it seems like my shell commands (from /usr/local/bin/) are all crashing (not the terminal, it just generates a crash report)?

As in when I run a, for example, curl command I get zsh: killed [my command] and I get a:

"Problem Report for curl

curl quit unexpectedly

This report will be sent automatically to Apple."

And a crash report that looks like this:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Hardware Model:      MacBookPro18,2
Process:             curl [9680]
Path:                /usr/local/bin/curl
Identifier:          curl
Version:             ???
Code Type:           X86-64 (Native)
Role:                Unspecified
Parent Process:      zsh [9670]
Coalition:           com.googlecode.iterm2 [2032]
Responsible Process: iTerm2 [9667]

Date/Time:           2022-07-26 23:28:33.8207 -0400
Launch Time:         2022-07-26 23:28:33.7931 -0400
OS Version:          macOS 12.5 (21G72)
Release Type:        User
Report Version:      104

Exception Type:  EXC_CRASH (SIGKILL (Code Signature Invalid))
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: CODESIGNING 1 

Highlighted by Thread:  0

Backtrace not available

No thread state (register information) available

Binary Images:
Binary images description not available

Error Formulating Crash Report:
_dyld_process_info_create failed with 6
dyld_process_snapshot_get_shared_cache failed
Failed to create CSSymbolicatorRef - corpse still valid ¯\_(ツ)_/¯

EOF

What is going on? All the crash reports I get claim its a code signing issue??

I tried reinstalling macOS already as well.

It seems to be finding the right command (that path in my crash report is in my $PATH) but it just fails most of the time (i can sometimes get which to work, but it fails other times when other commands or processes call it).

EDIT:

i had a suspicion it was a homebrew issue.. the only problem is I can't run brew reinstall curl because I get new crash reports that dirname and readlink crashed and my terminal complains that: /bin/bash: /usr/local/Library/Homebrew/brew.sh: No such file or directory

(which brew gives me /usr/local/bin/brew)

And then if I try to uninstall homebrew to reinstall, I can't run any curl commands.. So I also tried manually copying and pasting the uninstall script and saving to to my desktop and running it.

I gave the script permissions by running chmod +x /Users/[me]/Desktop/uninstall.sh and then running it with both bash /Users/[me]/Desktop/uninstall.sh and sh /Users/[me]/Desktop/uninstall.sh (and even the linked comment of /bin/bash /Users/[me]/Desktop/uninstall.sh but the terminal complains Unsupported system type '' and i get a crash report that "uname quit unexpectedly"

which seems to happen because the script attempts to run uname internally:

...
un="$(uname)"
case "${un}" in
...

the error message comes from the case statement not matching anything

gadu
  • 111
  • 4
  • Anything in `/usr/local/bin/` in macOS is installed by Homebrew. The code signing issue would make sense since anything installed by Homebrew is non-core OS software. Thus what would make sense is to reinstall problematic items installed via Homebrew like this: `brew reinstall curl` and such. Look at the answers on [this Stack Overflow post](https://stackoverflow.com/q/66119081/117259) for more info. Also look at this [GitHub issue thread](https://github.com/Homebrew/discussions/discussions/439). – Giacomo1968 Jul 27 '22 at 04:09
  • 1
    I think you're misinterpreting the ZSH output. It just informs you that the command was killed, not who did it. // The error message is pretty clear and should get you good results if researched. – Daniel B Jul 27 '22 at 04:36
  • What do you mean by "beta OS to macOS"? Are you saying you were on the developer beta of macOS 13 (Ventura) and you downgraded to the release version of macOS 12.x (Monterey)? – Spiff Jul 27 '22 at 05:35
  • @DanielB i def tried google the error quite extensively. the only things that hit the code signing issue were basically people complaining a random third party app is crashing OR people who are doing Xcode development - couldn't see how my use case applied (and i couldn't find ANYTHING about curl or other unix shell commands crashing) - any suggestions to improve my google searches? – gadu Jul 27 '22 at 19:14
  • and also note @Giacomo1968 whenever I try to run `brew reinstall` anything i just get a new crash reports that `dirname` and `readlink` crashed and my terminal complains that: `/bin/bash: /usr/local/Library/Homebrew/brew.sh: No such file or directory` – gadu Jul 27 '22 at 19:19
  • @Giacomo1968 i had a suspicion it was a homebrew issue.. the only problem is I can't run any of the curl commands to download the uninstaller or to reinstall homebrew.. I also tried manually copying and pasting the uninstall script and saving to to my desktop and running it. I have tried to give the script permissions by running `chmod +x /Users/[me]/Desktop/uninstall.sh` and then running it with both `bash /Users/[me]/Desktop/uninstall.sh` and `sh /Users/[me]/Desktop/uninstall.sh` but the terminal complains `Unsupported system type ''` and i get a crash report that "uname quit unexpectedly" – gadu Jul 27 '22 at 19:25
  • @gadu Maybe change your default path in [`.zshrc`](https://superuser.com/q/886132/167207) to ignore `/usr/local/bin/` and then re-install Homebrew again? Think about the issue and there you go. – Giacomo1968 Jul 27 '22 at 22:41
  • 1
    @Giacomo1968 i had already cleared out all my zsh config files. had to delete it from /etc/paths: https://superuser.com/questions/1464727/in-zsh-on-mac-os-where-is-the-source-of-path-i-cannot-find-it-in-zshrc which was locked and of course every command to unlock it or edit in in terminal was failing.. but i figured out and was able to remove that from my paths and things started working again. thanks for the help – gadu Jul 28 '22 at 21:54
  • @gadu Great to hear! Do you have details you might want to post as an answer? It might be helpful to others. – Giacomo1968 Jul 28 '22 at 22:31

0 Answers0