[mapserver-users] Segfault - LINE layer

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Fri Aug 18 07:54:09 PDT 2017


Hi,

As a quick workaround edit your DATA:

where type in ('trunk','motorway','primary') AND geometry is not null

-Jukka Rahkonen-

Lähettäjä: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Dave Barter
Lähetetty: 18. elokuuta 2017 16:05
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [mapserver-users] Segfault - LINE layer


On 18 Aug 2017, at 13:44, Lime, Steve D (MNIT) <steve.lime at state.mn.us<mailto:steve.lime at state.mn.us>> wrote:

I'd call it a bug. What version? Can you prepare a small test case?

MapServer version 7.0.4 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

I have tracked it down to a specific geometry:-

010200000000000000 = ‘LINESTRING EMPTY’



________________________________
From: mapserver-users <mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org>> on behalf of Dave Barter <dave at phased.co.uk<mailto:dave at phased.co.uk>>
Sent: Friday, August 18, 2017 5:13:29 AM
To: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Subject: [mapserver-users] Segfault - LINE layer

This call:-

/usr/lib/cgi-bin/mapserv.ngx -nh "QUERY_STRING=map=/usr/src/app/mapfiles/api/wms_osm_google_world_bw.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&STYLES=&BBOX=-6114.962263%2c6099063.360931%2c162657.996191%2c6267836.319384&WIDTH=276&HEIGHT=276&FORMAT=image%2fpng&SRS=EPSG%3a3857&LAYERS=roads8&transparent=false

Is giving me:-

Segmentation fault (core dumped)

For the layer definition:-

LAYER
    GROUP "default"
    STATUS ON
    TYPE LINE
    MINSCALEDENOM 1300032
    MAXSCALEDENOM 2600064
    NAME "roads8"
    DEBUG 5
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER"
    {%public_map_user%}
    PROJECTION
        "init=epsg:900913"
    END
    DATA "geometry from (select osm_id,geometry,name as name,ref,type from mapping_osm.osm_new_roads_gen1 where type in ('trunk','motorway','primary') order by z_order asc) as foo using unique osm_id using srid=900913"
    LABELITEM "name"
    CLASSITEM "type"
    CLASS
        EXPRESSION {primary,primary_link}
        STYLE
            WIDTH 0.5
            COLOR 242 242 242
        END
    END
    CLASS
        EXPRESSION "motorway"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
            COLOR 242 242 242

        END
    END
    CLASS
        EXPRESSION "trunk"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
             COLOR 242 242 242
        END
    END
END

When I look in my debug file I see the following as last set of lines:-

[Fri Aug 18 11:09:39 2017].945225 msPostGISReadShape: PQgetlength = 7
[Fri Aug 18 11:09:39 2017].945236 msPostGISReadShape: [type] "primary"
[Fri Aug 18 11:09:39 2017].945248 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945259 msPostGISReadShape: [name] ""
[Fri Aug 18 11:09:39 2017].945270 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945281 msPostGISReadShape: [ref] ""
[Fri Aug 18 11:09:39 2017].945292 msPostGISReadShape: Setting shape->index = 307691570
[Fri Aug 18 11:09:39 2017].945303 msPostGISReadShape: Setting shape->resultindex = 327
[Fri Aug 18 11:09:39 2017].945314 msPostGISReadShape: [index] 307691570
[Fri Aug 18 11:09:39 2017].945346 msPostGISReadShape: [shape] LINESTRING (139231.1053743003285490 6233477.4797634640708566, 139274.7760105324559845 6233447.9814142314717174)
[Fri Aug 18 11:09:39 2017].945369 msPostGISLayerNextShape called.
[Fri Aug 18 11:09:39 2017].945383 msPostGISReadShape called.
[Fri Aug 18 11:09:39 2017].94

So it seems to segfault during  msPostGISReadShape.

I’ve checked the query and it is pulling 3110 linestrings from the database.

But I am not sure why is is segfaulting? Is this a bug?

Dave Barter
dave at phased.co.uk<mailto:dave at phased.co.uk>
@citizenfishy
www.phased.co.uk<http://www.phased.co.uk/>

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170818/ef2c01e1/attachment-0001.html>


More information about the mapserver-users mailing list