Operating System - Linux
1752805 Members
5589 Online
108789 Solutions
New Discussion юеВ

Re: PA Risk Executable on Itanium Server

 
SOLVED
Go to solution
Rao Uppuluri
Advisor

PA Risk Executable on Itanium Server

Hi
I have an executable compiled on HP-UX11i(11.11) that I ran on an HP-UX11i(11.23) Itanium server and it crashed. Gave following error:
[HP ARIES64]: Core file for 64 bit PA-RISC application
[HP ARIES64]: saved to core..
Memory fault(coredump)

BUT, When I ran the same exec on the Itanium server by using wdb (debuuger) it runs successfully! Any ideas please?

Thank you
Rao
27 REPLIES 27
Dennis Handly
Acclaimed Contributor
Solution

Re: PA-RISC Executable on Integrity server

Well, if it aborts, you should just debug from the core file. Getting a stack trace would be the first step.

I've had a few cases where it runs in the debugger. The obvious cases are uninitialized variables.
I've seen other cases where the debugger's private mapping of shlibs causes readonly strings to be writable and then it won't abort. But that should fail on PA too.

Rao Uppuluri
Advisor

Re: PA Risk Executable on Itanium Server

Dennis
Tks for the reply. I typed following (I am not familiar yet with debugging core files)

wdb -c core.usermaster usermaster

(usermaster is exec name)
It produced following output.

Detected 64-bit executable.
Invoking /usr/ccs/bin/gdb64.
HP gdb 3.4 for PA-RISC 2.0 (wide), HP-UX 11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 3.4 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
Core was generated by `usermaster'.
Program terminated with signal 11, Segmentation fault.
#0 fnc_mbStrLen (string=0x80000001000065d7 "") at multibyte.c:1029
1029 multibyte.c: No such file or directory.

Does this help you find anything? Also, is it possible for you to give me instructions to debug a core file, please? (to get stack trace)
Srimalik
Valued Contributor

Re: PA Risk Executable on Itanium Server

you have to give "bt" command to get a stack trace.

fnc_mbStrLen is causing a segfault.
Please confirm that 0x80000001000065d7 is valid address. You can try printing the string if it is a invalid address the stack will change(print function will dump somewhere). Then you need to trace this variable.

You can use this link for more gdb commands

http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=e8080f1bace021100f1bace02110275d6e10RCRD
abandon all hope, ye who enter here..
Rao Uppuluri
Advisor

Re: PA Risk Executable on Itanium Server

Hi Srikrishnan
I did the following gdb core on the Itanium server

and typed bt to get stack trace.
========= gdb output==========
(gdb) bt
#0 fnc_mbStrLen (string=0x80000001000065d7 "") at multibyte.c:1029
#1 0xc0000000080693b0 in fnc_StrLen (string=0x9fffffffe00033a8 "\n")
at str.c:767
#2 0xc00000000805ef44 in fnc_LoadIniFile (
IniFilename=0x9fffffffdfef87b0 "app.ini") at param.c:362
#3 0xc00000000805f880 in fnc_GetParamStr (
Section=0xc00000000801ca40 "Memory",
Item=0xc00000000801ca48 "TakeOverSIGUSR1", Default=0x0) at param.c:694
#4 0xc00000000805fad8 in fnc_GetParamLong (
Section=0xc00000000801ca40 "Memory",
Item=0xc00000000801ca48 "TakeOverSIGUSR1", Default=0) at param.c:754
#5 0xc00000000804f63c in EachTime () at mem.c:692
#6 0xc00000000804dd20 in fnc_Malloc (size=1024) at mem.c:214
#7 0xc00000000805ee98 in fnc_LoadIniFile (
IniFilename=0x9fffffffdfef87b0 "app.ini") at param.c:342
#8 0xc00000000805f880 in fnc_GetParamStr (Section=0xc000000008018938 "Debug",
Item=0xc000000008018ad8 "Dgn", Default=0xc000000008018ae0 "Off")
at param.c:694
#9 0xc00000000804169c in fnc_InitDgn () at dgn.c:411
#10 0xc000000007fc3300 in cdm_Initialise () at cdmslab.c:7543
#11 0xc000000007e49fbc in link_Initialise () at appclk.c:257
#12 0x4000000000002cb4 in main () at usermaster.c:59

(gdb) p 0x80000001000065d7
$1 = 9223372041149769175
(gdb)
=====+++++ end gdb output =====
Does that mean it is a valid address?

Tks

Dennis Handly
Acclaimed Contributor

Re: PA-RISC Executable on Integrity server

(gdb) p 0x80000001000065d7
$1 = 9223372041149769175
>Does that mean it is a valid address?

No, you just used calculator mode to convert hex to decimal.

You need to do:
(gdb) p string
(gdb) x /8gx 0x80000001000065d7-7

The first uses debug info. The second debugs at the machine code level.

For debugging core files there is more documentation here:
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=09080f1bace021100f1bace02110275d6e10RCRD
See: Debugging core files using HP WDB

Steven E. Protter
Exalted Contributor

Re: PA Risk Executable on Itanium Server

Shalom Rao,

For this and other reasons, you want to recompile.

The emulation that permits PA-RISC an executable to run on Intanium servers comes with a 70% performance penalty.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: PA-RISC Executable on Integrity server

>SEP: For this and other reasons, you want to recompile.

Because of the advanced compiler debugging options? ;-)
There is +check= (runtime checking) and +wlint.

>The emulation that permits PA-RISC an executable to run on Integrity servers comes with a 70% performance penalty.

It highly depends on what PA box you were using and whether the application was CPU bound. See:
http://www.hp.com/go/aries

James R. Ferguson
Acclaimed Contributor

Re: PA Risk Executable on Itanium Server

Hi:

The degree of performance penality under Aries is dependent upon both options configured and work type. These are summarized in the ARIES manpages:

http://docs.hp.com/en/B3921-60631/ARIES.5.html

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: PA-RISC Executable on Integrity server

>Srikrishan: Please confirm that 0x80000001000065d7 is valid address.

This may have nothing to do with the abort. I.e. it's just a parm of the aborting function.

The real problem is on line 1029 of multibyte.c. What's on that line?
Since the executable has debug info, why not use it? ;-)