~/.cache/upstart/unity7.log is growing to consume the entire disk ~130GB in 7-10 hours.

If I tail the file I get:

xxxxx@xxxx-xxxxxxxx:~/.cache/upstart$ tail -f unity7.log
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.

I'm finding some commonality with Kodi.bin (v.17) but I can't tell if that is qualitative or quantitative yet. I'd appreciate any troubleshooting tips or known bugs :)

  • update: i can tie the log growth to Kodi, cross posting this to Kodi.tv forums
    – RMJ
    Feb 25 '17 at 17:38
  • What’s your question? What are you trying to achieve? Feb 11 '18 at 10:52

Manually downloading and installing python-cryptography and python-openssl from the Ubuntu package repository might be a safer alternative to adding the repository for a future distribution to your sources list.

I achieved this by downloading the appropriate packages from here and here, then installing them using dpkg:

sudo dpkg -i python-cryptography_1.7.1-2_amd64.deb
sudo dpkg -i python-openssl_16.2.0-1_all.deb
sudo apt-get -f install

Important: Read the output of the last command carefully. It threatened to remove a load of packages when I ran it, because dependencies weren't met - I initially tried to install python-openssl without python-cryptography.

Read more about manually installing packages: How do I install a .deb file via the command line?

After a reboot my Unity log file is no longer increasing in size at a rate of 10 MB per second.


Found a known bug, need to update python-openssl.

https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1636573, Will report back.

Edit: Upgrading python crypto solves the issue :)

What you can do is to install python-cryptography version 1.7.1-2 and python-openssl version 16.2.0-1 from distro Zesty (Ubuntu 17.04). What I did:

Edit /etc/apt/sources.list:


deb http://se.archive.ubuntu.com/ubuntu zesty main 
deb-src http://se.archive.ubuntu.com/ubuntu zesty main

(For Sweden, you can of course change to your country's repository, first letters after http://)

sudo aptitude update
sudo aptitude install python-cryptography=1.7.1-2

This will also upgrade python-openssl to latest version

  • Unless you're already running Zesty, I wouldn't add Zesty to sources.list. This will cause all kinds of future problems as the entire system will slowly try to upgrade itself to Zesty. Feb 26 '17 at 23:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.