background info:
I dispatch async task to main queue in an es_handler_block_t(client subscribe open, create, exit, close events and mute all processes except DesktopServicesHelper). crash happened kinda randomly. most likely to happen when I copy a folder(contains a lot of files) in a volume to another volume.
here's the crashed part of the diagnostic report .
Thread 9 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x18c6e2a60 __pthread_kill + 8
1 libsystem_pthread.dylib 0x18c71ac20 pthread_kill + 288
2 libsystem_c.dylib 0x18c627a20 abort + 180
3 libc++abi.dylib 0x18c6d1d30 abort_message + 132
4 libc++abi.dylib 0x18c6c1fe8 demangling_terminate_handler() + 348
5 libobjc.A.dylib 0x18c3601d0 _objc_terminate() + 144
6 libc++abi.dylib 0x18c6d10f4 std::__terminate(void (*)()) + 16
7 libc++abi.dylib 0x18c6d1098 std::terminate() + 108
8 libdispatch.dylib 0x18c56a3fc _dispatch_client_callout + 40
9 libdispatch.dylib 0x18c571a14 _dispatch_lane_serial_drain + 748
10 libdispatch.dylib 0x18c572578 _dispatch_lane_invoke + 432
11 libdispatch.dylib 0x18c57bea8 _dispatch_root_queue_drain + 392
12 libdispatch.dylib 0x18c57c6b8 _dispatch_worker_thread2 + 156
13 libsystem_pthread.dylib 0x18c716fd0 _pthread_wqthread + 228
14 libsystem_pthread.dylib 0x18c715d28 start_wqthread + 8
Thread 9 crashed with ARM Thread State (64-bit): x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000 x4: 0x000000018c6d62cb x5: 0x000000016c1eed20 x6: 0x000000000000006e x7: 0x0000000000000000 x8: 0x851ef9fdee51098d x9: 0x851ef9fc824ff98d x10: 0x0000000000000200 x11: 0x000000000000000b x12: 0x0000000000000000 x13: 0x00000000001ff800 x14: 0x00000000000007fb x15: 0x00000000a5a0204e x16: 0x0000000000000148 x17: 0x00000001fe792c30 x18: 0x0000000000000000 x19: 0x0000000000000006 x20: 0x000000016c1ef000 x21: 0x0000000000004003 x22: 0x000000016c1ef0e0 x23: 0x000000016c1ef0e0 x24: 0x00000001f442b6a8 x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000600003664800 x28: 0x0000000000000000 fp: 0x000000016c1eec90 lr: 0x000000018c71ac20 sp: 0x000000016c1eec70 pc: 0x000000018c6e2a60 cpsr: 0x40001000 far: 0x0000000000000000 esr: 0x56000080 Address size fault