samba postrm depends on packages not guaranteed to be configured
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| samba |
Fix Released
|
Unknown
|
|||
| perl (Debian) |
Fix Released
|
Unknown
|
|||
| perl (Ubuntu) |
High
|
Colin Watson | |||
| Oneiric |
Undecided
|
Unassigned | |||
| Precise |
High
|
Colin Watson | |||
| update-inetd (Debian) |
Fix Released
|
Unknown
|
|||
| update-inetd (Ubuntu) |
High
|
Colin Watson | |||
| Oneiric |
Undecided
|
Unassigned | |||
| Precise |
High
|
Colin Watson | |||
| update-manager (Ubuntu) |
High
|
Unassigned | |||
| Oneiric |
High
|
Michael Vogt | |||
| Precise |
High
|
Unassigned | |||
Bug Description
Continued the installation of bug 862119, doing "sudo apt-get install -f" and then "sudo apt-get upgrade" again. After some time this bug occured.
ProblemType: Package
DistroRelease: Ubuntu 11.04
Package: samba 2:3.5.8~
ProcVersionSign
Uname: Linux 2.6.38-11-generic i686
Architecture: i386
Date: Thu Sep 29 10:02:27 2011
ErrorMessage: subprocess new post-removal script returned error exit status 2
RelatedPackageV
nautilus 1:3.2.0-0ubuntu2
gvfs 1.8.0-0ubuntu3
SambaClientRegr
SourcePackage: samba
Title: package samba 2:3.5.8~
UpgradeStatus: Upgraded to natty on 2011-07-13 (77 days ago)
Related branches
- Ubuntu branches: Pending requested 2011-10-10
-
Diff: 52 lines (+23/-4)2 files modifieddebian/changelog (+7/-0)
debian/samba.postrm (+16/-4)
| Till Kamppeter (till-kamppeter) wrote : | #1 |
| Till Kamppeter (till-kamppeter) wrote : | #2 |
| Changed in samba (Ubuntu): | |
| milestone: | none → ubuntu-11.10 |
| importance: | Undecided → High |
| Colin Watson (cjwatson) wrote : | #3 |
No, that's not quite right. Per policy (http://
The package whose postrm is being called may have previously been deconfigured and only be unpacked, at which point subsequent package changes do not consider its dependencies. Therefore, all postrm actions may only rely on essential packages and must gracefully skip any actions that require the package's dependencies if those dependencies are unavailable.
In any case, samba already depends on update-inetd, which depends on libfile-temp-perl, which is provided by perl-modules, so it's clearly not a matter of adding a dependency. It does have some code to attempt to gracefully cope if update-inetd is missing, but (a) the check for update-inetd being present isn't there in all branches, and (b) in this case update-inetd is present but not all its dependencies are available.
| Changed in samba (Ubuntu): | |
| status: | New → Triaged |
| summary: |
- package samba 2:3.5.8~dfsg-1ubuntu2.3 failed to install/upgrade: - subprocess new post-removal script returned error exit status 2 + samba postrm depends on packages not guaranteed to be configured |
| Robie Basak (racb) wrote : | #4 |
I'm thinking along the lines of the attached patch (untested). Some questions:
1) Is this the right approach?
2) Is dpkg-query the right way to get the status of the update-inetd package?
3) What about triggers-awaiting and triggers-pending? What should the behaviour be in these cases? Is it OK to treat update-inetd as not available in these cases?
4) I've tried manually deconfiguring update-inetd and perl-modules (by purging and then unpacking only) before purging samba, but that doesn't trigger the problem. Any way I try the upgrade case, dpkg refuses because update-inetd (intentionally) isn't configured. Is there any way I can reproduce this reliably?
The attachment "Untested patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.
[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]
| tags: | added: patch |
| Robie Basak (racb) wrote : | #6 |
The attached script reproduces the problem on a minimal fresh oneiric install.
| Adam Conrad (adconrad) wrote : | #7 |
Surely, we can just move the update-inetd call to prerm? I can't imagine why you'd want to wait around for postrm before calling it anyway.
| Changed in samba: | |
| status: | Unknown → New |
| Changed in samba (Ubuntu): | |
| milestone: | ubuntu-11.10 → oneiric-updates |
| Steve Langasek (vorlon) wrote : | #8 |
Historically, we wait for postrm before calling update-inetd --remove because the enabled/disabled status of an inetd service is admin configuration data, so we only want to remove it on purge.
| Adam Conrad (adconrad) wrote : | #9 |
I catch your point, Steve, but doesn't it seem silly to have an enabled service in inted that references binaries that no longer exist on disk?
| Adam Conrad (adconrad) wrote : | #10 |
And it occurs to me that I maintain a package that calls update-inetd in postrm too. Hrm. Did it used to fail more gracefully when it wasn't fully configured? This may need a more general looking-at rather than just samba (though I do find it curious that samba users in particular seem to so frequently remove perl-modules after removing samba).
| Adam Conrad (adconrad) wrote : | #11 |
Or is this being triggered by upgrading/mangling samba in the middle of perl transitions? I think I need to look more deeply into the dupes and see what's going on here, cause I refuse to believe a ton of people are doing this "on purpose".
| Steve Langasek (vorlon) wrote : | #12 |
> but doesn't it seem silly to have an enabled service in inetd
> that references binaries that no longer exist on disk?
Well, it's possible to use a different marker for package-level disabling vs. admin-level disabling of a service... note that the postrm *always* disables it when we're not purging, too.
Anyway, I'm not sure we ever executed very well on this, just explaining how we got here.
| tags: | added: regression-release |
| Changed in samba (Ubuntu Oneiric): | |
| status: | New → Triaged |
| importance: | Undecided → High |
| milestone: | none → oneiric-updates |
| Changed in samba (Ubuntu Precise): | |
| milestone: | oneiric-updates → precise-alpha-1 |
| Robie Basak (racb) wrote : | #13 |
I discussed this bug at length with Adam on Friday afternoon. Adam is on vacation now so I'll try and reproduce my memory and conclusions from this conversation.
Some thoughts from that discussion:
1) perl-modules (which provides File::Temp) seems to spend a lot of time unconfigured in the upgrade process. Adam pointed out that this is an anomaly given how much packages depend on Perl in general, and that the problem might be considered to be with the Perl transition and fixing this may be one approach. Take a look at VarLogDistupgra
2) If update-inetd is supposed to be able to be used from within maintainer scripts, what is the correct way of doing so? If it is supposed to be used from a postrm and thus cannot rely on perl-modules to be configured, then is the bug really that update-inetd is depending on things that it cannot?
3) If we could change update-inetd to not depend on Perl modules that may not be configured, then this particular bug wouldn't be an issue any more. It looks like we may only need tempfile anyway, which is in debianutils and Essential. The advantage of File::Temp seems to be portability, which isn't an issue for us as we guarantee tempfile to always be available. update-inetd also appears to need File::Copy so I'll need to check this, but in any case would the approach of removing dependencies by bringing minimal implementations into update-inetd be acceptable?
| tags: | added: rls-mgr-p-tracking |
| Clint Byrum (clint-fewbar) wrote : | #14 |
Given the number of dupes, shouldn't this be raised to a Critical level? This has now broken dozens of upgrades that we know about, and I'm sure many more that haven't bothered to report it.
Robie's suggestion to simplify update-inetd, given that these are very primitive elements, seems the best approach for a quick fix while the nature of the dependency problem is considered.
| Steve Langasek (vorlon) wrote : | #15 |
Analysis of the upgrade logs and further discussion on IRC shows that it's infeasible to fix this in samba. The problem arises when perl-modules is unpacked without libperl5.
Fixing update-inetd to be more robust (i.e., to not require perl-modules) would help for the future, but would not help for the present upgrade problems.
I think the only way to fix this reliably is via update-manager.
| affects: | samba (Ubuntu Oneiric) → update-manager (Ubuntu Oneiric) |
| Changed in update-manager (Ubuntu Oneiric): | |
| assignee: | nobody → Michael Vogt (mvo) |
| tags: | added: rls-p-tracking |
| Dave Walker (davewalker) wrote : | #16 |
bug 877852 is a secondary tracking bug.
| Changed in update-inetd (Ubuntu Precise): | |
| milestone: | none → ubuntu-12.04 |
| assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
| Changed in update-inetd (Ubuntu Precise): | |
| importance: | Undecided → High |
| status: | New → Triaged |
| milestone: | ubuntu-12.04 → precise-alpha-1 |
| Colin Watson (cjwatson) wrote : | #17 |
I've suggested a patch to update-inetd to make it tolerate perl-base/
Steve, Michael, do you agree with this assessment?
| Changed in update-inetd (Ubuntu Precise): | |
| assignee: | Canonical Foundations Team (canonical-foundations) → Colin Watson (cjwatson) |
| Launchpad Janitor (janitor) wrote : | #18 |
This bug was fixed in the package update-inetd - 4.41
---------------
update-inetd (4.41) unstable; urgency=low
* Fall back to external 'tempfile' and 'mv' commands in case perl-base and
perl-modules are out of sync during an upgrade (Closes: #649174;
LP: #862129). Thanks to Colin Watson <email address hidden> for the bug
report and patch.
-- Serafeim Zanikolas <email address hidden> Tue, 22 Nov 2011 23:15:02 +0100
| Changed in update-inetd (Ubuntu Precise): | |
| status: | Triaged → Fix Released |
| Changed in perl (Debian): | |
| status: | Unknown → New |
| Changed in update-inetd (Debian): | |
| status: | Unknown → Fix Released |
| Colin Watson (cjwatson) wrote : | #19 |
I'd prefer to fix this in update-inetd + perl rather than update-manager for alpha-1, as discussed.
| Changed in perl (Ubuntu Precise): | |
| assignee: | nobody → Colin Watson (cjwatson) |
| importance: | Undecided → High |
| milestone: | none → precise-alpha-1 |
| status: | New → Triaged |
| Changed in update-manager (Ubuntu Precise): | |
| status: | Triaged → Invalid |
| Launchpad Janitor (janitor) wrote : | #20 |
This bug was fixed in the package perl - 5.14.2-5ubuntu1
---------------
perl (5.14.2-5ubuntu1) precise; urgency=low
* Break older versions of update-inetd to avoid File::Temp and File::Copy
binary-
-- Colin Watson <email address hidden> Thu, 24 Nov 2011 15:24:30 +0000
| Changed in perl (Ubuntu Precise): | |
| status: | Triaged → Fix Released |
| Changed in perl (Debian): | |
| status: | New → Fix Committed |
| Changed in perl (Debian): | |
| status: | Fix Committed → Fix Released |
| Launchpad Janitor (janitor) wrote : | #21 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in perl (Ubuntu Oneiric): | |
| status: | New → Confirmed |
| Changed in update-inetd (Ubuntu Oneiric): | |
| status: | New → Confirmed |
| Blair Chasteen (darkstormyrain) wrote : | #23 |
perl-modules: /usr/share/
darkrain@vortex:~$ dpkg -s perl-modules update-inetd
Package: perl-modules
Status: install ok unpacked
Priority: standard
Section: perl
Installed-Size: 24832
Maintainer: Ubuntu Developers <email address hidden>
Architecture: all
Source: perl
Version: 5.12.4-4
Config-Version: 5.10.1-17ubuntu4.1
Replaces: libansicolor-perl, libarchive-
Provides: libansicolor-perl, libarchive-
Depends: perl (>= 5.12.4-1)
Recommends: libswitch-perl, libpod-
Breaks: libansicolor-perl (<< 2.02), libarchive-tar-perl (<< 1.54), libattribute-
| Changed in samba: | |
| status: | New → Fix Released |
| Rolf Leggewie (r0lf) wrote : | #24 |
oneiric has seen the end of its life and is no longer receiving any updates. Marking the oneiric task for this ticket as "Won't Fix".
| Changed in update-manager (Ubuntu Oneiric): | |
| status: | Triaged → Won't Fix |
| Changed in update-inetd (Ubuntu Oneiric): | |
| status: | Confirmed → Won't Fix |
| Changed in perl (Ubuntu Oneiric): | |
| status: | Confirmed → Won't Fix |


The postrm script needs perl-modules. An appropriate dependency should be defined.