qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " Nikolay Pyatkov" <npyat...@usa.net>
Subject libqpidcommon.so.6 crashes while loading
Date Thu, 23 May 2013 13:20:55 GMT

We developed a program using qpid. It runs on a development machine but
crashes on the target while loading libqpidcommon.so.6. Looks like it tries to
create a string which is large then existing memory. I compared environment on
both machines and could not see any difference.

Here what we have on the target:

uname -a
Linux lnxe40747 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011
x86_64 x86_64 x86_64 GNU/Linux

$ free -m
             total       used       free     shared    buffers     cached
Mem:          5851       1145       4706          0         17        740
-/+ buffers/cache:        387       5464
Swap:         2047          0       2047


ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 46662
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

rpm -qa |grep qpid
qpid-cpp-client-0.14-16.el6.x86_64



The gdb bt:

(gdb) BT
#0  0x0000003498832885 in raise () from /lib64/libc.so.6
#1  0x0000003498834065 in abort () from /lib64/libc.so.6
#2  0x000000349bcbea7d in __gnu_cxx::__verbose_terminate_handler() () from
/usr/lib64/libstdc++.so.6
#3  0x000000349bcbcc06 in ?? () from /usr/lib64/libstdc++.so.6
#4  0x000000349bcbcc33 in std::terminate() () from /usr/lib64/libstdc++.so.6
#5  0x000000349bcbcd2e in __cxa_throw () from /usr/lib64/libstdc++.so.6
#6  0x000000349bcbd11d in operator new(unsigned long) () from
/usr/lib64/libstdc++.so.6
#7  0x000000349bc9c3c9 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
#8  0x000000349bc9ddaa in std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_M_mutate(unsigned long, unsigned long, unsigned long)
() from /usr/lib64/libstdc++.so.6
#9  0x00007fdd8b059f7d in qpid::log::Options::Options(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&) () from
/usr/lib64/libqpidcommon.so.6
#10 0x00007fdd8b057a86 in qpid::log::Logger::Logger() () from
/usr/lib64/libqpidcommon.so.6
#11 0x00007fdd8b058413 in ?? () from /usr/lib64/libqpidcommon.so.6
#12 0x00007fdd8b079416 in ?? () from /usr/lib64/libqpidcommon.so.6
#13 0x000000000000001d in ?? ()
#14 0x0000000000000001 in ?? ()
#15 0x00007fff10351fc8 in ?? ()
#16 0x00007fdd8af88713 in _init () from /usr/lib64/libqpidcommon.so.6
#17 0x00007fdd8c21a4c8 in ?? ()
#18 0x000000349800e4a5 in _dl_init_internal () from
/lib64/ld-linux-x86-64.so.2
#19 0x0000003498000b3a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#20 0x0000000000000001 in ?? ()
#21 0x00007fff1035368b in ?? ()
#22 0x0000000000000000 in ?? ()


and valgrind output:


==1643== Memcheck, a memory error detector
==1643== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==1643== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==1643== Command: ./PTC_PRO_MSG
==1643==
**1643** new/new[] failed and should throw an exception, but Valgrind
**1643**    cannot throw exceptions and so is aborting instead.  Sorry.
==1643==    at 0x4A063B3: VALGRIND_PRINTF_BACKTRACE (valgrind.h:5028)
==1643==    by 0x4A06CF6: operator new(unsigned long)
(vg_replace_malloc.c:261)
==1643==    by 0x349BC9C3C8: std::string::_Rep::_S_create(unsigned long,
unsigned long, std::allocator<char> const&) (in
/usr/lib64/libstdc++.so.6.0.13)
==1643==    by 0x349BC9D19A: std::string::_Rep::_M_clone(std::allocator<char>
const&, unsigned long) (in /usr/lib64/libstdc++.so.6.0.13)
==1643==    by 0x349BC9D5EB: std::string::reserve(unsigned long) (in
/usr/lib64/libstdc++.so.6.0.13)
==1643==    by 0x349BC978F0: std::basic_stringbuf<char,
std::char_traits<char>, std::allocator<char> >::overflow(int) (in
/usr/lib64/libstdc++.so.6.0.13)
==1643==    by 0x349BC9BAB4: std::basic_streambuf<char, std::char_traits<char>
>::xsputn(char const*, long) (in /usr/lib64/libstdc++.so.6.0.13)
==1643==    by 0x349BC92934: std::basic_ostream<char, std::char_traits<char>
>& std::__ostream_insert<char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)
(in
/usr/lib64/libstdc++.so.6.0.13)
==1643==    by 0x6E97F0A: qpid::log::Options::Options(std::string const&,
std::string const&) (in /usr/lib64/libqpidcommon.so.6.0.0)
==1643==    by 0x6E95A85: qpid::log::Logger::Logger() (in
/usr/lib64/libqpidcommon.so.6.0.0)
==1643==    by 0x6E96412: ??? (in /usr/lib64/libqpidcommon.so.6.0.0)
==1643==    by 0x6EB7415: ??? (in /usr/lib64/libqpidcommon.so.6.0.0)
==1643==
==1643== HEAP SUMMARY:
==1643==     in use at exit: 12,911 bytes in 209 blocks
==1643==   total heap usage: 607 allocs, 397 frees, 30,102 bytes allocated
==1643==
==1643== LEAK SUMMARY:
==1643==    definitely lost: 0 bytes in 0 blocks
==1643==    indirectly lost: 0 bytes in 0 blocks
==1643==      possibly lost: 5,838 bytes in 100 blocks
==1643==    still reachable: 7,073 bytes in 109 blocks
==1643==         suppressed: 0 bytes in 0 blocks
==1643== Rerun with --leak-check=full to see details of leaked memory




Any idea how to debug this?

Thanks,
Nikolay


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message