SystemError: E:Unparsable control file

Bug #724994 reported by Fabien Tassin
58
This bug affects 7 people
Affects Status Importance Assigned to Milestone
unattended-upgrades (Ubuntu)
Fix Released
High
Unassigned
Natty
Fix Released
High
Unassigned

Bug Description

Binary package hint: unattended-upgrades

got that from cron this morning:

/etc/cron.daily/apt:
Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 538, in <module>
    main()
  File "/usr/bin/unattended-upgrade", line 394, in main
    if conffile_prompt(item.destfile):
  File "/usr/bin/unattended-upgrade", line 160, in conffile_prompt
    open(destFile), "conffiles")
SystemError: E:Unparsable control file

===

in debug mode:

check_conffile_prompt('/var/cache/apt/archives/brltty-x11_4.2-8ubuntu1_amd64.deb')
found pkg: brltty-x11
conffile line: /etc/brltty/brltty-xw-all.hlp 9f9e568c2818f63bfa3bc7759e5a2def
current md5: 9f9e568c2818f63bfa3bc7759e5a2def
<apt_pkg.AcquireItem object:Status: 2 Complete: 1 Local: 1 IsTrusted: 1 FileSize: 1347790 DestFile:'/var/cache/apt/archives/brltty_4.2-8ubuntu1_amd64.deb' DescURI: 'http://archive.ubuntu.com/ubuntu/pool/main/b/brltty/brltty_4.2-8ubuntu1_amd64.deb' ID:0 ErrorText: ''>
check_conffile_prompt('/var/cache/apt/archives/brltty_4.2-8ubuntu1_amd64.deb')
found pkg: brltty
conffile line: /etc/brltty/brltty-ba-all.hlp 798c2b496bd3c045a32450241f3dd6ce
Fetched 0 B in 0s (0 B/s)
Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 538, in <module>
    main()
  File "/usr/bin/unattended-upgrade", line 394, in main
    if conffile_prompt(item.destfile):
  File "/usr/bin/unattended-upgrade", line 160, in conffile_prompt
    open(destFile), "conffiles")
SystemError: E:Unparsable control file

yet that file is not empty:
-rw-r--r-- 1 root root 61 2010-06-17 08:50 /etc/brltty/brltty-ba-all.hlp

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: unattended-upgrades 0.65ubuntu2
ProcVersionSignature: Ubuntu 2.6.37-6.17-generic 2.6.37-rc3
Uname: Linux 2.6.37-6-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Fri Feb 25 15:02:47 2011
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 LC_MESSAGES=en_US.utf8
 SHELL=/usr/bin/tcsh
SourcePackage: unattended-upgrades

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

Hm, this is confusing:

$ cat test.py
import apt_pkg
import apt_inst
import sys

debfile = sys.argv[1]
control = apt_inst.DebFile(debfile).control.extractdata("control")
sections = apt_pkg.TagSection(control)
print sections["Package"]
egon@top:/tmp$ python test.py brltty_4.2-8ubuntu1_amd64.deb
brltty

what is the output of
$ md5sum /var/cache/apt/archives/brltty_4.2-8ubuntu1_amd64.deb

Revision history for this message
Fabien Tassin (fta) wrote :

2214af036daec03e20b54b521dc33bbc /var/cache/apt/archives/brltty_4.2-8ubuntu1_amd64.deb

$ python test.py /var/cache/apt/archives/brltty_4.2-8ubuntu1_amd64.deb
brltty

Revision history for this message
Fabien Tassin (fta) wrote :
Download full text (26.6 KiB)

...but your test file is very different from the faulty code:

                    # get conffile value from pkg
                    pkg_conffiles = apt_inst.debExtractControl(
                        open(destFile), "conffiles")

with destFile = '/var/cache/apt/archives/brltty_4.2-8ubuntu1_amd64.deb'.

$ cat /tmp/test2.py
import apt_pkg
import apt_inst
import sys

destFile = sys.argv[1]
pkg_conffiles = apt_inst.debExtractControl(open(destFile), "conffiles")
print repr(pkg_conffiles)

$ python /tmp/test2.py /var/cache/apt/archives/brltty_4.2-8ubuntu1_amd64.deb
Traceback (most recent call last):
  File "/tmp/test2.py", line 6, in <module>
    pkg_conffiles = apt_inst.debExtractControl(open(destFile), "conffiles")
SystemError: E:Unparsable control file

$ apt-cache policy brltty
brltty:
  Installed: 4.2-4ubuntu2
  Candidate: 4.2-8ubuntu1
  Version table:
     4.2-8ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ natty/main amd64 Packages
 *** 4.2-4ubuntu2 0
        100 /var/lib/dpkg/status

$ apt-cache show brltty
Package: brltty
Priority: extra
Section: admin
Installed-Size: 6124
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Debian Accessibility Team <email address hidden>
Architecture: amd64
Version: 4.2-8ubuntu1
Replaces: libbrlapi1 (<< 3.7.2-7.1)
Depends: libbrlapi0.5, libc6 (>= 2.4), libgpm2 (>= 1.20.4), libicu44 (>= 4.4.1-1), libncursesw5 (>= 5.6+20070908), initramfs-tools (>= 0.40ubuntu30), lsb-base (>= 3.2-14)
Suggests: brltty-speechd, brltty-x11, console-braille
Breaks: udev (<< 136-1)
Filename: pool/main/b/brltty/brltty_4.2-8ubuntu1_amd64.deb
Size: 1347790
MD5sum: 2214af036daec03e20b54b521dc33bbc
SHA1: 5ec31b986c11a166d28159469390c5adefb9b4a4
SHA256: 647c761033895c395bd82c944dc3de4b51e29bd46e318c682a95a5906c2989a9
Description: Access software for a blind person using a braille display
 BRLTTY is a daemon which provides access to the console (text mode)
 for a blind person using a braille display. It drives the braille
 display and provides complete screen review functionality.
 The following display models are supported:
  * Alva (ABT3xx, Delphi, Satellite, Braille System 40, BC 640/680)
  * Baum
  * BrailleLite (18, 40, M20/M40)
  * BrailleNote (18/32)
  * EcoBraille displays
  * EuroBraille displays
  * Freedom Scientific (Focus and PacMate)
  * HandyTech displays
  * HIMS (Braille Sense, SyncBraille)
  * LogText 32
  * MDV braille displays
  * Papenmeier
  * Pegasus (20/27/40/80)
  * Seika 40
  * Tieman (Voyager 44/70, CombiBraille, MiniBraille and MultiBraille)
  * Tivomatic (Albatross)
  * TSI (PowerBraille/Navigator)
  * Videobraille
  * VisioBraille
 .
 BRLTTY also provides a client/server based infrastructure for applications
 wishing to utilize a Braille display. The daemon process listens for incoming
 TCP/IP connections on a certain port. A shared object library for clients is
 provided in the package libbrlapi0.5. A static library, header files and
 documentation is provided in package libbrlapi-dev. Bindings to other
 programming languages can be found in libbrlapi-java (Java) and
 python-brlapi (Python).
Homepage: http://mielke.cc/brltty/
Bugs: htt...

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

Thanks, indeed - I looked at line 120 in my trunk code which is different from the natty packages. I can reproduce the failure now.

Revision history for this message
Fabien Tassin (fta) wrote :

Good, moving to confirmed then.

Changed in unattended-upgrades (Ubuntu):
status: New → Confirmed
Michael Vogt (mvo)
Changed in unattended-upgrades (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unattended-upgrades - 0.71ubuntu1

---------------
unattended-upgrades (0.71ubuntu1) natty; urgency=low

  * debian/po/da.po:
    - added, thanks toJoe Dalton (closes: #619320)
  * unattended-upgrade, test/test_conffile.py:
    - use apt_inst.DebFile.control.extractdata() instead of
      apt_inst.debExtractControl() to not hit the limit of the
      tag section parser (LP: #724994)
    - add regression test
 -- Michael Vogt <email address hidden> Wed, 06 Apr 2011 11:44:48 +0200

Changed in unattended-upgrades (Ubuntu Natty):
status: In Progress → Fix Released
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.