Linux Python error when running "Clean Library"
#1
So I recently moved around a bunch of my video files from one HDD to another. After scanning the new ones, I wanted to get rid of the now deprecated old entries altogether. So I ran "Clean Library" under Media Settings.
What then happens is Kodi more or less freezes a couple of seconds into the process, while the syslog is being hammered with gigabytes of log data, until the disk runs out of space, with just these messages:

Code:
compiz[2346]: extern "Python": function Cryptography_rand_status() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.
compiz[2346]: extern "Python": function Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.
compiz[2346]: extern "Python": function Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.
compiz[2346]: extern "Python": function Cryptography_rand_status() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.
compiz[2346]: extern "Python": function Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.
compiz[2346]: extern "Python": function Cryptography_rand_status() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.

Apparently this is not exclusive to my use case, see this thread for reference

Ubuntu 16.10.
Kodi 17 RC3
Reply
#2
I'm getting the exact same issue on my Ubuntu setup as well.

After it installed a whole bunch of updates and required a restart. Once it restarted, Kodi hasn't been right since and if I try and install an add-on or run anything in Kodi, it either fails or you just see the 'busy' animation going round & round.

I thought it was maybe one of my add-ons but after eventually doing a full re-install of Kodi, it's still the same scenario.

Has there be a recent update done to Kodi in the last few days that could have possibly caused the issue?
Reply
#3
I have had this issue as well - following deleting some library entries Kodi would freeze on 'Clean Library'.

my system then fell over, as syslog became quite large ( > 40Gigs ), with several 'Cryptography' messages generated per second.

Running Kodi V16.1 on Ubuntu 16.04.1

Solved the issue by:
killing Kodi
deleting ( or moving ) the file '.kodi/userdata/guisettings.xml'

and re-booting back into Kodi

This generates a default version of the guisettings file - a few tweaks are needed within kodi to restore skin etc, but it stops syslog being hammered.
Reply
#4
I've resolved this issue by closing down Kodi and installing build-essential, libssl-dev, libffi-dev and python-dev. This is on Ubuntu 16.10 but should work even if you have earlier versions of Ubuntu and are having this issue.

sudo apt install build-essential libssl-dev libffi-dev python-dev

Then installing cryptography

pip install cryptography

Load up Kodi again and keep an eye on the syslog.

tail -f /var/log/syslog
Reply
#5
(2017-01-20, 13:02)Monstar316 Wrote: I've resolved this issue by closing down Kodi and installing build-essential, ...
Huh
I've same Problem since 2 days. Your install Tips does not help for me... Logfile is running till HD is full :-(

KODI 16.1 on Ubuntu 16.04
Best regards and thanks for help
meo
Leia | UBUNTU 19.04    | ACER V5 | intel i5 | 16GB | SSD |
Leia | Libreelec 9.0.2    | Raspberry Pi3b |
Reply
#6
Having same problem. Searched around web and fixed problem by upgrading

sudo dpkg -i python-cryptography_1.7.1-2_amd64.deb
sudo dpkg -i python-openssl_16.2.0-1_all.deb

seems to be working fine withoug flooding of errors. More information about bug at

https://bugs.launchpad.net/ubuntu/+sourc...ug/1636573
Reply
#7
I am using kodi 16.1 under Lubuntu/Cinnamon 16.10 on a Yoga 2 Pro. I was having the same problem, but after I installed
python-cryptography_1.7.1-2_amd64.deb (it was difficult to find it, but eventually I did) it seems-- so far at least-- to have solved the problem.
Thanks
Reply
#8
Update:
Tried installing as detailed by Monstar - still get the issue.

managed to find the appropriate .deb files as detailed by fojajohn - I found at:
http://ftp.br.debian.org/debian/pool/mai..._amd64.deb
and
http://ftp.uk.debian.org/debian/pool/mai...-1_all.deb

When attempting to install them I get errors saying that these versions will break lots of other things I have installed - As I am unfamiliar with how all these things hang together, this seems like too risky a route for me to travel.

I can now manually update ( & clean ) my libraries, but when the auto-update kicks in, the syslog file fills up with cryptography related messages.

If I delete my guisettings.xml, I can stop the problem from occurring ( kodi makes a new default version )

Leaving this file at its default, I don't see the issue ( now running > 24 hours )

If I change the settings from within Kodi ( and I haven't yet narrowed down exactly which changes make the difference ), then I get the issue at the next auto-update.

The main system change I made was to switch from the default confluence skin to the aon.nox skin - but there were other changes as well, so this may not be significant.

Anyone else with the issue using this skin?
Reply
#9
I've solved this problem by upgrading to latest pyOpenSSL 16.2

I did it with pip

Code:
sudo -H pip install --upgrade pyopenssl
Reply
#10
(2017-01-25, 00:27)eNORm Wrote: I've solved this problem by upgrading to latest pyOpenSSL 16.2

I did it with pip

Code:
sudo -H pip install --upgrade pyopenssl

Looks like that's fixed it for me too - many thanks
Reply
#11
I have upgaded pyopenssl as well - so far no re-occurrences.
Looking at my DNS logs from the time the issue occurred, I see thousands of accesses to 'undefined.tile.openweathermap.org' - I have also disabled my openweather add-on.

Either ( or both ) of these things may have fixed things for me - but at least it is fixed
Reply
#12
Same problem here, but it already starts when Kodi has opened. Searching for (new) thumbnails on the home screen, I can see in 'top' that some background process 'upstart' has begun, using some 60-70% cpu time, and apparently something is filling up the ~/.cache/upstart/unity7.log file like crazy with these two lines:
Quote:extern "Python": function Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in the current subinterpreter. Returning 0.
extern "Python": function Cryptography_rand_status() called, but @ffi.def_extern() was not called in the current subinterpreter. Returning 0.

Kodi also doesn't respond to the Exit command anymore, at which time I have to killall the Kodi.bin process to stop Kodi and the upstart logging. Using Kodi RC and Ubuntu 16.04.1.

Here is the current list of packages installed:
Code:
python-cryptography-doc:
  Installed: (none)
  Candidate: 1.2.3-1ubuntu0.1
  Version table:
     1.2.3-1ubuntu0.1 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
        500 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial-security/main i386 Packages
     1.2.3-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial/main i386 Packages
python-cryptography:
  Installed: 1.2.3-1ubuntu0.1
  Candidate: 1.2.3-1ubuntu0.1
  Version table:
*** 1.2.3-1ubuntu0.1 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1.2.3-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
python-crypto:
  Installed: 2.6.1-6build1
  Candidate: 2.6.1-6build1
  Version table:
*** 2.6.1-6build1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
python-cryptography-vectors:
  Installed: (none)
  Candidate: 1.2.3-1
  Version table:
     1.2.3-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial/universe i386 Packages
python-crypto-dbg:
  Installed: (none)
  Candidate: 2.6.1-6build1
  Version table:
     2.6.1-6build1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
python-crypto-doc:
  Installed: (none)
  Candidate: 2.6.1-6build1
  Version table:
     2.6.1-6build1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial/main i386 Packages
python-openssl:
  Installed: 0.15.1-2build1
  Candidate: 0.15.1-2build1
  Version table:
*** 0.15.1-2build1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status
Got a Kodi problem? Provide us with a full Debug log (wiki) || Usefull pages: First time user (wiki) || Troubleshooting (wiki) || Free content (wiki) || Forum rules (wiki) || VPN policy (wiki)
Reply
#13
I had this issue and it was solved by installing this packages, which are not yet available in the stable repositories and by installing them in this order:

http://ftp.es.debian.org/debian/pool/mai..._amd64.deb
http://ftp.br.debian.org/debian/pool/mai..._amd64.deb
http://ftp.uk.debian.org/debian/pool/mai...-1_all.deb

I also had to type in the terminal:
sudo apt-get install -f

at some point to fix an installation error, I think after installing python-cryptography_1.7.1-2 if I'm not mistaken.

After that I started Kodi from the terminal and all was fixed, no more "extern "Python": function Cryptography_rand_status() called, but @ffi.def_extern() was not called in the current subinterpreter. Returning 0" errors.
Reply
#14
Thank You! I have been having many of the same issues with my Kodi on my desktop running Ubuntu 16.04. I have un-installed, purged, re-installed serched and tried different fixes and work arounds, only to find the remedies to be temporary at best. Keeping my fingers crossed this missing piece of the puzzle will keep my Kodi working smoother for an extended period.
Code:
Since running "sudo -H pip install --upgrade pyopenssl" (without the quotation marks obviously), one of my favorite addons is working again and the power off exit is functioning normally again. Bravo! 
Reply
 
Thread Rating:
  • 1 Vote(s) - 5 Average



Logout Mark Read Team Forum Stats Members Help
Python error when running "Clean Library"51