[Bug 500175] Re: 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, "
Colin Watson
cjwatson at canonical.com
Thu Jul 7 14:14:34 UTC 2011
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 corresponds to the user detaching control. On the other hand, that really isn't what "cancel" intuitively means!
** Bug watch added: Debian Bug tracker #501767
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501767
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to software-center in Ubuntu.
https://bugs.launchpad.net/bugs/500175
Title:
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,"
Status in “aptdaemon” package in Ubuntu:
Confirmed
Status in “debconf” package in Ubuntu:
Confirmed
Status in “software-center” package in Ubuntu:
Confirmed
Status in “aptdaemon” source package in Lucid:
Confirmed
Status in “debconf” source package in Lucid:
Confirmed
Status in “software-center” source package in Lucid:
Confirmed
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/aptdaemon/+bug/500175/+subscriptions
More information about the foundations-bugs
mailing list