[MAPSERVER-USERS] msProcessProjection(): Projection library error.
Tamas Szekeres
szekerest at gmail.com
Mon Mar 3 15:45:54 PST 2008
Frank,
I think this issue might be originated to a missing lock around the
static pj_errno in the proj library. Apparently the 'no system list'
indicates an invalid error code that is: an invalid actual value of
pj_errno. I guess the code below may run against another pj invocation
that is not locked.
Best regards,
Tamas
2008/3/4, Frank Warmerdam <warmerdam at pobox.com>:
> rich.fromm wrote:
> > I'm not sure if anyone is going to be able to be of any help with this, since
> > I am not able to consistently reproduce the problem. Nevertheless, based on
> > previous instructions, just in case, I am reporting a rare problem seen
> > under
> > heavy load.
> >
> > I am stress testing a custom webapp using java mapscript. On several
> > occasions, I have observed mapserver logging an error, which caused tomcat
> > to
> > return a 500 (Internal Server Error), but NOT crash. The error is as
> > follows:
> >
> > --- begin ---
> > java.lang.UnknownError: msProcessProjection(): Projection library error. no
> > system list, errno: 22
> >
> > at edu.umn.gis.mapscript.mapscriptJNI.new_mapObj(Native Method)
> > at edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:288)
> > --- end ---
>
>
> Rich,
>
> Looking at the code in mapfile.c I see:
>
>
> msAcquireLock( TLOCK_PROJ );
> if( !(p->proj = pj_init(numargs, args)) ) {
> int *pj_errno_ref = pj_get_errno_ref();
> msReleaseLock( TLOCK_PROJ );
> msSetError(MS_PROJERR, pj_strerrno(*pj_errno_ref),
> "msProcessProjection()");
> return(-1);
> }
>
> msReleaseLock( TLOCK_PROJ );
>
> I suspect the msReleaseLock( TLOCK_PROJ ) ought to be after the
> msSetError() instead of before it, though it is also possible this
> would introduce a deadlock condition if something else that is
> waiting for the PROJ lock already holds the error lock. You might
> want to experiment with this if you are comfortable rebuilding things.
>
> If this sequence turns out to be the issues there are certainly ways
> to restructure the code a bit to be safe.
>
> But this wouldn't explain why you are only occationally getting this
> error, so I suspect it is a red herring - not your real issue for which
> I have no useful advice.
>
> Best regards,
>
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | President OSGeo, http://osgeo.org
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list