apport crashed with OSError in check_lock()

Bug #147237 reported by Milan Bouchet-Valat
12
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Undecided
Martin Pitt

Bug Description

Binary package hint: apport

Don't really know more. If the report is useless, just discard this bug.

ProblemType: Crash
Architecture: i386
CrashReports:
 600:1000:1000:2424125:2007-09-30 16:05:04.000000000 +0200:2007-09-30 16:05:05.000000000 +0200:/var/crash/_usr_bin_evolution.1000.crash
 600:1000:1000:7550:2007-09-30 16:03:19.000000000 +0200:2007-09-30 16:05:34.000000000 +0200:/var/crash/_usr_share_apport_apport.1000.crash
Date: Sun Sep 30 16:03:20 2007
DistroRelease: Ubuntu 7.10
ExecutablePath: /usr/share/apport/apport
InterpreterPath: /usr/bin/python2.5
Package: apport 0.97
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/share/apport/apport
ProcCwd: /var/crash
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
 LANG=fr_FR.UTF-8
PythonArgs: ['/usr/share/apport/apport']
SourcePackage: apport
Title: apport crashed with OSError in check_lock()
Uname: Linux milan 2.6.22-12-generic #1 SMP Sun Sep 23 18:11:30 GMT 2007 i686 GNU/Linux

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :
Revision history for this message
Daniel Hahler (blueyed) wrote :

Setting this to confirmed.
The code from /bin/apport in question is:
    # create a lock file
    lockfile = os.path.join(apport.fileutils.report_dir, '.lock')
    try:
        fd = os.open(lockfile, os.O_WRONLY|os.O_CREAT|os.O_NOFOLLOW)
    except OSError, e:
        error_log('cannot create lock file (uid %i): ' % os.getuid() + e.message)
        raise

I think this exception should not get raised, because there might be just another user locking apport.

Changed in apport:
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in bzr head.

Changed in apport:
assignee: nobody → pitti
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 0.100

---------------
apport (0.100) hardy; urgency=low

  * bin/crash-digger: Add option --log for logging to a file, and
    --pidfile/--stop for daemonization. Add test cases to test-crash-digger.
  * bin/apport: Do not re-raise exceptions about failure to create the lock
    file, to avoid crashing in the case that another apport instance tries to
    lock at exactly the same moment. (LP: #147237)
  * apport/report.py testsuite: Check that our methods get along with binary
    data which turn into CompressedValue objects after loading them from a
    file. This reproduces LP #148305.
  * problem_report.py, CompressedValue: Add method splitlines() since we need
    it very often. Add test case to test_compressed_values(). (LP: #148305)
  * problem_report.py: Add test case to check that update() works and does the
    right thing with binary values and overwriting. This confirms that
    importing a dictionary works.
  * debian/local/setup-apport-retracer: Update for hardy.
  * apport/crashdb_impl/launchpad.py: get_source_info() does not work any more
    due to HTML changes in Launchpad, and not showing the component any more
    on /distro/+source/package. Since we do not actually need component and
    release name any more, rename it to get_source_version(), fix the regular
    expression to just get the version, and adapt get_fixed_version()
    accordingly.
  * debian/local/setup-apport-retracer: Update default apt sources to
    http://ddebs.ubuntu.com.
  * apport/ui.py: Robostify cleanup of forked test processes.
  * apport/ui.py: Sleep for 0.5 seconds after creating the test process in the
    test suite to give /proc some time to settle down.
  * bin/apport: Drop evaluation of CORE_* environment variables and mandate
    calling with <pid> <signal> <core ulimit>. Drop the now obsolete
    apport/elfcore.py. Adapt test-apport accordingly.
  * debian/apport.init, use-local: Now call apport with %p, %s, and %c kernel
    macros (since 2.6.24). Drop Edgy support from init script.

 -- Martin Pitt <email address hidden> Fri, 21 Dec 2007 02:18:48 +0100

Changed in apport:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers