==29911== Memcheck, a memory error detector ==29911== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==29911== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==29911== Command: pgsql2shp -f /var/www/currentmap/joshj/nationwide_county -u postgres -P.... -p 5432 smartmaps select\ distinct\ a.geom,\ a.gid,\ a.id,\ a.shporder,\ a.area,\ a.county,\ a.fullname,\ a.name,\ a.state,\ a.type,\ a.county_sea,\ a.population,\ a.male,\ a.female,\ a.age_5,\ a.age_5_to_9,\ a.age_10_to_,\ a.age_15_to_,\ a.age_20_to_,\ a.age_25_to_,\ a.age_35_to_,\ a.age_45_to_,\ a.age_55_to_,\ a.age_60_to_,\ a.age_65_to_,\ a.age_75_to_,\ a.age_85,\ a.median_age,\ a.age_18,\ a.male_18,\ a.female_18,\ a.age_21,\ a.age_62,\ a.age_65,\ a.male_65,\ a.female_65,\ a.f1_race,\ a.white,\ a.black,\ a.amindian,\ a.asian,\ a.asn_asian_,\ a.asn_chines,\ a.asn_filipi,\ a.asn_japane,\ a.asn_korean,\ a.asn_vietna,\ a.asn_other,\ a.hawaiian,\ a.hwn_native,\ a.hwn_guaman,\ a.hwn_samoan,\ a.hwn_other_,\ a.other_race,\ a.f2_races,\ a.ap_white,\ a.ap_black,\ a.ap_amindia,\ a.ap_asian,\ a.ap_hawaiia,\ a.ap_other,\ a.ap_hispani,\ a.h_ap_mexic,\ a.h_ap_puert,\ a.h_ap_cuban,\ a.h_ap_other,\ a.not_hispan,\ a.nh_white,\ a.in_househo,\ a.inhh_house,\ a.inhh_spous,\ a.inhh_child,\ a.inhh_own,\ a.inhh_other,\ a.inhh_othe1,\ a.inhh_nonre,\ a.inhh_unmar,\ a.in_group,\ a.ingrp_inst,\ a.ingrp_noni,\ a.households,\ a.hh_family,\ a.hh_family_,\ a.hh_family1,\ a.hh_fam_mar,\ a.hh_female_,\ a.hh_female1,\ a.hh_nonfami,\ a.hh_non_liv,\ a.hh_non_alo,\ a.hh_people_,\ a.hh_people1,\ a.average_hh,\ a.average_fa,\ a.housing_un,\ a.hu_occupie,\ a.hu_vacant,\ a.vachu_for_,\ a.owner_vaca,\ a.rental_vac,\ a.occhu_owne,\ a.occhu_rent,\ a.occhu_own_,\ a.occhu_ren1,\ a.in_school_,\ a.in_sch_nur,\ a.in_sch_kin,\ a.in_sch_ele,\ a.in_sch_hig,\ a.in_sch_col,\ a.populatio1,\ a.f25_9th_gr,\ a.f25_9th_to,\ a.f25_high_s,\ a.f25_some_c,\ a.f25_associ,\ a.f25_bachel,\ a.f25_grad_o,\ a.f25__hs_gr,\ a.f25__bache,\ a.populatio2,\ a.f15_never_,\ a.f15_now_ma,\ a.f15_separa,\ a.f15_widowe,\ a.f15_widow1,\ a.f15_divorc,\ a.f15_divor1,\ a.grandparen,\ a.grandpare1,\ a.civilian,\ a.civilian2,\ a.populatio3,\ a.f520_wdisa,\ a.populatio4,\ a.f2164_wdis,\ a.f2164_wdi1,\ a.f2164_no_d,\ a.f2164_no_1,\ a.populatio5,\ a.f65_wdisab,\ a.populatio6,\ a.f5_same_ho,\ a.f5_differe,\ a.f5_diff_hs,\ a.f5_diff_h1,\ a.f5_diff_h2,\ a.f5_diff_h3,\ a.f5_elsewhe,\ a.native,\ a.native_bor,\ a.native_bo1,\ a.native_bo2,\ a.native_bo3,\ a.foreign_en,\ a.foreign_na,\ a.foreign_no,\ a.foreign_bo,\ a.foreign_eu,\ a.foreign_as,\ a.foreign_af,\ a.foreign_oc,\ a.foreign_la,\ a.foreign_n1,\ a.f5_english,\ a.f5_other_l,\ a.f5_other_1,\ a.f5_other_2,\ a.f5_other_3,\ a.f5_other_i,\ a.f5_other_4,\ a.f5_other_5,\ a.f5_other_6,\ a.total_ance,\ a.ancestry_a,\ a.ancestry_c,\ a.ancestry_d,\ a.ancestry_1,\ a.ancestry_e,\ a.ancestry_f,\ a.ancestry_2,\ a.ancestry_g,\ a.ancestry_3,\ a.ancestry_h,\ a.ancestry_i,\ a.ancestry_4,\ a.ancestry_l,\ a.ancestry_n,\ a.ancestry_p,\ a.ancestry_5,\ a.ancestry_r,\ a.ancestry_s,\ a.ancestry_6,\ a.ancestry_7,\ a.ancestry_8,\ a.ancestry_9,\ a.ancestry10,\ a.ancestry_u,\ a.ancestry11,\ a.ancestry_w,\ a.ancestry12,\ a.ancestry_o,\ a.populatio7,\ a.f16_in_lab,\ a.f16_in_lf_,\ a.f16_in_lf1,\ a.f16_in_lf2,\ a.f16_in_lf3,\ a.f16_in_lf4,\ a.f16_not_in,\ a.females_16,\ a.fem_16_in_,\ a.fem_16_in1,\ a.fem_16_in2,\ a.own_childr,\ a.own_child6,\ a.workers_16,\ a.f16_mode_c,\ a.f16_mode_1,\ a.f16_mode_p,\ a.f16_mode_w,\ a.f16_mode_o,\ a.f16_mode_2,\ a.f16_mean_t,\ a.employed_c,\ a.ec_16_occ_,\ a.ec_16_occ1,\ a.ec_16_occ2,\ a.ec_16_occ3,\ a.ec_16_occ4,\ a.ec_16_occ5,\ a.ec_16_ind_,\ a.ec_16_ind1,\ a.ec_16_ind2,\ a.ec_16_ind3,\ a.ec_16_ind4,\ a.ec_16_ind5,\ a.ec_16_ind6,\ a.ec_16_ind7,\ a.ec_16_ind8,\ a.ec_16_ind9,\ a.ec_16_in10,\ a.ec_16_in11,\ a.ec_16_in12,\ a.ec_16_work,\ a.ec_16_wor1,\ a.ec_16_wor2,\ a.ec_16_wor3,\ a.household1,\ a.hh_income_,\ a.clon,\ a.clat,\ a.tv_hhs,\ a.cable_hhs,\ a.akhi_clat,\ a.akhi_clon\ from\ nationwide_county\ a\ where\ a.gid\ in\ (select\ distinct\ layergid\ from\ nationwide_county_matches\ where\ extent\ =\ 'Nationwide_DMA'\ and\ extentgid\ =\ 5) ==29911== ==29911== Invalid write of size 1 ==29911== at 0x4C294B5: strcat (mc_replace_strmem.c:176) ==29911== by 0x40C7E1: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x8585cc0 is 0 bytes after a block of size 2,048 alloc'd ==29911== at 0x4C28FAC: malloc (vg_replace_malloc.c:236) ==29911== by 0x40C72D: ShpDumperOpenTable (pgsql2shp-core.c:1892) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== ==29911== Invalid write of size 1 ==29911== at 0x4C294A6: strcat (mc_replace_strmem.c:176) ==29911== by 0x40C7E1: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x8585cc1 is 1 bytes after a block of size 2,048 alloc'd ==29911== at 0x4C28FAC: malloc (vg_replace_malloc.c:236) ==29911== by 0x40C72D: ShpDumperOpenTable (pgsql2shp-core.c:1892) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== ==29911== Invalid write of size 1 ==29911== at 0x4C294B7: strcat (mc_replace_strmem.c:176) ==29911== by 0x40C7E1: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x8585cc9 is 9 bytes after a block of size 2,048 alloc'd ==29911== at 0x4C28FAC: malloc (vg_replace_malloc.c:236) ==29911== by 0x40C72D: ShpDumperOpenTable (pgsql2shp-core.c:1892) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== ==29911== Invalid read of size 1 ==29911== at 0x4C29769: __GI_strlen (mc_replace_strmem.c:284) ==29911== by 0x40C7F0: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x8585cc0 is 0 bytes after a block of size 2,048 alloc'd ==29911== at 0x4C28FAC: malloc (vg_replace_malloc.c:236) ==29911== by 0x40C72D: ShpDumperOpenTable (pgsql2shp-core.c:1892) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== ==29911== Invalid write of size 2 ==29911== at 0x40C7F1: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x8585cc9 is 9 bytes after a block of size 2,048 alloc'd ==29911== at 0x4C28FAC: malloc (vg_replace_malloc.c:236) ==29911== by 0x40C72D: ShpDumperOpenTable (pgsql2shp-core.c:1892) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== ==29911== Invalid read of size 1 ==29911== at 0x4C29497: strcat (mc_replace_strmem.c:176) ==29911== by 0x40C7E1: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x8585cc0 is 0 bytes after a block of size 2,048 alloc'd ==29911== at 0x4C28FAC: malloc (vg_replace_malloc.c:236) ==29911== by 0x40C72D: ShpDumperOpenTable (pgsql2shp-core.c:1892) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== ==29911== Invalid read of size 1 ==29911== at 0x4C29497: strcat (mc_replace_strmem.c:176) ==29911== by 0x40CB3B: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x8585cc0 is 0 bytes after a block of size 2,048 alloc'd ==29911== at 0x4C28FAC: malloc (vg_replace_malloc.c:236) ==29911== by 0x40C72D: ShpDumperOpenTable (pgsql2shp-core.c:1892) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== ==29911== Invalid write of size 1 ==29911== at 0x4C294A6: strcat (mc_replace_strmem.c:176) ==29911== by 0x40CB3B: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x858612f is not stack'd, malloc'd or (recently) free'd ==29911== ==29911== Invalid write of size 1 ==29911== at 0x4C294B5: strcat (mc_replace_strmem.c:176) ==29911== by 0x40CB3B: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x8586130 is not stack'd, malloc'd or (recently) free'd ==29911== ==29911== Invalid write of size 1 ==29911== at 0x4C294B7: strcat (mc_replace_strmem.c:176) ==29911== by 0x40CB3B: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x858616a is not stack'd, malloc'd or (recently) free'd ==29911== ==29911== Invalid read of size 1 ==29911== at 0x4C29497: strcat (mc_replace_strmem.c:176) ==29911== by 0x40CB76: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x8585cc0 is 0 bytes after a block of size 2,048 alloc'd ==29911== at 0x4C28FAC: malloc (vg_replace_malloc.c:236) ==29911== by 0x40C72D: ShpDumperOpenTable (pgsql2shp-core.c:1892) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== ==29911== Invalid write of size 1 ==29911== at 0x4C294A6: strcat (mc_replace_strmem.c:176) ==29911== by 0x40CB76: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x858616a is not stack'd, malloc'd or (recently) free'd ==29911== ==29911== Invalid write of size 1 ==29911== at 0x4C294B5: strcat (mc_replace_strmem.c:176) ==29911== by 0x40CB76: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x858616b is not stack'd, malloc'd or (recently) free'd ==29911== ==29911== Invalid write of size 1 ==29911== at 0x4C294B7: strcat (mc_replace_strmem.c:176) ==29911== by 0x40CB76: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x858618c is not stack'd, malloc'd or (recently) free'd ==29911== ==29911== Invalid read of size 1 ==29911== at 0x4C29497: strcat (mc_replace_strmem.c:176) ==29911== by 0x40CCF8: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x8585cc0 is 0 bytes after a block of size 2,048 alloc'd ==29911== at 0x4C28FAC: malloc (vg_replace_malloc.c:236) ==29911== by 0x40C72D: ShpDumperOpenTable (pgsql2shp-core.c:1892) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== ==29911== Invalid write of size 1 ==29911== at 0x4C294A6: strcat (mc_replace_strmem.c:176) ==29911== by 0x40CCF8: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x858618c is not stack'd, malloc'd or (recently) free'd ==29911== ==29911== Invalid write of size 1 ==29911== at 0x4C294B5: strcat (mc_replace_strmem.c:176) ==29911== by 0x40CCF8: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x858618d is not stack'd, malloc'd or (recently) free'd ==29911== ==29911== Invalid write of size 1 ==29911== at 0x4C294B7: strcat (mc_replace_strmem.c:176) ==29911== by 0x40CCF8: ShpDumperOpenTable (string3.h:144) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) ==29911== Address 0x858619b is not stack'd, malloc'd or (recently) free'd ==29911== --29911-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting --29911-- si_code=80; Faulting address: 0x0; sp: 0x403377e00 valgrind: the 'impossible' happened: Killed by fatal signal ==29911== at 0x38036125: vgPlain_arena_malloc (m_mallocfree.c:245) ==29911== by 0x380647A6: vgPlain_cli_malloc (replacemalloc_core.c:83) ==29911== by 0x38001D2B: vgMemCheck_new_block (mc_malloc_wrappers.c:201) ==29911== by 0x38001ED4: vgMemCheck_malloc (mc_malloc_wrappers.c:238) ==29911== by 0x38066584: vgPlain_scheduler (scheduler.c:1394) ==29911== by 0x380763FC: run_a_thread_NORETURN (syswrap-linux.c:94) sched status: running_tid=1 Thread 1: status = VgTs_Runnable ==29911== at 0x4C28FAC: malloc (vg_replace_malloc.c:236) ==29911== by 0x4EB12F1: strdup (strdup.c:43) ==29911== by 0x51D234E: PQsendQuery (in /usr/lib/libpq.so.5.2) ==29911== by 0x51D321A: PQexec (in /usr/lib/libpq.so.5.2) ==29911== by 0x40CB9E: ShpDumperOpenTable (pgsql2shp-core.c:1970) ==29911== by 0x40DC75: main (pgsql2shp-cli.c:187) Note: see also the FAQ in the source distribution. It contains workarounds to several common problems. In particular, if Valgrind aborted or crashed after identifying problems in your program, there's a good chance that fixing those problems will prevent Valgrind aborting or crashing, especially if it happened in m_mallocfree.c. If that doesn't help, please report this bug to: www.valgrind.org In the bug report, send all the above text, the valgrind version, and what OS and version you are using. Thanks.