- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- fork() hangs
Operating System - Tru64 Unix
1753698
Members
4838
Online
108799
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО08-07-2003 12:49 AM
тАО08-07-2003 12:49 AM
fork() hangs
I'm in the process of building and deploying an application that one of our customer's wrote in our environment for testing. The normal flow of the program is that it forks off a child process to run as a daemon, and then the parent process terminates. This program works fine in our customer's environment, but in our environment, when the call to "fork()" is made, it never returns and there is no sign of a child process. This seems very odd as based on the API documentation, a -1 should be returned if there is an error. Has anyone ever seen this behavior before? Any ideas regarding how I can debug this problem further? We are running "Compaq Tru64 UNIX V5.1 (Rev. 732)". Thanks!
Chris
Chris
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2003 02:56 AM
тАО08-07-2003 02:56 AM
Re: fork() hangs
First of all, check if the latest patchkit are installed on the machine.
Use the "trace" or "truss" (not part of the OS) to verify proper execution.
Another method is to use the kerneldebugger (kdbx) or debugging code within your application - but this is generic development work (and I'm wondering why this is not your first choice of troubleshooting).
Also check the limits of the processes/memory (ulimit -a) maybe it is only a simple resource issue.
Use the "trace" or "truss" (not part of the OS) to verify proper execution.
Another method is to use the kerneldebugger (kdbx) or debugging code within your application - but this is generic development work (and I'm wondering why this is not your first choice of troubleshooting).
Also check the limits of the processes/memory (ulimit -a) maybe it is only a simple resource issue.
Help() { FirstReadManual(urgently); Go_to_it;; }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2003 07:41 AM
тАО08-07-2003 07:41 AM
Re: fork() hangs
Ralf,
Thanks for the tips. I am unfamiliar with the "trace" or "truss" tools, but will look into getting them installed on our machine if they aren't already there.
I have tried using the "ladebug" debugger to inspect the program while it is hung, but the information that I have gotten hasn't been particularly insightful. In case it means anything to you, I have included the stack trace below.
Thanks again!
Chris
(ladebug) tlist
Thread Name State Substate Policy Pri
------ ------------------------- --------------- ----------- ------------ ---
1 default thread blocked mut 779 SCHED_OTHER 19
>* -1 manager thread blk SCS SCHED_RR 19
-2 null thread for VP 2 running VP 2 null thread -1
(ladebug) thread 1
Thread Name State Substate Policy Pri
------ ------------------------- --------------- ----------- ------------ ---
> 1 default thread blocked mut 779 SCHED_OTHER 19
(ladebug) where
>0 0x3ff805ca8cc in __hstTransferRegisters(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#1 0x3ff805af454 in __osTransferContext(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#2 0x3ff805a39c0 in __dspTransferContext(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#3 0x3ff805a1064 in __dspDispatch(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#4 0x3ff805ab66c in UnknownProcedure32FromFile8(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#5 0x3ff805ab054 in UnknownProcedure31FromFile8(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#6 0x3ff805abb9c in UnknownProcedure34FromFile8(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#7 0x3ff80f331d0 in aio_prefork(0xf, 0x1, 0x3ffc01d19e0, 0x100000, 0x0, 0x20000a0f600) in /usr/shlib/libaio.so
#8 0x3ff8018e8f8 in __do_atfork(0xf, 0x1, 0x3ffc01d19e0, 0x100000, 0x0, 0x20000a0f600) in /usr/shlib/libc.so
#9 0x3ff800d0700 in __fork(0xf, 0x1, 0x3ffc01d19e0, 0x100000, 0x0, 0x20000a0f600) in /usr/shlib/libc.so
#10 0x1202809dc in ((PwocApp*)0x1402096e8)->initDaemon() "/usr/users/pricer/Cardinal/builds/pwoc/rel3_6/pwocapp.cpp":574
#11 0x12027f408 in ((PwocApp*)0x1402096e8)->PwocApp(argc=2, argv=0x11fffc018) "/usr/users/pricer/Cardinal/builds/pwoc/rel3_6/pwocapp.cpp":361
#12 0x12027a910 in main(argc=2, argv=0x11fffc018) "/usr/users/pricer/Cardinal/builds/pwoc/rel3_6/main.cpp":44
#13 0x12024cc68 in __start(0xf, 0x1, 0x3ffc01d19e0, 0x100000, 0x0, 0x20000a0f600) in pwoc
Thanks for the tips. I am unfamiliar with the "trace" or "truss" tools, but will look into getting them installed on our machine if they aren't already there.
I have tried using the "ladebug" debugger to inspect the program while it is hung, but the information that I have gotten hasn't been particularly insightful. In case it means anything to you, I have included the stack trace below.
Thanks again!
Chris
(ladebug) tlist
Thread Name State Substate Policy Pri
------ ------------------------- --------------- ----------- ------------ ---
1 default thread blocked mut 779 SCHED_OTHER 19
>* -1 manager thread blk SCS SCHED_RR 19
-2 null thread for VP 2 running VP 2 null thread -1
(ladebug) thread 1
Thread Name State Substate Policy Pri
------ ------------------------- --------------- ----------- ------------ ---
> 1 default thread blocked mut 779 SCHED_OTHER 19
(ladebug) where
>0 0x3ff805ca8cc in __hstTransferRegisters(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#1 0x3ff805af454 in __osTransferContext(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#2 0x3ff805a39c0 in __dspTransferContext(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#3 0x3ff805a1064 in __dspDispatch(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#4 0x3ff805ab66c in UnknownProcedure32FromFile8(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#5 0x3ff805ab054 in UnknownProcedure31FromFile8(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#6 0x3ff805abb9c in UnknownProcedure34FromFile8(0xf, 0x1, 0x3ffc01b83c0, 0x3ff805ae430, 0x3ffc01b2000, 0x20000a0f600) in /usr/shlib/libpthread.so
#7 0x3ff80f331d0 in aio_prefork(0xf, 0x1, 0x3ffc01d19e0, 0x100000, 0x0, 0x20000a0f600) in /usr/shlib/libaio.so
#8 0x3ff8018e8f8 in __do_atfork(0xf, 0x1, 0x3ffc01d19e0, 0x100000, 0x0, 0x20000a0f600) in /usr/shlib/libc.so
#9 0x3ff800d0700 in __fork(0xf, 0x1, 0x3ffc01d19e0, 0x100000, 0x0, 0x20000a0f600) in /usr/shlib/libc.so
#10 0x1202809dc in ((PwocApp*)0x1402096e8)->initDaemon() "/usr/users/pricer/Cardinal/builds/pwoc/rel3_6/pwocapp.cpp":574
#11 0x12027f408 in ((PwocApp*)0x1402096e8)->PwocApp(argc=2, argv=0x11fffc018) "/usr/users/pricer/Cardinal/builds/pwoc/rel3_6/pwocapp.cpp":361
#12 0x12027a910 in main(argc=2, argv=0x11fffc018) "/usr/users/pricer/Cardinal/builds/pwoc/rel3_6/main.cpp":44
#13 0x12024cc68 in __start(0xf, 0x1, 0x3ffc01d19e0, 0x100000, 0x0, 0x20000a0f600) in pwoc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2003 09:09 AM
тАО08-08-2003 09:09 AM
Re: fork() hangs
In case anyone is interested, I discovered that the "fork()" hang is being caused by our application being linked against both the "aio" and "aio_raw" libraries. If I remove one or other from the library list, all seems well. Does anyone know somewhere where I can read more about these two libraries?
Chris
Chris
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP