NoSuchFile on .bzr/repository/pack-names after committing on network share

Bug #850004 reported by André Bachmann
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

I was just testing bzr 2.4.1-1 under Win7 32 Bit.

After committing a new revision with Bazaar Explorer 1.2.1 (with qbzr 0.21.1), I got the following error.
"S:/v5_x/projects/10074_YYY-Lüftersteuerung" is a standalone tree, but bzrlib seems to have difficulties with our german non-ASCII characters (like ä, ö, ü, ß).

====================================================================================================
Wed 2011-09-14 14:04:50 +0200
0.047 bazaar version: 2.4.1
0.047 bzr arguments: [u'qsubprocess', u'--bencode', u'l6:commit2:-m32:Vor 2. Wegschicken zu Hr. xxx24:YYY-L\xfcftersteuerung.sche']
0.073 looking for plugins in C:/Users/abachmann/AppData/Roaming/bazaar/2.0/plugins
0.073 looking for plugins in C:/Program Files/Bazaar/plugins
0.114 encoding stdout as osutils.get_user_encoding() 'cp1252'
0.160 bazaar version: 2.4.1
0.160 bzr arguments: [u'commit', u'-m', u'Vor 2. Wegschicken zu Hr. xxx', u'YYY-L\xfcftersteuerung.sch']
0.163 encoding stdout as osutils.get_user_encoding() 'cp1252'
0.217 opening working tree 'S:/v5_x/projects/10074_YYY-L\xc3\xbcftersteuerung'
1.018 preparing to commit
[ 5424] 2011-09-14 14:04:51.351 INFO: Committing to: S:/v5_x/projects/10074_YYY-Lüftersteuerung/
1.220 Selecting files for commit with filter [u'YYY-L\xfcftersteuerung.sch']
[ 5424] 2011-09-14 14:04:51.375 INFO: modified YYY-Lüftersteuerung.sch
27.132 None

27.132 Traceback (most recent call last):
  File "C:/Program Files/Bazaar/plugins\explorer\lib\view_workingtree.py", line 135, in refresh_view
  File "C:/Program Files/Bazaar/plugins\explorer\lib\html_report_view.py", line 56, in refresh_view
  File "C:/Program Files/Bazaar/plugins\explorer\lib\view_workingtree.py", line 152, in report_text
  File "C:/Program Files/Bazaar/plugins\explorer\lib\status_report.py", line 196, in __init__
  File "C:/Program Files/Bazaar/plugins\explorer\lib\status_report.py", line 210, in _collect_data
  File "C:/Program Files/Bazaar/plugins\explorer\lib\status_data.py", line 90, in get_pending_merges
  File "bzrlib\status.pyo", line 261, in show_pending_merges
  File "bzrlib\decorators.pyo", line 152, in read_locked
  File "bzrlib\workingtree_4.pyo", line 607, in lock_read
  File "bzrlib\branch.pyo", line 2469, in lock_read
  File "bzrlib\repofmt\pack_repo.pyo", line 1787, in lock_read
  File "bzrlib\repofmt\pack_repo.pyo", line 1703, in _refresh_data
  File "bzrlib\repofmt\pack_repo.pyo", line 1460, in reload_pack_names
  File "bzrlib\repofmt\pack_repo.pyo", line 1326, in _diff_pack_names
  File "bzrlib\btree_index.pyo", line 996, in iter_all_entries
  File "bzrlib\btree_index.pyo", line 1443, in key_count
  File "bzrlib\btree_index.pyo", line 940, in _get_root_node
  File "bzrlib\btree_index.pyo", line 965, in _get_internal_nodes
  File "bzrlib\btree_index.pyo", line 957, in _get_nodes
  File "bzrlib\btree_index.pyo", line 734, in _get_and_cache_nodes
  File "bzrlib\btree_index.pyo", line 1530, in _read_nodes
  File "bzrlib\transport\__init__.pyo", line 633, in get_bytes
  File "bzrlib\transport\local.pyo", line 168, in get
  File "bzrlib\transport\__init__.pyo", line 326, in _translate_error
NoSuchFile: No such file: u'S:/v5_x/projects/10074_YYY-L\xfcftersteuerung/.bzr/repository/pack-names': [Errno 2] No such file or directory

27.142 No Apport available to Bazaar
[ 5424] 2011-09-14 14:04:54.645 INFO: Committed revision 5.
4.514 Committed revid <email address hidden> as revno 5.
5.186 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
5.186 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
5.186 return code 0
====================================================================================================

Martin Packman (gz)
summary: - Problem with non-ASCII letters
+ NoSuchFile on .bzr/repository/pack-names after committing in bzr
+ explorer
Revision history for this message
Martin Packman (gz) wrote : Re: NoSuchFile on .bzr/repository/pack-names after committing in bzr explorer

Unfortunately I've not managed to reproduce this locally, with bzrlib 2.4.2dev, qbzr 0.22.0dev, and bzr-explorer 1.2.1, nor with the 2.4.1-1 all in one installer. I have a similar log with the same style non-ascii paths up to the 1.220 mark, but don't know what's triggering the problems from your log after that.

If you can reliably reproduce this, can you try giving me detailed steps, starting with creating a new branch and whatever actions you need to take after that to have the error appear?

Changed in bzr:
status: New → Incomplete
Revision history for this message
André Bachmann (andrebachmann-dd) wrote :

Ok, this occurs only if I'm working on a network share - I couldn't reproduce it on a local drive.
1. Create directory on a network share (drive P:) with files in it. I called it "Lüftersteuerung" and it contains file1.txt, file2.txt and Lüftersteuerung.txt.
2. run "bzr init" in this directory
3. run "bzr add ." in this directory
4. Open Bazaar Explorer, Ctrl+O, open this directory
5. Click on "Commit"
6. I get the following error:
LockContention: Could not acquire lock "P:/Lüftersteuerung/.bzr/checkout/dirstate": (32, 'CreateFileW', 'Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.')
7. I click on Retry, now the commit works. But there is another error:
NoSuchFile: No such file: u'P:/L\xfcftersteuerung/.bzr/repository/pack-names': [Errno 2] No such file or directory

Results of steps 5 to 7 as shown in Bazaar Explorer:

Run command: bzr commit -m "First commit" Lüftersteuerung.txt file1.txt file2.txt
bzr: ERROR: Could not acquire lock "P:/Lüftersteuerung/.bzr/checkout/dirstate": (32, 'CreateFileW', 'Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.')
Run command: bzr commit -m "First commit" Lüftersteuerung.txt file1.txt file2.txt
Committing to: P:/Lüftersteuerung/
added file1.txt
added Lüftersteuerung.txt
added file2.txt
Committed revision 1.

I attach the complete log of this process. If you need any further information, please let me know. :)

Revision history for this message
André Bachmann (andrebachmann-dd) wrote :

I just rechecked these steps with 2.3.4-1: There were no problems. So these issues seem to be introduced by 2.4.0 or 2.4.1.

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

Thanks for this extra information, I don't have the setup here to reproduce network share problems, but your testing shows there's certainly a problem to address here.

tags: added: regression
summary: - NoSuchFile on .bzr/repository/pack-names after committing in bzr
- explorer
+ NoSuchFile on .bzr/repository/pack-names after committing on network
+ share
Changed in bzr:
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
André Bachmann (andrebachmann-dd) wrote :
Download full text (3.9 KiB)

I just tried the same with bzr 2.4.2-1. The problem still exists (as mentioned only on network shares). What can I do to help with this problem?

Here is the relevant part of my .bzr.log:

Thu 2012-01-05 14:17:33 +0100
0.047 bazaar version: 2.4.2
0.047 bzr arguments: [u'init']
0.062 looking for plugins in C:/Users/bachmann/AppData/Roaming/bazaar/2.0/plugins
0.062 looking for plugins in C:/Program Files (x86)/Bazaar/plugins
0.093 encoding stdout as sys.stdout encoding 'cp850'
0.437 creating repository in file:///P:/bzrtest/.bzr/.
0.764 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x02BC8AB0> in file:///P:/bzrtest/
2.340 opening working tree 'P:/bzrtest'
2.511 opening working tree 'P:/bzrtest'
2.543 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
2.543 return code 0

Thu 2012-01-05 14:17:39 +0100
0.031 bazaar version: 2.4.2
0.031 bzr arguments: [u'add', u'.']
0.047 looking for plugins in C:/Users/bachmann/AppData/Roaming/bazaar/2.0/plugins
0.047 looking for plugins in C:/Program Files (x86)/Bazaar/plugins
0.078 encoding stdout as sys.stdout encoding 'cp850'
0.109 opening working tree 'P:/bzrtest'
8.908 skip control directory '.bzr'
8.986 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
8.986 return code 0
1065.694 opening working tree 'P:/bzrtest'
1068.049 check paths: None

Thu 2012-01-05 14:18:16 +0100
0.031 bazaar version: 2.4.2
0.031 bzr arguments: [u'qcommit', u'--ui-mode']
0.047 looking for plugins in C:/Users/bachmann/AppData/Roaming/bazaar/2.0/plugins
0.047 looking for plugins in C:/Program Files (x86)/Bazaar/plugins
0.078 encoding stdout as osutils.get_user_encoding() 'cp1252'
0.125 Deprecated function called
Called from:
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\commands.py", line 122, in run
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\commands.py", line 176, in run
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\commands.py", line 379, in _qbzr_run
0.125 Deprecated function called
Called from:
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\commands.py", line 379, in _qbzr_run
  File "bzrlib\symbol_versioning.pyo", line 101, in decorated_function
  File "bzrlib\builtins.pyo", line 84, in tree_files
0.156 opening working tree 'P:/bzrtest'

Thu 2012-01-05 14:18:29 +0100
0.046 bazaar version: 2.4.2
0.046 bzr arguments: [u'qsubprocess', u'--bencode', u'l6:commit2:-m9:first rev23:workspace4_20111221.zipe']
0.062 looking for plugins in C:/Users/bachmann/AppData/Roaming/bazaar/2.0/plugins
0.062 looking for plugins in C:/Program Files (x86)/Bazaar/plugins
0.093 encoding stdout as osutils.get_user_encoding() 'cp1252'
0.124 bazaar version: 2.4.2
0.124 bzr arguments: [u'commit', u'-m', u'first rev', u'workspace4_20111221.zip']
0.124 encoding stdout as osutils.get_user_encoding() 'cp1252'
0.171 opening working tree 'P:/bzrtest'
1.092 preparing to commit
[ 7132] 2012-01-05 14:18:30.888 INFO: Committing to: P:/bzrtest/
1.354 Selecting files for commit with filter [u'workspace4_20111221.zip']
[ 7132] 2012-01-05 14:18:30.894 INFO: added workspace4_20111221.zip
[ 7132] 2012-01-05 14:18:35.237 INFO: Committed revision 1.
5.702 Committed revid <email address hidden>...

Read more...

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

Hey André, from the new traceback in that log, that seems to be another issue this time around. Perhaps the previous symptom was also related to the same issue? See the other open bugs on that problem:

<https://bugs.launchpad.net/bzr-explorer/+bugs?field.tag=filewatcher>

Revision history for this message
André Bachmann (andrebachmann-dd) wrote :

I traced bzr.exe with 'Process Monitor' from the Sysinternals Suite some minutes ago. This (picture attached) seems to be the exact point where bzr has a problem. Maybe this helps...

Revision history for this message
André Bachmann (andrebachmann-dd) wrote :

Martin, these other reported bugs you linked in comment #6 also seems to target my problem.

However, I just tried my steps to reproduce the problem another time. Now there weren't any errors! No problems in my .bzr.log, no ACCESS DENIED messages from Process Monitor. Quite weird.

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

There may be a timing element to the bug, which means it randomly occurs or not. Trying to reproduce several times in a row and seeing whether all, none, or some, fail may tell you more. This is where being able to write an automated test is useful, as running it repeatedly doesn't require manual work. Unfortunately, that's not easy with bzr-explorer currently.

Revision history for this message
André Bachmann (andrebachmann-dd) wrote :

I did some further tests and got some interesting effects.
Number one: this problem occurs in about 30-50% of all cases if I work on a network share from our server.
More exciting is that Bazaar doesn't seem to be the reason for this problem. I just had an user who had a similar problem with another application (NI Labview) - it sometimes (about ~30% of the time) cannot delete and create a freshly compiled file on a network share due to not having the appropiate file access rights. This really looks like the same problem.

I will look deeper into this problem from the server side (Windows Server 2003 SBS - quite awful), but now these problems seem to indicate an underlying problem from our server. A quick fix for bzr may be to not only try to get a file once (and then print an error message with the errno), but to try this some more times. This may also help with bug #903218 and bug #901104.

Revision history for this message
marcus-aurelius (joerg.d.w) wrote :

I have the same difficulties with the letters "ä, ö, ü" but also spanish ones like "ñ" in version 2.5.1

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.