Operating System - HP-UX
1758307 Members
2703 Online
108868 Solutions
New Discussion юеВ

Binary that ran fine on 10.20 doesn't run on 11i 64bits

 
SOLVED
Go to solution

Binary that ran fine on 10.20 doesn't run on 11i 64bits

Hello all,

I have an old application that used to run on an old 10.20 server and I'm trying to migrate to HP-UX 11i 64bits (vPar). When I run it on my new OS, it fails with a "Bus error" message (no core dump).

I traced it with wdb and apparently it tries to reach an address space that isn't allowed by the system.

We no longer have support for this application.Is there a way for me to "encapsulate" this as a 32bit application? In other words, to make it act as if it was on a 32 bit OS?

Thanks,
Rikk
Carpe Diem
15 REPLIES 15
Bill Hassell
Honored Contributor

Re: Binary that ran fine on 10.20 doesn't run on 11i 64bits

> I traced it with wdb and apparently it tries to reach an address space that isn't allowed by the system.

Well, this sounds as if your program needs to allocate more space than the current OS allows for a 32bit program (kernel parameters in this vPar?). I doubt that the 64bit OS is causing the error. It is very likely a coding error that happened to work at 10.20 but would fail at 11.00 32 or 64 bits. If you don't have the ability to fix the bug, you'll have to keep a 10.20 machine forever...


Bill Hassell, sysadmin
Steven E. Protter
Exalted Contributor

Re: Binary that ran fine on 10.20 doesn't run on 11i 64bits

Shalom,

The program could be coded using PA-RISC functionality that is not supported any more.

AIRES will not run everything.

A recompile with a modern compiler will probably point out some issues.

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
James R. Ferguson
Acclaimed Contributor

Re: Binary that ran fine on 10.20 doesn't run on 11i 64bits

Hi:

> SEP: AIRES will not run everything. A recompile with a modern compiler will probably point out some issues.

I don't think we know the hardware on which Richard is running. Aries might not be involved at all.

That said, Aries runs "well-behaved" PA-RISC code unless that code was compiled on HP-UX version 8.x or earlier. Have a look at the Aries(5) manpages under "LIMITATIONS".

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: Binary that ran fine on 10.20 doesn't run on 11i 64bits

>HP-UX 11i

This isn't helpful. There are at least 4 versions and two architectures. Please provide "uname -a".

>I traced it with wdb and apparently it tries to reach an address space that isn't allowed by the system.

You mean you have a bad pointer. Saying "address space" is too hand wavy.

Can you provide this at the abort:
(gdb) bt
(gdb) info reg
(gdb) disas $pc-4*16 $pc+4*4

>to make it act as if it was on a 32 bit OS?

The one purpose of HP-UX is to make 32 bit applications run correctly. Why would you think this is your problem?

>Bill: this sounds as if your program needs to allocate more space than the current OS allows for a 32bit program

I'm not sure how you know it sounds like anything except it has a signal 10?
(It does sound like we need more info. :-)

>I doubt that the 64bit OS is causing the error. It is very likely a coding error that happened to work at 10.20

Right. Unless it is a configuration issue. Or an issue with large PIDs, etc.

Re: Binary that ran fine on 10.20 doesn't run on 11i 64bits

Hello all,

Thank you for you interest in this issue.

I am assuming that this is not a ├в Well behaved├в PA-RISC code but unfortunately, the company that produced this code doesn├в t exist anymore. There is no longer any support for this piece of code.

To my knowledge, we├в re not using ARIES since this runs PA-RISC apps on Itanium. I├в m running on 11.11 PA-RISC.

Uname ├в a reports:

HP-UX legapdev B.11.11 U 9000/800 2301639705 unlimited-user license

I├в ve attached the log of the wdb instructions, asked by Dennis, to this post. I do seem to have a bad pointer. Sorry for the hand wavy comment as English is not my maternal language.

By the way, I├в m running this on a cell of an rp7440 server.

Regards,

P.S. I will award points as soon as I finish this post. Thanks again.
Carpe Diem

Re: Binary that ran fine on 10.20 doesn't run on 11i 64bits

Sorry. Had a special character conversion issue.Here is a repost.

Hello all,

Thank you for you interest in this issue.

I am assuming that this is not a "Well behaved" PA-RISC code but unfortunately, the company that produced this code doesn't exist anymore.There is no longer any support for this piece of code.


To my knowledge, we're not using ARIES since this runs PA-RISC apps on Itanium. I'm running on 11.11 PA-RISC.

Uname -a reports:

HP-UX legapdev B.11.11 U 9000/800 2301639705 unlimited-user license

I've attached the log of the wdb instructions, asked by Dennis, to this post. I do seem to have a bad pointer. Sorry for the hand wavy comment as English is not my maternal language.

By the way, I'm running this on a cell of an rp7440 server.

Regards,

P.S. I will award points as soon as I finish this post. Thanks again.
Carpe Diem
Venkatesh BL
Honored Contributor

Re: Binary that ran fine on 10.20 doesn't run on 11i 64bits

> I am assuming that this is not a "Well behaved" PA-RISC code but unfortunately, the company that produced this code doesn't exist anymore.There is no longer any support for this piece of code.

Oops. Looks like a dead-end to me. :(
Wim Rombauts
Honored Contributor

Re: Binary that ran fine on 10.20 doesn't run on 11i 64bits

Since you say that the application seems to want to allocate more memory tan it is allowed, maybe - just a guess - your application needs more *private* memory than is standard configured in HP-UX 11.11.

If you run "chatr | grep 'quadrant private'", are both of them disabled ?

If the third quadrant is disabled, run "/usr/bin/chatr +q3p enable ".

Ig the third quadrant is enabled, but the fourth is not, run "/usr/bin/chatr +q4p enable ".

Again, this is just a guess. If it doesn't make any difference, you can revert the changes by running the same comands and use "disable" instead of "enable"
Dennis Handly
Acclaimed Contributor

Re: Binary that ran fine on 10.20 doesn't run on 11i 64bits

>I do seem to have a bad pointer.

0xc01f51b4: addil L'-0x800,%r19,%r1
0xc01f51b8: ldw 0x4b0(%r1),%r1
0xc01f51bc: ldw 0(%r1),%r31
0xc01f51c0: ldw 0x20(%r31),%r21
0xc01f51c4: ldw 8(%r21),%rp <<<
0xc01f51c8: ldi 0x800,%r22

This is fetching a shlib global/static. And the value in r21 is bad: 7b045cc0
SP is 7f7f0c10, so it isn't a stack overflow.

It doesn't look like out of heap space.

Is the executable stripped?
What shlibs does it use? (What does chatr(1) show?)
Does "info shared" work in gdb?
I hope you are debugging the core file on the same system that produced it?

How big is the core file? If no proprietary info in it, can you make it available?

>Wim: Since you say that the application seems to want to allocate more memory than it is allowed, maybe

I'm not sure how you can determine this from the register dump?