Operating System - Linux
1748142 Members
3496 Online
108758 Solutions
New Discussion юеВ

Re: HP IA64- Getting runtime error "SEGV_MAPERR - Address not mapped to object"

 
Bijaya
Occasional Advisor

HP IA64- Getting runtime error "SEGV_MAPERR - Address not mapped to object"

Hi,

I am porting HP UX 32 to 64 bit platform.When run the application it core dumped.

Below mentioed is the stack trace.

#0 0xc000000009c3da40:0 in MTPQty::operator= (this=0x600000000cf50f60,
inQty=@0x9fffffffffffda30) at mtpqty.cpp:68
#1 0xc00000000879fc90:0 in GeneralCapacity_sdb::SetParcelSize (
this=0x600000000019f2a0, irow=2, pUseCap=0x600000000039d020,
ParcelQty=@0x600000000004ff90) at capacity_sdb.cpp:278
#2 0xc0000000087972a0:0 in GeneralCapacity_sdb::query (
this=0x600000000019f2a0, pQtyConstraint=0x600000000004ff30,
pParcelSize=0x600000000004ff80, withLock=false) at capacity_sdb.cpp:130
#3 0xc000000008796c60:0 in GeneralCapacity_sdb::query (
this=0x600000000019f2a0, withLock=false) at capacity_sdb.cpp:29
#4 0xc000000008798760:0 in GeneralCapacity_sdb::query (
this=0x600000000019f2a0, rFilter=@0x9fffffffffffdc20)
at capacity_sdb.cpp:65
#5 0xc000000008a82730:0 in Config_db::query (this=0x600000000019f230,
rFilter=@0x9fffffffffffdc20, bFromAgents=true) at trconfig_db.cpp:39
#6 0xc000000006cce660:0 in DSAStaticSet::queryConfig (this=0x9fffffffbf6bfbb0)
at dsastaticset.cpp:1239
#7 0xc000000006dcccd0:0 in AllAgent::queryConfig (this=0x60000000002b8340)
at allagent.cpp:218
#8 0xc000000006e24250:0 in AutoRetenderAgent::initialize (
this=0x60000000002b8340, pEvent=0x600000000005b400)
at autoretenderagent.cpp:85
#9 0xc000000006e29540:0 in AutoRetenderAgent::allAction (
---Type to continue, or q to quit---
this=0x60000000002b8340, pEvent=0x600000000005b400)
at autoretenderagent.cpp:364
#10 0x400000000000d070:0 in ProcessArmEvents () at arm_main.cpp:483
#11 0x4000000000008670:0 in main (argc=5, argv=0x9fffffffffffe568)
at arm_main.cpp:210
7 REPLIES 7
Dennis Handly
Acclaimed Contributor

Re: HP IA64- Getting runtime error "SEGV_MAPERR - Address not mapped to object"

You got a signal 11, a bad address. If you have debug info, you should print the values of the parms and variables to see which is bad.

If you want to debug at the machine level, provide:
(gdb) disas $pc-16*8 $pc+16*4
(gdb) info reg
Bijaya
Occasional Advisor

Re: HP IA64- Getting runtime error "SEGV_MAPERR - Address not mapped to object"

I printed the data members of class inQty.Observed values are not correct.

In inQty=@0x9fffffffffffda30, What is the significance of the @ prefix in the address ? Does it mean its an invalid address ?

I am not understanding the assembly language code

;;; File: mtpqty.cpp
;;; 68 Qty::operator=(inQty);
0x9fffffffbb2609c0:0 <:operator>:
mov r33=r37;;
0x9fffffffbb2609c0:1 <:operator>:
mov r41=r32
0x9fffffffbb2609c0:2 <:operator>:
mov r42=r33
0x9fffffffbb2609d0:0 <:operator>:
nop.m 0x0
0x9fffffffbb2609d0:1 <:operator>:
nop.m 0x0
0x9fffffffbb2609d0:2 <:operator>:
br.call.dptk.few b0=0x9fffffffbb25ec30;;
0x9fffffffbb2609e0:0 <:operator>:
mov r1=r38
0x9fffffffbb2609e0:1 <:operator>:
nop.m 0x0
0x9fffffffbb2609e0:2 <:operator>:
br.cond.dptk.few MTPQty::operator=(Qty const&)+144;;
0x9fffffffbb2609f0:0 <:operator>:
nop.m 0x0

Dennis Handly
Acclaimed Contributor

Re: HP IA64- Getting runtime error "SEGV_MAPERR - Address not mapped to object"

>I printed the data members of class inQty. Observed values are not correct.

Then you need to debug why they are bad.

>In inQty=@0x9fffffffffffda30, what is the significance of the @ prefix in the address?

It just means that inQty is AT that address.

>I am not understanding the assembly language code

I would tell you what it means. You were suppose to supply:
(gdb) disas $pc-16*8 $pc+16*4
(gdb) info reg
Bijaya
Occasional Advisor

Re: HP IA64- Getting runtime error "SEGV_MAPERR - Address not mapped to object"

Please find the attached output of dias and info reg.

In between I am analyzing the data corruption of inQty and let you know the findings.

Thank you.
Dennis Handly
Acclaimed Contributor

Re: HP IA64- Getting runtime error "SEGV_MAPERR - Address not mapped to object"

>Please find the attached output of disas and info reg.

The code has:
0x9fffffffbb260a20:0 adds r10=8,r32
0x9fffffffbb260a20:1 adds r11=8,r33
0x9fffffffbb260a30:1 ld8 r11=[r11]
0x9fffffffbb260a40:0 st8 [r10]=r11;; <<<<<

This is code that is copying the 2nd and 3rd words from inQty to this. It is aborting trying to store to "this".

(gdb) p *this
Error accessing memory address 0x600000000cf50f70: Bad address.

Which shows the same problem, a bad "this" pointer.

>In between I am analyzing the data corruption of inQty and let you know the findings.

Ok.
Bijaya
Occasional Advisor

Re: HP IA64- Getting runtime error "SEGV_MAPERR - Address not mapped to object"

I found the reason why the data getting corrupted, it was due to ODBC in our application side.

However, after correcting this data problem, I found the below issue.

aCC runtime: Uncaught exception of type "os_time_toolkit_error". (rethrow)
Abort(coredump)

I check the stack trace,

#0 0xc000000000322cf0:0 in kill+0x30 () from /usr/lib/hpux64/libc.so.1
(gdb) where
#0 0xc000000000322cf0:0 in kill+0x30 () from /usr/lib/hpux64/libc.so.1
#1 0xc000000000247c90:0 in raise+0x30 () from /usr/lib/hpux64/libc.so.1
#2 0xc0000000002e56b0:0 in abort+0x190 () from /usr/lib/hpux64/libc.so.1
#3 0xc00000000178dcf0:0 in std::terminate()+0x50 ()
from /usr/lib/hpux64/libCsup.so.1
#4 0xc0000000017b34d0:0 in __cxa_rethrow+0x90 ()
from /usr/lib/hpux64/libCsup.so.1
#5 0x400000000000d820:0 in ProcessArmEvents () at arm_main.cpp:540
#6 0x4000000000008670:0 in main (argc=5, argv=0x9fffffffffffe588)
at arm_main.cpp:211

Could you please analyze ?
Dennis Handly
Acclaimed Contributor

Re: HP IA64- Getting runtime error "SEGV_MAPERR - Address not mapped to object"

>I found the below issue.
aCC runtime: Uncaught exception of type "os_time_toolkit_error". (rethrow)
#3 0xc00000000178dcf0:0 in std::terminate()+0x50 libCsup.so.1
#4 0xc0000000017b34d0:0 in __cxa_rethrow+0x90
#5 0x400000000000d820:0 in ProcessArmEvents arm_main.cpp:540
#6 0x4000000000008670:0 in main
arm_main.cpp:211

>Could you please analyze?

There is nothing to analyze, everything is there in the first error message I added.
You are rethrowing os_time_toolkit_error and there is no catch handler to catch it in ProcessArmEvents or main.

If you want to trace the original throw, you can use these gdb commands:
(gdb) catch catch
(gdb) catch throw