FFP 0.7 arm - Python Segmentation fault

Marvell Kirkwood based
barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: FFP 0.7 arm - Python Segmentation fault

Post by barmalej2 » Mon Jan 09, 2017 11:04 am

Don't hurry, it is not your USB fault. Actually you didn't done that I told you:
slacker -UaA br2:{bzip2,db5,expat,gdbm,gettext,libffi,ncurses,openssl,readline,sqlite,uClibc-solibs,zlib}
U is important argument. It updates slacker cache, before proceeding to install. You run without updating cache, thus slacker refused to install python package from cache because of md5sum mismatch in cache python package and repo. Both packages are identically named, but differs in size, so has different cheksums. To force install python package from repo you need to update slacker checksums files first:

Code: Select all

slacker -U
Now forget about slacker for a while and paste me output of command(if you still has no python installed):

Code: Select all

slapt-get -i -p python
It is important.

normsland
Posts: 69
Joined: Sun Mar 31, 2013 10:07 am

Re: FFP 0.7 arm - Python Segmentation fault

Post by normsland » Mon Jan 09, 2017 7:32 pm

Code: Select all

 slapt-get -i -p python
Reading Package Lists...Done
The following NEW packages will be installed:
  python
0 upgraded, 0 reinstalled, 1 newly installed, 0 to remove, 0 not upgraded.
Need to get 12.7MB of archives.
After unpacking 75.3MB of additional disk space will be used.
Do you want to continue? [y/N] 
Unfortunately still segfaults after installing.

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: FFP 0.7 arm - Python Segmentation fault

Post by barmalej2 » Mon Jan 09, 2017 8:25 pm

Can you run python itself:

Code: Select all

python
Now I am running out of ideas :roll:. You have all required libs, but something is interfering correct functioning of python.
Maybe strace can give more light:

Code: Select all

strace -o segfault.txt python SickBeard.py
One more suggestion - radical one, if you doesn't care about python modules installed. Remove python installation dir:

Code: Select all

rm -rf /ffp/lib/python2.7
Try to reinstall python package and see if that changes something.

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: FFP 0.7 arm - Python Segmentation fault

Post by MrDini » Mon Jan 09, 2017 9:41 pm

Yes, the strace Can be very informative in a lot of cases. But if it not helps, as I said, I also built a python 2.7 package, that You Can install with theese commands:

Code: Select all

slacker -rA python
wget http://users.atw.hu/mrdini/packages/testing/python-2.7.10-arm-2.txz -O /tmp/python-2.7.10-arm-2.txz
funpkg -i /tmp/python-2.7.10-arm-2.txz
rm /tmp/python-2.7.10-arm-2.txz
Please give it a try, and see if it also gives segfault (or some other error*). If yes, I Can build it with debugging symbols. So in that case, We Can see a detailed backtrace.

[*I Can see a little chance of iconv error, because I built this package with the utf-8 supporting uClibc package, which has built-in iconv support, while the 'main' uClibc hasn't... But I Can use it also now, with the latest uClibc, So think, It will works. BTW, never mind, that was just my loud thinking. :D]
Thanks nas-central the lot of help! :)

normsland
Posts: 69
Joined: Sun Mar 31, 2013 10:07 am

Re: FFP 0.7 arm - Python Segmentation fault

Post by normsland » Mon Jan 09, 2017 10:52 pm

I tried removing br2:python and rm -rf /ffp/lib/python2.7. Then reinstalling.

Code: Select all

# whereis python
python: /usr/bin/python /usr/lib/python2.6 /e-data/b02a0c3e-f652-4fad-b499-d789270f941a/ffproot/ffp/bin/python /e-data/b02a0c3e-f652-4fad-b499-d789270f941a/ffproot/ffp/bin/python2.7 /e-data/b02a0c3e-f652-4fad-b499-d789270f941a/ffproot/ffp/bin/python2.7-config
I have also run a stack trace as suggested. The dump file is here https://app.box.com/s/evi3hn3egfy7l6u3vtnsma3m8nra5u9r

The last git commit that works is https://github.com/SickRage/SickRage/co ... 9dbaa28ffb
This seems to be the commit that broke it https://github.com/SickRage/SickRage/co ... aaad7e6924
Tried MrDini's python compile but to no avail. Let me know if you have any ideas.
Last edited by normsland on Tue Jan 10, 2017 9:31 am, edited 1 time in total.

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: FFP 0.7 arm - Python Segmentation fault

Post by MrDini » Tue Jan 10, 2017 5:48 am

What do You mean with not avail?
Thanks nas-central the lot of help! :)

normsland
Posts: 69
Joined: Sun Mar 31, 2013 10:07 am

Re: FFP 0.7 arm - Python Segmentation fault

Post by normsland » Tue Jan 10, 2017 8:02 am

MrDini wrote:What do You mean with not avail?
Sorry meant no luck.

Having a look at the stack trace it looks as though the last file accessed before the segfault is SickRage/lib/pgi/clib/contextlib.py which is from the pgi package.

Pip install pgi fails too...

Code: Select all

# pip install pgi
Collecting pgi
  Downloading pgi-0.0.11.1.tar.gz (235kB)
    100% |################################| 245kB 3.8MB/s
    Complete output from command python setup.py egg_info:

    ----------------------------------------
Command "python setup.py egg_info" failed with error code -11 in /tmp/pip-build-0V0yDf/pgi/
Any ideas?

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: FFP 0.7 arm - Python Segmentation fault

Post by barmalej2 » Tue Jan 10, 2017 11:04 am

Pgi is hardcoded for glibc. Source code needs adaptation for uClibc and additional dependency gobject-introspection (or girepository-1.0):
https://git.gnome.org/browse/gobject-introspection
@Normsland. Have you set LD_LIBRARY_PATH env variable or something like that?

normsland
Posts: 69
Joined: Sun Mar 31, 2013 10:07 am

Re: FFP 0.7 arm - Python Segmentation fault

Post by normsland » Tue Jan 10, 2017 12:31 pm

Hi barmalej2

Code: Select all

echo $LD_LIBRARY_PATH

Gives me a blank line. Cannot see it set anywhere in any profile file either.

Code: Select all

#env
TERM=xterm
SHELL=/ffp/bin/sh
SSH_CLIENT=192.168.0.7 49920 22
SSH_TTY=/dev/pts/0
USER=root
MAIL=/var/mail/root
PATH=/ffp/opt/java/jre/bin:/ffp/sbin:/usr/sbin:/sbin:/ffp/bin:/usr/bin:/bin
INPUTRC=/ffp/etc/inputrc
PWD=/root
LANG=en_US
PS1=\u@\h:\w\$
PS2=>
SHLVL=1
HOME=/root
LESS=-M
LOGNAME=root
SSH_CONNECTION=192.168.0.7 49920 192.168.0.2 22
_=/ffp/bin/env

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: FFP 0.7 arm - Python Segmentation fault

Post by barmalej2 » Tue Jan 10, 2017 1:31 pm

env looks good, except PATH variable. It is old ffp bug:
PATH=/ffp/opt/java/jre/bin:/ffp/sbin:/usr/sbin:/sbin:/ffp/bin:/usr/bin:/bin
Should be like this:
PATH=/ffp/opt/java/jre/bin:/ffp/sbin:/ffp/bin:/usr/sbin:/usr/bin:/sbin:/bin
Still, I don't think this has influence for running Sickrage.

Uploaded freshly compiled pgi and gobject-introspection into testing dir of repo:
http://downloads.zyxel.nas-central.org/ ... -arm-1.txz
http://downloads.zyxel.nas-central.org/ ... -arm-1.txz
Direct dependencies of gobject-introspection:
gettext glib libffi libiconv pcre uClibc-solibs util-linux zlib

normsland
Posts: 69
Joined: Sun Mar 31, 2013 10:07 am

Re: FFP 0.7 arm - Python Segmentation fault

Post by normsland » Wed Jan 11, 2017 9:45 am

Hi barmalej2

Thanks for the compile of those libraries. I can now bodge it and it works eg

Code: Select all

mv Sickrage/lib/pgi/ pgi-old/
I am guessing if I add /lib/pgi/ to the .gitignore file, git should miss those on the upgrade.
Last edited by normsland on Wed Jan 11, 2017 1:13 pm, edited 1 time in total.

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: FFP 0.7 arm - Python Segmentation fault

Post by barmalej2 » Wed Jan 11, 2017 11:23 am

Does Sickrage runs after disabling pgi, which comes together with Sickrage?
Still I wonder to know, what the real problem was, as I can run Sickrage without any tricks. Please check, which glib package is installed now:

Code: Select all

funpkg -q glib
and

Code: Select all

funpkg -q glib2

normsland
Posts: 69
Joined: Sun Mar 31, 2013 10:07 am

Re: FFP 0.7 arm - Python Segmentation fault

Post by normsland » Wed Jan 11, 2017 7:43 pm

barmalej2 wrote:Does Sickrage runs after disabling pgi, which comes together with Sickrage?
Yes it does which is a bit strange.
barmalej2 wrote:Still I wonder to know, what the real problem was, as I can run Sickrage without any tricks.
Same here. I spent about a day and half checking and rechecking dependencies etc. It seems to work fine here on a new stick without anything else setup. I am running my NSA325 with Serviio, Crashplan, Transmission and SR (although I expect Crashplan to stop working permanently soon). So I am probably swapping memory far too much. I will carry on as is until the next time it breaks then I will go for a fresh stick from the start. Could take me a weekend to get everything configured and working again :shock:

Code: Select all

#funpkg -q glib
glib-2.50.2-arm-2
# funpkg -q glib2
No matches
Thanks for the help!

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: FFP 0.7 arm - Python Segmentation fault

Post by barmalej2 » Wed Jan 11, 2017 8:19 pm

You are welcome.
Could take me a weekend to get everything configured and working again :shock:
With new slapt-get package manager it will be much easier and faster.
For example installing serviio after fresh install:
slapt-get -u # Updates cache
slapt-get --upgrade # Upgrades core packages
slapt-get -i serviio # Installs serviio with all required dependencies.
oraclejava install # Oracle java install helper script-downloads, configures and installs java automatically. It can upgrade as well.
sh /ffp/start/serviio.sh start #Obvious
That's it. Fast and quick. I am still polishing, adapting, correcting minor mistakes in packages in my repo. slapt-get and repository will be fully ready to proceed very soon.

normsland
Posts: 69
Joined: Sun Mar 31, 2013 10:07 am

Re: FFP 0.7 arm - Python Segmentation fault

Post by normsland » Sun Jan 15, 2017 10:50 am

Definitely looks as though I will have to go for a rebuild when I have sometime. The latest SickRage upgrade (from within the app) put the lib/pgi folder back again. Doh! Oh well.

Post Reply