[CalendarServer-dev] Exception in recvfd --was: Re: continuing work on FreeBSD ports
Axel Rau
Axel.Rau at Chaos1.DE
Tue Feb 12 15:05:30 PST 2013
I did not make any progress. I tried
- in sendmsg_sendmsg to check for the right type arg (with PyErr_Format, got no error)
- to print out the args with PySys_WriteStdout (did not get anything)
- I'm not even sure, if this error is related to my problem:
test_sendSubProcessFD ... [ERROR]
- If I try control_message->cmsg_type = 0;, I get Errno 22 in sendfd, as expected
I need more pointers...
Axel
Am 08.02.2013 um 13:30 schrieb Fredrik Unger:
> Hi,
>
> I found some problem with sendfd.c some time ago. [1]
>
> My problem was with 64 bit Debian and twext/python/sendmsg.c
>
> Have a look and see if there is anything that is FreeBSD non friendly there.
>
> You can try with the tests :
> cd twext/python
> trial test/test_sendmsg.py
> That could be easier to debug than the full code.
>
> On my setup I failed test_sendSubProcessFD now, but I just did a quick test. Sources are not up to date or anything..
>
> You can also add some printouts to the C code, and see if you find something bad.
>
> It is most probably some flags or so that might not be covered for BSD ?
> and sendmsg.c is the interface to the operating system from python..
>
> Just some suggestions. If you need more pointers let me know, but I have no experience with FreeBSD..
>
> /Fred
>
> [1] https://lists.macosforge.org/pipermail/calendarserver-users/2012-August/002032.html
>
> On 02/08/2013 01:04 PM, Axel Rau wrote:
>>
>> Am 02.02.2013 um 17:39 schrieb Axel Rau:
>>
>>> [caldav-0] File "/usr/local/lib/python2.7/site-packages/Calendar_and_Contacts_Server-4.2-py2.7-freebsd-8.2-RELEASE-p9-amd64.egg/twext/python/sendfd.py", line 65, in recvfd
>>> [caldav-0] [unpackedFD] = unpack("i", packedFD)
>>> [caldav-0] struct.error: unpack requires a string argument of length 4
>> This is hard to debug. I did not make much progress.
>> If I switch to kqueue-reactor, I'm getting another FD problem when starting listening:
>> ---
>> Log opened.
>> twistd 12.1.0 (/usr/local/bin/python2.7 2.7.3) starting up.
>> reactor class: twext.internet.kqreactor.KQueueReactor.
>> ControlSocket starting on '/var/db/caldavd/caldavd.sock'
>> Traceback (most recent call last):
>> File "/usr/local/bin/twistd", line 14, in<module>
>> run()
>> File "/usr/local/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 27, in run
>> app.run(runApp, ServerOptions)
>> File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 652, in run
>> runApp(config)
>> File "/usr/local/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 23, in runApp
>> _SomeApplicationRunner(config).run()
>> File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 390, in run
>> self.postApplication()
>> File "/usr/local/lib/python2.7/site-packages/twisted/scripts/_twistd_unix.py", line 230, in postApplication
>> self.startApplication(self.application)
>> File "/usr/local/lib/python2.7/site-packages/twisted/scripts/_twistd_unix.py", line 340, in startApplication
>> service.IService(application).privilegedStartService()
>> File "/usr/local/lib/python2.7/site-packages/twisted/application/service.py", line 277, in privilegedStartService
>> service.privilegedStartService()
>> File "/usr/local/lib/python2.7/site-packages/twisted/application/service.py", line 277, in privilegedStartService
>> service.privilegedStartService()
>> File "/usr/local/lib/python2.7/site-packages/Calendar_and_Contacts_Server-4.2-py2.7-freebsd-9.1-RELEASE-amd64.egg/calendarserver/tap/caldav.py", line 487, in privilegedStartService
>> super(GroupOwnedUNIXServer, self).privilegedStartService()
>> File "/usr/local/lib/python2.7/site-packages/twisted/application/internet.py", line 105, in privilegedStartService
>> self._port = self._getPort()
>> File "/usr/local/lib/python2.7/site-packages/twisted/application/internet.py", line 133, in _getPort
>> 'listen%s' % (self.method,))(*self.args, **self.kwargs)
>> File "/usr/local/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 406, in listenUNIX
>> p.startListening()
>> File "/usr/local/lib/python2.7/site-packages/twisted/internet/unix.py", line 303, in startListening
>> self.startReading()
>> File "/usr/local/lib/python2.7/site-packages/twisted/internet/abstract.py", line 416, in startReading
>> self.reactor.addReader(self)
>> File "/usr/local/lib/python2.7/site-packages/Calendar_and_Contacts_Server-4.2-py2.7-freebsd-9.1-RELEASE-amd64.egg/twext/internet/kqreactor.py", line 84, in addReader
>> self._updateRegistration(fd, KQ_FILTER_READ, KQ_EV_ADD|KQ_EV_ENABLE)
>> File "/usr/local/lib/python2.7/site-packages/Calendar_and_Contacts_Server-4.2-py2.7-freebsd-9.1-RELEASE-amd64.egg/twext/internet/kqreactor.py", line 74, in _updateRegistration
>> self._kq.control([ev], 0, 0)
>> OSError: [Errno 9] Bad file descriptor
>> ---
>> Any help appreciated,
>> Axel
>> ---
>> PGP-Key:29E99DD6 ☀ +49 151 2300 9283 ☀ computing @ chaos claudius
>>
>> _______________________________________________
>> calendarserver-dev mailing list
>> calendarserver-dev at lists.macosforge.org
>> https://lists.macosforge.org/mailman/listinfo/calendarserver-dev
>
> _______________________________________________
> calendarserver-dev mailing list
> calendarserver-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/calendarserver-dev
---
PGP-Key:29E99DD6 ☀ +49 151 2300 9283 ☀ computing @ chaos claudius
More information about the calendarserver-dev
mailing list