- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Can a read() in one thread block all threads i...
Operating System - HP-UX
1753419
Members
4820
Online
108793
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
тАО10-13-2009 04:12 AM
тАО10-13-2009 04:12 AM
Can a read() in one thread block all threads in a process?
We have developed a multi-threaded server application running on a HP-UX 11.23 ia64 system. The main task of the server is to handle files (move, copy, compress, decompress, etc.) on request from clients. Each client is handled by a separate thread. The application is typically serving around 10 clients at a time.
On a specific site which has an underlying HSM system there is a problem of intermittent freezing of the whole process. The whole process seems to be nothing for up to two-three minutes, and then starts to work normally again. During this time it can not even handle a simple "ping" request from our own developed server monitor.
We have used tools like lsof, tusc, gdb trying to pinpoint the problem. Using pst_status->pst_cmd we have noticed that during a freeze one of the threads in the process is always doing a read(). The read() is likely to be correlated to a first read of a file from the HSM system. When we moved the read() to a separate process, the freezing disappeared.
Is it possible that a read() in one thread of the process can freeze all threads of the process? I thought that the whole point with kernel threads was to aviod these kind of problems.
On a specific site which has an underlying HSM system there is a problem of intermittent freezing of the whole process. The whole process seems to be nothing for up to two-three minutes, and then starts to work normally again. During this time it can not even handle a simple "ping" request from our own developed server monitor.
We have used tools like lsof, tusc, gdb trying to pinpoint the problem. Using pst_status->pst_cmd we have noticed that during a freeze one of the threads in the process is always doing a read(). The read() is likely to be correlated to a first read of a file from the HSM system. When we moved the read() to a separate process, the freezing disappeared.
Is it possible that a read() in one thread of the process can freeze all threads of the process? I thought that the whole point with kernel threads was to aviod these kind of problems.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 05:17 AM
тАО10-13-2009 05:17 AM
Re: Can a read() in one thread block all threads in a process?
>Is it possible that a read() in one thread of the process can freeze all threads of the process?
Only if the other threads are doing I/O to the same file.
Are you doing any locking between threads? Using stdio on the same file between threads?
Only if the other threads are doing I/O to the same file.
Are you doing any locking between threads? Using stdio on the same file between threads?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2009 07:03 AM
тАО10-14-2009 07:03 AM
Re: Can a read() in one thread block all threads in a process?
>>Is it possible that a read() in one thread of the process can freeze all threads of the process?
>Only if the other threads are doing I/O to the same file.
>Are you doing any locking between threads? Using stdio on the same file between threads?
No, the file that is active in the read() call mentioned is never accessed from other threads at the same time. However, we are doing stdio on the log file from all of the threads. The thought have crossed our mind that this can be the link that is making the process to freeze. However, the thread that is locked in the read() call is currently not reading the log file, but a separate file, always from the HSM system. Could the log file explain the behaviour?
>Only if the other threads are doing I/O to the same file.
>Are you doing any locking between threads? Using stdio on the same file between threads?
No, the file that is active in the read() call mentioned is never accessed from other threads at the same time. However, we are doing stdio on the log file from all of the threads. The thought have crossed our mind that this can be the link that is making the process to freeze. However, the thread that is locked in the read() call is currently not reading the log file, but a separate file, always from the HSM system. Could the log file explain the behaviour?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2009 12:45 AM
тАО10-15-2009 12:45 AM
Re: Can a read() in one thread block all threads in a process?
>Could the log file explain the behaviour?
Possibly. Though since you aren't deadlocked, I'm not sure why the delay.
Is your log file on some NFS system? Would you be writing more than 8 Kb to the log, when it hangs?
Possibly. Though since you aren't deadlocked, I'm not sure why the delay.
Is your log file on some NFS system? Would you be writing more than 8 Kb to the log, when it hangs?
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