= Description = ## Please read this page. Lines prefixed with ## such as this one are comments, ## you can remove them (except for those after the "Plan" section.) ## Please follow the instructions given in those comments and the text. ## After creating the bug page, please subscribe to it! We may have questions ## that only you can answer, and if you get email when your bug changes it'll ## be much faster to get it fixed since you can answer the questions! Describe the bug... == Steps to reproduce == ## Describe the steps needed to reproduce the bug. If we can't reproduce it, we probably can't fix it. 1. Run !MoinMoin normally on a Mac running Snow Leopard (10.6.0+) with the Apache worker mpm and mod_wsgi. 2. Try to open a !MoinMoin page in your brower. 3. Fail. The Apache thread crashes. == Example == ##Add URL that show the bug, screenshot or test wiki markup that fail... ##URL: ##{{attachment:screenshot.png}} ##{{{ ##Example wiki markup that fail ##}}} == Component selection == ## Where you think is this bug happening ? (general, plugin [plugin name], theme [theme name], ... * general == Details == ## If you got a traceback, please save the traceback page as html and attach here: ## [[attachment:traceback.html]] Here is the link to the bug report I opened on !MacPorts (the link is to the workaround comment): http://trac.macports.org/ticket/22518#comment:18 Quoting from that bug report: So, I have done some more research into this. Here is what I have found. The problem should only exist on Snow Leopard, as it seems CFRuntime.c changed between 10.5 and 10.6. Looking at {{{void __CFInitialize(void)}}} in CFRuntime.c shows that "!CoreFoundation must be initialized on the main thread." To work around this problem while continuing to use the worker mpm with mod_wsgi, you can include the following in your wsgi config file: {{{ WSGIImportScript process-group= application-group=%{GLOBAL} }}} I think this will only work for one script though, but I'm not sure. !MoinMoin seems to use Carbon in a couple of places on the Mac. One is: !MoinMoin/util/filesys.py. In this file the realPathCase method imports Carbon.File on darwin. It is possible to rewrite this method to not use Carbon.File. See: [[attachment:filecase.c]], [[attachment:setup.py]], and [[attachment:filesys.py.patch]]. The patch assumes that the compiled library is in the base directory. !MoinMoin/support/werkzeug also uses Carbon and hence CoreFoundation all over the place. ## if the bug is in this wiki, just kill the table and write: This Wiki. ## If a traceback is not available, please fill in the details here: || '''!MoinMoin Version''' || All? || || '''OS and Version''' || Mac OS 10.6.0+ || || '''Python Version''' || 2.6 || || '''Server Setup''' ||Apache with the worker mpm and mod_wsgi OR Apache with mod_wsgi in daemon mode || || '''Server Details''' || A threaded apache server || || '''Language you are using the wiki in''' (set in the browser/UserPreferences) || English || == Workaround == ## How to deal with the bug until it is fixed Add the following to your moin.wsgi configuration: {{{ WSGIImportScript process-group= application-group=%{GLOBAL} }}} = Discussion = Isn't this rather a apache / mod_wsgi (on OS X platform) bug than a moin bug? I'm not even sure it is a bug, but it does require a workaround. I don't think anything needs to be changed in the moin code, but there should be a not in the configuration instructions for Apache + worker mpm + mod_wsgi that explains the workaround and why it is needed. The most logical place for the problem to be fixed is in Python, but because the Carbon libraries have been removed in Python 3, I doubt they are going to fix it. That or Apple would need to fix their libraries. It certainly isn't a moin bug, but I would like to be able to use moin on my Mac, and I think moin should have instructions for others who want to do the same thing. The files I attached are separate. See below. About the patches: * moin 1.9 depends on werkzeug, so patching filesys.py doesn't seem helpful if werkzeug causes the same problem anyway * I know that patching filesys.py does not fix the problem, but I wanted to attach the file anyway. It looks like Python 3 (I know moin isn't going to be ported for a long time, but eventually it will) has removed the Carbon libraries. It is unclear whether they will be added back in. In the case that they are not added back in, I wanted to include my replacement for moin for when you finally do port moin to Python 3. I probably should have included the files in the MoinMoinBugs/MacHfsPlusCaseInsensitive page since that is where they would be used. * platform specific C modules that need compilation on target platform are rather unwanted * I can imagine that. Especially platform specific C modules. But as I stated above, I wanted to post them here so they are available when moin is eventually ported (though I imagine they will need to be fixed to work in the future, at least the groundwork and research can be used). = Plan = ## This part is for Moin``Moin developers: * Priority: * Assigned to: * Status: ---- ## If you are a moin core developer, replace the category to Category* in these cases: ## Category MoinMoinNoBug - if this is not a bug. ## Category MoinMoinBugConfirmed - if you can confirm the bug on current code. ## Category MoinMoinBugFixed - after the bug is fixed in current code. CategoryMoinMoinBug