x86_64 daemon won't launch

I have LaunchDaemon plist launching a x86_64 daemon, which worked so far on my M1 Mac mini running Big Sur, but right after the reboot from upgrading to macOS Monterey, I see error launching with EBADARCH error, but when I load the same plist by hand it worked.

2021-10-27 10:23:15.602649 (system/com.[redacted] [530]) : Could not find and/or execute program specified by service: 86: Bad CPU type in executable:

2021-10-27 10:23:15.602661 (system/com.[redacted] [530]) : Service could not initialize: posix_spawn([redacted]) EBADARCH error: 0x6f: Invalid or missing Program/ProgramArguments

2021-10-27 10:23:15.602666 (system/com.[redacted] [530]) : initialization failure: 21A559: xpcproxy + 23196 [815][D33C7462-5256-38E5-AFD4-A1FF694581F3]: 0x6f

2021-10-27 10:23:15.602668 (system/com.[redacted] [530]) : Service setup event to handle failure and will not launch until it fires.

2021-10-27 10:23:15.602671 (system/com.[redacted] [530]) : Missing executable detected. Job: 'com.[redacted]' Executable: '[redacted]'

I strongly encourage you to make your daemon run natively.

Daemons load early in the boot process and thus they can find themselves in a situation where they load before the Rosetta translation infrastructure is up and running. I suspect that this specific problem was caused by the macOS 12 upgrade purging your Rosetta translations, and then the system trying to load the daemon before Rosetta was available.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I understand the recommendation, and we are looking into it, ours is a very big code base and porting is going to take big effort plus will cause code maintenance issues for us, so we are working through it.

Is there anything else possible, like delaying daemon load or serializing behind Rosetta initialization?

Is there anything else possible, like delaying daemon load or serializing behind Rosetta initialization?

I’m not aware of any specific mechanism for that.

I can imagine various games that you might play here but I’m reluctant to suggest any of them as a supported option. I recommend that you open a DTS tech support incident so that I, or more likely one of my colleagues, can allocate the time to research this properly.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

x86_64 daemon won't launch
 
 
Q