Hello,

Application compiled on the mentioned platform always crashes when gcc 
optimization flag -O2 and above(-O3) is enabled. If we use optimization flag 
-O1 or do not give any optimization flag, application does not crash and works 
fine.

GCC version:
===========
root at opensolaris#gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.11/3.4.3/specs
Configured with: 
/gates/sfwnv/builds/sfwnv-111a/usr/src/cmd/gcc/gcc-3.4.3/configure 
--prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as 
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc 
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)
root at opensolaris#

Platform information:
====================
root at opensolaris#uname -a
SunOS opensolaris 5.11 snv_111b sun4u sparc SUNW,Sun-Fire-V210 Solaris
root at opensolaris#cat /etc/release
                        OpenSolaris 2009.06 snv_111b SPARC
           Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                              Assembled 07 May 2009
root at opensolaris#

boost version:
===========
boost 1.33.0

The stack trace from the core file is:
==============================
#0  0xffffffff7edc8334 in _lwp_kill () from /lib/64/libc.so.1
#1  0xffffffff7ed7971c in raise () from /lib/64/libc.so.1
#2  0xffffffff7ed53120 in abort () from /lib/64/libc.so.1
#3  0xffffffff797d66ec in __gnu_cxx::__verbose_terminate_handler ()
    at
/gates/sfwnv/builds/sfwnv-111a/usr/src/cmd/gcc/gcc-3.4.3/libstdc++-v3/libsupc++/vterminate.cc:96
#4  0xffffffff797d7c14 in __cxxabiv1::__terminate (handler=0xffffffff797d65e0
<__gnu_cxx::__verbose_terminate_handler()>)
    at
/gates/sfwnv/builds/sfwnv-111a/usr/src/cmd/gcc/gcc-3.4.3/libstdc++-v3/libsupc++/eh_terminate.cc:43
#5  0xffffffff797d74e8 in __gxx_personality_v0 (version=3, actions=6,
exception_class=5138137972254386944, ue_header=0x100af9650,
    context=0xffffffff7fffc1f0) at
/gates/sfwnv/builds/sfwnv-111a/usr/src/cmd/gcc/gcc-3.4.3/libstdc++-v3/libsupc++/eh_personality.cc:434
#6  0xffffffff7a208c20 in _Unwind_RaiseException_Phase2 (exc=0x100af96a0,
context=0xffffffff7fffc1f0)
    at
/gates/sfwnv/builds/sfwnv-111a/usr/src/cmd/gcc/gcc-3.4.3/gcc/unwind.inc:66
#7  0xffffffff7a208f38 in _Unwind_Resume (exc=0x100af96a0) at
/gates/sfwnv/builds/sfwnv-111a/usr/src/cmd/gcc/gcc-3.4.3/gcc/unwind.inc:234

#8  0x00000001002d69a8 in TalWrapper::operator() (this=0x0,
da...@0xffffffff7fffcbf0)
    at
/usr/sfw/lib/gcc/sparc-sun-solaris2.11/3.4.3/../../../../include/c++/3.4.3/ext/new_allocator.h:69
#9  0x000000010028f4e0 in
boost::detail::function::function_obj_invoker1<TalWrapper, std::string,
std::string>::invoke (function_obj_ptr=
      {obj_ptr = 0x1008960b0, const_obj_ptr = 0x1008960b0, func_ptr =
0x1008960b0, data = ""}, a0=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p
= 0x1008a8ff8
"a:3:{i:0;s:78:\"a:2:{i:0;s:12:\"::getVxAgent\";i:1;s:36:\"4522e9db-b925-c35e-fcf5-f8ec6410e340\";}\";i:1;s:18:\"getInitialSettings\";i:2;i:2;}"}})
at ../thirdparty/boost/boost_1_33_0/boost/function/function_template.hpp:127
#10 0x000000010028e924 in std::list<ApplianceTargetLunInfo,
std::allocator<ApplianceTargetLunInfo> >::operator= (this=0xffffffff7fffcfd0,
_...@0x10087b820)
    at
/usr/sfw/lib/gcc/sparc-sun-solaris2.11/3.4.3/../../../../include/c++/3.4.3/bits/stl_list.h:441
#11 0x0000000100287af8 in RpcConfigurator::getCurrentInitialSettings
(this=0x10087b790) at config/cxproxy.h:123
#12 0x000000010028cdc0 in RpcConfigurator (this=0x10087b790,
configSource=USE_CACHE_SETTINGS_IF_CX_NOT_AVAILABLE) at
config/rpcconfigurator.cpp:297
#13 0x0000000100254264 in InitializeConfigurator
(ppconfigurator=0xffffffff7fffef40,
configSource=USE_CACHE_SETTINGS_IF_CX_NOT_AVAILABLE)
    at config/configwrapper.cpp:95
#14 0x00000001001069dc in VxService::InitializeConfigurator
(this=0xffffffff7fffee70) at service/vxservice.cpp:3084
#15 0x000000010012506c in VxService::init (this=0xffffffff7fffee70) at
service/vxservice.cpp:2447
#16 0x0000000100126f38 in VxService::StartWork (data=0xffffffff7fffee70) at
service/vxservice.cpp:625
#17 0x0000000100103608 in UnixService::run_startup_code (this=0x1008818c8) at
service/unix/servicemajor.cpp:67
#18 0x00000001001081f4 in VxService::run_startup_code (this=0x1005f50c0) at
service/vxservice.cpp:546
#19 0x0000000100127ef4 in main (argc=1, argv=0xffffffff7ffffbf8) at
service/vxservice.cpp:235

Analysis:
======
Some forums suggest to use latest version of gcc on opensolaris considering
that gcc 3.4.3 is very old. But only gcc 3.4.3 is available in open solaris
repository. 

The following forum question mentions similar problem reported on opensolaris
x86 with gcc 3.4.3:
http://opensolaris.org/jive/thread.jspa?threadID=86731&tstart=0

Please suggest how can we move forward on debugging the issue.
Please also mention the location of latest gcc supported on open solaris. 
Can we download source of latest stable gcc from GNU site and compile on our 
open solaris box?

Thanks and Regards,
venu.
-- 
This message posted from opensolaris.org

Reply via email to