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

@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.

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.

Why are you so insultive? He is right about the unintended consequences.
Every program on your system that was expecting Python 2.7.11+ is now running Python 2.7.9. This may have security relevant consequences.


I now managed to get it crashing too.
I tried some tricks to get a coredump, without luck. I then ran strace -f to see what happens before the crash:

19962 gettimeofday({1462779387, 327340}, NULL) = 0
19962 gettimeofday({1462779387, 327428}, NULL) = 0
19962 gettimeofday({1462779387, 327587}, NULL) = 0
19962 gettimeofday({1462779387, 328128}, NULL) = 0
19962 gettimeofday({1462779387, 328224}, NULL) = 0
19962 stat("/home/zope/bla2/eggs/plone.app.layout-2.5.19-py2.7.egg/plone/app/layout/viewlets/sections.pt", {st_mode=S_IFREG|0644, st_size=1735, ...}) = 0
19962 stat("/home/zope/bla2/eggs/plone.app.layout-2.5.19-py2.7.egg/plone/app/layout/viewlets/globalstatusmessage.pt", {st_mode=S_IFREG|0644, st_size=480, ...}) = 0
19962 stat("/home/zope/bla2/eggs/plone.app.layout-2.5.19-py2.7.egg/plone/app/layout/viewlets/path_bar.pt", {st_mode=S_IFREG|0644, st_size=1181, ...}) = 0
19962 stat("/home/zope/bla2/eggs/plone.locking-2.1.1-py2.7.egg/plone/locking/browser/info.pt", {st_mode=S_IFREG|0644, st_size=1838, ...}) = 0
19962 stat("/home/zope/bla2/eggs/plone.app.layout-2.5.19-py2.7.egg/plone/app/layout/viewlets/social_tags_body.pt", {st_mode=S_IFREG|0644, st_size=252, ...}) = 0
19962 stat("/home/zope/bla2/eggs/plone.app.layout-2.5.19-py2.7.egg/plone/app/layout/viewlets/toc.pt", {st_mode=S_IFREG|0644, st_size=336, ...}) = 0
19962 gettimeofday({1462779387, 360070}, NULL) = 0
19962 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x80} ---
19961 +++ killed by SIGSEGV +++
19962 +++ killed by SIGSEGV +++
19955 +++ killed by SIGSEGV +++
19952 <... wait4 resumed> [{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV}], 0, NULL) = 19955
19952 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=19955, si_uid=1001, si_status=SIGSEGV, si_utime=1880, si_stime=622} ---
19952 rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7fbbf38643d0}, {0x53c2a0, [], SA_RESTORER, 0x7fbbf38643d0}, 8) = 0
19952 close(12)                         = 0
19952 exit_group(-11)                   = ?
19952 +++ exited with 245 +++

This is always the same ending, toc.pt is always the last file getting stated. Unfortunately, the execption is quite generic. I won't start relearning gdb here, because I don't actually use Ubuntu myself at the moment.

nice trick @do3cc

the toc.pt file is too simple https://github.com/plone/plone.app.layout/blob/master/plone%2Fapp%2Flayout%2Fviewlets%2Ftoc.pt it just check if the viewlet is enabled and try to translate one word. not sure if the problem is there.

a breakpoint here can show if the problem is into toc.pt file..

There is now a bug open on Zope2:

I guess it makes sense to continue the discussion there.

1 Like

Will one of you file an issue with our unified installer so it can handle this case? https://github.com/plone/Installers-UnifiedInstaller

@tkimnguyen what you mean ?

The UI-Installer comes with its own python, and as mentioned in the thread already, if you tell the UI-Installer to build python everything works.

So what do you mean with filling an Issue with our UI-Installer ?

That's a small problem though because you have to know to ask it to build Python. By default it won't (it will use system Python).

@tkimnguyen OK that is true, but this still not explains why you ask to open an issue on the UI-Installer ?

This is a problem with the python-packages and according to the python.org bug tracker with certain python versions, this is not a problem with the UI-Installer.

I'm not sure if you're explicitly making a distinction between the UI-installer and the normal unified installer. It doesn't matter which installer is enhanced to detect the situation (of being on Ubuntu 16.xxx and needing to build Python instead of using the system Python)...

@tkimnguyen No I don't :slight_smile:

Hm well, I would be -1 on that, I do not want to set something like that to automatically, further will that be hopefully fixed soon at the source of the issue.

My point is that usually people know what they are doing if the choose 'build python' if we set that to default for Ubuntu 16.xx this is evil, yes its nice that they have a working plone site, but its IMHO bad in terms of security and other stuff.

If that would be the case on my machines with some software, compiling python without my permission I for sure would never use that software again :slight_smile:

Maybe we could add somewhere a huge info/warning message about this ?

A warning would be good!

Plone Foundation Code of Conduct