Need to sleep after aiowrite (or aio_write) to socket or write may not complete...

Need to sleep after aiowrite (or aio_write) to socket or write may not complete...

Post by Dale Peaka » Thu, 13 Jun 2002 20:42:22

I've a problem with aiowrite (and aio_write) on Solaris 2.8.

The problem is my program is successfully reading and writing
asynchronously to a socket, but after a while aiowait (or
aio_suspend) fails to return the completion notification for
one of my aiowrite requests.

Looking at truss (and tcpdump output), the problem is that the
pwrite64 call just doesn't complete.

The weird thing is, if I nanosleep for a short while after
posting the aiowrite request, everything runs smoothly.

Since the test client I'm using is MSIE, I doubt that the client
is doing anything wrong (I also get the same results with a
hand-coded test client).

Any suggestions?

  - Dale.


1. aiowrite/aio_write: Which?

Solaris provides aiowrite(3) and aio_write(3R).  What is the difference
besides the API?

Does aio_write *copy* the buffer before returning so that you can
immediately reuse the buffer?  Or do you have to wait for the
signal which indicates that the write is completed?


  David Lehmann                       Toshiba America Consumer Products, Inc.

  Voice: (609)951-8500  ext. 21       202 Carnegie Center, Suite 102
  Fax:   (609)951-9172                Princeton, NJ   08540

2. Umount floppy

3. A sleep needed between the socket-writes!!!

4. Help please - telnetting to 'bash' shell

5. Problems with redhat 4.2 install : Idle tasks may not sleep!

6. Sockets question

7. Message "idle task may not sleep"

8. Modified "stuff the keyboard buffer" program

9. Idle task may not sleep

10. Second Try: "Idle Task May Not Sleep"

11. idle task may not sleep

12. Help Plz: "Idle Task May Not Sleep"

13. idle task may not sleep