dist-upgrade silently fails to do anything if etckeeper is installed

Bug #283642 reported by Max Bowsher
12
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Michael Vogt
Intrepid
Fix Released
Medium
Michael Vogt

Bug Description

Binary package hint: update-manager

hardy->intrepid.

If the etckeeper package is installed and configured, something about its DPkg::Pre-Install-Pkgs hook somehow causes the release upgrader to not actually install any packages - yet the upgrade runs to "completion" without errors.

I've been trying to isolate the problem, and so far it looks as if when we call into the C++ part of APT, specifically pkgPackageManager::DoInstall, it seems to think that there is nothing to do, as it returns immediately with a successful return code, but not having done any installation.

I think I'm closing in on a possible cause.... it looks like etckeeper is failing to read the data that apt tries to pass it on stdin, thus causing apt to be killed with a SIGPIPE..... out of time to debug right now, hope this braindump can be of use.

Michael Vogt (mvo)
Changed in update-manager:
importance: Undecided → Medium
milestone: none → ubuntu-8.10
status: New → Triaged
Revision history for this message
Michael Vogt (mvo) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

The SIGPIPE seems to be a good hint I see it in the strace log as well.

Revision history for this message
Michael Vogt (mvo) wrote :
Michael Vogt (mvo)
Changed in update-manager:
assignee: nobody → mvo
status: Triaged → In Progress
Revision history for this message
Max Bowsher (maxb) wrote :

Could the (minimal) fix be as simple as rewriting /etc/apt/apt.conf.d/05etckeeper to run via DPkg::Pre-Invoke rather than DPkg::Pre-Install-Pkgs ? Looking at the apt source, they seem to run one after the other, with the only difference being that one has data passed to it on stdin, and the other does not.

Of course, there's still the twin issues of:
 * update-manager's forked apt child shouldn't die on SIGPIPE
 * update-manager's parent should notice if the apt child dies uncleanly

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.93.26

---------------
update-manager (1:0.93.26) intrepid; urgency=low

  * DistUpgrade/DistUpgradeController.py:
    - workaround kde tmpfile permissions (LP: #277431)
  * UpdateManager/Common/utils.py:
    - do not crash if gconfd is not availabe/unusable
      (LP: #281248)
  * DistUpgrade/DistUpgradeViewKDE.py:
    - do not use "kde" frontend during the upgrade, it
      crashes because of the kde3->kde4 transition
      if run at the wrong time (LP: #283942)
  * DistUpgrade/DistUpgradeView.py:
    - ignore SIGPIPE when forking the Dpkg::Pre-Install
      scripts to fix error with etckeeper (LP: #283642)

 -- Michael Vogt <email address hidden> Wed, 15 Oct 2008 22:03:05 +0200

Changed in update-manager:
status: In Progress → Fix Released
Revision history for this message
Michael Vogt (mvo) wrote :

@maxb: I added code to update-manager now so that it ignores SIGPIPE - this needs to go into apt itself too along with detection of "died with singal"

Revision history for this message
Max Bowsher (maxb) wrote :

I confirm update-manager 0.93.26 successfully avoided being broken by etckeeper.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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