** Description changed:

  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
  ProcVersionSignature: Ubuntu 2.6.31-21.59-generic
  Uname: Linux 2.6.31-21-generic x86_64
  NonfreeKernelModules: nvidia
  Architecture: amd64
  Date: Mon May  3 09:21:23 2010
  InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
  PackageArchitecture: all
  ProcEnviron:
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: etckeeper
  
  == SRU Report ==
  Impact:
- If the user has thousands of package 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.
+ 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 instead after 2000 lines. That's an improvement on the current 
situation (where the message would be completely lost) and avoids the upgrade 
failure message. See attached in comment 6.
+ 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.
- - Install karmic
+ 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
- - Install > 3000 packages
- - Upgrade to lucid
+ - 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/etckeeper/packagelist.pre-install is generated, replace it by your 
testfile (cp /tmp/testfile /var/cache/etckeeper/packagelist.pre-install)
+ - 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
+ With fix: upgrade does not fail at the end, etckeeper commit message is 
truncated.
  
  Regression potential:
- This patch conservatively truncates the message after 2000 lines. There might 
have been cases where more than 2000 packages were installed, where the 
etckeeper commit message would still not generate an error on upgrade. For the 
few users in that case, some lines at the end of the commit message would be 
lost. It does not change behavior for users upgrading less than 2000 packages 
at once, and avoids losing all the message for those that exceeded the limit.
+ 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.

-- 
etckeeper hook breaks upgrade with "Argument list too long"
https://bugs.launchpad.net/bugs/574244
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to