[Bug 1021293] Re: Ubuntu 12.04 install stalls when doing apt-get upgrade

Colin Watson cjwatson at canonical.com
Fri Jul 20 12:55:21 UTC 2012


I've caught this in the act with strace, but the log is 2GB and will
take some time to analyse.

My best guess is that one of the packages upgraded in this run starts a
daemon which fails to disconnect itself from the stdout/stderr it's
given on startup.  That means log-output never exits because the file
descriptors it's watching are still open.  If this theory is correct,
then a fix would be twofold: in quantal, fix the daemon to disconnect
properly; in both precise and quantal, extend the no-op SIGCHLD handler
hack in log-output to force it to exit as soon as its child process
exits, even if --pass-stdout isn't being used.

** Changed in: ubiquity (Ubuntu)
       Status: Triaged => In Progress

** Changed in: ubiquity (Ubuntu)
     Assignee: (unassigned) => Colin Watson (cjwatson)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubiquity in Ubuntu.
https://bugs.launchpad.net/bugs/1021293

Title:
  Ubuntu 12.04 install stalls when doing apt-get upgrade

Status in “ubiquity” package in Ubuntu:
  In Progress
Status in “ubiquity” source package in Precise:
  Triaged

Bug description:
  Ubuntu 12.04 release image, this contains Ubiquity 2.10.16, grub-pc
  1.99-21ubuntu3 and initramfs-tools 0.99ubuntu13. The updates install
  grub-pc 1.99-21ubuntu3.1.

  At some point between June 28th and July 3rd, the apt-get upgrade
  process on Precise installations started stalling. We've noticed it
  stops when updating the initrds for new kernels:

  Jul  4 20:43:22 ubuntu in-target: Setting up unity-2d-spread (5.12.0-0ubuntu1.1) ...
  Jul  4 20:43:22 ubuntu in-target: Setting up unity-2d (5.12.0-0ubuntu1.1) ...
  Jul  4 20:43:22 ubuntu in-target: Processing triggers for libc-bin ...
  Jul  4 20:43:23 ubuntu in-target: ldconfig deferred processing now taking place
  Jul  4 20:43:23 ubuntu in-target: Processing triggers for resolvconf ...
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): frontend started
  Jul  4 20:43:23 ubuntu in-target: debconf: unable to initialize frontend: Passthrough
  Jul  4 20:43:23 ubuntu in-target: debconf: (Failed to open fd 3: Bad file descriptor at (eval 24) line 3)
  Jul  4 20:43:23 ubuntu in-target: debconf: falling back to frontend: Noninteractive
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): frontend running, package name is resolvconf
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): starting /var/lib/dpkg/info/resolvconf.config configure resolvconf-enable-updates
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): <-- INPUT low resolvconf/linkify-resolvconf
  Jul  4 20:43:23 ubuntu in-target: Use of uninitialized value in numeric ge (>=) at /usr/share/perl5/Debconf/Priority.pm line 24, <GEN3> line 1.
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): --> 30 question skipped
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): <-- GO 
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): --> 0 ok
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): <-- GET resolvconf/linkify-resolvconf
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): --> 0 false
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): <-- INPUT medium resolvconf/downup-interfaces
  Jul  4 20:43:23 ubuntu in-target: Use of uninitialized value in numeric ge (>=) at /usr/share/perl5/Debconf/Priority.pm line 24, <GEN3> line 4.
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): --> 30 question skipped
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): <-- GO 
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): --> 0 ok
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): starting /var/lib/dpkg/info/resolvconf.postinst triggered resolvconf-enable-updates
  Jul  4 20:43:23 ubuntu in-target: debconf (developer): <-- STOP
  Jul  4 20:43:23 ubuntu in-target: invoke-rc.d: policy-rc.d denied execution of start.
  Jul  4 20:43:23 ubuntu in-target: Processing triggers for initramfs-tools ...
  Jul  4 20:43:24 ubuntu in-target: update-initramfs: Generating /boot/initrd.img-3.5.0-3-generic
  Jul  4 21:17:01 ubuntu CRON[989]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

  After the last update-initramfs line it stalls forever (notice the
  timestamp for that command and the following CRON one).

  Steps to reproduce (on any machine, this doesn't seem to be hardware-
  specific):

  - Create a nice Ubuntu 12.04 USB stick using USB disk creator (do NOT simply dd the hybrid image onto the USB stick, as you will need to write files to it later).
  - Put the attached preseed in the USB stick's preseeds directory, name it ubuntu.seed (overwriting the existing file there).
  - Edit syslinux/txt.cfg, go to the second "append" line containing kernel parameters for the "install ubuntu" menu option (line 9 in the file), and right after "only-ubiquity", add a space and "automatic-ubiquity".
  - Boot a test system with this USB stick
  - Select the "install ubuntu" option

  Expected result:
  - System installs ubuntu completely, prompts to reboot and boots into a complete installation

  Actual result:
  - System will stall forever
  - Log shows as seen above.

  The main addition to the preseed is the late_command:

  ubiquity ubiquity/success_command string \
  for i in /dev /dev/pts /dev/shm /sys /sys/kernel/security /proc /cdrom; do mount --bind $i /      target/$i; done; \
    sed -i -e "/^GRUB_CMDLINE_LINUX_DEFAULT/s/\"$/ initcall_debug\"/" /target/etc/default/grub;     chroot /target update-grub; \
    echo "echo 0 > /sys/module/kernel/parameters/initcall_debug" > /target/etc/initramfs-tools/conf.d/initcall; chroot /target update-initramfs -u; \
    for i in /dev/pts /dev/shm /dev /sys/kernel/security /sys /proc /cdrom; do umount $i; done; \
    in-target apt-get update; \
    in-target apt-get upgrade -y --force-yes; \
    true

  Note this late_command basically just apt-get updates and upgrades.
  The first few lines are apparently needed if some of the later updates
  include a kernel update; without the mounts, the implicit update-grub
  in /target will fail.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1021293/+subscriptions




More information about the foundations-bugs mailing list