TestAtomicFile.test_mode_02666 failure on NFS mounted filesystem

Bug #56316 reported by Jamie Wilkinson
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
John A Meinel

Bug Description

booty% bzr pull
Using saved location: http://bazaar-ng.org/bzr/bzr.dev/
All changes applied successfully.
5 revision(s) pulled.
booty% ./bzr selftest --no-plugins
       bzr: /home/jaq/src/bzr/bzr.dev/bzr
    bzrlib: /home/jaq/src/bzr/bzr.dev/bzrlib

running tests...
/home/jaq/src/bzr/bzr.dev/bzrlib/transport/ftp.py:716: UserWarning: You must install medusa (http://www.amk.ca/python/code/medusa.html) for FTP tests
  warn("You must install medusa (http://www.amk.ca/python/code/medusa.html) for FTP tests")
bzrlib.tests.test_atomicfile.TestAtomicFile.test_mode_02666: FAIL
[=====================================================] OK 3082/3082
======================================================================
FAIL: test_mode_02666 (bzrlib.tests.test_atomicfile.TestAtomicFile)

vvvv[log from bzrlib.tests.test_atomicfile.TestAtomicFile.test_mode_02666]----

^^^^[log from bzrlib.tests.test_atomicfile.TestAtomicFile.test_mode_02666]----
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jaq/src/bzr/bzr.dev/bzrlib/tests/test_atomicfile.py", line 97, in test_mode_02666
    self._test_mode(02666)
  File "/home/jaq/src/bzr/bzr.dev/bzrlib/tests/test_atomicfile.py", line 94, in _test_mode
    self.assertEqualMode(mode, stat.S_IMODE(st.st_mode))
  File "/home/jaq/src/bzr/bzr.dev/bzrlib/tests/__init__.py", line 500, in assertEqualMode
    'mode mismatch %o != %o' % (mode, mode_test))
AssertionError: mode mismatch 2666 != 666

----------------------------------------------------------------------
Ran 3082 tests in 3844.654s

FAILED (failures=1)
tests failed
Exception in thread Thread-423 (most likely raised during interpreter shutdown):Traceback (most recent call last):
  File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
  File "/usr/lib/python2.4/threading.py", line 422, in run
  File "/home/jaq/src/bzr/bzr.dev/bzrlib/transport/sftp.py", line 1172, in _run_server
exceptions.AttributeError: 'NoneType' object has no attribute 'error'
Exception in thread Thread-420 (most likely raised during interpreter shutdown):Traceback (most recent call last):
  File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
  File "/usr/lib/python2.4/threading.py", line 422, in run
  File "/home/jaq/src/bzr/bzr.dev/bzrlib/transport/sftp.py", line 1172, in _run_server
exceptions.AttributeError: 'NoneType' object has no attribute 'error'
Exception in thread Thread-417 (most likely raised during interpreter shutdown):Traceback (most recent call last):
  File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
  File "/usr/lib/python2.4/threading.py", line 422, in run
  File "/home/jaq/src/bzr/bzr.dev/bzrlib/transport/sftp.py", line 1172, in _run_server
exceptions.AttributeError: 'NoneType' object has no attribute 'error'
Exception in thread Thread-434 (most likely raised during interpreter shutdown):Traceback (most recent call last):
  File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
  File "/usr/lib/python2.4/threading.py", line 422, in run
  File "/home/jaq/src/bzr/bzr.dev/bzrlib/transport/sftp.py", line 1172, in _run_server
exceptions.AttributeError: 'NoneType' object has no attribute 'error'
Exception in thread Thread-431 (most likely raised during interpreter shutdown):Traceback (most recent call last):
  File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
  File "/usr/lib/python2.4/threading.py", line 422, in run
  File "/home/jaq/src/bzr/bzr.dev/bzrlib/transport/sftp.py", line 1172, in _run_server
exceptions.AttributeError: 'NoneType' object has no attribute 'error'
Exception in thread Thread-428 (most likely raised during interpreter shutdown):Traceback (most recent call last):
  File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
  File "/usr/lib/python2.4/threading.py", line 422, in run
  File "/home/jaq/src/bzr/bzr.dev/bzrlib/transport/sftp.py", line 1172, in _run_server
exceptions.AttributeError: 'NoneType' object has no attribute 'error'

I'm impressed though, last time i pulled dev and ran selftest, there were several tens of failures that i couldn't replicate on a non-NFS filesystem

Revision history for this message
John A Meinel (jameinel) wrote :

Well, all the 'exceptions.AttributeError' stuff looks like just cleanup issues of the sftp system.
It would seem that the 'socket' module is somehow destroyed before the thread is told to cleanup, so then it tries to grab an attribute, but the module is already None.
It seems that for some reason, your sftp server threads are not shutting down when they are asked.

As for the mode 2666 problem. What do you recommend? We are testing that we can set mode = 02666 when requested. On NFS it seems that we can't. That would seem to be a genuine failure. It is a Platform Deficiency, and not a bug in bzr specifically. I'm not sure how to detect the specific deficiency, though.

If you can think of a way to detect that the platform won't do what we want, I suppose we could just skip the test.

(One possibility would be to create a different file, and directly chmod it to 2666, if that fails, just skip the test).

Revision history for this message
John A Meinel (jameinel) wrote :

It took me a while to realize that we don't need to set a files permissions to 02666, so the test has been removed in bzr-0.11

Changed in bzr:
assignee: nobody → jameinel
importance: Undecided → Medium
status: Unconfirmed → Fix Released
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.