fetch fails to unlock stacked-on repositories

Bug #375496 reported by John A Meinel on 2009-05-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Medium
Unassigned

Bug Description

I was getting some weird 'UserWarning: 'LockableFiles(<bz...) was gc'd while locked)' warnings, and I was able to track it down to:
BzrDir.sprout(): around line:
        if source_repository is not None:
            # Fetch while stacked to prevent unstacked fetch from
            # Branch.sprout.
            if fetch_spec is None:
                result_repo.fetch(source_repository, revision_id=revision_id)
            else:
                result_repo.fetch(source_repository, fetch_spec=fetch_spec)

Before this, I checked:
result_repo.is_locked() # False
result_repo._fallback_repositories[0].is_locked() # False

after this fetch:
result_repo.is_locked() # False
result_repo._fallback_repositories[0].is_locked() # True

Now in this circumstance, the result_repo is automatically stacked, because of default stacking (the test is bzrlib.tests.per_repository_reference.test_default_stacking).

Anyway, it leads to a very specific concern that something is taking a lock out 'on demand' but is failing to unlock it.

If it matters, this test is using a 'smart_server' branch, so it might just be buggy code in the RemoteRepository unlock code.

Related branches

John A Meinel (jameinel) on 2009-05-12
Changed in bzr:
importance: Undecided → Medium
status: New → Triaged
John A Meinel (jameinel) on 2009-06-03
Changed in bzr:
milestone: none → 1.16
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers