Bug 378111

Summary: Fix error source for a program abort [PythonInitializer::PythonInitializer]
Product: [Developer tools] kdev-python Reporter: Markus Elfring <Markus.Elfring>
Component: Language supportAssignee: Sven Brauch <mail>
Status: RESOLVED DOWNSTREAM    
Severity: crash CC: lbeltrame, mail
Priority: NOR    
Version First Reported In: 5.1.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Backtrace for a program abort while opening a Linux make project

Description Markus Elfring 2017-03-26 16:28:29 UTC
Created attachment 104746 [details]
Backtrace for a program abort while opening a Linux make project

I would like to reopen a make-based project for a Linux directory with the application “KDevelop 5.1.0-24.2”. The program needs a while to present a bit of desired project data until it aborts shortly thereafter.
Comment 1 Kevin Funk 2017-03-27 08:04:03 UTC
Crash in kdev-python.

Pasting relevant stack trace inline:

Thread 9 (Thread 0x7f8e3189e700 (LWP 1148)):
[KCrash Handler]
#6  0x00007f8e804baff0 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#7  0x00007f8e804bc6ea in __GI_abort () at abort.c:78
#8  0x00007f8e4587568f in PyModule_GetWarningsModule () at /usr/lib64/libpython3.6m.so.1.0
#9  0x00007f8e45874e8c in  () at /usr/lib64/libpython3.6m.so.1.0
#10 0x00007f8e459b7d4b in _Py_InitializeEx_Private () at /usr/lib64/libpython3.6m.so.1.0
#11 0x00007f8e45d2e7fa in Python::(anonymous namespace)::PythonInitializer::PythonInitializer (pyInitLock=..., this=<synthetic pointer>) at /usr/src/debug/kdev-python-5.1.0/parser/astbuilder.cpp:547
#12 0x00007f8e45d2e7fa in Python::AstBuilder::parse(QUrl const&, QString&) (this=this@entry=0x7f8e3189d0e0, filename=..., contents=...) at /usr/src/debug/kdev-python-5.1.0/parser/astbuilder.cpp:576
#13 0x00007f8e45d27c7d in Python::ParseSession::parse() (this=0x7f8e28004cf0) at /usr/src/debug/kdev-python-5.1.0/parser/parsesession.cpp:76
#14 0x00007f8e3258639f in Python::ParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) (this=0x3f75320) at /usr/src/debug/kdev-python-5.1.0/pythonparsejob.cpp:157
#15 0x00007f8e752df18a in ThreadWeaver::IdDecorator::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) () at /usr/lib64/libKF5ThreadWeaver.so.5
#16 0x00007f8e752df798 in ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () at /usr/lib64/libKF5ThreadWeaver.so.5
#17 0x00007f8e752de2e0 in ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () at /usr/lib64/libKF5ThreadWeaver.so.5
#18 0x00007f8e752dddf0 in ThreadWeaver::Thread::run() () at /usr/lib64/libKF5ThreadWeaver.so.5
#19 0x00007f8e80c614c8 in QThreadPrivate::start(void*) (arg=0x8352c40) at thread/qthread_unix.cpp:368
#20 0x00007f8e7a0b1537 in start_thread (arg=0x7f8e3189e700) at pthread_create.c:456
#21 0x00007f8e8057304f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
Comment 2 Francis Herne 2017-03-27 09:13:07 UTC
Since this is OpenSUSE, I assume the Python version is 3.4.5. Can you confirm that?

Possibly I missed something in returning py3.4 support...
Comment 3 Francis Herne 2017-03-27 09:14:28 UTC
No, that's obviously stupid, it says `/usr/lib64/libpython3.6m.so.1.0` right there in the backtrace...

Can you describe exactly which OpenSUSE version you're using and where the RPM came from? I thought the whole point was that they didn't have py3.6 yet.
Comment 4 Francis Herne 2017-03-27 09:16:26 UTC
Looks similar to https://bugs.kde.org/show_bug.cgi?id=376717
Comment 5 Markus Elfring 2017-03-27 10:35:26 UTC
(In reply to Francis Herne from comment #3)

The installed software “libpython 3.6.0-1.1” was provided by the distribution “openSUSE Tumbleweed”.
https://build.opensuse.org/package/view_file/openSUSE:Factory/python3-base/python3-base.spec?expand=1
Comment 6 Luca Beltrame 2017-03-27 13:26:24 UTC
(In reply to Markus Elfring from comment #5)

> https://build.opensuse.org/package/view_file/openSUSE:Factory/python3-base/
> python3-base.spec?expand=1

How did you install KDevelop? 5.1 is not in Tumbleweed yet. If you used the KDE:Extra repository, that combination is not supported and may break in cases like this.
Comment 7 Markus Elfring 2017-03-27 14:35:52 UTC
(In reply to Luca Beltrame from comment #6)

I dared to use also the installation source “KDE:Extra”. I am unsure which software dependency might be broken here.
Comment 8 Luca Beltrame 2017-03-27 14:47:38 UTC
Ideally, please wait until 5.1 has entered Tumbleweed. You may want to check if your dependencies are all right with "zypper ve". For further issues, please file a bug at bugzilla.opensuse.org.

For now I'll close this report as it's a distro-specific issue.
Comment 9 Markus Elfring 2017-03-27 14:52:02 UTC
(In reply to Luca Beltrame from comment #8)

Was I a bit too impatient in further progress for this software development tool?
Comment 10 Francis Herne 2017-03-27 14:55:41 UTC
The previous, very similar, bug mentioned above was caused by a mismatch with the Python library version used in the OpenSUSE packaging.

You're using untested packages that haven't been officially released, so this is probably the same.

Please wait a few days/weeks for an official OpenSUSE package of 5.1, or try the appimage from https://www.kdevelop.org/download .
Comment 11 Luca Beltrame 2017-03-27 15:03:10 UTC
(In reply to Markus Elfring from comment #9)
> (In reply to Luca Beltrame from comment #8)
> 
> Was I a bit too impatient in further progress for this software development
> tool?

File a bug report at bugzilla.opensuse.org, which is the right place for these issues: that said, I don't see this with the git version from KDE:Unstable:Extra (don't try this, ever) and TW, so it might just be a temporary hiccup.
Comment 12 Sven Brauch 2017-03-27 15:26:15 UTC
You can just use the AppImage we provide meanwhile.
Comment 13 Markus Elfring 2017-03-27 15:30:10 UTC
(In reply to Sven Brauch from comment #12)

Now I am trying this software package format out also a bit more.
Comment 14 Markus Elfring 2017-03-31 08:17:58 UTC
(In reply to Luca Beltrame from comment #11)

I have installed the version “KDevelop 5.1.0-24.3” together with some other updates from the available installation sources. This software combination seems to work also as expected for my “special test” (similar to the provided “AppImage”).
Is there a need to express dependencies in more detail for Python components?
Comment 15 Luca Beltrame 2017-03-31 08:56:15 UTC
(In reply to Markus Elfring from comment #14)

> Is there a need to express dependencies in more detail for Python components?

Normally no, the packaging and build system is usually smart enough to figure them.