<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I've managed to run mapserv through gdb, and my suspicions were
confirmed - it dies in the AGG part:<br>
<br>
...<br>
Reading symbols from shared object read from target memory...done.<br>
Loaded system supplied DSO at 0xa3e000<br>
[Thread debugging using libthread_db enabled]<br>
[New Thread -1208244032 (LWP 18090)]<br>
<br>
<b>Program received signal SIGSEGV, Segmentation fault.</b><br>
[Switching to Thread -1208244032 (LWP 18090)]<br>
<b>0x00402b8c in agg::vertex_sequence&lt;agg::vertex_dist, 6u&gt;::add
() from /usr/lib/libagg.so.2</b><br>
(gdb) where<br>
#0  0x00402b8c in agg::vertex_sequence&lt;agg::vertex_dist, 6u&gt;::add
() from /usr/lib/libagg.so.2<br>
#1  0x00402c2f in agg::vertex_sequence&lt;agg::vertex_dist,
6u&gt;::modify_last () from /usr/lib/libagg.so.2<br>
#2  0x004050e5 in agg::vcgen_stroke::add_vertex () from
/usr/lib/libagg.so.2<br>
#3  0x080d2f4c in agg::conv_adaptor_vcgen&lt;line_adaptor,
agg::vcgen_stroke, agg::null_markers&gt;::vertex (this=0xbfdcdbf4,
x=0xbfdcdc98, y=0xbfdcdca0)<br>
    at
/home/adrianp/mapserver/mapserver-5.4.1/../agg-2.5/include/agg_conv_adaptor_vcgen.h:115<br>
#4  0x080e4206 in
AGGMapserverRenderer::renderPolyline&lt;line_adaptor&gt;
(this=0xa079968, p=@0xa081b58, color=@0xbfdcdf48, width=1,
dashstylelength=0, dashstyle=0x9c27980, <br>
    lc=agg::round_cap, lj=agg::round_join) at
/home/adrianp/mapserver/mapserver-5.4.1/../agg-2.5/include/agg_rasterizer_scanline_aa.h:206<br>
#5  0x080ccc46 in msDrawLineSymbolAGG (symbolset=0x9c2556c,
image=0x9c4bb78, p=0xbfdce298, style=0x9c3ba18, scalefactor=1) at
mapagg.cpp:1672<br>
#6  0x080b331d in msDrawLineSymbol (symbolset=0x9c2556c,
image=0x9c4bb78, p=0xbfdce298, style=0x9c3ba18, scalefactor=1) at
mapdraw.c:2117<br>
#7  0x080b1d4d in msDrawShape (map=0x9c25548, layer=0x9c3ae60,
shape=0xbfdce298, image=0x9c4bb78, style=0, querymapMode=1) at
mapdraw.c:1782<br>
#8  0x080ae1eb in msDrawVectorLayer (map=0x9c25548, layer=0x9c3ae60,
image=0x9c4bb78) at mapdraw.c:938<br>
#9  0x080ad91d in msDrawLayer (map=0x9c25548, layer=0x9c3ae60,
image=0x9c4bb78) at mapdraw.c:743<br>
#10 0x080acb54 in msDrawMap (map=0x9c25548, querymap=0) at mapdraw.c:441<br>
#11 0x080584b3 in main (argc=2, argv=0xbfdcea84) at mapserv.c:1417<br>
<br>
I'll have to check to see if there are known bugs regarding AGG...<br>
<br>
Adrian Popa wrote:
<blockquote cite="mid:4A379A60.4090700@romtelecom.ro" type="cite">
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
Thank you for your suggestion Andreas,<br>
  <br>
I have run shp2img and unfortunately:<br>
[root@terra tmp]# shp2img -o /tmp/out.png -m
/var/www/html/msmap/dynamicmaps/fibUaBrx.map -e "20.259999999999998
43.16 29.700000000000003 49.2016" -s "1250 800" -l "GranitaJudete
Judete Urban Rural RuralSate buildings fibra fiber-common fiber-STM64
fiber-STM16 fiber-STM4 fiber-STM1 fiber-problems-main
fiber-problems-related fibraProblems"<br>
  <b>Segmentation fault</b><br>
  <br>
Running the command through strace, it ends up like this:<br>
  <br>
........<br>
read(4,
"h\376\237\224O\320;@p\225\4\25\'xG@\264d\270&gt;^\320;@\26"..., 45056)
= 45056<br>
read(4, "\303\362oU\36\206;@BY\237\354isG@\34\271\214\333\37\206"...,
4096) = 4096<br>
_llseek(9, 12288, [12288], SEEK_SET)    = 0<br>
read(9, "                                "..., 4096) = 148<br>
_llseek(4, 1458176, [1458176], SEEK_SET) = 0<br>
read(4, "\25\327\377\332\27\23G@\30\256\23v9|;@\233M%\235\372\22"...,
24576) = 24576<br>
read(4, " A\1$\203\<a moz-do-not-send="true"
 class="moz-txt-link-abbreviated" href="mailto:21G@.%5C245%5C211Px">21G@.\245\211Px</a>
;@\314\353\330\355\242\21G@\367"...,
4096) = 1784<br>
close(8)                                = 0<br>
munmap(0xb7f36000, 4096)                = 0<br>
close(4)                                = 0<br>
munmap(0xb7f38000, 4096)                = 0<br>
close(9)                                = 0<br>
munmap(0xb7f35000, 4096)                = 0<br>
gettimeofday({1245157506, 462482}, NULL) = 0<br>
gettimeofday({1245157506, 462600}, NULL) = 0<br>
open("/etc/localtime", O_RDONLY)        = 4<br>
fstat64(4, {st_mode=S_IFREG|0644, st_size=798, ...}) = 0<br>
fstat64(4, {st_mode=S_IFREG|0644, st_size=798, ...}) = 0<br>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f38000<br>
read(4, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0"...,
4096) = 798<br>
close(4)                                = 0<br>
munmap(0xb7f38000, 4096)                = 0<br>
gettimeofday({1245157506, 463468}, NULL) = 0<br>
gettimeofday({1245157506, 463535}, NULL) = 0<br>
gettimeofday({1245157506, 463599}, NULL) = 0<br>
gettimeofday({1245157506, 463664}, NULL) = 0<br>
gettimeofday({1245157506, 463734}, NULL) = 0<br>
gettimeofday({1245157506, 463802}, NULL) = 0<br>
gettimeofday({1245157506, 463866}, NULL) = 0<br>
gettimeofday({1245157506, 463934}, NULL) = 0<br>
gettimeofday({1245157506, 464028}, NULL) = 0<br>
  <b>open("/var/www/html/msmap/dynamicmaps/../data/Judete.shp",
O_RDONLY|O_LARGEFILE) = 4</b><br>
open("/var/www/html/msmap/dynamicmaps/../data/Judete.shx",
O_RDONLY|O_LARGEFILE) = 8<br>
fstat64(4, {st_mode=S_IFREG|0555, st_size=1484536, ...}) = 0<br>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f38000<br>
  <b>read(4</b>,
"\0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\vS|"..., 4096) =
4096<br>
fstat64(8, {st_mode=S_IFREG|0555, st_size=436, ...}) = 0<br>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f36000<br>
read(8, "\0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096) = 436<br>
open("/var/www/html/msmap/dynamicmaps/../data/Judete.dbf",
O_RDONLY|O_LARGEFILE) = 9<br>
fstat64(9, {st_mode=S_IFREG|0555, st_size=12436, ...}) = 0<br>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f35000<br>
read(9, "\3k\6\24*\0\0\0\201\0%\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096) = 4096<br>
_llseek(9, 0, [0], SEEK_SET)            = 0<br>
read(9, "\3k\6\24*\0\0\0\201\0%\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096) = 4096<br>
_llseek(8, 0, [0], SEEK_SET)            = 0<br>
read(8, "\0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096) = 436<br>
read(8, "", 4096)                       = 0<br>
_llseek(4, 0, [0], SEEK_SET)            = 0<br>
  <b>read(4</b>,
"\0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\vS|"..., 4096) =
4096<br>
  <b>read(4,</b>
"\\T7@By\233\300\226BG@\342\376\n\341\340T7@\266Mo\267\241"..., 49152)
= 49152<br>
  <b>read(4,</b> <a moz-do-not-send="true"
 class="moz-txt-link-rfc2396E"
 href="mailto:%5D%5C3366@%5C34%5C21%5C376%5C224+G@g%5C245%5C%5C8%5C247%5C3356@6%5C277%5C213.%5Cf">"]\3366@\34\21\376\224
+G@g\245\\8\247\3356@6\277\213.\f"</a>..., 4096) = 4096<br>
--- SIGSEGV (Segmentation fault) @ 0 (0) ---<br>
+++ killed by SIGSEGV +++<br>
Process 20970 detached<br>
  <br>
  <br>
I'm not sure if it faults because it can't read from file handler 4
(Judete.shp), or if it's something else... I also tried by not
specifying Judete in the layer list, but it still dies (while reading
Judete.shp!).<br>
  <br>
I will look further into problems with AGG (because it renders fine
with PNG)<br>
  <br>
Thank you for your help - now I know where to look.<br>
Regards,<br>
Adrian<br>
  <br>
P.S. Ideas are welcome!<br>
  <br>
Andreas Albarello wrote:
  <blockquote
 cite="mid:0228E12F-794C-4654-A397-D607161AA8C9@territoriumonline.com"
 type="cite"><br>
On 16 Jun 2009, at 14:25, Adrian Popa wrote: <br>
    <br>
    <blockquote type="cite">Hello David, <br>
      <br>
I got the 500 errors from the http error log file. Unfortunately no
additional information is provided. <br>
I added the MS_ERRORFILE and DEBUG statements to my map file and
although the errorfile is created, I don't get any other information
(neither when the map loads perfectly, nor when it dies with premature
end of script headers. <br>
      <br>
I read RFC 28 (<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://mapserver.org/development/rfc/ms-rfc-28.html">http://mapserver.org/development/rfc/ms-rfc-28.html</a>)
and
they specified that the server should be compiled with
-DENABLE_STDERR_DEBUG, so I recompiled mapserver: <br>
CFLAGS=-DENABLE_STDERR_DEBUG ./configure  --with-freetype --with-png
--with-agg=../agg-2.5 --with-proj --with-ogr --with-gdal --with-xml2
--with-wfs --with-wcs --with-wmsclient --with-wfsclient --with-postgis
--with-threads --with-sos --with-mygis --with-geos --with-tiff <br>
      <br>
I used the new binary and unfortunately nothing changed :( <br>
      <br>
My (relevant part of the) mapfile looks like this: <br>
      <br>
MAP <br>
CONFIG  "MS_ERRORFILE" "/tmp/mapserver.log" <br>
CONFIG  "MS_DEBUGLEVEL" "5" <br>
DEBUG 5                        ... <br>
END <br>
      <br>
What else can I try? <br>
    </blockquote>
    <br>
Try to bypass the webserver/CGI stuff and launch shp2img directly from
the shell, that should hopefully yield some better output: <br>
    <br>
shp2img -o test.png -m mapfile.map <br>
    <br>
If you haven't already done so in your mapfile, you might need to add
an image size (-s 500 500) and/or an extent (-e minx miny maxx maxy) to
the above command line options. <br>
    <br>
Best regards, <br>
-- <br>
-------------------------------------------------------------------- <br>
Andreas Albarello <br>
Analysis &amp; SW Development <br>
    <br>
Territorium Online srl/GmbH <br>
Via Buozzi/Buozzistra�e 12 - I 39100 Bolzano/Bozen <br>
email: <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:andreas.albarello@territoriumonline.com">andreas.albarello@territoriumonline.com</a>
    <br>
web:   <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="http://www.territoriumonline.com">www.territoriumonline.com</a> <br>
-------------------------------------------------------------------- <br>
    <br>
    <br>
  </blockquote>
  <br>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
--- 
Adrian Popa
NOC Division
Network Engineer
Divizia Centrul National de Operare Retea
Departament Transport IP &amp; Metro
Compartiment IP Core &amp; Backbone
Phone: +40 21 400 3099
</pre>
</body>
</html>