How to update SystemExtensions?

I am developing EndpointSecurity on macOS 11.0 Beta 6.

What I want to do is, when EndpointSecurity is installed and running, replace it with a new version of EndpointSecurity.

Implemented in my EndpointSecurity bundle app
OSSystemExtensionReplacementActionReplace is returned inside Request:actionForReplacingExtension:withExtension: method.

I checked through NSLog that the Request:actionForReplacingExtension:withExtension: method is called normally.

However, if you check the console.app at this time, sysextd crashes.
And I checked with the systemextensionsctl list command.

A crash in sysextd did not replace the new version of EndpointSecurity.

I need your help.





Also, I have posted the relevant content to the Feedback Assistant.
FB8622798


Of course, I also forwarded the information to the Technical Support Incident.
745704790





I also forwarded the information to the Technical Support Incident.

Cool. That’s landed in my queue and I’ll respond there.

Share and Enjoy

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

Hi, 

I am observing the similar crash in sysextd while updating a network system extension on macOS12.4. The update failed, I still see old system extension.

Please find the crash report below:

Translated Report (Full Report Below)

Process: sysextd [1214]

Path: /System/Library/Frameworks/SystemExtensions.framework/Versions/A/Helpers/sysextd

Identifier: sysextd

Version: ???

Code Type: X86-64 (Native)

Parent Process: launchd [1]

User ID: 0

Date/Time: 2022-06-21 18:22:30.1240 +0530

OS Version: macOS 12.4 (21F79)

Report Version: 12

Bridge OS Version: 6.5 (19P5071)

Anonymous UUID: 492561C8-C69A-A8BF-3340-633DA3ABC374

Time Awake Since Boot: 1600 seconds

System Integrity Protection: enabled

Crashed Thread: 1 Dispatch queue: sysextd.extension_manager

Exception Type: EXC_BAD_INSTRUCTION (SIGILL)

Exception Codes: 0x0000000000000001, 0x0000000000000000

Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4

Terminating Process: exc handler [1214]

Thread 0:

0 libsystem_kernel.dylib 0x7ff81cd1e1aa __semwait_signal_nocancel + 10

1 libsystem_c.dylib 0x7ff81cc4db18 nanosleep$NOCANCEL + 185

2 libsystem_c.dylib 0x7ff81cc4da25 sleep$NOCANCEL + 41

3 libdispatch.dylib 0x7ff81cbaf75f _dispatch_queue_cleanup2 + 158

4 libsystem_pthread.dylib 0x7ff81cd53567 _pthread_tsd_cleanup + 487

5 libsystem_pthread.dylib 0x7ff81cd55b89 _pthread_exit + 70

6 libsystem_pthread.dylib 0x7ff81cd5333d pthread_exit + 42

7 libdispatch.dylib 0x7ff81cbaafb9 dispatch_main + 96

8 sysextd 0x10d40a2a1 0x10d401000 + 37537

9 sysextd 0x10d4098f9 0x10d401000 + 35065

10 dyld 0x1137ef51e start + 462

Thread 1 Crashed:: Dispatch queue: sysextd.extension_manager

0 libswiftCore.dylib 0x7ff82a22e245 assertionFailure(:_:file:line:flags:) + 421 1 sysextd 0x10d436803 0x10d401000 + 219139

2 sysextd 0x10d43a407 0x10d401000 + 234503

3 sysextd 0x10d437308 0x10d401000 + 221960

4 sysextd 0x10d43736f 0x10d401000 + 222063

5 Foundation 0x7ff81dcde088 NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1 + 10

6 Foundation 0x7ff81dc88738 -[NSXPCConnection _decodeAndInvokeMessageWithEvent🎏 ] + 2347

7 Foundation 0x7ff81dc3f31e message_handler + 206

8 libxpc.dylib 0x7ff81ca94b70 _xpc_connection_call_event_handler + 56

9 libxpc.dylib 0x7ff81ca93956 _xpc_connection_mach_event + 1413

10 libdispatch.dylib 0x7ff81cb9e3b1 _dispatch_client_callout4 + 9

11 libdispatch.dylib 0x7ff81cbb7041 _dispatch_mach_msg_invoke + 445

12 libdispatch.dylib 0x7ff81cba41cd _dispatch_lane_serial_drain + 342

13 libdispatch.dylib 0x7ff81cbb7b77 _dispatch_mach_invoke + 484

14 libdispatch.dylib 0x7ff81cba41cd _dispatch_lane_serial_drain + 342

15 libdispatch.dylib 0x7ff81cba4dfd _dispatch_lane_invoke + 366

16 libdispatch.dylib 0x7ff81cbaeeee _dispatch_workloop_worker_thread + 753

17 libsystem_pthread.dylib 0x7ff81cd51fd0 _pthread_wqthread + 326

18 libsystem_pthread.dylib 0x7ff81cd50f57 start_wqthread + 15

Thread 2:

0 libsystem_kernel.dylib 0x7ff81cd1e1d2 __sigsuspend_nocancel + 10

1 libdispatch.dylib 0x7ff81cbaf81b _dispatch_sigsuspend + 36

2 libdispatch.dylib 0x7ff81cbaf7f7 _dispatch_sig_thread + 49

Thread 3: 0 libsystem_pthread.dylib 0x7ff81cd50f48 start_wqthread + 0

Thread 4: 0 libsystem_pthread.dylib 0x7ff81cd50f48 start_wqthread + 0

Thanks, Ravi

How to update SystemExtensions?
 
 
Q