package_hook crashed with IOError in write()

Bug #332350 reported by Iain Lane on 2009-02-21
492
This bug affects 53 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
High
Martin Pitt

Bug Description

Binary package hint: apport

Intrepid -> Jaunty upgrade

ProblemType: Crash
Architecture: amd64
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/share/apport/package_hook
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: fglrx
Package: apport 0.134
PackageArchitecture: all
ProcAttrCurrent: unconfined
ProcCmdline: /usr/bin/python /usr/share/apport/package_hook -p libghc6-pandoc-dev -l /var/log/dist-upgrade/
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/usr/bin/zsh
PythonArgs: ['/usr/share/apport/package_hook', '-p', 'libghc6-pandoc-dev', '-l', '/var/log/dist-upgrade/']
SourcePackage: apport
Title: package_hook crashed with IOError in write()
Uname: Linux 2.6.27-7-generic x86_64
UserGroups:

Iain Lane (laney) wrote :

Same for me after running a partial upgrade Jaunty->Jaunty and trying to send an automated report about fonttools.

SoloTurn (soloturn) wrote :

same error here. command line window showed:

Traceback (most recent call last):
  File "/usr/share/apport/package_hook", line 58, in <module>
    pr.write(open(apport.fileutils.make_report_path(pr), 'w'))
  File "/usr/lib/python2.6/dist-packages/problem_report.py", line 305, in write
    f = open(v[0]) # file name
IOError: [Errno 21] Is a directory: '/var/log/dist-upgrade/20090324-2254'
Could not import module, is a package upgrade in progress? Error: No module named gtk

Daniel Holbach (dholbach) wrote :

Same here with ttf-mscorefonts-installer (network went down during the upgrade).

Simon Hova (simon-hova) wrote :

Difference for me was it happened with the i386 arch.

Broomer68 (jbezemer) wrote :

i386 nvidia 180 troubles

Ravi (sendtoravi) wrote :

Same happened for me while trying to report a failure (unable to install kernel image 2.6.28.11) while doing Intrepid-to-Jaunty upgrade

Martin Pitt (pitti) wrote :

Can someone please attach a .crash file which is unreportable that way?

Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → Incomplete
Martin Pitt (pitti) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in apport (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
status: Incomplete → Invalid
Aerix Spades (erikwal19) wrote :

Ubuntu notified me of a crash report whilst I was updating a few Grapix drivers...

Steve Beattie (sbeattie) wrote :

Martin, I'm re-opening this bug after having it occur in a jaunty -> karmic upgrade, as reported in duplicate bug 402115. How this occurred for me is, if during the early stages of an upgrade when it attempts to update the apt cache after rewriting /etc/apt/sources.list, if the apt cache update fails for some reason, the upgrader leaves behind log files in /var/log/dist-upgrade/YYYYMMDD-HHMM/ and then quits. On a *subsequent* upgrade, if during a package maintainer script there is a failure, /usr/share/apport/package_hook gets invoked with /var/log/dist-upgrade/ as a logdir argument. /usr/share/apport/package_hook attempts to attach everything in this directory as files, which doesn't work so well on subdirectories.

Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Invalid → Triaged
Martin Pitt (pitti) wrote :

That makes perfect sense. Thanks for figuring it out, Steve!

Changed in apport (Ubuntu):
importance: Undecided → High
status: Triaged → In Progress
Martin Pitt (pitti) wrote :

trunk r1509

Changed in apport (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 1.6-0ubuntu3

---------------
apport (1.6-0ubuntu3) karmic; urgency=low

  * Merge trunk:
    - apport-gtk: Fix ordering of choices
    - bin/package_hook: Fix crash for subdirectories in log dir. (LP: #332350)
    - doc/package-hooks.txt: Document allowed chars in report keys.
    - Show precise error message for damaged reports.
  * ubuntu-bug: Call apport-kde instead of apport-qt.

 -- Martin Pitt <email address hidden> Tue, 04 Aug 2009 18:50:26 +0100

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
VasiaUVI (vasiauvi) wrote :

I have the same error, but can you please explain how to resolve this issue?
From the comments above I don't understand what I have to do!
Thanks!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers