Fails to start when python-path contains multiple path components separated by a colon

Bug #1601848 reported by Graham Clinch
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fedora
Won't Fix
Undecided
mod-wsgi (Debian)
New
Unknown
mod-wsgi (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Given a configuration of:
WSGIDaemonProcess X user=user group=group threads=10 python path=/opt/redirect:/opt/landing:/opt/admin

apache's error log contains:

[Mon Jul 11 15:48:45.005148 2016] [mpm_event:notice] [pid 1654:tid 140660516243328] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/3.5.1+ configured -- resuming normal operations
[Mon Jul 11 15:48:45.005423 2016] [core:notice] [pid 1654:tid 140660516243328] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 11 15:48:45.082878 2016] [wsgi:error] [pid 1657:tid 140660516243328] mod_wsgi (pid=1657): Call to 'site.addsitedir()' failed for '(null)', stopping.
[Mon Jul 11 15:48:45.083149 2016] [wsgi:error] [pid 1657:tid 140660516243328] mod_wsgi (pid=1657): Call to 'site.addsitedir()' failed for '/opt/landing:/opt/admin'.

This is a known issue and has been fixed upstream: https://github.com/GrahamDumpleton/mod_wsgi/commit/1abae882b904a39de6756f18a94363676208c3ff

This is a regression from 14.04.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: libapache2-mod-wsgi-py3 4.3.0-1.1build1
ProcVersionSignature: Ubuntu 4.4.0-28.47-generic 4.4.13
Uname: Linux 4.4.0-28-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Mon Jul 11 15:50:14 2016
SourcePackage: mod-wsgi
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Richard (richard-redhat-bugs) wrote :

Description of problem:

When multiple directories are specified in python-path, mod_wsgi will fail to start

Version-Release number of selected component (if applicable):
python3-3.5.1-7.fc24.x86_64
python3-mod_wsgi-4.4.8-4.fc24.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Create mod_wsgi app
2. WSGIDaemonProcess example.com python-path=/srv/httpd/django/lib1:/srv/httpd/django/lib2 processes=2 threads=15 user=example group=example
3.

Actual results:
mod_wsgi (pid=5175): Call to 'site.addsitedir()' failed for '(null)', stopping.
mod_wsgi (pid=5175): Call to 'site.addsitedir()' failed for '/srv/httpd/django/lib2'

Expected results:
App loads normally

Additional info:
Upstream issue:
https://github.com/GrahamDumpleton/mod_wsgi/issues/92

Workaround: use single directory in python-path=

## app.wsgi
import site
site.addsitedir('/srv/httpd/django/lib2') in app.wsgi

Revision history for this message
In , Richard (richard-redhat-bugs) wrote :

From upstream:
Fix released with 4.4.15. Report if still issues.

Revision history for this message
In , Richard (richard-redhat-bugs) wrote :

This breaks F23 to F24 dnf system upgrades if the user has running wsgi apps.

Revision history for this message
Graham Clinch (g-clinch) wrote :
Changed in mod-wsgi (Debian):
status: Unknown → New
Revision history for this message
Erik B. Andersen (erik-b-andersen+azendale) wrote :

See https://github.com/GrahamDumpleton/mod_wsgi/issues/92#issuecomment-222310331, in some cases this can be worked around by using the python-home option with one of the paths

Changed in mod-wsgi (Ubuntu):
status: New → Confirmed
Changed in mod-wsgi (Ubuntu):
importance: Undecided → High
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Changed in fedora:
importance: Unknown → Undecided
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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