[postgis-devel] Some sort of memory leak?
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Mon Dec 15 08:20:10 PST 2008
Obe, Regina wrote:
> This one I'm not quite sure how to describe as a bug but it seems to be
> a long standing problem (happens on my 1.3.3 install so certainly
> nothing we should rush to fix).
(cut)
> But this crashes server sometimes (not all the time).
>
> SELECT ST_AsEWKT(ST_LineToCurve(ST_Buffer(ST_Point(i,j), j))) As
> the_geom
> FROM generate_series(-10,50,10) As i
> CROSS JOIN generate_series(40,70, 20) As j
>
> In case anyone is interested, attached is the latest torture script
> compressed.
I took a look at this, and while I can't recreate it by running the
command above command directly, it consistently fails when running the
entire torture script with the following backtrace:
(gdb) bt
#0 0x00007ffcd9f92ef6 in memcpy () from /lib/libc.so.6
#1 0x00007ffcd7b97526 in read_double (geom=0x7fffe2b41788) at
wktunparse.c:168
#2 0x00007ffcd7b9756a in output_point (geom=0xcdcab9 <Address 0xcdcab9
out of bounds>, supress=0) at wktunparse.c:180
#3 0x00007ffcd7b9762b in output_collection (geom=0xcdcab1 <Address
0xcdcab1 out of bounds>, func=0x7ffcd7b97549 <output_point>, supress=0)
at wktunparse.c:206
#4 0x00007ffcd7b979c4 in output_wkt (
geom=0xc8be2d "1e+28 5.29341932954312e-320,2.93635869534806e-227
1.6189543082926e-318,3.49322947108703e-310
1.80785132405623e+39,1.27360123600832e+231
9.16921756803696e-71,3.32628869296794e-310 4.25352958651173e+39,"...,
supress=2) at wktunparse.c:336
#5 0x00007ffcd7b9762b in output_collection (
geom=0xc8be2c "81e+28 5.29341932954312e-320,2.93635869534806e-227
1.6189543082926e-318,3.49322947108703e-310
1.80785132405623e+39,1.27360123600832e+231
9.16921756803696e-71,3.32628869296794e-310 4.25352958651173e+39"...,
func=0x7ffcd7b97816 <output_wkt>, supress=2) at wktunparse.c:206
#6 0x00007ffcd7b97ba0 in output_wkt (
geom=0xc8be28 "480681e+28
5.29341932954312e-320,2.93635869534806e-227
1.6189543082926e-318,3.49322947108703e-310
1.80785132405623e+39,1.27360123600832e+231
9.16921756803696e-71,3.32628869296794e-310 4.25352958651173"...,
supress=1) at wktunparse.c:392
#7 0x00007ffcd7b9762b in output_collection (
geom=0xc8be27 "6480681e+28
5.29341932954312e-320,2.93635869534806e-227
1.6189543082926e-318,3.49322947108703e-310
1.80785132405623e+39,1.27360123600832e+231
9.16921756803696e-71,3.32628869296794e-310 4.2535295865117"...,
func=0x7ffcd7b97816 <output_wkt>, supress=1) at wktunparse.c:206
#8 0x00007ffcd7b97c28 in output_wkt (geom=0xc7afb9 "\016", supress=0)
at wktunparse.c:408
#9 0x00007ffcd7b97dcf in unparse_WKT (serialized=0xc7afa4 "�",
alloc=0x7ffcd7b9c5af <lwalloc>, free=0x7ffcd7b9c5f3 <lwfree>) at
wktunparse.c:462
#10 0x00007ffcd7bb362b in LWGEOM_asEWKT (fcinfo=0x7fffe2b419a0) at
lwgeom_functions_basic.c:3083
#11 0x00000000005294bd in ExecMakeFunctionResult ()
#12 0x00000000005273ce in ExecProject ()
#13 0x0000000000532134 in ExecAgg ()
#14 0x0000000000526888 in ExecProcNode ()
#15 0x0000000000524905 in ExecutorRun ()
#16 0x00000000005be5a0 in PortalRunSelect ()
#17 0x00000000005bfc09 in PortalRun ()
#18 0x00000000005baeac in exec_simple_query ()
#19 0x00000000005bc3d7 in PostgresMain ()
#20 0x00000000005907b2 in ServerLoop ()
#21 0x0000000000591494 in PostmasterMain ()
#22 0x0000000000546b48 in main ()
(gdb)
It looks as if something is going horrendously wrong in the WKT unparser
somewhere whilst generating the curve WKT. Yuck. I think this is a wait
for 1.3.6 though.
ATB,
Mark.
--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
More information about the postgis-devel
mailing list