bzr gives "access denied" error on avfs

Bug #339846 reported by Denis Golovan
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Low
Unassigned

Bug Description

Hi.

I have problem with bzr ls, bzr status commands when using avfs. I track all of my /etc and other configs in bzr, so I have .bzr directory in root.

Just in case you don't know - avfs is virtual filesystem for transparent working with archives like with directories.
So, the problem is that even if I have no versioned files inside my ~/.avfs (directory where root is mounted with archive-viewing capabilities), bzr ls --versioned, bzr status --versioned still report an error when I have avfs mounted.

The error is always the same "bzr: ERROR: [Errno 13] Отказано в доступе" (access denied in Russian)

Trying to add this .avfs directory in ignored list changes nothing. Imho, it 's because ignore list is used only when adding something. The only workaround is to umount avfs.

So, is it possible to disable access to ~/.avfs at all?

Thanks

Tags: filesystem
Revision history for this message
Martin Pool (mbp) wrote :

Hi Denis,

Thanks for the report.

Can you please post the traceback from ~/.bzr.log?

Revision history for this message
Denis Golovan (denisgolovan) wrote :

Of course.

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

Пнд 2009-03-09 13:41:33 +0200
0.046 bzr arguments: [u'status', u'-V']
0.071 looking for plugins in /root/.bazaar/plugins
0.071 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.245 encoding stdout as sys.stdout encoding 'UTF-8'
0.367 opening working tree '/'
0.382 check paths: None
0.451 Traceback (most recent call last):
  File "//usr/lib/python2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "//usr/lib/python2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "//usr/lib/python2.5/site-packages/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "//usr/lib/python2.5/site-packages/bzrlib/commands.py", line 853, in ignore_pipe
    result = func(*args, **kwargs)
  File "//usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 223, in run
    show_pending=(not no_pending))
  File "//usr/lib/python2.5/site-packages/bzrlib/status.py", line 114, in show_tree_status
    want_unversioned=want_unversioned)
  File "//usr/lib/python2.5/site-packages/bzrlib/tree.py", line 95, in changes_from
    want_unversioned=want_unversioned,
  File "//usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "//usr/lib/python2.5/site-packages/bzrlib/tree.py", line 877, in compare
    want_unversioned=want_unversioned)
  File "//usr/lib/python2.5/site-packages/bzrlib/delta.py", line 217, in _compare_trees
    want_unversioned=want_unversioned):
  File "_dirstate_helpers_c.pyx", line 1347, in _dirstate_helpers_c.ProcessEntryC.__next__
  File "_dirstate_helpers_c.pyx", line 1613, in _dirstate_helpers_c.ProcessEntryC._iter_next
  File "_dirstate_helpers_c.pyx", line 1772, in _dirstate_helpers_c.ProcessEntryC._loop_one_block
  File "//usr/lib/python2.5/site-packages/bzrlib/osutils.py", line 1392, in _walkdirs_utf8
    dirblock = sorted(read_dir(relroot, top))
  File "_readdir_pyx.pyx", line 237, in _readdir_pyx.UTF8DirReader.read_dir
  File "_readdir_pyx.pyx", line 343, in _readdir_pyx._read_dir
OSError: [Errno 13] Отказано в доступе

0.452 return code 3

Revision history for this message
Martin Pool (mbp) wrote :

The precise failure is being masked a bit by bug 338563, which is that the pyrex code does not report the filename that's causing the error. If you run from bzr trunk (or wait for 1.13rc1), or run bzr under strace we should see what precisely is going wrong.

However, knowing it's line 343 does show it's

                    stat_result = lstat(entry.d_name, &statvalue._st)
                    if stat_result != 0:
                        if errno != ENOENT:
                            raise OSError(errno, strerror(errno))

This seems to be pretty strange: we can see the file in the directory listing but we get permission denied trying to lstat it, which is not usual unix semantics: if you can see it, you can stat it.

What happens if you run ls -l in that directory?

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 339846] [NEW] bzr does not like avfs

We probably are statting ignored files due to layers - its so much
faster to readdir-and-stat that we just do that and then sort ignored
files out later.

What does 'ls -ld ~/.avfs' report?

-Rob

Revision history for this message
Denis Golovan (denisgolovan) wrote :

Strace log - see attachment

dencomp ~ # LANG=C ls -ld /home/denis/.avfs
ls: cannot access /home/denis/.avfs: Permission denied

Here you see that I'm trying under root and avfs is mounted under ordinary user denis.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Not sure if it's a duplicate but it is similar to bug #430183

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

Linking to bug #312416 as there is also some similarity.

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