Re: [ZMapServer-Developers] mapserver/zmapserver - zope segfaults
Status: Alpha
Brought to you by:
sgillies
|
From: Sean G. <sgi...@fr...> - 2003-09-05 14:24:03
|
On Friday, September 5, 2003, at 01:44 AM, Michael Schulz wrote: > Hi Sean, > > when you are using zmapserver on your apple, do you experience > segfaults of your zope server at all? > > I am working on a windows based zmapserver application that with the > recent versions of mapscript/zmapserver (well, 4.0/0.7.4) keeps > segfaulting, but when i start the zope server with the option to only > use one thread (-t 1) then it is more stable. > > Could it be that mapscript/zmapserver has problems with the threading > mechanisms of zope? > > Another hint i am looking into, is that your demo application is > working without problems, so it also has to do with the application > implementation. And one difference could be different ways of calling > zmapserver instance calls, e.g. i used <dtml-with> tags rather > frequent, these seemed to cause problems, after removing them the > application was more stable. Also, i am using full url's rather than > relative one's. > > I think this all has to do with the way new threads are being created, > and if that happens (perhaps in combination with the use of the > sessions) mapscript segfaults. > > Cheers, Michael > The one segfault I experience lately occurs when exporting map files. I've entered this one into the ZMapServer issue tracker. Another source of segfaults is from a bug in the MapScript exceptions wrapper code. Michael, you have this fix, but others may not. I've fixed it in the MapServer CVS and as soon as Steve Lime agrees to a 4.0.1 release, it'll be more available. Meanwhile, I really need to put a patch up on the MapServer site. As J.F. mentions in another msg, MapServer has not been certified thread-safe. I made the decision to begin with ZMapServer despite the threading uncertainty believing that MapServer would soon catch up, and I trust that MapServer will soon be made thread-safe. There are many groups (PHP, Java, mod-perl users) other than ZMapServer users, so our collective needs will be met. Meanwhile, my policy has been to use locks from the Python threading module around unsafe MapScript code (like the mapObj() constructor), and to be hopeful about the drawing code. I don't think that DTML is especially triggering thread problems any more than the TAL stuff in my demo, but I can't say for sure. Here are some other MapScript threading issues of which I am aware: If you build Python2.1 from source, threading support is not built by default (correct me if I am wrong). I cannot say whether your Python from RPM or from an ActiveState installer was configured --with-threads. I think that Python threads are a must, particularly for Zope. If you are using the Python distributed with a Win32 Zope binary, I think that you should be covered. Yes? MapServer should be configured and built --with-threads. On Win32 systems this means getting the Win32 pthreads and installing them. Unless thread support is built into MapServer, you will almost certainly experience problems with MapServer errorObjs and the MapScript exception wrappers. cheers, Sean -- Sean Gillies sgillies at frii dot com http://www.frii.com/~sgillies |