Sorry, I'm not exactly a pro with GDB, but here is the output of a debugging
session...
bash-3.00$ gdb test
...
This GDB was configured as "powerpc-ibm-aix5.1.0.0"...b
(gdb) break main
Breakpoint 1 at 0x1000064c: file main.cpp, line 8.
(gdb) run
Starting program: /home/mpowers/l4ctest/test
Breakpoint 1 at 0x10000064c: file main.cpp, line 8.
n
[Switching to Thread 1]
Breakpoint 1, main (argc=1, argv=0xffffffffffffab0) at main.cpp:8
8 LoggerPtr root = Logger::getRootLogger();
(gdb) n
9 BasicConfigurator::configure();
(gdb) n
11 root->debug("foo!");
(gdb) s
log4cxx::Logger::debug(std::string const&) (this=0x1100c42b0,
[EMAIL PROTECTED]) at
/home.local/mpowers/new_log4cxx/src/logger.cpp:592
592 if (isEnabledFor(log4cxx::Level::getDebug())) {
(gdb) n
593 forcedLog(log4cxx::Level::getDebug(), msg);
(gdb) s
log4cxx::Level::getDebug() () at
/home.local/mpowers/new_log4cxx/src/level.cpp:55
55 static LevelPtr level(new Level(Level::DEBUG_INT,
LOG4CXX_STR("DEBUG"), 7));
(gdb) n
56 return level;
(gdb) n
57 }
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0x09000000a3b93200 in __thenan_df () from
/usr/lib/nls/loc/uconv/UTF32TBL__64
(gdb) bt
#0 0x09000000a3b93200 in __thenan_df () from
/usr/lib/nls/loc/uconv/UTF32TBL__64
#1 0x09000000a3b931a4 in __thenan_df () from
/usr/lib/nls/loc/uconv/UTF32TBL__64
#2 0x09000000003d488c in iconv (cd=0x1100ce530, inbuf=0xffffffffffff458,
inbytesleft=0x0, outbuf=0xffffffffffff2d0, outbytesleft=0xffffffffffff2d8)
at ../../../../../../../src/bos/usr/ccs/lib/libiconv/iconv.c:720
#3 0x090000000160a708 in __committed () from
/usr/lib/nls/loc/iconv/Universal_UCS_Conv__64
#4 0x09000000003d488c in iconv (cd=0x1100ce3f0, inbuf=0xffffffffffff458,
inbytesleft=0x0, outbuf=0xffffffffffff460, outbytesleft=0xffffffffffff530)
at ../../../../../../../src/bos/usr/ccs/lib/libiconv/iconv.c:720
#5 0x0000000100053610 in apr_xlate_conv_buffer (convset=0x1100cc410,
inbuf=0x0, inbytes_left=0x0,
outbuf=0xffffffffffff558
"foo!\004\005\006\a\b\t\n\v\f\r\016\017\020\021\022\023\024\025\026\027\030\
031\032\033\034\035\036\037
!\"#$%&'()*+,-./0123456789:;<=>[EMAIL PROTECTED]
jklmnopqrstuvwxyz{|}~\177Â\200Â\201Â\202Â\203Â\204Â\205Â\206Â\207Â\210Â\211Â
\212Â\213Â\214Â\215Â\216Â\217Â\220Â\221Â\222Â\223Â\224Â\225Â\226Â\227Â\230Â\
231Â\232Â\233Â\234Â\235Â\236Â\237 ¡¢£"...,
outbytes_left=0xffffffffffff530)
at /home.local/mpowers/new_log4cxx/lib/apr-util-1.2.7/xlate/xlate.c:343
#6 0x000000010004dc48 in
log4cxx::helpers::APRCharsetDecoder::decode(log4cxx::helpers::ByteBuffer&,
std::string&) (this=0x1100cc2d0, [EMAIL PROTECTED],
[EMAIL PROTECTED]) at
/home.local/mpowers/new_log4cxx/src/charsetdecoder.cpp:105
#7 0x000000010004cea4 in log4cxx::helpers::Transcoder::decode(char const*,
unsigned long, std::string&) (src=0x1100ca288 "foo!", len=4,
[EMAIL PROTECTED]) at
/home.local/mpowers/new_log4cxx/src/transcoder.cpp:67
#8 0x00000001000bf204 in void
log4cxx::helpers::Transcoder::decode<std::string>(std::string const&,
std::string&) ([EMAIL PROTECTED],
[EMAIL PROTECTED]) at
/home.local/mpowers/new_log4cxx/include/log4cxx/helpers/transcoder.h:49
#9 0x00000001000c47f4 in
log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT<log4cxx::Level>
const&, std::string const&) const (this=0x1100c42b0,
[EMAIL PROTECTED], [EMAIL PROTECTED]) at
/home.local/mpowers/new_log4cxx/src/logger.cpp:128
#10 0x00000001000c4da0 in log4cxx::Logger::debug(std::string const&)
(this=0x1100c42b0, [EMAIL PROTECTED])
at /home.local/mpowers/new_log4cxx/src/logger.cpp:593
#11 0x00000001000006b4 in main (argc=1, argv=0xffffffffffffab0) at
main.cpp:11
It looks like ultimately its a segfault caused deep within the iconv
library. One problem I'm having is that if I do "step into" on line 55 of
level.cpp, I get this error message:
log4cxx::Level::getDebug() ()
at /home.local/mpowers/new_log4cxx/src/level.cpp:55
55 static LevelPtr level(new Level(Level::DEBUG_INT,
LOG4CXX_STR("DEBUG"), 7));
(gdb) s
__cxa_guard_acquire (g=
findvar.c:706: internal-error: value_from_register: Value not stored
anywhere!
A problem internal to GDB has been detected,
further debugging may prove unreliable.
I'm not really familiar enough with gdb yet to figure this out, so I can't
say for sure whether the problem is with the local version of iconv or with
log4cxx.
Marhall
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Curt Arnold
Sent: 2007-May-24 Thu 11:18 AM
To: Log4CXX User
Subject: Re: IOT/Abort Trap on AIX 5.3
On May 24, 2007, at 9:20 AM, Marshall Powers wrote:
> Ok, I finally finished rebuilding the log4cxx stuff, recompiling
> this (big)
> project, fixing log4cxx, re-recompiling, and finally deploying and
> running,
> and I get a segfault (but not the same IOT/Abort Trap message). I
> went back
> to my simple program, and got the same thing, not even any logging
> output
> now. Here is my test program:
>
> #include <log4cxx/logger.h>
> #include <log4cxx/basicconfigurator.h>
>
> using namespace log4cxx;
>
> int main(int argc, char * argv[])
> {
> LoggerPtr root = Logger::getRootLogger();
> BasicConfigurator::configure();
>
> root->debug("foo!");
> return 0;
> }
>
> Compiled with gcc on AIX 5.3 with flags -g and -maix64, as were
> log4cxx,
> apr, and apr-util. Any suggestions?
>
>
> Thanks,
> Marshall
>
If you used autotools to build, what happens if you do "make check"?
If you used ant to build, did the unit tests pass?
Any details on the segfault?