#1005 closed defect (invalid)

twistd plugin permissions problem causes users to think that tahoe-lafs unit tests failed

Reported by: nejucomo Owned by: somebody
Priority: major Milestone: soon
Component: code Version: 1.6.1
Keywords: install docs twisted mac snowleopard Cc:
Launchpad Bug:

Description

I just installed 1.6.1 on an osx 10.6 box, seemingly successfully: $ python ./setup.py build ... Output attached.

But when I run unittests many fail: $ python ./setup.py test ... Output attached.

The first failure appears before unittest output, and may be irrelevant:

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/python/usage.py", line 241, in parseOptions
    self.postOptions()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/scripts/trial.py", line 293, in postOptions
    self['reporter'] = self._loadReporterByName(self['reporter'])
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/scripts/trial.py", line 279, in _loadReporterByName
    for p in plugin.getPlugins(itrial.IReporter):
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/plugin.py", line 200, in getPlugins
    allDropins = getCache(package)
--- <exception caught here> ---
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/plugin.py", line 179, in getCache
    dropinPath.setContent(pickle.dumps(dropinDotCache))
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/python/filepath.py", line 623, in setContent
    f = sib.open('w')
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/python/filepath.py", line 433, in open
    return open(self.path, mode+'b')
exceptions.IOError: [Errno 13] Permission denied: '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/plugins/dropin.cache.new'

Attachments (3)

tahoe-lafs-1.6.1.build.log (29.5 KB) - added by nejucomo at 2010-03-27T18:24:27Z.
The installation output on osx 10.6
tahoe-lafs-1.6.1.test.log (15.1 KB) - added by nejucomo at 2010-03-27T18:24:48Z.
The output of: $ python ./setup.py test
tahoe-lafs-1.6.1.test2.log (61.5 KB) - added by nejucomo at 2010-03-27T18:39:17Z.
The unittests after running "sudo twistd --help".

Download all attachments as: .zip

Change History (10)

Changed at 2010-03-27T18:24:27Z by nejucomo

The installation output on osx 10.6

Changed at 2010-03-27T18:24:48Z by nejucomo

The output of: $ python ./setup.py test

comment:1 Changed at 2010-03-27T18:38:52Z by nejucomo

From irc:

ducki2p 11:20 
thats a known twisted issue; you need to run twistd --help as root once to complete its setup
nejucomo 11:24 
Oh, thanks!
24:45
I wonder if we need to modify the install instructions for tahoe-lafs in that case.

I did indeed run "sudo twistd --help" then reran the unittests and this exception went away. Attached the new unittest logs.

Notice however there are still failures documented in ticket #1006.

Changed at 2010-03-27T18:39:17Z by nejucomo

The unittests after running "sudo twistd --help".

comment:2 Changed at 2010-03-29T00:15:01Z by davidsarah

  • Keywords install docs snowleopard added; snowleapord removed
  • Milestone changed from undecided to 1.7.0

comment:3 Changed at 2010-03-29T15:35:17Z by zooko

This is Twisted #2409 but let's leave this ticket (Tahoe-LAFS #1005) open in case we can figure out a work-around, possibly involving invoking sudo twistd --help at some point or at least updating the documentation to ask the user to do so.

comment:4 Changed at 2010-04-16T21:20:36Z by zooko

  • Summary changed from twisted file permissions cause unittest failures on osx 10.6 to twistd plugin permissions problem causes users to think that tahoe-lafs unit tests failed

comment:5 Changed at 2010-06-19T03:19:38Z by davidsarah

  • Milestone changed from 1.7.0 to soon

comment:6 Changed at 2011-07-23T00:01:24Z by davidsarah

  • Resolution set to invalid
  • Status changed from new to closed

The fix for Twisted #2409 was released in Twisted v11.0. I don't think we need to do anything to work around it in Tahoe-LAFS; the problem will go away as people use newer versions of Twisted.

comment:7 Changed at 2011-07-23T00:06:00Z by davidsarah

Note that fixed versions of Twisted will still print the single line "Unexpected error while writing cache file". We might want to document that that is harmless.

Note: See TracTickets for help on using tickets.