[postgis-devel] Memory in the Meantime

Paul Ramsey pramsey at opengeo.org
Mon Jan 12 09:38:14 PST 2009


I take it back, I cannot reproduce this on a clean check-out... make  
check runs fine for me, as do other shp2pgsql runs on various files...  
are you certain you are complete up-to-date?

P

On Jan 12, 2009, at 1:29 AM, Mark Cave-Ayland wrote:

> Paul Ramsey wrote:
>
>> I've looked, it's really not a big deal, I'm happy to do it, and I
>> want to, since the memory implications for the loader are *massive*
>> (fixing the loader requires more than just adding one line, it
>> requires a replacement for lwfree_poly which actually does the deep
>> free... so, 8 lines :) But still feels wrong to be building what
>> should be library infrastructure into the loader.
>> I'm going ahead with it, it will allow me to finish up the GUI.  
>> Which,
>> BTW, feels like a step backwards in code attractiveness, since I
>> didn't re-write the core code in the end, just retrofitted the output
>> handling.
>> P.
>
>
> Hi Paul,
>
> I've just done a fresh checkout of SVN trunk with this commit and I  
> now get multiple double-free errors in shp2pgsql on "make check":
>
>
> loader/Arc.*** glibc detected *** ../loader/shp2pgsql: free():  
> invalid pointer: 0x00007fff3b79e290 ***
> ======= Backtrace: =========
> /lib/libc.so.6[0x2b5f6f59b948]
> /lib/libc.so.6(cfree+0x76)[0x2b5f6f59da56]
> ../loader/shp2pgsql[0x4111e2]
> ../loader/shp2pgsql[0x40b831]
> ../loader/shp2pgsql[0x40bbf5]
> ../loader/shp2pgsql[0x40bd0d]
> /lib/libc.so.6(__libc_start_main+0xe6)[0x2b5f6f5461a6]
> ../loader/shp2pgsql[0x4033a9]
> ======= Memory map: ========
> 00400000-00433000 r-xp 00000000 fe:05 1057318  /home/pg83/src/ 
> postgis-svn/trunk/loader/shp2pgsql
> 00633000-00634000 rw-p 00033000 fe:05 1057318  /home/pg83/src/ 
> postgis-svn/trunk/loader/shp2pgsql
> 00634000-00655000 rw-p 00634000 00:00 0  [heap]
> 2b5f6f30b000-2b5f6f327000 r-xp 00000000 fe:00 131628  /lib/ld-2.7.so
> 2b5f6f327000-2b5f6f32e000 rw-p 2b5f6f327000 00:00 0
> 2b5f6f526000-2b5f6f528000 rw-p 0001b000 fe:00 131628  /lib/ld-2.7.so
> 2b5f6f528000-2b5f6f672000 r-xp 00000000 fe:00 131625  /lib/libc-2.7.so
> 2b5f6f672000-2b5f6f871000 ---p 0014a000 fe:00 131625  /lib/libc-2.7.so
> 2b5f6f871000-2b5f6f874000 r--p 00149000 fe:00 131625  /lib/libc-2.7.so
> 2b5f6f874000-2b5f6f876000 rw-p 0014c000 fe:00 131625  /lib/libc-2.7.so
> 2b5f6f876000-2b5f6f87b000 rw-p 2b5f6f876000 00:00 0
> 2b5f6f87b000-2b5f6f8fd000 r-xp 00000000 fe:00 131624  /lib/libm-2.7.so
> 2b5f6f8fd000-2b5f6fafc000 ---p 00082000 fe:00 131624  /lib/libm-2.7.so
> 2b5f6fafc000-2b5f6fafe000 rw-p 00081000 fe:00 131624  /lib/libm-2.7.so
> 2b5f6fafe000-2b5f6fb00000 rw-p 2b5f6fafe000 00:00 0
> 2b5f6fb00000-2b5f6fb16000 r-xp 00000000 fe:00 131609  /lib/ 
> libgcc_s.so.1
> 2b5f6fb16000-2b5f6fd16000 ---p 00016000 fe:00 131609  /lib/ 
> libgcc_s.so.1
> 2b5f6fd16000-2b5f6fd17000 rw-p 00016000 fe:00 131609  /lib/ 
> libgcc_s.so.1
> 2b5f70000000-2b5f70021000 rw-p 2b5f70000000 00:00 0
> 2b5f70021000-2b5f74000000 ---p 2b5f70021000 00:00 0
> 7fff3b78a000-7fff3b79f000 rw-p 7ffffffea000 00:00 0  [stack]
> 7fff3b7ff000-7fff3b800000 r-xp 7fff3b7ff000 00:00 0  [vdso]
> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0  [vsyscall]
> ./run_test: line 153:  7366 Aborted                 ${SHP2PGSQL} $ 
> {TEST}.shp $_tblname > ${TMPDIR}/loader 2> ${TMPDIR}/loader.err
> failed (running shp2pgsql: /tmp/pgis_reg_6744/loader.err)
> loader/ArcM.*** glibc detected *** ../loader/shp2pgsql: double free  
> or corruption (out): 0x00007fff9fd90880 ***
> ======= Backtrace: =========
> /lib/libc.so.6[0x2b6a0afa9948]
> /lib/libc.so.6(cfree+0x76)[0x2b6a0afaba56]
> ../loader/shp2pgsql[0x4111e2]
> ../loader/shp2pgsql[0x40b831]
> ../loader/shp2pgsql[0x40bbf5]
> ../loader/shp2pgsql[0x40bd0d]
> /lib/libc.so.6(__libc_start_main+0xe6)[0x2b6a0af541a6]
> ../loader/shp2pgsql[0x4033a9]
> ======= Memory map: ========
> 00400000-00433000 r-xp 00000000 fe:05 1057318  /home/pg83/src/ 
> postgis-svn/trunk/loader/shp2pgsql
> 00633000-00634000 rw-p 00033000 fe:05 1057318  /home/pg83/src/ 
> postgis-svn/trunk/loader/shp2pgsql
> 00634000-00655000 rw-p 00634000 00:00 0  [heap]
> 2b6a0ad19000-2b6a0ad35000 r-xp 00000000 fe:00 131628  /lib/ld-2.7.so
> 2b6a0ad35000-2b6a0ad3c000 rw-p 2b6a0ad35000 00:00 0
> 2b6a0af34000-2b6a0af36000 rw-p 0001b000 fe:00 131628  /lib/ld-2.7.so
> 2b6a0af36000-2b6a0b080000 r-xp 00000000 fe:00 131625  /lib/libc-2.7.so
> 2b6a0b080000-2b6a0b27f000 ---p 0014a000 fe:00 131625  /lib/libc-2.7.so
> 2b6a0b27f000-2b6a0b282000 r--p 00149000 fe:00 131625  /lib/libc-2.7.so
> 2b6a0b282000-2b6a0b284000 rw-p 0014c000 fe:00 131625  /lib/libc-2.7.so
> 2b6a0b284000-2b6a0b289000 rw-p 2b6a0b284000 00:00 0
> 2b6a0b289000-2b6a0b30b000 r-xp 00000000 fe:00 131624  /lib/libm-2.7.so
> 2b6a0b30b000-2b6a0b50a000 ---p 00082000 fe:00 131624  /lib/libm-2../ 
> run_test: line 153:  7372 Aborted ${SHP2PGSQL} ${TEST}.shp $_tblname  
> > ${TMPDIR}/loader 2> ${TMPDIR}/loader.err
> failed (running shp2pgsql: /tmp/pgis_reg_6744/loader.err)
> loader/ArcZ.*** glibc detected *** ../loader/shp2pgsql: double free  
> or corruption (out): 0x00007ffffade08d0 ***
> ======= Backtrace: =========
> /lib/libc.so.6[0x2affaff57948]
> /lib/libc.so.6(cfree+0x76)[0x2affaff59a56]
> ../loader/shp2pgsql[0x4111e2]
> ../loader/shp2pgsql[0x40b831]
> ../loader/shp2pgsql[0x40bbf5]
> ../loader/shp2pgsql[0x40bd0d]
> /lib/libc.so.6(__libc_start_main+0xe6)[0x2affaff021a6]
> ../loader/shp2pgsql[0x4033a9]
> ======= Memory map: ========
> 00400000-00433000 r-xp 00000000 fe:05 1057318  /home/pg83/src/ 
> postgis-svn/trunk/loader/shp2pgsql
> 00633000-00634000 rw-p 00033000 fe:05 1057318  /home/pg83/src/ 
> postgis-svn/trunk/loader/shp2pgsql
> 00634000-00655000 rw-p 00634000 00:00 0  [heap]
> 2affafcc7000-2affafce3000 r-xp 00000000 fe:00 131628  /lib/ld-2.7.so
> 2affafce3000-2affafcea000 rw-p 2affafce3000 00:00 0
> 2affafee2000-2affafee4000 rw-p 0001b000 fe:00 131628  /lib/ld-2.7.so
> 2affafee4000-2affb002e000 r-xp 00000000 fe:00 131625  /lib/libc-2.7.so
> 2affb002e000-2affb022d000 ---p 0014a000 fe:00 131625  /lib/libc-2.7.so
> 2affb022d000-2affb0230000 r--p 00149000 fe:00 131625  /lib/libc-2.7.so
> 2affb0230000-2affb0232000 rw-p 0014c000 fe:00 131625  /lib/libc-2.7.so
> 2affb0232000-2affb0237000 rw-p 2affb0232000 00:00 0
> 2affb0237000-2affb02b9000 r-xp 00000000 fe:00 131624  /lib/libm-2.7.so
> 2affb02b9000-2affb04b8000 ---p 00082000 fe:00 131624  /lib/libm-2.7.so
> 2affb04b8000-2affb04ba000 rw-p 00081000 fe:00 131624  /lib/libm-2.7.so
> 2affb04ba000-2affb04bc000 rw-p 2affb04ba000 00:00 0
> 2affb04bc000-2affb04d2000 r-xp 00000000 fe:00 131609  /lib/ 
> libgcc_s.so.1
> 2affb04d2000-2affb06d2000 ---p 00016000 fe:00 131609  /lib/ 
> libgcc_s.so.1
> 2affb06d2000-2affb06d3000 rw-p 00016000 fe:00 131609  /lib/ 
> libgcc_s.so.1
> 2affb4000000-2affb4021000 rw-p 2affb4000000 00:00 0
> 2affb4021000-2affb8000000 ---p 2affb4021000 00:00 0
> 7ffffadcd000-7ffffade2000 rw-p 7ffffffea000 00:00 0  [stack]
> 7ffffadfe000-7ffffadff000 r-xp 7ffffadfe000 00:00 0  [vdso]
> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0  [vsyscall]
> ./run_test: line 153:  7378 Aborted                 ${SHP2PGSQL} $ 
> {TEST}.shp $_tblname > ${TMPDIR}/loader 2> ${TMPDIR}/loader.err
> failed (running shp2pgsql: /tmp/pgis_reg_6744/loader.err)
> loader/Polygon.*** glibc detected *** ../loader/shp2pgsql: double  
> free or corruption (out): 0x00007ffff3c63740 ***
>
>
> Any chance you could take a look?
>
>
> ATB,
>
> Mark.
>
> -- 
> Mark Cave-Ayland
> Sirius Corporation - The Open Source Experts
> http://www.siriusit.co.uk
> T: +44 870 608 0063
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel


--
Paul Ramsey
OpenGeo - http://opengeo.org
Putting the "Po" in "PostGIS".




More information about the postgis-devel mailing list