Skip to content
This repository has been archived by the owner. It is now read-only.

carddav incorrect handling of xattrs on Debian Linux 5 #289

Closed
macosforgebot opened this issue Feb 17, 2010 · 2 comments
Closed

carddav incorrect handling of xattrs on Debian Linux 5 #289

macosforgebot opened this issue Feb 17, 2010 · 2 comments

Comments

@macosforgebot
Copy link

@macosforgebot macosforgebot commented Feb 17, 2010

alex.stapleton@… originally submitted this as ticket:362

  • Keywords: carddav, linux, xattr

Running ./run -a to get carddav running.

Logging in via HTTPS results in

Internal Server Error

An error occurred rendering the requested page. More information is available in the server log.

From the logs you can see this exception…

2010-02-17 21:44:06+0000 [-] [caldav-0]         Traceback (most recent call last):
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/Twisted/twisted/internet/defer.py", line 184, in addCallbacks
2010-02-17 21:44:06+0000 [-] [caldav-0]             self._runCallbacks()
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/Twisted/twisted/internet/defer.py", line 326, in _runCallbacks
2010-02-17 21:44:06+0000 [-] [caldav-0]             self.result = callback(self.result, *args, **kw)
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/Twisted/twisted/internet/defer.py", line 287, in _continue
2010-02-17 21:44:06+0000 [-] [caldav-0]             self.unpause()
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/Twisted/twisted/internet/defer.py", line 283, in unpause
2010-02-17 21:44:06+0000 [-] [caldav-0]             self._runCallbacks()
2010-02-17 21:44:06+0000 [-] [caldav-0]         --- <exception caught here> ---
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/Twisted/twisted/internet/defer.py", line 326, in _runCallbacks
2010-02-17 21:44:06+0000 [-] [caldav-0]             self.result = callback(self.result, *args, **kw)
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/Twisted/twisted/web2/dav/method/get.py", line 49, in <lambda>
2010-02-17 21:44:06+0000 [-] [caldav-0]             d.addCallback(lambda _: super(twisted.web2.dav.static.DAVFile, self).http_GET(request))
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/Twisted/twisted/web2/resource.py", line 128, in http_GET
2010-02-17 21:44:06+0000 [-] [caldav-0]             return self.render(request)
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/CalendarServer-trunk/twistedcaldav/extensions.py", line 798, in render
2010-02-17 21:44:06+0000 [-] [caldav-0]             return self.renderDirectory(request)
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/CalendarServer-trunk/twistedcaldav/extensions.py", line 873, in renderDirectory
2010-02-17 21:44:06+0000 [-] [caldav-0]             d = self.renderDirectoryBody(request)
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/CalendarServer-trunk/twistedcaldav/util.py", line 102, in wrapper
2010-02-17 21:44:06+0000 [-] [caldav-0]             return f(*args, **kwargs)
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/CalendarServer-trunk/twistedcaldav/extensions.py", line 893, in renderDirectoryBody
2010-02-17 21:44:06+0000 [-] [caldav-0]             url, name, size, lastModified, contentType = self.getChildDirectoryEntry(child, name)
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/CalendarServer-trunk/twistedcaldav/extensions.py", line 1019, in getChildDirectoryEntry
2010-02-17 21:44:06+0000 [-] [caldav-0]             contentType = child.contentType()
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/Twisted/twisted/web2/dav/resource.py", line 521, in contentType
2010-02-17 21:44:06+0000 [-] [caldav-0]             if self.hasDeadProperty((davxml.dav_namespace, "getcontenttype")):
2010-02-17 21:44:06+0000 [-] [caldav-0]           File "/home/alexs/Twisted/twisted/web2/dav/resource.py", line 476, in hasDeadProperty
2010-02-17 21:44:07+0000 [-] [caldav-0]             return self.deadProperties().contains(qname)
2010-02-17 21:44:07+0000 [-] [caldav-0]           File "/home/alexs/Twisted/twisted/web2/dav/xattrprops.py", line 237, in contains2010-02-17 21:44:07+0000 [-] [caldav-0]             statusForFailure(Failure()),
2010-02-17 21:44:07+0000 [-] [caldav-0]           File "/home/alexs/Twisted/twisted/web2/dav/http.py", line 310, in statusForFailure2010-02-17 21:44:07+0000 [-] [caldav-0]             failure.raiseException()
2010-02-17 21:44:07+0000 [-] [caldav-0]           File "/home/alexs/Twisted/twisted/web2/dav/xattrprops.py", line 229, in contains2010-02-17 21:44:07+0000 [-] [caldav-0]             self.attrs.get(key)2010-02-17 21:44:07+0000 [-] [caldav-0]           File "/home/alexs/xattr/build/lib.linux-i686-2.5/xattr/__init__.py", line 73, in get
2010-02-17 21:44:07+0000 [-] [caldav-0]             return self._get(name, 0, 0, options | self.options)2010-02-17 21:44:07+0000 [-] [caldav-0]           File "/home/alexs/xattr/build/lib.linux-i686-2.5/xattr/__init__.py", line 17, in _func
2010-02-17 21:44:07+0000 [-] [caldav-0]             return func(first, *args)2010-02-17 21:44:07+0000 [-] [caldav-0]         exceptions.IOError: [Errno 95] Operation not supported: '/home/alexs/CalendarServer-trunk/data/Documents/calendars'

I have reduced this somewhat by instrumenting the xattr library.

import xattr
xattr.getxattr("data/Documents/calendars","user.{DAV:}getcontenttype")

Will throw the same IOError.

Running caldav as root gets around this xattr problem but memcached doesn't run. (Which also breaks the server. No pages load.)

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Oct 4, 2010

Marcus.Ilgner@… originally submitted this as comment:1:⁠ticket:362


This seems to work correctly if I add user_xattr to the mount options of the corresponding partition.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Feb 14, 2011

@wsanchez originally submitted this as comment:2:⁠ticket:362

  • Radar deleted
  • Status changed from new to closed
  • Resolution changed from to Software changed

Now that we use a database, there are no xattrs to worry about.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.