Aptitude freezes during stage 2 of install

Bug #19955 reported by Arthur Peters
8
Affects Status Importance Assigned to Milestone
aptitude (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

I used defaults through out the install. Except that I partitioned the drive by
hand (4GB root partition + ~900MB swap). My system is a Compaq R3000z laptop
(identical to the HP zv5000z). It is an AMD64 and I am using the AMD64 Ubuntu
Breezy daily CD image of Aug 17, 2005.

Everything was fine in the stage 2 (after reboot) until 91% of the way through
"Installing packages". The status line says "Downloading file 5 of 6 (0s
remaining)". And the install freezes. I will attach the output of "ps" and the
interesting stuff from VT4.

Revision history for this message
Arthur Peters (amp) wrote :

Created an attachment (id=3276)
output of "ps" and the interesting stuff from VT4

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

Do you have two network interfaces in your machine by chance? Did you had
networking at the point where the install hanged?

Cheers,
 Michael

Revision history for this message
Michael Vogt (mvo) wrote :

I just did a testinstall of 20050818 (i386) and it worked for me(tm). Is this
problem reproducable for you? I.e. can you boot the machine and it hangs at this
stage again? If so I would be very interessted in the output of:
 strace -p `pidof aptitude`

(and maybe from the cdrom method as well).

thanks,
 Michael

Revision history for this message
Michael Vogt (mvo) wrote :

It looks like the problem is reproducable when there is no network available.
For english language support at least myspell-en-gb is not in
/var/cache/apt/archives and that causes aptitude to querry for a cd. The
progress dialog hides that .

Revision history for this message
Arthur Peters (amp) wrote :

I managed to respoduce the problem outside the installer.

The update "thingy" in the notifacation area also freezes while trying to
upgrade. I ran aptitude by hand and it ask for the CD. So I think the CD problem
mentioned in your last comment is it. That is aptitude asks for the CD and waits
but the front end doesn't pass the message on to the user so the program appears
to freeze.

The fix need to be applied to both the installer and the auto-update icon
(whatever it's called).

Thanks for the help.

Revision history for this message
Michael Vogt (mvo) wrote :

(In reply to comment #5)
> I managed to respoduce the problem outside the installer.
>
> The update "thingy" in the notifacation area also freezes while trying to
> upgrade. I ran aptitude by hand and it ask for the CD. So I think the CD problem
> mentioned in your last comment is it. That is aptitude asks for the CD and waits
> but the front end doesn't pass the message on to the user so the program appears
> to freeze.

Could you describe in what way the update-notifier freezes? Maybe with a
screenshot and the steps needed to reproduce this? It shouldn't freeze because
it uses a different way than the installer in stage2 to figure the available
updates.

Thanks,
 Michael

Revision history for this message
Arthur Peters (amp) wrote :

I tried again and I think that I made a stupid mistake before: The window that
says that there are "kept back" packages was hiding behind the main window.

I need to reinstall to test it fully. I'm not up for that tonight. I'm going to
get the new CD image tommorrow and try again. I'll report a new bug against
update-notifier if I can reproduce the problem. Is that the right thing to do?

(In reply to comment #6)
>
> Could you describe in what way the update-notifier freezes? Maybe with a
> screenshot and the steps needed to reproduce this? It shouldn't freeze because
> it uses a different way than the installer in stage2 to figure the available
> updates.
>
>
> Thanks,
> Michael

Revision history for this message
Michael Vogt (mvo) wrote :

(In reply to comment #7)
> I tried again and I think that I made a stupid mistake before: The window that
> says that there are "kept back" packages was hiding behind the main window.

This may still be a bug. If you can reproduce it and a screenshot would be nice.

> I need to reinstall to test it fully. I'm not up for that tonight. I'm going to
> get the new CD image tommorrow and try again. I'll report a new bug against
> update-notifier if I can reproduce the problem. Is that the right thing to do?

That would be good, thanks.

Cheers,
 Michael

Revision history for this message
Colin Watson (cjwatson) wrote :

Is there any way that the prompt for a CD could be passed through apt's progress
channel? That way, I would stand some chance of being able to make the installer
behave gracefully when something breaks such that the CD is required (i.e. pop
up apt's prompt as a debconf question).

Revision history for this message
Michael Vogt (mvo) wrote :

(In reply to comment #9)
> Is there any way that the prompt for a CD could be passed through apt's progress
> channel? That way, I would stand some chance of being able to make the installer
> behave gracefully when something breaks such that the CD is required (i.e. pop
> up apt's prompt as a debconf question).

I added the needed support into <email address hidden>/apt--mvo--0:
(from README.progress-reporting):

media-change
------------
media-change:medium:drive:human-readable string

example:
media-change: Ubuntu 5.10 _Breezy Badger_ - Alpha i386 (20050830):/cdrom/:Please
insert the disc labeled: 'Ubuntu 5.10 _Breezy Badger_ - Alpha i386 (20050830)'
in the drive '/cdrom/' and press enter.

Revision history for this message
Michael Vogt (mvo) wrote :

I merged the relevant changes into <email address hidden>/apt--ubuntu--0
to prepare a upload into breezy. The debdiff is at:
http://people.ubuntu.com/~mvo/apt/apt_0.6.40.1ubuntu5.debdiff

If that is needed for #15213 we probably should consider putting it into breezy.

Revision history for this message
Matt Zimmerman (mdz) wrote :

(In reply to comment #11)
> I merged the relevant changes into <email address hidden>/apt--ubuntu--0
> to prepare a upload into breezy. The debdiff is at:
> http://people.ubuntu.com/~mvo/apt/apt_0.6.40.1ubuntu5.debdiff
>
> If that is needed for #15213 we probably should consider putting it into breezy.

This debdiff looks OK for Breezy, but I'm not entirely confident that the full
package (base-config + apt changes) will receive sufficient testing before
release. Can we cause this to fail more gracefully, rather than hanging, in the
event that it doesn't work?

Revision history for this message
Michael Vogt (mvo) wrote :

(In reply to comment #12)
> (In reply to comment #11)
> > I merged the relevant changes into <email address hidden>/apt--ubuntu--0
> > to prepare a upload into breezy. The debdiff is at:
> > http://people.ubuntu.com/~mvo/apt/apt_0.6.40.1ubuntu5.debdiff
> >
> > If that is needed for #15213 we probably should consider putting it into breezy.
>
> This debdiff looks OK for Breezy, but I'm not entirely confident that the full
> package (base-config + apt changes) will receive sufficient testing before
> release. Can we cause this to fail more gracefully, rather than hanging, in the
> event that it doesn't work?

Thanks for looking over the diff!

I uploaded a apt with the needed support as apt_0.6.40.1ubuntu5 into breezy.

Revision history for this message
Michael Vogt (mvo) wrote :

About falling more gracefully:

Kamion came up with the idea to fail if there is no tty to read from and redirct
stdin to /dev/null. I implemented that in aptitude, but it looks like we are
bitten by #2281 (debian #44135) here. Apt is pretty bad at falling back. I'm
looking into this now.

Revision history for this message
Michael Vogt (mvo) wrote :

To make apt falling back to other sources if no cdrom is available this debdiff
has the minimal needed patch for apt:

http://people.ubuntu.com/~mvo/apt/apt_0.6.40.1ubuntu6.debdiff

there is also a small patch for aptitude needed as well, it has it's own copy of
"cmdline/acqprogress.cc", the same change is needed here.

(this stuff in implemented in michael.vogt@apt--cdrom-fallback--0 for the records).

Revision history for this message
Michael Vogt (mvo) wrote :

apt+aptitude that fail if they can't read anything from stdin are uploaded:

apt-0.6.40.1ubuntu6
aptitude_0.2.15.9-3ubuntu5

Apt will then fall back to other sources (if available) or fail with a error.
Together with the base-config change that will call aptitude with /dev/null that
error should be fixed now. Please reopen if not.

Cheers,
 Michael

Revision history for this message
Colin Watson (cjwatson) wrote :

(In reply to comment #16)
> Apt will then fall back to other sources (if available) or fail with a error.
> Together with the base-config change that will call aptitude with /dev/null that
> error should be fixed now. Please reopen if not.

OK, I've uploaded that base-config change in version 2.67ubuntu14. Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.