View Issue Details

IDProjectCategoryView StatusLast Update
0002871Slicer4Core: Base Codepublic2017-06-07 23:27
Reporterpieper Assigned Topieper  
PriorityhighSeveritycrashReproducibilityrandom
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0002871: crash in error log during multi-threaded imports
Description

The ctkDICOMIndexer does concurrent (multi-threaded) inserts into the ctkDICOMDatabase and also there is diagnostic information printed out. Actually quite a lot of diagnostic information is output if you import a large directory.

Sometimes this can lead to a crash as shown in the Additional Information section below.

Note that there are several QtConcurrent threads running the indexer callback. At some point the error log model inserts some data and I get this crash.

Steps To Reproduce

Insert a very large directory of dicom data via the Import button in the DICOM Browser in slicer and you will sometimes get this crash.

I only tested so far on mac.

Additional Information

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
*** error for object 0x7fac166f5a48: incorrect checksum for freed object - object was probably modified after being freed.

Thread 0:: Dispatch queue: com.apple.main-thread
0 QtGui 0x000000011095efd1 QHeaderView::isSectionHidden(int) const + 85
1 QtGui 0x0000000110961abf QHeaderView::sectionsInserted(QModelIndex const&, int, int) + 1495
2 QtGui 0x000000011095cde0 QHeaderView::qt_static_metacall(QObject*, QMetaObject::Call, int, void) + 894
3 QtCore 0x00000001111c2851 QMetaObject::activate(QObject, QMetaObject const, int, void
) + 2001
4 QtCore 0x000000011120cbcf QAbstractItemModel::rowsInserted(QModelIndex const&, int, int) + 63
5 QtCore 0x00000001111a4dfa QAbstractItemModel::endInsertRows() + 74
6 QtGui 0x00000001109d5e66 QSortFilterProxyModelPrivate::insert_source_items(QVector<int>&, QVector<int>&, QVector<int> const&, QModelIndex const&, Qt::Orientation, bool) + 718
7 QtGui 0x00000001109d6645 QSortFilterProxyModelPrivate::source_items_inserted(QModelIndex const&, int, int, Qt::Orientation) + 1633
8 QtGui 0x00000001109d0983 QSortFilterProxyModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void) + 629
9 QtCore 0x00000001111c2851 QMetaObject::activate(QObject, QMetaObject const, int, void
) + 2001
10 QtCore 0x000000011120cbcf QAbstractItemModel::rowsInserted(QModelIndex const&, int, int) + 63
11 QtCore 0x00000001111a4dfa QAbstractItemModel::endInsertRows() + 74
12 QtGui 0x00000001109e3783 QStandardItemPrivate::insertRows(int, int, QList<QStandardItem> const&) + 711
13 libCTKWidgets.0.1.dylib 0x000000010670aeaf QStandardItem::appendRow(QList<QStandardItem
> const&) + 47 (qstandarditemmodel.h:302)
14 libCTKCore.0.1.dylib 0x000000010bd4d191 ctkErrorLogModel::addEntry(QDateTime const&, QString const&, ctkErrorLogLevel::LogLevel, QString const&, QString const&) + 3729 (ctkErrorLogModel.cpp:501)
15 libCTKCore.0.1.dylib 0x000000010bd7b54d ctkErrorLogModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void*) + 237 (moc_ctkErrorLogModel.cxx:150)
16 QtCore 0x00000001111c19c4 QObject::event(QEvent
) + 286
17 QtGui 0x00000001104c19a8 QApplicationPrivate::notify_helper(QObject, QEvent) + 304
18 QtGui 0x00000001104c1c29 QApplication::notify(QObject, QEvent) + 603
19 QtCore 0x00000001111ada26 QCoreApplication::notifyInternal(QObject, QEvent) + 104
20 QtCore 0x00000001111ade13 QCoreApplicationPrivate::sendPostedEvents(QObject, int, QThreadData) + 557
21 com.apple.CoreFoundation 0x00007fff8cbaf101 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
22 com.apple.CoreFoundation 0x00007fff8cbaea25 CFRunLoopDoSources0 + 245
23 com.apple.CoreFoundation 0x00007fff8cbd1dc5
CFRunLoopRun + 789
24 com.apple.CoreFoundation 0x00007fff8cbd16b2 CFRunLoopRunSpecific + 290
25 com.apple.HIToolbox 0x00007fff8e0d00a4 RunCurrentEventLoopInMode + 209
26 com.apple.HIToolbox 0x00007fff8e0cfe42 ReceiveNextEventCommon + 356
27 com.apple.HIToolbox 0x00007fff8e0cfcd3 BlockUntilNextEventMatchingListInMode + 62
28 com.apple.AppKit 0x00007fff8860e613 _DPSNextEvent + 685
29 com.apple.AppKit 0x00007fff8860ded2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
30 com.apple.AppKit 0x00007fff88605283 -[NSApplication run] + 517
31 QtGui 0x000000011047d5b0 QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 840
32 QtCore 0x00000001111aae88 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 394
33 QtCore 0x00000001111ae15b QCoreApplication::exec() + 175
34 0x00000001050b9861 (anonymous namespace)::SlicerAppMain(int, char**) + 4145 (Main.cxx:190)
35 0x00000001050b8822 main + 34 (Main.cxx:222)
36 libdyld.dylib 0x00007fff912017e1 start + 1

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff90077d16 kevent + 10
1 libdispatch.dylib 0x00007fff8ef90dea _dispatch_mgr_invoke + 883
2 libdispatch.dylib 0x00007fff8ef909ee _dispatch_mgr_thread + 54

Thread 2:
0 libsystem_kernel.dylib 0x00007fff90077ffa read + 10
1 libCTKCore.0.1.dylib 0x000000010bd52918 ctkFDHandler::run() + 72 (ctkErrorLogFDMessageHandler.cpp:189)
2 QtCore 0x00000001110bb39f QThreadPrivate::start(void*) + 373
3 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
4 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 3:
0 libsystem_c.dylib 0x00007fff9096ff4e _spin_lock$VARIANT$mp + 30
1 libsystem_c.dylib 0x00007fff909a77d0 szone_malloc_should_clear + 195
2 libsystem_c.dylib 0x00007fff9099a153 malloc_zone_malloc + 71
3 libsystem_c.dylib 0x00007fff9099aba7 malloc + 41
4 QtCore 0x0000000111107ce7 QString::realloc(int) + 57
5 QtCore 0x0000000111108846 QString::append(QChar) + 60
6 libCTKCore.0.1.dylib 0x000000010bd52f66 QString::operator+=(char) + 54 (qstring.h:445)
7 libCTKCore.0.1.dylib 0x000000010bd52966 ctkFDHandler::run() + 150 (ctkErrorLogFDMessageHandler.cpp:197)
8 QtCore 0x00000001110bb39f QThreadPrivate::start(void*) + 373
9 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
10 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 4:
0 libsystem_kernel.dylib 0x00007fff90077386 __semwait_signal + 10
1 libsystem_c.dylib 0x00007fff90a0b800 nanosleep + 163
2 libsystem_c.dylib 0x00007fff90a0b717 usleep + 54
3 libitksys-4.4.1.dylib 0x0000000117ad07fb itksys::SystemTools::Delay(unsigned int) + 107 (SystemTools.cxx:4265)
4 libSlicerBaseLogic.dylib 0x00000001091fceb4 vtkSlicerApplicationLogic::ProcessProcessingTasks() + 580 (vtkSlicerApplicationLogic.cxx:473)
5 libSlicerBaseLogic.dylib 0x00000001091fc9d6 vtkSlicerApplicationLogic::ProcessingThreaderCallback(void*) + 54 (vtkSlicerApplicationLogic.cxx:425)
6 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
7 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 5:
0 libsystem_kernel.dylib 0x00007fff90077386 __semwait_signal + 10
1 libsystem_c.dylib 0x00007fff90a0b800 nanosleep + 163
2 libsystem_c.dylib 0x00007fff90a0b717 usleep + 54
3 libitksys-4.4.1.dylib 0x0000000117ad07fb itksys::SystemTools::Delay(unsigned int) + 107 (SystemTools.cxx:4265)
4 libSlicerBaseLogic.dylib 0x00000001091fd134 vtkSlicerApplicationLogic::ProcessNetworkingTasks() + 580 (vtkSlicerApplicationLogic.cxx:547)
5 libSlicerBaseLogic.dylib 0x00000001091fca26 vtkSlicerApplicationLogic::NetworkingThreaderCallback(void*) + 54 (vtkSlicerApplicationLogic.cxx:501)
6 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
7 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 6:
0 libsystem_kernel.dylib 0x00007fff900770fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff90985f89 _pthread_cond_wait + 869
2 QtWebKit 0x0000000107d5d897 WTF::TCMalloc_PageHeap::scavengerThread() + 91
3 QtWebKit 0x0000000107d5d93b WTF::TCMalloc_PageHeap::runScavengerThread(void*) + 9
4 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
5 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 7:
0 libsystem_kernel.dylib 0x00007fff90077322 __select + 10
1 QtCore 0x00000001111d5d86 qt_safe_select(int, fd_set, fd_set, fd_set, timeval const) + 374
2 QtCore 0x00000001111da1d1 QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval) + 851
3 QtCore 0x00000001111da62d QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 225
4 QtCore 0x00000001111aae88 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 394
5 QtCore 0x00000001110b86c6 QThread::exec() + 216
6 QtCore 0x00000001110bb39f QThreadPrivate::start(void
) + 373
7 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
8 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 8:
0 libsystem_kernel.dylib 0x00007fff90077d16 kevent + 10
1 QtCore 0x00000001111916dd QKqueueFileSystemWatcherEngine::run() + 465
2 QtCore 0x00000001110bb39f QThreadPrivate::start(void*) + 373
3 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
4 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 9:
0 libsystem_kernel.dylib 0x00007fff90077322 __select + 10
1 QtCore 0x000000011118659e QProcessManager::run() + 218
2 QtCore 0x00000001110bb39f QThreadPrivate::start(void*) + 373
3 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
4 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 10:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff90077322 select + 10
1 com.apple.CoreFoundation 0x00007fff8cc114e6
CFSocketManager + 1302
2 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
3 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 11:
0 libsystem_kernel.dylib 0x00007fff90077d16 kevent + 10
1 QtCore 0x00000001111916dd QKqueueFileSystemWatcherEngine::run() + 465
2 QtCore 0x00000001110bb39f QThreadPrivate::start(void*) + 373
3 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
4 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 12:
0 libsystem_kernel.dylib 0x00007fff900770fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff90985f89 _pthread_cond_wait + 869
2 QtCore 0x00000001110bc05c QWaitConditionPrivate::wait(unsigned long) + 220
3 QtCore 0x00000001110bbd65 QWaitCondition::wait(QMutex, unsigned long) + 117
4 QtGui 0x0000000110933997 QFileInfoGatherer::run() + 177
5 QtCore 0x00000001110bb39f QThreadPrivate::start(void
) + 373
6 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
7 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 13:
0 libsystem_kernel.dylib 0x00007fff90077d16 kevent + 10
1 QtCore 0x00000001111916dd QKqueueFileSystemWatcherEngine::run() + 465
2 QtCore 0x00000001110bb39f QThreadPrivate::start(void*) + 373
3 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
4 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 14 Crashed:
0 libsystem_kernel.dylib 0x00007fff90077212 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff90982af4 pthread_kill + 90
2 libsystem_c.dylib 0x00007fff909c6dce abort + 143
3 libsystem_c.dylib 0x00007fff909a28a5 szone_error + 580
4 libsystem_c.dylib 0x00007fff909a71aa tiny_malloc_from_free_list + 146
5 libsystem_c.dylib 0x00007fff909a7ad8 szone_malloc_should_clear + 971
6 libsystem_c.dylib 0x00007fff9099a153 malloc_zone_malloc + 71
7 libsystem_c.dylib 0x00007fff9099aba7 malloc + 41
8 libstdc++.6.dylib 0x00007fff87752347 operator new(unsigned long) + 34
9 libCTKDICOMCore.0.1.dylib 0x0000000105fad227 OFListBase::OFListBase() + 55 (oflist.cc:37)
10 libCTKDICOMCore.0.1.dylib 0x0000000105f17b8f OFList<DcmPrivateTagCacheEntry>::OFList() + 31 (oflist.h:323)
11 libCTKDICOMCore.0.1.dylib 0x0000000105f17715 OFList<DcmPrivateTagCacheEntry
>::OFList() + 21 (oflist.h:323)
12 libCTKDICOMCore.0.1.dylib 0x0000000105f1722c DcmPrivateTagCache::DcmPrivateTagCache() + 44 (dcpcache.cc:57)
13 libCTKDICOMCore.0.1.dylib 0x0000000105f171f5 DcmPrivateTagCache::DcmPrivateTagCache() + 21 (dcpcache.cc:57)
14 libCTKDICOMCore.0.1.dylib 0x0000000105eeeafa DcmItem::DcmItem(DcmTag const&, unsigned int) + 106 (dcitem.cc:97)
15 libCTKDICOMCore.0.1.dylib 0x0000000105f0e113 DcmMetaInfo::DcmMetaInfo() + 99 (dcmetinf.cc:54)
16 libCTKDICOMCore.0.1.dylib 0x0000000105f0e0a5 DcmMetaInfo::DcmMetaInfo() + 21 (dcmetinf.cc:56)
17 libCTKDICOMCore.0.1.dylib 0x0000000105ee0266 DcmFileFormat::DcmFileFormat() + 214 (dcfilefo.cc:60)
18 libCTKDICOMCore.0.1.dylib 0x0000000105ee0185 DcmFileFormat::DcmFileFormat() + 21 (dcfilefo.cc:67)
19 libCTKDICOMCore.0.1.dylib 0x0000000105b2f6f8 ctkDICOMDataset::InitializeFromFile(QString const&, E_TransferSyntax, E_GrpLenEncoding, unsigned int, E_FileReadMode) + 56 (ctkDICOMDataset.cpp:118)
20 libCTKDICOMCore.0.1.dylib 0x0000000105b284c8 ctkDICOMDatabasePrivate::precacheTags(QString) + 168 (ctkDICOMDatabase.cpp:1061)
21 libCTKDICOMCore.0.1.dylib 0x0000000105b2314c ctkDICOMDatabasePrivate::insert(ctkDICOMDataset const&, QString const&, bool, bool) + 8556 (ctkDICOMDatabase.cpp:1243)
22 libCTKDICOMCore.0.1.dylib 0x0000000105b1d502 ctkDICOMDatabase::insert(QString const&, bool, bool, bool, QString const&) + 498 (ctkDICOMDatabase.cpp:871)
23 libCTKDICOMCore.0.1.dylib 0x0000000105b3da55 ctkDICOMIndexer::addFile(ctkDICOMDatabase&, QString, QString const&) + 357 (ctkDICOMIndexer.cpp:141)
24 libCTKDICOMCore.0.1.dylib 0x0000000105b42c33 AddFileFunctor::operator()(QString const&) + 83 (ctkDICOMIndexer.cpp:63)
25 libCTKDICOMCore.0.1.dylib 0x0000000105b402e5 QtConcurrent::FilterKernel<QStringList, AddFileFunctor, QtPrivate::PushBackWrapper>::runIterations(QList<QString>::const_iterator, int, int, void) + 181 (qtconcurrentfilterkernel.h:127)
26 libCTKDICOMCore.0.1.dylib 0x0000000105b40ef4 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::forThreadFunction() + 676 (qtconcurrentiteratekernel.h:263)
27 libCTKDICOMCore.0.1.dylib 0x0000000105b404f7 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 39 (qtconcurrentiteratekernel.h:225)
28 libCTKDICOMCore.0.1.dylib 0x0000000105b406c2 non-virtual thunk to QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 34
29 QtCore 0x00000001110acd8c QtConcurrent::ThreadEngineBase::run() + 128
30 QtCore 0x00000001110ae331 QThreadPoolThread::run() + 209
31 QtCore 0x00000001110bb39f QThreadPrivate::start(void
) + 373
32 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
33 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 15:
0 libsystem_kernel.dylib 0x00007fff900770fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff90985f89 _pthread_cond_wait + 869
2 QtCore 0x00000001110ba631 QMutexPrivate::wait(int) + 169
3 QtCore 0x00000001110b6140 QMutex::lockInternal() + 236
4 QtCore 0x00000001110b6346 QMutex::lock() + 108
5 libCTKDICOMCore.0.1.dylib 0x0000000105b2e525 QMutex::lockInline() + 21 (qmutex.h:198)
6 libCTKDICOMCore.0.1.dylib 0x0000000105b2e4e0 QMutexLocker::QMutexLocker(QMutex) + 112 (qmutex.h:110)
7 libCTKDICOMCore.0.1.dylib 0x0000000105b2bbed QMutexLocker::QMutexLocker(QMutex
) + 29 (qmutex.h:114)
8 libCTKDICOMCore.0.1.dylib 0x0000000105b21038 ctkDICOMDatabasePrivate::insert(ctkDICOMDataset const&, QString const&, bool, bool) + 88 (ctkDICOMDatabase.cpp:1089)
9 libCTKDICOMCore.0.1.dylib 0x0000000105b1d502 ctkDICOMDatabase::insert(QString const&, bool, bool, bool, QString const&) + 498 (ctkDICOMDatabase.cpp:871)
10 libCTKDICOMCore.0.1.dylib 0x0000000105b3da55 ctkDICOMIndexer::addFile(ctkDICOMDatabase&, QString, QString const&) + 357 (ctkDICOMIndexer.cpp:141)
11 libCTKDICOMCore.0.1.dylib 0x0000000105b42c33 AddFileFunctor::operator()(QString const&) + 83 (ctkDICOMIndexer.cpp:63)
12 libCTKDICOMCore.0.1.dylib 0x0000000105b402e5 QtConcurrent::FilterKernel<QStringList, AddFileFunctor, QtPrivate::PushBackWrapper>::runIterations(QList<QString>::const_iterator, int, int, void) + 181 (qtconcurrentfilterkernel.h:127)
13 libCTKDICOMCore.0.1.dylib 0x0000000105b40ef4 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::forThreadFunction() + 676 (qtconcurrentiteratekernel.h:263)
14 libCTKDICOMCore.0.1.dylib 0x0000000105b404f7 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 39 (qtconcurrentiteratekernel.h:225)
15 libCTKDICOMCore.0.1.dylib 0x0000000105b406c2 non-virtual thunk to QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 34
16 QtCore 0x00000001110acd8c QtConcurrent::ThreadEngineBase::run() + 128
17 QtCore 0x00000001110ae331 QThreadPoolThread::run() + 209
18 QtCore 0x00000001110bb39f QThreadPrivate::start(void
) + 373
19 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
20 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 16:
0 libsystem_kernel.dylib 0x00007fff900770fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff90985f89 _pthread_cond_wait + 869
2 QtCore 0x00000001110ba631 QMutexPrivate::wait(int) + 169
3 QtCore 0x00000001110b6140 QMutex::lockInternal() + 236
4 QtCore 0x00000001110b6346 QMutex::lock() + 108
5 libCTKDICOMCore.0.1.dylib 0x0000000105b2e525 QMutex::lockInline() + 21 (qmutex.h:198)
6 libCTKDICOMCore.0.1.dylib 0x0000000105b2e4e0 QMutexLocker::QMutexLocker(QMutex) + 112 (qmutex.h:110)
7 libCTKDICOMCore.0.1.dylib 0x0000000105b2bbed QMutexLocker::QMutexLocker(QMutex
) + 29 (qmutex.h:114)
8 libCTKDICOMCore.0.1.dylib 0x0000000105b21038 ctkDICOMDatabasePrivate::insert(ctkDICOMDataset const&, QString const&, bool, bool) + 88 (ctkDICOMDatabase.cpp:1089)
9 libCTKDICOMCore.0.1.dylib 0x0000000105b1d502 ctkDICOMDatabase::insert(QString const&, bool, bool, bool, QString const&) + 498 (ctkDICOMDatabase.cpp:871)
10 libCTKDICOMCore.0.1.dylib 0x0000000105b3da55 ctkDICOMIndexer::addFile(ctkDICOMDatabase&, QString, QString const&) + 357 (ctkDICOMIndexer.cpp:141)
11 libCTKDICOMCore.0.1.dylib 0x0000000105b42c33 AddFileFunctor::operator()(QString const&) + 83 (ctkDICOMIndexer.cpp:63)
12 libCTKDICOMCore.0.1.dylib 0x0000000105b402e5 QtConcurrent::FilterKernel<QStringList, AddFileFunctor, QtPrivate::PushBackWrapper>::runIterations(QList<QString>::const_iterator, int, int, void) + 181 (qtconcurrentfilterkernel.h:127)
13 libCTKDICOMCore.0.1.dylib 0x0000000105b40ef4 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::forThreadFunction() + 676 (qtconcurrentiteratekernel.h:263)
14 libCTKDICOMCore.0.1.dylib 0x0000000105b404f7 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 39 (qtconcurrentiteratekernel.h:225)
15 libCTKDICOMCore.0.1.dylib 0x0000000105b406c2 non-virtual thunk to QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 34
16 QtCore 0x00000001110acd8c QtConcurrent::ThreadEngineBase::run() + 128
17 QtCore 0x00000001110ae331 QThreadPoolThread::run() + 209
18 QtCore 0x00000001110bb39f QThreadPrivate::start(void
) + 373
19 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
20 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 17:
0 libsystem_c.dylib 0x00007fff9096eab8 memmove$VARIANT$sse42 + 240
1 QtCore 0x00000001110dae2d QListData::remove(int) + 117
2 libqsqlite.dylib 0x000000013e1e1373 QList<QSQLiteResult>::removeOne(QSQLiteResult const&) + 133
3 libqsqlite.dylib 0x000000013e1dee06 QSQLiteResult::~QSQLiteResult() + 70
4 QtSql 0x0000000111052b1b QSqlQuery::~QSqlQuery() + 63
5 libCTKDICOMCore.0.1.dylib 0x0000000105b24281 ctkDICOMDatabase::fileExistsAndUpToDate(QString const&) + 1089 (ctkDICOMDatabase.cpp:1293)
6 libCTKDICOMCore.0.1.dylib 0x0000000105b1d36c ctkDICOMDatabase::insert(QString const&, bool, bool, bool, QString const&) + 92 (ctkDICOMDatabase.cpp:855)
7 libCTKDICOMCore.0.1.dylib 0x0000000105b3da55 ctkDICOMIndexer::addFile(ctkDICOMDatabase&, QString, QString const&) + 357 (ctkDICOMIndexer.cpp:141)
8 libCTKDICOMCore.0.1.dylib 0x0000000105b42c33 AddFileFunctor::operator()(QString const&) + 83 (ctkDICOMIndexer.cpp:63)
9 libCTKDICOMCore.0.1.dylib 0x0000000105b402e5 QtConcurrent::FilterKernel<QStringList, AddFileFunctor, QtPrivate::PushBackWrapper>::runIterations(QList<QString>::const_iterator, int, int, void) + 181 (qtconcurrentfilterkernel.h:127)
10 libCTKDICOMCore.0.1.dylib 0x0000000105b40ef4 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::forThreadFunction() + 676 (qtconcurrentiteratekernel.h:263)
11 libCTKDICOMCore.0.1.dylib 0x0000000105b404f7 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 39 (qtconcurrentiteratekernel.h:225)
12 libCTKDICOMCore.0.1.dylib 0x0000000105b406c2 non-virtual thunk to QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 34
13 QtCore 0x00000001110acd8c QtConcurrent::ThreadEngineBase::run() + 128
14 QtCore 0x00000001110ae331 QThreadPoolThread::run() + 209
15 QtCore 0x00000001110bb39f QThreadPrivate::start(void
) + 373
16 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
17 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 18:
0 libsystem_kernel.dylib 0x00007fff900770fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff90985f89 _pthread_cond_wait + 869
2 QtCore 0x00000001110ba631 QMutexPrivate::wait(int) + 169
3 QtCore 0x00000001110b6140 QMutex::lockInternal() + 236
4 QtCore 0x00000001110b6346 QMutex::lock() + 108
5 libCTKDICOMCore.0.1.dylib 0x0000000105b2e525 QMutex::lockInline() + 21 (qmutex.h:198)
6 libCTKDICOMCore.0.1.dylib 0x0000000105b2e4e0 QMutexLocker::QMutexLocker(QMutex) + 112 (qmutex.h:110)
7 libCTKDICOMCore.0.1.dylib 0x0000000105b2bbed QMutexLocker::QMutexLocker(QMutex
) + 29 (qmutex.h:114)
8 libCTKDICOMCore.0.1.dylib 0x0000000105b21038 ctkDICOMDatabasePrivate::insert(ctkDICOMDataset const&, QString const&, bool, bool) + 88 (ctkDICOMDatabase.cpp:1089)
9 libCTKDICOMCore.0.1.dylib 0x0000000105b1d502 ctkDICOMDatabase::insert(QString const&, bool, bool, bool, QString const&) + 498 (ctkDICOMDatabase.cpp:871)
10 libCTKDICOMCore.0.1.dylib 0x0000000105b3da55 ctkDICOMIndexer::addFile(ctkDICOMDatabase&, QString, QString const&) + 357 (ctkDICOMIndexer.cpp:141)
11 libCTKDICOMCore.0.1.dylib 0x0000000105b42c33 AddFileFunctor::operator()(QString const&) + 83 (ctkDICOMIndexer.cpp:63)
12 libCTKDICOMCore.0.1.dylib 0x0000000105b402e5 QtConcurrent::FilterKernel<QStringList, AddFileFunctor, QtPrivate::PushBackWrapper>::runIterations(QList<QString>::const_iterator, int, int, void) + 181 (qtconcurrentfilterkernel.h:127)
13 libCTKDICOMCore.0.1.dylib 0x0000000105b40ef4 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::forThreadFunction() + 676 (qtconcurrentiteratekernel.h:263)
14 libCTKDICOMCore.0.1.dylib 0x0000000105b404f7 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 39 (qtconcurrentiteratekernel.h:225)
15 libCTKDICOMCore.0.1.dylib 0x0000000105b406c2 non-virtual thunk to QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 34
16 QtCore 0x00000001110acd8c QtConcurrent::ThreadEngineBase::run() + 128
17 QtCore 0x00000001110ae331 QThreadPoolThread::run() + 209
18 QtCore 0x00000001110bb39f QThreadPrivate::start(void
) + 373
19 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
20 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 19:
0 libsystem_kernel.dylib 0x00007fff900770fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff90985f89 _pthread_cond_wait + 869
2 QtCore 0x00000001110ba631 QMutexPrivate::wait(int) + 169
3 QtCore 0x00000001110b6140 QMutex::lockInternal() + 236
4 QtCore 0x00000001110b6346 QMutex::lock() + 108
5 libCTKDICOMCore.0.1.dylib 0x0000000105b2e525 QMutex::lockInline() + 21 (qmutex.h:198)
6 libCTKDICOMCore.0.1.dylib 0x0000000105b2e4e0 QMutexLocker::QMutexLocker(QMutex) + 112 (qmutex.h:110)
7 libCTKDICOMCore.0.1.dylib 0x0000000105b2bbed QMutexLocker::QMutexLocker(QMutex
) + 29 (qmutex.h:114)
8 libCTKDICOMCore.0.1.dylib 0x0000000105b21038 ctkDICOMDatabasePrivate::insert(ctkDICOMDataset const&, QString const&, bool, bool) + 88 (ctkDICOMDatabase.cpp:1089)
9 libCTKDICOMCore.0.1.dylib 0x0000000105b1d502 ctkDICOMDatabase::insert(QString const&, bool, bool, bool, QString const&) + 498 (ctkDICOMDatabase.cpp:871)
10 libCTKDICOMCore.0.1.dylib 0x0000000105b3da55 ctkDICOMIndexer::addFile(ctkDICOMDatabase&, QString, QString const&) + 357 (ctkDICOMIndexer.cpp:141)
11 libCTKDICOMCore.0.1.dylib 0x0000000105b42c33 AddFileFunctor::operator()(QString const&) + 83 (ctkDICOMIndexer.cpp:63)
12 libCTKDICOMCore.0.1.dylib 0x0000000105b402e5 QtConcurrent::FilterKernel<QStringList, AddFileFunctor, QtPrivate::PushBackWrapper>::runIterations(QList<QString>::const_iterator, int, int, void) + 181 (qtconcurrentfilterkernel.h:127)
13 libCTKDICOMCore.0.1.dylib 0x0000000105b40ef4 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::forThreadFunction() + 676 (qtconcurrentiteratekernel.h:263)
14 libCTKDICOMCore.0.1.dylib 0x0000000105b404f7 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 39 (qtconcurrentiteratekernel.h:225)
15 libCTKDICOMCore.0.1.dylib 0x0000000105b406c2 non-virtual thunk to QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 34
16 QtCore 0x00000001110acd8c QtConcurrent::ThreadEngineBase::run() + 128
17 QtCore 0x00000001110ae331 QThreadPoolThread::run() + 209
18 QtCore 0x00000001110bb39f QThreadPrivate::start(void
) + 373
19 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
20 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 20:
0 libsystem_kernel.dylib 0x00007fff900770fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff90985f89 _pthread_cond_wait + 869
2 QtCore 0x00000001110ba631 QMutexPrivate::wait(int) + 169
3 QtCore 0x00000001110b6140 QMutex::lockInternal() + 236
4 QtCore 0x00000001110b6346 QMutex::lock() + 108
5 libCTKDICOMCore.0.1.dylib 0x0000000105b2e525 QMutex::lockInline() + 21 (qmutex.h:198)
6 libCTKDICOMCore.0.1.dylib 0x0000000105b2e4e0 QMutexLocker::QMutexLocker(QMutex) + 112 (qmutex.h:110)
7 libCTKDICOMCore.0.1.dylib 0x0000000105b2bbed QMutexLocker::QMutexLocker(QMutex
) + 29 (qmutex.h:114)
8 libCTKDICOMCore.0.1.dylib 0x0000000105b21038 ctkDICOMDatabasePrivate::insert(ctkDICOMDataset const&, QString const&, bool, bool) + 88 (ctkDICOMDatabase.cpp:1089)
9 libCTKDICOMCore.0.1.dylib 0x0000000105b1d502 ctkDICOMDatabase::insert(QString const&, bool, bool, bool, QString const&) + 498 (ctkDICOMDatabase.cpp:871)
10 libCTKDICOMCore.0.1.dylib 0x0000000105b3da55 ctkDICOMIndexer::addFile(ctkDICOMDatabase&, QString, QString const&) + 357 (ctkDICOMIndexer.cpp:141)
11 libCTKDICOMCore.0.1.dylib 0x0000000105b42c33 AddFileFunctor::operator()(QString const&) + 83 (ctkDICOMIndexer.cpp:63)
12 libCTKDICOMCore.0.1.dylib 0x0000000105b402e5 QtConcurrent::FilterKernel<QStringList, AddFileFunctor, QtPrivate::PushBackWrapper>::runIterations(QList<QString>::const_iterator, int, int, void) + 181 (qtconcurrentfilterkernel.h:127)
13 libCTKDICOMCore.0.1.dylib 0x0000000105b40ef4 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::forThreadFunction() + 676 (qtconcurrentiteratekernel.h:263)
14 libCTKDICOMCore.0.1.dylib 0x0000000105b404f7 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 39 (qtconcurrentiteratekernel.h:225)
15 libCTKDICOMCore.0.1.dylib 0x0000000105b406c2 non-virtual thunk to QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 34
16 QtCore 0x00000001110acd8c QtConcurrent::ThreadEngineBase::run() + 128
17 QtCore 0x00000001110ae331 QThreadPoolThread::run() + 209
18 QtCore 0x00000001110bb39f QThreadPrivate::start(void
) + 373
19 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
20 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 21:
0 libsystem_kernel.dylib 0x00007fff900770fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff90985f89 _pthread_cond_wait + 869
2 QtCore 0x00000001110ba631 QMutexPrivate::wait(int) + 169
3 QtCore 0x00000001110b6140 QMutex::lockInternal() + 236
4 QtCore 0x00000001110b6346 QMutex::lock() + 108
5 libCTKDICOMCore.0.1.dylib 0x0000000105b2e525 QMutex::lockInline() + 21 (qmutex.h:198)
6 libCTKDICOMCore.0.1.dylib 0x0000000105b2e4e0 QMutexLocker::QMutexLocker(QMutex) + 112 (qmutex.h:110)
7 libCTKDICOMCore.0.1.dylib 0x0000000105b2bbed QMutexLocker::QMutexLocker(QMutex
) + 29 (qmutex.h:114)
8 libCTKDICOMCore.0.1.dylib 0x0000000105b21038 ctkDICOMDatabasePrivate::insert(ctkDICOMDataset const&, QString const&, bool, bool) + 88 (ctkDICOMDatabase.cpp:1089)
9 libCTKDICOMCore.0.1.dylib 0x0000000105b1d502 ctkDICOMDatabase::insert(QString const&, bool, bool, bool, QString const&) + 498 (ctkDICOMDatabase.cpp:871)
10 libCTKDICOMCore.0.1.dylib 0x0000000105b3da55 ctkDICOMIndexer::addFile(ctkDICOMDatabase&, QString, QString const&) + 357 (ctkDICOMIndexer.cpp:141)
11 libCTKDICOMCore.0.1.dylib 0x0000000105b42c33 AddFileFunctor::operator()(QString const&) + 83 (ctkDICOMIndexer.cpp:63)
12 libCTKDICOMCore.0.1.dylib 0x0000000105b402e5 QtConcurrent::FilterKernel<QStringList, AddFileFunctor, QtPrivate::PushBackWrapper>::runIterations(QList<QString>::const_iterator, int, int, void) + 181 (qtconcurrentfilterkernel.h:127)
13 libCTKDICOMCore.0.1.dylib 0x0000000105b40ef4 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::forThreadFunction() + 676 (qtconcurrentiteratekernel.h:263)
14 libCTKDICOMCore.0.1.dylib 0x0000000105b404f7 QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 39 (qtconcurrentiteratekernel.h:225)
15 libCTKDICOMCore.0.1.dylib 0x0000000105b406c2 non-virtual thunk to QtConcurrent::IterateKernel<QList<QString>::const_iterator, void>::threadFunction() + 34
16 QtCore 0x00000001110acd8c QtConcurrent::ThreadEngineBase::run() + 128
17 QtCore 0x00000001110ae331 QThreadPoolThread::run() + 209
18 QtCore 0x00000001110bb39f QThreadPrivate::start(void
) + 373
19 libsystem_c.dylib 0x00007fff90981742 _pthread_start + 327
20 libsystem_c.dylib 0x00007fff9096e181 thread_start + 13

Thread 14 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x0000000159c36948 rdx: 0x0000000000000000
rdi: 0x0000000000006d0b rsi: 0x0000000000000006 rbp: 0x0000000159c36970 rsp: 0x0000000159c36948
r8: 0x00007fff76f6d278 r9: 0x00000000fffffff0 r10: 0x0000000020000000 r11: 0x0000000000000206
r12: 0x00000001050c9000 r13: 0x00007fac166f5a48 r14: 0x0000000159c38000 r15: 0x0000000000000000
rip: 0x00007fff90077212 rfl: 0x0000000000000206 cr2: 0x00007fff76f66fe8
Logical CPU: 0

TagsNo tags attached.

Relationships

related to 0002839 closedpieper random double free errors in Qt 

Activities

pieper

pieper

2013-01-16 02:25

administrator   ~0007679

I am still researching the multi threaded indexer - I found that some sql accesses (inserts) are controlled by a mutex lock but some reads (selects) are outside the mutex. I will try changing this in ctk.

jcfr

jcfr

2013-01-17 11:35

administrator   ~0007700

Should we consider this issue independent of the error log model ? Or do you want me to investigate threading support of the error log model ?

pieper

pieper

2013-01-17 13:16

administrator   ~0007702

I believe that everything (this and 2839) traced back to memory corruption from the incorrect threading.

I can test with tomorrow's nightly builds, but if all looks good we could close both of these.

pieper

pieper

2013-01-18 06:24

administrator   ~0007710

Looking more carefully at the dump, it seems thread 14 is where the crash occurs, which is executing dcmtk code at the time, so the error log was not actually the issue (that's just what the main thread was doing when the crash occurred).

Since threading has been removed from the ctk indexer this issue is fixed.

pieper

pieper

2017-06-07 23:27

administrator   ~0014669

Fix committed to 2145-support-for-installing-extension-from-file branch.

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file 20ce2929

2013-01-17 15:03:58

pieper

Details Diff
BUG: avoid hangs/crashes when importing - fixes 0002839, 0002871

See CTK bug 0000292
https://github.com/commontk/CTK/issues/292

Multithreading of the indexing operation removed.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21609 3bd1e089-480b-0410-8dfb-8563597acbee
mod - SuperBuild/External_CTK.cmake Diff File

Issue History

Date Modified Username Field Change
2013-01-15 10:25 pieper New Issue
2013-01-15 10:25 pieper Status new => assigned
2013-01-15 10:25 pieper Assigned To => jcfr
2013-01-15 15:19 jcfr Priority normal => high
2013-01-15 15:19 jcfr Target Version => Slicer 4.2.3
2013-01-15 15:19 jcfr Additional Information Updated
2013-01-16 02:25 pieper Note Added: 0007679
2013-01-17 09:54 pieper Relationship added related to 0002839
2013-01-17 11:35 jcfr Note Added: 0007700
2013-01-17 13:16 pieper Note Added: 0007702
2013-01-18 06:24 pieper Note Added: 0007710
2013-01-18 06:24 pieper Status assigned => closed
2013-01-18 06:24 pieper Resolution open => fixed
2013-01-18 06:24 pieper Fixed in Version => Slicer 4.2.3
2013-02-12 09:39 jcfr Target Version Slicer 4.2.3 => Slicer 4.3.0
2013-02-12 09:40 jcfr Fixed in Version Slicer 4.2.3 => Slicer 4.3.0
2017-06-07 23:27 pieper Changeset attached => Slicer 2145-support-for-installing-extension-from-file 20ce2929
2017-06-07 23:27 pieper Note Added: 0014669
2017-06-07 23:27 pieper Assigned To jcfr => pieper