Help with reducing File Lock (0xdead10cc) terminations

My app has a meaningful number of 0xdead10cc terminations because it deals with sqlite files in a shared app container. Are there any tips to diagnose them or track down which files are most often held open?

Are they delivered to MetricKit as crash diagnostics?

They're hard to identify in the Xcode organizer - I have to right-click on a suspect, Show in Finder, Show Package Contents, navigate into the proper sub-folder for my filter, then into the Logs subfolder, and look through the raw crash reports. And these crash reports don't identify the file that the lock is held open to, and they don't identify the correct culprit thread. Not all of them even show any of my code doing file IO. FB12292887

Hi there!

Are you able to reproduce this crash locally?

If so, you can try to use tools available:

  • lsof on your macOS can be run against simulator processes to understand open file descriptors.
  • Instruments has a 'File Activity' template. This tool allows you to track down your open file files. Specifically, you can use 'File Descriptor Time Slice' detail view on the 'Filesystem Activity' Instrument. This allows you to drag your inspection head in Instruments timeline and understand all the file descriptors that are open at any point in time. You could try to correlate it with your process terminating and understand the offending files.

Thanks for your question,

Kacper

Help with reducing File Lock (0xdead10cc) terminations
 
 
Q