Bug 383086 - KDevelop crashes when both llvm3.8 and 4.0 are installed
Summary: KDevelop crashes when both llvm3.8 and 4.0 are installed
Status: RESOLVED FIXED
Alias: None
Product: neon
Classification: KDE Neon
Component: Packages User Edition (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: VHI crash
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords: drkonqi
: 383170 383223 386950 387322 388832 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-08-03 13:56 UTC by jacoposchiavon21
Modified: 2018-01-12 08:02 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jacoposchiavon21 2017-08-03 13:56:33 UTC
Application: kdevelop (5.1.1)

Qt Version: 5.7.1
Frameworks Version: 5.36.0
Operating System: Linux 4.10.0-28-generic x86_64
Distribution: Ubuntu 16.04.3 LTS

-- Information about the crash:
- What I was doing when the application crashed:
I have rebooted my pc, the only running applications were Dropbox, Plasmashell and Yakuake. I have tried to remove, purge and clean all the packages and reinstall from scratch the application, but the error still is here.

- Unusual behavior I noticed:
The application can be opened, a new file created and written. Whenever I try to save, the application crashes and closes. The same happens trying to open a file saved on the disk. The file is not currupted.

- Custom settings of the application:
Nothing worth noting: now it is completely freshly installed.

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fa2c1cca900 (LWP 7686))]

Thread 4 (Thread 0x7fa29f997700 (LWP 7705)):
#0  0x00007fa2deab670d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fa2d666e38c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fa2d666e49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa2df3d675b in QEventDispatcherGlib::processEvents (this=0x7fa2900008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007fa2df3810ba in QEventLoop::exec (this=this@entry=0x7fa29f996ca0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007fa2df1b0f64 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#6  0x00007fa2d4f6abf5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#7  0x00007fa2df1b5b48 in QThreadPrivate::start (arg=0x2510d30) at thread/qthread_unix.cpp:368
#8  0x00007fa2d8a656ba in start_thread (arg=0x7fa29f997700) at pthread_create.c:333
#9  0x00007fa2deac23dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7fa2ab9c7700 (LWP 7690)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
#1  0x00007fa2df1b6936 in QWaitConditionPrivate::wait_relative (time=1000, this=0x1d6bc30) at thread/qwaitcondition_unix.cpp:133
#2  QWaitConditionPrivate::wait (time=1000, this=0x1d6bc30) at thread/qwaitcondition_unix.cpp:141
#3  QWaitCondition::wait (this=<optimized out>, mutex=0x1d6a480, time=1000) at thread/qwaitcondition_unix.cpp:215
#4  0x00007fa2dcbf1bc8 in ?? () from /usr/lib/x86_64-linux-gnu/libKDevPlatformLanguage.so.10
#5  0x00007fa2df1b5b48 in QThreadPrivate::start (arg=0x1d6a460) at thread/qthread_unix.cpp:368
#6  0x00007fa2d8a656ba in start_thread (arg=0x7fa2ab9c7700) at pthread_create.c:333
#7  0x00007fa2deac23dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fa2bddbe700 (LWP 7689)):
#0  0x00007fa2deab670d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fa2d666e38c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fa2d666e49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa2df3d675b in QEventDispatcherGlib::processEvents (this=0x7fa2b00008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007fa2df3810ba in QEventLoop::exec (this=this@entry=0x7fa2bddbdc90, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007fa2df1b0f64 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#6  0x00007fa2e1488735 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007fa2df1b5b48 in QThreadPrivate::start (arg=0x7fa2e14fcd60) at thread/qthread_unix.cpp:368
#8  0x00007fa2d8a656ba in start_thread (arg=0x7fa2bddbe700) at pthread_create.c:333
#9  0x00007fa2deac23dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7fa2c1cca900 (LWP 7686)):
[KCrash Handler]
#6  0x00007fa2ad00a51e in llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::ScheduleDAGInstrs* (*)(llvm::MachineSchedContext*)>::OptionInfo, false>::grow(unsigned long) () at /build/llvm-toolchain-4.0-kQlgQb/llvm-toolchain-4.0-4.0/include/llvm/Support/CommandLine.h:729
#7  0x00007fa2ad00a60e in llvm::RegisterPassParser<llvm::MachineSchedRegistry>::NotifyAdd(llvm::StringRef, void* (*)(), llvm::StringRef) () at /build/llvm-toolchain-4.0-kQlgQb/llvm-toolchain-4.0-4.0/include/llvm/ADT/SmallVector.h:213
#8  0x00007fa295afcb0a in llvm::MachineSchedRegistry::MachineSchedRegistry (C=0x7fa295e70df0 <useDefaultMachineSched(llvm::MachineSchedContext*)>, D=0x7fa29711e090 "Use the target's default scheduler choice.", N=0x7fa29716fc5f "default", this=0x7fa297fda4e0 <DefaultSchedRegistry>) at /build/llvm-toolchain-3.8-_PD09B/llvm-toolchain-3.8-3.8/include/llvm/CodeGen/MachineScheduler.h:128
#9  __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /build/llvm-toolchain-3.8-_PD09B/llvm-toolchain-3.8-3.8/lib/CodeGen/MachineScheduler.cpp:214
#10 _GLOBAL__sub_I_MachineScheduler.cpp(void) () at /build/llvm-toolchain-3.8-_PD09B/llvm-toolchain-3.8-3.8/lib/CodeGen/MachineScheduler.cpp:3413
#11 0x00007fa2e13116ba in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fff00182688, env=env@entry=0x7fff00182698) at dl-init.c:72
#12 0x00007fa2e13117cb in call_init (env=0x7fff00182698, argv=0x7fff00182688, argc=1, l=<optimized out>) at dl-init.c:30
#13 _dl_init (main_map=main_map@entry=0x2ba8230, argc=1, argv=0x7fff00182688, env=0x7fff00182698) at dl-init.c:120
#14 0x00007fa2e13168e2 in dl_open_worker (a=a@entry=0x7fff00180ec0) at dl-open.c:575
#15 0x00007fa2e1311564 in _dl_catch_error (objname=objname@entry=0x7fff00180eb0, errstring=errstring@entry=0x7fff00180eb8, mallocedp=mallocedp@entry=0x7fff00180eaf, operate=operate@entry=0x7fa2e13164d0 <dl_open_worker>, args=args@entry=0x7fff00180ec0) at dl-error.c:187
#16 0x00007fa2e1315da9 in _dl_open (file=0x2d5c7c8 "/usr/lib/x86_64-linux-gnu/qt5/plugins/kdevplatform/27/kdevclangsupport.so", mode=-2147483647, caller_dlopen=0x7fa2df37f260 <QLibraryPrivate::load_sys()+1760>, nsid=-2, argc=<optimized out>, argv=<optimized out>, env=0x7fff00182698) at dl-open.c:660
#17 0x00007fa2d6935f09 in dlopen_doit (a=a@entry=0x7fff001810f0) at dlopen.c:66
#18 0x00007fa2e1311564 in _dl_catch_error (objname=0x18e4a90, errstring=0x18e4a98, mallocedp=0x18e4a88, operate=0x7fa2d6935eb0 <dlopen_doit>, args=0x7fff001810f0) at dl-error.c:187
#19 0x00007fa2d6936571 in _dlerror_run (operate=operate@entry=0x7fa2d6935eb0 <dlopen_doit>, args=args@entry=0x7fff001810f0) at dlerror.c:163
#20 0x00007fa2d6935fa1 in __dlopen (file=<optimized out>, mode=mode@entry=1) at dlopen.c:87
#21 0x00007fa2df37f260 in QLibraryPrivate::load_sys (this=0x2801cb0) at plugin/qlibrary_unix.cpp:233
#22 0x00007fa2df378695 in QLibraryPrivate::load (this=0x2801cb0) at plugin/qlibrary.cpp:538
#23 QLibraryPrivate::loadPlugin (this=0x2801cb0) at plugin/qlibrary.cpp:591
#24 0x00007fa2df36ba96 in QPluginLoader::load (this=<optimized out>) at plugin/qpluginloader.cpp:238
#25 0x00007fa2e01ae28a in KPluginLoader::load (this=0x7fff00181580) at /workspace/build/src/lib/plugin/kpluginloader.cpp:184
#26 0x00007fa2e01ae3ba in KPluginLoader::instance (this=<optimized out>) at /workspace/build/src/lib/plugin/kpluginloader.cpp:166
#27 0x00007fa2e01ae40c in KPluginLoader::factory (this=<optimized out>) at /workspace/build/src/lib/plugin/kpluginloader.cpp:111
#28 0x00007fa2e0fd6bde in KDevelop::PluginController::loadPluginInternal(QString const&) () from /usr/lib/x86_64-linux-gnu/libKDevPlatformShell.so.10
#29 0x00007fa2e0fd89ab in KDevelop::PluginController::allPluginsForExtension(QString const&, QMap<QString, QVariant> const&) () from /usr/lib/x86_64-linux-gnu/libKDevPlatformShell.so.10
#30 0x00007fa2e1018ab9 in KDevelop::LanguageController::languagesForMimetype(QString const&) () from /usr/lib/x86_64-linux-gnu/libKDevPlatformShell.so.10
#31 0x00007fa2e1019522 in KDevelop::LanguageController::languagesForUrl(QUrl const&) () from /usr/lib/x86_64-linux-gnu/libKDevPlatformShell.so.10
#32 0x00007fa2dcbc2ce3 in ?? () from /usr/lib/x86_64-linux-gnu/libKDevPlatformLanguage.so.10
#33 0x00007fa2dcbc5c81 in ?? () from /usr/lib/x86_64-linux-gnu/libKDevPlatformLanguage.so.10
#34 0x00007fa2dcbbfa04 in KDevelop::BackgroundParser::parseDocuments() () from /usr/lib/x86_64-linux-gnu/libKDevPlatformLanguage.so.10
#35 0x00007fa2df3ae1f6 in QtPrivate::QSlotObjectBase::call (a=0x7fff00181cd0, r=0x1c8c700, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#36 QMetaObject::activate (sender=sender@entry=0x1c8c800, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3723
#37 0x00007fa2df3ae837 in QMetaObject::activate (sender=sender@entry=0x1c8c800, m=m@entry=0x7fa2df5c8700 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3602
#38 0x00007fa2df426b50 in QTimer::timeout (this=this@entry=0x1c8c800) at .moc/moc_qtimer.cpp:198
#39 0x00007fa2df3ba7a8 in QTimer::timerEvent (this=0x1c8c800, e=<optimized out>) at kernel/qtimer.cpp:254
#40 0x00007fa2df3aed53 in QObject::event (this=0x1c8c800, e=<optimized out>) at kernel/qobject.cpp:1285
#41 0x00007fa2dfc61ecc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1c8c800, e=0x7fff00181ff0) at kernel/qapplication.cpp:3799
#42 0x00007fa2dfc698c6 in QApplication::notify (this=0x7fff00182430, receiver=0x1c8c800, e=0x7fff00181ff0) at kernel/qapplication.cpp:3556
#43 0x00007fa2df3830c8 in QCoreApplication::notifyInternal2 (receiver=0x1c8c800, event=event@entry=0x7fff00181ff0) at kernel/qcoreapplication.cpp:988
#44 0x00007fa2df3d568e in QCoreApplication::sendEvent (event=0x7fff00181ff0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#45 QTimerInfoList::activateTimers (this=0x193d7c0) at kernel/qtimerinfo_unix.cpp:644
#46 0x00007fa2df3d5bf9 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:182
#47 idleTimerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:229
#48 0x00007fa2d666e197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#49 0x00007fa2d666e3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#50 0x00007fa2d666e49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#51 0x00007fa2df3d673f in QEventDispatcherGlib::processEvents (this=0x1941b80, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#52 0x00007fa2df3810ba in QEventLoop::exec (this=this@entry=0x7fff00182240, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#53 0x00007fa2df3896cc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#54 0x000000000040bb96 in main (argc=1, argv=<optimized out>) at /workspace/build/app/main.cpp:763

Reported using DrKonqi
Comment 1 Sven Brauch 2017-08-03 13:58:20 UTC
You are mixing two versions of llvm (3.8 and 4.0). Do you build yourself ...?
Comment 2 jacoposchiavon21 2017-08-03 14:03:50 UTC
nope, I have installed the Neon LTS user edition distribution (https://neon.kde.org/download) and kdevelop from apt. 

Anyhow, from the apt package manager seems that both llvm are installed and updated!
Comment 3 jacoposchiavon21 2017-08-03 14:04:39 UTC
Should I try to remove the older one?
Comment 4 Sven Brauch 2017-08-03 14:07:30 UTC
Yes please try, and please also report a packaging bug to Ubuntu, this must not happen. They need to be properly seperated somehow.
Comment 5 jacoposchiavon21 2017-08-03 14:14:09 UTC
(In reply to Sven Brauch from comment #4)
> Yes please try, and please also report a packaging bug to Ubuntu, this must
> not happen. They need to be properly seperated somehow.

I have tried, and removing llvm3.8 removes also kdevelop and everything.

At the same time, pkgProblemResolver::Resolve interrupts the removing of llvm 4.0 saying that:
Broken phonon-backend-gstreamer:amd64 Dipende on libqt4-opengl [ amd64 ] < 4:4.8.7+dfsg-5ubuntu2 > ( libs ) (>= 4:4.8.1)
  Considering libqt4-opengl:amd64 9 as a solution to phonon-backend-gstreamer:amd64 1
  Holding Back phonon-backend-gstreamer:amd64 rather than change libqt4-opengl:amd64

I'm not sure of what is asking here: am I missing some package that llvm4.0 needs?
Comment 6 Sven Brauch 2017-08-03 14:16:28 UTC
Hm yeah, I guessed something like this would happen: you have two (or more) packages installed which need different versions of llvm. Still, sorry, you have to discuss this on your distribution's bugtracker -- we are the wrong people, we neither know exactly how it's supposed to work nor can we do anything about it :/
Comment 7 jacoposchiavon21 2017-08-03 14:19:48 UTC
Thank you!

At least now I have something that I can ask! I'll move to ubuntu bugtracker.

Really thank you for your time
Comment 8 Kevin Funk 2017-08-03 14:25:09 UTC
Probably related: https://bugs.kde.org/show_bug.cgi?id=383086

Or even a duplicate.
Comment 9 Kevin Funk 2017-08-03 14:25:36 UTC
Sigh. Correct link: https://bugs.kde.org/show_bug.cgi?id=373614
Comment 10 jacoposchiavon21 2017-08-03 14:32:49 UTC
yep, it appears to be similar! Is there a known way to get around?
Comment 11 Kevin Funk 2017-08-03 14:51:39 UTC
No easy fix for the KDevelop version you got via the PPA unfortunately.

You could try the AppImage from https://www.kdevelop.org/download -- but honestly I'm not exactly sure whether you'll be running into the same issue with it.

Please report back in any case.
Comment 12 jacoposchiavon21 2017-08-03 15:02:34 UTC
Now I'm trying to do. But interestingly, now a very similar crash happens with konqueror... 

The AppImage seems to work, anyhow...
Comment 13 Sven Brauch 2017-08-03 15:22:08 UTC
(In reply to Kevin Funk from comment #11)
> You could try the AppImage from https://www.kdevelop.org/download -- but
> honestly I'm not exactly sure whether you'll be running into the same issue
> with it.

Shouldn't happen (and apparently doesn't).
Comment 14 jacoposchiavon21 2017-08-05 13:53:32 UTC
Ok, for other reason I have reinstalled the OS, changing to Plasma 5.10.3 and checking that the only used LLVM was 4.0. Anyway, as soon as I install Kdevelop, it install also the 3.8 version, and then crashes as before.
Comment 15 Sven Brauch 2017-08-05 14:25:43 UTC
It would be cool if you could report this to ubuntu and post a link here as a cross-reference to keep track of what they say.
Comment 16 jacoposchiavon21 2017-08-05 14:41:58 UTC
I've posted a question here: 
https://answers.launchpad.net/ubuntu/+question/655238
Comment 17 Sven Brauch 2017-08-05 15:16:42 UTC
*** Bug 383170 has been marked as a duplicate of this bug. ***
Comment 18 Brent 2017-08-06 09:48:09 UTC
(In reply to Sven Brauch from comment #17)
> *** Bug 383170 has been marked as a duplicate of this bug. ***

For the record, I am running KDE Neon on both systems where this bug occurred. So it must be their packaging. Do I understand correctly that removing LLVM is a workaround?
Comment 19 jacoposchiavon21 2017-08-06 09:57:18 UTC
Well, with my experience you can't really remove one of the two: 3.8 comes together with Kdevelop (Kdevelop asks for clang library based on LLVM 3.8), while 4.0 is needed for other things too, I understand.

I think that the only thing we can do is hoping for the ubuntu team to repackage things, is it correct? In the meantime I advice you to give a look here: https://www.tecmint.com/best-linux-ide-editors-source-code-editors/
Comment 20 Sven Brauch 2017-08-07 08:23:49 UTC
This is a bug in neon packaging I guess, maybe you can look at it there?
Comment 21 Kevin Funk 2017-08-07 09:35:22 UTC
*** Bug 383223 has been marked as a duplicate of this bug. ***
Comment 22 Kevin Funk 2017-08-07 09:42:11 UTC
@Neon packagers: There's a bug report from Debian packagers: https://bugs.kde.org/show_bug.cgi?id=373614 -- they have a patch for LLVM which mitigates this issue.
Comment 23 Kevin Funk 2017-08-07 21:24:23 UTC
@Neon packagers, to be clear: You need this patch for the LLVM version which KDevelop is linked against: https://reviews.llvm.org/D31524

Please report back if that fixes the issue for you.
Comment 24 Harald Sitter 2017-08-08 08:21:42 UTC
Wouldn't building kdevelop with llvm4 fix the problem as well? We do not build compilers, nor do I see us starting to do that.
Comment 26 Jonathan Riddell 2017-08-11 15:10:01 UTC
new kdevelop packages entering into user and user/lts in the next hour or so are compiled with llvm 4.0.  Anyone able to test?
Comment 27 Brent 2017-08-11 16:12:22 UTC
Just updated, crash seems to be gone. Thanks!
Comment 28 Kevin Funk 2017-11-15 16:49:04 UTC
*** Bug 386950 has been marked as a duplicate of this bug. ***
Comment 29 Francis Herne 2017-11-26 18:15:24 UTC
*** Bug 387322 has been marked as a duplicate of this bug. ***
Comment 30 Kevin Funk 2018-01-12 08:02:16 UTC
*** Bug 388832 has been marked as a duplicate of this bug. ***