Ubuntu 16.04: Zope instance terminated by SIGSEGV (core dumped)

Brand new installation of Plone 5.0.4 in brand new Ubuntu 16.04 DigitalOcean VM; Python 2.7.11+ installed.

I see these messages on supervisord.log:

2016-04-29 14:41:07,832 INFO exited: instance (terminated by SIGSEGV (core dumped); not expected)
2016-04-29 14:41:08,837 INFO spawned: 'instance' with pid 2826
2016-04-29 14:41:38,880 INFO success: instance entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
2016-04-29 14:43:05,445 INFO exited: instance (terminated by SIGSEGV (core dumped); not expected)
2016-04-29 14:43:06,449 INFO spawned: 'instance' with pid 2848
2016-04-29 14:43:36,495 INFO success: instance entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)

I installed using Buildout and OS dependencies were installed using the following command:

apt install -y build-essential libssl-dev libxml2-dev libxslt1-dev libbz2-dev zlib1g-dev python-setuptools python-dev python-virtualenv libjpeg62-dev libreadline-gplv2-dev python-imaging wv poppler-utils git

I had some problems at the beginning compiling lxml because of memory restrictions.

Any hints?

I've had similar issues on my local laptop, with a brand new Ubuntu 16.04. I'm getting the feeling it's related to something in the new kernel. There's no traceback running bin/instance fg, Plone just unceremoniously quits.

i had this too on a VM running a fresh 16.04 - I just downgraded and all was fine. I had to defer to look for the cause because we were late anyway.

Alec and I were also having trouble with segfaults on Ubuntu 16.04. Alec rebuilt Python from scratch rather than using the system Python, and that seemed to fix the problem. So I suspect an issue with the patches applied to Ubuntu's python package rather than a kernel issue.

Ubuntu 16.04 does not include python2.7 out of the box anymore.

From the Release Notes:

Python2 is not installed anymore by default on the server, cloud and the touch images, long live Python3! Python3 itself has been upgraded to the 3.5 series.

If you have your own programs based on Python 2, fear not! Python 2 will continue to be available (as the python package) for the foreseeable future. However, to best support future versions of Ubuntu you should consider porting your code to Python 3. Python/3 has some advice and resources on this.

One thing what people experienced when they install python2.7 is:

It is possible to install python 2.7 using apt-get install python2.7 but this will only give you a /usr/bin/python2.7, no /usr/bin/python nor /usr/bin/python2...

Zope 2.7 had a check for the right major and minor version number of the Python running. I would be surprised if it would not have that nowadays. I doubt that Zope would start up with Python 3.

the release notes must be wrong: Python 2.7.11+ is installed by default in Ubuntu 16.04, at least in DigitalOcean droplets.

what about using buildout.python? does that change something on installing the build dependencies?

can the installers team come with an updated documentation on this new release?

I have experienced this issue as well, when I upgraded from 15.10 to 16.04 LTS. To temporarily workaround this issue I compiled a local python 2.7 and ran the buildout without any issues. I followed these steps on SO (you probably need to tweak some version numbers here and there).

I just did a test build on a fresh ubuntu 16.04 image in kvm

root:
apt update
apt upgrade -y
apt install python2.7 python2.7-dev
apt install install python-setuptools build-essential libssl-dev libxml2-dev libxslt1-dev libbz2-dev libjpeg62-dev
apt install python-setuptools python-dev build-essential libssl-dev libxml2-dev libxslt1-dev libbz2-dev libjpeg62-dev
apt install git libreadline-dev wv poppler-utils

user:
wget --no-check-certificate https://launchpad.net/plone/5.0/5.0.4/+download/Plone-5.0.4-UnifiedInstaller.tgz
tar -xf Plone-5.0.4-UnifiedInstaller.tgz
cd Plone-5.0.4-UnifiedInstaller
./install.sh --password=admin standalone

buildout is running and everything looks good ....

however if I start I get

svx@ubuntu:~/Plone/zinstance$ ./bin/plonectl fg
instance: 2016-05-02 16:14:42 INFO ZServer HTTP server started at Mon May 2 16:14:42 2016
Hostname: 0.0.0.0
Port: 8080
2016-05-02 16:14:44 WARNING ZODB.FileStorage Ignoring index for /home/svx/Plone/zinstance/var/filestorage/Data.fs
2016-05-02 16:14:46 INFO Plone OpenID system packages not installed, OpenID support not available
2016-05-02 16:14:48 INFO Zope Ready to handle requests
2016-05-02 16:14:52 INFO plone.app.theming.policy local cache invalidated on thread 140356257408768
2016-05-02 16:14:52 INFO plone.app.theming.policy initializing local cache on thread 140356257408768 for http://192.168.122.112:8080/Plone::barceloneta
2016-05-02 16:14:54 INFO plone.app.theming.policy local cache invalidated on thread 140356175787776
2016-05-02 16:14:54 INFO plone.app.theming.policy initializing local cache on thread 140356175787776 for http://192.168.122.112:8080/Plone::barceloneta

and plone stops.

For me this looks like something different it is no SIGSEGV

new machine, new luck, same error: I can confirm this and it happens all the time. Plone runs for a short time until it dies, like create Plone site works, then some add contents and then it dies.

More playing here on a new machine too and I have it running now.

First I tried the system python2.7 packages again, this went again exactly like yesterday and like @jensens had, too.
You can create a site and five clicks later it dies, checking /var/log:

kernel: [ 1534.593855] python2.7[16192]: segfault at 7f08155b7378 ip 00007f08155b7378 sp 00007f08174c26d8 error 15

Next try, tell UI-Installer to build python, too

Everything works and it keeps running, yeah

The difference I noticed, not sure if that has impact, Ubuntu 16.04 uses a newer version of python 2.7.11-1 UI-Installer uses 2.7.10.

It looks like that python2.7 for Ubuntu 16.04 is currently in kind of a bad state, seeing all the posts online ...

So yeah, I guess for the moment it is down to build your own python, or stay with 14.04 and hope the situation will get better or use another OS, if you want/can.

BTW, the UI-Installer can do it for you too, works like a charm ! Thanks to @smcmahon for this !!!

1 Like

confirmed with a fully loaded site. Borks out using built-in python on 16.04, works lovely with compiled python (used 2.7.11 in this case)

1 Like

@smcmahon would it an idea to investigate if we can safely upgrade the UI-Installer to 2.7.11 ?

I also tried on a droplet now. Had to install python2.7 manually. Strangely enough Plone 5.0.4 installed with minimal buildout does work. I created a plone site, clicked around and it worked.

@do3cc I think Python 2.7 was installed as a dependency when I installed the rest of the development packages.

@rodfersou you told me you can find the module that is causing the error, right? I think we must spend some time to report this to Ubuntu or it will take more time to be solved.

Environment: Ubuntu 16.04 + Plone 5.0.4 (both zeo and standalone run into the same issue)
Issue: After adding a new page, revisiting the page link will crash the instance.
See this video for reference:

Anything needs to be fixed before we can avoid such issue on Ubuntu 16.04?

Note: it works well when I try Plone 5.0.4 zeo on Ubuntu 14.04.

Hi!
We had this issue more than a month ago, when we were evaluating Plone 5.
One of my co-worker traced it to the system Python, in this case
a Debian Stretch python 2.7.11+.
(the 'plus' should mean 'get away')
It was easy to solve, just change apt sources and install the jessie version (2.7.9).
No more problems then!

I don't know how changing the apt sources to a previous release could be considered a solution; this could be a workaround with lots of unintended consequences waiting to happen.

don't do that; compile a new Python as recommended above or wait for a real patch.

1 Like

educate yourself and be nice: http://askubuntu.com/a/445496

resuming: Ubuntu 16.04 expects Python 2.7.11 which is a bug fix for release 2.7.9; using an old version could reintroduce bugs on the OS level or in some of the components used on a given server. you can't guarantee that's not going to happen and that's why unintended consequences are, in first place, unintended.

Python used in Zope/Plone must be a different one from the system Python anyway and that's why a new Python installation is also a work around for this. installing from scratch leaves you depending on manual updates every time a new version is available; while using system Python to create a virtualenv simplifies maintenance.

so the only viable solution, IMO, is reporting the bug and wait for the fix.

1 Like

This https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes repository helped me several times on any debian based system to get Python up and running.

Plone Foundation Code of Conduct