Bug #87292 “packaging backend crashes with “Interrupted system c...” : Bugs : apport package : Ubuntu

packaging backend crashes with "Interrupted system call"

Bug #87292 reported by Marco Maini
26
Affects Status Importance Assigned to Milestone
Python
Unknown
Unknown
apport (Ubuntu)
Invalid
Medium
Martin Pitt
python2.4 (Ubuntu)
Won't Fix
Undecided
Unassigned
python2.5 (Ubuntu)
Fix Released
Medium
Unassigned

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
ProcEnviron:
 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=it_IT.UTF-8
 SHELL=/bin/bash
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

Revision history for this message
Marco Maini (maini10) wrote :
Marco Maini (maini10)
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

Confirmed by a duplicate.

Changed in apport:
status: Unconfirmed → Confirmed
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
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.

Revision history for this message
Martin Pitt (pitti) wrote :
Martin Pitt (pitti)
Changed in apport:
assignee: nobody → pitti
status: Confirmed → In Progress
Revision history for this message
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

Revision history for this message
Martin Pitt (pitti) wrote :

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

Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
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
       http://sourceforge.net/tracker/index.php?func=detail&aid=1068268&group_id=5470&atid=105470
     - Add two test cases.
     - (LP: #87292)
   * debian/rules: Apply above patch.

Changed in python2.5:
status: Fix Committed → Fix Released
Revision history for this message
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
Revision history for this message
Marius Gedminas (mgedmin) wrote :

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

Revision history for this message
Matthias Klose (doko) wrote :

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

Changed in python2.4:
status: New → Won't Fix
Revision history for this message
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  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Loading subscribers...

Remote bug watches

Bug watches keep track of this bug in other bug trackers.