[mapserver-users] Segfault - LINE layer

Dave Barter dave at phased.co.uk
Fri Aug 18 03:13:29 PDT 2017


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
@citizenfishy
www.phased.co.uk



More information about the mapserver-users mailing list