known reasons for crashing in libllvm while loading kdevclangsupport.so?

René J.V. Bertin rjvbertin at gmail.com
Fri Jan 8 08:36:19 UTC 2016


Hello,

I have now tried building kdevelop against 2 versions of clang (ubuntu's 3.6.0 and 3.7.1-svn253742-1~exp1, provided through LLVM's own apt repositories). In both cases loading the kdevclangsupport plugin led (leads, for 3.7.1) to a crash during the dlopen call (but not when dlopen'ing kdevclangsupport from a simple standalone wrapper to dlopen). The exact crash signature isn't identical: with clang 3.6.0 the crash happened during a memmove operation, a backtrace from 3.7.1 is below (I didn't save the 3.6 log because it looked too much like a bug in LLVM).

Are there any known reasons why that might happen? This is on Kubuntu 14.04 with Qt5 and all of KF5 installed into /opt/local , running on hardware that takes almost 2h to build kdevelop (not to mention kdevplatform...). I was hoping to have a function KDevelop5 on it if not only for reference, but this is beginning to look like a considerable road block.

Program received signal SIGSEGV, Segmentation fault.
0x00007fff8e13ba97 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
    at /tmp/buildd/llvm-toolchain-3.7-3.7.1~svn253742/build-llvm/lib/Target/AArch64/MCTargetDesc/../AArch64GenSubtargetInfo.inc:46
46      /tmp/buildd/llvm-toolchain-3.7-3.7.1~svn253742/build-llvm/lib/Target/AArch64/MCTargetDesc/../AArch64GenSubtargetInfo.inc: No such file or directory.
(gdb) bt
#0  0x00007fff8e13ba97 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
    at /tmp/buildd/llvm-toolchain-3.7-3.7.1~svn253742/build-llvm/lib/Target/AArch64/MCTargetDesc/../AArch64GenSubtargetInfo.inc:46
#1  _GLOBAL__sub_I_AArch64MCTargetDesc.cpp(void) ()
    at /tmp/buildd/llvm-toolchain-3.7-3.7.1~svn253742/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp:177
#2  0x00007ffff7dea13a in call_init (l=<optimized out>, argc=argc at entry=1, argv=argv at entry=0x7fffffffdce8, 
    env=env at entry=0x7fffffffdcf8) at dl-init.c:78
#3  0x00007ffff7dea223 in call_init (env=<optimized out>, argv=<optimized out>, argc=<optimized out>, 
    l=<optimized out>) at dl-init.c:36
#4  _dl_init (main_map=main_map at entry=0x12ef4b0, argc=1, argv=0x7fffffffdce8, env=0x7fffffffdcf8) at dl-init.c:126
#5  0x00007ffff7deec70 in dl_open_worker (a=a at entry=0x7fffffffc798) at dl-open.c:577
#6  0x00007ffff7de9ff4 in _dl_catch_error (objname=objname at entry=0x7fffffffc788, 
    errstring=errstring at entry=0x7fffffffc790, mallocedp=mallocedp at entry=0x7fffffffc780, 
    operate=operate at entry=0x7ffff7dee9a0 <dl_open_worker>, args=args at entry=0x7fffffffc798) at dl-error.c:187
#7  0x00007ffff7dee3bb in _dl_open (
    file=0x14cea68 "/opt/local/share/qt5/plugins/kdevplatform/24/kdevclangsupport.so", mode=-2147483647, 
    caller_dlopen=<optimized out>, nsid=-2, argc=1, argv=0x7fffffffdce8, env=0x7fffffffdcf8) at dl-open.c:661
#8  0x00007fffebb9f02b in dlopen_doit (a=a at entry=0x7fffffffc9b0) at dlopen.c:66
#9  0x00007ffff7de9ff4 in _dl_catch_error (objname=0x647fb0, errstring=0x647fb8, mallocedp=0x647fa8, 
    operate=0x7fffebb9efd0 <dlopen_doit>, args=0x7fffffffc9b0) at dl-error.c:187
#10 0x00007fffebb9f62d in _dlerror_run (operate=operate at entry=0x7fffebb9efd0 <dlopen_doit>, 
    args=args at entry=0x7fffffffc9b0) at dlerror.c:163
#11 0x00007fffebb9f0c1 in __dlopen (file=<optimized out>, mode=mode at entry=1) at dlopen.c:87
#12 0x00007ffff4fcc8a6 in QLibraryPrivate::load_sys (this=0xa70ed0)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/plugin/qlibrary_unix.cpp:227
#13 0x00007ffff4fc616d in load (this=0xa70ed0)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/plugin/qlibrary.cpp:534
#14 QLibraryPrivate::loadPlugin (this=0xa70ed0)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/plugin/qlibrary.cpp:582
#15 0x00007ffff4fbb50e in QPluginLoader::load (this=<optimized out>)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/plugin/qpluginloader.cpp:232
#16 0x00007ffff697434a in KPluginLoader::load (this=this at entry=0x7fffffffcdf0)
    at kf5-kcoreaddons/work/kcoreaddons-5.17.0/src/lib/plugin/kpluginloader.cpp:184
#17 0x00007ffff697444a in KPluginLoader::instance (this=this at entry=0x7fffffffcdf0)
    at kf5-kcoreaddons/work/kcoreaddons-5.17.0/src/lib/plugin/kpluginloader.cpp:166
#18 0x00007ffff6974477 in KPluginLoader::factory (this=this at entry=0x7fffffffcdf0)
    at kf5-kcoreaddons/work/kcoreaddons-5.17.0/src/lib/plugin/kpluginloader.cpp:111
#19 0x00007ffff7aeef3f in KDevelop::PluginController::loadPluginInternal(QString const&) (
    this=this at entry=0x651110, pluginId=...)
    at kf5-kdevplatform-5/shell/plugincontroller.cpp:517
#20 0x00007ffff7af42a0 in operator() (info=..., __closure=<synthetic pointer>)
    at kf5-kdevplatform-5/shell/plugincontroller.cpp:631
#21 foreachEnabledPlugin (pluginName=..., constraints=..., extension=..., func=..., this=<optimized out>)
    at kf5-kdevplatform-5/shell/plugincontroller.cpp:220
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) bt
#0  0x00007fff8e13ba97 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
    at /tmp/buildd/llvm-toolchain-3.7-3.7.1~svn253742/build-llvm/lib/Target/AArch64/MCTargetDesc/../AArch64GenSubtargetInfo.inc:46
#1  _GLOBAL__sub_I_AArch64MCTargetDesc.cpp(void) ()
    at /tmp/buildd/llvm-toolchain-3.7-3.7.1~svn253742/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp:177
#2  0x00007ffff7dea13a in call_init (l=<optimized out>, argc=argc at entry=1, argv=argv at entry=0x7fffffffdce8, 
    env=env at entry=0x7fffffffdcf8) at dl-init.c:78
#3  0x00007ffff7dea223 in call_init (env=<optimized out>, argv=<optimized out>, argc=<optimized out>, 
    l=<optimized out>) at dl-init.c:36
#4  _dl_init (main_map=main_map at entry=0x12ef4b0, argc=1, argv=0x7fffffffdce8, env=0x7fffffffdcf8) at dl-init.c:126
#5  0x00007ffff7deec70 in dl_open_worker (a=a at entry=0x7fffffffc798) at dl-open.c:577
#6  0x00007ffff7de9ff4 in _dl_catch_error (objname=objname at entry=0x7fffffffc788, 
    errstring=errstring at entry=0x7fffffffc790, mallocedp=mallocedp at entry=0x7fffffffc780, 
    operate=operate at entry=0x7ffff7dee9a0 <dl_open_worker>, args=args at entry=0x7fffffffc798) at dl-error.c:187
#7  0x00007ffff7dee3bb in _dl_open (
    file=0x14cea68 "/opt/local/share/qt5/plugins/kdevplatform/24/kdevclangsupport.so", mode=-2147483647, 
    caller_dlopen=<optimized out>, nsid=-2, argc=1, argv=0x7fffffffdce8, env=0x7fffffffdcf8) at dl-open.c:661
#8  0x00007fffebb9f02b in dlopen_doit (a=a at entry=0x7fffffffc9b0) at dlopen.c:66
#9  0x00007ffff7de9ff4 in _dl_catch_error (objname=0x647fb0, errstring=0x647fb8, mallocedp=0x647fa8, 
    operate=0x7fffebb9efd0 <dlopen_doit>, args=0x7fffffffc9b0) at dl-error.c:187
#10 0x00007fffebb9f62d in _dlerror_run (operate=operate at entry=0x7fffebb9efd0 <dlopen_doit>, 
    args=args at entry=0x7fffffffc9b0) at dlerror.c:163
#11 0x00007fffebb9f0c1 in __dlopen (file=<optimized out>, mode=mode at entry=1) at dlopen.c:87
#12 0x00007ffff4fcc8a6 in QLibraryPrivate::load_sys (this=0xa70ed0)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/plugin/qlibrary_unix.cpp:227
#13 0x00007ffff4fc616d in load (this=0xa70ed0)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/plugin/qlibrary.cpp:534
#14 QLibraryPrivate::loadPlugin (this=0xa70ed0)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/plugin/qlibrary.cpp:582
#15 0x00007ffff4fbb50e in QPluginLoader::load (this=<optimized out>)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/plugin/qpluginloader.cpp:232
#16 0x00007ffff697434a in KPluginLoader::load (this=this at entry=0x7fffffffcdf0)
    at kf5-kcoreaddons/work/kcoreaddons-5.17.0/src/lib/plugin/kpluginloader.cpp:184
#17 0x00007ffff697444a in KPluginLoader::instance (this=this at entry=0x7fffffffcdf0)
    at kf5-kcoreaddons/work/kcoreaddons-5.17.0/src/lib/plugin/kpluginloader.cpp:166
#18 0x00007ffff6974477 in KPluginLoader::factory (this=this at entry=0x7fffffffcdf0)
    at kf5-kcoreaddons/work/kcoreaddons-5.17.0/src/lib/plugin/kpluginloader.cpp:111
 
#19 0x00007ffff7aeef3f in KDevelop::PluginController::loadPluginInternal(QString const&) (
    this=this at entry=0x651110, pluginId=...)
    at kf5-kdevplatform-5/shell/plugincontroller.cpp:517
#20 0x00007ffff7af42a0 in operator() (info=..., __closure=<synthetic pointer>)
    at kf5-kdevplatform-5/shell/plugincontroller.cpp:631
#21 foreachEnabledPlugin (pluginName=..., constraints=..., extension=..., func=..., this=<optimized out>)
    at kf5-kdevplatform-5/shell/plugincontroller.cpp:220
---Type <return> to continue, or q <return> to quit---
#22 KDevelop::PluginController::allPluginsForExtension(QString const&, QMap<QString, QVariant> const&) (
    this=<optimized out>, extension=..., constraints=...)
    at kf5-kdevplatform-5/shell/plugincontroller.cpp:636
#23 0x00007ffff7b303a0 in KDevelop::LanguageController::languagesForMimetype(QString const&) (
    this=this at entry=0x1562cb0, mimetype=...)
    at kf5-kdevplatform-5/shell/languagecontroller.cpp:354
#24 0x00007ffff7b56b4f in KDevelop::LanguageController::languagesForUrl (this=0x1562cb0, url=...)
    at kf5-kdevplatform-5/shell/languagecontroller.cpp:334
#25 0x00007ffff2bec137 in createParseJob (priority=10000, notifyWhenReady=..., 
    features=VisibleDeclarationsAndContexts, url=..., this=0x1577340)
    at kf5-kdevplatform-5/language/backgroundparser/backgroundparser.cpp:264
#26 KDevelop::BackgroundParserPrivate::parseDocumentsInternal() [clone .constprop.1014] (this=0x1577340)
    at kf5-kdevplatform-5/language/backgroundparser/backgroundparser.cpp:205
#27 0x00007ffff2b30554 in KDevelop::BackgroundParser::parseDocuments (this=0x1563c40)
    at kf5-kdevplatform-5/language/backgroundparser/backgroundparser.cpp:600
#28 0x00007ffff2c3e665 in KDevelop::BackgroundParser::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
    (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
    at build/language/moc_backgroundparser.cpp:259
#29 0x00007ffff4fff731 in QObject::event (this=0x1563c40, e=<optimized out>)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qobject.cpp:1239
#30 0x00007ffff5d665ec in QApplicationPrivate::notify_helper (this=this at entry=0x641e70, 
    receiver=receiver at entry=0x1563c40, e=e at entry=0x9d1270)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/widgets/kernel/qapplication.cpp:3716
#31 0x00007ffff5d6b5a5 in QApplication::notify (this=0x7fffffffdb60, receiver=0x1563c40, e=0x9d1270)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/widgets/kernel/qapplication.cpp:3499
#32 0x00007ffff4fd10b3 in QCoreApplication::notifyInternal (this=0x7fffffffdb60, receiver=0x1563c40, 
    event=event at entry=0x9d1270)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplication.cpp:970
#33 0x00007ffff4fd33c6 in sendEvent (event=0x9d1270, receiver=<optimized out>)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplication.h:224
#34 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver at entry=0x0, event_type=0, event_type at entry=32767, 
    data=0x638250)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplication.cpp:1598
#35 0x00007ffff4fd38f2 in QCoreApplication::sendPostedEvents (receiver=receiver at entry=0x0, event_type=32767, 
    event_type at entry=0)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplication.cpp:1456
#36 0x00007ffff5023683 in postEventSourceDispatch (s=0x688e60)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:271
#37 0x00007fffed1b4e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#38 0x00007fffed1b5048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007fffed1b50ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007ffff5023a67 in QEventDispatcherGlib::processEvents (this=0x686b50, flags=...)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:418
#41 0x00007ffff4fceb1a in QEventLoop::exec (this=this at entry=0x7fffffffd990, flags=..., flags at entry=...)
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qeventloop.cpp:204
#42 0x00007ffff4fd6665 in QCoreApplication::exec ()
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplication.cpp:1234
#43 0x00007ffff55249dc in QGuiApplication::exec ()
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/gui/kernel/qguiapplication.cpp:1531
#44 0x00007ffff5d62db5 in QApplication::exec ()
    at qt-everywhere-opensource-src-5.5.1/qtbase/src/widgets/kernel/qapplication.cpp:2976
#45 0x000000000040dc92 in main (argc=1, argv=<optimized out>)
    at kf5-kdevelop-5/app/main.cpp:685



More information about the KDevelop-devel mailing list