xinit flooding syslog

Bug #1636573 reported by targon on 2016-10-25
188
This bug affects 38 people
Affects Status Importance Assigned to Milestone
pyOpenSSL
Fix Released
Unknown
pyopenssl (Ubuntu)
Undecided
Unassigned
Yakkety
High
Unassigned

Bug Description

I am using xinit (1.3.4-3ubuntu1) to start an X11 session as follows (kodi is a media center):

/usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- :1 -nolisten tcp vt8

This used to work fine with Ubuntu 16.04, but since the upgrade to 16.10 lots of log messages are sent to syslog. They are all repetitions of the following two lines:

Oct 24 22:54:50 tiger xinit[26430]: extern "Python": function Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in the current subinterpreter. Returning 0.
Oct 24 22:54:50 tiger xinit[26430]: extern "Python": function Cryptography_rand_status() called, but @ffi.def_extern() was not called in the current subinterpreter. Returning 0.

These messages amount to >200 GB per day, so this is eating up all the disk space.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: xorg 1:7.7+13ubuntu4
ProcVersionSignature: Ubuntu 4.8.0-22.24-generic 4.8.0
Uname: Linux 4.8.0-22-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CurrentDesktop: KDE
Date: Tue Oct 25 18:41:22 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2012-01-06 (1753 days ago)
InstallationMedia: Kubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: xorg
Symptom: display
UpgradeStatus: Upgraded to yakkety on 2016-10-13 (11 days ago)

targon (me-pd9e52d26) wrote :
MoiZie (moizie) wrote :

I have this same problem, but my errors are going to my .xsession-errors file, as I'm starting kodi after logging in instead. Maybe the bug is in kodi? I'm using kodi 17 beta 4, with Ubuntu 16.04 and kodi 16.1 I did not have any problems.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg (Ubuntu):
status: New → Confirmed
MoiZie (moizie) wrote :

Updated to beta 5 from kodi, problem still occurs.

Same here. on Upgrade to Ubuntu 10.10, syslog is filling up.

WoJ (g-w) wrote :

Same here: Ubuntu 16.10, latest kodi

happydemic (happydemic) wrote :

Same problem, 16.10, Kodi 17.0-beta6

happydemic (happydemic) wrote :

This is a problem with the python-openssl package. See pyopenssl project <a href="github.com/pyca/pyopenssl/issues/542">bug report</a>.

The problem is fixed by upgrading to python-openssl 16.2.

MoiZie (moizie) wrote :

I can confirm that updating to python openssl package from Ubuntu 17.04 fixes this issue, after a couple of days running th e system the log file stays small in size.

Changed in xorg (Ubuntu):
status: Confirmed → Fix Committed
Changed in pyopenssl (Ubuntu):
status: New → Fix Committed
Jadema (jadema) wrote :

I did easy_install --upgrade PyOpenSSL but still get the problem. Confused how pip packages (PyOpenSSL) relate to apt packages (python-openssl), or the best way to override the default package available for the latter. I'm on Xubuntu 16.04.

Jadema (jadema) wrote :

Nevermind, figured it out. Ignored some warnings and did
sudo dpkg -i python-cryptography_1.7.1-2_amd64.deb
sudo dpkg -i python-openssl_16.2.0-1_all.deb
and it worked...

Michael Zanetti (mzanetti) wrote :

ran into the same on 16.04. Confirming that installing those python packages from 17.04 works and gets around the issue.

fmf (effemmeffe) wrote :

Same probelm here, can please someone describe the complete procedure to fix this, since I'm pretty n00b?

dino99 (9d9) on 2017-01-30
Changed in pyopenssl (Ubuntu):
status: Fix Committed → Confirmed
Changed in xorg (Ubuntu):
status: Fix Committed → Invalid
MoiZie (moizie) wrote :

Despite my earlier comment December 10th, this bug is occurring again as of a couple of days ago. I'll try updating to the latest openssl package again...

fmf (effemmeffe) wrote :

Same here: I finally learned how to update the two packages to the latest version as in message #11 and also upgraded PyOpenSSL with sudo easy_install --upgrade PyOpenSSL but today I got the disk completely filled by .xsessio-errors

tolostoi (tolostoi) wrote :
Download full text (4.1 KiB)

Same here,
Feb 4 08:06:56 755OTP compiz[2604]: extern "Python": function Cryptography_rand_status() called, but @ffi.def_extern() was not called in the current subinterpreter. Returning 0.
Kodi and Ubuntu 16.10

$ lsb_release -a; uname -a; grep -r ppa /etc/apt/*
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.10
Release: 16.10
Codename: yakkety
Linux 755OTP 4.8.0-37-generic #39-Ubuntu SMP Thu Jan 26 02:27:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
/etc/apt/sources.list.d/stebbins-ubuntu-handbrake-releases-wily.list.distUpgrade:# deb http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu xenial main # забранен при надграждане до xenial
/etc/apt/sources.list.d/stebbins-ubuntu-handbrake-releases-wily.list.distUpgrade:# deb-src http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu wily main
/etc/apt/sources.list.d/stebbins-ubuntu-handbrake-releases-wily.list:# deb http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu xenial main # забранен при надграждане до xenial
/etc/apt/sources.list.d/stebbins-ubuntu-handbrake-releases-wily.list:# deb-src http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu wily main
/etc/apt/sources.list.d/graphics-drivers-ubuntu-ppa-yakkety.list:deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu yakkety main
/etc/apt/sources.list.d/graphics-drivers-ubuntu-ppa-yakkety.list:# deb-src http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu yakkety main
/etc/apt/sources.list.d/team-xbmc-ubuntu-ppa-xenial.list.distUpgrade:# deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu xenial main
/etc/apt/sources.list.d/team-xbmc-ubuntu-ppa-wily.list:# deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu wily main
/etc/apt/sources.list.d/stebbins-ubuntu-handbrake-releases-wily.list.save:# deb http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu xenial main # забранен при надграждане до xenial
/etc/apt/sources.list.d/stebbins-ubuntu-handbrake-releases-wily.list.save:# deb-src http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu wily main
/etc/apt/sources.list.d/team-xbmc-ubuntu-ppa-wily.list.distUpgrade:# deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu wily main
/etc/apt/sources.list.d/graphics-drivers-ubuntu-ppa-yakkety.list.save:deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu yakkety main
/etc/apt/sources.list.d/graphics-drivers-ubuntu-ppa-yakkety.list.save:# deb-src http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu yakkety main
/etc/apt/sources.list.d/team-xbmc-ubuntu-ppa-vivid.list.distUpgrade:# deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu yakkety main # забранен при надграждане до wily забранен при надграждане до xenial забранен при надграждане до yakkety
/etc/apt/sources.list.d/team-xbmc-ubuntu-ppa-vivid.list.distUpgrade:# deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu vivid main
/etc/apt/sources.list.d/team-xbmc-ubuntu-ppa-wily.list.save:# deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu wily main
/etc/apt/sources.list.d/team-xbmc-ubuntu-ppa-vivid.list:deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu yakkety main # забранен при надграждане до wily забранен при надграждане до xenial забранен при надграждане до yakkety
/etc/a...

Read more...

bachtobach (madalex) wrote :

How can I upgrade the packages mentioned here? When I try I get this:

sudo dpkg -i python-cryptography_1.7.1-2_amd64.deb
dpkg: regarding python-cryptography_1.7.1-2_amd64.deb containing python-cryptography:
 python-cryptography breaks python-openssl (<< 16.0.0)
  python-openssl (version 0.15.1-2build1) is present and installed.

dpkg: error processing archive python-cryptography_1.7.1-2_amd64.deb (--install):
 installing python-cryptography would break python-openssl, and
 deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:
 python-cryptography_1.7.1-2_amd64.deb

sudo dpkg -i python-openssl_16.2.0-1_all.deb
(Reading database ... 185075 files and directories currently installed.)
Preparing to unpack python-openssl_16.2.0-1_all.deb ...
Unpacking python-openssl (16.2.0-1) over (0.15.1-2build1) ...
dpkg: dependency problems prevent configuration of python-openssl:
 python-openssl depends on python-cryptography (>= 1.3.4); however:
  Version of python-cryptography on system is 1.2.3-1ubuntu0.1.

dpkg: error processing package python-openssl (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-openssl

Evgeny (nestor05) wrote :

I have the same problem & don't know what to do.
Linux Mint 18.1
Kodi version: 2:17.0~git20170210.1529-final-0xenial

Trying to get in third-party repo. Kodi's flooding into file /var/log/syslog >30gb of two strings:
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.

MoiZie (moizie) wrote :

Finally just updated to Ubuntu 17.04 beta 1 to get rid of this problem...

Robie Basak (racb) wrote :

Upstream pyopenssl consider this fixed in 16.2.0, which is in Zesty, so marking Fix Released. 16.10 has 16.1.0, so the problem still exists in Yakkety. To fix this in Yakkety, it may be sufficient to cherry-pick https://github.com/pyca/pyopenssl/pull/552/commits/a84a52ceeb8deb602515ebf76d3de3ec0e24ba56. See https://wiki.ubuntu.com/StableReleaseUpdates#Procedure for the process.

Changed in pyopenssl (Ubuntu):
status: Confirmed → Fix Released
Changed in pyopenssl (Ubuntu Yakkety):
status: New → Triaged
importance: Undecided → High
Changed in xorg (Ubuntu Yakkety):
status: New → Invalid
Changed in pyopenssl:
status: Unknown → Fix Released
Rahul Borkar (rahulaborkar) wrote :

Hi

The Unity7.log is flooded with messages and is taking my entire disk space.

"extern "Python": function Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in the current subinterpreter. Returning 0."

My system is Ubuntu 16.04
Kodi 16.1 version
python-openssl: 0.15.1-2build1 (http://gb.archive.ubuntu.com/ubuntu xenial/main amd64 Packages)

Please help.

Thanks
Rahul

Rahul Borkar (rahulaborkar) wrote :

Tried option mentioned in #11 but seems it has left broken packages.

When I try to fix the broken packages it is trying to remove all below packages, but these are required ex. letsencrypt is required for my Apache SSL certificates.

Please help!!!!

sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  augeas-lenses libaugeas0 python-augeas python-cffi-backend
  python-configargparse python-configobj python-cryptography python-dialog
  python-enum34 python-funcsigs python-idna python-ipaddress python-mock
  python-parsedatetime python-pbr python-psutil python-pyasn1 python-pyicu
  python-requests python-rfc3339 python-tz python-urllib3
  python-zope.component python-zope.event python-zope.hookable
  python-zope.interface
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
  letsencrypt python-acme python-letsencrypt python-letsencrypt-apache
  python-ndg-httpsclient python-openssl
0 to upgrade, 0 to newly install, 6 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 1,639 kB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

Changed in pyopenssl (Ubuntu Yakkety):
status: Triaged → Fix Released
Dominik Psenner (dpsenner) wrote :

I'm on 16.04 too and this issue nags me on a daily basis. Is the fix going to be backported to the LTS?

Mark (1aunchpad-nct) wrote :

The log flooding (in my case ~/.cache/upstart/Unity7.log) is a *secondary* problem. The primary problem is the breakage in Python ssl & crypto that causes several things to not work in Kodi and is reflected in the error messages.

Does pyopenssl 16.2 fix the primary issue?

Mark (1aunchpad-nct) wrote :

I am currently running Ubuntu 16.04, python-openssl 0.15.1-2build1, python-cryptography 1.2.3-1ubuntu0.1 and Kodi 17.3.

The problem was initially introduced by a regular software update (by Software Updater). I found some instructions that I followed, not those here, which involved installing or reinstalling python stuff. After this Kodi started working properly again and the log spamming stopped. However a subsequent software update a few days ago has undone the fix. Things are broken again. The versions above are what I currently have.

So I say that python-openssl 0.16.2, if that is genuinely the fix, needs to be backported to 16.04 LTS.

I am strongly considering a distribution upgrade to fix this. It will be the second time recently I have been forced into a distribution upgrade by a regular software update breaking my system. Something is not right in Ubuntu's quality control.

Dominik Psenner (dpsenner) wrote :

So here I am, back after two months. Now this issue crashes kodi plugins. Is the backport to the lts planned?

finn (finn-uni-bremen) wrote :

Why is this still not fixed in 16.04.3?

Dominik Psenner (dpsenner) wrote :

I have the impression that there is no maintainer subscribed to this issue.

Timo Aaltonen (tjaalton) on 2017-09-02
no longer affects: xorg (Ubuntu)
no longer affects: xorg (Ubuntu Yakkety)
Dominik Psenner (dpsenner) wrote :

Does this mean that the fix has been backported to 16.04 lts?

Mike (mikebw) wrote :

On 16.04 LTS xenial, manually downloading and installing

http://archive.ubuntu.com/ubuntu/pool/main/p/pyopenssl/python-openssl_16.1.0-1_all.deb
http://archive.ubuntu.com/ubuntu/pool/main/p/python-cryptography/python-cryptography_1.7.1-2_amd64.deb

solved this problem for me. Because each package breaks the version of the other installed by default on 16.04 LTS xenial, the two packages must be installed _together_ with an override:

sudo dpkg -i --force-breaks python-cryptography_1.7.1-2_amd64.deb python-openssl_16.1.0-1_all.deb

In my case, I also needed to install the standard "python-setuptools" package from the standard distribution repository, after which manual configuration was necessary:

sudo dpkg --configure --force-breaks python-cryptography python-openssl

Bortnyák Roland (antivirtel) wrote :

Thank you Mike, it was fixed for me.

Davias (davias) wrote :

Thanks Mike, following your step I was able to use the YouTube plugin 5.4.5 again on My Ubuntu 16.04.3 LTS AMD64. I first had to install standard "python-setuptools" package, then proceeded with the above steps.

Thank you!!! I was getting mad...very bad that you have to do such patch on a LTS install, BTW...

Donk (donkmann) wrote :

Same problem here, just installed Ubuntu 16.04.3 + Kodi and immediately ran into this (flooding of syslog in my case, 10 GB per minute).

You need to backport this fix. Ubuntu + python can't be very uncommon combo... and not Ubuntu + Kodi either..

Download full text (3.1 KiB)

Do a clean install (NOT AN UPGRADE) of Mint 19 - that fixes the problem for
Kodi. Mint 18.3 is using is based on an older Ubuntu. The clean install
is not much harder than an upgrade, and gives a better result. BUT, using
a live CD or USB to do some testing of Mint 19 on your hardware to make
sure that it is fully compatible, before doing the install. Having a
separate partition for you /home folders also makes a clean install much
easier.

RoyG

On Sat, 10 Nov 2018 at 18:15, anewguy <email address hidden> wrote:

> I just ran into this same problem with Linux Mint when I went from
> version 18 to version 18.3. I see it uses a lot of things from Ubuntu
> Zenial. I tried the download links in Mike's post above from 2017 but
> the links have expired or something else as they no longer work. I know
> Mint is different from Ubuntu but I know it is also based on Ubuntu, so
> I hope it was ok to post here. Looking for help getting this to work.
> Kodi issues an error about current crypto being 1.2.3 but needing 1.7.
> I does look like i have the 1.2.3 package installed. I don't know how
> to get the 2 packages Mike mentioned above. I am also an idiot at most
> of this but hoping I can do what's needed to fix this.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1636573
>
> Title:
> xinit flooding syslog
>
> Status in pyOpenSSL:
> Fix Released
> Status in pyopenssl package in Ubuntu:
> Fix Released
> Status in pyopenssl source package in Yakkety:
> Fix Released
>
> Bug description:
> I am using xinit (1.3.4-3ubuntu1) to start an X11 session as follows
> (kodi is a media center):
>
> /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-
> standalone -- :1 -nolisten tcp vt8
>
> This used to work fine with Ubuntu 16.04, but since the upgrade to
> 16.10 lots of log messages are sent to syslog. They are all
> repetitions of the following two lines:
>
> Oct 24 22:54:50 tiger xinit[26430]: extern "Python": function
> Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in
> the current subinterpreter. Returning 0.
> Oct 24 22:54:50 tiger xinit[26430]: extern "Python": function
> Cryptography_rand_status() called, but @ffi.def_extern() was not called in
> the current subinterpreter. Returning 0.
>
> These messages amount to >200 GB per day, so this is eating up all the
> disk space.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 16.10
> Package: xorg 1:7.7+13ubuntu4
> ProcVersionSignature: Ubuntu 4.8.0-22.24-generic 4.8.0
> Uname: Linux 4.8.0-22-generic x86_64
> NonfreeKernelModules: nvidia_uvm nvidia
> ApportVersion: 2.20.3-0ubuntu8
> Architecture: amd64
> CurrentDesktop: KDE
> Date: Tue Oct 25 18:41:22 2016
> EcryptfsInUse: Yes
> InstallationDate: Installed on 2012-01-06 (1753 days ago)
> InstallationMedia: Kubuntu 11.10 "Oneiric Ocelot" - Release amd64
> (20111012)
> SourcePackage: xorg
> Symptom: display
> UpgradeStatus: Upgraded to yakkety on 2016-10-13 (11 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pyopenssl/+bug/1636...

Read more...

anewguy (anewguy) wrote :

I just ran into this same problem with Linux Mint when I went from version 18 to version 18.3. I see it uses a lot of things from Ubuntu Zenial. I tried the download links in Mike's post above from 2017 but the links have expired or something else as they no longer work. I know Mint is different from Ubuntu but I know it is also based on Ubuntu, so I hope it was ok to post here. Looking for help getting this to work. Kodi issues an error about current crypto being 1.2.3 but needing 1.7. I does look like i have the 1.2.3 package installed. I don't know how to get the 2 packages Mike mentioned above. I am also an idiot at most of this but hoping I can do what's needed to fix this.

Roy Gilby (roy-gilbys) wrote :

[ANEWGUY] Upgrade to Mint 19 - problem solved, as it includes the newer version of Python Cypto

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.