Operating System - HP-UX
1753865 Members
7518 Online
108809 Solutions
New Discussion юеВ

SEGV_MAPERR - Address not mapped to object

 
AjayS
Frequent Visitor

SEGV_MAPERR - Address not mapped to object

SEGV_MAPERR - Address not mapped to object
Hi,

We are porting our application (C++ code) to HP-UX B11.31 Itanium 64-bit platform and the compiler version we use is HP aC++ Version A.06.28.02. Our application runs on Tuxedo environment.

During the server startup we are getting the following eror and coredump.
It is not a multithreaded application.
 
Reading symbols from drmanagerSvr...done.
Core was generated by `drmanagerSvr'.
Program terminated with signal 11, Segmentation fault.
SEGV_MAPERR - Address not mapped to object

warning: No unwind information found.
Skipping this library /usr/lib/hpux32/libcl.so.1.

#0 0x60000000c0546520:0 in __doprnt_main+0xb710 ()
from /usr/lib/hpux32/libc.so.1
(gdb) bt
#0 0x60000000c0546520:0 in __doprnt_main+0xb710 ()
from /usr/lib/hpux32/libc.so.1
#1 0x60000000c035b2f0:0 in _doprnt+0x30 () from /usr/lib/hpux32/libc.so.1
#2 0x60000000c0557f80:0 in vsprintf+0x80 () from /usr/lib/hpux32/libc.so.1
#3 0x41af040:0 in OSCMonitor::debugMsg (this=0x20000000400359d0,
logFileName=0x200000007fffd904, msgLevel=2000,
Message=0x40c0bd0 "drmanager: AcctIdCircId [%s] is invalid \n")
at OSCMonitor.cpp:195
#4 0x40daab0:0 in DMSQuery (rqst=0x2000000040076f28) at drmanager.cpp:239
#5 0x60000000caaf1180:0 in _tmsvcdsp () at tmsvcdsp.c:547
#6 0x60000000cab4b7e0:0 in _tmrunserver () at tmrunsvr.c:2128
#7 0x60000000caaee2c0:0 in _tmstartserver () at tmstrtsrvr.c:172
#8 0x40d5f70:0 in main () at BS-6bd6.c:76
(gdb)
Any pointers for a solution is greatly appreciated. 
5 REPLIES 5
Steven Schweda
Honored Contributor

Re: SEGV_MAPERR - Address not mapped to object

   I know nothing, but...

> #2 0x60000000c0557f80:0 in vsprintf+0x80 () from /usr/lib/hpux32/libc.so.1

   That sounds as if you're passing some kind of junk to vsprintf().

> #3 [...] Message=0x40c0bd0 "drmanager: AcctIdCircId [%s] is invalid \n")
> at OSCMonitor.cpp:195
> #4 0x40daab0:0 in DMSQuery (rqst=0x2000000040076f28) at drmanager.cpp:239

   I can't see the code in those files at those lines.  Have you looked
at it?  Knowing nothing, I'd worry about what's getting passed in for
that "%s" format specifier.

ranganath ramachandra
Esteemed Contributor

Re: SEGV_MAPERR - Address not mapped to object


,We are porting our application (C++ code) to HP-UX B11.31 Itanium 64-bit platform and the compiler version we use is HP aC++ Version A.06.28.02. Our application runs on Tuxedo environment.

Skipping this library /usr/lib/hpux32/libcl.so.1.
Note that you have built a 32-bit application (aCC defaults to +DD32, you need to explicitly specify +DD64 if you wish to build 64-bit applications)
#2 0x60000000c0557f80:0 in vsprintf+0x80 () from /usr/lib/hpux32/libc.so.1
#3 0x41af040:0 in OSCMonitor::debugMsg (this=0x20000000400359d0,
logFileName=0x200000007fffd904, msgLevel=2000,
Message=0x40c0bd0 "drmanager: AcctIdCircId [%s] is invalid \n")
at OSCMonitor.cpp:195
As already pointed out, it seems very likely that the problem was caused by bad arguments passed to vspritf. In gdb, listing the source at frame 3 might show you what is being passed to vsprintf.
(gdb) f 3
(gdb) list
Any pointers for a solution is greatly appreciated. 
For starters, it is generally a good idea to begin with the topmost frame in the stack trace that belongs to your own code and look for obvious problems.

 
--
ranga
[i work for hpe]

Accept or Kudo

AjayS
Frequent Visitor

Re: SEGV_MAPERR - Address not mapped to object

Code where crash is happening: 

OSCMon().debugMsg("",OSCMONTRACEMSGLOWPRIORITY,
"drmanager: AcctIdCircId [%s] is invalid \n",
theCommonInterface.getAcctCircId());

theCommonInterface.getAcctCircId() is returning a RWCString

Now if i comment this code, I get a core dump on exit of the function DMSQuery()

Reading symbols from drmanagerSvr...done.
Core was generated by `drmanagerSvr'.
Program terminated with signal 11, Segmentation fault.
SEGV_MAPERR - Address not mapped to object

warning: No unwind information found.
Skipping this library /usr/lib/hpux32/libcl.so.1.

#0 0x60000000c2d70780:0 in std::ios_base::_C_fire_event(std::ios_base::event,bool)+0xd0 () from /usr/lib/hpux32/libstd_v2.so.1
(gdb) bt
#0 0x60000000c2d70780:0 in std::ios_base::_C_fire_event(std::ios_base::event,bool)+0xd0 () from /usr/lib/hpux32/libstd_v2.so.1
#1 0x60000000d1220cd0:0 in std::ios_base::~ios_base()+0x50 ()
from /usr/lib/hpux32/librwtool_v2.so.1
#2 0x60000000d1220990:0 in RWbistream::~RWbistream()+0x110 ()
from /usr/lib/hpux32/librwtool_v2.so.1
#3 0x40dee40:0 in DMSQuery (rqst=0x2000000040076f38) at drmanager.cpp:423
#4 0x60000000caaf1180:0 in _tmsvcdsp () at tmsvcdsp.c:547
#5 0x60000000cab4b7e0:0 in _tmrunserver () at tmrunsvr.c:2128
#6 0x60000000caaee2c0:0 in _tmstartserver () at tmstrtsrvr.c:172
#7 0x40d6130:0 in main () at BS-1b00.c:76
(gdb)

ranganath ramachandra
Esteemed Contributor

Re: SEGV_MAPERR - Address not mapped to object


theCommonInterface.getAcctCircId() is returning a RWCString

A signal (SIGSEGV, SEGV_MAPERR ...) would be a result of the return value, not the return type.

Now if i comment this code, I get a core dump on exit of the function DMSQuery()

 

Commenting the code lets you proceed without understanding the cause of the problem. Looks like you can't do that this time.

 
--
ranga
[i work for hpe]

Accept or Kudo

Dennis Handly
Acclaimed Contributor

Re: SEGV_MAPERR - Address not mapped to object

>Code where crash is happening: 

 

No, this is the caller of that code.  As Steven said, what's on OSCMonitor.cpp:195, in frame 3, the caller of vfprintf?

Are you passing a RWCstring to a stdarg parm?  Does debugMsg know how to convert that to a char*?

Are you doing tricky non-portable stuff with va_list?

 

>AcctIdCircId [%s] is invalid \n")

 

Note you have an invisible space before newline, delete it.

 

>warning: No unwind information found. Skipping this library /usr/lib/hpux32/libcl.so.1.

 

Don't link with -lcl on Integrity.

 

>Now if i comment this code, I get a core dump on exit of the function DMSQuery()

 

Perhaps you are dependent on the order of static construction?