Import interrupted by rollout breaks because of lock contention

Bug #513669 reported by Jelmer Vernooij
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
Low
Unassigned

Bug Description

  affects launchpad-code

The evolution import from git was just about to finish when a new
version of Launchpad was rolled out. This seems to've killed an active
bzr process and has left the lock open:

Traceback (most recent call last):
  File "/srv/importd.launchpad.net/production/launchpad-rev-8939/scripts/code-import-worker.py", line 66, in <module>
    script.main()
  File "/srv/importd.launchpad.net/production/launchpad-rev-8939/scripts/code-import-worker.py", line 61, in main
    import_worker.run()
  File "/srv/importd.launchpad.net/production/launchpad-rev-8939/lib/lp/codehosting/codeimport/worker.py", line 393, in run
    self._doImport()
  File "/srv/importd.launchpad.net/production/launchpad-rev-8939/lib/lp/codehosting/codeimport/worker.py", line 491, in _doImport
    self.source_details.branch_id, bazaar_tree, self.required_format)
  File "/srv/importd.launchpad.net/production/launchpad-rev-8939/lib/lp/codehosting/codeimport/worker.py", line 89, in push
    branch_to.pull(branch_from, overwrite=True)
  File "<string>", line 2, in pull_write_locked
  File "/home/pqm/for_rollouts/production/eggs/bzr-2.1.0b4-py2.5-linux-x86_64.egg/bzrlib/branch.py", line 2151, in lock_write
  File "/home/pqm/for_rollouts/production/eggs/bzr-2.1.0b4-py2.5-linux-x86_64.egg/bzrlib/lockable_files.py", line 193, in lock_write
  File "/home/pqm/for_rollouts/production/eggs/bzr-2.1.0b4-py2.5-linux-x86_64.egg/bzrlib/lockdir.py", line 583, in lock_write
  File "/home/pqm/for_rollouts/production/eggs/bzr-2.1.0b4-py2.5-linux-x86_64.egg/bzrlib/lockdir.py", line 551, in wait_lock
bzrlib.errors.LockContention: Could not acquire lock "LockDir(sftp://hoover@escudero/srv/importd/www/0004b37f/.bzr/branch/lock)":
Import failed:
Traceback (most recent call last):
Failure: twisted.internet.error.ProcessTerminated: A process has ended with a probable error condition: process ended with exit code 1.

Revision history for this message
Tim Penhey (thumper) wrote : Re: [Bug 513669] [NEW] Import interrupted by rollout breaks because of lock contention

  status triaged
  importance medium
  tag code-import

Changed in launchpad-code:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote : Re: [Bug 513669] [NEW] Import interrupted by rollout breaks because of lock contention

I don't have any clever (or even dumb) ideas on how to fix this :/

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Sun, 2010-01-31 at 21:10 +0000, Michael Hudson wrote:
> I don't have any clever (or even dumb) ideas on how to fix this :/
Assuming you know for sure that there's always just one importer
running, a simple way to deal with this would be to just look for a lock
and unlock if there is a lock before doing an import.

Cheers,

Jelmer

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Jelmer Vernooij wrote:
> On Sun, 2010-01-31 at 21:10 +0000, Michael Hudson wrote:
>> I don't have any clever (or even dumb) ideas on how to fix this :/
> Assuming you know for sure that there's always just one importer
> running, a simple way to deal with this would be to just look for a lock
> and unlock if there is a lock before doing an import.

Yes, I guess that's true enough. Programmatic unlocking is tons of fun :-)

Cheers,
mwh

Changed in launchpad:
importance: Medium → Low
Revision history for this message
Robert Collins (lifeless) wrote :

Rollouts should be graceful for imports at this stage.

Changed in launchpad:
status: Triaged → Invalid
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.