- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 64-bits executables not working
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
Forums
Discussions
Discussions
Discussions
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
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
09-10-2002 09:42 AM
09-10-2002 09:42 AM
64-bits executables not working
My first question is related to stacksize. Is it true that there are two system-wide parameters for stacksize, one for 32 and another one for 64-bits.
When I use ulimit, what does it display?
Any help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2002 09:57 AM
09-10-2002 09:57 AM
Re: 64-bits executables not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2002 10:38 AM
09-10-2002 10:38 AM
Re: 64-bits executables not working
I was worried about the stack on 64-bits, since this application corrupts a string buffer while calling an Oracle (8.1-7) call.
Let me explain the executable environment. It is a multi-threaded server application, calling Oracle db in the backend. As I said earlier, the same code works with 32-bit executables, but fails to work with 64-bits.
I was looking into the stacksize (for a thread), since one of our experts asked me to use "glance" to look for the memory (using s:pid, followed by M). It seems like that 64-bits executable threads are using 32K of stacksize.
How could I find out about the stack allocated for a specific thread?
Neeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2002 10:42 AM
09-10-2002 10:42 AM
Re: 64-bits executables not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2002 11:51 AM
09-10-2002 11:51 AM
Re: 64-bits executables not working
If you're hitting the process stack limit you should get a SIGSEGV with a message that it is caused by stack growth failure. If you could describe how the application fails it would help.
The first thing that leaps to my mind is that perhaps you have a function defining an array of longs (or such) so that the array size doubles for 64-bit compilation and exceeds the process stack. Just the first thing I'd check without more information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2002 12:03 PM
09-10-2002 12:03 PM
Re: 64-bits executables not working
I don't understand your comment. We use "pthread_attr_setstacksize" function to set the thread stacksize to 96K at thread-creation time.
Is it not going to work?
What do you mean by 32K UAREA?
We need a larger stack for these threads, since they call many functions with lots of local variables. No, we don't have an array of longs. The corruption seems to occur in a char array.
Regards,
Neeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2002 01:09 PM
09-10-2002 01:09 PM
Re: 64-bits executables not working
I'll say up front that I'm not a pthreads guru by any means -- it sounded like a core kernel VM question, hence my interest. pthreads manage the memory for their stacks themselves, so I don't have easy answers. From my cursory inspection however:
1) Does pthread_attr_getstacksize() on the 64-bit application return 96k as expected? Always nice to check to make sure something didn't get garbled on the system call. [Side note - I don't see why pthread_attr_setstacksize() wouldn't work as long as the linker is getting the 64-bit library... which I have to assume it is.. you'd get EINVAL if the operation failed entirely.
2) The pthreads allocation goes through mmap and sets up variable, private memory ranges for the stacks. Just to check - is glance showing 32k for the RSS or VSS for the mmap regions corresponding to the pthread stacks?
(I don't see stack sizes listed in glance -- I can get to it in gpm, though...). If the RSS is 32k but the VSS is 96k things are normal - you're just only touching 8 pages on the stack.
Looking at the memory ranges and figuring out which goes with which thread would be tough to do from glance. I can't think of a non-kernel intrusive way to do it... but I think that has more to do with the fact that the way I work tends to be kernel intrusive by definition, sorry. You should be able to verify the stack size issue by running a single thread in a process being monitored by glance (preferably having the thread initialization wait until you're ready, I would think) and just look for a private mmap allocation.
Sorry I can't be of more help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 10:14 AM
09-27-2002 10:14 AM
Re: 64-bits executables not working
on the other hand, 64 bit applications under HP-UX will get addresses with values above 4GB even if they do not allocate > 4GB of memory. this will "expose" problems just as still casting pointers to ints instead of longs.
not sure if it is related, but seemed worth mentioning.
on the DSPP (via devresource.hp.com) there may still be pointers to the scanning tools for 32 to 64-bit migration. you may want to get those and run your sources through them.