segmentation fault while downloading preseed file

Bug #594162 reported by Mathieu Trudel-Lapierre
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
busybox (Ubuntu)
Fix Released
High
Colin Watson
Maverick
Fix Released
High
Colin Watson

Bug Description

Binary package hint: ubiquity

Installing using a preseeded configuration with today's image (20100614), there is a Segmentation fault error or wget aborts during the download/processing of the preseed configuration, which causes it to not be taken into account at all: ubiquity starts with the language prompt.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: ubiquity 2.2.24
ProcVersionSignature: Ubuntu 2.6.35-2.3-generic 2.6.35-rc2
Uname: Linux 2.6.35-2-generic x86_64
Architecture: amd64
Date: Mon Jun 14 14:21:22 2010
LiveMediaBuild: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100614)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubiquity

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Casper.log displaying wget aborting with a failed assertion:
__getpagesize: Assertion `_rtld_global_ro._dl_pagesize != 0' failed.

Revision history for this message
Ameet Paranjape (ameetp) wrote :

Mathieu,

Are you seeing this on x86 installs?

Changed in ubiquity (Ubuntu):
importance: Undecided → High
status: New → Triaged
Ameet Paranjape (ameetp)
Changed in ubiquity (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Ameet,

I confirm, this is reproducible on i386.

Changed in ubiquity (Ubuntu):
status: Incomplete → New
Ameet Paranjape (ameetp)
Changed in ubiquity (Ubuntu):
status: New → Triaged
Colin Watson (cjwatson)
affects: ubiquity (Ubuntu) → wget (Ubuntu)
Revision history for this message
Colin Watson (cjwatson) wrote :

Do you get the same error in casper.log on i386? I can't reproduce this in an isolated test case, but I have not tried NFS-booting, only running wget by hand.

Ameet Paranjape (ameetp)
Changed in wget (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Colin, the casper.log attachment is a log for i386. There is no Segmentation fault, but there is an assertion error. Same goes for amd64 after I tried it again, I would still get assertion errors rather than a segfault.

I've also tried to reproduce it by running wget by hand, with no luck.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Trying again today to get a clearer view of what's going on.

Ameet Paranjape (ameetp)
Changed in wget (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Further testing shows it crashes with a segfault on amd64, and an assertion error on i386. I could not find a core file to investigate.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Just tried a custom initrd.lz image; after applying the suggested workaround for bug 602273, further modifying the initrd to call wget directly and dropping preseed file in /root/tmp rather than going through 'chroot /root', the file is properly downloaded, preseed is valid and the install continues.

Changed in wget (Ubuntu Maverick):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Revision history for this message
Robbie Williamson (robbiew) wrote :

Is this REALLY a problem in wget?

Changed in wget (Ubuntu Maverick):
importance: High → Medium
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Good point, I also feel it might not be. The way I initially thought of it was that there might be something different in the environment with which wget in chroot is being run, as opposed to how busybox's wget is being run -- something like a library that is not available yet, etc.

Revision history for this message
Ameet Paranjape (ameetp) wrote :

After talking with Mathieu, this issue is affecting a number of systems in the lab. There is a workaround in place, but it would be beneficial for test if this issue was resolved.

Changed in wget (Ubuntu Maverick):
importance: Medium → High
Revision history for this message
Colin Watson (cjwatson) wrote :

I had a nasty thought.

This can't possibly be a bug in wget, because busybox chroot behaves as follows:

  $ sudo busybox sh

  BusyBox v1.15.3 (Ubuntu 1:1.15.3-1ubuntu4) built-in shell (ash)
  Enter 'help' for a list of built-in commands.

  /home/cjwatson # chroot / rm --help
  BusyBox v1.15.3 (Ubuntu 1:1.15.3-1ubuntu4) multi-call binary

  Usage: rm [OPTIONS] FILE...

  Remove (unlink) the FILE(s). Use '--' to
  indicate that all following arguments are non-options.

  Options:
          -i Always prompt before removing
          -f Never prompt
          -r,-R Remove directories recursively

In other words, busybox invokes its own applets when chrooting, so it isn't running the real wget in /root, it's running its own wget from busybox-static, unexpectedly.

This all seems like a very bad idea, and I think busybox should always exec real programs when chrooting rather than trying to use applets. Could you please test the new busybox-initramfs in https://launchpad.net/~cjwatson/+archive/ppa (currently building)?

affects: wget (Ubuntu Maverick) → busybox (Ubuntu Maverick)
Changed in busybox (Ubuntu Maverick):
assignee: Canonical Foundations Team (canonical-foundations) → Colin Watson (cjwatson)
Revision history for this message
Colin Watson (cjwatson) wrote :

busybox-initramfs is built in my PPA and ready for testing.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Replacing /bin/sh with the busybox binary in that package does indeed fix the issue.

Colin Watson (cjwatson)
Changed in busybox (Ubuntu Maverick):
milestone: none → ubuntu-10.10
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package busybox - 1:1.15.3-1ubuntu5

---------------
busybox (1:1.15.3-1ubuntu5) maverick; urgency=low

  * applets-fallback.patch: Never execute busybox applets when chrooting
    (LP: #594162).
 -- Colin Watson <email address hidden> Mon, 04 Oct 2010 16:06:06 +0100

Changed in busybox (Ubuntu Maverick):
status: Triaged → Fix Released
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.