flush should be try catch protected in debconf.py ... or removed

Bug #1415654 reported by Paul Dufresne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux Mint
New
Undecided
Unassigned

Bug Description

1) Version: Linux Mint 17.1 Cinnamon 32b x86 DVD
2) What you did for the problem to happen
Pass through some errors with NV16 on Nouveau, gone through fallback mode or similar...
Then almost gone to finish installing when installing Java (never seen message about java, but seen in debug file).

3) What happened:
My crash:
/***
Jan 28 06:33:13 mint ubiquity:
Jan 28 06:33:14 mint /plugininstall.py: Exception during installation:
Jan 28 06:33:14 mint /plugininstall.py: Traceback (most recent call last):
Jan 28 06:33:14 mint /plugininstall.py: File "/usr/lib/ubiquity/ubiquity/install_misc.py", line 287, in pulse
Jan 28 06:33:14 mint /plugininstall.py: self.db.progress('SET', int(self.percent))
Jan 28 06:33:14 mint /plugininstall.py: File "/usr/lib/python3/dist-packages/debconf.py", line 62, in <lambda>
Jan 28 06:33:14 mint /plugininstall.py: lambda *args, **kw: self.command(command, *args, **kw))
Jan 28 06:33:14 mint /plugininstall.py: File "/usr/lib/python3/dist-packages/debconf.py", line 67, in command
Jan 28 06:33:14 mint /plugininstall.py: self.write.flush()
Jan 28 06:33:14 mint /plugininstall.py: BrokenPipeError: [Errno 32] Broken pipe
Jan 28 06:33:14 mint /plugininstall.py:
Jan 28 06:36:21 mint dbus[934]: [system] Activating service
****/

I think it may have been triggered by:
/***
in install_misc.py in pulse function near:
        try:
            if os.environ['UBIQUITY_FRONTEND'] != 'debconf_ui':
                self.db.progress('SET', int(self.percent))
        except debconf.DebconfError:
            return False
***/

I believe the real problem is being masked away by (in : /usr/lib/python3/dist-packages/debconf.py)
the self.write.flush() in:
/***
    def command(self, command, *params):
        command = command.upper()
        self.write.write("%s %s\n" % (command, ' '.join(map(str, params))))
        self.write.flush()

        while True:
            try:
                resp = self.read.readline().rstrip('\n')
                break
**/

I believed the program have stopped on the flush.

4) I expect that the self.write.flush() be somehow try-catch protected, so that the program can continue in the while True

5) I just got to the end of install once... want to try to add the try-catch (if I find the correct syntax) before retrying.

Revision history for this message
Paul Dufresne (paulduf) wrote :

The last lines of my /var/log/installer/debug file was:
/***
(ubiquity:5489): Gdk-CRITICAL **: gdk_event_set_source_device: assertion 'GDK_IS_DEVICE (device)' failed
/usr/lib/ubiquity/plugins/ubi-timezone.py:212: Warning: Source ID 827 was not found when attempting to remove it
  GLib.source_remove(self.timeout_id)
locale.setlocale failed: unsupported locale setting (LANG=fr_CA.UTF-8)
/usr/lib/ubiquity/plugins/ubi-console-setup.py:72: Warning: Source ID 1276 was not found when attempting to remove it
  GLib.source_remove(self.keyboard_layout_timeout_id)
/usr/lib/ubiquity/plugins/ubi-console-setup.py:74: Warning: Source ID 1279 was not found when attempting to remove it
  GLib.source_remove(self.keyboard_variant_timeout_id)
/usr/lib/ubiquity/plugins/ubi-usersetup.py:408: Warning: Source ID 1947 was not found when attempting to remove it
  GLib.source_remove(self.hostname_timeout_id)
/usr/lib/ubiquity/plugins/ubi-usersetup.py:408: Warning: Source ID 1988 was not found when attempting to remove it
  GLib.source_remove(self.hostname_timeout_id)
/usr/lib/ubiquity/plugins/ubi-usersetup.py:408: Warning: Source ID 2004 was not found when attempting to remove it
  GLib.source_remove(self.hostname_timeout_id)
/usr/lib/ubiquity/plugins/ubi-usersetup.py:408: Warning: Source ID 2012 was not found when attempting to remove it
  GLib.source_remove(self.hostname_timeout_id)
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.14.04.1)
OpenJDK Client VM (build 24.65-b04, mixed mode)
Use of uninitialized value $val in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 83, <> line 5095.
Use of uninitialized value $val in concatenation (.) or string at /usr/share/perl5/Debconf/Format/822.pm line 84, <> line 5095.
***/

Revision history for this message
Paul Dufresne (paulduf) wrote :

Please not that debconf.py have at least an other use of self.write.flush() in
/***
    def stop(self):
        self.write.write('STOP\n')
        self.write.flush()

    def forceInput(self, priority, question):
***/

Revision history for this message
Paul Dufresne (paulduf) wrote :

Well, I modified the:
/***
    self.write.flush()
***/
to become:
/***
try:
    self.write.flush()
except:
    pass

Now this time, I run "ubiquity gui_gtk" in uxterm (that I had to installed, no terminal on DVD?).

It now stopped when I though it would open a window, with in uxterm:
illegal instruction

And now I hit a new bug a few line later (as seen at the end of my /var/log/syslog):
debconf.py line 89:
status = int(status)
ValueError: invalid literal for int() with base 10: ''

Well, have to manually write it... did not find how to copy from uxterm.

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.