LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-16-2009, 04:54 AM   #1
Thiyagarajan R
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Rep: Reputation: 0
Program aborted on CentOS with glibc-2.5 and not on Fedora with glibc 2.9


Hello All,

Would like to discuss on a software problem which is a design blocker to me.The problem description is given below.

Problem
A multithread 'C' application aborts it's execution because of glibc error,"free() invalid next size (fast)", when deallocating memory.

Environment
CentOS - Release 5.0
Glibc - Version 2.5
Gcc - Version 4.1.1 20070105
libssh - 0.3.0 ( from http://libssh.org )

Description
The application uses libssh functions( channel_request_exec,channel_read_buffer,etc) to execute commands on remote servers and read their responses.This polling routine is performed for every 15 seconds.

When the application completes around 50 polling cycles on CentOS-5,it aborts due to the glibc error and dies with pain.( call trace is given below ).

The same application happily runs on Fedora Core-10,even after 4000 polling cycle.Means the problem is not seen so far.

Preliminary analysis
At the moment,I have no concrete findings on this issues.

Only major difference is that the glibc version of CentOs-5 is 2.5 and for Fedora Core-10 is 2.9 ( It does not mean that the issue is with glibc ).

Request your suggestions for analysing the problem further.

Call trace
*** glibc detected *** /xxxx/xxxx/backend_service/debug/src/backend_service: free(): invalid next size (fast): 0x08bb6790 ***
======= Backtrace: =========
/lib/libc.so.6[0x877f5d]
/lib/libc.so.6(cfree+0x90)[0x87b5b0]
/usr/lib/libssh.so.3(packet_encrypt+0x256)[0xdcf072]
/usr/lib/libssh.so.3[0xddce42]
/usr/lib/libssh.so.3(packet_send+0x11)[0xddcf2d]
/usr/lib/libssh.so.3[0xdc7b6a]
/usr/lib/libssh.so.3(channel_read_buffer+0x2fc)[0xdcaa0b]
/root/Desktop/Install/defwmtd1/backend_service/debug/src/backend_service[0x804e8b2]
/lib/libpthread.so.0[0x9852db]
/lib/libc.so.6(clone+0x5e)[0x8df12e]
======= Memory map: ========
004c4000-004cd000 r-xp 00000000 fd:00 6979625 /lib/libnss_files-2.5.so
004cd000-004ce000 r-xp 00008000 fd:00 6979625 /lib/libnss_files-2.5.so
004ce000-004cf000 rwxp 00009000 fd:00 6979625 /lib/libnss_files-2.5.so
0069c000-006ae000 r-xp 00000000 fd:00 6980435 /lib/libnsl-2.5.so
006ae000-006af000 r-xp 00012000 fd:00 6980435 /lib/libnsl-2.5.so
006af000-006b0000 rwxp 00013000 fd:00 6980435 /lib/libnsl-2.5.so
006b0000-006b2000 rwxp 006b0000 00:00 0
006b4000-006b6000 r-xp 00000000 fd:00 6979775 /lib/libcom_err.so.2.1
006b6000-006b7000 rwxp 00001000 fd:00 6979775 /lib/libcom_err.so.2.1
006b9000-006bb000 r-xp 00000000 fd:00 6979669 /lib/libkeyutils-1.2.so
006bb000-006bc000 rwxp 00001000 fd:00 6979669 /lib/libkeyutils-1.2.so
006be000-006c6000 r-xp 00000000 fd:00 8978571 /usr/lib/libkrb5support.so.0.1
006c6000-006c7000 rwxp 00007000 fd:00 8978571 /usr/lib/libkrb5support.so.0.1
006cd000-00708000 r-xp 00000000 fd:00 6980440 /lib/libsepol.so.1
00708000-00709000 rwxp 0003a000 fd:00 6980440 /lib/libsepol.so.1
00709000-00713000 rwxp 00709000 00:00 0
00715000-00724000 r-xp 00000000 fd:00 6979791 /lib/libresolv-2.5.so
00724000-00725000 r-xp 0000e000 fd:00 6979791 /lib/libresolv-2.5.so
00725000-00726000 rwxp 0000f000 fd:00 6979791 /lib/libresolv-2.5.so
00726000-00728000 rwxp 00726000 00:00 0
00744000-0075a000 r-xp 00000000 fd:00 6979639 /lib/libselinux.so.1
0075a000-0075c000 rwxp 00015000 fd:00 6979639 /lib/libselinux.so.1
0075e000-00783000 r-xp 00000000 fd:00 8978572 /usr/lib/libk5crypto.so.3.1
00783000-00784000 rwxp 00025000 fd:00 8978572 /usr/lib/libk5crypto.so.3.1
00786000-007b3000 r-xp 00000000 fd:00 8978574 /usr/lib/libgssapi_krb5.so.2.2
007b3000-007b4000 rwxp 0002d000 fd:00 8978574 /usr/lib/libgssapi_krb5.so.2.2
007f0000-00809000 r-xp 00000000 fd:00 2588674 /lib/ld-2.5.so
00809000-0080a000 r-xp 00018000 fd:00 2588674 /lib/ld-2.5.so
0080a000-0080b000 rwxp 00019000 fd:00 2588674 /lib/ld-2.5.so
00812000-00949000 r-xp 00000000 fd:00 2588675 /lib/libc-2.5.so
00949000-0094b000 r-xp 00137000 fd:00 2588675 /lib/libc-2.5.so
0094b000-0094c000 rwxp 00139000 fd:00 2588675 /lib/libc-2.5.so
0094c000-0094f000 rwxp 0094c000 00:00 0
00951000-00976000 r-xp 00000000 fd:00 2588682 /lib/libm-2.5.so
00976000-00977000 r-xp 00024000 fd:00 2588682 /lib/libm-2.5.so
00977000-00978000 rwxp 00025000 fd:00 2588682 /lib/libm-2.5.so
0097a000-0097c000 r-xp 00000000 fd:00 2588676 /lib/libdl-2.5.so
0097c000-0097d000 r-xp 00001000 fd:00 2588676 /lib/libdl-2.5.so
0097d000-0097e000 rwxp 00002000 fd:00 2588676 /lib/libdl-2.5.so
00980000-00993000 r-xp 00000000 fd:00 2588677 /lib/libpthread-2.5.so
00993000-00994000 r-xp 00012000 fd:00 2588677 /lib/libpthread-2.5.so
00994000-00995000 rwxp 00013000 fd:00 2588677 /lib/libpthread-2.5.so
00995000-00997000 rwxp 00995000 00:00 0
00999000-009ab000 r-xp 00000000 fd:00 1021032 /usr/lib/libz.so.1.2.3
009ab000-009ac000 rwxp 00011000 fd:00 1021032 /usr/lib/libz.so.1.2.3
009ae000-00acf000 r-xp 00000000 fd:00 1802845 /usr/lib/mysql/libmysqlclient.so.15.0.0
00acf000-00b11000 rwxp 00120000 fd:00 1802845 /usr/lib/mysql/libmysqlclient.so.15.0.0
00b11000-00b12000 rwxp 00b11000 00:00 0
00c37000-00c38000 r-xp 00c37000 00:00 0 [vdso]
00c9f000-00caa000 r-xp 00000000 fd:00 6979662 /lib/libgcc_s-4.1.1-20070105.so.1
00caa000-00cab000 rwxp 0Encrypt Free = 8bb6790
Program received signal SIGABRT, Aborted.
[Switching to Thread -1229239408 (LWP 4125)]
0x00c37402 in __kernel_vsyscall ()
(gdb) bt
#0 0x00c37402 in __kernel_vsyscall ()
#1 0x0083ac00 in raise () from /lib/libc.so.6
#2 0x0083c451 in abort () from /lib/libc.so.6
#3 0x008701fb in __libc_message () from /lib/libc.so.6
#4 0x00877f5d in _int_free () from /lib/libc.so.6
#5 0x0087b5b0 in free () from /lib/libc.so.6
#6 0x00dcf072 in packet_encrypt (session=0x8bbbee0, data=0x8bbf658, len=23) at /root/libssh-0.3.0/libssh/crypt.c:159
#7 0x00ddce42 in packet_send2 (session=0x8bbbee0) at /root/libssh-0.3.0/libssh/packet.c:482
#8 0x00ddcf2d in packet_send (session=0x8bbbee0) at /root/libssh-0.3.0/libssh/packet.c:587
#9 0x00dc7b6a in grow_window (session=0x8bbbee0, channel=0x8bbd0f0, minimumsize=0)
at /root/libssh-0.3.0/libssh/channels.c:262
#10 0x00dcaa0b in channel_read_buffer (channel=0x8bbd0f0, buffer=0x8bba6e8, count=0, is_stderr=0)
at /root/libssh-0.3.0/libssh/channels.c:1414
#11 0x0804e8b2 in receiver_routine (thread_num=0x8bb8008) at /defwmtd1/backend_service/src/monitoring_service.c:1934
#12 0x009852db in start_thread () from /lib/libpthread.so.0
#13 0x008df12e in clone () from /lib/libc.so.6

Thanks for your time.

ThiyagarajanR
-----------------------------------------------------------------------------------
 
Old 06-16-2009, 12:58 PM   #2
Thiyagarajan R
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Logical conclusion - Possible problem with glibc 2.5

Below bug reports are submitted.

Red Hat Bugzilla Bug 506320
CentOS Bug Tracker Bug 0003687

Thanks one and all for your time.

This thread can be closed.

ThiyagarajanR
--------------------------------------------------------------------------
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem installing glibc-2.3.2-4.80.i686, glibc-common-2.3.2-4.80.8.i386.rpm martianpackets Red Hat 8 05-01-2009 04:22 PM
glibc-compiling loves to make errors? ok, let me post mine here: glibc 2.9 me-$-on Linux From Scratch 7 04-11-2009 07:22 PM
"glibc detected -> program aborted" plz help in debugging.. rs_vijay Programming 6 11-22-2006 01:16 AM
Replacing glibc using linuxthreads for glibc using nptl (native positx thread library CestusGW Linux From Scratch 4 01-20-2005 08:26 AM
ncsd, glibc, and glibc-common conflicts during LAMP install beaker911 Linux - Software 0 12-30-2004 03:31 PM


All times are GMT -5. The time now is 02:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration