keyboard-configuration.postinst died with SIGPIPE

Bug #745014 reported by Jean-Baptiste Lallement on 2011-03-29
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Colin Watson

Bug Description

Binary package hint: ubiquity

ISO Testing Kubuntu Desktop AMD64 20110329

Ubiquity failed and exit during install.

1. Boot to a live session
2. run ubiquity -d kde_ui

Error from syslog:
ar 29 14:41:31 ubuntu ubiquity: Mar 29 16:41:31 ubiquity: Starting up '['log-output', '-t', 'ubiquity', '--pass-stdout', '/usr/share/ubiquity/console-setup-apply']' for ubi-console-setup.Install
Mar 29 14:41:31 ubuntu ubiquity: cp:
Mar 29 14:41:31 ubuntu ubiquity: cannot stat `/etc/default/keyboard'
Mar 29 14:41:31 ubuntu ubiquity: : No such file or directory
Mar 29 14:41:31 ubuntu ubiquity:
Mar 29 14:41:31 ubuntu ubiquity: Mar 29 16:41:31 ubiquity: ['log-output', '-t', 'ubiquity', '--pass-stdout', '/usr/share/ubiquity/console-setup-apply'] exited with code 1
Mar 29 14:41:31 ubuntu log-output -t ubiquity umount /target/cdrom
Mar 29 14:41:31 ubuntu finish-install: Disabling CD in sources.list
Mar 29 14:41:31 ubuntu Exception during installation:
Mar 29 14:41:31 ubuntu Traceback (most recent call last):
Mar 29 14:41:31 ubuntu File "/usr/share/ubiquity/", line 1525, in <module>
Mar 29 14:41:31 ubuntu
Mar 29 14:41:31 ubuntu File "/usr/share/ubiquity/", line 55, in wrapper
Mar 29 14:41:31 ubuntu func(self)
Mar 29 14:41:31 ubuntu File "/usr/share/ubiquity/", line 158, in run
Mar 29 14:41:31 ubuntu self.configure_plugins()
Mar 29 14:41:31 ubuntu File "/usr/share/ubiquity/", line 393, in configure_plugins
Mar 29 14:41:31 ubuntu raise install_misc.InstallStepError("Plugin %s failed with code %s" % (plugin.NAME, ret))
Mar 29 14:41:31 ubuntu InstallStepError: Plugin console_setup failed with code 1
Mar 29 14:41:31 ubuntu

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: ubiquity 2.5.31
ProcVersionSignature: Ubuntu 2.6.38-7.39-generic 2.6.38
Uname: Linux 2.6.38-7-generic x86_64
Architecture: amd64
Date: Tue Mar 29 16:48:18 2011
LiveMediaBuild: Kubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110329)
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)

Jean-Baptiste Lallement (jibel) wrote :
description: updated
Colin Watson (cjwatson) on 2011-03-29
summary: - Kubuntu Desktop failed to install
+ keyboard-configuration.postinst died with SIGPIPE
Colin Watson (cjwatson) wrote :

I tried to reproduce this: I selected English language and French keyboard at the gfxboot menu, as you did, launched the installer as you said, left the locale in English, and kept the French keyboard layout. The installation completed successfully.

That said, regardless of my ability to reproduce this, we may be able to get somewhere by inspection. The point where it falls over is:

debconf (developer): <-- GET keyboard-configuration/variant
debconf (developer): --> 1 France - Alternative
Exception caught in process_line:
Traceback (most recent call last):
  File "/usr/lib/ubiquity/ubiquity/", line 132, in process_line
    return self.dbfilter.process_line()
  File "/usr/lib/ubiquity/ubiquity/", line 281, in process_line
    if not input_widgets[0].run(priority, question):
  File "/usr/lib/ubiquity/plugins/", line 418, in run
  File "/usr/lib/ubiquity/ubiquity/", line 44, in wrapper
    return target(self, *args, **kwargs)
  File "/usr/lib/ubiquity/plugins/", line 307, in set_keyboard_variant
  File "/usr/lib/ubiquity/ubiquity/frontend/kde_components/", line 68, in setVariant
  File "/usr/lib/ubiquity/ubiquity/frontend/kde_components/", line 233, in loadCodes
    cfile = pipe.communicate()[0]
  File "/usr/lib/python2.7/", line 732, in communicate
    stdout =
IOError: [Errno 4] Interrupted system call
Mar 29 16:38:01 ubiquity: ['log-output', '-t', 'ubiquity', '--pass-stdout', '/usr/lib/ubiquity/console-setup/keyboard-configuration.postinst', 'configure'] exited with code 141

What did you do when the keyboard page was displayed? Did you change the keyboard layout or variant? I wonder if this happens if they're changed twice in quick succession, or something like that. is related to this. Although some parts of subprocess were fixed to handle EINTR in, communicate wasn't.

It's extremely tempting to either monkey-patch subprocess.Popen.communicate to work around this, or to add a helper function.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Colin Watson (cjwatson) wrote :

Ubiquity actually doesn't install any signal handlers of its own, so EINTR had to be arising from a signal handler installed by a library. I noticed that Qt's QProcessManager constructor was installing a SIGCHLD handler without SA_RESTART. I've changed ubiquity to force that to be SA_RESTARTable, and hopefully that will stop this from happening again.

Changed in ubiquity (Ubuntu):
status: Confirmed → Fix Committed
assignee: nobody → Colin Watson (cjwatson)
Colin Watson (cjwatson) wrote :

Note that SA_RESTART may well be safer anyway, as for example stdio calls can't safely be retried on EINTR.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.5.33

ubiquity (2.5.33) natty; urgency=low

  [ Colin Watson ]
  * Shut down the debconf-communicator instance started in This
    should reduce the number of spurious crash reports we get.
  * KDE frontend:
    - Force the SIGCHLD handler installed by QProcessManager to use
      SA_RESTART, in the hope of avoiding problems with Python's lack of
      EINTR-safety (LP: #745014).
    - Show ext2 and btrfs in the same colour as ext3 and ext4, rather than
      in the same colour as free space.
  * localechooser/supported-locales only lists additional locales, so
    calculate the set of language packs to install using the union of it and
    debian-installer/locale (LP: #741304).
  * Do a quick check at startup to see if the debconf database is locked by
    something else, and exit slightly more gracefully than by raising an
    exception (LP: #746020).
  * GTK frontend:
    - Fix the partman plugin to convert the return value of
      gtk.TreeModel.get_value to Unicode before looking it up in a dict
      (LP: #746408).
  * Update translations from Launchpad (LP: #745924, #746500).
  * Automatic update of included source packages: flash-kernel 2.28ubuntu18.

  [ Evan Dandrea ]
  * Clarify substitution variables in the debconf templates using comments.
 -- Colin Watson <email address hidden> Sat, 02 Apr 2011 13:03:38 +0100

Changed in ubiquity (Ubuntu):
status: Fix Committed → Fix Released
tags: added: iso-testing
To post a comment you must log in.
This report contains Public information  Edit
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.