cancel
Showing results for 
Search instead for 
Did you mean: 

aio_suspend never returns

 
Highlighted
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
Highlighted
Occasional Visitor

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
Highlighted
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.