packaging backend crashes with "Interrupted system call"

Bug #87292 reported by Marco Maini on 2007-02-23
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Martin Pitt
python2.4 (Ubuntu)
python2.5 (Ubuntu)

Bug Description

Binary package hint: apport

Apport crashes when sends a report to developers. Before the crash of apport, also kwin had a crash. I don't know if this is connected to crash of apport.

ProblemType: Crash
Date: Fri Feb 23 11:25:50 2007
DistroRelease: Ubuntu 7.04
ExecutablePath: /usr/share/apport/apport-qt
InterpreterPath: /usr/bin/python2.5
Package: apport-qt 0.58
ProcCmdline: /usr/bin/python /usr/share/apport/apport-qt
ProcCwd: /home/maini
PythonArgs: ['/usr/share/apport/apport-qt']
SourcePackage: apport
Uname: Linux maini-desktop 2.6.20-8-generic #2 SMP Tue Feb 13 05:18:42 UTC 2007 i686 GNU/Linux

Related branches

Marco Maini (maini10) wrote :
Marco Maini (maini10) on 2007-02-23
description: updated
Martin Pitt (pitti) wrote :

Confirmed by a duplicate.

Changed in apport:
status: Unconfirmed → Confirmed
Martin Pitt (pitti) wrote :

Google finds lots of similar bug reports; although this does not seem to be an actual subprocess bug (it should rather get fixed at a lower level), subprocess seems to be particularly affected by the effect. I'll link the upstream bug report.

Changed in python2.5:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Martin Pitt (pitti) wrote :

I'll attempt to work around the problem in apport itself, but it'll get a bit ugly.

Changed in apport:
importance: Undecided → Medium
Martin Pitt (pitti) wrote :

I developed a fix and a test case for this, based on the old patch attached to the upstream bug.

Changed in python2.5:
status: Confirmed → Fix Committed
Martin Pitt (pitti) wrote :
Martin Pitt (pitti) wrote :

I really want to fix this for Feisty. If a general Python fix is deemed too risky, I can alternatively put that new subprocess module into apport. That will leave other applications to the same trap, though.

Martin Pitt (pitti) wrote :
Martin Pitt (pitti) on 2007-03-14
Changed in apport:
assignee: nobody → pitti
status: Confirmed → In Progress
Martin Pitt (pitti) wrote :

New debdiff:
 - Remove _read_all(), we don't need it. This also reverts the removal of the 1 MB exception limitation.
 - Apply the patch in debian/rules (yay shiny build system)
 - Give credit for the original patch in the changelog

Martin Pitt (pitti) wrote :

Grr, why wasn't this attached with the previous comment?

Martin Pitt (pitti) wrote :
Martin Pitt (pitti) wrote :

 python2.5 (2.5-5ubuntu10) feisty; urgency=low
   * Add debian/patches/subprocess-eintr-safety.dpatch:
     - Create and use wrappers around read(), write(), and os.waitpid() in the
       subprocess module which retry the operation on an EINTR (which happens
       if e. g. an alarm was raised while the system call was in progress). It is
       incredibly hard and inconvenient to sensibly handle this in
       applications, so let's fix this at the right level.
     - Patch based on original proposal of Peter Åstrand in
     - Add two test cases.
     - (LP: #87292)
   * debian/rules: Apply above patch.

Changed in python2.5:
status: Fix Committed → Fix Released
Martin Pitt (pitti) wrote :

We fixed it for all Python programs in python itself now, thus this automatically applies to apport, too.

Changed in apport:
status: In Progress → Rejected
Marius Gedminas (mgedmin) wrote :

I don't suppose you could backport this patch for python2.4 as well?

Matthias Klose (doko) wrote :

mark as wontfix for python2.4, unless a patch appears.

Changed in python2.4:
status: New → Won't Fix
Matteo Bertini (naufraghi) wrote :

This patch factorize the present _no_intr patch, merges the py25-maint r65475 and protect the returned iostreams (stdin, stdout, stderr) read and write (in fact, all callables in the iostream).
It is ok for common usage but it breakes the python 2.2 compat.

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.