etckeeper hook breaks upgrade with "Argument list too long"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
etckeeper (Debian) |
Fix Released
|
Unknown
|
|||
etckeeper (Ubuntu) |
Fix Released
|
High
|
Thierry Carrez | ||
Lucid |
Fix Released
|
Medium
|
Thierry Carrez |
Bug Description
Binary package hint: etckeeper
I just executed distribution upgrade from 9.04 to 9.10.
The upgrade failed nearby the end because of etckeeper failure. I don't remember exact message but it was about command line being too long (I suspect bzr command was executed with all changed etc files, which are numerous)
Definitely deserves some thought.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: etckeeper 0.41ubuntu3
ProcVersionSign
Uname: Linux 2.6.31-21-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Mon May 3 09:21:23 2010
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
PackageArchitec
ProcEnviron:
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: etckeeper
== SRU Report ==
Impact:
If the user has thousands of packages installed and upgrades to a new release, etckeeper tries to commit after the apt run with a commit message that is too long, resulting in an upgrade failure.
Development branch fix:
Version 0.46 fixed the issue by adding support for --stdin and making etckeeper use it for post-install.d commit messages, so it is no longer subject to the issue.
Minimal patch:
Backporting the fix from 0.46 would result IMHO in a significant patch that also introduces features (--stdin), so this SRU proposes to truncate the commit message. See attached in comment 10.
TEST CASE:
This is relatively tricky to reproduce, since this requires to have a very large number of packages installed. Here is a way to trigger the bug:
- Install etckeeper
- Prepare a /tmp/testfile with more than 128K of data (copy a log file) (for example cp /var/log/udev /tmp/testfile)
- Start upgrading packages
- In parallel, once the packages are downloaded and the /var/cache/
- Wait for the upgrades to complete
This generates an artificially long set of differences in packages installed and will trigger the bug.
Without fix: upgrade fails at the end with "Argument list too long"
With fix: upgrade does not fail at the end, etckeeper commit message is truncated.
Regression potential:
The patch truncates the commit message only in the cases where it would trigger an "argument too long" error, so it should not create a regression.
Related branches
Changed in etckeeper (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
importance: | High → Medium |
summary: |
- etckeeper hook breaks 9.10→10.04 upgrade with "Argument list too long" + etckeeper hook breaks upgrade with "Argument list too long" |
Changed in etckeeper (Debian): | |
status: | Unknown → New |
Changed in etckeeper (Debian): | |
status: | New → Fix Released |
Changed in etckeeper (Ubuntu): | |
importance: | Medium → High |
assignee: | nobody → Thierry Carrez (ttx) |
Changed in etckeeper (Ubuntu Lucid): | |
importance: | Undecided → High |
assignee: | nobody → Thierry Carrez (ttx) |
Changed in etckeeper (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in etckeeper (Ubuntu Lucid): | |
status: | New → Triaged |
Changed in etckeeper (Ubuntu Lucid): | |
status: | Fix Committed → In Progress |
description: | updated |
tags: | added: testcase |
I can confirm this bug. I attached a screenshot of the failed upgrade.
I resolved it by manually commiting the configuration to etckeeper and then doing a partial upgrade (that worked well then).
The title of the bug is misleading. It should be 9.10 → 10.04, shouldn't it?