(11.5) Sleep Wake Failure - Hardware or Software?

I just ran into a Sleep Wake Failure on 11.5:

Power button pressed during wake transition after 57409 ms.

Failure code:: 0x00000000 00000027

================================================================
Date/Time:        2021-08-29 10:41:25.444 +0100
OS Version:       ??? ??? (Build ???)
Architecture:     x86_64
Report Version:   32

Data Source:      Stackshots
Shared Cache:     F2DC58FA-E869-380A-8C1E-53D831FB3F9E slid base address 0x7fff20148000, slide 0x148000

Event:            Sleep Wake Failure
Duration:         0.00s
Steps:            1

Boot args:        chunklist-security-epoch=0 -chunklist-no-rev2-dev

Time Awake Since Boot: 10458s



Process:          kernel_task [0]
UUID:             FECBF22B-FBBE-36DE-9664-F12A7DD41D3D
Path:             /System/Library/Kernels/kernel
Architecture:     x86_64
Version:          Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64
Footprint:        75.48 MB
Time Since Fork:  52701s
Num samples:      1 (1)

  Thread 0x6e    1 sample (1)    priority 95 (base 95)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  mapping_replenish + 470 (kernel + 1670230) [0xffffff80003a7c56] 1
     *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
       *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
         *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x6f    Thread name "IOServiceTerminateThread"    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  IOService::terminateThread(void*, int) + 228 (kernel + 8113412) [0xffffff80009ccd04] 1
     *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
       *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
         *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
           *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x80    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  Thread<WorkQueue<EndpointSecurityClient>*>::threadEntry(void*, int) + 27 (EndpointSecurity + 243227) [0xffffff8001c8a61b] 1
     *1  invocation function for block in WorkQueue<EndpointSecurityClient>::create(void (ScopedPointer<EndpointSecurityClient>&&) block_pointer) + 115 (EndpointSecurity + 242195) [0xffffff8001c8a213] 1
       *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
         *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
           *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
             *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0xa3    Thread name "idle #2"    1 sample (1)    priority 0 (base 0)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  idle_thread + 72 (kernel + 681384) [0xffffff80002b65a8] 1
     *1  processor_idle + 249 (kernel + 680921) [0xffffff80002b63d9] 1
       *1  machine_idle + 746 (kernel + 1800394) [0xffffff80003c78ca] (runnable) 1

  Thread 0xa6    Thread name "idle #4"    1 sample (1)    priority 0 (base 0)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  idle_thread + 72 (kernel + 681384) [0xffffff80002b65a8] 1
     *1  processor_idle + 249 (kernel + 680921) [0xffffff80002b63d9] 1
       *1  machine_idle + 746 (kernel + 1800394) [0xffffff80003c78ca] (runnable) 1

  Thread 0xac    Thread name "idle #1"    1 sample (1)    priority 0 (base 0)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  idle_thread + 72 (kernel + 681384) [0xffffff80002b65a8] 1
     *1  processor_idle + 249 (kernel + 680921) [0xffffff80002b63d9] 1
       *1  machine_idle + 746 (kernel + 1800394) [0xffffff80003c78ca] (runnable) 1

  Thread 0xaf    Thread name "idle #3"    1 sample (1)    priority 0 (base 0)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  idle_thread + 72 (kernel + 681384) [0xffffff80002b65a8] 1
     *1  processor_idle + 249 (kernel + 680921) [0xffffff80002b63d9] 1
       *1  machine_idle + 746 (kernel + 1800394) [0xffffff80003c78ca] (runnable) 1

  Thread 0xb2    Thread name "idle #5"    1 sample (1)    priority 0 (base 0)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  idle_thread + 72 (kernel + 681384) [0xffffff80002b65a8] 1
     *1  processor_idle + 249 (kernel + 680921) [0xffffff80002b63d9] 1
       *1  machine_idle + 746 (kernel + 1800394) [0xffffff80003c78ca] (runnable) 1

  Thread 0xb5    Thread name "idle #7"    1 sample (1)    priority 0 (base 0)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  idle_thread + 72 (kernel + 681384) [0xffffff80002b65a8] 1
     *1  processor_idle + 249 (kernel + 680921) [0xffffff80002b63d9] 1
       *1  machine_idle + 746 (kernel + 1800394) [0xffffff80003c78ca] (runnable) 1

  Thread 0xdc    1 sample (1)    priority 97 (base 97)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  SMCWatchDogTimer::watchdogThread() + 211 (AppleSMC + 63095) [0xffffff8001965677] 1
     *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
       *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
         *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x144    Thread name "AppleANS2Controller"    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  IOWorkLoop::threadMain() + 280 (kernel + 8246376) [0xffffff80009ed468] 1
     *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
       *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
         *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x145    Thread name "AppleANS2Controller"    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  IOWorkLoop::threadMain() + 280 (kernel + 8246376) [0xffffff80009ed468] 1
     *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
       *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
         *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x17a    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  swcrypto_threadpool_worker_thread(void*, int) + 568 (apfs + 235678) [0xffffff80033e589e] 1
     *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
       *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
         *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
           *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x17b    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  swcrypto_threadpool_worker_thread(void*, int) + 568 (apfs + 235678) [0xffffff80033e589e] 1
     *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
       *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
         *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
           *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x17c    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  swcrypto_threadpool_worker_thread(void*, int) + 568 (apfs + 235678) [0xffffff80033e589e] 1
     *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
       *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
         *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
           *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x17d    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  swcrypto_threadpool_worker_thread(void*, int) + 568 (apfs + 235678) [0xffffff80033e589e] 1
     *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
       *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
         *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
           *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x22f    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  ??? (kernel + 6930132) [0xffffff80008abed4] 1
     *1  ??? (kernel + 6430152) [0xffffff8000831dc8] 1
       *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
         *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
           *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
             *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x4f8    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  IOCommandGate::runAction(int (*)(OSObject*, void*, void*, void*, void*), void*, void*, void*, void*) + 175 (kernel + 8260271) [0xffffff80009f0aaf] 1
     *1  IOWorkQueue::processWorkCallFromSeparateThreadWL() + 506 (IOBluetoothFamily + 251944) [0xffffff80028ee828] 1
       *1  IOEventSource::sleepGate(void*, unsigned int) + 75 (kernel + 8253963) [0xffffff80009ef20b] 1
         *1  IOWorkLoop::sleepGate(void*, unsigned int) + 188 (kernel + 8248172) [0xffffff80009edb6c] 1
           *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
             *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
               *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
                 *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x4fa    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  IOCommandGate::runAction(int (*)(OSObject*, void*, void*, void*, void*), void*, void*, void*, void*) + 175 (kernel + 8260271) [0xffffff80009f0aaf] 1
     *1  IOBluetoothPacketLoggerWorkQueue::processWorkCallFromSingleThreadAction(OSObject*, void*, void*, void*, void*) + 45 (IOBluetoothPacketLogger + 8851) [0xffffff80029a1293] 1
       *1  IOBluetoothPacketLoggerWorkQueue::processWorkCallFromSingleThreadWL() + 284 (IOBluetoothPacketLogger + 9146) [0xffffff80029a13ba] 1
         *1  IOEventSource::sleepGate(void*, unsigned int) + 75 (kernel + 8253963) [0xffffff80009ef20b] 1
           *1  IOWorkLoop::sleepGate(void*, unsigned int) + 188 (kernel + 8248172) [0xffffff80009edb6c] 1
             *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
               *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
                 *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
                   *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x4ff    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  IOCommandGate::runAction(int (*)(OSObject*, void*, void*, void*, void*), void*, void*, void*, void*) + 175 (kernel + 8260271) [0xffffff80009f0aaf] 1
     *1  IOWorkQueue::processWorkCallFromSeparateThreadWL() + 506 (IOBluetoothFamily + 251944) [0xffffff80028ee828] 1
       *1  IOEventSource::sleepGate(void*, unsigned int) + 75 (kernel + 8253963) [0xffffff80009ef20b] 1
         *1  IOWorkLoop::sleepGate(void*, unsigned int) + 188 (kernel + 8248172) [0xffffff80009edb6c] 1
           *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
             *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
               *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
                 *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x598    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  IOCommandGate::runAction(int (*)(OSObject*, void*, void*, void*, void*), void*, void*, void*, void*) + 175 (kernel + 8260271) [0xffffff80009f0aaf] 1
     *1  IOWorkQueue::processWorkCallFromSeparateThreadWL() + 506 (IOBluetoothFamily + 251944) [0xffffff80028ee828] 1
       *1  IOEventSource::sleepGate(void*, unsigned int) + 75 (kernel + 8253963) [0xffffff80009ef20b] 1
         *1  IOWorkLoop::sleepGate(void*, unsigned int) + 188 (kernel + 8248172) [0xffffff80009edb6c] 1
           *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
             *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
               *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
                 *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x974    1 sample (1)    priority 95 (base 95)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  ??? (kernel + 1880729) [0xffffff80003db299] 1
     *1  ??? (kernel + 1880942) [0xffffff80003db36e] 1
       *1  ??? (kernel + 1881103) [0xffffff80003db40f] 1
         *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
           *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
             *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
               *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x975    1 sample (1)    priority 95 (base 95)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  ??? (kernel + 1882514) [0xffffff80003db992] 1
     *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
       *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
         *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
           *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x976    1 sample (1)    priority 95 (base 95)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  ??? (kernel + 1882514) [0xffffff80003db992] 1
     *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
       *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
         *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
           *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x977    1 sample (1)    priority 95 (base 95)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  ??? (kernel + 1882514) [0xffffff80003db992] 1
     *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
       *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
         *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
           *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x978    1 sample (1)    priority 95 (base 95)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  ??? (kernel + 1882514) [0xffffff80003db992] 1
     *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
       *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
         *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
           *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x979    1 sample (1)    priority 95 (base 95)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  ??? (kernel + 1882514) [0xffffff80003db992] 1
     *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
       *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
         *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
           *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x97a    1 sample (1)    priority 95 (base 95)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  ??? (kernel + 1882514) [0xffffff80003db992] 1
     *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
       *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
         *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
           *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x97b    1 sample (1)    priority 95 (base 95)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  ??? (kernel + 1882514) [0xffffff80003db992] 1
     *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
       *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
         *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
           *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x28d6    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  smb_rw_thread + 127 (smbfs + 272158) [0xffffff7f9bb8271e] 1
     *1  ??? (kernel + 6430152) [0xffffff8000831dc8] 1
       *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
         *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
           *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
             *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x28d7    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  smb_rw_thread + 127 (smbfs + 272158) [0xffffff7f9bb8271e] 1
     *1  ??? (kernel + 6430152) [0xffffff8000831dc8] 1
       *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
         *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
           *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
             *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x28d8    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  smb_rw_thread + 127 (smbfs + 272158) [0xffffff7f9bb8271e] 1
     *1  ??? (kernel + 6430152) [0xffffff8000831dc8] 1
       *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
         *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
           *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
             *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x28d9    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  smb_rw_thread + 127 (smbfs + 272158) [0xffffff7f9bb8271e] 1
     *1  ??? (kernel + 6430152) [0xffffff8000831dc8] 1
       *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
         *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
           *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
             *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x28da    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  smb_rw_thread + 127 (smbfs + 272158) [0xffffff7f9bb8271e] 1
     *1  ??? (kernel + 6430152) [0xffffff8000831dc8] 1
       *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
         *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
           *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
             *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x28db    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  smb_rw_thread + 127 (smbfs + 272158) [0xffffff7f9bb8271e] 1
     *1  ??? (kernel + 6430152) [0xffffff8000831dc8] 1
       *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
         *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
           *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
             *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x28dc    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  smb_rw_thread + 127 (smbfs + 272158) [0xffffff7f9bb8271e] 1
     *1  ??? (kernel + 6430152) [0xffffff8000831dc8] 1
       *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
         *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
           *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
             *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x28dd    1 sample (1)    priority 81 (base 81)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  smb_rw_thread + 127 (smbfs + 272158) [0xffffff7f9bb8271e] 1
     *1  ??? (kernel + 6430152) [0xffffff8000831dc8] 1
       *1  lck_mtx_sleep + 104 (kernel + 595560) [0xffffff80002a1668] 1
         *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
           *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
             *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x22ad3    1 sample (1)    priority 81 (base 81)
  <IO tier 0 and passive>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  tx_flush_thread + 623 (apfs + 1159098) [0xffffff80034c6fba] 1
     *1  ??? (kernel + 6429925) [0xffffff8000831ce5] 1
       *1  lck_mtx_sleep_deadline + 115 (kernel + 596147) [0xffffff80002a18b3] 1
         *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
           *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
             *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Thread 0x2633d    Thread name "thread call high #17"    1 sample (1)    priority 93 (base 93)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  ??? (kernel + 808308) [0xffffff80002d5574] 1
     *1  ??? (kernel + 804357) [0xffffff80002d4605] 1
       *1  IOPMrootDomain::takeStackshot(bool) + 543 (kernel + 8719855) [0xffffff8000a60def] 1
         *1  stack_snapshot_from_kernel + 511 (kernel + 286335) [0xffffff8000255e7f] 1
           *1  DebuggerTrapWithState + 173 (kernel + 514157) [0xffffff800028d86d] (running) 1

  Thread 0x2633e    Thread name "thread call high #18"    1 sample (1)    priority 93 (base 93)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  ??? (kernel + 808308) [0xffffff80002d5574] 1
     *1  ??? (kernel + 804357) [0xffffff80002d4605] 1
       *1  IOService::pmDriverCallout(IOService*) + 42 (kernel + 8141098) [0xffffff80009d392a] 1
         *1  IOService::driverSetPowerState() + 497 (kernel + 8141713) [0xffffff80009d3b91] 1
           *1  IOCommandGate::runAction(int (*)(OSObject*, void*, void*, void*, void*), void*, void*, void*, void*) + 175 (kernel + 8260271) [0xffffff80009f0aaf] 1
             *1  IOBluetoothHostControllerTransport::setPowerStateAction(OSObject*, void*, void*, void*, void*) + 208 (IOBluetoothHostControllerTransport + 7366) [0xffffff800297bcc6] 1
               *1  IOBluetoothHostControllerPCIeTransport::setPowerStateWL(unsigned long, IOService*) + 1618 (IOBluetoothHostControllerPCIeTransport + 9560) [0xffffff8002975558] 1
                 *1  IOBluetoothHostController::HardResetController(unsigned short) + 1266 (IOBluetoothFamily + 397552) [0xffffff80029120f0] 1
                   *1  IOBluetoothHostControllerPCIeTransport::DoDeviceReset(unsigned short) + 1469 (IOBluetoothHostControllerPCIeTransport + 14457) [0xffffff8002976879] 1
                     *1  IOBluetoothHostControllerTransport::TransportCommandSleep(void*, unsigned int, char*, bool) + 177 (IOBluetoothHostControllerTransport + 11599) [0xffffff800297cd4f] 1
                       *1  IOEventSource::sleepGate(void*, unsigned long long, unsigned int) + 83 (kernel + 8254099) [0xffffff80009ef293] 1
                         *1  IOWorkLoop::sleepGate(void*, unsigned long long, unsigned int) + 191 (kernel + 8249279) [0xffffff80009edfbf] 1
                           *1  lck_mtx_sleep_deadline + 115 (kernel + 596147) [0xffffff80002a18b3] 1
                             *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
                               *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
                                 *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

  Binary Images:
   *0xffffff7f9bb40000 - 0xffffff7f9bbbbfff  smbfs (231.120.2)                                   <C2DCE3D9-7145-3D70-A95D-FBB59D8DE6A7>  /System/Library/Extensions/smbfs.kext/Contents/MacOS/smbfs
   *0xffffff8000210000 - 0xffffff8000c0ffff  kernel (7195.141.2)                                 <FECBF22B-FBBE-36DE-9664-F12A7DD41D3D>  /System/Library/Kernels/kernel
   *0xffffff8001956000 - 0xffffff8001971fff  AppleSMC (589.100.17)                               <842672EB-58AA-3149-BB3E-0A171704B541>  /System/Library/Extensions/AppleSMC.kext/Contents/MacOS/AppleSMC
   *0xffffff8001c4f000 - 0xffffff8001ca4fff  EndpointSecurity (197.140.4)                        <7B217991-DBDF-3856-A7DB-9CA1722667F8>  /System/Library/Extensions/EndpointSecurity.kext/Contents/MacOS/EndpointSecurity
   *0xffffff80028b1000 - 0xffffff8002967fff  IOBluetoothFamily (8005.1.7.1)                      <E4A05B93-E137-3846-9028-3B997A217330>  /System/Library/Extensions/IOBluetoothFamily.kext/Contents/MacOS/IOBluetoothFamily
   *0xffffff8002973000 - 0xffffff8002979fff  IOBluetoothHostControllerPCIeTransport (8005.1.7.1) <AE42616B-0109-3B6C-A92C-B9F5BAE59769>  /System/Library/Extensions/IOBluetoothFamily.kext/Contents/PlugIns/IOBluetoothHostControllerPCIeTransport.kext/Contents/MacOS/IOBluetoothHostControllerPCIeTransport
   *0xffffff800297a000 - 0xffffff800297ffff  IOBluetoothHostControllerTransport (8005.1.7.1)     <A13CE068-E1C6-3D3A-8D08-6126946D25D6>  /System/Library/Extensions/IOBluetoothFamily.kext/Contents/PlugIns/IOBluetoothHostControllerTransport.kext/Contents/MacOS/IOBluetoothHostControllerTransport
   *0xffffff800299f000 - 0xffffff80029a6fff  IOBluetoothPacketLogger (8005.1.7.1)                <73C4114C-B6CC-36EF-9320-8583142DDEE9>  /System/Library/Extensions/IOBluetoothFamily.kext/Contents/PlugIns/IOBluetoothPacketLogger.kext/Contents/MacOS/IOBluetoothPacketLogger
   *0xffffff80033ac000 - 0xffffff8003526fff  apfs (1677.141.1)                                   <242980A5-2BD9-3F6C-85A9-59DC3D26221C>  /System/Library/Extensions/apfs.kext/Contents/MacOS/apfs
   *0xffffff80035fc000 -                ???  ???                                                 <5E977058-687E-36A0-9AED-3BDE47B80C97>
Model: MacBookPro16,3, BootROM 1554.140.20.0.0 (iBridge: 18.16.14759.0.1,0), 4 processors, Quad-Core Intel Core i5, 1.4 GHz, 8 GB, SMC
Graphics: kHW_IntelIrisGraphics645Item, Intel Iris Plus Graphics 645, spdisplays_builtin
Memory Module: BANK 0/ChannelA-DIMM0, 4 GB, LPDDR3, 2133 MHz, Samsung, K4E6E304ED-EGCG
Memory Module: BANK 2/ChannelB-DIMM0, 4 GB, LPDDR3, 2133 MHz, Samsung, K4E6E304ED-EGCG
AirPort: spairport_wireless_card_type_airport_extreme, wl0: Jul  7 2021 03:22:32 version 16.50.21.0.3.6.102 FWID 01-d1a61353
Bluetooth: Version 8.0.5d7, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB 3.1 Bus
USB Device: Apple T2 Bus
USB Device: Touch Bar Backlight
USB Device: Touch Bar Display
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Headset
USB Device: Ambient Light Sensor
USB Device: FaceTime HD Camera (Built-in)
USB Device: Apple T2 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 63.5

Is this a software issue or a hardware one?


Failure code:: 0x00000000 00000027

The failure code indicates the last sleep trace point, which was 0x27 in this case. According to https://github.com/apple/darwin-xnu/blob/main/iokit/IOKit/pwr_mgt/IOPMPrivate.h:

/* When kIOPMTracePointWakePowerPlaneDrivers is the latest tracePoint,
 * PM is directing power plane drivers to power up in root-to-leaf order.
 *
 * Phase begins: Root domain informs its power children that it transitioned
 *      to ON state. This has a cascade effect and triggers all drivers in
 *      the power plane to re-evaluate and potentially change power state.
 * Phase ends: All power transitions in response to the root domain power
 *      change have completed.
 */
    kIOPMTracePointWakePowerPlaneDrivers        = 0x27,

/* When kIOPMTracePointWakeCapabilityClients is the latest tracePoint,
 * PM is notifying system capability clients about system wake, and waiting
 * for any asynchronous completions.
 *
 * Phase begins: Inform capability clients that system has gained capabilities.
 * Phase ends: All notified clients have acknowledged.
 */
    kIOPMTracePointWakeCapabilityClients        = 0x28,

This means that your failure occurred during system wake after IOService::notifyChildren() and before IOService::OurChangeTellCapabilityDidChange(). So we know that CPU control has been returned from EFI to macOS by this point and all system device drivers have finished powering up their associated hardware, but not all software that needs to handle the wakeup has finished handling it yet.

What strikes me is that although the rest of the kernel is quiescent at this point, one of its threads appears to still be in the middle of handling a power transition for the Bluetooth controller, even though we just said that all drivers have indicated that they are done:

  Thread 0x2633e    Thread name "thread call high #18"    1 sample (1)    priority 93 (base 93)
  <IO tier 0>
 *1  call_continuation + 46 (kernel + 139582) [0xffffff800023213e] 1
   *1  ??? (kernel + 808308) [0xffffff80002d5574] 1
     *1  ??? (kernel + 804357) [0xffffff80002d4605] 1
       *1  IOService::pmDriverCallout(IOService*) + 42 (kernel + 8141098) [0xffffff80009d392a] 1
         *1  IOService::driverSetPowerState() + 497 (kernel + 8141713) [0xffffff80009d3b91] 1
           *1  IOCommandGate::runAction(int (*)(OSObject*, void*, void*, void*, void*), void*, void*, void*, void*) + 175 (kernel + 8260271) [0xffffff80009f0aaf] 1
             *1  IOBluetoothHostControllerTransport::setPowerStateAction(OSObject*, void*, void*, void*, void*) + 208 (IOBluetoothHostControllerTransport + 7366) [0xffffff800297bcc6] 1
               *1  IOBluetoothHostControllerPCIeTransport::setPowerStateWL(unsigned long, IOService*) + 1618 (IOBluetoothHostControllerPCIeTransport + 9560) [0xffffff8002975558] 1
                 *1  IOBluetoothHostController::HardResetController(unsigned short) + 1266 (IOBluetoothFamily + 397552) [0xffffff80029120f0] 1
                   *1  IOBluetoothHostControllerPCIeTransport::DoDeviceReset(unsigned short) + 1469 (IOBluetoothHostControllerPCIeTransport + 14457) [0xffffff8002976879] 1
                     *1  IOBluetoothHostControllerTransport::TransportCommandSleep(void*, unsigned int, char*, bool) + 177 (IOBluetoothHostControllerTransport + 11599) [0xffffff800297cd4f] 1
                       *1  IOEventSource::sleepGate(void*, unsigned long long, unsigned int) + 83 (kernel + 8254099) [0xffffff80009ef293] 1
                         *1  IOWorkLoop::sleepGate(void*, unsigned long long, unsigned int) + 191 (kernel + 8249279) [0xffffff80009edfbf] 1
                           *1  lck_mtx_sleep_deadline + 115 (kernel + 596147) [0xffffff80002a18b3] 1
                             *1  thread_block_reason + 175 (kernel + 660159) [0xffffff80002b12bf] 1
                               *1  ??? (kernel + 666402) [0xffffff80002b2b22] 1
                                 *1  machine_switch_context + 203 (kernel + 1768795) [0xffffff80003bfd5b] 1

The Bluetooth driver appears to be waiting for completion of its controller hardware reset. I would expect that if this is the case then the kernel should not have advanced its sleep-wake phase point to 0x27 yet.

Without access to the Bluetooth driver source code, we can only guess as to what's really going on or whether this is normal, but one possibility that it may suggest is that Bluetooth is actually not done with its power transition even though the kernel believes that it is. Such race conditions can often cause erroneous state, which leads to sleep-wake failures.

Ultimately root-causing this failure will require reproducing it and having significantly more debugging facilities available. There is not nearly enough information available in this report to find root cause. So we can't be sure whether it's due to buggy hardware, buggy firmware, or buggy software. The best you can do is watch for recurrences.

If this happens regularly, as an experiment you can try disabling Bluetooth and see if the problem goes away. As a modest help for future information gathering, you can enable kernel symbolication in order to try to reduce the occurrences of ??? in your stackshots. I've added information on how to do this below.

In any case none of this is user error and you should file a bug report with Apple and then contact Apple Support.


To enable kernel symbolication:

  1. Run the following Terminal command: sudo nvram boot-args="keepsyms=1". Make sure to copy-paste this so that you're entering straight quotes rather than curly/“smart” quotes. (If you get a permission error, you will first need to disable System Integrity Protection. You can re-enable it after you're done with this investigation.)
  2. Reboot your machine. The next time this failure occurs, your report will have a symbolicated backtrace.