Partially enumerated OSLogEnumerator leaves dangling dispatch queue threads behind

Originator:HofiOne
Number:rdar://FB12071731 Date Originated:2023. marc. 20
Status:Open Resolved:
Product:OSLog Framework Product Version:
Classification:Incorrect/Unexpected Behavior Reproducible:Always
 
If the OSLogEnumerator returned by [OSLogStore entriesEnumeratorWithOptions:position:predicate:error:] is released before it is fully enumerated either via repeated nextObject calls till it returns nil or calling allObjects on it then it will not be closed/freed properly, and the underlying used com.apple.loggingsupport.stream dispatch queue will leave behind a working thread (waiting for a semaphore) that also holds all the already allocated memory for each released enumerators.

If the enumerator fully iterated all of the log objects the issue is not happening.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!