- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Ansi C read hang in _read_sys ()
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
тАО01-09-2002 07:48 AM
тАО01-09-2002 07:48 AM
Ansi C read hang in _read_sys ()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2002 08:11 AM
тАО01-09-2002 08:11 AM
Re: Ansi C read hang in _read_sys ()
n = read(fd, p, left);
Depending on what type of file the fd variable refers to its perfectly valid for it to block waiting for more data, especially if its reading from a socket or a terminal.
Given that it looks like some sort of database code that is calling your function, its possible that the bug is there:
#3 0x438bc in starttxn_or_refetch () at cyrusdb_flat.c:252
#4 0x439bc in myfetch () at cyrusdb_flat.c:270
#5 0x43ab0 in fetch () at cyrusdb_flat.c:291
As a first step, find out exactly what read() is trying to read from. You can do this by using glance or lsof to display the open files. Use the debugger to find out what file descriptor the variable "fd" refers to.
If it is a normal file that read() is hanging on then perhaps you have a hardware or file system problem, so check syslog for errors.
Regards,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2002 10:03 AM
тАО01-09-2002 10:03 AM
Re: Ansi C read hang in _read_sys ()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2002 02:34 AM
тАО01-10-2002 02:34 AM
Re: Ansi C read hang in _read_sys ()
$ xd mailboxes.db > /dev/null
If that hangs as well you might have a hardware or file system problem, so have a close look at syslog and the diags.
Regards,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2002 07:34 AM
тАО01-10-2002 07:34 AM
Re: Ansi C read hang in _read_sys ()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2002 08:07 AM
тАО01-10-2002 08:07 AM
Re: Ansi C read hang in _read_sys ()
How big is the file? If its a really big file it may just be taking a long time to read. Also note that "left" should be of type off_t instead of int, otherwise you will get problems if the file is >2Gig.
A couple of other suggestions:
- use glance to view the process's offset and see if it is increasing over time
- Now that you've attached with gdb, have a closer look at some of the variables in the read() loop, in particular "left", "n" and "p".
- Step through the code instead of continuing and watch the variables. Also make sure that it is remaining in the map_refresh function and not looping from higher up.
Regards,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2002 09:28 AM
тАО01-10-2002 09:28 AM
Re: Ansi C read hang in _read_sys ()
File is only 4Mb, so it is not really that big.
I have tried stepping through the program--unfortunately, with the way it is compiled, it won't let me print any of the variables I need to look at, the "optimization" level is too high. I can't stop the mail server to recompile, and since we are having bad performance as it is, I really don't want it any slower/less efficient! On my backup system, there is no load, so I don't see the same response, at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2002 02:42 AM
тАО01-11-2002 02:42 AM
Re: Ansi C read hang in _read_sys ()
Regards,
Steve