[rt-users] Perl malloc issues

Gary Holmes Gary.Holmes at surfcontrol.com
Wed Mar 16 12:11:58 EST 2005


OK folks.

I tracked this down some more. The error was coming from the MySQL
client library, not perl.

Upgrading to 4.1.10a has fixed the problem.

Hope this helps someone.

Gary 

> -----Original Message-----
> From: rt-users-bounces at lists.bestpractical.com 
> [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf 
> Of Gary Holmes
> Sent: 25 February 2005 12:04
> To: rt-users at lists.bestpractical.com
> Subject: [rt-users] Perl malloc issues
> 
> Hi,
> 
> We've finally got RT 3.4.1 running on the following:
> 
> 	- Dual processor Dell PE1850, 2 x 2.8Ghz Xeon
> 	- 2GB mem, 73 GB of RAID 1 SCSI disk
> 	- Fedora Core 3 - all updates applied thru 2/24/05
> 	- Apache 2
> 	- Perl 5.8.5 (same happens on 5.8.6)
> 	- All modules at latest rev
> 	- DBIx::Searchbuilder 1.22
> 
> The system is loaded with tickets from our old 2.0.13 system 
> OK. Normal
> functioning in nearly all respects.
> 
> During the install process I was unable to do an incremental 
> update due
> to a perl glibc malloc error in the dumpfile-to-rt3 script. Also, I
> cannot run rt-crontool for the same reason:
> 
> [root at hermes bin]# /usr/bin/perl ./rt-crontool --help
> *** glibc detected *** malloc(): memory corruption: 0x094dd118 ***
> Aborted
> 
> The failure appears to be in DBD::mysql --
> 
> ** THIS IS WITH A LOCALLY COMPILED perl 5.8.6:
> 
> [root at hermes ~]# cd /opt/rt3/bin
> [root at hermes bin]# gdb /opt/perl/bin/perl
> GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public 
> License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "i386-redhat-linux-gnu"...Using host
> libthread_db library "/lib/tls/libthread_db.so.1".
> 
> (gdb) run ./rt-crontool --help
> Starting program: /opt/perl/bin/perl ./rt-crontool --help
> *** glibc detected *** malloc(): memory corruption: 0x0ac81518 ***
> 
> Program received signal SIGABRT, Aborted.
> 0x00b637a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
> (gdb) where
> #0  0x00b637a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
> #1  0x00ba3955 in raise () from /lib/tls/libc.so.6
> #2  0x00ba5319 in abort () from /lib/tls/libc.so.6
> #3  0x00bd6f9a in __libc_message () from /lib/tls/libc.so.6
> #4  0x00bde0c6 in _int_malloc () from /lib/tls/libc.so.6
> #5  0x00bdfbd1 in malloc () from /lib/tls/libc.so.6
> #6  0x004d8e2e in my_malloc ()
>    from 
> /opt/perl/lib/site_perl/5.8.6/i386-linux/auto/DBD/mysql/mysql.so
> #7  0x004da242 in alloc_root ()
>    from 
> /opt/perl/lib/site_perl/5.8.6/i386-linux/auto/DBD/mysql/mysql.so
> #8  0x004e9515 in unpack_fields ()
>    from 
> /opt/perl/lib/site_perl/5.8.6/i386-linux/auto/DBD/mysql/mysql.so
> #9  0x004eb2a5 in cli_read_query_result ()
>    from 
> /opt/perl/lib/site_perl/5.8.6/i386-linux/auto/DBD/mysql/mysql.so
> #10 0x004eb390 in mysql_real_query ()
>    from 
> /opt/perl/lib/site_perl/5.8.6/i386-linux/auto/DBD/mysql/mysql.so
> #11 0x004cdfce in mysql_st_internal_execute (h=0xa600b7c, 
> statement=0x0,
> attribs=0x0,
>     numParams=1, params=0xabe67c8, cdaPtr=0xabfc2b4, svsock=0xac75d8c,
> use_mysql_use_result=0)
>     at dbdimp.c:1620
> #12 0x004ce71b in mysql_st_execute (sth=0xa600b7c, 
> imp_sth=0xabfc248) at
> dbdimp.c:1690
> #13 0x004d0c1a in XS_DBD__mysql__st_execute (cv=0xa5ff91c) at
> mysql.xsi:548
> #14 0x00f3e8f4 in XS_DBI_dispatch (cv=0xa2a3844) at DBI.xs:2656
> #15 0x00e57c4d in Perl_pp_entersub () at pp_hot.c:2890
> #16 0x00e3ef5c in Perl_runops_debug () at dump.c:1449
> #17 0x00df7a0a in perl_run (my_perl=0x9a05008) at perl.c:1934
> #18 0x0804922a in main (argc=0, argv=0x0, env=0xbfeef154) at
> perlmain.c:98
> 
> SAME THING WITH STOCK perl 5.8.5:
> 
> [root at hermes bin]# gdb /usr/bin/perl
> GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public 
> License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "i386-redhat-linux-gnu"...(no debugging
> symbols found)...Using host libthread_db library
> "/lib/tls/libthread_db.so.1".
> 
> (gdb) run ./rt-crontool --help
> Starting program: /usr/bin/perl ./rt-crontool --help
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(nodebugging symbols found)...(no debugging
> symbols found)...(no debugging symbols found)...(no debugging symbols
> found)...[Thread debugging using libthread_db enabled]
> [New Thread -1208285504 (LWP 7655)]
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(nodebugging symbols found)...(no debugging
> symbols found)...(no debugging symbols found)...*** glibc detected ***
> malloc(): memory corruption: 0x0a041fc8 ***
> 
> Program received signal SIGABRT, Aborted.
> [Switching to Thread -1208285504 (LWP 7655)]
> 0x00b637a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
> (gdb) where
> #0  0x00b637a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
> #1  0x00ba3955 in raise () from /lib/tls/libc.so.6
> #2  0x00ba5319 in abort () from /lib/tls/libc.so.6
> #3  0x00bd6f9a in __libc_message () from /lib/tls/libc.so.6
> #4  0x00bde0c6 in _int_malloc () from /lib/tls/libc.so.6
> #5  0x00bdfbd1 in malloc () from /lib/tls/libc.so.6
> #6  0x0021e94e in my_malloc ()
>    from
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DB
> D/mysql/my
> sql.so
> #7  0x0021fd62 in alloc_root ()
>    from
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DB
> D/mysql/my
> sql.so
> #8  0x0022f035 in unpack_fields ()
>    from
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DB
> D/mysql/my
> sql.so
> #9  0x00230dc5 in cli_read_query_result ()
>    from
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DB
> D/mysql/my
> sql.so
> #10 0x00230eb0 in mysql_real_query ()
>    from
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DB
> D/mysql/my
> sql.so
> #11 0x0020e755 in mysql_st_internal_execute (h=0x99bec00,
> statement=0x2d, attribs=0x0,
>     numParams=1, params=0xa008c30, cdaPtr=0x9fb8954, svsock=0xa034c34,
> use_mysql_use_result=0)
>     at dbdimp.c:1620
> #12 0x0020effa in mysql_st_execute (sth=0x99bec00, 
> imp_sth=0x9fb88e8) at
> dbdimp.c:1690
> #13 0x002138d4 in XS_DBD__mysql__st_execute (my_perl=0x8c33008,
> cv=0x99bd73c) at mysql.xsi:505
> #14 0x0018a9fb in XS_DBI_dispatch ()
>    from
> /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/auto/
> DBI/DBI.so
> #15 0x056f1a62 in Perl_pp_entersub ()
>    from /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
> #16 0x056d4e1d in Perl_runops_debug ()
>    from /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
> #17 0x05686c41 in perl_run () from
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
> #18 0x080493a2 in main ()
> 
> Using the MALLOC_CHECK_ environment variable doesn't help.
> 
> Is this some thread safety issue? Anyone else seeing anything like it?
> 
> Thanks,
> Gary
> 
> Get the latest news on SurfControl and our products,
> subscribe to our monthly e-newsletter, SurfAdvisory at:
> http://www.surfcontrol.com/resources/surfadvisory/surfadvisory
> _signup.aspx
> 
> *********************************************************************
> The information in this email is confidential and may be legally
> privileged. It is intended solely for the addressee. Access to this
> email by anyone else is unauthorized. If you are not the intended
> recipient, any disclosure, copying, distribution or any action taken
> or omitted to  be taken in reliance on it, is prohibited and may be
> unlawful. If you believe that you have received this email in error,
> please contact the sender.
> *********************************************************************
> 
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> RT Administrator and Developer training is coming to your 
> town soon! (Boston, San Francisco, Austin, Sydney) Contact 
> training at bestpractical.com for details.
> 
> Be sure to check out the RT Wiki at http://wiki.bestpractical.com
> 

Get the latest news on SurfControl and our products,
subscribe to our monthly e-newsletter, SurfAdvisory at:
http://www.surfcontrol.com/resources/surfadvisory/surfadvisory_signup.aspx

*********************************************************************
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution or any action taken
or omitted to  be taken in reliance on it, is prohibited and may be
unlawful. If you believe that you have received this email in error,
please contact the sender.
*********************************************************************




More information about the rt-users mailing list