Hi,
We have experienced crashes on Solaris which we think are partly to do with the 
-xarch=v8plus flag.
However, removing it is impossible (or is there a way?!) without disabling the 
assembly code
inside "thread.cpp". I have some questions on that:

1. Why was asm code used in the first place for atomic add instead of the 
solaris' InterlockedIncrement?
   I suspect this was due to some bug in some version or other of SunOS 
implementation with conjunction of the v8 flags, but I'd
   be most grateful to hear more details, or whether there is a specific 
CC/Solaris patch
   that handles that.
2. Disabling the assembly code allows us to compile without the v8plus 
optimization flag (with the downside of
not being thread-safe), and log4cxx seems to work fine with DOMConfigurator, 
but, alas, crashes on PropertyConfigurator, this time
on the actual Solaris underlying __AtomicAdd32, when referencing stl strings 
(from within std::basic_string)

Any ideas on how to proceed will be welcome, as I am running out of any very 
quickly...

Many thanks,
Barak

PS - For anyone with morbid interest, below are two stack traces, both from 
PropertyConfigurator crash, the first one
when using the -xarch=v8plus flag, and the second when disabling the 
sparc_atomic_add_32 method of thread.cpp file
and building without that flag:

Stack trace for ProperyConfigurator - with v8plus instructions
 =============================================

 (/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where
current thread: [EMAIL PROTECTED]
  [1] __AtomicAdd32(0xfed45be8, 0xffffffff, 0x0, 0x10000, 0xffff, 0xffff), at 
0x8fa6c
  [2] __rwstd::__string_ref<char,std::char_traits<char>,std::allocator<char> 
>::__unSafeRemoveReference(0xfed45bd0, 0xffbed6f4, 0x19, 0x0, 0x0, 0x1), at 
0xfed70010
  [3] __rwstd::__string_ref<char,std::char_traits<char>,std::allocator<char> 
>::__removeReference(0xfed45bd0, 0xffbed6f4, 0xffbed590, 0x294af0, 0x4, 0x0), 
at 0xfed6f27c
  [4] std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>::__unLink(0xffbed704, 0xffbed604, 0x4, 0xffffffff, 0x15, 0xfffffffb), at 
0xfed6cdf8
  [5] std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>::~basic_string(0xffbed704, 0xffbed714, 0x294bc4, 0x0, 0x0, 0x0), at 0xfed6ba20
  [6] log4cxx::PropertyConfigurator::parseCategory(0xffbedee0, 0xffbede4c, 
0xffbed800, 0xffbed830, 0xfee49980, 0xffbed82c), at 0xfed68c20
  [7] log4cxx::PropertyConfigurator::configureRootCategory(0xffbedee0, 
0xffbede4c, 0x295124, 0x82ba8, 0x1, 0x0), at 0xfed67c48
=>[8] log4cxx::PropertyConfigurator::doConfigure(0xffbedee0, 0xffbede4c, 
0x295124, 0x157cc0, 0x157cc0, 0x155ce8), at 0xfed675f8
  [9] log4cxx::PropertyConfigurator::doConfigure(0xffbedee0, 0x29611c, 
0x295124, 0x0, 0x0, 0x0), at 0xfed66ee8
  [10] PropertyWatchdog::doOnChange(0x2960f0, 0xffbee3bc, 0xff1f0fd8, 
0xff3e7fe8, 0x0, 0x2), at 0xfed6dd44
  [11] log4cxx::helpers::FileWatchdog::checkAndConfigure(0x2960f0, 0xfee49ccc, 
0xffbee750, 0xff3e7fe8, 0x0, 0x1), at 0xfecf54e4
  [12] log4cxx::helpers::FileWatchdog::start(0x2960f0, 0xea60, 0x13b88, 
0xff3b2c10, 0xfeb6a08c, 0x78), at 0xfecf5608
  [13] log4cxx::PropertyConfigurator::configureAndWatch(0xffbee750, 0xea60, 
0x0, 0x0, 0x0, 0x0), at 0xfed67350
  [14] log4cxx::PropertyConfigurator::configureAndWatch(0xffbee750, 0x0, 
0xffbee8b4, 0x156530, 0x0, 0x1), at 0xfed672b4
  [15] gedcore::LogManager::configure(this = 0x160fa0), line 279 in 
"LogManager.cpp"
  [16] gedcore::LogManager::LogManager(this = 0x160fa0), line 156 in 
"LogManager.cpp"
  [17] gedcore::LogManager::instance(), line 180 in "LogManager.cpp"
  [18] gedcore::LogLoggingTest::getLogger(), line 56 in "LogLoggingTest.h"
  [19] gedcore::LogLoggingTest::test_debug(this = 0x162238), line 195 in 
"LogLoggingTest.cpp"
  [20] CppUnit::TestCaller<gedcore::LogLoggingTest>::runTest(this = 0x1614b8), 
line 166 in "TestCaller.h"
  [21] CppUnit::TestCaseMethodFunctor::operator()(0xffbeef40, 0xffbeecc0, 
0x296020, 0xfe941ce4, 0x0, 0x0), at 0xfef0b384
  [22] CppUnit::DefaultProtector::protect(0x160f70, 0xffbeef40, 0xffbeeec0, 
0xfffffff8, 0xffbeeb58, 0x295139), at 0xfeeef328
  [23] CppUnit::ProtectorChain::ProtectFunctor::operator()(0x162ea8, 
0xffbeedec, 0xffbeef40, 0xffbeeec0, 0xfeb6a08c, 0x10), at 0xfef01f90
  [24] CppUnit::ProtectorChain::protect(0x294e28, 0xffbeef40, 0xffbeeec0, 
0xffbeef3c, 0x64, 0x156558), at 0xfef00cf8
  [25] CppUnit::TestResult::protect(0xffbef4f8, 0xffbeef40, 0x1614b8, 
0xffbeef3c, 0x0, 0x5), at 0xfef1e710
  [26] CppUnit::TestCase::run(0x1614b8, 0xffbef4f8, 0xff1f0c68, 0xff3e7fe8, 
0x0, 0x5), at 0xfef09ed8
  [27] CppUnit::TestComposite::doRunChildTests(0x162218, 0xffbef4f8, 
0xff1f0c68, 0xff3e7fe8, 0x0, 0x1), at 0xfef0d2ec
  [28] CppUnit::TestComposite::run(0x162218, 0xffbef4f8, 0xff1f0c68, 
0xff3e7fe8, 0x0, 0x1), at 0xfef0d030
  [29] CppUnit::TestComposite::doRunChildTests(0x1621d8, 0xffbef4f8, 0x0, 
0xff3e7fe8, 0x2db10, 0xff3c7890), at 0xfef0d2ec
  [30] CppUnit::TestComposite::run(0x1621d8, 0xffbef4f8, 0xffbef4f8, 
0xff3e7fe8, 0x0, 0x1), at 0xfef0d030
  [31] CppUnit::TestRunner::WrappingSuite::run(0x1621b8, 0xffbef4f8, 
0xffbef46c, 0xff3e7fe8, 0x0, 0x5), at 0xfef22e78
  [32] CppUnit::TestResult::runTest(0xffbef4f8, 0x1621b8, 0xffbef46c, 0x25, 
0x0, 0x156558), at 0xfef1e3a8
  [33] CppUnit::TestRunner::run(0xffbef47c, 0xffbef4f8, 0xffbef46c, 0x218, 
0xfeb6a748, 0x0), at 0xfef232c8
  [34] main(argc = 1, argv = 0xffbef59c), line 26 in "test.cpp"

Stack trace for PropertyConfigurator - no v8plus version
==========================================

  [1] _lock_try_adaptive(0xfecec3b8, 0x2089c, 0x2969d8, 0xfea3c008, 0x2969d0, 
0x0), at 0xfee2b258
  [2] _ti_pthread_mutex_lock(0xc7, 0xfee3c000, 0xfecec3b8, 0xfed1703c, 
0xffbecd50, 0x0), at 0xfee1b798
=>[3] _RWSTDMutex::acquire(this = 0xfecec3b8), line 228 in "stdmutex.h"
  [4] _RWSTDGuard::_RWSTDGuard(this = 0xffbed2c0, m = CLASS), line 261 in 
"stdmutex.h"
  [5] __rwstd::__string_ref<char,std::char_traits<char>,std::allocator<char> 
>::__removeReference(this = 0xfecec3b8), line 238 in "string_ref"
  [6] std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>::__unLink(this = 0xffbed4a4), line 863 in "string"
  [7] std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>::~basic_string(this = 0xffbed4a4), line 283 in "string"
  [8] log4cxx::PropertyConfigurator::parseCategory(this = 0xffbedc80, props = 
CLASS, logger = CLASS, optionKey = CLASS, loggerName = CLASS, value = CLASS), 
line 317 in "propertyconfigurator.cpp"
  [9] log4cxx::PropertyConfigurator::configureRootCategory(this = 0xffbedc80, 
props = CLASS, hierarchy = CLASS), line 213 in "propertyconfigurator.cpp"
  [10] log4cxx::PropertyConfigurator::doConfigure(this = 0xffbedc80, properties 
= CLASS, hierarchy = CLASS), line 166 in "propertyconfigurator.cpp"
  [11] log4cxx::PropertyConfigurator::doConfigure(this = 0xffbedc80, 
configFileName = CLASS, hierarchy = CLASS), line 119 in 
"propertyconfigurator.cpp"
  [12] PropertyWatchdog::doOnChange(this = 0x296478), line 55 in 
"propertyconfigurator.cpp"
  [13] log4cxx::helpers::FileWatchdog::checkAndConfigure(this = 0x296478), line 
60 in "filewatchdog.cpp"
  [14] log4cxx::helpers::FileWatchdog::start(this = 0x296478), line 77 in 
"filewatchdog.cpp"
  [15] log4cxx::PropertyConfigurator::configureAndWatch(configFilename = CLASS, 
delay = 60000), line 143 in "propertyconfigurator.cpp"
  [16] log4cxx::PropertyConfigurator::configureAndWatch(configFilename = 
CLASS), line 134 in "propertyconfigurator.cpp"
  [17] gedcore::LogManager::configure(this = 0x160fa8), line 279 in 
"LogManager.cpp"
  [18] gedcore::LogManager::LogManager(this = 0x160fa8), line 156 in 
"LogManager.cpp"
  [19] gedcore::LogManager::instance(), line 180 in "LogManager.cpp"
  [20] gedcore::LogLoggingTest::getLogger(), line 56 in "LogLoggingTest.h"
  [21] gedcore::LogLoggingTest::test_debug(this = 0x162240), line 195 in 
"LogLoggingTest.cpp"
  [22] CppUnit::TestCaller<gedcore::LogLoggingTest>::runTest(this = 0x1614c0), 
line 166 in "TestCaller.h"
dbx: warning: can't find file 
"/home/zhansha/cppunit-1.10.2/src/cppunit/.libs/TestCase.o"
dbx: warning: see `help finding-files'
  [23] CppUnit::TestCaseMethodFunctor::operator()(0xffbeece8, 0xffbeea68, 
0x2963c8, 0xfe9c1ce4, 0x0, 0x0), at 0xfef0b384
dbx: warning: can't find file 
"/home/zhansha/cppunit-1.10.2/src/cppunit/.libs/DefaultProtector.o"
  [24] CppUnit::DefaultProtector::protect(0x160f78, 0xffbeece8, 0xffbeec68, 
0xfffffff8, 0xffbee900, 0x295559), at 0xfeeef328
dbx: warning: can't find file 
"/home/zhansha/cppunit-1.10.2/src/cppunit/.libs/ProtectorChain.o"
  [25] CppUnit::ProtectorChain::ProtectFunctor::operator()(0x162ec8, 
0xffbeeb94, 0xffbeece8, 0xffbeec68, 0xfee6a08c, 0x10), at 0xfef01f90
  [26] CppUnit::ProtectorChain::protect(0x2951b0, 0xffbeece8, 0xffbeec68, 
0xffbeece4, 0x64, 0x156570), at 0xfef00cf8
dbx: warning: can't find file 
"/home/zhansha/cppunit-1.10.2/src/cppunit/.libs/TestResult.o"
  [27] CppUnit::TestResult::protect(0xffbef2a0, 0xffbeece8, 0x1614c0, 
0xffbeece4, 0x0, 0x5), at 0xfef1e710
  [28] CppUnit::TestCase::run(0x1614c0, 0xffbef2a0, 0xff320b24, 0xff3e7fe8, 
0x0, 0x5), at 0xfef09ed8
dbx: warning: can't find file 
"/home/zhansha/cppunit-1.10.2/src/cppunit/.libs/TestComposite.o"
  [29] CppUnit::TestComposite::doRunChildTests(0x162220, 0xffbef2a0, 
0xff320b24, 0xff3e7fe8, 0x0, 0x1), at 0xfef0d2ec
  [30] CppUnit::TestComposite::run(0x162220, 0xffbef2a0, 0xff320b24, 
0xff3e7fe8, 0x0, 0x1), at 0xfef0d030
  [31] CppUnit::TestComposite::doRunChildTests(0x1621e0, 0xffbef2a0, 0x0, 
0xff3e7fe8, 0x2db10, 0xff3c7890), at 0xfef0d2ec
  [32] CppUnit::TestComposite::run(0x1621e0, 0xffbef2a0, 0xffbef2a0, 
0xff3e7fe8, 0x0, 0x1), at 0xfef0d030
dbx: warning: can't find file 
"/home/zhansha/cppunit-1.10.2/src/cppunit/.libs/TestRunner.o"
  [33] CppUnit::TestRunner::WrappingSuite::run(0x1621c0, 0xffbef2a0, 
0xffbef214, 0x0, 0x0, 0x0), at 0xfef22e78
  [34] CppUnit::TestResult::runTest(0xffbef2a0, 0x1621c0, 0xffbef214, 0x25, 
0x0, 0x156570), at 0xfef1e3a8
  [35] CppUnit::TestRunner::run(0xffbef224, 0xffbef2a0, 0xffbef214, 0x0, 0x0, 
0x0), at 0xfef232c8
  [36] main(argc = 1, argv = 0xffbef344), line 26 in "test.cpp"

________________________
Barak Simon
GED IT Core Platform
190 George St. Sydney, 2000
Deutsche Bank
Phone +61 2 925 85070
Fax      +61 2 925 95050


--

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.


Reply via email to