- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Program execution hangs before entering function o...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2004 08:02 AM
тАО07-29-2004 08:02 AM
For instance, we have a function like so, prototyped in "Interpolation.h" and implemented in "Interpolation.cpp":
void GetInterpolationValueAt(void* iData,
const double x,
double* y,
double* dydx)
109 {
110 DynInterpFloat* interp = static_cast
111 interp->getValueAt(x, *y, *dydx);
112 }
When this function is called, the program just hangs. If we look in gdb, the stack frame seems to be pointing to the opening "{"; that is, it does not appear to actually be in the function.
A partial backtrace looks like this:
#0 0x670a3868 in GetInterpolationValueAt+0 () at Interpolation.cpp:109 <-- C++
#1 0x12fe58 in intrpv () <-- C
#2 0x26b4d8 in cdgte () <-- FORTRAN
Another example problem function, implemented in a "Utility.h" type file:
inline bool checkEqual(const double val1,
const double val2,
const int prec = 14)
{
return val1 == val2 || relPrecision(val1 - val2, val1, val2) <= -prec;
}
When called, the process will again appear to hang at the opening "{". If you look at the trace in gdb at this point, the stack will appear corrupted ("#0 checkEqual... #1 doThat... #2 ??") If we move this function out of the header and into a .cpp, it works fine. Unfortunately, in the first example, the function is already in the .cpp, so this won't work there...
Any ideas? This all worked fine on 10.20, and the code also runs fine when compiled on Visual C++ 6.0. We've pretty much run out of ideas!
Thanks in advance,
Mark
> what /usr/bin/cc
/usr/bin/cc:
LINT B.11.11.04 CXREF B.11.11.04
HP92453-01 B.11.11.26792.GP HP C Compiler
$ Sep 8 2000 23:13:51 $
> what /opt/aCC/bin/aCC
/opt/aCC/bin/aCC:
$Revision: 92453-07 linker linker crt0.o B.11.16.01 030316 $
HP aC++ B3910B A.03.52
HP aC++ B3910B A.03.52
HP aC++ B3910B X.03.37.01 Language Support Library
> what /opt/fortran/bin/f77
/opt/fortran/bin/f77:
HP-UX f77 971027 (162928) B3907CA/B3909CA B.11.00.01
CUPROS_IC23B //1
/ux/core/libs/libc/archive_pa1/libc.a_ID
Oct 21 1997 13:07:38
Solved! Go to Solution.
- Tags:
- hang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2004 08:44 AM
тАО07-29-2004 08:44 AM
Re: Program execution hangs before entering function on HP-UX 11.0
You could try executing the program from tusc and then check the tusc output to see which system calls the program is making when it stops responding. Viewing it from the system call layer may provide some insight into why the application is stopped.
Regards,
Dave
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2004 08:55 AM
тАО07-29-2004 08:55 AM
Re: Program execution hangs before entering function on HP-UX 11.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2004 09:08 AM
тАО07-29-2004 09:08 AM
Re: Program execution hangs before entering function on HP-UX 11.0
I grabbed tusc; here's what I get at the end:
select(11, 0x680f2a80, NULL, NULL, NULL) ................. = 1
read(10, "01\013bd\0\0\0\0ffffffffffff\0\0".., 32) ....... = 32
lseek(12, 0, SEEK_CUR) ................................... = 32715
lseek(12, 0, SEEK_CUR) ................................... = 32715
read(12, "c l t _ 3 9 6 3 1 \n0 - 1 ".., 8192) ..... = 8192
brk(0x36ce000) ........................................... = 0
brk(0x36cf000) ........................................... = 0
brk(0x36d0000) ........................................... = 0
brk(0x36d2000) ........................................... = 0
brk(0x36d3000) ........................................... = 0
brk(0x36d4000) ........................................... = 0
brk(0x36d5000) ........................................... = 0
brk(0x36d6000) ........................................... = 0
I get this last line about 400 times, then it just hangs at
brk(0x3a2e000) ........................................... = 0
To the second suggestion: main is a C++ file. We link the application using aCC. I should have also noted that the checkEqual function *does* work from a smaller test application that doesn't use FORTRAN. I haven't tried adding FORTRAN into the mix for that application, but if you think it's worth trying, I'll pursue that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2004 09:10 AM
тАО07-29-2004 09:10 AM
Re: Program execution hangs before entering function on HP-UX 11.0
brk(0x3a2e000) ........................................... = 0
brk(0x3a30000) ........................................... = 0
brk(0x3a31000) ........................................... = 0
lseek(12, 0, SEEK_CUR) ................................... = 40907
lseek(12, 0, SEEK_CUR) ................................... = 40907
read(12, "1 4 6 9 0 1 4 2 5 \n3 \n2 1 ".., 8192) ..... = 8192
read(12, "N C E L I N E S \n* * * * * * ".., 8192) ..... = 8192
read(12, "E R T I C A L R E F E R E N C ".., 8192) ..... = 1557
lseek(12, 0, SEEK_CUR) ................................... = 58848
lseek(12, 0, SEEK_CUR) ................................... = 58848
lseek(12, 0, SEEK_CUR) ................................... = 58848
lseek(12, 0, SEEK_CUR) ................................... = 58848
lseek(12, 0, SEEK_CUR) ................................... = 58848
lseek(12, 0, SEEK_CUR) ................................... = 58848
lseek(12, 33751, SEEK_SET) ............................... = 33751
In user-mode ............................................. [running]
Not sure what this tells me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2004 06:10 PM
тАО07-29-2004 06:10 PM
Solutionif that does not solve your problem, can you step through the assembly and post what you find - what is this looping in ?
--
ranga
[i work for hpe]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2004 03:14 AM
тАО08-02-2004 03:14 AM
Re: Program execution hangs before entering function on HP-UX 11.0
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2004 05:05 AM
тАО08-02-2004 05:05 AM
Re: Program execution hangs before entering function on HP-UX 11.0
--
ranga
[i work for hpe]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2004 05:24 AM
тАО08-02-2004 05:24 AM
Re: Program execution hangs before entering function on HP-UX 11.0
http://www6.itrc.hp.com/service/patch/patchDetail.do?BC=patch.breadcrumb.main|patch.breadcrumb.search|&patchid=PHSS_30048&context=hpux:800:11:00
It seems that recommended patches have to have a star rating of 2 or more. I would guess that this patch hasn't reached that level yet because it's so new... In which case, perhaps a more obvious defect in the patch's "Defect Description" would have led me to the patch myself :) Which defect exactly is this, "JAGaf19767"? Is there a way for end users to look up those JAG changes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2004 05:40 AM
тАО08-02-2004 05:40 AM
Re: Program execution hangs before entering function on HP-UX 11.0
--
ranga
[i work for hpe]