Error while loading program.
Hi,
I am getting the following error message while trying to execute a program through dbx.
(dbx) run
Running: dev_server
(process id 16372)
t@1 (l@1) signal SEGV (no mapping at the fault address) in mutex_lock_impl at 0xfd2b8dcc
0xfd2b8dcc: mutex_lock_impl+0x0010:ldub[%i0 + 5], %i4
(dbx) where
current thread: t@1
=>[1] mutex_lock_impl(0x8, 0x0, 0x0, 0x1000, 0x0, 0xfd2ecbc0), at 0xfd2b8dcc
[2] std::basic_ios<char,std::char_traits><char> >::init(0xfd3ae118, 0xfd3af648, 0x0, 0x137d4, 0xfe3ea810, 0x38fe0), at 0xfd372840
[3] std::basic_istream<char,std::char_traits><char> >::basic_istream(0xfd3ae110, 0xfd3af648, 0xfed206c4, 0xfffe342e, 0x79c6c, 0x1c800), at 0xfd3725c4
[4] std::ios_base::Init::Init(0xfed234b8, 0xfd2ecbc0, 0xfed234b4, 0xfed206c4, 0x2df0, 0x7a330), at 0xfd363fc8
[5] __SLIP.INIT_K(0x0, 0xfed206c4, 0xa7bf4, 0x79c00, 0x2df4, 0x2c00), at 0xfeca63b4
[6] 0xfeceac1c(0x0, 0x1, 0xfc3c2a00, 0xff3ec980, 0x30524, 0xff3ec268), at 0xfeceac1c
[7] call_init(0x1, 0xfeceab2c, 0xff221cd8, 0xffdfffff, 0xff3ec980, 0xffffff7f), at 0xff3bfd4c
[8] elf_bndr(0xfeca6d40, 0x1021, 0xfd366a68, 0xff3ec0f8, 0xff3ee6a8, 0x0), at 0xff3cc32c
[9] elf_rtbndr(0xfd366a68, 0x398d0, 0x0, 0x137d4, 0xfe3ea810, 0x398d0), at 0xff3b3804
[10] 0xfd3a4d40(0xffbfed48, 0xfd392444, 0xffbfed47, 0xff3cc334, 0xfd2e8284, 0x0), at 0xfd3a4d40
[11] __rwstd::locale_imp::locale_imp(0xfd3aea38, 0xffbfed48, 0x1, 0x137d4, 0xfe3ea810, 0x39888), at 0xfd366a68
[12] std::locale::init(0xc00, 0xc6c, 0x4c00, 0xfc3c2a00, 0x0, 0x0), at 0xfd36763c
[13] __SLIP.INIT_A(0x0, 0xfd2ecbc0, 0xa7bf4, 0xfd2b6c08, 0xfc3c0500, 0xfc3c0540), at 0xfd363b74
[14] __STATIC_CONSTRUCTOR(0xfd363558, 0xfe3eb004, 0x0, 0x1, 0x139c0, 0xfd2e8284), at 0xfd364e24
[15] _init(0x0, 0x1, 0xfc3c2a00, 0xff3ec980, 0x30524, 0xff3ec268), at 0xfd379bd8
[16] call_init(0x1, 0xfd379b80, 0xfeb81774, 0xffdfffff, 0xff3ec980, 0xffffff7f), at 0xff3bfd4c
[17] elf_bndr(0xfd364e54, 0x1021, 0xfe3d6e94, 0xff3ec0f8, 0xff3ee6a8, 0x0), at 0xff3cc32c
[18] elf_rtbndr(0xfe3d6e94, 0xfe3eaf34, 0x0, 0xfc3c2a00, 0x0, 0x0), at 0xff3b3804
[19] 0xfe3ea93c(0xfe3eaf34, 0xfd2ecbc0, 0xfe3ef178, 0x153bc, 0x0, 0xfe3eaf34), at 0xfe3ea93c
[20] __Cimpl::cplus_init(0x1, 0xfe3eb004, 0xa7bf4, 0x0, 0x139c0, 0xfc3c0100), at 0xfe3d6e94
[21] 0xfe3d8ae0(0x0, 0x1, 0xfc3c2a00, 0xff3ec980, 0x30524, 0xff3ec268), at 0xfe3d8ae0
[22] call_init(0x1, 0xfe3d8a18, 0xfeb81b9c, 0xffdfffff, 0xff3ec980, 0xffffff7f), at 0xff3bfd4c
[23] elf_bndr(0xfe3d5110, 0x1021, 0xff1623a8, 0xff3ec0f8, 0xff3ee6a8, 0x0), at 0xff3cc32c
[24] elf_rtbndr(0xff1623a8, 0xff3ec1c4, 0x202, 0xff3ec190, 0x0, 0x46), at 0xff3b3804
[25] 0x33cbc(0xff1726c0, 0xff3ee9f4, 0xff000000, 0xff000000, 0x30574, 0xff3ec268), at 0x33cbc
[26] 0xff1623a8(0x0, 0x1, 0xfc3c2a00, 0xff3ec980, 0x30524, 0xff3ec268), at 0xff1623a8
[27] call_init(0x1, 0xff162314, 0xff3014f0, 0xffdfffff, 0xff3ec980, 0xffffff7f), at 0xff3bfd4c
[28] setup(0xc10000, 0x0, 0xff3ec1c4, 0x0, 0xfcd70924, 0x10000000), at 0xff3bf278
[29] _setup(0x10034, 0xffffffff, 0xffbff7bc, 0xff3b0000, 0x0, 0xffffffff), at 0xff3cd488
[30] _rt_boot(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xff3b37c8
(dbx)
I tried to execute the program directly and received a core dump. On opening the core file using dbx I am seeing the same error as above. The program is written in mix of C and C++. The code used to work on Solaris 9, but not working in Solaris 10.
It looks like the control is not even able to reach the first executable line in the program.
Please find below the details of the environment:
> uname -a
SunOS zdwsmiddle01 5.10 Generic_118822-18 sun4u sparc SUNW,Sun-Fire
> showrev -p | grep SUNWlibC
Patch: 119963-04 Obsoletes: Requires: Incompatibles: Packages: SUNWlibC
Patch: 119963-08 Obsoletes: Requires: Incompatibles: Packages: SUNWlibC
> CC -V
CC: Sun C++ 5.8 Patch 121017-10 2007/02/21
It would greatly help if anybody can direct on to find out the root cause of the problem.
Thanks.

