You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Description:
I'm exercising dyld shared cache loading by loading a batch of images from the shared cache in sequence.
While each image loads, the Binary Ninja UI frequently becomes totally unresponsive for tens of seconds at a time. Running sample binaryninja shows that the main thread is blocked below either FeatureMap::renderAnalysisData or SectionWidget::updateInfo, trying to take a lock held by a background analysis thread.
This happens even when the feature map and section widget are not visible on screen.
Open /System/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e and wait for the initial load / analysis to complete.
In the image list in the Dyld Shared Cache triage view, click and drag to select 50 or so images.
Press Load.
Expected Behavior:
UI elements shouldn't block for an extended period of time while waiting on locks held by background threads.
UI elements that aren't visible shouldn't be updating at all.
Binary:
I've been testing with the system dyld shared cache on macOS 15.1.1.
Additional Information:
Note this uses my branch of the dyld shared cache plug-in as it is significantly faster than what is currently in dev, with an additional patch applied to make it easier to load a number of images in a row.
sample binaryninja shows the main thread looks like one of the following:
+ 2373 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ (in CoreFoundation) + 28 [0x191219d34]
+ 2373 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) (in libqcocoa.dylib) + 436 [0x104b3a064]
+ 2373 QCocoaEventDispatcherPrivate::processPostedEvents() (in libqcocoa.dylib) + 312 [0x104b390a4]
+ 2373 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in QtCore) + 1464 [0x1051a83b0]
+ 2373 QCoreApplication::notifyInternal2(QObject*, QEvent*) (in QtCore) + 212 [0x1051a70c4]
+ 2373 QApplication::notify(QObject*, QEvent*) (in QtWidgets) + 3244 [0x106235298]
+ 2373 QApplicationPrivate::notify_helper(QObject*, QEvent*) (in QtWidgets) + 272 [0x1062339a4]
+ 2373 QWidget::event(QEvent*) (in QtWidgets) + 3656 [0x10627f230]
+ 2373 QObject::event(QEvent*) (in QtCore) + 616 [0x1051ea6c4]
+ 2373 FeatureMap::renderAnalysisData() (in libbinaryninjaui.1.dylib) + 424 [0x105965990]
+ 2373 ??? (in libbinaryninjaui.1.dylib) load address 0x10580c000 + 0x5cfb9c [0x105ddbb9c]
+ 2373 BNGetFunctionBasicBlockList (in libbinaryninjacore.1.dylib) + 40 [0x1174b1f98]
+ 2373 ??? (in libbinaryninjacore.1.dylib) load address 0x116f50000 + 0x51e998 [0x11746e998]
+ 2373 std::recursive_mutex::lock() (in libc++.1.dylib) + 16 [0x19106a8ec]
+ 2373 _pthread_mutex_firstfit_lock_slow (in libsystem_pthread.dylib) + 220 [0x19112ddbc]
+ 2373 _pthread_mutex_firstfit_lock_wait (in libsystem_pthread.dylib) + 84 [0x1911303f8]
+ 2373 __psynch_mutexwait (in libsystem_kernel.dylib) + 8 [0x1910f4a9c]
+ 2343 __CFRunLoopDoSource0 (in CoreFoundation) + 176 [0x191219cc8]
+ 2343 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ (in CoreFoundation) + 28 [0x191219d34]
+ 1880 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) (in libqcocoa.dylib) + 436 [0x104b3a064]
+ ! 1880 QCocoaEventDispatcherPrivate::processPostedEvents() (in libqcocoa.dylib) + 312 [0x104b390a4]
+ ! 1880 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in QtCore) + 1464 [0x1051a83b0]
+ ! 1880 QCoreApplication::notifyInternal2(QObject*, QEvent*) (in QtCore) + 212 [0x1051a70c4]
+ ! 1880 QApplication::notify(QObject*, QEvent*) (in QtWidgets) + 3244 [0x106235298]
+ ! 1880 QApplicationPrivate::notify_helper(QObject*, QEvent*) (in QtWidgets) + 272 [0x1062339a4]
+ ! 1880 QWidget::event(QEvent*) (in QtWidgets) + 3656 [0x10627f230]
+ ! 1880 QObject::event(QEvent*) (in QtCore) + 616 [0x1051ea6c4]
+ ! 1235 SectionWidget::updateInfo() (in libbinaryninjaui.1.dylib) + 100 [0x105a95b20]
+ ! : 1235 ??? (in libbinaryninjaui.1.dylib) load address 0x10580c000 + 0x5aad04 [0x105db6d04]
+ ! : 1235 BNGetSections (in libbinaryninjacore.1.dylib) + 40 [0x11721a948]
+ ! : 1235 ??? (in libbinaryninjacore.1.dylib) load address 0x116f50000 + 0x2afc94 [0x1171ffc94]
+ ! : 1235 std::recursive_mutex::lock() (in libc++.1.dylib) + 16 [0x19106a8ec]
+ ! : 1235 _pthread_mutex_firstfit_lock_slow (in libsystem_pthread.dylib) + 220 [0x19112ddbc]
+ ! : 1235 _pthread_mutex_firstfit_lock_wait (in libsystem_pthread.dylib) + 84 [0x1911303f8]
+ ! : 1235 __psynch_mutexwait (in libsystem_kernel.dylib) + 8 [0x1910f4a9c]
In both cases they appear to be waiting on a lock held by a background thread that is taking its sweet time beneath BNAddUserSection:
Version and Platform (required):
Bug Description:
I'm exercising dyld shared cache loading by loading a batch of images from the shared cache in sequence.
While each image loads, the Binary Ninja UI frequently becomes totally unresponsive for tens of seconds at a time. Running
sample binaryninja
shows that the main thread is blocked below eitherFeatureMap::renderAnalysisData
orSectionWidget::updateInfo
, trying to take a lock held by a background analysis thread.This happens even when the feature map and section widget are not visible on screen.
Steps To Reproduce:
/System/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e
and wait for the initial load / analysis to complete.Expected Behavior:
Binary:
I've been testing with the system dyld shared cache on macOS 15.1.1.
Additional Information:
Note this uses my branch of the dyld shared cache plug-in as it is significantly faster than what is currently in dev, with an additional patch applied to make it easier to load a number of images in a row.
sample binaryninja
shows the main thread looks like one of the following:In both cases they appear to be waiting on a lock held by a background thread that is taking its sweet time beneath
BNAddUserSection
:Rough patch to enable multi-selection and batch loading of images from the dyld shared cache:
The text was updated successfully, but these errors were encountered: