1

在使用 Rosetta 的 Apple Silicon 机器上运行时,我们的应用程序出现了神秘的崩溃。崩溃来自 Appleruntimedyld库,并且总是具有相同类型的堆栈,但没有太多有用的信息。

  • 都有相同的 5 个堆栈帧模式,底部是dyld,然后是 4 in runtime,但都只是地址,不知道调用了什么符号
  • 有时偏移值相同,有时则不同。当您将它们组合在一起时,我们至少有两组堆栈;但足够接近以至于它出现了相同的根本问题。
  • 似乎只加载了这两个库,因此可能是在启动时崩溃,然后才充分设置,或者在崩溃期间发生了一些奇怪的事情,我们只在 .crash 中捕获了一小部分图片,或者发生了一些损坏.
  • 全部在 Apple Silicon 机器中
  • 有些在 macOS 11 上,有些在 macOS 12 上,所以这不是 Monterey beta 问题
  • 由于代码签名无效,它们都崩溃了,但这似乎不可靠,如果我们之后确实可以毫无问题地启动应用程序,这似乎是这种情况(基于我们收到的日志报告)。

这是一个典型的例子(部分应用信息被编辑):

Version:               ???
Code Type:             X86-64 (Translated)
Parent Process:        ??? [1]
User ID:               503

Date/Time:             2021-08-06 14:38:06.408 +0200
OS Version:            macOS 11.5.1 (20G80)
Report Version:        12

Time Awake Since Boot: 21000 seconds
Time Since Wake:       15000 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes:       0x0000000000000032, 0x0000000106675000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 0x2

kernel messages:

VM Regions Near 0x106675000:
    VM_ALLOCATE (reserved)      106671000-106675000    [   16K] r--/r-- SM=NUL  reserved VM address space (unallocated)
--> mapped file                 106675000-107ff9000    [ 25.5M] r-x/rwx SM=COW  Object_id=695dd8f1
    mapped file                 107ff9000-107ffd000    [   16K] r-x/r-x SM=COW  Object_id=6aaf57f1

Thread 0 Crashed:
0   runtime                         0x00007ffdffe9ac40 0x7ffdffe96000 + 19520
1   runtime                         0x00007ffdffea3df4 0x7ffdffe96000 + 56820
2   runtime                         0x00007ffdffea35ec 0x7ffdffe96000 + 54764
3   runtime                         0x00007ffdffe9a440 0x7ffdffe96000 + 17472
4   dyld                            0x000000020683f000 0x20683f000 + 0

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000106675000   x1: 0x000000030d81b730   x2: 0x0000000000000218   x3: 0x0000000000000012
    x4: 0x0000000000000004   x5: 0x0000000001984000   x6: 0x0000000000000000   x7: 0x0000000000000a40
    x8: 0x0000000000000007   x9: 0x0000000000000012  x10: 0x0000000106675fff  x11: 0x0000000100000000
   x12: 0x0000000000000000  x13: 0x0000000000000000  x14: 0x0000000000000000  x15: 0x000007d900018601
   x16: 0x00000000000000c5  x17: 0x000000000220bef3  x18: 0x000000030d81b073  x19: 0x000000030d81b730
   x20: 0x000000030d81aa78  x21: 0x0000000106675000  x22: 0x0000000000000004  x23: 0x0000000106675000
   x24: 0x0000000000000003  x25: 0x0000000000000001  x26: 0x000000030d81ab90  x27: 0x000000020683f000
   x28: 0x000000030d823960   fp: 0x000000030d81aa20   lr: 0x00007ffdffea267c
    sp: 0x000000030d81a9b0   pc: 0x00007ffdffe9ac40 cpsr: 0x20000000
   far: 0x0000000106675000  esr: 0x92000006


Binary Images:
       0x20683f000 -        0x2068dafff  dyld (852.2) <57DB2053-BFD5-3683-97C6-F1DB2A1F1D09> /usr/lib/dyld
    0x7ffdffe96000 -     0x7ffdffec5fff  runtime (203.58) <52A2E5D0-FAA3-34EF-8BB7-07F73718C034> /usr/libexec/rosetta/runtime

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: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=1048K resident=0K(0%) swapped_out_or_unallocated=1048K(100%)
Writable regions: Total=19.8M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=19.8M(100%)
 
                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
STACK GUARD                       56.0M        1 
Stack                             8176K        1 
VM_ALLOCATE                       10.5M        1 
VM_ALLOCATE (reserved)            1132K        3         reserved VM address space (unallocated)
__DATA                             288K        4 
__DATA_CONST                        32K        1 
__LINKEDIT                         272K        4 
__TEXT                             816K        2 
mapped file                        4.8G       11 
===========                     =======  ======= 
TOTAL                              4.9G       28 
TOTAL, minus reserved VM space     4.9G       28 

非常感谢任何帮助或指导。我不能肯定这是 Apple 的问题,因为我无法在我们的应用程序或其他应用程序中可靠地重现它。但它似乎是我们应用程序中的一个错误。

谢谢!

4

0 回答 0