slaven rezic tqcsubrezicde jmggdnfarlepnet via rt writes patch new ticket created jmggdnfarlepnet please include string perl 46381 subject line future correspondence issue bug report perl jmggdnfarlepnet generated help perlbug 135 running perl v588 please enter report ive got reproduceble picture freebsd6x perl588 i386 affected linuxwindows script using imageexiftool manipulate exif data batch mode problems looks memory large request 2101248 bytes total sbrk 533565440 bytes usrlocallibperl5site_perl588imageexiftoolwriterpl line 2925 chunk 12 process memory grows finaly kicked yes ulimit shows data seg size 524288 run linux process frees memory mwin works amd64 picture differs top shows last pid 1019 load averages 049 025 010 0020425 100621 43 processes 1 running 42 sleeping cpu states 286 user 00 nice 11 system 08 interrupt 695 idle mem 293m active 27m inact 73m wired 18m cache 54m buf 892k free swap 2048m total 1034m used 1014m free 50 inuse 460k pid username thr pri nice size res state c time wcpu command 988 zeus 1 8 0 1865m 301m biord 1 111 3418 perl nd process finishes successfully trying meditate upon cause ive launched debuger last lines output imageexiftoolwritejpegusrlocallibperl5site_perl588imageexiftoolwriterpl3446 3446 writeoutfile buff err 1 last imageexiftoolwriteusrlocallibperl5site_perl588imageexiftoolwriterpl3002 3002 outfile shift imageexiftoolwriteusrlocallibperl5site_perl588imageexiftoolwriterpl3003 3003 universalisaoutfileglob imageexiftoolwriteusrlocallibperl5site_perl588imageexiftoolwriterpl3006 3006 outfile join _ memory request 16480 bytes total sbrk 533696512 bytes debugged program terminated use q quit r restart use inhibit_exit avoid stopping program termination h q h r h get additional info db10 dbfakeat_exit called file usrlocallibperl5588perl5dbpl line 8993 dbend called file usrlocallibperl5site_perl588imageexiftoolwriterpl line 3006 eval called file usrlocallibperl5site_perl588imageexiftoolwriterpl line 3006 db10 would like point problem present freebsd 6x perl58x perl56x affected problem reproduced script low memory limit say 30mb perl compiled usemymallocy perl block x100_000 150 bla 110 bla block undef bla warn joincurrmem __end__ memory growth looks like limits 30000000 perl trashmemleak_usemymallocpl 86425601880064 homeeesertetrashmemleak_usemymallocpl line 14 96952322932736 homeeesertetrashmemleak_usemymallocpl line 14 107479043985408 homeeesertetrashmemleak_usemymallocpl line 14 118005765038080 homeeesertetrashmemleak_usemymallocpl line 14 128532486090752 homeeesertetrashmemleak_usemymallocpl line 14 139059207143424 homeeesertetrashmemleak_usemymallocpl line 14 149585928196096 homeeesertetrashmemleak_usemymallocpl line 14 160112649248768 homeeesertetrashmemleak_usemymallocpl line 14 1706393610301440 homeeesertetrashmemleak_usemymallocpl line 14 1811660811354112 homeeesertetrashmemleak_usemymallocpl line 14 1916928012406784 homeeesertetrashmemleak_usemymallocpl line 14 2022195213459456 homeeesertetrashmemleak_usemymallocpl line 14 2127462414512128 homeeesertetrashmemleak_usemymallocpl line 14 2232729615564800 homeeesertetrashmemleak_usemymallocpl line 14 2337996816617472 homeeesertetrashmemleak_usemymallocpl line 14 2443264017670144 homeeesertetrashmemleak_usemymallocpl line 14 2548531218722816 homeeesertetrashmemleak_usemymallocpl line 14 2653798419775488 homeeesertetrashmemleak_usemymallocpl line 14 2759065620828160 homeeesertetrashmemleak_usemymallocpl line 14 2864332821880832 homeeesertetrashmemleak_usemymallocpl line 14 2969600022933504 homeeesertetrashmemleak_usemymallocpl line 14 3074867223986176 homeeesertetrashmemleak_usemymallocpl line 14 3180134425038848 homeeesertetrashmemleak_usemymallocpl line 14 3286220826099712 homeeesertetrashmemleak_usemymallocpl line 14 3391488027152384 homeeesertetrashmemleak_usemymallocpl line 14 3496755228205056 homeeesertetrashmemleak_usemymallocpl line 14 3602022429257728 homeeesertetrashmemleak_usemymallocpl line 14 3654860829786112 homeeesertetrashmemleak_usemymallocpl line 14 3681484830052352 homeeesertetrashmemleak_usemymallocpl line 14 3695001630187520 homeeesertetrashmemleak_usemymallocpl line 14 3701964830257152 homeeesertetrashmemleak_usemymallocpl line 14 3705651230294016 homeeesertetrashmemleak_usemymallocpl line 14 memory request 10016 bytes total sbrk 29753344 bytes systemmalloc freebsd62 theres leak limits 30000000 perl trashmemleak_usemymallocpl 86466561875968 homeeesertetrashmemleak_usemymallocpl line 14 96993282928640 homeeesertetrashmemleak_usemymallocpl line 14 96993282928640 homeeesertetrashmemleak_usemymallocpl line 14 etc end script bug triggered special allocation pattern initial memory block reallocated many times gets large transferred one bucket next higher bucket end loop iteration memory block completely freed unfortunately max_bucket variable updated bucket transfer step variable used upper limit get_from_bigger_buckets function mallocc large amounts free memory sit never used seen looking perl_dump_mstats problem avoided even pure perl allocate largest expected memory block beginning say using x xmemory_size finally patch bleedperlamd64mallocc mon apr 16 012550 2007 mallocc thu oct 25 233743 2007 22856 22857 perl_reallocvoid mp size_t nbytes nmallocbucket nmallocpow buckets_per_pow2 endif max_bucket pow buckets_per_pow2 cp m_overhead pow buckets_per_pow2 fill index malloc_unlock goto inplace_label regards slaven slaven rezic slaven rezic de tkruler perltk program measuring screen distances httpptktoolssourceforgenettkruler thu 07 aug 2008 045801 0200 perl 46381 memory sbrk freebsd6x v58x v56x