logo       

RE: Application crashed while using log4cxx library: msg#00017

Subject: RE: Application crashed while using log4cxx library
Actually, i dont have root privilizes to do 'make install' for packages apr, apr-util and log4cxx.
Does this have anything to do?


From: Curt Arnold [mailto:carnold@xxxxxxxxxx]
Sent: Wednesday, May 09, 2007 8:00 PM
To: Log4CXX User
Subject: Re: Application crashed while using log4cxx library


On May 9, 2007, at 5:46 AM, Rayapudi Sandeep-mgb376 wrote:

Hi,

I am using log4cxx (0.10.0 version) on RHEL 2.6 version. I built it with apr-1.2.8, apr-util-1.2.8.
When I used that in my application it crashed with backtrace pointing to memcpy in stdc++ libraray.

************************
(gdb) set args start
(gdb) r
Starting program: /vobs/S3/code/sbin/SysControlCLI start
[Thread debugging using libthread_db enabled]
[New Thread -1209981248 (LWP 9310)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1209981248 (LWP 9310)]
0x00b8d09c in memcpy () from /lib/tls/libc.so.6
(gdb) bt
#0  0x00b8d09c in memcpy () from /lib/tls/libc.so.6
#1  0x00ab5079 in std::string::_M_mutate () from /usr/lib/libstdc++.so.5
#2  0xb7f69863 in std::transform<__gnu_cxx::__normal_iterator<char const*, std::string>, std::insert_iterator<std::string>, int (*)(int)> (__first={_M_current = 0x80573ec "XMLLayout"}, __result=

        {<std::iterator<std::output_iterator_tag,void,void,void,void>> = {<No data fields>}, container = 0xbffff4cc, iter = {_M_current = 0x304c2c "xm"}}, __unary_op=0xb444a0 <tolower>) at basic_string.h:1360

#3  0xb7f69426 in log4cxx::helpers::StringHelper::toLowerCase (s=@0x8057299) at basic_string.h:474
#4  0xb7ede6e4 in log4cxx::helpers::Class::registerClass (newClass=@0xb7fc9ef0) at new_allocator.h:62
#5  0xb7ee101a in log4cxx::helpers::ClassRegistration::ClassRegistration () at namepatternconverter.cpp:33
#6  0xb7f7c0eb in log4cxx::xml::XMLLayout::registerClass () at xmllayout.cpp:35
#7  0xb7f7d222 in global constructors keyed to _ZNK7log4cxx3xml9XMLLayout8getClassEv () at xmllayout.cpp:35
#8  0xb7f7ee05 in __do_global_ctors_aux () from /vobs/S3/tools/log4cxx-0.10.0/src/.libs/liblog4cxx.so.10
#9  0xb7eccf05 in _init () from /vobs/S3/tools/log4cxx-0.10.0/src/.libs/liblog4cxx.so.10
#10 0x00b12208 in _dl_init_internal () from /lib/ld-linux.so.2
#11 0x00b067f5 in _dl_start_user () from /lib/ld-linux.so.2
(gdb) q
The program is running.  Exit anyway? (y or n) y
******************************

And I have following libraries

mgb376@micslin09:/usr/lib [\>]  ls -l /usr/lib/libstdc++*
-rwxr-xr-x  1 root root 258288 Dec 14  2004 /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so*
-rwxr-xr-x  1 root root 268428 Dec 14  2004 /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so*
lrwxrwxrwx  1 root root     30 Feb 20 16:20 /usr/lib/libstdc++-libc6.1-1.so.2 -> libstdc++-2-libc6.1-1-2.9.0.so*
lrwxrwxrwx  1 root root     31 Feb 20 16:20 /usr/lib/libstdc++-libc6.2-2.so.3 -> libstdc++-3-libc6.2-2-2.10.0.so*
lrwxrwxrwx  1 root root     18 Feb 20 15:29 /usr/lib/libstdc++.so.5 -> libstdc++.so.5.0.7*
-rwxr-xr-x  1 root root 744136 Dec  1  2004 /usr/lib/libstdc++.so.5.0.7*
lrwxrwxrwx  1 root root     18 Feb 20 15:17 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.3*
-rwxr-xr-x  1 root root 806176 Dec 14  2004 /usr/lib/libstdc++.so.6.0.3*

********************************

Trivial (trivial.cpp) seems to execute to properly.
Can anyone help me out?

Thnx,
Sandeep


Strange.  The stack trace suggests that it occurs during static initialization, so I would assume any log4cxx using app would fail even trivial.cpp.  The stack trace is a little corrupted since it says that ClassRegistration::ClassRegistration() is in namepatternconverter.cpp when it is in classregistration.cpp.

If you built using make, did you do "make check" and did those tests pass?

Does your app fail on start up or are you somehow reloading or reinitializing log4cxx during the run?

Can you run valgrind on your app and see if it reports anything suspicious?

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe