Canceling an installation in Software Center crashes debconf with "Use of uninitialized value $reply in scalar chomp at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 66,"

Bug #500175 reported by Matthew Paul Thomas on 2009-12-24
196
This bug affects 33 people
Affects Status Importance Assigned to Milestone
aptdaemon (Ubuntu)
Low
Unassigned
Lucid
Undecided
Unassigned
debconf (Ubuntu)
Undecided
Unassigned
Lucid
Undecided
Unassigned
software-center (Ubuntu)
Medium
Unassigned
Lucid
Undecided
Unassigned

Bug Description

Binary package hint: acroread

I accidentally clicked "Cancel" when it asked me if I wanted to set Adobe Reader as the default PDF viewer. It then apparently crashed.

== HOW TO REPRODUCE ==
In software-center choose "Adobe Reader 9" and install it.
At prompt "Set Adobe Reader as the default PDF viewer" click "Cancel"
The installation crashes with the error below

The relevant error is
=====
Setting up acroread (9.2-1karmic1) ...
Use of uninitialized value $reply in scalar chomp at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 66, <GEN0> line 6.
Use of uninitialized value $reply in concatenation (.) or string at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 67, <GEN0> line 6.
Use of uninitialized value $reply in split at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 68, <GEN0> line 6.
Use of uninitialized value in string eq at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 202, <GEN0> line 6.
Use of uninitialized value $reply in scalar chomp at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 66, <GEN0> line 6.
Use of uninitialized value $reply in concatenation (.) or string at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 67, <GEN0> line 6.
Use of uninitialized value $reply in split at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 68, <GEN0> line 6.
Use of uninitialized value $ret in string eq at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 212, <GEN0> line 6.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/DbDriver/Stack.pm line 104, <GEN0> line 6.
Use of uninitialized value $val in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 83, <GEN2> line 4.
Use of uninitialized value $val in concatenation (.) or string at /usr/share/perl5/Debconf/Format/822.pm line 84, <GEN2> line 4.
dpkg: error processing acroread (--configure):
 subprocess installed post-installation script returned error exit status 128
=====

ProblemType: Package
AptOrdering:
 acroread: Install
 acroread: Configure
Architecture: i386
Date: Thu Dec 24 17:06:00 2009
DistroRelease: Ubuntu 9.10
ErrorMessage: subprocess installed post-installation script returned error exit status 128
NonfreeKernelModules: wl
Package: acroread (not installed)
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
SourcePackage: acroread
Title: package acroread (not installed) failed to install/upgrade: subprocess installed post-installation script returned error exit status 128
Uname: Linux 2.6.31-17-generic i686

Matthew Paul Thomas (mpt) wrote :
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report.

Which package manager were you using ?

Changed in acroread (Ubuntu):
status: New → Incomplete
Changed in acroread (Ubuntu):
status: Incomplete → Confirmed
Jean-Baptiste Lallement (jibel) wrote :

@pierre, Why did you set the status to confirmed ? Do you known a reliable way to reproduce this issue ?

Changed in acroread (Ubuntu):
status: Confirmed → Incomplete
jader_nomak (pavelpetr-cz) wrote :

Jean-Baptiste Lallement: I am using Synaptic at Ubuntu 9.10 Karmic - full updated.

Jean-Baptiste Lallement (jibel) wrote :

@jader_nomak: Do you get the error in the description ? Is so could you please provide the detailed steps to reproduce it. Thanks in advance.

description: updated
Matthew Paul Thomas (mpt) wrote :

Jean-Baptiste, I was using the Ubuntu Software Center.

Changed in acroread (Ubuntu):
status: Incomplete → New
Jean-Baptiste Lallement (jibel) wrote :

Thanks for the update. Confirmed in Lucid.

affects: acroread (Ubuntu) → software-center (Ubuntu)
Changed in software-center (Ubuntu):
status: New → Confirmed
Changed in aptdaemon (Ubuntu):
status: New → Confirmed
summary: - package acroread (not installed) failed to install/upgrade: subprocess
- installed post-installation script returned error exit status 128
+ Canceling an installation in Software Center crashes debconf with "Use
+ of uninitialized value $reply in scalar chomp at
+ /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 66,"
description: updated
Changed in debconf (Ubuntu):
status: New → Confirmed
Jean-Baptiste Lallement (jibel) wrote :

similar issue in bug 442941 but somewhat different conditions: mainly affects tzdata and users doesn't cancel anything.

Changed in aptdaemon (Ubuntu):
status: Confirmed → Fix Committed
Changed in aptdaemon (Ubuntu Lucid):
status: Confirmed → Fix Committed
Changed in debconf (Ubuntu):
status: Confirmed → Fix Committed
Changed in debconf (Ubuntu Lucid):
status: Confirmed → Fix Committed
Changed in software-center (Ubuntu):
status: Confirmed → Fix Committed
Changed in software-center (Ubuntu Lucid):
status: Confirmed → Fix Committed
Changed in aptdaemon (Ubuntu):
status: Fix Committed → Confirmed
Changed in debconf (Ubuntu):
status: Fix Committed → Confirmed
Changed in debconf (Ubuntu Lucid):
status: Fix Committed → Confirmed
Changed in software-center (Ubuntu):
status: Fix Committed → Confirmed
Changed in software-center (Ubuntu Lucid):
status: Fix Committed → Confirmed
Changed in aptdaemon (Ubuntu Lucid):
status: Fix Committed → Confirmed
carlos miguel (pola-air) wrote :

Sres: Me falta software y actualizaciones, de lo contrario des instalare el sistema ubuntu
si no tiene solución a mi pedido.! Con limitaciones no se puede operar con un sistema
incompleto, espero una respuesta por MAIL- MUCHAS GRACIAS.>

Colin Watson (cjwatson) wrote :
Download full text (3.2 KiB)

So, I can't reproduce this *directly* on Oneiric, and I don't have a Lucid test environment right now. However, I emphasise "directly": with some fiddling, I can indirectly see what's probably going on here, even though the precise circumstances have changed in Oneiric. If I comment out the bits from debconf's Gnome frontend that hide the cancel button to try to reduce the incidence of this kind of problem, and then attach 'strace -f' to aptdaemon while installing acroread from software-center, I can see the Passthrough frontend failing with similar warning messages, and eventually being killed by SIGPIPE.

What's happening here is that the UI agent (in my case, the Gnome frontend) exits on being cancelled, and therefore stops responding to messages from the Passthrough frontend. The latter first tries to read, gets end-of-file (rendered in Perl as the <> operator returning undef), fails to handle that specifically, and throws a bunch of uninitialised-value warnings. When it next tries to write to the UI agent, it gets SIGPIPE as one might expect because all the readers have gone away.

Oneiric (and I suspect also Natty; acroread isn't yet in the Oneiric partner repository, but my test system has the Natty partner repository in sources.list) avoids this problem because acroread 9.4.2-0natty1 changed from asking questions directly in the postinst to asking them in a separate config script. Asking questions in config rather than postinst is good practice anyway and there's no reason why it shouldn't have been done in previous releases too. However, there are still situations where there is no alternative to asking a question directly in the postinst, and so we do still need to do something about this.

It's not clear to me how people are seeing the cancel button in Karmic or Lucid, since the change to suppress that in debconf's Gnome frontend was made in the Intrepid cycle. What does the dialog with the cancel button look like (perhaps a screenshot)?

As to what we can do about this bug report: it's not entirely obvious. We can certainly suppress the uninitialised-value warnings by handling end-of-file and SIGPIPE-on-write explicitly. We can try to reduce the incidence of cancellations, or make it more obvious that they constitute cancelling installation of a package and confirm that with the user (see Joey's comment in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501767), but that doesn't deal with the question of what the Passthrough frontend should actually *do* when its UI agent goes away unexpectedly. It doesn't have the ability to restart it, because it's running in some completely different context (different filesystem namespace, perhaps even a different machine, etc.) that Passthrough isn't allowed to know about. It can't itself display any UI because Passthrough isn't an X-based frontend, and is just there for shovelling data around. The only choices I can see are:

 * Exit non-zero (which would show up as a "crash" in much the same way, though perhaps we could handle it more gracefully, and improved cancellation handling in UI agents would certainly help);
 * Continue in noninteractive mode. On the one hand, this cor...

Read more...

Changed in aptdaemon (Ubuntu):
importance: Undecided → Low
Changed in aptdaemon (Ubuntu Lucid):
status: Confirmed → Won't Fix
Changed in software-center (Ubuntu):
importance: Undecided → High
Matthew Paul Thomas (mpt) wrote :

I'm downgrading this because the rewrite of the debconf GUI for error-tracking purposes <https://wiki.ubuntu.com/ErrorTracker#debconf> makes it even less likely that people will come across an errant "Cancel" button.

It looks like we also need updated steps to reproduce the problem.

Changed in software-center (Ubuntu):
importance: High → Medium
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in debconf (Ubuntu Lucid):
status: Confirmed → Won't Fix
Changed in software-center (Ubuntu Lucid):
status: Confirmed → Won't Fix
tags: added: rls-aa-incoming
Sebastien Bacher (seb128) wrote :

Unsure why that was added to the artful list, software-center is not used there and gnome-software is using packagkit and not aptdaemon now, setting as notfixing for this cycle

tags: added: rls-aa-notfixing
removed: rls-aa-incoming
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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