Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
Qt Creator 4.15.1
-
None
-
gcc 11.1.1
Description
To reproduce:
1. Load Creator project into Creator.
2. Modify src/plugins/diffeditor/CMakeLists.txt by inserting a space on the end and save changes (so, effectively you just "touch" the file).
3. Close Creator. It crashed with various messages, like: "corrupted double-linked list" or "malloc_consolidate(): unaligned fastbin chunk detected". The same happens if you switch session instead of closing Creator.
Call stack for "corrupted double-linked list":
Thread 1 (Thread 0x7fdfc90a1380 (LWP 176153)): #0 0x00007fdfcc681292 in raise () from /lib64/libc.so.6 #1 0x00007fdfcc66a8a4 in abort () from /lib64/libc.so.6 #2 0x00007fdfcc6c3cd7 in __libc_message () from /lib64/libc.so.6 #3 0x00007fdfcc6cb95c in malloc_printerr () from /lib64/libc.so.6 #4 0x00007fdfcc6cc83c in unlink_chunk.constprop () from /lib64/libc.so.6 #5 0x00007fdfcc6cc9e0 in malloc_consolidate () from /lib64/libc.so.6 #6 0x00007fdfcc6cd210 in _int_free () from /lib64/libc.so.6 #7 0x00007fdfcc6d0a58 in free () from /lib64/libc.so.6 #8 0x00007fdfa42fed0b in QList<CMakeProjectManager::CMakeBuildTarget>::node_destruct (this=0x36cd190, from=0x373a170, to=0x373a1f0) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qlist.h:524 #9 0x00007fdfa42fa9f5 in QList<CMakeProjectManager::CMakeBuildTarget>::dealloc (this=0x36cd190, data=0x373a160) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qlist.h:921 #10 0x00007fdfa42f7a40 in QList<CMakeProjectManager::CMakeBuildTarget>::~QList (this=0x36cd190, __in_chrg=<optimized out>) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qlist.h:874 #11 0x00007fdfa42e7034 in CMakeProjectManager::Internal::CMakeBuildSystem::~CMakeBuildSystem (this=0x36cd0c0, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp:217 #12 0x00007fdfa42e70b4 in CMakeProjectManager::Internal::CMakeBuildSystem::~CMakeBuildSystem (this=0x36cd0c0, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp:217 #13 0x00007fdfa42cca54 in CMakeProjectManager::CMakeBuildConfiguration::~CMakeBuildConfiguration (this=0x3e85240, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp:1000 #14 0x00007fdfa42ccade in CMakeProjectManager::CMakeBuildConfiguration::~CMakeBuildConfiguration (this=0x3e85240, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp:1001 #15 0x00007fdfb0fc196a in qDeleteAll<QList<ProjectExplorer::BuildConfiguration*>::const_iterator> (begin=..., end=...) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qalgorithms.h:320 #16 0x00007fdfb0fc08c3 in qDeleteAll<QList<ProjectExplorer::BuildConfiguration*> > (c=...) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qalgorithms.h:328 #17 0x00007fdfb0fb7a9e in ProjectExplorer::Target::~Target (this=0x35f0790, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/projectexplorer/target.cpp:209 #18 0x00007fdfb0fb7b0e in ProjectExplorer::Target::~Target (this=0x35f0790, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/projectexplorer/target.cpp:212 #19 0x00007fdfb0eaffb8 in std::default_delete<ProjectExplorer::Target>::operator() (this=0x4bfc310, __ptr=0x35f0790) at /usr/include/c++/11/bits/unique_ptr.h:85 #20 0x00007fdfb0ead8ba in std::unique_ptr<ProjectExplorer::Target, std::default_delete<ProjectExplorer::Target> >::~unique_ptr (this=0x4bfc310, __in_chrg=<optimized out>) at /usr/include/c++/11/bits/unique_ptr.h:361 #21 0x00007fdfb0eb4fe7 in std::_Destroy<std::unique_ptr<ProjectExplorer::Target, std::default_delete<ProjectExplorer::Target> > > (__pointer=0x4bfc310) at /usr/include/c++/11/bits/stl_construct.h:140 #22 0x00007fdfb0eb3d45 in std::_Destroy_aux<false>::__destroy<std::unique_ptr<ProjectExplorer::Target, std::default_delete<ProjectExplorer::Target> >*> (__first=0x4bfc310, __last=0x4bfc330) at /usr/include/c++/11/bits/stl_construct.h:152 #23 0x00007fdfb0eb1ff9 in std::_Destroy<std::unique_ptr<ProjectExplorer::Target, std::default_delete<ProjectExplorer::Target> >*> (__first=0x4bfc310, __last=0x4bfc330) at /usr/include/c++/11/bits/stl_construct.h:185 #24 0x00007fdfb0eaf6c1 in std::_Destroy<std::unique_ptr<ProjectExplorer::Target, std::default_delete<ProjectExplorer::Target> >*, std::unique_ptr<ProjectExplorer::Target, std::default_delete<ProjectExplorer::Target> > > (__first=0x4bfc310, __last=0x4bfc330) at /usr/include/c++/11/bits/alloc_traits.h:746 #25 0x00007fdfb0eacf63 in std::vector<std::unique_ptr<ProjectExplorer::Target, std::default_delete<ProjectExplorer::Target> >, std::allocator<std::unique_ptr<ProjectExplorer::Target, std::default_delete<ProjectExplorer::Target> > > >::~vector (this=0x3642e30, __in_chrg=<optimized out>) at /usr/include/c++/11/bits/stl_vector.h:680 #26 0x00007fdfb0ea3acc in ProjectExplorer::ProjectPrivate::~ProjectPrivate (this=0x3642dd0, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/projectexplorer/project.cpp:219 #27 0x00007fdfb0ea3dc6 in ProjectExplorer::Project::~Project (this=0x380d880, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/projectexplorer/project.cpp:237 #28 0x00007fdfa43460ee in CMakeProjectManager::CMakeProject::~CMakeProject (this=0x380d880, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/cmakeprojectmanager/cmakeproject.cpp:73 #29 0x00007fdfa434610a in CMakeProjectManager::CMakeProject::~CMakeProject (this=0x380d880, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/cmakeprojectmanager/cmakeproject.cpp:73 #30 0x00007fdfb0fa3d32 in qDeleteAll<QList<ProjectExplorer::Project*>::const_iterator> (begin=..., end=...) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qalgorithms.h:320 #31 0x00007fdfb0fa2d33 in qDeleteAll<QList<ProjectExplorer::Project*> > (c=...) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qalgorithms.h:328 #32 0x00007fdfb0f9c127 in ProjectExplorer::SessionManager::removeProjects (remove=...) at /home/jarek/dev/creator-master/src/plugins/projectexplorer/session.cpp:756 #33 0x00007fdfb0f9aac7 in ProjectExplorer::SessionManager::closeAllProjects () at /home/jarek/dev/creator-master/src/plugins/projectexplorer/session.cpp:560 #34 0x00007fdfb0ecd44f in ProjectExplorer::ProjectExplorerPlugin::aboutToShutdown (this=0x1d8ec30) at /home/jarek/dev/creator-master/src/plugins/projectexplorer/projectexplorer.cpp:2128 #35 0x00007fdfceb44fa0 in ExtensionSystem::Internal::PluginSpecPrivate::stop (this=0x1d56b90) at /home/jarek/dev/creator-master/src/libs/extensionsystem/pluginspec.cpp:1114 #36 0x00007fdfceb27e62 in ExtensionSystem::Internal::PluginManagerPrivate::loadPlugin (this=0x1cb0c50, spec=0x1d44c80, destState=ExtensionSystem::PluginSpec::Stopped) at /home/jarek/dev/creator-master/src/libs/extensionsystem/pluginmanager.cpp:1634 #37 0x00007fdfceb24240 in ExtensionSystem::Internal::PluginManagerPrivate::stopAll (this=0x1cb0c50) at /home/jarek/dev/creator-master/src/libs/extensionsystem/pluginmanager.cpp:1053 #38 0x00007fdfceb2635b in ExtensionSystem::Internal::PluginManagerPrivate::shutdown (this=0x1cb0c50) at /home/jarek/dev/creator-master/src/libs/extensionsystem/pluginmanager.cpp:1390 #39 0x00007fdfceb203c9 in ExtensionSystem::PluginManager::shutdown () at /home/jarek/dev/creator-master/src/libs/extensionsystem/pluginmanager.cpp:409 #40 0x00000000004171e1 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (*)()>::call(void (*&)(), void**) (f=@0x7fff716cb9d8: 0x7fdfceb203b6 <ExtensionSystem::PluginManager::shutdown()>, arg=0x7fff716cbc00) at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qobjectdefs_impl.h:146 #41 0x0000000000416c11 in QtPrivate::FunctionPointer<void (*)()>::call<QtPrivate::List<>, void>(void (*)(), void*, void**) (f=0x7fdfceb203b6 <ExtensionSystem::PluginManager::shutdown()>, arg=0x7fff716cbc00) at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qobjectdefs_impl.h:209 #42 0x00000000004161dc in QtPrivate::QStaticSlotObject<void (*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x32ca4c0, r=0x7fff716cbe30, a=0x7fff716cbc00, ret=0x0) at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qobject_impl.h:90 #43 0x00007fdfccef3bc9 in QtPrivate::QSlotObjectBase::call (this=0x32ca4c0, r=0x7fff716cbe30, a=0x7fff716cbc00) at ../../include/QtCore/../../../../qt-515/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398 #44 0x00007fdfccf332b2 in doActivate<false> (sender=0x7fff716cbe60, signal_index=3, argv=0x7fff716cbc00) at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qobject.cpp:3886 #45 0x00007fdfccf2cca9 in QMetaObject::activate (sender=0x7fff716cbe60, m=0x7fdfcd2d2c40 <QCoreApplication::staticMetaObject>, local_signal_index=0, argv=0x7fff716cbc00) at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qobject.cpp:3946 #46 0x00007fdfccee7035 in QCoreApplication::aboutToQuit (this=0x7fff716cbe60, _t1=...) at .moc/moc_qcoreapplication.cpp:254 #47 0x00007fdfccee2f3d in QCoreApplicationPrivate::execCleanup (this=0x196a0c0) at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qcoreapplication.cpp:1395 #48 0x00007fdfccee2eb8 in QCoreApplication::exec () at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qcoreapplication.cpp:1379 #49 0x00007fdfcd682938 in QGuiApplication::exec () at /home/jarek/dev/qt-515/qtbase/src/gui/kernel/qguiapplication.cpp:1867 #50 0x00007fdfcdf6e98f in QApplication::exec () at /home/jarek/dev/qt-515/qtbase/src/widgets/kernel/qapplication.cpp:2829 #51 0x000000000040eaa7 in main (argc=1, argv=0x7fff716cc778) at /home/jarek/dev/creator-master/src/app/main.cpp:817
Call stack for "malloc_consolidate(): unaligned fastbin chunk detected":
Thread 1 (Thread 0x7fec253f7380 (LWP 187875)): #0 0x00007fec289d7292 in raise () from /lib64/libc.so.6 #1 0x00007fec289c08a4 in abort () from /lib64/libc.so.6 #2 0x00007fec28a19cd7 in __libc_message () from /lib64/libc.so.6 #3 0x00007fec28a2195c in malloc_printerr () from /lib64/libc.so.6 #4 0x00007fec28a229fc in malloc_consolidate () from /lib64/libc.so.6 #5 0x00007fec28a23210 in _int_free () from /lib64/libc.so.6 #6 0x00007fec28a26a58 in free () from /lib64/libc.so.6 #7 0x00007fec28fde961 in QArrayData::deallocate (data=0x7febc938aee0, objectSize=8, alignment=8) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qarraydata.cpp:267 #8 0x00007fec00646b2f in QTypedArrayData<QVector<ProjectExplorer::FolderNode::LocationInfo> >::deallocate (data=0x7febc938aee0) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qarraydata.h:239 #9 0x00007fec0064208f in QVector<QVector<ProjectExplorer::FolderNode::LocationInfo> >::freeData (this=0x44d9128, x=0x7febc938aee0) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qvector.h:579 #10 0x00007fec0063ed5a in QVector<QVector<ProjectExplorer::FolderNode::LocationInfo> >::~QVector (this=0x44d9128, __in_chrg=<optimized out>) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qvector.h:73 #11 0x00007fec0063cb56 in CMakeProjectManager::CMakeBuildTarget::~CMakeBuildTarget (this=0x44d90a0, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/cmakeprojectmanager/cmakebuildtarget.h:50 #12 0x00007fec00644cfe in QList<CMakeProjectManager::CMakeBuildTarget>::node_destruct (this=0x3f387d0, from=0x7fec10008500, to=0x7fec10009d90) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qlist.h:524 #13 0x00007fec006409f5 in QList<CMakeProjectManager::CMakeBuildTarget>::dealloc (this=0x3f387d0, data=0x7fec100084f0) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qlist.h:921 #14 0x00007fec0063da40 in QList<CMakeProjectManager::CMakeBuildTarget>::~QList (this=0x3f387d0, __in_chrg=<optimized out>) at /home/jarek/dev/qt-515/qtbase/src/corelib/tools/qlist.h:874 #15 0x00007fec0062d034 in CMakeProjectManager::Internal::CMakeBuildSystem::~CMakeBuildSystem (this=0x3f38700, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp:217 #16 0x00007fec0062d0b4 in [cut here, as the rest of the stack is the same]
Call stack for "tcache_thread_shutdown(): unaligned tcache chunk detected":
Thread 2 (Thread 0x7f5afb856380 (LWP 32688)): #0 0x00007f5aff405427 in std::__atomic_base<QMutexData*>::compare_exchange_strong (__m2=std::memory_order_acquire, __m1=std::memory_order_acquire, __p2=0x1, __p1=@0x7ffeea4661a0: 0x0, this=0x7f5affa8eeb0 <_q_ObjectMutexPool+304>) at /usr/include/c++/11/bits/atomic_base.h:880 #1 std::atomic<QMutexData*>::compare_exchange_strong (this=0x7f5affa8eeb0 <_q_ObjectMutexPool+304>, __p1=@0x7ffeea4661a0: 0x0, __p2=0x1, __m1=std::memory_order_acquire, __m2=std::memory_order_acquire) at /usr/include/c++/11/atomic:616 #2 0x00007f5aff40407c in QAtomicOps<QMutexData*>::testAndSetAcquire<QMutexData*> (_q_value=..., expectedValue=0x0, newValue=0x1, currentValue=0x0) at ../../include/QtCore/../../../../qt-515/qtbase/src/corelib/thread/qatomic_cxx11.h:308 #3 0x00007f5aff40316b in QBasicAtomicPointer<QMutexData>::testAndSetAcquire (this=0x7f5affa8eeb0 <_q_ObjectMutexPool+304>, expectedValue=0x0, newValue=0x1) at ../../include/QtCore/../../../../qt-515/qtbase/src/corelib/thread/qbasicatomic.h:264 #4 0x00007f5aff402ab8 in QBasicMutex::fastTryLock (this=0x7f5affa8eeb0 <_q_ObjectMutexPool+304>) at ../../include/QtCore/../../../../qt-515/qtbase/src/corelib/thread/qmutex.h:103 #5 0x00007f5aff6e57de in QBasicMutex::tryLock (this=0x7f5affa8eeb0 <_q_ObjectMutexPool+304>) at ../../include/QtCore/../../../../qt-515/qtbase/src/corelib/thread/qmutex.h:92 #6 0x00007f5aff6e58b4 in QOrderedMutexLocker::relock (mtx1=0x7f5affa8ef90 <_q_ObjectMutexPool+528>, mtx2=0x7f5affa8eeb0 <_q_ObjectMutexPool+304>) at ../../include/QtCore/5.15.6/QtCore/private/../../../../../../../qt-515/qtbase/src/corelib/thread/qorderedmutexlocker_p.h:109 #7 0x00007f5aff6daa7a in QObject::~QObject (this=0x1cc1340, __in_chrg=<optimized out>) at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qobject.cpp:1044 #8 0x00007f5ad9acb80a in ProjectExplorer::ProjectExplorerPluginPrivate::~ProjectExplorerPluginPrivate (this=0x1cc1340, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/projectexplorer/projectexplorer.cpp:399 #9 0x00007f5ad9acb826 in ProjectExplorer::ProjectExplorerPluginPrivate::~ProjectExplorerPluginPrivate (this=0x1cc1340, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/projectexplorer/projectexplorer.cpp:399 #10 0x00007f5ad9a89820 in ProjectExplorer::ProjectExplorerPlugin::~ProjectExplorerPlugin (this=0x19a47e0, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/projectexplorer/projectexplorer.cpp:695 #11 0x00007f5ad9a8985e in ProjectExplorer::ProjectExplorerPlugin::~ProjectExplorerPlugin (this=0x19a47e0, __in_chrg=<optimized out>) at /home/jarek/dev/creator-master/src/plugins/projectexplorer/projectexplorer.cpp:702 #12 0x00007f5b012d6fe1 in ExtensionSystem::Internal::PluginSpecPrivate::kill (this=0x1968200) at /home/jarek/dev/creator-master/src/libs/extensionsystem/pluginspec.cpp:1124 #13 0x00007f5b012b9abf in ExtensionSystem::Internal::PluginManagerPrivate::loadPlugin (this=0x18b6c90, spec=0x19562f0, destState=ExtensionSystem::PluginSpec::Deleted) at /home/jarek/dev/creator-master/src/libs/extensionsystem/pluginmanager.cpp:1601 #14 0x00007f5b012b62ab in operator() (__closure=0x7ffeea466550, spec=0x19562f0) at /home/jarek/dev/creator-master/src/libs/extensionsystem/pluginmanager.cpp:1062 #15 0x00007f5b012bbd56 in Utils::reverseForeach<QVector<ExtensionSystem::PluginSpec*>, ExtensionSystem::Internal::PluginManagerPrivate::deleteAll()::<lambda(ExtensionSystem::PluginSpec*)> >(const QVector<ExtensionSystem::PluginSpec*> &, const struct {...} &) (c=..., operation=...) at /home/jarek/dev/creator-master/src/libs/utils/algorithm.h:1041 #16 0x00007f5b012b62e9 in ExtensionSystem::Internal::PluginManagerPrivate::deleteAll (this=0x18b6c90) at /home/jarek/dev/creator-master/src/libs/extensionsystem/pluginmanager.cpp:1061 [cut off] Thread 1 (Thread 0x7f5ac258b640 (LWP 32934)): #0 0x00007f5afee36292 in raise () from /lib64/libc.so.6 #1 0x00007f5afee1f8a4 in abort () from /lib64/libc.so.6 #2 0x00007f5afee78cd7 in __libc_message () from /lib64/libc.so.6 #3 0x00007f5afee8095c in malloc_printerr () from /lib64/libc.so.6 #4 0x00007f5afee85b7c in __malloc_arena_thread_freeres () from /lib64/libc.so.6 #5 0x00007f5afe6132bf in start_thread () from /lib64/libpthread.so.0 #6 0x00007f5afeef96a3 in clone () from /lib64/libc.so.6
Please note, that other threads are not doing anything special, seems like they are throttled (e.g. polling or waiting for condition). No Creator-specific call on any non-main thread on their stacks, just pure Qt code.
Attachments
Issue Links
- is required for
-
QTCREATORBUG-25709 Reduce crashes on exit / session switch
- Closed
For Gerrit Dashboard: QTCREATORBUG-25837 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
353246,3 | Don't leave m_rootProjectNode in moved-out state | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
353418,3 | CMakePM: Do not emit error signal in destructor while project is parsed | 4.15 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |