libapache2-mpm-itk postinst failed

Bug #1286882 reported by Pablo V on 2014-03-02
156
This bug affects 30 people
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Medium
Unassigned
Trusty
Medium
Unassigned
mpm-itk (Debian)
Fix Released
Unknown
mpm-itk (Ubuntu)
Medium
Unassigned
Trusty
Medium
Unassigned

Bug Description

[SRU justification]
libapache2-mpm-itk is uninstallable

[Impact]
Without these fixes, the package is left in an uninstalled state and cannot be used.

[Fix]
Backport Debian fix for this issue resolved in Debian Bug: #734865

[Test Case]
Install the apache2-mpm-itk package :

$ sudo apt-get install apache2-mpm-itk
...
Setting up libapache2-mpm-itk (2.4.6-01-1) ...
dpkg: error processing package libapache2-mpm-itk (--configure):
 subprocess installed post-installation script returned error exit status 1

With the proposed fix, the packages installs correctly

[Regression]
Minimal as the fix is already used in Wily, Xenial and Debian.

[Original Description of the problem]
On Trusty(14.04) I wasn't able to install libapache2-mpm-itk until I manually changed the current apache2 configuration to use the mpm-prefork worker instead of the mpm-event worker it was using:

This is what I got before making the fix:

Setting up libapache2-mpm-itk (2.4.6-01-1) ...
dpkg: error processing package libapache2-mpm-itk (--install):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 libapache2-mpm-itk

This is the config fix I made:

# a2dismod mpm_event
# a2enmod mpm_prefork
# service apache2 restart

That change eliminated the install failure:

Installing /var/cache/apt/archives/libapache2-mpm-itk_2.4.6-01-1_amd64.deb
(Reading database ... 91772 files and directories currently installed.)
Preparing to unpack .../libapache2-mpm-itk_2.4.6-01-1_amd64.deb ...
Unpacking libapache2-mpm-itk (2.4.6-01-1) over (2.4.6-01-1) ...
Setting up libapache2-mpm-itk (2.4.6-01-1) ...
apache2_invoke: Enable module mpm_itk
 * Restarting web server apache2 [ OK ]

Launchpad Janitor (janitor) wrote :

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

Changed in mpm-itk (Ubuntu):
status: New → Confirmed
Murz (murznn) wrote :

I got the same problem, but described solution is not help:
# a2dismod mpm_event
# a2enmod mpm_prefork
# service apache2 restart

What can I try more? How I can debug package install output for understand where is the problem?

FxMulder (fxmulder) wrote :

Any idea on this? I am trying to upgrade my web servers but am unable to do so because mpm-itk won't install

Pablo V (pablinuxito) wrote :

I just want to make this workaround clear.

The commenters having problems should make sure apache2 is running with mpm-prefork worker before trying to install mpm-itk. The workaround for my servers may or may not solve the problem for you. It's just four lines at the at root command prompt. Prefix each with sudo if you are not logged in as root:

# a2dismod mpm_event
# a2enmod mpm_prefork
# service apache2 restart
# apt-get install libapache2-mpm-itk

Bert Driehuis (driehuis) wrote :

A quicker fix if you run into this issue is:

# a2dismod mpm_event
# apt-get install -f

Bert Driehuis (driehuis) wrote :

FWIW, I tried fixing this properly by modifying the mpm-itk and apache2 package sources. I ran into a brick wall: ITK has been poisoned rather well, so even if you get libapache2-mpm-itk to deconfigure the "event" MPM, Apache will then fail to start, saying that ITK has to be disabled first. Of course, I could rip out that code and/or add a check to see that ITK is freshly installed and conditionally disable that check, but the point the maintainers appear to be making is: mpm_itk is dead, use suexec instead. For that reason I stopped going down that path, because I felt any required changes would mot be accepted into Ubuntu.

My problem is that we use a meta-package to install Apache and configure it in a way we can support. That falls flat on its face and the workarounds above do not apply. I worked around is bij using this in the control file for my meta package:

Pre-depends: apache2
Depends: apache2-mpm-itk

and this in its preinst:

#!/bin/sh

if [ -h /etc/apache2/mods-enabled/mpm_event.load ]; then
 echo "Trying to disable mpm_event and enable temporarily mpm_worker."
 a2dismod mpm_event
 a2enmod mpm_prefork
fi
exit 0

This may help others who are in the same boat as we are, until Ubuntu decides ITK should be a first class citizen again or should be removed altogether. ITK has served us well, and I'd be loathe to switch back to suexec.

If I'm wrong in my assumptions, and the maintainers do not a priori reject a patch that will make installing ITK at the same time as Apache possible, then I'm willing to do the legwork.

UBUCATZ (ubucatz) wrote :

apache-mpm-itk is NOT dead, this is destructive disinfo. It is very alive and used in big environments every day.

It was last updated on 2014-03-01as you can see here http://mpm-itk.sesse.net/
The mailing list is also active.

The bug described here seems to be related to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734865

This is jsut some packaging error and should be fixed by the ubuntu maintainer.

AGAIN: apache-mpm-itk IS NOT DEAD.

I noticed Debian has recently committed this:

http://anonscm.debian.org/gitweb/?p=pkg-apache/apache2.git;a=commitdiff;h=086fe10486cbc092975e5b87aed8eb18e06433ac

The brokenness in trusty comes from the Debian apache2 install
scripts, which really went out of their way to discourage ITK. I'm
happy to see that this has been reverted in Debian.

As far as I'm concerned, this bug should be closed by pulling the
respective changes from Debian sid into trusty before 14.04.1, but I'm
not sure how I can help make that happen. Probably getting #734865
closed will help.

Hans Rakers (hrak) wrote :

@driehuis that patch does not solve the problem, it merely removes the warning from a2enmod. The problem is that the event mpm is enabled by default on Trusty and that it explicitly needs to be disabled before enabling mpm_itk.

Bert Driehuis (driehuis) wrote :

Actually, another commit in the same Debian package release removes
the breakage that made a fix impossible. When I last tried to fix
this, around may 2nd, there was no fix that did not involve removing
code from the apache2 source package that intentionally crippled
mpm-itk. I'll try to find some time tomorrow to test the current
Debian apache2 snapshot on Ubuntu and see if mpm-itk can be modified
to install cleanly in time for trusty's .1 release.

Have you ever spent two days of your time fixing a package, only to
have the upstream maintainer say, "nah, I wanted this dead, rejecting
your patch"? Been there, done that, got the t-shirt. That's why I
wanted the breakage out before I spent even one more minute on this.

Leon (leonbo) wrote :

This is a little annoying... no mod_ruid, no mpm-peruser & no mpm-itk. Is there something we as users can do?

Jeremy Chadwick (koitsu2013) wrote :

What's the status of this issue?

ls (litos) wrote :

I confirm this issue

UBUCATZ (ubucatz) wrote :

HEY, UBUNTU MAINTAINER, ARE YOU SLEEPING???

SO F* ANNOYING!!!

This is already fixed in debian so it should just be a simple backport...

victor00000 (vict1971) wrote :

deb my test
file debian/control

Depends: ${misc:Depends} , apache2-mpm-itk

install

ERROR

:(
thu.

Juerg Walz (gw42) on 2015-12-02
tags: added: trusty
Juerg Walz (gw42) wrote :

The attached patch prevents the package from enabling the mpm_itk module (during installation). It worked for me.

This appears to be the solution (workaround) used in a newer version of the package, as well.

The attachment "rules.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Tanmaya (tanmaya-8) wrote :

Is there a plan to pull the upstream changes sometime soon?

Louis Bouchard (louis) wrote :

marking it as invalid as it is fixed in Xenial

Changed in mpm-itk (Ubuntu Trusty):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Louis Bouchard (louis-bouchard)
Changed in mpm-itk (Ubuntu):
status: Confirmed → Invalid
Louis Bouchard (louis) wrote :

Bringing in apache2 so the final fix is coherent with upstream debian

Changed in apache2 (Ubuntu):
status: New → Invalid
Changed in apache2 (Ubuntu Trusty):
status: New → Confirmed
Changed in mpm-itk (Ubuntu Trusty):
status: Confirmed → In Progress
Changed in apache2 (Ubuntu Trusty):
importance: Undecided → Medium
assignee: nobody → Louis Bouchard (louis-bouchard)
importance: Medium → Low
Louis Bouchard (louis) on 2016-04-21
description: updated
tags: added: sts sts-sru
Changed in apache2 (Ubuntu Trusty):
status: Confirmed → In Progress
importance: Low → Medium
Changed in mpm-itk (Ubuntu):
status: Invalid → Fix Released
importance: Undecided → Medium
Mathew Hodson (mathew-hodson) wrote :

The apache part was fixed in apache2 (2.4.10-1ubuntu1)

---------------
apache2 (2.4.10-1ubuntu1) utopic; urgency=medium

  * Merge from Debian unstable. Remaining changes:

[...]

apache2 (2.4.10-1) unstable; urgency=medium

  [ Arno Töll ]
  * New upstream version

[...]

apache2 (2.4.9-2) unstable; urgency=medium

  * Fix logic in postinst to detect existing index.* files in both
    DocumentRoots, the old /var/www and the new /var/www/html. Also
    change the compiled in default DocumentRoot to /var/www/html.
    Closes: #743915
  * Fix buffer overflows in suexec with very long (unix) usernames. Not
    exploitable due to FORTIFY_SOURCE. And creating users usually requires
    root privileges, anyway. Thanks to Luca Bruno for the report.
  * Remove conflicts of mpm modules with mpm_itk, which isn't an mpm
    anymore. Fixes a part of: #734865. libapache2-mpm-itk needs a fix, too.
  * Remove obsolete warning in a2enmod about mpm-itk.
  * Fix lintian warning: Remove image ref to w3.org, which is a privacy
    breach.

 -- Stefan Fritsch <email address hidden> Sun, 08 Jun 2014 10:38:04 +0200

Changed in apache2 (Ubuntu):
importance: Undecided → Medium
status: Invalid → Fix Released
Changed in mpm-itk (Debian):
status: Unknown → Fix Released

Hello Pablo, or anyone else affected,

Accepted apache2 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apache2/2.4.7-1ubuntu4.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in apache2 (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in mpm-itk (Ubuntu Trusty):
status: In Progress → Fix Committed
Chris J Arges (arges) wrote :

Hello Pablo, or anyone else affected,

Accepted mpm-itk into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mpm-itk/2.4.6-01-1ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

As a part of the Stable Release Updates quality process a search for Launchpad bug reports using the version of apache2 from trusty-proposed was performed and bug 1582462 was found. Please investigate this bug report to ensure that a regression will not be created by this SRU. In the event that this is not a regression remove the "verification-failed" tag from this bug report and add the tag "bot-stop-nagging" to bug 1582462 (not this bug). Thanks!

tags: added: verification-failed
Louis Bouchard (louis) on 2016-05-18
tags: added: verification-done
removed: verification-failed verification-needed
Louis Bouchard (louis) on 2016-05-18
tags: added: verification-needed
removed: verification-done

As a part of the Stable Release Updates quality process a search for Launchpad bug reports using the version of mpm-itk from trusty-proposed was performed and bug 1590283 was found. Please investigate this bug report to ensure that a regression will not be created by this SRU. In the event that this is not a regression remove the "verification-failed" tag from this bug report and add the tag "bot-stop-nagging" to bug 1590283 (not this bug). Thanks!

tags: added: verification-failed
Robie Basak (racb) wrote :

Can someone sort out verification for this bug please? This SRU is blocking upload of the fix for bug 1495988.

Louis Bouchard (louis) on 2016-06-22
tags: added: verification-done
removed: verification-failed verification-needed

Tested in containers - verified the issue as well as it being fixed with proposed enabled.
Did some basic benchmarking with apache bench using a few thousand concurrent sessions (as it is a mpm plugin in some way) and at least in that worked fine (=no regression)

Oh I see Louis was faster - well better twice than not verified :-)

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mpm-itk - 2.4.6-01-1ubuntu1

---------------
mpm-itk (2.4.6-01-1ubuntu1) trusty; urgency=medium

  * Switch mpm to prefork on initial installation. This makes
    libapache2-mpm-itk installable again. This is a backport of the
    fix for Debian bug #734865 (LP: #1286882)

 -- Louis Bouchard <email address hidden> Thu, 21 Apr 2016 10:56:05 +0200

Changed in mpm-itk (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for mpm-itk has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apache2 - 2.4.7-1ubuntu4.10

---------------
apache2 (2.4.7-1ubuntu4.10) trusty; urgency=medium

  * Add apache2 specific modification needed along with fix to
    libapache2-mpm-itk so it becomes installable again (LP: #1286882):
    - Removes warning on mpm_itk use
    - Removes conflicts on mpm_itk

 -- Louis Bouchard <email address hidden> Wed, 20 Apr 2016 16:21:03 +0200

Changed in apache2 (Ubuntu Trusty):
status: Fix Committed → Fix Released
Louis Bouchard (louis) on 2016-06-24
Changed in apache2 (Ubuntu Trusty):
assignee: Louis Bouchard (louis-bouchard) → nobody
Changed in mpm-itk (Ubuntu Trusty):
assignee: Louis Bouchard (louis-bouchard) → nobody
Louis Bouchard (louis) on 2016-11-09
tags: removed: sts-sru
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.