日期:2014-05-16  浏览次数:20889 次

core debug求助@!
我现在做的一个项目是把它从linux(32bit)移植到linux(64bit)。配置如下:
Linux(SuSE11)+ Sybase + tomcat1.6
我负责的是后台程序(c/c++开发,调用了C++ 开源库Poco和Linux C的头文件)。前期的Poco库和Sybase的64位动态链接库都已经编译连接好。只是在运行的时候就直接报错,如下:

smm@linux:~> smm_agent: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbin ptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct mallo c_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned lo ng)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size _t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((un signed long)old_end & pagemask) == 0)' failed.
这个我网上查了说是内存问题,可具体是什么又很难定位。


以下是debug信息:
smm@linux:~/build/bin> gdb smm_agent core
GNU gdb (GDB) SUSE (7.0-0.4.16)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/smm/build/bin/smm_agent...done.
Missing separate debuginfo for /home/smm/build/lib/publib/libch_pub.so
Try: zypper install -C "debuginfo(build-id)=5c52a95ce99808f4d56288fa8c1be49e03af7dca"

Reading symbols from /home/sybase/OCS-15_0/lib/libsybintl64.so...(no debugging symbols found)...done.
Loaded symbols for /home/sybase/OCS-15_0/lib/libsybintl64.so
Reading symbols from /lib64/libnsl.so.1...Missing separate debuginfo for /lib64/libnsl.so.1
Try: zypper install -C "debuginfo(build-id)=0123772e96348483f94d1ef0b1568413f40e7e2a"
(no debugging symbols found)...done.
Loaded symbols for /lib64/libnsl.so.1
Reading symbols from /home/sybase/OCS-15_0/lib/libsybtcl64.so...(no debugging symbols found)...done.
Loaded symbols for /home/sybase/OCS-15_0/lib/libsybtcl64.so
Reading symbols from /lib64/ld-linux-x86-64.so.2...Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
Try: zypper install -C "debuginfo(build-id)=17c088070352d83e7afc43d83756b00899fd37f0"
(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Core was generated by `smm_agent'.
Program terminated with signal 6, Aborted.
#0 0x00007f9a33bff945 in raise () from /lib64/libc.so.6
(gdb) where
#0 0x00007f9a33bff945 in raise () from /lib64/libc.so.6
#1 0x00007f9a33c00f21 in abort () from /lib64/libc.so.6
#2 0x00007f9a33c4222d in __malloc_assert () from /lib64/libc.so.6
#3 0x00007f9a33c45460 in _int_malloc () from /lib64/libc.so.6
#4 0x00007f9a33c47057 in malloc () from /lib64/libc.so.6
#5 0x00007f9a3445de4d in operator new(unsigned long) () from /usr/lib64/libstdc++.so.6
#6 0x00007f9a3443bdc1 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) ()
  from /usr/lib64/libstdc++.so.6
#7 0x00007f9a3443c66b in std::basic_string<char, std::char_traits<char>, std::allocator&l