Created attachment 475645 [details] code + README file Description of problem: When io_getevents is called from a shared library it returns immediately regardless of whether a timeout is specified. The same exact code when compiled into a regular program works as expected. Version-Release number of selected component (if applicable): libaio-0.3.109-2.fc13.x86_64 libaio-devel-0.3.109-2.fc13.x86_64 How reproducible: 100% Steps to Reproduce: 1. see README file inside attachment for instructions to reproduce 2. 3. Actual results: program is intended to wait 10 seconds inside io_getevents before returning, but instead returns immediately. Expected results: program should wait 10 seconds inside io_getevents call Additional info: See attached tar ball with code and instructions to demonstrate the bug
Created attachment 475648 [details] makefile Makefile to make easier to show bug: gmake works ./aiobug.works gmake bug ./aiobug.bug
Your problem can be solved by linking the shared object with libaio. Your code ended up in the compat code, which treated the wrong variable as the timespec, causing the problem. If you still believe there is a problem, feel free to reopen the bug and assign it to the linker. I'm sure they can at least give you a more satisfying answer than I can. Note: In the future, if you're going to attach test code, be sure it's freely licensed so it can make its way into regression test suites.
Ah, interesting, I had a feeling that the stack was getting misread and now I understand why although I am not expert enough to exactly know why it ended up in 'compat code' (although I have seen that code in the library so I see how params could get misread). Thanks for the Note, I should have removed the copyright (my emacs file open hook mode sticks it into every file I create and I did not event bother with it).