Operating System - HP-UX
1753776 Members
7442 Online
108799 Solutions
New Discussion юеВ

Re: aio_suspend never returns

 
David Heitmann
Occasional Contributor

aio_suspend never returns

In my multithreaded application I'm performing an aio_read followed by an aio_suspend in one thread, and most of the time it works well. Sometimes the thread hangs at the aio_suspend which doesn't return. I added a call to aio_error just before the aio_suspend and it does return EINPROGRESS. If I attach to the application with gdb it shows the thread waiting in __aio_suspend_sys+0x30 (). If I interrupt the aio_suspend with a SIGINT and then continue, the application finishes correctly with the I/O having completed successfully.

Any suggestions on how to determine why the aio_suspend is not returning when the I/O has completed?
2 REPLIES 2
Fernando_4
New Member

Re: aio_suspend never returns

I had that problem too (bug?). The workaround was using the signal notification for aio_read() and aio_write()and sigwaitinfo() for suspending the process.
fcmts
David Heitmann
Occasional Contributor

Re: aio_suspend never returns

The problem was determined to be a race condition in the HPUX kernel aio code. Patches for v2 and v3 will be available in the coming months.