Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loader quit unexpectedly #2146

Closed
szfkamil opened this issue Mar 7, 2024 · 15 comments
Closed

Loader quit unexpectedly #2146

szfkamil opened this issue Mar 7, 2024 · 15 comments
Labels
bug Something isn't working

Comments

@szfkamil
Copy link

szfkamil commented Mar 7, 2024

Right after updating to Sonoma 14.4 I got loader failed error. Below is full error report.

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

Process:               loader [3105]
Path:                  /Library/ScriptingAdditions/yabai.osax/Contents/MacOS/loader
Identifier:            com.koekeishiya.yabai-osax
Version:               2.0.28 (2.0.28)
Code Type:             ARM-64 (Native)
Parent Process:        yabai [3104]
Responsible:           yabai [3098]
User ID:               0

Date/Time:             2024-03-07 21:23:22.0344 +0100
OS Version:            macOS 14.4 (23E214)
Report Version:        12
Anonymous UUID:        E27DC145-8380-22D7-AA4F-C397669B0F06


Time Awake Since Boot: 280 seconds

System Integrity Protection: disabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_GUARD (SIGKILL)
Exception Codes:       GUARD_TYPE_MACH_PORT
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace GUARD, Code 2305843030688530432 

External Modification Warnings:
Process used task_for_pid().

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x19684a1f4 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x19685cb24 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x19687938c thread_set_state + 260
3   loader                        	       0x1043df820 main + 1116
4   dyld                          	       0x1965020e0 start + 2360

Thread 1:
0   libsystem_pthread.dylib       	       0x196885d20 start_wqthread + 0


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000200000003   x2: 0x0000014000001513   x3: 0x0000070700001203
    x4: 0x00000e1400000000   x5: 0x0000070700000000   x6: 0x000000000000002c   x7: 0x0000000000000000
    x8: 0xfffffffffffffbbf   x9: 0x0000000000000140  x10: 0x00000000ffffebbe  x11: 0x000000016ba23310
   x12: 0x0000000000000000  x13: 0x0000000000000001  x14: 0x0000000000000001  x15: 0x00000001fe5b8238
   x16: 0xffffffffffffffd1  x17: 0x00000001043e0060  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x000000000000002c  x21: 0x0000070700000000  x22: 0x00000e1400000000  x23: 0x0000070700001203
   x24: 0x000000016ba22078  x25: 0x0000014000001513  x26: 0x0000000200000003  x27: 0x0000000200000003
   x28: 0x0000000000000000   fp: 0x000000016ba22060   lr: 0x000000019685cb24
    sp: 0x000000016ba22010   pc: 0x000000019684a1f4 cpsr: 0x80001000
   far: 0x0000000000000000  esr: 0x56000080  Address size fault

Binary Images:
       0x1043dc000 -        0x1043dffff com.koekeishiya.yabai-osax (2.0.28) <e02e5f67-38f5-383c-b212-2340510079ce> /Library/ScriptingAdditions/yabai.osax/Contents/MacOS/loader
       0x196849000 -        0x196883ffb libsystem_kernel.dylib (*) <1889ce0a-52e7-3122-8907-81af920ac472> /usr/lib/system/libsystem_kernel.dylib
       0x1964fc000 -        0x1965849db dyld (*) <8e1e5ee2-f89a-33a7-bb0a-74bdc06b7828> /usr/lib/dyld
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
       0x196884000 -        0x196890fff libsystem_pthread.dylib (*) <45239f06-cc53-36d0-9933-7776ac7ea2fa> /usr/lib/system/libsystem_pthread.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 1
    thread_create: 1
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 3
    thread_create: 3
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=766.8M resident=0K(0%) swapped_out_or_unallocated=766.8M(100%)
Writable regions: Total=539.2M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=539.2M(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
Kernel Alloc Once                   32K        1 
MALLOC                           530.2M       13 
MALLOC guard page                   96K        6 
STACK GUARD                       56.0M        2 
Stack                             8720K        2 
__AUTH                             729K      165 
__AUTH_CONST                      12.7M      306 
__DATA                            3051K      293 
__DATA_CONST                      15.6M      309 
__DATA_DIRTY                       698K      104 
__FONT_DATA                          4K        1 
__LINKEDIT                       525.4M        2 
__OBJC_RO                         71.7M        1 
__OBJC_RW                         2195K        1 
__TEXT                           241.5M      322 
dyld private memory                272K        2 
mapped file                         64K        1 
shared memory                      160K        3 
===========                     =======  ======= 
TOTAL                              1.4G     1535 



-----------
Full Report
-----------

{"app_name":"loader","timestamp":"2024-03-07 21:23:22.00 +0100","app_version":"2.0.28","sroute_id":12,"slice_uuid":"e02e5f67-38f5-383c-b212-2340510079ce","build_version":"2.0.28","platform":1,"bundleID":"com.koekeishiya.yabai-osax","share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 14.4 (23E214)","roots_installed":0,"name":"loader","incident_id":"EC8FC923-DCDB-44A4-A988-4D9DB9F42097"}
{
  "uptime" : 280,
  "procRole" : "Unspecified",
  "version" : 2,
  "userID" : 0,
  "deployVersion" : 210,
  "modelCode" : "Macmini9,1",
  "coalitionID" : 1098,
  "osVersion" : {
    "train" : "macOS 14.4",
    "build" : "23E214",
    "releaseType" : "User"
  },
  "captureTime" : "2024-03-07 21:23:22.0344 +0100",
  "codeSigningMonitor" : 1,
  "incident" : "EC8FC923-DCDB-44A4-A988-4D9DB9F42097",
  "pid" : 3105,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2024-03-07 21:23:21.9946 +0100",
  "procStartAbsTime" : 6934735845,
  "procExitAbsTime" : 6935685783,
  "procName" : "loader",
  "procPath" : "\/Library\/ScriptingAdditions\/yabai.osax\/Contents\/MacOS\/loader",
  "bundleInfo" : {"CFBundleShortVersionString":"2.0.28","CFBundleVersion":"2.0.28","CFBundleIdentifier":"com.koekeishiya.yabai-osax"},
  "parentProc" : "yabai",
  "parentPid" : 3104,
  "coalitionName" : "com.koekeishiya.yabai",
  "crashReporterKey" : "E27DC145-8380-22D7-AA4F-C397669B0F06",
  "responsiblePid" : 3098,
  "responsibleProc" : "yabai",
  "codeSigningID" : "com.koekeishiya.yabai-osax",
  "codeSigningTeamID" : "",
  "codeSigningFlags" : 570425345,
  "codeSigningValidationCategory" : 10,
  "codeSigningTrustLevel" : 4294967295,
  "instructionByteStream" : {"beforePC":"ARAA1MADX9aQBYCSARAA1MADX9awBYCSARAA1MADX9bQBYCSARAA1A==","atPC":"wANf1vAFgJIBEADUwANf1hAGgJIBEADUwANf1jAGgJIBEADUwANf1g=="},
  "sip" : "disabled",
  "sroute_id" : 12,
  "exception" : {"port":0,"signal":"SIGKILL","guardId":0,"codes":"0x0000000000000000, 0x0000000000000000","violations":["THREAD_SET_STATE"],"message":" THREAD_SET_STATE on mach port 0 (guarded with 0x0000000000000000)","subtype":"GUARD_TYPE_MACH_PORT","type":"EXC_GUARD","rawCodes":[0,0]},
  "termination" : {"namespace":"GUARD","flags":2,"code":2305843030688530432},
  "extMods" : {"caller":{"thread_create":1,"thread_set_state":0,"task_for_pid":1},"system":{"thread_create":3,"thread_set_state":0,"task_for_pid":3},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":1},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":22737,"threadState":{"x":[{"value":0},{"value":8589934595,"symbolLocation":259,"symbol":"_unnamed_array_storage.976"},{"value":1374389540115},{"value":7726646170115},{"value":15479062134784},{"value":7726646165504},{"value":44},{"value":0},{"value":18446744073709550527},{"value":320},{"value":4294962110},{"value":6100759312},{"value":0},{"value":1},{"value":1},{"value":8562377272,"symbolLocation":0,"symbol":"OBJC_CLASS_$_NSLock"},{"value":18446744073709551569},{"value":4366139488},{"value":0},{"value":0},{"value":44},{"value":7726646165504},{"value":15479062134784},{"value":7726646170115},{"value":6100754552},{"value":1374389540115},{"value":8589934595,"symbolLocation":259,"symbol":"_unnamed_array_storage.976"},{"value":8589934595,"symbolLocation":259,"symbol":"_unnamed_array_storage.976"},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6820317988},"cpsr":{"value":2147487744},"fp":{"value":6100754528},"sp":{"value":6100754448},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6820241908,"matchesCrashFrame":1},"far":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":4596,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":1},{"imageOffset":80676,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":1},{"imageOffset":197516,"symbol":"thread_set_state","symbolLocation":260,"imageIndex":1},{"imageOffset":14368,"symbol":"main","symbolLocation":1116,"imageIndex":0},{"imageOffset":24800,"symbol":"start","symbolLocation":2360,"imageIndex":2}]},{"id":22738,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}],"threadState":{"x":[{"value":6101315584},{"value":5891},{"value":6100779008},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6101315584},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6820486432},"far":{"value":0}}}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4366123008,
    "CFBundleShortVersionString" : "2.0.28",
    "CFBundleIdentifier" : "com.koekeishiya.yabai-osax",
    "size" : 16384,
    "uuid" : "e02e5f67-38f5-383c-b212-2340510079ce",
    "path" : "\/Library\/ScriptingAdditions\/yabai.osax\/Contents\/MacOS\/loader",
    "name" : "loader",
    "CFBundleVersion" : "2.0.28"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6820237312,
    "size" : 241660,
    "uuid" : "1889ce0a-52e7-3122-8907-81af920ac472",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6816776192,
    "size" : 559580,
    "uuid" : "8e1e5ee2-f89a-33a7-bb0a-74bdc06b7828",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6820478976,
    "size" : 53248,
    "uuid" : "45239f06-cc53-36d0-9933-7776ac7ea2fa",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  }
],
  "sharedCache" : {
  "base" : 6816022528,
  "size" : 4189880320,
  "uuid" : "664c17e3-f7ed-3226-8594-589aa9bf8fd2"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=766.8M resident=0K(0%) swapped_out_or_unallocated=766.8M(100%)\nWritable regions: Total=539.2M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=539.2M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nActivity Tracing                   256K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                           530.2M       13 \nMALLOC guard page                   96K        6 \nSTACK GUARD                       56.0M        2 \nStack                             8720K        2 \n__AUTH                             729K      165 \n__AUTH_CONST                      12.7M      306 \n__DATA                            3051K      293 \n__DATA_CONST                      15.6M      309 \n__DATA_DIRTY                       698K      104 \n__FONT_DATA                          4K        1 \n__LINKEDIT                       525.4M        2 \n__OBJC_RO                         71.7M        1 \n__OBJC_RW                         2195K        1 \n__TEXT                           241.5M      322 \ndyld private memory                272K        2 \nmapped file                         64K        1 \nshared memory                      160K        3 \n===========                     =======  ======= \nTOTAL                              1.4G     1535 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "5255c2461653b988d7ef22337474eb361d1d2f1d",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "65a8173205d942272410674b",
      "factorPackIds" : {

      },
      "deploymentId" : 240000001
    },
    {
      "rolloutId" : "61675b89201f677a9a4cbd65",
      "factorPackIds" : {
        "HEALTH_FEATURE_AVAILABILITY" : "65287aa4be905e686a05f0a2"
      },
      "deploymentId" : 240000079
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "5d51a80d-93ec-47e1-9027-675002e78e4a",
      "experimentId" : "6384d56b96e8d228551ec182",
      "deploymentId" : 400000030
    }
  ]
}
}

Model: Macmini9,1, BootROM 10151.101.3, proc 8:4:4 processors, 8 GB, SMC 
Graphics: Apple M1, Apple M1, Built-In
Display: LG HDR WQHD, 3440 x 1440 (UWQHD - Ultra-Wide Quad HD), Main, MirrorOff, Online
Memory Module: LPDDR4, Hynix
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4378), wl0: Jan 13 2024 03:06:59 version 18.20.440.9.7.8.167 FWID 01-7be24857
AirPort: 
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
USB Device: USB31Bus
USB Device: USB Receiver
USB Device: USB31Bus
USB Device: USB30Bus
USB Device: Portable SSD
USB Device: Keychron V8
Thunderbolt Bus: Mac mini, Apple Inc.
Thunderbolt Bus: Mac mini, Apple Inc.
@roelvangils
Copy link

I got the same error. It's totally expected that Yabai breaks with a macOS update due to the app's nature. We, the impatient updaters, are responsible to take this risk.

That being said, I'm pretty sure @koekeishiya is working on a fix to fully support macOS 14.4! 🤞🏼

@hugo-galindo
Copy link

Same error. Hopefully fix is coming soon 🙂

@johnMocingbird
Copy link

johnMocingbird commented Mar 8, 2024

I am also facing this issue. I should’ve also mentioned that I am also on macOS 4.4

@niconiahi
Copy link

same error!

@niconiahi
Copy link

getting this output

$ cat /tmp/yabai_niconiahi.err.log
yabai: scripting-addition failed to inject payload into Dock.app!

@cadebrown
Copy link

Same error for me. It's my first installation, not updating

@zhujia-unido
Copy link

Same here, hopefully it will get fixed soon!

@roelvangils
Copy link

Yes, everyone who updated to 14.4 is getting the same error, and we hope Apple developers haven't made it too difficult this time for @koekeishiya to find a solution to make his genius piece of software work well with the latest version of macOS Sonoma 😁 But let's not stress him out.

@FelixKratz
Copy link

I have not looked into this myself but thought this snippet from the security changelog of 14.4 might be related:
image

@koekeishiya
Copy link
Owner

koekeishiya commented Mar 9, 2024

@FelixKratz

I don't think that is the reason here. The CVE you mentioned only got fixed in Monterey and Sonoma. I would assume that it would also apply to Ventura if it was the method that yabai uses for injection that got patched.

https://support.apple.com/en-us/HT214085

@koekeishiya
Copy link
Owner

koekeishiya commented Mar 9, 2024

You can probably use Frida.re to do the injection for now.

https://frida.re

Edit: Frida.re injection is broken in this version too.

@koekeishiya
Copy link
Owner

koekeishiya commented Mar 9, 2024

Loader has been fixed on master.

Payload still needs some modifications.
Track #2150

@koekeishiya
Copy link
Owner

koekeishiya commented Mar 9, 2024

Payload has been fixed on master.

Note that there are tons of breaking changes on master compared to the last released version, and there will likely be more breaking changes before a new release is made.

Consult the changelog before you consider building the master branch from source.

@koekeishiya
Copy link
Owner

Fixed in v7.0.0.

@koekeishiya koekeishiya removed the addressed on master; not released Fixed upstream, but not yet released label Mar 13, 2024
@danielo515
Copy link

I tried to hold my update to the latest MacOs as much as I could... but funky borders made me wanted to upgrade. Too bad with every release they force people more into their walled garden. Thank to the super-heroes that keep fighting back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants