TransformRenameFailed and Unprintable exception

Bug #663957 reported by aishimoto
50
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

I got follwing error with bzr branch and bzr checkout on Windows Vista.
Error message in this log is "Access denied" in Japanese.

<<<LOG BEGIN>>>
this is a debug log for diagnosing/reporting problems in bzr
you can delete or truncate this file, or include sections in
bug reports to https://bugs.launchpad.net/bzr/+filebug

Thu 2010-10-21 00:24:53 +0900
0.064 bazaar version: 2.2.1
0.064 bzr arguments: [u'checkout', u'bzr+ssh://www.infopile.jp/~ishimoto/infopile-repos/trunk/infopile']
0.075 looking for plugins in C:/Users/ishimoto/AppData/Roaming/bazaar/2.0/plugins
0.075 looking for plugins in C:/Program Files/Bazaar/plugins
0.185 encoding stdout as sys.stdout encoding 'cp932'
0.228 bzr-svn: using Subversion 1.6.6 ()
0.421 ssh implementation is OpenSSH
3.087 creating repository in file:///C:/wk/a/infopile/.bzr/.
3.138 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x02BD8A10> in file:///C:/wk/a/infopile/
3.379 Using fetch logic to copy between RemoteRepository(bzr+ssh://www.infopile.jp/~ishimoto/infopile-repos/trunk/infopile/.bzr/)(RemoteRepositoryFormat(_network_name='Bazaar repository format 2a (needs bzr 1.16 or later)\n')) and CHKInventoryRepository('file:///C:/wk/a/infopile/.bzr/repository/')(RepositoryFormat2a())
3.379 fetch up to rev {<email address hidden>}
7.319 opening working tree 'C:/wk/a/infopile'
9.213 Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 912, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1112, in run_bzr
  File "bzrlib\commands.pyo", line 690, in run_argv_aliases
  File "bzrlib\commands.pyo", line 705, in run
  File "bzrlib\cleanup.pyo", line 135, in run_simple
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "bzrlib\builtins.pyo", line 1342, in run
  File "bzrlib\branch.pyo", line 1433, in create_checkout
  File "bzrlib\bzrdir.pyo", line 1737, in create_workingtree
  File "bzrlib\workingtree_4.pyo", line 1475, in initialize
  File "bzrlib\transform.pyo", line 2279, in build_tree
  File "bzrlib\transform.pyo", line 2395, in _build_tree
  File "bzrlib\transform.pyo", line 1562, in apply
  File "bzrlib\transform.pyo", line 1690, in _apply_insertions
  File "bzrlib\transform.pyo", line 2944, in rename
TransformRenameFailed: Unprintable exception TransformRenameFailed: dict={'errno': 13, 'from_path': u'C:/wk/a/infopile/.bzr/checkout/limbo/new-1', 'to_path': u'C:/wk/a/infopile/doc', 'why': '[Error 5] \x83A\x83N\x83Z\x83X\x82\xaa\x8b\x91\x94\xdb\x82\xb3\x82\xea\x82\xdc\x82\xb5\x82\xbd\x81B'}, fmt='Failed to rename %(from_path)s to %(to_path)s: %(why)s', error=UnicodeDecodeError('ascii', '[Error 5] \x83A\x83N\x83Z\x83X\x82\xaa\x8b\x91\x94\xdb\x82\xb3\x82\xea\x82\xdc\x82\xb5\x82\xbd\x81B', 10, 11, 'ordinal not in range(128)')

9.216 Transferred: 2935kB (333.8kB/s r:2933kB w:2kB)
9.216 return code 3

Revision history for this message
Martin Packman (gz) wrote :

The horrible error message is bug 273978, what's unclear is what caused the permission error on rename. Can you reproduce this problem or did it only happen once?

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
aishimoto (aishimoto) wrote :

I can reproduce this problem both on WIndows Vista and Windows 7 box.
Works fine with bzr 2.1.2, though.

Revision history for this message
aishimoto (aishimoto) wrote :

Strange, bzr installed by Standalone installer(bzr-2.2.1-setup.exe) fails, but bzr-2.2.1.win32-py2.6.exe succeeds!

Revision history for this message
aishimoto (aishimoto) wrote :

I cannot reproduce the problem with latest installer(bzr-.2.2.1-3.exe).

Revision history for this message
Martin Packman (gz) wrote :

Atsuo, I'll close this bug for now as the latest installer works for you. However as I'm not sure we made any changes that would have fixed the problem, please reopen the bug or file a new one if you run into difficulty again.

Changed in bzr:
status: Confirmed → Fix Released
Revision history for this message
aishimoto (aishimoto) wrote :

I agree to close this bug.

Memo: I can reproduce bug with standalone installer(bzr-2.2.1-1.setup.exe) steadily, but I cannot figure out the difference. Removing all plugins didn't fix the problem.

Thank you, Martin.

Revision history for this message
aishimoto (aishimoto) wrote :

I had same problem again. I think I figured out why the error happened.

I guess when bzr was trying to rename directory, virus checker had happen to open files under the directory.
IMO, os.rename() should not be used to move directories on Windows.

Changed in bzr:
status: Fix Released → New
Vincent Ladeuil (vila)
Changed in bzr:
status: New → Confirmed
Revision history for this message
Martin Packman (gz) wrote :

If you have the ability to prevent certain directories being scanned, can you try ignoring .bzr to confirm whether or not this is indeed the cause?

Revision history for this message
aishimoto (aishimoto) wrote :

I did, and I cannot reproduce the problem if I stop scanning working directory.
Also I aware this error happens only if repository contains large binary files.

Jelmer Vernooij (jelmer)
tags: added: treetransform
Revision history for this message
Gilles (gsopub) wrote :

Same problem (tested with bzr v2.4.1 or 2.5.0.b2)

Original commit was done from a MacOSx to Centos and the bug comes on a Windows XP PC (first time this bug appears). It is reproductible on other windows XP os.

Bzr update : (bzr v2.4.1 ou 2.5.0.b2-1)
bzr: ERROR: Unprintable exception TransformRenameFailed: dict={'errno': 13, 'from_path': u'C:/xxxx', 'to_path': u'C:/yyy/.bzr/checkout/limbo/new-29', 'why': '[Error 5] Acc\xe8s refus'}, fmt='Failed to rename %(from_path)s to %(to_path)s: %(why)s', error=UnicodeDecodeError('ascii', '[Error 5] Acc\xe8s refus', 13, 14, 'ordinal not in range(128)')

Revision history for this message
Anthony Leroyer (anthony-leroyer-3) wrote :

Hello,

I get the exact same error when trying to checkout.

0.057 bazaar version: 2.5.1
0.058 bzr arguments: [u'checkout', u'C:\\WORK\\BZR\\TESTS_full_2511\\Local_Repo\\trunk', u'myCheckout.trunk', u'--lightweight']
0.059 looking for plugins in C:/Users/aleroyer/AppData/Roaming/bazaar/2.0/plugins
0.059 looking for plugins in C:/Program Files (x86)/Bazaar/plugins
0.102 encoding stdout as sys.stdout encoding 'cp850'
0.191 creating branch reference in file:///C:/WORK/BZR/TESTS_full_2511/myCheckout.trunk/
0.204 bzr-colo: setting nick from hook
0.248 opening working tree 'C:/WORK/BZR/TESTS_full_2511/myCheckout.trunk'
12.906 Transferred: 22034kB (1730.0kB/s r:21829kB w:205kB)
12.906 return code 0
4.049 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
4.049 Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 920, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1131, in run_bzr
  File "bzrlib\commands.pyo", line 673, in run_argv_aliases
  File "bzrlib\commands.pyo", line 695, in run
  File "bzrlib\cleanup.pyo", line 136, in run_simple
  File "bzrlib\cleanup.pyo", line 166, in _do_with_cleanups
  File "bzrlib\builtins.pyo", line 1654, in run
  File "bzrlib\branch.pyo", line 1491, in create_checkout
  File "bzrlib\bzrdir.pyo", line 910, in create_workingtree
  File "bzrlib\workingtree_4.pyo", line 1549, in initialize
  File "bzrlib\transform.pyo", line 2536, in build_tree
  File "bzrlib\transform.pyo", line 2652, in _build_tree
  File "bzrlib\transform.pyo", line 1748, in apply
  File "bzrlib\transform.pyo", line 1880, in _apply_insertions
  File "bzrlib\transform.pyo", line 3192, in rename
TransformRenameFailed: Unprintable exception TransformRenameFailed: dict={'errno': 13, 'from_path': u'C:/WORK/BZR/TESTS_full_2511/myCheckout.trunk/.bzr/checkout/limbo/new-3', 'to_path': u'C:/WORK/BZR/TESTS_full_2511/myCheckout.trunk/Project', 'why': '[Error 5] Acc\xe8s refus'}, fmt='Failed to rename %(from_path)s to %(to_path)s: %(why)s', error=UnicodeDecodeError('ascii', '[Error 5] Acc\xe8s refus', 13, 14, 'ordinal not in range(128)')

-----------

- Tested with Bazaar (bzr) 2.5.1
- Tested with Bazaar (bzr) 2.6.0

Tested on the following OS:
- Windows 7 x64 pro SP1
- Windows server 2012 R2

Endurance tests on checkout operations gives around 15% of failures

Revision history for this message
Anthony Leroyer (anthony-leroyer-3) wrote :

Tested after disabling Antivirus and Firewall -> Same result :(

Revision history for this message
trident_job (trident-job) wrote :

Confirmed on Windows 10 with BZR v2.5.1 and McAffee Virus Scan Enterprise installed. Occurrence is very variable from 1 PC to another one. from 10% to 50%.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
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.