python Segmentation fault [Solved]

Discussions Regarding Software

Moderator: Moderators

python Segmentation fault [Solved]

Postby tigerstr » Fri Feb 10, 2017 1:06

I noticed after one of the last Sabayon updates that Openshot would not start. I'm running KDE Plasma. Here is the error message:

Code: Select all
[email protected] ~ $ openshot-qt
Loaded modules from installed directory: /usr/lib64/python3.4/site-packages/openshot_qt
Segmentation fault
[email protected] ~ $ python --version
Python 2.7.12
[email protected] ~ $ su
Password:
mypc gene # eselect python list
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.4
mypc gene # eselect python set 2
mypc gene # exit
exit
[email protected] ~ $ python --version
Python 3.4.5
[email protected] ~ $ openshot-qt
Loaded modules from installed directory: /usr/lib64/python3.4/site-packages/openshot_qt
Segmentation fault


I tried this both in python 2.7 as well as 3.4. But since it is trying to load python3.4 modules, I figured it would be better to run python 3.4.

Since I had not done a complete reinstall of Sabayon in a while, I downloaded the 16.11 Sabayon KDE, installed it, and updated to the latest packages. Even after all of that I still get the same Segmentation fault error when I try to run openshot-qt. hp-toolbox from hplip also gives me a segfault:

Code: Select all
 
[email protected] ~ $ hp-toolbox

HP Linux Imaging and Printing System (ver. 3.16.11)
HP Device Manager ver. 15.0

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Segmentation fault


How do I get python to stop giving me segfaults?

Thanks, George.
Last edited by tigerstr on Fri Feb 17, 2017 3:59, edited 1 time in total.
tigerstr
Baby Hen
 
Posts: 3
Joined: Fri Feb 10, 2017 0:52

Re: python Segmentation fault

Postby tigerstr » Sat Feb 11, 2017 6:12

I tried a few things.

First, I reinstalled hplip from portage. That did not help. Second, I installed the 3.5 version of python from portage (so now I have python 2.7, 3.4, and 3.5 installed). I used eselect to switch amongst the three python versions. That, too, did not help.

But I did notice that the hp-toolbox script specifically uses python 2.7 and that openshot-qt specifically uses python 3.4 no matter what the default python version. When I tried to change the 2.7 to 3.4 in the hp-toolbox script, then it crapped out on some module it could not find to import. Similar problem when I tried to change the 3.4 in the openshot-qt script to 3.5.

I still get segfaults from both openshot-qt (3.4) and hp-toolbox (2.7). I'll see if I can try to get the modules for the other python versions to see if either of those versions might work. I'm not a python developer, so I don't know how much the different versions change in the language itself. I would hope that the newer versions are backwards compatible, but I do not know that. I may also try to reinstall openshot from portage to see if that resolves this issue.

Still trying to figure this out...
tigerstr
Baby Hen
 
Posts: 3
Joined: Fri Feb 10, 2017 0:52

Re: python Segmentation fault

Postby Stupot » Sun Feb 12, 2017 19:03

I'm seeing the same thing on my box (I don't use any of this, but I figured I would confirm if your problem is just you or not). python 3.x does have non-backwards compatible changes.

This is the relevant entry I see in /var/log/messages
Feb 12 12:08:48 sabayon kernel: python2.7[18812]: segfault at 10000a074 ip 00007f9af461af8a sp 00007fffaac72c28 error 4 in libc-2.21.so[7f9af4594000+1a6000]


So it looks like it's crashing in libc somewhere.
Stupot
Sagely Hen
 
Posts: 1575
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: python Segmentation fault

Postby tigerstr » Fri Feb 17, 2017 3:59

Thanks for the response. I got an update the other day which seemed to resolve the hp-toolbox problem. That update was
dev-python/PyQt5-5.7.1

I think that is what resolved the hp-toolbox python segmentation fault.

As for openshot segfaulting, I discovered a few things. First, I installed the older version (1.xx) of openshot. That ran fine. Then, again, after getting the dev-python/PyQt5-5.7.1 update, the 2.xx version of openshot no longer showed the segfault. It now runs farther but eventually hangs on some cache message. I will try removing openshot's user directory to see if that makes any difference.

But one thing I learned by failing is that these packages which specify which version of python they use really, really do not work when run with different versions of the python interpreter. Maybe they would have worked had I known how to put all of their needed modules into the correct version directories, etc., or something like that. Even recompiling hplip with a different python version USE flag did not seem to work. But again, I am not a python developer, so for me as an end user it seemed better just to go back to whatever python version had been hard coded in the app scripts themselves.

So for now at least the segfault issues seem to be gone. Thanks.
tigerstr
Baby Hen
 
Posts: 3
Joined: Fri Feb 10, 2017 0:52

Re: python Segmentation fault [Solved]

Postby Stupot » Sat Feb 18, 2017 23:16

Sure. Sorry I wasn't of more help.

Also, just so you know, you don't actually compile python in the traditional sense. It's an interpreted language (aka scripting language) so you actually run the source code directly. That's not to say that the install flags don't fiddle with the source code you're installing, it's possible they do. But it's highly unlikely that changing an install USE flag will be able to nicely switch python versions. It would take a lot of development work to keep a python application be able to run on multiple versions of python with very little gain.
Stupot
Sagely Hen
 
Posts: 1575
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA


Return to Software in General

Who is online

Users browsing this forum: No registered users and 1 guest