December 13, 2017, 04:54:23 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: glibc - double free or corruption  (Read 2640 times)

Offline vababu

  • New Member
  • Posts: 1
glibc - double free or corruption
« on: March 12, 2007, 09:47:25 AM »
Hi,

We have an application on RHEL4 U4  which uses JNI calls.
During endurance, it fails after about 10 laks of message syaing the following

*** glibc detected *** double free or corruption (!prev): 0x094019e0 ***

bt of the core shows the following

(gdb) bt
#0  0x0021d7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x002857a5 in raise () from /lib/tls/libc.so.6
#2  0x00287209 in abort () from /lib/tls/libc.so.6
#3  0x002b971a in __libc_message () from /lib/tls/libc.so.6
#4  0x002bffbf in _int_free () from /lib/tls/libc.so.6
#5  0x002c033a in free () from /lib/tls/libc.so.6
#6  0xb1f56283 in Java_com_hp_opencall_map_mapJNI_delete_1map_1message_1t (jenv=0x809c398,
    jcls=0xb256caec, jarg1=2562072288) at /root/map-build/map_wrap.c:1662
#7  0xb291aa88 in ?? ()
#8  0x0809c398 in ?? ()
#9  0xb256caec in ?? ()
#10 0x98b61ee0 in ?? ()
#11 0x00000000 in ?? ()

We tried to troubleshoot this issue by ensuring the build options, linker options etc. We have revisited the code for malloc/free but could not solve  it

Kernel : 2.6.9-42.ELsmp
glibc   : glibc-2.3.4-2.25
gcc     :  3.4.6


We have been trying with valgrind but surprisingly the following options could not generating any log:

algrind --tool=memcheck  --log-file=valgrind.output --num-callers=20 --leak-check=yes --trace-children=yes java  xxxxxxxxxxxxxxxxx

Any known issues ? with these versions of  glibc/gcc.When browsed many ppl have posted the same issue but no proper resolution.Any help would be appreciated

Thanks inadvance
babu

Offline voidwyzard

  • New Member
  • Posts: 3
Re: glibc - double free or corruption
« Reply #1 on: March 06, 2008, 01:44:49 AM »
valgrind is great, and even better if you start a project using it, and dilligently fix errors it reports.

It isn't clear from your post, but since you mention JNI, I'm going to assume you are calling some C or C++ code from Java?  If you provide a succinct example of the class(es) or functions which break you may get more help.

-chuck